Some templates use the following or similar code: [% LibraryNameTitle or "Koha online" %] The translation toolchain fails to pick up the hard-coded string for translation: # grep -E '^#. %[0-9]+\$s: +.* or \"[^"]+".*$' po/de-DE-*.po po/de-DE-i-opac-t-prog-v-3006000.po:#. %4$s: LibraryNameTitle or "Koha online" po/de-DE-i-opac-t-prog-v-3006000.po:#. %3$s: LibraryNameTitle or "Koha online" po/de-DE-i-opac-t-prog-v-3006000.po:#. %3$s: LibraryNameTitle or "Koha online" po/de-DE-i-opac-t-prog-v-3006000.po:#. %2$s: LibraryNameTitle or "Koha online" po/de-DE-i-opac-t-prog-v-3006000.po:#. %2$s: LibraryNameTitle or "Koha online" po/de-DE-i-staff-t-prog-v-3006000.po:#. %1$s: frameworkcode or "Default" po/de-DE-i-staff-t-prog-v-3006000.po:#. %1$s: update.old_branch or "?" po/de-DE-i-staff-t-prog-v-3006000.po:#. %2$s: update.LoginBranchcode or "?" po/de-DE-opac-bootstrap.po:#. %4$s: LibraryNameTitle or "Koha online" po/de-DE-opac-bootstrap.po:#. %3$s: LibraryNameTitle or "Koha online" po/de-DE-opac-bootstrap.po:#. %3$s: LibraryNameTitle or "Koha online" po/de-DE-opac-bootstrap.po:#. %3$s: LibraryNameTitle or "Koha online" po/de-DE-opac-bootstrap.po:#. %2$s: LibraryNameTitle or "Koha online"
Created attachment 26801 [details] [review] Bug 11497 - i18n toolchain fails to pick up TT code in the format 'SomeVariable or "Some Text"' for translation i18n toolchain fails to pick text defined inside [% ... %] This patch fixes all the cases I could find To test: 1. Update your preferred language (cd misc/translator; perl translate update fi-FI) 2. Count headers for example egrep "^msgid.*Koha online" misc/translator/po/fi-FI-* | wc -l 3. Apply the patch 4. Repeat 1 and 2, now there are more lines Or translate to som lang and visit every touched page and look the title
Created attachment 27549 [details] [review] Bug 11497 - i18n toolchain fails to pick up TT code in the format 'SomeVariable or "Some Text"' for translation i18n toolchain fails to pick text defined inside [% ... %] This patch fixes all the cases I could find To test: 1. Update your preferred language (cd misc/translator; perl translate update fi-FI) 2. Count headers for example egrep "^msgid.*Koha online" misc/translator/po/fi-FI-* | wc -l 3. Apply the patch 4. Repeat 1 and 2, now there are more lines Or translate to some lang and visit every touched page and look the title Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 27663 [details] [review] [PASSED QA] Bug 11497 - i18n toolchain fails to pick up TT code in the format 'SomeVariable or "Some Text"' for translation i18n toolchain fails to pick text defined inside [% ... %] This patch fixes all the cases I could find To test: 1. Update your preferred language (cd misc/translator; perl translate update fi-FI) 2. Count headers for example egrep "^msgid.*Koha online" misc/translator/po/fi-FI-* | wc -l 3. Apply the patch 4. Repeat 1 and 2, now there are more lines Or translate to some lang and visit every touched page and look the title Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described. Template changes only.
Maybe we should add this to the coding guidelines?
Pushed to master. Thanks, Bernardo!
(In reply to Katrin Fischer from comment #4) > Maybe we should add this to the coding guidelines? Although I pushed the patch, the construct that it replaces seems useful on the face of it, and it's certainly less verbose. I'd rather see the translation code be taught how to deal with it.