[Bug 36171] New: Problems with the Russian program interface
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Bug ID: 36171 Summary: Problems with the Russian program interface Change sponsored?: --- Product: Koha Version: 23.11 Hardware: HP OS: Linux Status: NEW Severity: critical Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: sergeinik@tut.by QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Created attachment 162490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162490&action=edit Russian interface After the last update of the program, the display of user pages, as well as the interface for writing off and adding literature, disappeared in the Russian administrator interface. Everything works in the English interface. -- 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=36171 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Could you provide instructions for how to reproduce the problem? -- 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=36171 --- Comment #2 from sergeinik <sergeinik@tut.by> --- You need to switch the interface language to Russian and open the card of any user. -- 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=36171 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Template process failed: file error - parse error - member-display-address-style.inc line 1: unexpected token (line_break) [% КОМПЛЕКТ line_break = "<br/>" %] at /kohadevbox/koha/C4/Templates.pm line 134 It looks like a template directive is being picked up for translation. This is the line from the English language template: [%~ SET line_break = "<br/>" ~%] A temporary fix would be to edit the affected file, member-display-address-style.inc, to replace "КОМПЛЕКТ" with "SET" It looks like the same problem is in display-library-address.inc. The real fix will require that we figure out why the translation script is picking that line up. -- 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=36171 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Owen Leonard from comment #3)
It looks like the same problem is in display-library-address.inc.
I should have pointed out that this include is in the OPAC, not the staff interface. -- 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=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|System Administration |I18N/L10N Version|23.11 |master OS|Linux |All Summary|Problems with the Russian |Incorrect translation of |program interface |Template Toolkit directive | |causes patron view error in | |ru-RU Hardware|HP |All CC| |frederic@tamil.fr, | |jonathan.druart+koha@gmail. | |com -- 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=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- 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=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- 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=36171 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 162516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162516&action=edit Bug 36171: Use FILTER collapse instead of tilde in address includes A couple of our include files used for displaying addresses have "~" added to every template directive in order to collapse whitespace in the generated HTML. This seems to cause problems for the translation script which was picking up the "SET" in "[% SET foo = 'bar' %]. This patch modifies the affected files and related files (for consistency) to use '[% FILTER collapse %]'. This seems to fix the problem. Note: This patch makes indentation changes, so ignore whitespace when viewing the diff. To test, apply the patch and search for a patron in the staff interface. - View the patron detail page. All addresses, including alternate address and alternative contact address, should be displayed correctly. - Edit the patron and confirm that the forms for entering those addresses also look correct. - Go to Administration -> System preferences and test using other options for the "AddressFormat" preference. - In the OPAC, view the "Libraries" page. Confirm that addresses are displayed correctly. - Rebuild the ru-RU templates to confirm that there is no error: > perl misc/translator/translate update ru-RU > perl misc/translator/translate install ru-RU - Enable the language, if necessary, by updating the "language" and "OPACLanguage" system preferences. - Repeat the testing steps above. -- 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=36171 --- Comment #6 from sergeinik <sergeinik@tut.by> --- The patch works. But, as soon as I update the language according to the last point, the problem returns. This happened after the last update. -- 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=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- 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=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- 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=36171 --- Comment #7 from sergeinik <sergeinik@tut.by> --- When will this error be fixed in the next update? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162516|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org -- 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=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- I'm putting this back to "NEW" because I've been unable to find a template-level fix for it. -- 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=36171 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to sergeinik from comment #7)
When will this error be fixed in the next update?
This bug was trying to find a solution so that these text no longer shows up in translations. A temporary fix is that someone with translation permissions for Russian fixes these: https://translate.koha-community.org/search/koha/-/ru/?q=+source%3ASET+&sort_by=-priority%2Cposition&checksum= -- 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=36171 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've fixed the broken translation with Jonathan's help. -- 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=36171 --- Comment #11 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Created attachment 165506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165506&action=edit Bug 36171: Incorrect translation of Template Toolkit directive causes patron view error in ru-RU It appears that the template parser parses HTML tags first and then template toolkit tags. This can cause a template toolkit tag that contains an HTML tag to have its start and end markers separated. This causes it to be treated as text that can be translated instead of a template toolkit tag. The template toolkit tags should probably be parsed first, but as a workaround the HTML tags in a template toolkit tag can be obfuscated. This patch uses concatenation as an example. To test: 1. You will need to edit the staff-prog.po for a language and modify the the translation for "SET line_break". You can change SET to FOO. 2. Install the translation for the language. 3. View the details of a patron in the staff interface with the language. 4. The page will have an error. 5. Apply the patch. 6. Install the translation for the language. 7. View the details of a patron in the staff interface with the language. 8. The page should now display correctly. If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure that the template tag is no longer included in .po 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=36171 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |kevin.carnes@ub.lu.se |ity.org | --- Comment #12 from Owen Leonard <oleonard@myacpl.org> --- I think this is supposed to be "Needs signoff" ? -- 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=36171 --- Comment #13 from Kevin Carnes <kevin.carnes@ub.lu.se> --- It is just a workaround, so I don't know if it is ready to be signed off. Is it enough or should the method for parsing be discussed? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- This feels hacky. IMO we should fix it properly (ie. not pick those strings for translation). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #15 from David Nind <david@davidnind.com> --- A couple of questions: 1. Does this only affect ru-RU, or all languages? 2. Is the status still "Critical"? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
1. Does this only affect ru-RU, or all languages?
It should affect all languages where the problematic strings have been translated. Here is what I've been able to find https://translate.koha-community.org/translate/koha/23-11/opac-bootstrap/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3ASET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-11/opac-bootstrap/te/?checksum=28bf1f208fcb60c4&q=+source%3ASET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/main/opac-bootstrap/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3ASET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/main/opac-bootstrap/te/?checksum=28bf1f208fcb60c4&q=+source%3ASET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/main/staff-prog/te/?checksum=28bf1f208fcb60c4&q=+source%3ASET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/24-05/opac-bootstrap/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/opac-bootstrap/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/opac-bootstrap/te/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/22-11/opac-bootstrap/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/22-11/staff-prog/te/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/te/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-11/staff-prog/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-11/staff-prog/te/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/24-05/staff-prog/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/main/staff-prog/fa_ARAB/?checksum=28bf1f208fcb60c4&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/22-11/staff-prog/ca/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/22-11/staff-prog/fa_ARAB/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/22-11/staff-prog/te/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/ca/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/fa_ARAB/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/te/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition
2. Is the status still "Critical"?
It seems fair until someone with rights on these languages/all languages empties the translation or copy paste the source. Maybe the 2nd one is best? That's the 1st group of strings. 28bf1f208fcb60c4 The 2nd group (47311df64b1b946c) needs only to have the variable name fixed. And then for digging at the root cause could be major severity I guess. ---- (In reply to Jonathan Druart from comment #14)
This feels hacky. IMO we should fix it properly (ie. not pick those strings for translation).
+1 to not pick or eliminate the uses of these weird conditions to insert line breaks and generate links 1) If not picking those strings, it must be kept in mind that the second group of strings with breaking translations (47311df64b1b946c) is needed to be translated: [%% SET countries = [ "Afghanistan", "Albania", Thankfully it's not needed anymore since 23.11 thanks to Bug 35091 :D So if someone manages to exclude all "SET" TT tags it could be applied to main, 24.05, 23.11 and either we do not bother with older releases (just fix the existing error in the links) or apply the current patch there. 2) If eliminating the structure are get picked up: about display-library-address.inc and member-display-address-style.inc Is that even needed? It might be dead code. There are two [% PROCESS 'display-library-address' %] And I don't see how the no_line_break variable would be set. About pref_MARCOverlayRules_link it's from bug 29589 and likely pref_CurbsidePickup_link is modeled after it. bug 29589 was already to fix a translatability issue ^^" Since then, is there know another trick known that could superseed the solution of bug 29589 ? But maybe we are not seeing any translation error on pref_MARCOverlayRules_link and pref_CurbsidePickup_link because the final are scary enough that no one thinks it's really something to translate ^^ %s %s [%% SET pref_MARCOverlayRules_link = ' %s [%% SET pref_CurbsidePickup_link = ' So maybe we can get away with these link generation cases? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #17 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Victor Grousset/tuxayo from comment #16)
2. Is the status still "Critical"?
It seems fair until someone with rights on these languages/all languages empties the translation or copy paste the source. Maybe the 2nd one is best? That's the 1st group of strings. 28bf1f208fcb60c4
The 2nd group (47311df64b1b946c) needs only to have the variable name fixed.
So I made suggestions to string found broken, they just need to be accepted by someone with rights on all languages or just rights on either Telugu, Persian and Catalan. -----
But maybe we are not seeing any translation error on pref_MARCOverlayRules_link and pref_CurbsidePickup_link because the final are scary enough that no one thinks it's really something to translate ^^
*the strings are scary enough -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I've accepted all your suggestions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #19 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Created attachment 170194 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170194&action=edit Bug 36171: Fix template toolkit tags split by HTML parser -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #20 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Created attachment 170195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170195&action=edit Template toolkit tags repaired -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #21 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Here is an attempt at repairing split template toolkit tags. If a text block begins with the end of a tag, it goes back through the tokens to try to find the beginning and combine them into a directive token. I also included a list of the "repairs". It looks like the action block for the virtual shelves results would need to use I18N.t for translation and doc-head-open would need to use Dumper.dump_html instead of filtering (the '-->' is confusing the parser). If this is not reasonable, I can limit it to SET tags. Another option is to slurp the file, remove the tags, and then use $self->parse instead of $self->parse_file. I would appreciate any feedback and testing since this was done on a Friday afternoon. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Kevin Carnes <kevin.carnes@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165506|0 |1 is obsolete| | Attachment #170194|0 |1 is obsolete| | --- Comment #22 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Created attachment 170227 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170227&action=edit Bug 36171: Fix template toolkit tags split by HTML parser Bug 36171: Fix template toolkit tags split by HTML parser It appears that the template parser parses HTML tags first and then template toolkit tags. This can cause a template toolkit tag that contains an HTML tag to have its start and end markers separated. This causes it to be treated as text that can be translated instead of a template toolkit tag. This patch searches for text sections that have a template toolkit end marker without a start and then searches for the start in previous sections. It then creates a new template toolkit section with the start and end markers. It also changes the replacement of "-->" in doc-head-open.inc so it is not interpreted as the end of the comment. It now replaces all "--" with "- -". The action buttons in the staff Lists view have also been changed to allow translation. To test: 1. You will need to edit the staff-prog.po for a language and modify the the translation for "SET line_break". You can change SET to FOO. 2. Install the translation for the language. 3. View the details of a patron in the staff interface with the language. 4. The page will have an error. 5. Apply the patch. 6. Install the translation for the language. 7. View the details of a patron in the staff interface with the language. 8. The page should now display correctly. If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure that the template tag is no longer included in .po file. You can also add translations for "Edit", "Delete", and "Transfer" in messages.po to make sure that the action buttons are translated in the Lists view. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Kevin Carnes <kevin.carnes@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170227|0 |1 is obsolete| | --- Comment #23 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Created attachment 170262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170262&action=edit Bug 36171: Fix template toolkit tags split by HTML parser It appears that the template parser parses HTML tags first and then template toolkit tags. This can cause a template toolkit tag that contains an HTML tag to have its start and end markers separated. This causes it to be treated as text that can be translated instead of a template toolkit tag. This patch searches for text sections that have a template toolkit end marker without a start and then searches for the start in previous sections. It then creates a new template toolkit section with the start and end markers. It also changes the replacement of "-->" in doc-head-open.inc so it is not interpreted as the end of the comment. It now replaces all "--" with "- -". The action buttons in the staff Lists view have also been changed to allow translation. To test: 1. You will need to edit the staff-prog.po for a language and modify the the translation for "SET line_break". You can change SET to FOO. 2. Install the translation for the language. 3. View the details of a patron in the staff interface with the language. 4. The page will have an error. 5. Apply the patch. 6. Install the translation for the language. 7. View the details of a patron in the staff interface with the language. 8. The page should now display correctly. If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure that the template tag is no longer included in .po file. You can also add translations for "Edit", "Delete", and "Transfer" in messages.po to make sure that the action buttons are translated in the Lists view. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #24 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Katrin Fischer from comment #18)
I've accepted all your suggestions.
Thanks a lot :) Maybe it's the issues with the translation platform that happened just after that, but these are still pending: https://translate.koha-community.org/translate/koha/22-11/staff-prog/ca/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/22-11/staff-prog/fa_ARAB/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/22-11/staff-prog/te/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/ca/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/fa_ARAB/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition https://translate.koha-community.org/translate/koha/23-05/staff-prog/te/?checksum=47311df64b1b946c&q=+source%3A%25+SET+&sort_by=-priority%2Cposition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks for the links, I had only been looking for the line_break one. Should be good now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #26 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Kevin Carnes from comment #23)
It also changes the replacement of "-->" in doc-head-open.inc so it is not interpreted as the end of the comment. It now replaces all "--" with "- -".
Why all? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Kevin Carnes <kevin.carnes@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170262|0 |1 is obsolete| | --- Comment #27 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Created attachment 170342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170342&action=edit Bug 36171: Fix template toolkit tags split by HTML parser It appears that the template parser parses HTML tags first and then template toolkit tags. This can cause a template toolkit tag that contains an HTML tag to have its start and end markers separated. This causes it to be treated as text that can be translated instead of a template toolkit tag. This patch searches for text sections that have a template toolkit end marker without a start and then searches for the start in previous sections. It then creates a new template toolkit section with the start and end markers. The action buttons in the staff Lists view have been changed to allow translation. To test: 1. You will need to edit the staff-prog.po for a language and modify the the translation for "SET line_break". You can change SET to FOO. 2. Install the translation for the language. 3. View the details of a patron in the staff interface with the language. 4. The page will have an error. 5. Apply the patch. 6. Install the translation for the language. 7. View the details of a patron in the staff interface with the language. 8. The page should now display correctly. If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure that the template tag is no longer included in .po file. You can also add translations for "Edit", "Delete", and "Transfer" in messages.po to make sure that the action buttons are translated in the Lists view. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #28 from Kevin Carnes <kevin.carnes@ub.lu.se> --- (In reply to Jonathan Druart from comment #26)
(In reply to Kevin Carnes from comment #23)
It also changes the replacement of "-->" in doc-head-open.inc so it is not interpreted as the end of the comment. It now replaces all "--" with "- -".
Why all?
Just in case there was a browser that was strict about an even number of "--" and also to avoid writing '-' _ '->'. I removed the change since it looks like everything between a comment and an HTML tag is ignored anyways, so the change is not necessary. In this case it doesn't cause a problem, but there is a problem if a template toolkit tag is outside a comment and contains a "<!". There is also a problem if it is inside a comment and contains a "-->" followed by an HTML tag and then some text before the real end of the comment. Finally, any text between an HTML tag and a comment is ignored (e.g. <a>before<!-- comment -->after</a>). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com | |, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #29 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Whats the current state of this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |major --- Comment #30 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Since the broken translations have been fixed on weblate, it's not critical anymore. Now back to fixing the root issue to avoid the possibility to make broken translations. Early QA feedback seems to have been addressed, so it looks ready for testing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170342|0 |1 is obsolete| | --- Comment #31 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 172327 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172327&action=edit Bug 36171: Fix template toolkit tags split by HTML parser It appears that the template parser parses HTML tags first and then template toolkit tags. This can cause a template toolkit tag that contains an HTML tag to have its start and end markers separated. This causes it to be treated as text that can be translated instead of a template toolkit tag. This patch searches for text sections that have a template toolkit end marker without a start and then searches for the start in previous sections. It then creates a new template toolkit section with the start and end markers. The action buttons in the staff Lists view have been changed to allow translation. To test: 1. You will need to edit the staff-prog.po for a language and modify the the translation for "SET line_break". You can change SET to FOO. 2. Install the translation for the language. 3. View the details of a patron in the staff interface with the language. 4. The page will have an error. 5. Apply the patch. 6. Install the translation for the language. 7. View the details of a patron in the staff interface with the language. 8. The page should now display correctly. If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure that the template tag is no longer included in .po file. You can also add translations for "Edit", "Delete", and "Transfer" in messages.po to make sure that the action buttons are translated in the Lists view. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170342|1 |0 is obsolete| | --- Comment #32 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Comment on attachment 170342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170342 Bug 36171: Fix template toolkit tags split by HTML parser Errata: I attached the version that I applied to 23.05 which was the branch with more problematic cases than main. (version for main coming) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172327|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170342|0 |1 is obsolete| | --- Comment #33 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 172334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172334&action=edit Bug 36171: Fix template toolkit tags split by HTML parser It appears that the template parser parses HTML tags first and then template toolkit tags. This can cause a template toolkit tag that contains an HTML tag to have its start and end markers separated. This causes it to be treated as text that can be translated instead of a template toolkit tag. This patch searches for text sections that have a template toolkit end marker without a start and then searches for the start in previous sections. It then creates a new template toolkit section with the start and end markers. The action buttons in the staff Lists view have been changed to allow translation. To test: 1. You will need to edit the staff-prog.po for a language and modify the the translation for "SET line_break". You can change SET to FOO. 2. Install the translation for the language. 3. View the details of a patron in the staff interface with the language. 4. The page will have an error. 5. Apply the patch. 6. Install the translation for the language. 7. View the details of a patron in the staff interface with the language. 8. The page should now display correctly. If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure that the template tag is no longer included in .po file. You can also add translations for "Edit", "Delete", and "Transfer" in messages.po to make sure that the action buttons are translated in the Lists view. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #34 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Tested on 23.05 to get the two observed cases of extracted strings that can break the UI (I also applied the test plan there): #~ msgid "%s %s %s [%%~ SET line_break = \"" It's successfully not picked anymore. That solves 70% of the found cases of translations breaking pages. It's still picking up this: #: koha-tmpl/intranet-tmpl/prog/en/includes/country-list.inc:1 #, c-format msgid "[%% SET countries = [ \"Afghanistan\", \"Albania\", \"Algeria\", [...] Which allows translation of country name in Koha <= 23.05 (before bug 35091) But it's picked in it's entirety. So with "countries" which was the cause of breakage when it's translated.(30% of the observed breakages) If it would somehow be done differently, then the string would change to not have "countries". But then the whole list would have to be retranslated for old releases which might not have much translation attention. Which is the same downside with a less good result than backporting bug 35091. So not much do to for these cases. Not and issue for this ticket. --- More testing: Looking at the extracted string changes, there are more strings that are not extracted anymore. -msgid "%s %s %s %s %s %s %s %s %s %s %s%s %s %s %s %s [%% # [ WRAPPER tab_item tabname= \"tab_name_1\" bt_active= 1 ] " -msgid "[ END ] %%] %s %s %s %s %s %s %s %s %s %s " -msgid "%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s%s%s %s %s %s %s %s [%%- span_start = '" -msgid "[%% HOLIDAYS_LOO.DESCRIPTION.replace('\\\\\\r\\\\\\n', '" [... other stuff] Nice, good riddance :) --- [% # [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] <span>Tab text 1</span> [ END ] %] [% # [ WRAPPER tab_item tabname= "tab_name_2" ] <span>Tab text 2</span> [ END ] %] [% # <a href="/cgi-bin/koha/module/module-home.pl"> Module </a> %] [% # <a href="/cgi-bin/koha/module/page.pl"> Module page </a> %] [% # <span>Module page</span> %] [% # <span>Add form</span> %] Very good! This stuff that was in comments isn't picked up anymore! :D --- -msgid "%s [%% SET pref_CurbsidePickup_link = '" -msgid "%s %s [%% SET pref_MARCOverlayRules_link = '" Nice, it takes care of these cases that were identified as maybe being a pain! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #35 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Incorrect translation of |Extraction of Template |Template Toolkit directive |Toolkit directive as |causes patron view error in |translatable string causes |ru-RU |patron view error in | |several languages -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #36 from Victor Grousset/tuxayo <victor@tuxayo.net> --- QA note: really don't miss Comment 34 to avoid duplicating some tedious testing and po diff inspection and findings on issues that are buried much earlier in comments. And time of running `misc/translator/translate update` doesn't change in a meaningful way (it's within variance) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172334|0 |1 is obsolete| | --- Comment #37 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 173252 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173252&action=edit Bug 36171: Fix template toolkit tags split by HTML parser It appears that the template parser parses HTML tags first and then template toolkit tags. This can cause a template toolkit tag that contains an HTML tag to have its start and end markers separated. This causes it to be treated as text that can be translated instead of a template toolkit tag. This patch searches for text sections that have a template toolkit end marker without a start and then searches for the start in previous sections. It then creates a new template toolkit section with the start and end markers. The action buttons in the staff Lists view have been changed to allow translation. To test: 1. You will need to edit the staff-prog.po for a language and modify the the translation for "SET line_break". You can change SET to FOO. 2. Install the translation for the language. 3. View the details of a patron in the staff interface with the language. 4. The page will have an error. 5. Apply the patch. 6. Install the translation for the language. 7. View the details of a patron in the staff interface with the language. 8. The page should now display correctly. If you want to, you can run "gulp po:update --lang LANGUAGE-CODE" to make sure that the template tag is no longer included in .po file. You can also add translations for "Edit", "Delete", and "Transfer" in messages.po to make sure that the action buttons are translated in the Lists view. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Amended-by: Jonathan Druart Tidy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #38 from Jonathan Druart <jonathan.druart@gmail.com> --- Nice one, Kevin! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Could we have a unit test here to highlight the change please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #40 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Katrin Fischer from comment #39)
Could we have a unit test here to highlight the change please?
I haven't requested it because nothing of our translation script is tested. I don't think it's fair to request one here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 sergeinik <sergeinik@tut.by> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Passed QA |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |REOPENED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #41 from Jonathan Druart <jonathan.druart@gmail.com> --- This is not done yet, please don't adjust the status. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #42 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #41)
This is not done yet, please don't adjust the status.
I was going to push it, but I thought I'd still ask :) I have it on my branch and it will go in with the next batch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 --- Comment #43 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|24.11.00 |24.11.00,24.05.06 released in| | --- Comment #44 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the extraction release notes| |of strings that were | |causing translation errors. | |Template Tookit tags that | |contained HTML tags were | |split and treated as text | |that could be translated, | |instead of a Template | |Toolkit tag. --- Comment #45 from David Nind <david@davidnind.com> --- While this was in 24.11, I've added a release note as it will be back ported to 24.05.x, which will have release notes generated. I hope I've got the description right, please update if I haven't. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.11.00,24.05.06 |24.11.00,24.05.06,23.11.11 released in| | Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #46 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36171 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |jesse@bywatersolutions.com Status|Pushed to oldoldstable |RESOLVED --- Comment #47 from Jesse Maseto <jesse@bywatersolutions.com> --- Not pushed to LTS. Marked Resolved. If you feel this should be in LTS please reply with your reason. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org