Summary: | formatted strings get split in substrings for translation | ||
---|---|---|---|
Product: | Koha | Reporter: | Gaetan Boisson <gaetan.boisson> |
Component: | I18N/L10N | Assignee: | Frédéric Demians <f.demians> |
Status: | NEW --- | QA Contact: | Bugs List <koha-bugs> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | pasi.kallinen, vargavind+koha |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14459 | ||
Change sponsored?: | Seeking developer | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Gaetan Boisson
2011-10-07 13:38:20 UTC
100% correct. There is no simple solution. To solve this kind of issues we should have to redesign entirely the way strings to be translated are extracted from templates (and other places). At a low level of ambition, we should enforce developers not to split sentences into chunks of expressions, avoid adding plural letter ('s') based on variable value. If there absolutely has to be HTML formatting in the middle of a sentence (eg. a link), one solution is to put the HTML elements in TT directives, so they don't split the sentence into separate msgid strings. For example: <p>Click [% '<a href="http://example.com">' %]here[% '</a>' %] to do whatever.</p> Which should show up in the po-files as msgid "Click %shere%s to do whatever." (I didn't test the example, so it may not work. Putting the elements in TT variables, and using the variable, definitely does work) |