<label for="barcode_fieldset">Select the host record to link[% IF ( bibliotitle ) %] to <i>[% bibliotitle | html %]</i>[% END %]</label> Turns into: Select the host record to link%s to This is quite hard to translate. The %s here is the IF, not the title, so you can't move where the title appears if present, which doesn't work in all languages. This is probably due to the <i> used here.
Removing "<i>...</i>" produces "Select the host record to link%s to %s%s" Other option would be "Select the host record to link" and "Select the host record to link to %s" taking the IF out, or the message in, and using an [% ELSE %] What would be the best option?
I think both would be better, but the second option is probably easiest for not so experienced translators. Moving around the %s is not so often done I think.
Created attachment 105309 [details] [review] Bug 25443: Improve translation of 'Select the record to link%s to' Before this patch the title was set in italic, which caused the translation string to be cut off. Removing the italic formatting in favor of quotes and splitting the string into 2 sentences (dealing with title existing and not existing: Select the host record to link to '[% bibliotitle | html %]' Select the host record to link To test: - Activate EasyAnalyticalRecords system preference - Search for a record in staff - Use Edit > Link to host record - Verify the text is shown as above with the reord's title - The second case is a bit theoretical: - Delete 245$a from the record or empty out biblio.title using SQL - Verify the string still shows but without the 'to...' part.
In that case, will you consider (In reply to Katrin Fischer from comment #2) > I think both would be better, but the second option is probably easiest for > not so experienced translators. Moving around the %s is not so often done I > think. Ok :) In that case, could you consider surrounding the text with <span>...</span>? If not we get this string "%s Select the host record to link to '%s' %s Select the host record to link %s " With span we get msgid "Select the host record to link" msgid "Select the host record to link to '%s'"
Created attachment 105315 [details] [review] Bug 25443: Improve translation of 'Select the record to link%s to' Before this patch the title was set in italic, which caused the translation string to be cut off. Removing the italic formatting in favor of quotes and splitting the string into 2 sentences (dealing with title existing and not existing: Select the host record to link to '[% bibliotitle | html %]' Select the host record to link To test: - Activate EasyAnalyticalRecords system preference - Search for a record in staff - Use Edit > Link to host record - Verify the text is shown as above with the reord's title - The second case is a bit theoretical: - Delete 245$a from the record or empty out biblio.title using SQL - Verify the string still shows but without the 'to...' part. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 105316 [details] [review] Bug 25443: (follow-up) sorround strings with <span> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Patch works, added follow-up to put strings inside "span".
Thx Bernardo, you beat me to it! I was pondering to merge the strings again (just removing the italic). But I guess this is still cleaner.
Created attachment 106517 [details] [review] Bug 25443: Improve translation of 'Select the record to link%s to' Before this patch the title was set in italic, which caused the translation string to be cut off. Removing the italic formatting in favor of quotes and splitting the string into 2 sentences (dealing with title existing and not existing: Select the host record to link to '[% bibliotitle | html %]' Select the host record to link To test: - Activate EasyAnalyticalRecords system preference - Search for a record in staff - Use Edit > Link to host record - Verify the text is shown as above with the reord's title - The second case is a bit theoretical: - Delete 245$a from the record or empty out biblio.title using SQL - Verify the string still shows but without the 'to...' part. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 106518 [details] [review] Bug 25443: (follow-up) surround strings with <span> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.03
backported to 19.11.x for 19.11.09
Enhancement, not backported to 19.05.x. It's likely that the new strings won't be translated for oldoldstable at this point of the cycle for all but the few most actively translated languages. So that might actually be a translation regression even for languages that are almost fully translated. All that is just guesswork though.