[Bug 21895] New: translations fail on upgrade to 18.11.00 (package installation)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Bug ID: 21895 Summary: translations fail on upgrade to 18.11.00 (package installation) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: mirko@abunchofthings.net QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr On upgrade of a package installation to 18.11.00, there are several errors related to translations. Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 196. Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 238. Can't stat /usr/share/koha/intranet/cgi-bin/koha-tmpl: No such file or directory at /usr/share/koha/misc/translator/LangInstaller.pm line 633. /usr/bin/msginit: error while opening "Koha.pot" for reading: No such file or directory /bin/sed: can't read /usr/share/koha/misc/translator/po/de-DE-messages.po: No such file or directory /usr/bin/msgfmt: error while opening "/usr/share/koha/misc/translator/po/de-DE-messages.po" for reading: No such file or directory Updated the de-DE translations. find: invalid expression; you have used a binary operator '-or' with nothing before it. W: APT had planned for dpkg to do more than it reported back (0 vs 4). Affected packages: koha-common:amd64 Bugs related are 15395 and 21823 /usr/share/koha/intranet/cgi-bin/koha-tmpl appears to be a dev path not working for regular installations (/usr/share/koha/misc/translator/LangInstaller.pm line 633.) New files are not created (Koha.pot, de-DE-messages.po) -- 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=21895 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mirko@abunchofthings.net, | |nick@bywatersolutions.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #1 from Mirko Tietgen <mirko@abunchofthings.net> --- *** Bug 21894 has been marked as a duplicate of this bug. *** -- 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=21895 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |blocker CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |julian.maurice@biblibre.com | |, | |kyle@bywatersolutions.com, | |m.de.rooy@rijksmuseum.nl -- 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=21895 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 82687 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82687&action=edit Bug 21895: Fix translation for package install The string extraction process was not taking into account the fact that standard/package install have a completely different directory structure than the dev install This patch tries to keep the exact same behaviour for dev installs, while making it work for standard install by using opachtdocs, intrahtdocs, opacdir and intranetdir from $KOHA_CONF Test plan: 1. Follow test plan in https://gitlab.com/koha-community/Koha/commit/d708255c7a4d981c7c7bdd0644a752... 2. Do a standard install and repeat step 1 on this new install 3. If you know how to build the Debian package, build it, install it and verify that koha-translate works as expected 4. prove t/LangInstaller.t -- 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=21895 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |julian.maurice@biblibre.com |ity.org | -- 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=21895 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15395 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15395 [Bug 15395] Internationalization: plural forms, context, and more -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #3 from Mirko Tietgen <mirko@abunchofthings.net> --- I built a package with this patch. On upgrade, I get the following: Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 197. Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 239. /usr/bin/msginit: error while opening "Koha.pot" for reading: No such file or directory /bin/sed: can't read /usr/share/koha/misc/translator/po/de-DE-messages.po: No such file or directory /usr/bin/msgfmt: error while opening "/usr/share/koha/misc/translator/po/de-DE-messages.po" for reading: No such file or directory Updated the de-DE translations. find: invalid expression; you have used a binary operator '-or' with nothing before it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 82693 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82693&action=edit Bug 21895: Fix path to POT file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- Not sure if it will fix the problem. But if xgettext doesn't complain, it means the POT file was created, but at a different location. Is `translate` script run from a different directory than its own ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #6 from Mirko Tietgen <mirko@abunchofthings.net> --- When I manually update the translation, it seems to work ./translate update de-DE Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 197. Created /usr/share/koha/misc/translator/po/de-DE-messages.po. I don't get a file Koha.pot though. Is that expected? koha-translate for packages does 'update' by removing the translation files, then 'install'. Reading bug 15395 I was under the impression that install should work. Is translate update required to get the new files created? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Mirko Tietgen from comment #6)
I don't get a file Koha.pot though. Is that expected? Yes. The pot file is deleted at the end.
koha-translate for packages does 'update' by removing the translation files, then 'install'. Reading bug 15395 I was under the impression that install should work. Is translate update required to get the new files created? No it's not required. `./translate install` creates the xx-XX-messages.po if it doesn't exist
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> ---
`./translate install` creates the xx-XX-messages.po if it doesn't exist In fact, those files should probably generated for all languages and then committed, even if empty. That will prevent `./translate install` to try to extract strings every time
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #9 from Mirko Tietgen <mirko@abunchofthings.net> --- Okay, with both patches applied it seems to work but gives some warnings. Can we do something about these? Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 197. Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 239. Created /usr/share/koha/misc/translator/po/de-DE-messages.po. Updated the de-DE translations. find: invalid expression; you have used a binary operator '-or' with nothing before it. (In reply to Julian Maurice from comment #8)
`./translate install` creates the xx-XX-messages.po if it doesn't exist In fact, those files should probably generated for all languages and then committed, even if empty. That will prevent `./translate install` to try to extract strings every time
Created on the pootle server? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #10 from Mirko Tietgen <mirko@abunchofthings.net> --- (In reply to Mirko Tietgen from comment #9)
find: invalid expression; you have used a binary operator '-or' with nothing before it.
This is not related to translations, I found the problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Mirko Tietgen from comment #9)
Okay, with both patches applied it seems to work but gives some warnings. Can we do something about these?
Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 197. Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 239. I've seen these warnings for some time now. Not sure how to fix them
(In reply to Julian Maurice from comment #8)
`./translate install` creates the xx-XX-messages.po if it doesn't exist In fact, those files should probably generated for all languages and then committed, even if empty. That will prevent `./translate install` to try to extract strings every time
Created on the pootle server? IMO not necessary for now, since they will be empty.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82687|0 |1 is obsolete| | --- Comment #12 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 82695 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82695&action=edit Bug 21895: Fix translation for package install The string extraction process was not taking into account the fact that standard/package install have a completely different directory structure than the dev install This patch tries to keep the exact same behaviour for dev installs, while making it work for standard install by using opachtdocs, intrahtdocs, opacdir and intranetdir from $KOHA_CONF Test plan: 1. Follow test plan in https://gitlab.com/koha-community/Koha/commit/d708255c7a4d981c7c7bdd0644a752... 2. Do a standard install and repeat step 1 on this new install 3. If you know how to build the Debian package, build it, install it and verify that koha-translate works as expected 4. prove t/LangInstaller.t Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82693|0 |1 is obsolete| | --- Comment #13 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 82696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82696&action=edit Bug 21895: Fix path to POT file Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #14 from Mirko Tietgen <mirko@abunchofthings.net> --- I built a package and verified it's working. I have not worked through the whole old test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 --- Comment #15 from Mirko Tietgen <mirko@abunchofthings.net> --- (In reply to Mirko Tietgen from comment #10)
(In reply to Mirko Tietgen from comment #9)
find: invalid expression; you have used a binary operator '-or' with nothing before it.
This is not related to translations, I found the problem.
I have added a string patch on bug 21897. (In reply to Julian Maurice from comment #11)
Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 197. Use of uninitialized value $pref_name in concatenation (.) or string at /usr/share/koha/misc/translator/LangInstaller.pm line 239. I've seen these warnings for some time now. Not sure how to fix them
I think we can live with that. The find error looked more troublesome to me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82695|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 82697 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82697&action=edit Bug 21895: Fix translation for package install The string extraction process was not taking into account the fact that standard/package install have a completely different directory structure than the dev install This patch tries to keep the exact same behaviour for dev installs, while making it work for standard install by using opachtdocs, intrahtdocs, opacdir and intranetdir from $KOHA_CONF Test plan: 1. Follow test plan in https://gitlab.com/koha-community/Koha/commit/d708255c7a4d981c7c7bdd0644a752... 2. Do a standard install and repeat step 1 on this new install 3. If you know how to build the Debian package, build it, install it and verify that koha-translate works as expected 4. prove t/LangInstaller.t Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82696|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 82698 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82698&action=edit Bug 21895: Fix path to POT file Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works well for me and I can't see any regressions. I followed the full test plan and it all passed. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work everyone! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |lucas@bywatersolutions.com Status|Pushed to Stable |RESOLVED --- Comment #21 from Lucas Gass <lucas@bywatersolutions.com> --- depends on 15395 wont backport to 18.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21895 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|translations fail on |Translations fail on |upgrade to 18.11.00 |upgrade to 18.11.00 |(package installation) |(package installation) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org