[Bug 30729] New: Template toolkit comments are caught in the translatable strings
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30729 Bug ID: 30729 Summary: Template toolkit comments are caught in the translatable strings Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: victor@tuxayo.net QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr I was checking the untranslated strings for 22.05 and noticed template toolkit comments are caught in the translatable strings. For example this string: %%] [%%# - category:␠ https://translate.koha-community.org/fr/22.05/translate/fr-FR-staff-prog.po#... It comes from koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc [%# Display a complex patron search form %] [%# - Search: <input> %] [%# You can then pass a list of filters %] [%# - branch: <select library list> %] [%# - category: <select patron category list> %] [%# - search_field: <select patron field list> %] [%# - search_type: <select "contain" or "start with"> %] -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30729 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #1 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Many strings are analyzed and extracted using misc/translator/xgettext.pl. It has a way to detect strings that wants to keep and which to discard. Normally a line with pure TT ( ^[%.*%]$/ ) is discarded, but it reacts quickly to anything resembling an HTML tag. In this case the TT comment [%# Display a complex patron search form %] [%# - Search: <input> %] [%# You can then pass a list of filters %] [%# - branch: <select library list> %] [%# - category: <select patron category list> %] [%# - search_field: <select patron field list> %] [%# - search_type: <select "contain" or "start with"> %] is using things inside <.*>, and poor xgettext.pl is confused. Changing the comment to [%# Display a complex patron search form %] [%# - Search: "input" %] [%# You can then pass a list of filters %] [%# - branch: "select library list" %] [%# - category: "select patron category list" %] [%# - search_field: "select patron field list" %] [%# - search_type: "select 'contain' or 'start with'"> %] eliminates the confusion and preserves, I think, the spirit of the comment, and fixes the problem. To test: cd misc/translator mkdir test cp ../../koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc test/. echo test/patron-search.inc > test.list ./xgettext.pl -f test.list -s -o test.po The file test.po contains those strange strings, from the comment. Edit test/patron-search.inc changing the comment as suggested, repeat the last run and check that the strange strings are gone. It's either that or teach new skills to xgettext.pl I haven't been able to find any other cases that didn't come from that file. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30729 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30729 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We have started to fix those by making sure we don't use multi-line comments. This way they don't end up in po files. *** This bug has been marked as a duplicate of bug 33332 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org