LordSputnik, I was gonna ask about that. Shouldn't we put them in direct-database to avoid all sorts of merge fun (again)?
Or should we branch direct-database for the react conversions?
regagain_ has quit
LordSputnik
Leftmost: well, they have nothing to do with direct-database
Leftmost
I'd say branch direct-database then.
LordSputnik
But I want to test them in master
Testing in direct-database requires setting up a whole new database :P
Leftmost
Alright.
LordSputnik
I could make a new branch, cherry pick all the commits up to the react pages to that new branch, cherry pick the react page commits to master, cherry pick all the commits after the react pages to the new branch, then delete the old direct-database?
Leftmost: we could just make it so that entity data can only ever be used by one BBID, and one merging you'd need to create new entity data and a new relationships set - that way, we avoid the issue of changing BBIDs, and can still record BBIDs on the relationship (which I think is also needed)
Leftmost
Hmm. Why would we need to record BBIDs on the rel? It doesn't really change how far we have to drill down to display a relationship in the end.
LordSputnik
Well, because the source and target BBIDs are a property of the relationship anyway
Leftmost
Well, I'd argue that the source and target entities are a property of the rel, whereas BBID is a (mutable) property of the entity.
LordSputnik
BBID isn't mutable for an entity though
If it has a different BBID it's a different entity
Leftmost
I guess I'm looking at it like "entity B is merged into entity A; entity B's identity hasn't changed, but the BBID referring to it has".
The issue I see with creating new relationships is that it means the revision now has to touch every entity related to the changed entity.
If entity B is related to entity C, is it really a revision to entity C to merge B into A?
LordSputnik
Eww no
OK, so no BBIDs
Now the question is, can we merge RelationshipSet_Relationship and Relationship
If we keep them separate, if we duplicate a RelationshipSet, we need to create a new RelationshipSet_Relationship for each relationship in the set
If we merge them, if we duplicate a RelationshipSet, we need to create a new Relationship for each relationship in the set
In both cases, the amount of storage needed is exactly the same :P
Ah, but if we merge them it does become harder to keep object synchronised, forget that idea :P
Leftmost
I think keeping them separate is better, personally, though I don't know why right now. :-P
I was thinking about i18n last night. Template strings _almost_ get us everything we need for gettext. So close, but not there. :\
ariscop joined the channel
LordSputnik
Leftmost: what do you mean? I'm unfamiliar with the dark arts of i18n ;)
zas
I18n even worse one may think at first. :)
But that's still better than to force the rest of the world to speak and write french ;)
Leftmost
For proper i18n you need to be able to rearrange the contents of a string, so concatenation doesn't work. You need to be able to translate the string as a whole. Tagged templates allows that. However, in order to do this you often need to be able to rearrange _parameters_. You can technically do that with tags, but there's no way to access which parameters are which in the original, so you don't know how to rearrange, and you'd also
have to do the parsing work for what's a parameter in the translated string.
You can return functions from tags, and you could presumably do it with those, but you'd end up with something gross like __`${'soandso'} published ${'suchandsuch'}`({ soandso: 'FooBooks', suchandsuch: 'Foo Guide to Bartending' }).
Plural handling and parameter rearrangement are the top reasons I like gettext, because I have yet to see another i18n framework that gets it even as right as they do.
LordSputnik, are you working on updating the SQL? I'll do it if not.
zas
Leftmost: i agree gettext does a better job with plurals than most other stuff around. Apart few cases it covers i18n issues quite well.
Leftmost
It's definitely not perfect, but everything else I've looked at fails in a lot of cases where gettext succeeds.
LordSputnik, stanislas is asking for some insights into the calibre task. Thought you might have a better idea of the calibre side.
stanislas, is there anything in particular you're having trouble with or just hoping for a general picture?
(the endpoint is simple to use, that is, not the task)
stanislas
yeah, but googling bookbrainz api wasn't succsesful
thanks
LordSputnik
So you'll probably want to query the webservice several times. First to the /search endpoint, to get results, then once for each of the results, with the /entity/:bbid endpoint
stanislas: yeah, our documentation is fairly rubbish I'm afraid, it's on the list of things to-do, but that's a very long list!
stanislas
i've little knowledge of js, so i will try to figure something out
Please let us know if you have any more questions!
stanislas
LordSputnik: thanks, i will need it
:)
Leftmost
We're here to help. Sorry I couldn't be of more use on getting you started. :)
LordSputnik
Leftmost: so what is the interface to gettext?
format.js looks quite nice because it comes with React integration
And what's wrong with the pluralisation there?
Leftmost
It depends on that same zero/one/two/few/many/other paradigm.
LordSputnik
Is the handling of parameters any better in format.js than gettext?
regagain_ joined the channel
Leftmost
In C, you'd often do something like (as an example) sprintf(_("This is a string: %s"), inserted_str), where _() is the gettext wrapper. For plurals, sprintf(N_("There is %d message", "There are %d messages", n), n), where N_ is the plural gettext wrapper.
Gettext parameter handling is generally fine. It's JavaScript's lack of anything sprintf-like that causes problems.
LordSputnik
Well, JavaScript does have template strings now
Leftmost
Right, but you can't manipulate them directly, only declare them as a literal.
Still need to do identifiers, aliases, and relationships.
Freso
reosarevok: Seems like you've been on top of the account creations.
!m reosarevok
BrainzBot
You're doing good work, reosarevok!
Freso
I'll be going to bed early tonight, which OTOH probably means I'll be up early in the morning.
G'night y'all.
reosarevok
Sleep well :)
thanks bitmap :)
bitmap
np
reosarevok
alastairp: I guess Sertan will see from the ticket, but added now
chirlu`
Leftmost: Ah, I looked closer into the plperl issue, and it *is* there after all, but it needs recompiling.
It links to libperl.so.5.10, which is no longer there because there is an updated perl now.
Leftmost
chirlu`, okay. I'll figure out how to get it compiled
.
stanislas has quit
opatel99 joined the channel
opatel99
If I change a string in Picard, how do I ensure all the language files update it as well?
Leftmost
Picard is set up in such a way that if a string changes, the translators will be able to automatically pull in those changes and make the appropriate adjustments to their translation.
Ok, then is http://tickets.musicbrainz.org/browse/PICARD-692 a simple text change? I am not aware that Picard is able to read the registry for alternative operating systems to read the default music player, and additionally pull in icons as well...
Mineo
it uses some Qt api to automatically open the file in whatever player the user has configured
and yes, all that's required for that ticket is to change the text and update the translation source file :)
opatel99
I am intrigued about how the Transifex works. Once the pot file is uploaded, the Transifex server performs a pull request daily to update any changes throughout all languages?