Bug 8073 - Replace concatenated strings with unique strings
: Replace concatenated strings with unique strings
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Localization
: 7.4.0
: PC Other
: P4 normal (vote)
: 7.4.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-06 06:14 UTC by Michael Herger
Modified: 2009-10-05 14:32 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
patch for last comment (1.09 KB, patch)
2008-06-12 07:23 UTC, Ben Klaas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2008-05-06 06:14:56 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
Comment 1 Michael Herger 2008-05-06 08:28:34 UTC
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.
Comment 2 Jim McAtee 2008-05-12 12:25:25 UTC
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.
Comment 3 Michael Herger 2008-05-12 12:49:51 UTC
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.
Comment 4 Ben Klaas 2008-05-30 13:20:28 UTC
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.
Comment 5 Michael Herger 2008-06-12 02:41:40 UTC
(starting my own list of items to be done)

PLUGIN_JIVEEXTRAS_CUSTOM - replace # with placeholder
Comment 6 Ben Klaas 2008-06-12 07:23:40 UTC
Created attachment 3422 [details]
patch for last comment
Comment 7 Michael Herger 2008-06-12 07:29:02 UTC
Thanks for the patch! I'll await translations, as otherwise they'll overwrite the changed string again...
Comment 8 Michael Herger 2008-06-18 02:58:48 UTC
translations are in. 

This is an ongoing process - punting target as a reminder.
Comment 9 Michael Herger 2008-06-27 02:58:21 UTC
*** Bug 5024 has been marked as a duplicate of this bug. ***
Comment 10 Michael Herger 2008-07-24 03:15:07 UTC
This is an ongoing process - punting target as a reminder.
Comment 11 James Richardson 2009-10-05 14:32:40 UTC
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.