Bug 25443 - Improve translation of "Select the host record to link%s to"
Summary: Improve translation of "Select the host record to link%s to"
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-10 11:34 UTC by Katrin Fischer
Modified: 2020-08-03 20:21 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03, 19.11.09


Attachments
Bug 25443: Improve translation of 'Select the record to link%s to' (2.01 KB, patch)
2020-05-24 00:08 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 25443: Improve translation of 'Select the record to link%s to' (2.07 KB, patch)
2020-05-24 11:58 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 25443: (follow-up) sorround strings with <span> (1.25 KB, patch)
2020-05-24 11:59 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 25443: Improve translation of 'Select the record to link%s to' (2.12 KB, patch)
2020-07-03 14:11 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 25443: (follow-up) surround strings with <span> (1.31 KB, patch)
2020-07-03 14:11 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-05-10 11:34:36 UTC
<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.
Comment 1 Bernardo Gonzalez Kriegel 2020-05-19 16:55:04 UTC
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?
Comment 2 Katrin Fischer 2020-05-23 23:58:56 UTC
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.
Comment 3 Katrin Fischer 2020-05-24 00:08:50 UTC
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.
Comment 4 Bernardo Gonzalez Kriegel 2020-05-24 01:22:07 UTC
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'"
Comment 5 Bernardo Gonzalez Kriegel 2020-05-24 11:58:20 UTC
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>
Comment 6 Bernardo Gonzalez Kriegel 2020-05-24 11:59:02 UTC
Created attachment 105316 [details] [review]
Bug 25443: (follow-up) sorround strings with <span>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment 7 Bernardo Gonzalez Kriegel 2020-05-24 12:01:37 UTC
Patch works, added follow-up to put strings inside "span".
Comment 8 Katrin Fischer 2020-05-25 20:39:44 UTC
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.
Comment 9 Julian Maurice 2020-07-03 14:11:35 UTC
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>
Comment 10 Julian Maurice 2020-07-03 14:11:39 UTC
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>
Comment 11 Jonathan Druart 2020-07-09 10:05:47 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 12 Lucas Gass 2020-07-24 20:27:28 UTC
backported to 20.05.x for 20.05.03
Comment 13 Aleisha Amohia 2020-08-03 20:21:46 UTC
backported to 19.11.x for 19.11.09