The Yes and No radio button options for the "Is perpetual" field when adding an agreement are not translatable (at least, I didn't find the correct strings) To get to the options: 1. Enable the ERMModule system preference 2. Go to E-resource management 3. Click "Agreements" 4. Click "New agreement" --> Field "Is perpetual", options are Yes and No The only "Yes" that I found in fr-CA-messages-js.po is in holds. #: koha-tmpl/intranet-tmpl/prog/js/holds.js:241 msgid "Yes" msgstr "Oui" An option would be to change this to a checkbox, since the options are 0 or 1...
Not sure if it is managed in the same place, but the Yes/No in the agreement table, once the agreement is created, is also untranslatable, as well as the filtering drop-down in the table header. https://snipboard.io/QyfStJ.jpg
Created attachment 149727 [details] [review] Bug 32931: Fix translatability issues on 'new agreement' form This fixes the "Yes" and "No" options and "License info" placeholder. To get to the options: 1. Enable the ERMModule system preference 2. Go to E-resource management 3. Click "Agreements" 4. Click "New agreement" --> Field "Is perpetual", options are Yes and No --> At the bottom of the form "License info" with "License info" within the input field 5. Install (complete) language, verify those are not translated 6. Apply patch 7. Update po files 8. Verify strings exist for this file, translate if necessary 9. Re-install language 10. Verify strings are now translated
I believe I found a fix for the form... but I couldn't see where the other Yes/No (from comment 1) might go wrong. Adding Jonathan and attaching my patch. Caroline, maybe you want to test if that fixes the form for you too? The form/label layout is also a bit broken, but I see the same on master without my change. You might need to do a yarn build after applying the patch.
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue: <span v-if="agreement.is_perpetual">Yes</span> This one is missing as well.
I'm having a bit of unrelated trouble with the form. However, I'm wondering if a checkbox wouldn't be better in this case (rather that yes/no radio buttons). Similar to open baskets in acquisitions (when creating a new a basket, we can check a box is the orders are standing).
I applied the patch and updated/installed translations. I see the line in fr-CA-messages-js.po #: koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue:108 #: koha-tmpl/intranet-tmpl/prog/js/holds.js:241 msgid "Yes" msgstr "Oui" But it's still showing up as Yes in the form. I wonder if my unrelated problem is not related after all. The options are displayed before the question https://snipboard.io/R8i9th.jpg Not sure why, but it's the same in the ByWater sandbox, so it's not something in my installation or something I'm doing/not doing... Also, do we really want it to say "Noes"? XD I thought I was not seeing this correctly, but it's in the diff
Matt pointed me to bug 33355 for my form problems. This one doesn't apply on top of that. So I can't check if it solves my problem. I retested and Yes/No are still in english. (It's not even Yes/Noes, so I have no idea what I'm doing wrong)
(In reply to Caroline Cyr La Rose from comment #7) > Matt pointed me to bug 33355 for my form problems. This one doesn't apply on > top of that. So I can't check if it solves my problem. > > I retested and Yes/No are still in english. (It's not even Yes/Noes, so I > have no idea what I'm doing wrong) I guess it was a little too late again that day - I had changed it to noes to verify I was changing things in the right spot - forgot to change back or to commit the changed file... I won't be able to come back to this maybe for a while, if someone else wants to continue/fix this here please do. (I have no idea how to change to a checkbox either with vue)
You always need to build the vue files (yarn build) with every change I think.
Created attachment 149834 [details] [review] Bug 32931: Fix translatability issues on 'new agreement' form This fixes the "Yes" and "No" options and "License info" placeholder. To get to the options: 1. Enable the ERMModule system preference 2. Go to E-resource management 3. Click "Agreements" 4. Click "New agreement" --> Field "Is perpetual", options are Yes and No --> At the bottom of the form "License info" with "License info" within the input field 5. Install (complete) language, verify those are not translated 6. Apply patch 7. Update po files 8. Verify strings exist for this file, translate if necessary 9. Re-install language 10. Verify strings are now translated
Created attachment 149835 [details] [review] Bug 32931: Fix translatability issues on 'show agreement' view
I've fixed Katrin's patch. With this second patch it will work. Test plan: translate update LANG edit po/LANG-messages-js.po translate install LANG restart_all (JS strings are cached!!) Try now the UI
(In reply to Jonathan Druart from comment #12) > I've fixed Katrin's patch. > With this second patch it will work. > > Test plan: > translate update LANG > edit po/LANG-messages-js.po > translate install LANG > restart_all (JS strings are cached!!) > Try now the UI and ofc `yarn js:build` that is mandatory when you modify vue files.
Created attachment 150142 [details] [review] Bug 32931: Fix translatability issues on 'new agreement' form This fixes the "Yes" and "No" options and "License info" placeholder. To get to the options: 1. Enable the ERMModule system preference 2. Go to E-resource management 3. Click "Agreements" 4. Click "New agreement" --> Field "Is perpetual", options are Yes and No --> At the bottom of the form "License info" with "License info" within the input field 5. Install (complete) language, verify those are not translated 6. Apply patch 7. Update po files 8. Verify strings exist for this file, translate if necessary 9. Re-install language 10. Verify strings are now translated Signed-off-by: David Nind <david@davidnind.com>
Created attachment 150143 [details] [review] Bug 32931: Fix translatability issues on 'show agreement' view Signed-off-by: David Nind <david@davidnind.com>
(In reply to Jonathan Druart from comment #12) > I've fixed Katrin's patch. > With this second patch it will work. Thank you - I was just doing it by trial and error mostly :)
Testing notes (using KTD): 1. Install a language: - cd misc/translator - ./translate install fr-CA 2. After applying the patch: - yarn js:build - flush_memcached and restart_all 3. Update the po files: - cd misc/translator - ./translate update fr-CA - vi po/fr-CA-messages-js.po - search for Yes, No and License info - should now be entries for ...AgreementsFormAdd.vue and ....AgreementsShow.vue files - reinstall the language: ./translate install fr-CA 4. When installing fr-CA (before and after the patch is applied) I get this message - does this need to be fixed? In file "admin.pref", "Options d'authentification" is a translation for sections "Google OpenID Connect", "Login options" at /kohadevbox/koha/misc/translator/LangInstaller.pm line 184.
(In reply to David Nind from comment #17) > 4. When installing fr-CA (before and after the patch is applied) I get this > message - does this need to be fixed? > > In file "admin.pref", "Options d'authentification" is a translation for > sections "Google OpenID Connect", "Login options" at > /kohadevbox/koha/misc/translator/LangInstaller.pm line 184. It's already fixed in Pootle. However, I don't know how to make it so that the commited files are also corrected.
Created attachment 150205 [details] [review] Bug 32931: Fix translatability issues on 'new agreement' form This fixes the "Yes" and "No" options and "License info" placeholder. To get to the options: 1. Enable the ERMModule system preference 2. Go to E-resource management 3. Click "Agreements" 4. Click "New agreement" --> Field "Is perpetual", options are Yes and No --> At the bottom of the form "License info" with "License info" within the input field 5. Install (complete) language, verify those are not translated 6. Apply patch 7. Update po files 8. Verify strings exist for this file, translate if necessary 9. Re-install language 10. Verify strings are now translated Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 150206 [details] [review] Bug 32931: Fix translatability issues on 'show agreement' view Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release