Bug 35476 - Submit button for adding new processings is not translatable
Summary: Submit button for adding new processings is not translatable
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 30708
Blocks:
  Show dependency treegraph
 
Reported: 2023-12-04 12:19 UTC by Katrin Fischer
Modified: 2024-01-04 20:10 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes some submit buttons in the ERM and Preservation modules so that are now translatable.
Version(s) released in:
24.05.00,23.11.02


Attachments
Bug 35476: Make 'Submit' buttons translatable in vue components (7.32 KB, patch)
2023-12-04 14:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35476: Make 'Submit' buttons translatable in vue components (7.35 KB, patch)
2023-12-07 18:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 35476: Make 'Submit' buttons translatable in vue components (7.42 KB, patch)
2023-12-15 20:59 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 35476: Make 'Submit' translatable in TrainsFormAddItem.vue (1.15 KB, patch)
2023-12-15 20:59 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2023-12-04 12:19:57 UTC

    
Comment 1 Jonathan Druart 2023-12-04 14:23:09 UTC
Created attachment 159527 [details] [review]
Bug 35476: Make 'Submit' buttons translatable in vue components
Comment 2 David Nind 2023-12-06 23:41:05 UTC
I had a go at testing, but didn't quite get there.

How do you update the po files when Vue stuff is involved? I'm sure I'm not quite getting it all yet!

I tried (after installing the patch):
1. yarn build (for rebuilding Vue stuff)
2. gulp po:update --lang es-ES (as an example) 
3. language was already installed (es-ES as an example)

The es-ES-messages-js.po (as an example) doesn't seem to have been updated - I think this is the one that should have been udpated?

Test plan so far:

1. Install another language
2. Enable the language for the staff interface (Administration > System preferences > I18N/L10N > language)
3. Enable the ERM module (ERMModule)
4. Change the language to the one you installed
5. Go to E-resource management > eHoldings > Local > Packages > +New package
6. Note that the submit button is not translated
  (Compare to one of the other submit buttons that is translated (E-resource management > Agreements > +New agreement)
7. Search misc/translation/po/<lang>-messages-js.po for 'Submit'
   - Note that there is only one line entry for 'Submit'
     #: koha-tmpl/intranet-tmpl/prog/js/vue/components/ButtonSubmit.vue:11
8. Apply the patch
9. Update the Vie stuff: yarn build 
10. gulp po:update --lang <lang>
11. Update the language: koha-translate --update es-ES --dev kohadev (necessary?)
Comment 3 Jonathan Druart 2023-12-07 11:38:39 UTC
Hi David,
I cannot test right now, but you need:
8. Apply the patch
9. yarn build (or simply yarn js:build)
10. restart_all (JS translations are cached in memcached)

That should be enough.
Comment 4 David Nind 2023-12-07 18:29:49 UTC
Created attachment 159662 [details] [review]
Bug 35476: Make 'Submit' buttons translatable in vue components

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2023-12-07 18:31:47 UTC
(In reply to Jonathan Druart from comment #3)
> Hi David,
> I cannot test right now, but you need:
> 8. Apply the patch
> 9. yarn build (or simply yarn js:build)
> 10. restart_all (JS translations are cached in memcached)
> 
> That should be enough.

Thanks Jonathan!

That worked.

Simplified test plan:

1. Install another language, for example: koha-translate --install es-ES --dev kohadev
2. Enable the language for the staff interface (Administration > System preferences > I18N/L10N > language)
3. Enable the ERM module (ERMModule)
4. Change the language to the one you installed
5. Go to E-resource management > eHoldings > Local > Packages > +New package
6. Note that the submit button is not translated (for +New package it is Submit instead of Enviar for es-ES)
  (Compare to one of the other submit buttons that is translated correctly (E-resource management > Agreements > +New agreement)
7. Apply the patch, yarn js:build, restart_all
8. Repeat step 5 - the submit button is now translated!
Comment 6 Tomás Cohen Arazi 2023-12-15 20:59:29 UTC
Created attachment 159919 [details] [review]
Bug 35476: Make 'Submit' buttons translatable in vue components

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi 2023-12-15 20:59:35 UTC
Created attachment 159920 [details] [review]
Bug 35476: Make 'Submit' translatable in TrainsFormAddItem.vue

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Katrin Fischer 2023-12-18 14:25:30 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-01-03 14:19:48 UTC
Pushed to 23.11.x for 23.11.02
Comment 10 Lucas Gass 2024-01-04 20:10:03 UTC
Not needed in 23.05.x, no backport.