After Bug 24262 we need new translation files, *-installer-MARC21.po for MARC21 installer files (Bug 24593 and Bug 24584) *-installer.po for common files (Bug 24583 and Bug 24584)
Created attachment 100709 [details] Bug 24871: xz compressed patch Bug 24871: Add new *-installer*.po translation files This patch simply adds new po files for each supported language. The are not created on update, so the need to add this files. To test: 1) Update your preferred language 2) Check missing *installer*po files 3) Create new translation files: cd /misc/translation ./translate create xx-YY check *installer*po files 4) Apply patch 5) Repeat 1, verify installer files are updated see last modification time Pre-filled translations for some languages (https://translate.koha-community.org/projects/marc21/)
Should not we remove the files for LANG that are in installer/data/mysql/? Thinking about fr-FR, there is no need (yet) to translate them, they won't be used.
(In reply to Jonathan Druart from comment #2) > Should not we remove the files for LANG that are in installer/data/mysql/? > Thinking about fr-FR, there is no need (yet) to translate them, they won't > be used. Yes you are right, no need of them if lang dir exists. But if new bugs are filed to remove dirs they will be needed. For example Bug 24897 for es-ES. Perhaps we can wait until late April, at that moment I can remove all unneeded files in another bug.
> 1) Update your preferred language You mean with this? koha-translate --update XX > 2) Check missing *installer*po files What does this mean? > cd /misc/translation You mean misc/translator/ right? > 5) Repeat 1, verify installer files are updated see last modification time Does it means checking the files there? /koha-tmpl/intranet-tmpl/prog/XX/modules/installer Sorry for the basic questions.
Question about koha-testing-docker: (and maybe KohaDevBox) does anyone know from which user to run the translation commands? like koha-translate --install XX from the user kohadev-koha it lacks a permission mkdir /usr/share/koha/misc/translator/po/eo: Permission denied at /usr/share/koha/misc/translator/LangInstaller.pm line 708. from root, it doesn't find /usr/share/koha/misc/bin/clear_cache.pl
Hi Victor, sorry if the test plan was not clear (In reply to Victor Grousset/tuxayo from comment #4) > > 1) Update your preferred language > > You mean with this? > koha-translate --update XX No, that command updates installed translations. The meaning was to do: cd misc/translator; ./translate update XX > > > 2) Check missing *installer*po files > > What does this mean? It means that there are no XX-*-installer.po after an update of an existing language- Updates process does not create missing files, only updates existing ones. The only way to 'create' the files is using 'create' option of translate command, but that fails if some of the files are present. The purpose of this patch is to add those files > > > cd /misc/translation > > You mean misc/translator/ right? Yes, of course, my bad. > > > 5) Repeat 1, verify installer files are updated > see last modification time > > Does it means checking the files there? > /koha-tmpl/intranet-tmpl/prog/XX/modules/installer No, just run "./translate update XX" and verify that all XX-*.po are updated > > Sorry for the basic questions. No problem, thank you :)
Thanks for the clarifications. > 4) Apply patch > 5) Repeat 1, verify installer files are updated > see last modification time Actually I missed 4) and the files are still updated. Does it mean that the test plan is missing something?
(In reply to Victor Grousset/tuxayo from comment #7) > Actually I missed 4) and the files are still updated. Does it mean that the > test plan is missing something? Take for example language 'eo', current master, wo/patch Number of PO files = 8 ls misc/translator/po/eo-*po | wc -l After doing language update, number = 8 (cd misc/translator/; ./translate update eo); ls misc/translator/po/eo-*.po | wc -l Re-creating the language, number = 10 (cd misc/translator/; rm -f po/eo-*.po; ./translate create eo); ls misc/translator/po/eo-*.po | wc -l New files are eo-installer-MARC21.po and eo-installer.po This bug only adds those files for each language. Test plan is not perfect, but simply shows that language update does not create new files(1,2), create process does(3), and patch adds(4) files for each language that are updated(5) after applying it. Thanks for testing
Created attachment 103426 [details] Bug 24871: xz compressed patch
Author: Bernardo González Kriegel <gonzalez@di.unc.edu.ar> Date: Sun Mar 15 18:15:32 2020 -0300 Bug 24871: Add new *-installer*.po translation files This patch simply adds new po files for each supported language. The are not created on update, so the need to add this files. To test: 1) Count the number of po files of your preferred language (replace XX) ls misc/translator/po/XX-*po | wc -l 2) You should have 8 of them 3) Update it and recount (cd misc/translator/; ./translate update XX); ls misc/translator/po/XX-*.po | wc -l 4) still 8, it means that the update process doesn't add new po files 5) Re-create the language (cd misc/translator/; rm -f po/XX-*.po; ./translate create XX); 6) recount: ls misc/translator/po/XX-*po | wc -l 7) It's 10 8) note: it means that the creation process adds new po files 9) restore to a clean state git restore misc/translator/po/ rm misc/translator/po/eo-installer-MARC21.po misc/translator/po/eo-installer.po 10) manually apply the patch (because it's too big to be directly here) 1) download 2) extact the xz file 3) apply it 4) git am 0001-Bug-24871-Add-new-installer-.po-translation-files.patch-1 11) check the modification time of the installer .po files of your preferred language ls -l misc/translator/po/XX-installer* 12) note: this also checks for their presence, which is what this patch actually does, only adding the installer po files 13) Update your preferred language (cd misc/translator/; ./translate update XX); 14) check the modification time ls -l misc/translator/po/XX-installer* 15) It should have been updated, so everything still works correcly :D Pre-filled translations for some languages (https://translate.koha-community.org/projects/marc21/) Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
> Take for example language 'eo', current master, wo/patch That's a fine example for me. Tio estas bona ekzemplo por mi. ;) Thanks for the clarifications, it work :D. I tried to reflect the explanations in the test plan. Here are the changes: == Previous test plan == 1) Update your preferred language 2) Check missing *installer*po files 3) Create new translation files: cd /misc/translation ./translate create xx-YY check *installer*po files 4) Apply patch 5) Repeat 1, verify installer files are updated see last modification time == current test plan == 1) Count the number of po files of your preferred language (replace XX) ls misc/translator/po/XX-*po | wc -l 2) You should have 8 of them 3) Update it and recount (cd misc/translator/; ./translate update XX); ls misc/translator/po/XX-*.po | wc -l 4) still 8, it means that the update process doesn't add new po files 5) Re-create the language (cd misc/translator/; rm -f po/XX-*.po; ./translate create XX); 6) recount: ls misc/translator/po/XX-*po | wc -l 7) It's 10 8) note: it means that the creation process adds new po files 9) restore to a clean state git restore misc/translator/po/ rm misc/translator/po/eo-installer-MARC21.po misc/translator/po/eo-installer.po 10) manually apply the patch (because it's too big to be directly here) 1) download 2) extact the xz file 3) apply it 4) git am 0001-Bug-24871-Add-new-installer-.po-translation-files.patch-1 11) check the modification time of the installer .po files of your preferred language ls -l misc/translator/po/XX-installer* 12) note: this also checks for their presence, which is what this patch actually does, only adding the installer po files 13) Update your preferred language (cd misc/translator/; ./translate update XX); 14) check the modification time ls -l misc/translator/po/XX-installer* 15) It should have been updated, so everything still works correcly :D
(In reply to Victor Grousset/tuxayo from comment #11) > > Take for example language 'eo', current master, wo/patch > > That's a fine example for me. > Tio estas bona ekzemplo por mi. ;) > I know :) Thank you!
Signed off patches are on https://gitlab.com/joubu/Koha/-/commits/bug_24871 Passing QA.
Nice work everyone! Pushed to master for 20.05
24262 was not backported to 19.11.x I do not believe these are needed in 19.11.x either. not backported