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#unit=22438387 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"> %]
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.
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 ***