Bug 38058

Summary: Backticks in vue files break translation script
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: I18N/L10NAssignee: Bugs List <koha-bugs>
Status: REOPENED --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, jonathan.druart, katrin.fischer, matt.blenkinsop
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36836
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 34788    
Bug Blocks:    

Description Jonathan Druart 2024-10-02 07:15:25 UTC
(In reply to Matt Blenkinsop from comment #61)
> Created attachment 166571 [details] [review] [review]
> Bug 34788: (follow-up): Fix translations

Please stop using backtick, it does not work correctly with translations.

See: fr-FR-messages-js.po

+#: koha-tmpl/intranet-tmpl/prog/js/vue/dist/erm.js:20920
+#, javascript-format
+msgid ""
+"Your file was too large to process in one job, the file has been split into %s jobs to meet the maximum size limits.\"\n"
+"                            ).format(success.job_ids.length)}</p>`\n"
+"                        }\n"
+"                        success.job_ids.forEach((job, i) => {\n"
+"                            message += `<li>${this.$__(\n"
+"                                \"Job %s for uploaded file has been queued\"\n"
+"                            ).format(\n"
+"                                i + 1\n"
[...]
Comment 1 Jonathan Druart 2024-10-02 07:21:56 UTC
Hum, the dist/erm.js file should actually not appear in koha-l10n, so maybe this is not a problem.

There is another occurrence of the string, that is correctly picked:

3083 #: koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesKBARTImport.vue:145
3084 #, javascript-format
3085 msgid "Your file was too large to process in one job, the file has been split into %s jobs to meet the maximum size limits."
3086 msgstr "Votre fichier étant trop important pour un traitement en une fois, il a été partagé en %s parties pour respecter la taille maximum."


Closing for now.
Comment 2 Jonathan Druart 2024-10-02 07:23:48 UTC
We might want to exclude the dists/* files from the translation tool actually, to avoid confusions for devs.
Comment 3 Jonathan Druart 2024-11-18 10:58:00 UTC
Maybe still valid, see bug 36836 comment 7
Comment 4 Jonathan Druart 2024-11-18 10:59:19 UTC
*** Bug 37805 has been marked as a duplicate of this bug. ***