Bug 14459

Summary: Marking parts of text bold is bad for translation
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Bugs List <koha-bugs>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: f.demians, veron
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15231
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15232
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15233
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15236
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15237
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15238
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15243
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15274
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14497
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15275
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15288
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15355
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15361
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15362
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15363
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15365
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15374
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6988
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

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.