[Bug 32356] New: fr-FR installer dir /kohadevbox/koha/installer/data/mysql/fr-FR already exists.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Bug ID: 32356 Summary: fr-FR installer dir /kohadevbox/koha/installer/data/mysql/fr-FR already exists. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: aleisha@catalyst.net.nz, frederic@tamil.fr When installing a language that has already been installed before you'll end up with this error: fr-FR installer dir /kohadevbox/koha/installer/data/mysql/fr-FR already exists. This is a problem, as the files in the directory won't be replaced with their updated versions or files will be missing: Hadn't been installed before: kohadev-koha@kohadevbox:/kohadevbox/koha/misc/translator$ ls -l ../../installer/data/mysql/es-ES total 12 drwxr-xr-x 2 kohadev-koha kohadev-koha 4096 Nov 28 20:25 mandatory drwxr-xr-x 4 kohadev-koha kohadev-koha 4096 Nov 28 20:25 marcflavour drwxr-xr-x 2 kohadev-koha kohadev-koha 4096 Nov 28 20:25 optional Had been installed before: kohadev-koha@kohadevbox:/kohadevbox/koha/misc/translator$ ls -l ../../installer/data/mysql/fr-FR/ total 0 There have been reports on problems with installing/updating languages on the mailing list and IRC: https://lists.katipo.co.nz/pipermail/koha/2022-November/058691.html https://lists.koha-community.org/pipermail/koha-devel/2022-November/047398.h... http://irc.koha-community.org/koha/2022-11-28#i_2464321 Something is not going well here. Another thing: The start page looks ok for es-ES but appears broken for de-DE in my test. Still investigating, but also wondering if it's another file related issue. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- How to recreate the problem? I've run twice translate install fr-FR and don't see the error. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think it should be visible when you run the commands koha-translate --update language and the language is already installled. It also appeared for me when I used the old way: kshell, cd misc/translator, perl translate install de-DE. I always had the message. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- On IRC I also talked to Tylathos in PM and he showed me the same error message on his package installation. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I think there are several things here. The de-DE interface is broken because of "% l: Unknown or unsupported format specification" To get the origin of the error: % junitmsgfmt misc/translator/po/de-DE* <failure message="msgfmt failure">misc/translator/po/de-DE-staff-prog.po:12520: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that terminates the directive number 2 is not a valid conversion specifier. misc/translator/po/de-DE-staff-prog.po:66878: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The string ends in the middle of a directive. msgfmt: found 2 fatal errors 12519 msgid "Are you sure you want to delete \"%s\"?" 12520 msgstr "Sind Sie sicher, dass Sie \"%s% löschen möchten?" -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #4)
I think there are several things here.
The de-DE interface is broken because of "% l: Unknown or unsupported format specification"
To get the origin of the error: % junitmsgfmt misc/translator/po/de-DE*
<failure message="msgfmt failure">misc/translator/po/de-DE-staff-prog.po:12520: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The character that terminates the directive number 2 is not a valid conversion specifier. misc/translator/po/de-DE-staff-prog.po:66878: 'msgstr' is not a valid C format string, unlike 'msgid'. Reason: The string ends in the middle of a directive. msgfmt: found 2 fatal errors
12519 msgid "Are you sure you want to delete \"%s\"?" 12520 msgstr "Sind Sie sicher, dass Sie \"%s% löschen möchten?"
Yes, I already fixed these. But I also had display problems with other installed languages. It was fr-FR - maybe also some errors there. Let's keep the display issue separate from the files not being updated in the installer directory. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24262 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24262 [Bug 24262] Translate installer data in YAML format -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> ---
https://lists.katipo.co.nz/pipermail/koha/2022-November/058691.html
Aleisha, did you manage to recreate the problem in ktd? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 144311 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144311&action=edit Bug 32356: Install installer translated files on update If the installer files exist for a given language, the translate script won't update it. We should get a confirmation from Bernardo (author of bug 24262), but I don't understand why it could be needed (side-effects?) Test plan: Installer several times the same language, drop the DB and run the installer+onboarding process. Check files installed by the installer (yaml for notice templates, biblio frameworks) have inserted the data properly in DB. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |mik@adminkuhn.ch --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This patch might fix Michael's problem, but it shouldn't fix Aleisha's. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|fr-FR installer dir |fr-FR installer dir |/kohadevbox/koha/installer/ |/kohadevbox/koha/installer/ |data/mysql/fr-FR already |data/mysql/xx-XX already |exists. |exists. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|fr-FR installer dir |xx-XX installer dir |/kohadevbox/koha/installer/ |/kohadevbox/koha/installer/ |data/mysql/xx-XX already |data/mysql/xx-XX already |exists. |exists. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144311|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 144418 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144418&action=edit Bug 32356: Install installer translated files on update If the installer files exist for a given language, the translate script won't update it. We should get a confirmation from Bernardo (author of bug 24262), but I don't understand why it could be needed (side-effects?) Test plan: Installer several times the same language, drop the DB and run the installer+onboarding process. Check files installed by the installer (yaml for notice templates, biblio frameworks) have inserted the data properly in DB. Signed-off-by: Katrin <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144418|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 144422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144422&action=edit Bug 32356: Install installer translated files on update If the installer files exist for a given language, the translate script won't update it. We should get a confirmation from Bernardo (author of bug 24262), but I don't understand why it could be needed (side-effects?) Test plan: Installer several times the same language, drop the DB and run the installer+onboarding process. Check files installed by the installer (yaml for notice templates, biblio frameworks) have inserted the data properly in DB. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Isn't this a permissions problem because people are using koha-translate as root? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- koha-translate --update removes the translated templates before re-generating: 136 if print_installed | grep -q $lang; then 137 # Check po files are present 138 check_lang_po_files $lang 139 remove_lang $lang 140 install_lang $lang -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #13 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #12)
koha-translate --update removes the translated templates before re-generating:
136 if print_installed | grep -q $lang; then 137 # Check po files are present 138 check_lang_po_files $lang 139 remove_lang $lang 140 install_lang $lang
I cannot remember, maybe this patch fixes the problem if you are not using koha-translate? It's not consistent to skip installer if the lang directory exist, and not doing it in other LangInstaller::install_* subroutines (install_prefs, install_tmpl, install_messages) anyway. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi from comment #11)
Isn't this a permissions problem because people are using koha-translate as root?
I did run misc/translate/translator with root until now without problems.. Being lazy, and note my container root actually is quite limited. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Here is a dumb question but couldnt we add TESTS for this module too ? Interesting that we have misc/translator/translate and debian/scripts/koha-translate. Shouldnt the latter one only be a very thin wrapper around the first one? Currently, it is a bit more. It implements an update option that we are missing in LangInstaller although the POD claims that it is present (but proposing something else): =head2 update For the current language, update .po files. sub install_installer => Nothng better than choosing a good subroutine name :) sub install_messages mkdir "$progdir/$self->{lang}/js"; => No check here ? Reading the comments, I think that we still need feedback from a few people (Bernardo, Aleisha, maybe others). And it feels like only removing the -d code is a bit of trial and error. This area of Koha (also) needs a bit more attention than that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Tomás Cohen Arazi from comment #12)
koha-translate --update removes the translated templates before re-generating:
136 if print_installed | grep -q $lang; then 137 # Check po files are present 138 check_lang_po_files $lang 139 remove_lang $lang 140 install_lang $lang
This diddn't work for me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- We need to decide which problem is the one we are solving here. And I don't think `koha-translate` should be used on KTD or a packages install. Just plain `perl translate...` Different scenarios seem to be mixed in the conversation. Regarding running as root vs. not doing so, it is clear to me that if you use the root user for all the things related to the repo (branches, new files as generated by perl translate, etc) you won't see any problems. If you work outside the container with your regular user, on the repo, then you will notice git repo problems (e.g. 'fatal: detected dubious ownership in repository'). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- For the record: root@kohadevbox:kohadevbox$ kshell kohadev-koha@kohadevbox:/kohadevbox/koha$ cd misc/translator/ kohadev-koha@kohadevbox:/kohadevbox/koha/misc/translator$ perl translate install fr-FR kohadev-koha@kohadevbox:/kohadevbox/koha/misc/translator$ perl translate install fr-FR kohadev-koha@kohadevbox:/kohadevbox/koha/misc/translator$ perl translate install fr-FR kohadev-koha@kohadevbox:/kohadevbox/koha/misc/translator$ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- What about the --dev option for koha-translate? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #20 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I really don't understand why this has not been pushed already. (In reply to Jonathan Druart from comment #13)
It's not consistent to skip installer if the lang directory exist, and not doing it in other LangInstaller::install_* subroutines (install_prefs, install_tmpl, install_messages) anyway.
It's obvious what's happening here, the files are not updated when they exist already, we skip the "installer" task! To recreate: - fr-FR and es-ES not installed % perl translate install fr-FR % grep -r Maybe ../../installer/data/mysql/fr-FR/ => There is not occurrence of "Maybe" in fr-FR! # Add it: % vim $SYNC_REPO/installer/data/mysql/en/mandatory/auth_values.yml Add a new entry 38 - category: "YES_NO" 39 authorised_value: "1" 40 lib: "Maybe" 41 lib_opac: "Maybe" % perl translate install es-ES % grep -r Maybe ../../installer/data/mysql/es-ES ../../installer/data/mysql/es-ES/mandatory/auth_values.yml: lib: Maybe ../../installer/data/mysql/es-ES/mandatory/auth_values.yml: lib_opac: Maybe => OK! % perl translate install fr-FR % grep -r Maybe ../../installer/data/mysql/fr-FR/ => KO, It's not updated! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #20)
I really don't understand why this has not been pushed already.
I think it is because of the confusion on the report and what's being actually fixed. - file already exists error (which my last post highlights I wasn't able to reproduce) - no, it was koha-translate (which deletes before re-generating, so that's not a real issue) - asking for a --dev option for koha-translate (maybe but that's another feature, I guess?) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144422|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 146426 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146426&action=edit Bug 32356: Install installer translated files on update If the installer files exist for a given language, the translate script won't update it. We should get a confirmation from Bernardo (author of bug 24262), but I don't understand why it could be needed (side-effects?) Test plan: Installer several times the same language, drop the DB and run the installer+onboarding process. Check files installed by the installer (yaml for notice templates, biblio frameworks) have inserted the data properly in DB. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #23 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Jacob O'Mara <jacob.omara@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 --- Comment #24 from Jacob O'Mara <jacob.omara@ptfs-europe.com> --- Nice work, thanks everyone! Pushed to 22.11.x for the next release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com Version(s)|23.05.00,22.11.03 |23.05.00,22.11.03,22.05.10 released in| | --- Comment #25 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable CC| |arthur.suzuki@biblibre.com Version(s)|23.05.00,22.11.03,22.05.10 |23.05.00,22.11.03,22.05.10, released in| |21.11.18 --- Comment #26 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11.x for 21.11.18 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32356 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #27 from wainuiwitikapark@catalyst.net.nz --- Not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org