Bug 14459 - Marking parts of text bold is bad for translation
Summary: Marking parts of text bold is bad for translation
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-25 09:13 UTC by Katrin Fischer
Modified: 2023-08-05 12:55 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2015-06-25 09:13:38 UTC
I came across this as a library reported a very strange translation:

 / koha-tmpl / intranet-tmpl / prog / en / modules / reserve / request.tt

 318         [% IF ( alreadypossession ) %]
319           <li> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a> <strong>is already in possession</strong> of one item</li>
320         [% END %]

The problem here is that this ends up as 2 separate strings that make it really hard to build a correct sentence:
 of one item
 is already in possession

I think for now I'd like to suggest to only use bold formatting on full sentences or single words, but not within a string.
Comment 1 Marc Véron 2015-11-23 06:26:16 UTC
(In reply to Katrin Fischer from comment #0)
(...)
> I think for now I'd like to suggest to only use bold formatting on full
> sentences or single words, but not within a string.

We have such rule in the Coding Guidelines, but for JS only:

http://wiki.koha-community.org/wiki/Coding_Guidelines#JS3:_Avoid_strings_which_mix_text_and_markup

JS3: Avoid strings which mix text and markup
Text mustn't contain HTML tags. 

I agree that the guidelines should be adapted to cover examples as above as well.
See:
http://irc.koha-community.org/koha/2015-11-22#i_1759100

20:16 there is a bug for not having bold /italic etc lke that
20:16 i tend to ask to make it a coding guideline
20:17 'avoid formatting single words bold in sentences or link single words out of a sentence'
Comment 2 Owen Leonard 2015-12-02 12:54:07 UTC
At this time I think it's right to set up a guideline to avoid translation problems, but I think it's pretty clear that our translation system is broken if we can't use HTML within sentences.
Comment 3 Katrin Fischer 2023-08-05 12:55:07 UTC
I believe we have some ways to work around this now using the more modern translation tools. I am closing this as FIXED.