[Bug 44115] New: Incorrect uses of _() and __()
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 Bug ID: 44115 Summary: Incorrect uses of _() and __() Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: I18N/L10N Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: caroline.cyr-la-rose@inlibro.com, f.demians@tamil.fr, jonathan.druart@gmail.com, julian.maurice@biblibre.com Target Milestone: --- _() are for template files __() are for JS files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40761 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40761 [Bug 40761] OpacTrustedCheckout: All errors are untranslated -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 211629 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211629&action=edit Bug 44115: Add test to catch _() in JS files Strings in .js/.ts/.vue files must use __() to be translatable _() is only for the template files. Test plan: prove xt/i18n/find-single-underscore-in-js.t should return green (with 40761 applied) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 211630 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211630&action=edit Bug 44115: Use _() in template files Only _() can be used in template files Test plan: Update the PO files: `cd misc/translator && perl translate update fr-FR` => Notice the new strings in fr-FR-staff-prog.po: - "Warning: Item %s is checked out" - "Failure: Item %s cannot be checked in" - "Warning: Item %s is on hold" - "%s day late" and "%s days late" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 211631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211631&action=edit Bug 44115: Add test to catch __() in template files Test plan: prove xt/i18n/find-double-underscore-in-tt.t => Without the previous patch if fails => With the previous patch applied it passes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 211632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211632&action=edit Bug 44115: Move xt/single_quotes.t to xt/i18n We now have xt/i18n, xt/single_quotes.t belongs to it -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=44115 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211629|0 |1 is obsolete| | Attachment #211630|0 |1 is obsolete| | Attachment #211631|0 |1 is obsolete| | Attachment #211632|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=44115 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 211642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211642&action=edit Bug 44115: Add test to catch _() in JS files Strings in .js/.ts/.vue files must use __() to be translatable _() is only for the template files. Test plan: prove xt/i18n/find-single-underscore-in-js.t should return green (with 40761 applied) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 211643 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211643&action=edit Bug 44115: Use _() in template files Only _() can be used in template files Test plan: Update the PO files: `cd misc/translator && perl translate update fr-FR` => Notice the new strings in fr-FR-staff-prog.po: - "Warning: Item %s is checked out" - "Failure: Item %s cannot be checked in" - "Warning: Item %s is on hold" - "%s day late" and "%s days late" Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 211644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211644&action=edit Bug 44115: Add test to catch __() in template files Test plan: prove xt/i18n/find-double-underscore-in-tt.t => Without the previous patch if fails => With the previous patch applied it passes Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 211645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211645&action=edit Bug 44115: Move xt/single_quotes.t to xt/i18n We now have xt/i18n, xt/single_quotes.t belongs to it Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This fail can be ignored, the test file was renamed in the patch set and the renamed/moved test passes: * Proving /kohadevbox/koha/xt/single_quotes.t FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Katrin Fischer from comment #9)
This fail can be ignored, the test file was renamed in the patch set and the renamed/moved test passes: * Proving /kohadevbox/koha/xt/single_quotes.t FAIL
See https://gitlab.com/koha-community/qa-test-tools/-/merge_requests/111 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44115 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org