Bug 39061

Summary: Allow translation context in vue files
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: I18N/L10NAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: f.demians, jonathan.druart, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on:    
Bug Blocks: 38828, 39045    
Attachments: Bug 39061: Allow translation context in vue files
Bug 39061: Export all functions from i18n.js
Bug 39061: Allow translation context in vue files
Bug 39061: Export all functions from i18n.js

Description Caroline Cyr La Rose 2025-02-06 21:09:46 UTC
It is not currently possible to add translation context clues in vue files.
Comment 1 Caroline Cyr La Rose 2025-02-06 21:14:22 UTC
Created attachment 177600 [details] [review]
Bug 39061: Allow translation context in vue files

This patch adds the possibility to add translation context clues in vue
files.

Syntax is

$__p("context","term")

To test, see bug 39045.
Comment 2 Jonathan Druart 2025-02-10 13:17:10 UTC
I think we should provide all the functions defined in i18n.js here.
Comment 3 Jonathan Druart 2025-02-10 13:31:37 UTC
Created attachment 177693 [details] [review]
Bug 39061: Export all functions from i18n.js
Comment 4 Martin Renvoize (ashimema) 2025-04-02 07:24:13 UTC Comment hidden (obsolete)
Comment 5 Martin Renvoize (ashimema) 2025-04-02 07:24:19 UTC Comment hidden (obsolete)
Comment 6 Martin Renvoize (ashimema) 2025-04-02 07:26:10 UTC
Important, but clear and trivial, improvement.

Going straight for a QA here.. I'd love to see some basic unit tests, but we're well covered on the imported functions and this is just bringing them into the Vue space so I think we're OK without.

Passing QA
Comment 7 Katrin Fischer 2025-04-23 07:42:52 UTC
Pushed for 25.05!

Well done everyone, thank you!