Bugzilla – Bug 8073
Replace concatenated strings with unique strings
Last modified: 2009-10-05 14:32:40 UTC
String concatenation just doesn't work with localization. One bad example is the "adding xy to playlist" (wording simplified here) toaster. This is composed of three items: "adding", title, "to playlist". While this just works in English, German would use a different order (as would others too). Or even use only two segments. It's even worse with the small space we have available in that popup Additionally we're using the "adding" string not only in this case, but in the "to play next" case as well. This doesn't work in German. There's no way to get a good translation out of these. Instead of concatenating strings we should definitely use one single string with placeholders. This way translators could decide themselves where to put the line break etc. The above might remain Adding\n%s\nto playlist... and Adding\n%s\nto play next... but become Füge\n%s\nan Wiedergabeliste an and Spiele\n%s\nnach dem aktuellen Lied
One more comment from the translators: We have a problem for Dutch, as expected: The existing translation for 'adding' is not appropriate. That particular translation of Adding can't simply be relocated to this particular string. Incidently "Adding to play next:" is in the memory, but the variable complicates matters. For Dutch the best thing would be to have it displayed over two lines: (variable) toevoegen om als volgende af te spelen If it has to be 3, a different translation for "Adding" is needed, leading to the not so charming solution: Toevoegen van (variabele) om als volgende af te spelen.
Is displaying the title filling the placeholder even necessary? The main goal should simply be to provide visual feedback for the user, so displaying "Adding to playlist" should suffice.
It's not about one occurence of a particular case, but about all instances of concatenated strings in SC/SN/Controller/whatever. Thus this is not a bug which can be fixed by one person. But it's something we have to do now, and keep in mind for the future.
fixed with SBC r2537 and SC 7.1 trunk change 20367 Jive now supports \n instructions within strings to showBriefly SC changed to send multiline showBriefly text as one string, so this can be localized more properly. Michael, IMO this is fixed for strings being sent to the Controller. No doubt there are other spots where we do this in web/player UI, but I'm not fixing that part. This is now a SqueezeCenter bug, changing to reflect that.
(starting my own list of items to be done) PLUGIN_JIVEEXTRAS_CUSTOM - replace # with placeholder
Created attachment 3422 [details] patch for last comment
Thanks for the patch! I'll await translations, as otherwise they'll overwrite the changed string again...
translations are in. This is an ongoing process - punting target as a reminder.
*** Bug 5024 has been marked as a duplicate of this bug. ***
This is an ongoing process - punting target as a reminder.
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server! * SqueezeCenter: 28672 * Squeezebox 2 and 3: 130 * Transporter: 80 * Receiver: 65 * Boom: 50 * Controller: 7790 * Radio: 7790 Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.