Bug 38058 - Backticks in vue files break translation script
Summary: Backticks in vue files break translation script
Status: REOPENED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 37805 (view as bug list)
Depends on: 34788
Blocks:
  Show dependency treegraph
 
Reported: 2024-10-02 07:15 UTC by Jonathan Druart
Modified: 2024-11-18 10:59 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***