This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 18.11.x has been updated
       via  925ddeb915a0e7a80922009c0216fb3e46024d80 (commit)
      from  e751b86520ef07a6613dfeec8e3b672cc60bab16 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 925ddeb915a0e7a80922009c0216fb3e46024d80
Author: Bernardo Gonzalez Kriegel <>
Date:   Sun May 5 15:12:15 2019 -0300

    Bug 10492: Translation problems with TT directives in po files
    This patch implements the replacement of TTvariables
    '[%...%]' with normal placeholders '%s' for text
    inside HTML tags (eg. img, meta, input)
    The replacement is done in two files:
    *, used on create/update, so TTvars are not
    found on the text to translate (msgid)
    *, used on install time, so the correct
    translation is found (msgstr) and the right TTvar is put on
    the translated text.
    To test:
    Before applying the patch
    1) Update your favorite language
       cd misc/traslator
       perl translate update xx-YY
    2) Build a list (ini.txt) of 'msgid' to do a comparison
       msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > 
    3) Apply the patch
    4) Update your favorite language, again
       cd misc/traslator
       perl translate update xx-YY
    5) Build a final list (end.txt) of 'msgid' to do a comparison
       msgcat --no-wrap --use-first po/xx-YY-*po -o - | egrep "^msgid" | sort > 
    6) Compare both files, you must find (most) TTvars replaced by '%s'
       diff ini.txt end.txt
       for example:
       < msgid "Translate item type [% itemtype.itemtype | html %]"
       > msgid "Translate item type %s"
       < msgid "Holds on this item: [% item_loo.item_holds | html %] / Total 
holds on this record: [% item_loo.holds | html -%]"
       > msgid "Holds on this item: %s / Total holds on this record: %s"
       < msgid "tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html 
%][% innerloo.random | html %]"
       > msgid "tag_anchor_%s_%s%s"
       < msgid "[% innerloo.tag_lib | html %] - Click to Expand this Tag"
       > msgid "%s - Click to Expand this Tag"
    7) Translate one of the examples, with more than one variable if
    possible, for example this text in xx-YY-staff-prog.po
       > msgid "Holds on this item: %s / Total holds on this record: %s"
    Check it's not marked as 'fuzzy'
    8) Apply the translation
       perl translate install xx-YY
    9) Check the translated string has all variables in the right order
       edit koha-tmpl/intranet-tmpl/prog/es-ES/modules/tools/
       around line '187', first '[% item_loo.item_holds | html %]', then
       '[% item_loo.holds | html -%]' on this case,
       or use another example
    If approved this patch can be backported to current stable
    Signed-off-by: Owen Leonard <>
    Signed-off-by: Nick Clemens <>
    Signed-off-by: Martin Renvoize <>
    (cherry picked from commit 0f5d14f70792d5406857a81c415bc3f58cbd8b96)
    Signed-off-by: Fridolin Somers <>
    (cherry picked from commit 000fffbbf044061c1934eefd2d24c516d3d4fe2b)
    Signed-off-by: Lucas Gass <>


Summary of changes:
 misc/translator/ |   28 ++++++++++++++++++++++------
 misc/translator/      |    5 +++++
 2 files changed, 27 insertions(+), 6 deletions(-)

main Koha release repository
koha-commits mailing list

Reply via email to