[Bug 43972] New: Add translation context for "Archived"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43972 Bug ID: 43972 Summary: Add translation context for "Archived" Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.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: --- Depending on what is archived, the word can be translated differently, at least in French. "Archived" when referring to a credit type (masc.) becomes "Archivé" "Archived" when referring to a suggestion (fem.) becomes "Archivée" I propose to add translation context so that we know what is archived and are able to translate it correctly. I grepped the .po files and Archived only appears alone in a couple of places #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/credit_types.tt:191 #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt:276 #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt:201 #: koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt:1271 #, c-format msgid "Archived" msgstr "Archivé" Elsewhere, it's in a sentence so the context is explicit. -- 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=43972 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |caroline.cyr-la-rose@inlibr |ity.org |o.com -- 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=43972 --- Comment #1 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- Created attachment 210174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210174&action=edit Bug 43972: Add translation context for "Archived" This patch adds translation context for the word "Archived" when used alone so that it can be translated correctly depending on the context where it is used. Test plan TBA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43972 --- Comment #2 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- I tried something. However I came across some hurdles - The code in the suggestions.tt file was in a JS block and the usual _p('context', 'term') didn't work. ChatGPT suggested I change the string to a tt string to use tp('context', 'term'). I don't know if that is the right way to do it - The Archived term in debit types and credit types is a hidden table column header that never shows up in the interface. I wonder if it really needs to be contextualized or even translated at all. Do I need to declare my usage of AI if I only asked questions to the chat? I didn't find how to add the line. I'm attaching the patch so that y'all can see what I did, but I still need to write a test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43972 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Caroline Cyr La Rose from comment #2)
I tried something. However I came across some hurdles
- The code in the suggestions.tt file was in a JS block and the usual _p('context', 'term') didn't work. ChatGPT suggested I change the string to a tt string to use tp('context', 'term'). I don't know if that is the right way to do it
JS functions are only available in .js files. From .tt and for JS code you can only use `__()`. If you need the other forms you need to use the TT functions. Note that you should not combine `escape_str()` and `| html`. There are also extra parenthesis around the string. node += '<br /><i class="fa fa-archive"></i> %s'.format("[% tp('Archived suggestion', 'Archived') | html %]");
- The Archived term in debit types and credit types is a hidden table column header that never shows up in the interface. I wonder if it really needs to be contextualized or even translated at all.
If it is never displayed I agree that adding context there adds nothing.
Do I need to declare my usage of AI if I only asked questions to the chat? I didn't find how to add the line.
You can simply add a disclaimer in the commit message. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org