[Bug 10942] New: Provide a way for package upgrades to update template translations
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Bug ID: 10942 Summary: Provide a way for package upgrades to update template translations Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz During the upgrade of the 'koha-common' package we should provide a way of enabling template translations update to the most current. It should default to 'no' as there might be local changes to the templates that could need to be preserved. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 21459 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21459&action=edit Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I provide this patch just to have a way to solve this in the case we don't implement the l10n packages in time and still consider this enhancement important (to avoid breakage for the end-user with outdated translated templates). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #3 from Robin Sheat <robin@catalyst.net.nz> --- Comment on attachment 21459 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21459 Bug 10942: Provide a way for package upgrades to update template translations Review of attachment 21459: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10942&attachment=21459) ----------------------------------------------------------------- This is a good approach. ::: debian/koha-common.postinst @@ +13,5 @@
+ . /etc/default/$NAME +elif [ -r /etc/sysconfig/$NAME ]; then + # RedHat / SuSE + . /etc/sysconfig/$NAME +fi
Probably don't need to be so cross-platform in debian/*.postint, though not likely to hurt anything. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21459|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 21461 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=21461&action=edit Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Stefano Bargioni <bargioni@pusc.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bargioni@pusc.it -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #21461|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 24096 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24096&action=edit Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no and there are translations installed (so they need to get updated). Regards To+ Sponsored-by: Universidad Nacional de Cordoba -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11145 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24096|0 |1 is obsolete| | --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 24972 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24972&action=edit Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no and there are translations installed (so they need to get updated). Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised, default behaviour doesn't change. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Pablo AB <pablo.bianchi@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pablo.bianchi@gmail.com --- Comment #7 from Pablo AB <pablo.bianchi@gmail.com> --- This is an important issue for non-English Koha users, at least Spanish speakers. We see a lot of people having problem with this on Koha-es (Spanish Koha list, http://groups.yahoo.com/group/koha-es). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- Tomas: I changed the Assigned to:-column and put your name there. Just for the record, as I recall this is not the first time you apparently forgot to do so :) I remember seeing another report this morning. Thanks for this detail.. Marcel -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 KSolano <bears1729@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |163.178.105.2:8082 CC| |bears1729@gmail.com --- Comment #9 from KSolano <bears1729@gmail.com> --- We've experienced some difficulties using package updates to update KOHA, in this case, template translations, spanish (es-ES) specifically, such as log in problems of any users when translation spanish is on, home page redirections to other menu inside OPAC, Z39.50 servers additions errors, and log out from de OPAC using superlibrarian users. I'm use koha-translate --update es-ES everytime this happens, but I feel this is not the kind of stability we are looking for a librarian web base system. Among this situations, I consider KOHA one of the best and congrats to developer team for amazing job. Thanks! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #10 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to KSolano from comment #9)
I'm use koha-translate --update es-ES everytime this happens, but I feel this is not the kind of stability we are looking for a librarian web base system.
At the moment, you should be running koha-translate --update every time you do an update. Once this patch is in, you won't need to as it'll happen automatically. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24972|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 26122 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26122&action=edit [PASSED QA] Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no and there are translations installed (so they need to get updated). Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised, default behaviour doesn't change. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #12 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to Robin Sheat from comment #10)
(In reply to KSolano from comment #9)
I'm use koha-translate --update es-ES everytime this happens, but I feel this is not the kind of stability we are looking for a librarian web base system.
At the moment, you should be running koha-translate --update every time you do an update.
Once this patch is in, you won't need to as it'll happen automatically.
To be clear, it will /not/ happen automatically by default, as you'd need to edit /etc/default/koha-common first. But this is where I want to raise the question: why not make AUTOMATIC_TRANSLATIONS_UPDATE be the default? If you're running from packages, you would expect to get the base English templates overwritten whenever you upgrade; why would the expectation be different for the generated translated templates? IOW, I'd like to here from folks whether there are any who are both running from packages /and/ manually tweaking the generated translated templates? I may be off-base of course, but in any event, if the default for AUTOMATIC_TRANSLATIONS_UPDATE does need to be no, I think it would be a good idea to ask during upgrade. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think it could be on by default, as it happened quite too often that we forgot to update the templates in the past and I can't really think of a reason why you wouldn't want that, unless you have been tinkering with things and then you shoudl be able to set the variable to prevent automated updating. But if we leave it off, prompting sounds good. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Short: +1 for a followup that changes to 'yes' Long: I'd prefer to enable it by default. People having custom stuff are clever enough to disable it if necessary. That said, exploring the use of debconf to have dialogs for this and other preferences is something we need to do. As soon as possible. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #15 from Robin Sheat <robin@catalyst.net.nz> --- I have no problem with it being on by default. We should probably also have a postrm hook that removes the translations when the package is removed, as they won't be tracked by the package manager as-is. They probably also should be going into /var, as writing to /usr is a bit of an odd thing to do really. This'll require more thought though. Neither of these should stop this patch though. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #16 from Robin Sheat <robin@catalyst.net.nz> --- Talking with Galen, /etc/default/koha-common shouldn't be used as it's really for init scripts to be configured, which isn't the case here. More probably, it should be something like /etc/koha/koha-common.conf. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26122|0 |1 is obsolete| | --- Comment #17 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 26132 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26132&action=edit Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no and there are translations installed (so they need to get updated). Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised, default behaviour doesn't change. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #18 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 26133 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26133&action=edit bug 10942: (follow-up) create a /etc/koha/koha-common.conf This patch creates a new master configuration file for the koha-common package, and moves the AUTOMATIC_TRANSLATIONS_UPDATE variable rather than leaving in in /etc/default/koha, which is meant to be used for init script settings. The configuration format is simple - a shell script that sets variables and which can sourced by another script or trivially parsed. To test: - Apply the patch series for bug 10942 and build a package. - Install the package. - Verify that a new config file, /etc/koha/koha-common.conf. - Follow the rest of the test plan for the main page (e.g., set AUTOMATIC_TRANSLATIONS_UPDATE and force a package upgrade). Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #19 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 26134 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26134&action=edit Bug 10942: (follow-up) make AUTOMATIC_TRANSLATIONS_UPDATE default to yes This patch makes AUTOMATIC_TRANSLATIONS_UPDATE default to yes, meaning that package upgrades will update the translations by default. This seems definitely sensible for new installations, but as there are some older installations that may be in the habit directly editing generated translated templates, it's less clear whether this is a good idea for upgrades. This patch is intentionally separate, and can be ignored if the consensus swings towards having AUTOMATIC_TRANSLATIONS_UPDATE be off even for new installations or if somebody counter-patches with adding debconf support. To test: - As with the previous patches in the series, except that the translations would be automatically updated upon installing the new package. Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #20 from Galen Charlton <gmcharlt@gmail.com> --- I've signed off on the main patch, but attached two follow-ups for which I like review. The first implements creating /etc/koha/koha-common.conf and moving AUTOMATIC_TRANSLATIONS_UPDATE to it. The second follow-up, which is very much up for discussion, makes AUTOMATIC_TRANSLATIONS_UPDATE be on by default. Ideally, it will never see the light of day in master if somebody can whip up debconf support quickly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26132|0 |1 is obsolete| | --- Comment #21 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26135 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26135&action=edit Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no and there are translations installed (so they need to get updated). Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised, default behaviour doesn't change. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26133|0 |1 is obsolete| | --- Comment #22 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26136 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26136&action=edit bug 10942: (follow-up) create a /etc/koha/koha-common.conf This patch creates a new master configuration file for the koha-common package, and moves the AUTOMATIC_TRANSLATIONS_UPDATE variable rather than leaving in in /etc/default/koha, which is meant to be used for init script settings. The configuration format is simple - a shell script that sets variables and which can sourced by another script or trivially parsed. To test: - Apply the patch series for bug 10942 and build a package. - Install the package. - Verify that a new config file, /etc/koha/koha-common.conf. - Follow the rest of the test plan for the main page (e.g., set AUTOMATIC_TRANSLATIONS_UPDATE and force a package upgrade). Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26134|0 |1 is obsolete| | --- Comment #23 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26137 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26137&action=edit Bug 10942: (follow-up) make AUTOMATIC_TRANSLATIONS_UPDATE default to yes This patch makes AUTOMATIC_TRANSLATIONS_UPDATE default to yes, meaning that package upgrades will update the translations by default. This seems definitely sensible for new installations, but as there are some older installations that may be in the habit directly editing generated translated templates, it's less clear whether this is a good idea for upgrades. This patch is intentionally separate, and can be ignored if the consensus swings towards having AUTOMATIC_TRANSLATIONS_UPDATE be off even for new installations or if somebody counter-patches with adding debconf support. To test: - As with the previous patches in the series, except that the translations would be automatically updated upon installing the new package. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #24 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26138 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26138&action=edit Bug 10942 - debconfing the update option This causes a question to be asked at installation time as to whether translations should be updated or not. The answer is written to the config file, and stored in debconf. Effort is taken to ensure that if the admin changes the config file, the update will be picked up and reflected in debconf (i.e. that the admin's decision is always the correct one.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #25 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Robin Sheat from comment #24)
Created attachment 26138 [details] [review] Bug 10942 - debconfing the update option
Note that this is totally untested code at this stage. It might work, but really there are bound to be bugs there. I'm just putting it up to allow someone else the chance to review it if they get the chance, otherwise I'll get back to it tomorrow. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26135|0 |1 is obsolete| | --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 26220 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26220&action=edit Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no and there are translations installed (so they need to get updated). Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised, default behaviour doesn't change. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26136|0 |1 is obsolete| | --- Comment #27 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 26221 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26221&action=edit bug 10942: (follow-up) create a /etc/koha/koha-common.conf This patch creates a new master configuration file for the koha-common package, and moves the AUTOMATIC_TRANSLATIONS_UPDATE variable rather than leaving in in /etc/default/koha, which is meant to be used for init script settings. The configuration format is simple - a shell script that sets variables and which can sourced by another script or trivially parsed. To test: - Apply the patch series for bug 10942 and build a package. - Install the package. - Verify that a new config file, /etc/koha/koha-common.conf. - Follow the rest of the test plan for the main page (e.g., set AUTOMATIC_TRANSLATIONS_UPDATE and force a package upgrade). Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26137|0 |1 is obsolete| | --- Comment #28 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 26222 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26222&action=edit Bug 10942: (follow-up) make AUTOMATIC_TRANSLATIONS_UPDATE default to yes This patch makes AUTOMATIC_TRANSLATIONS_UPDATE default to yes, meaning that package upgrades will update the translations by default. This seems definitely sensible for new installations, but as there are some older installations that may be in the habit directly editing generated translated templates, it's less clear whether this is a good idea for upgrades. This patch is intentionally separate, and can be ignored if the consensus swings towards having AUTOMATIC_TRANSLATIONS_UPDATE be off even for new installations or if somebody counter-patches with adding debconf support. To test: - As with the previous patches in the series, except that the translations would be automatically updated upon installing the new package. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26138|0 |1 is obsolete| | --- Comment #29 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 26223 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26223&action=edit Bug 10942 - debconfing the update option This causes a question to be asked at installation time as to whether translations should be updated or not. The answer is written to the config file, and stored in debconf. Effort is taken to ensure that if the admin changes the config file, the update will be picked up and reflected in debconf (i.e. that the admin's decision is always the correct one.) Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Fixed two typos that made it fail and it worked like a charm. Tested like this: - Install the package => no errors, the file is created, defaults to 'yes' - Install a language (koha-translate --install es-ES) - Re-install the package (simulating an upgrade) => es-ES gets updated - Set preference to 'no' - Re-install => es-ES doesn't get updated, the warning is printed correctly - Installed a second language (koha-translate --install pt-BR) - did all the tests again => Success Note: on master there are obvious template translation warnings. A copy of the generated package can be grabbed from: http://es.koha-community.org/koha-common_3.15+20140312172225.af7c0a23_all.de... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #30 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 26301 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26301&action=edit Bug 10942: (QA followup) Warnings should go to STDERR As noted by Robin, STDOUT is used by the script to communicate with debconf and, ence, the warning messages should be directed to STDERR. This patch does that. To test: - Set AUTOMATIC_TRANSLATIONS_UPDATE="no" so the warning normally shows - Redirect STDOUT to /dev/null: dpkg -i koha-common...deb > /dev/null => Warning message doesn't show (i.e. it is sent to STDOUT) - Apply the patch, rebuild package - Redirect STDOUT to /dev/null: dpkg -i koha-common...deb > /dev/null => Warning message shows (i.e. is correctly sent to STDERR) - Redirect STDERR to /dev/null: dpkg -i koha-common...deb 2> /dev/null => Warning message doesn't show - Verify that previous tests pass Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #31 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I've conveniently built a package for testing purposes: http://es.koha-community.org/koha-common_3.15+20140313114337.f0f1e109_all.de... It's current master+10942 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26220|0 |1 is obsolete| | --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 27454 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27454&action=edit [PASSED QA] Bug 10942: Provide a way for package upgrades to update template translations This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at /etc/default/koha-common that is used to control whether the upgrade process should trigger a $ koha-translate --update <lang_code> command for each installed template translation language. To test: - Have a koha-common setup with some languages installed (e.g. koha-translate --install es-ES) - Apply the patch and build a package for it. - Install it. - A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place at /etc/default/koha-common - Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes' - Re-install the package to trigger the post-install script - Verify that translations get updated. Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no and there are translations installed (so they need to get updated). Regards To+ Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised, default behaviour doesn't change. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26221|0 |1 is obsolete| | --- Comment #33 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 27455 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27455&action=edit [PASSED QA] Bug 10942: (follow-up) create a /etc/koha/koha-common.conf This patch creates a new master configuration file for the koha-common package, and moves the AUTOMATIC_TRANSLATIONS_UPDATE variable rather than leaving in in /etc/default/koha, which is meant to be used for init script settings. The configuration format is simple - a shell script that sets variables and which can sourced by another script or trivially parsed. To test: - Apply the patch series for bug 10942 and build a package. - Install the package. - Verify that a new config file, /etc/koha/koha-common.conf. - Follow the rest of the test plan for the main page (e.g., set AUTOMATIC_TRANSLATIONS_UPDATE and force a package upgrade). Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26222|0 |1 is obsolete| | --- Comment #34 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 27456 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27456&action=edit [PASSED QA] Bug 10942: (follow-up) make AUTOMATIC_TRANSLATIONS_UPDATE default to yes This patch makes AUTOMATIC_TRANSLATIONS_UPDATE default to yes, meaning that package upgrades will update the translations by default. This seems definitely sensible for new installations, but as there are some older installations that may be in the habit directly editing generated translated templates, it's less clear whether this is a good idea for upgrades. This patch is intentionally separate, and can be ignored if the consensus swings towards having AUTOMATIC_TRANSLATIONS_UPDATE be off even for new installations or if somebody counter-patches with adding debconf support. To test: - As with the previous patches in the series, except that the translations would be automatically updated upon installing the new package. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26223|0 |1 is obsolete| | --- Comment #35 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 27457 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27457&action=edit [PASSED QA] Bug 10942 - debconfing the update option This causes a question to be asked at installation time as to whether translations should be updated or not. The answer is written to the config file, and stored in debconf. Effort is taken to ensure that if the admin changes the config file, the update will be picked up and reflected in debconf (i.e. that the admin's decision is always the correct one.) Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Fixed two typos that made it fail and it worked like a charm. Tested like this: - Install the package => no errors, the file is created, defaults to 'yes' - Install a language (koha-translate --install es-ES) - Re-install the package (simulating an upgrade) => es-ES gets updated - Set preference to 'no' - Re-install => es-ES doesn't get updated, the warning is printed correctly - Installed a second language (koha-translate --install pt-BR) - did all the tests again => Success Note: on master there are obvious template translation warnings. A copy of the generated package can be grabbed from: http://es.koha-community.org/koha-common_3.15+20140312172225.af7c0a23_all.de... Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26301|0 |1 is obsolete| | --- Comment #36 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 27458 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27458&action=edit [PASSED QA] Bug 10942: (QA followup) Warnings should go to STDERR As noted by Robin, STDOUT is used by the script to communicate with debconf and, ence, the warning messages should be directed to STDERR. This patch does that. To test: - Set AUTOMATIC_TRANSLATIONS_UPDATE="no" so the warning normally shows - Redirect STDOUT to /dev/null: dpkg -i koha-common...deb > /dev/null => Warning message doesn't show (i.e. it is sent to STDOUT) - Apply the patch, rebuild package - Redirect STDOUT to /dev/null: dpkg -i koha-common...deb > /dev/null => Warning message shows (i.e. is correctly sent to STDERR) - Redirect STDERR to /dev/null: dpkg -i koha-common...deb 2> /dev/null => Warning message doesn't show - Verify that previous tests pass Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #37 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Yowsers, that was a long one. I built packages from the resulting patch set, and tested: 1. That the config file is now created - tick 2. That the config file is used for upgrades and defaults to yes - tick 3. That the config file is read as upgrade time to correctly set debconf - tick 4. That it all passes the qa scripts still - tick I'm happy that this all works as described now. Nice bit of team work going on there. I'm going to open a further bug, so that the suggestion to move translations into /var doesn't get lost once this bugs life expires. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12129 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12130 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #38 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Martin Renvoize from comment #37)
Yowsers, that was a long one.
The downside of trying to do things as correct as possible is that it takes longer :) The upside is that this will probably keep working for the foreseeable future as I think it's probably the best solution. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 --- Comment #39 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Robin Sheat from comment #38)
longer :) The upside is that this will probably keep working for the foreseeable future as I think it's probably the best solution.
(until we get all the translations building with the packages, anyway.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #40 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Tomás and Robin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=4861 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |4861 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10942 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED CC| |fridolyn.somers@biblibre.co | |m Resolution|--- |FIXED --- Comment #41 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- I choose to not apply to 3.14.x so I set as resolved. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org