Summary: | Template toolkit comments are caught in the translatable strings | ||
---|---|---|---|
Product: | Koha | Reporter: | Victor Grousset/tuxayo <victor> |
Component: | I18N/L10N | Assignee: | Bugs List <koha-bugs> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | bgkriegel, f.demians, fridolin.somers |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Description
Victor Grousset/tuxayo
2022-05-10 20:56:46 UTC
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. |