lp doesn't help unless we hardcode the context keys, does it
yvanzo[m]
Yes you need the context key too.
bitmap[m]
you can override l_edit_name in the classes where the context differs from the standard 'edit type'
reosarevok[m]
I'm probably being stupid but, if edit_name is N_lp, shouldn't that already be a translated string anyway?
bitmap[m]
the no-op functions just return back the English string that was passed in
reosarevok[m]
Oh, those were just for gettext to extract it, weren't they
Can we move away from gettext soon? :p
bitmap[m]
yeah, I assume they aren't just using lp directly because we actually use the English names somewhere?
reosarevok[m]
No clue...
yvanzo[m]
We have context keys for all edit names.
reosarevok[m]
Yes, but most are just 'edit type' so bitmap is right that can be the default and be overrode when needed
bitmap[m]
reosarevok[m]: I think /doc/Edit_Types uses the English `edit_name` for the paths, at least
yvanzo[m]
bitmap[m]: Not sure to follow
PrathamGupta[m]
monkey: I changed the API_URL from api.listenbrainz to localhost:8100 and can create the playlists now. But on clicking on the playlist, I am getting a internal server error.
PrathamGupta[m] uploaded an image: (23KiB) < https://matrix.chatbrainz.org/_matrix/media/v3/download/matrix.org/QpPjkExZhXtxcsTSeRgldnXp/image.png >
yvanzo[m]: I just meant that there's no reason `edit_name` can't simply use `lp` (as these functions are executed after the translation is already set), unless we actually use the English names.
yvanzo[m]
Right, I don’t see any such reason or use of English names either.
The reason is probably for consistency with other names which use l_whatever? That's all I can think of, unless they were thinking of this obscure feature but the commit message would probably mention it then?
bitmap[m]
yvanzo[m]: I guess in theory it makes sense for `edit_name` to return the source string if `l_edit_name` exists (but perhaps there is no reason to separate them)
I didn't review every use of `->edit_name` or `.edit_name` in the server code or templates to make sure the translated versions can be used
reosarevok[m]
We're barely using l_edit_name right now, in any case
TO_JSON passes edit_name which then we just do l() on
yvanzo[m]
Or just factorize the context key with an edit_type_name_context set to edit_type by default, and overridden when needed. That’s almost the initial proposition with fewer need for local changes.
reosarevok[m]
So either we actually pass and use l_edit_name, or we factorize context
(and pass it to JS too)
Or we do a combination, factorizing context but using it just for l_edit_name and then passing that to TO_JSON
We do use edit_name on getEditHeaderClass, I forget how we use that
But maybe passing a separate l_edit_name is the cleanest
bitmap[m]
I've generally avoided outputting translated strings from TO_JSON but not opposed to using it here
reosarevok[m]
I mean, I'm fine with outputting the context and doing lp on JS if that seems cleaner
bitmap[m]
(I guess because I'd eventually prefer if we only had to maintain one translations implementation.)
reosarevok[m]
But one of the two needs to be on TO_JSON
Unless I'm missing a solution
bitmap[m]
if it's easy to do the lp in JavaScript, let's do that then? :)
reosarevok[m]
In theory, it should be, if I pass and override context
I guess `edit_type_name_context` as yvanzo suggested, for clarity
And I'll change the N_lp calls to use edit_type_name_context, and define it as 'edit type' on Server::Edit overriding it only when needed
It does seem cleaner than now, at least
Plus it should work, which is a slight improvement
yvanzo[m]
bitmap: Maybe I spoke too quickly about factorizing the context key, doesn’t `xgettext` needs the context key to be written out in full?
reosarevok[m]
Well, worst case scenario I'll duplicate it
bitmap[m]
yeah, it does, I assume we were still keeping the N_lp calls in the server for extraction
reosarevok[m]
Yes, I was, but I was going to do N_lp('string', edit_type_name_context) - will that not work?
yvanzo[m]
It won’t work indeed.
reosarevok[m]
(well, self->edit_type_name_context or whatever)
bitmap[m]
oh sorry I misunderstood that, yes you're right
reosarevok[m]
shift, whatnot :)
Hmmm. So I need to duplicate the context?
Not the end of the world, but if so, when do we move away from this?
Happy Matariki everyone! Today, just before the sun rises, we welcome the Matariki star cluster (the star Matariki and her star children), ideally with a cloud of steam from opening up our hangi (earth ovens) and beckoning in the new year with fresh food.
Now you know more about the Māori new year than most :P
Completely different note - I’ve started leaving thumbs up, hearts, rockets, so on, on PR’s and PR comments that catch my eye/are excellent + I happen to see. Is this an annoying distraction re. notifications? Or is it easily ignored by you devs and thus a welcome addition
bitmap[m]
I've never gotten notifications for reactions on GitHub at least and am not distracted by them
yvanzo: one thing I noticed that is annoying is that I'd want to show "Imágenes" for "Event art" in most places (we don't need to specify it's *Event* images on an event page tab for example) but there's a few places where I'd still need the distinction, like the added entities stats
It feels a bit weird to add context there, how would that work... "singular, shows in the same section as 'cover art'" :D
fletchto99 joined the channel
Leftmost joined the channel
Leftmost has left the channel
yvanzo[m]
It also feels a bit weird to have cover art and event art mixed with other entity types.
Maybe moving those as sub-rows of event/release would resolve both issues.
Kladky has quit
reosarevok[m]
Hmm. My only worry is whether it would look like they are subsets, so releases they added and added art to?
But it might work 🤷♂️
Not that I'm going to look into it right now, but :)
Running tests on beta
Toasty has quit
Sigh. Selenium timed out
Well, probably still releasing, can always undo if something breaks horribly
Updating beta
Done
aerozol[m]
Ahh, did some walkthroughs on adding events and adding event art, but my audio on my new mic is choppy. I tested before starting, but it only decided to fuck up during the actual take. It takes too much time to redo any time soon - so the question is: Better to have not-perfect youtube tutorials (still perfectly understandable, imo), or none at all?