[Bug 20307] New: Language overlay for authorized values
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Bug ID: 20307 Summary: Language overlay for authorized values Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 14100 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14100 [Bug 14100] Add base to make item types, branch names, sysprefs values and authorised values translatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@bugs.koha-c |koha-bugs@lists.koha-commun |ommunity.org |ity.org Status|ASSIGNED |NEW -- 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=20307 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Is there any work yet planned or done on this? -- 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=20307 Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christian.stelzenmueller@bs | |z-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #1)
Is there any work yet planned or done on this?
I have started something, but we need bug 15799 first (move the last C4::Koha::GetAuthorisedValues to Koha::AuthorisedValues) There are local patches (very wip) on my laptop, but I have no idea when I will get back to it. The rewrite/move patches are to slow to get pushed and need too much work to rebase. -- 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=20307 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ok, a little confused by the graph - didn't spot any patch with patches still needing work. Can you point me the right direction? -- 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=20307 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #3)
Ok, a little confused by the graph - didn't spot any patch with patches still needing work. Can you point me the right direction?
I do not plan to get back to this soon. -- 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=20307 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Should we continue on the same way of item types (translation from the UI), or extract the strings from the DB then use the new Koha::I18 module (translation from POs)? -- 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=20307 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #5)
Should we continue on the same way of item types (translation from the UI), or extract the strings from the DB then use the new Koha::I18 module (translation from POs)?
If I am not mistaken the translation from POs would always require to run jobs on the server, maintain your own po files... put them in the right place. I think we need something that can be done in the GUI to manage the translations. I am not sure if that could be achieved differently than what you have done for the itemtypes. -- 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=20307 Stefan Berndtsson <stefan.berndtsson@ub.gu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan.berndtsson@ub.gu.se --- Comment #7 from Stefan Berndtsson <stefan.berndtsson@ub.gu.se> --- (In reply to Jonathan Druart from comment #5)
Should we continue on the same way of item types (translation from the UI), or extract the strings from the DB then use the new Koha::I18 module (translation from POs)?
I think going the item type route is the proper way to do it. Doing it through PO:s wouldn't really work. Libraries within the same language area (sv-SE in my case) will not use the same names for values like LOC, and most likely not have the same values at all, and you can't have locally edited PO files for each library. Translations for item types should be fairly similar to translations for authorised values. Patron categories and library names should also benefit from such a system. -- 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=20307 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 86622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86622&action=edit Bug 20307: Add DB column localization.interface -- 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=20307 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 86623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86623&action=edit Bug 20307: DBIC Schema changes -- 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=20307 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 86624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86624&action=edit Bug 20307: Update the localization unique key -- 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=20307 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 86625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86625&action=edit Bug 20307: DBIC Schema changes 2 -- 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=20307 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 86626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86626&action=edit Bug 20307: Language overlay for authorised values -- 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=20307 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 86627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86627&action=edit Bug 20307: Some more fixes -- 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=20307 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I have cleaned and rebased my local patches, as well as fixing obvious problems. I have no idea how big is the remaining work to make it ready to be pushed. However it can be tested and having a list of what is ok and what is not will help (and motivate) me to finish this enhancement. -- 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Oh, sorry, I hadn't spotted that this one had come to life.. I'll try hard to find a moment to have a look at it. -- 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=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Status|NEW |Needs Signoff --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Updating the status to Needs Signoff (to get more love). -- 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=20307 Emma Ternrud <emma.ternrud@ub.gu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emma.ternrud@ub.gu.se -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89538&action=edit Bug 20307: (QA follow-up) Move DB update to perl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This works, and I'm not against it.. but I can't help but feel there must be a simpler approach. I'm going to go away and work on an alternative implementation as a way of getting my head around this code as part of a SO/QA effort. I'll be using some of this as foundation work.. so see it as a golfing effort. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Hello Martin, I do not know how easier it could be, what do you have in mind? :) We already have a way to translate stuffs (only item types so far), we must reuse it. In those patches I am just mimicking what we already have for item types. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Testers do please go ahead and test this however.. The work I'm doing is more as preparation for doing a QA.. I felt working through the thought process involved in thinking about an alternative would be the best way for me to get up to speed with this implementation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hayleymapley@catalyst.net.n | |z --- Comment #21 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Hi, Is there a test plan for this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #22 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It's hard to provide a complete test plan, you will need to show imagination to find bugs :) The idea is to translate authorised values and confirm that they are displayed translated for translated templates. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22610 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22610 [Bug 22610] SIP Payment Types should be moved out of accountype -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86622|0 |1 is obsolete| | --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91645&action=edit Bug 20307: Add DB column localization.interface 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86623|0 |1 is obsolete| | --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91646 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91646&action=edit Bug 20307: DBIC Schema changes 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86624|0 |1 is obsolete| | --- Comment #25 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91647 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91647&action=edit Bug 20307: Update the localization unique key 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86625|0 |1 is obsolete| | --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91648 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91648&action=edit Bug 20307: DBIC Schema changes 2 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86626|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91649 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91649&action=edit Bug 20307: Language overlay for authorised values 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86627|0 |1 is obsolete| | --- Comment #28 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91650&action=edit Bug 20307: Some more fixes 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89538|0 |1 is obsolete| | --- Comment #29 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91651&action=edit Bug 20307: (QA follow-up) Move DB update to perl 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #30 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Rebased on master and signing off here.. I couldn't come up with a cleaner way and don't want to stop this one in it's tracks.. I'm minded to go ahead and push it and deal with consequences over the rest of the cycle as it feels pretty solid, but it would be nice to get a QA eye on it really.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11815 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11815 [Bug 11815] convert BorrowersTitles to an authorised value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91651|0 |1 is obsolete| | --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 91653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91653&action=edit Bug 20307: (QA follow-up) Move DB update to perl 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Needs unit tests ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | Severity|enhancement |new feature Version|unspecified |master CC| |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=20307 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #33 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Jonathan, starting QA here - not only a RM priority, but one of mine as well. I will try to come back at this as long as necessary: 1) QA test tools: There are some about POD, but I think those are valid: FAIL admin/authorised_values.pl FAIL valid Can't locate Carp/Always.pm in @INC (you may need to install the Carp::Always module) (@INC contains: /home/vagrant/kohaclone /home/vagrant/qa-test-tools /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins) FAIL Koha/AuthorisedValues.pm FAIL valid Name "Koha::Schema::Result::AuthorisedValue::LANGUAGE" used only once: possible typo 2) Code review a) C4/Search.pm + $facet_label_value = $av->count ? $av->next->opac_translated_description : ''; # FIXME: Why are we displaying the opac description for staff? I believe you are right here - this is a bug. Could be fixed here or later. Why are we not dealing with this in the templates? b) Koha/AuthorisedValue.pm opac_translated_description and tranlated_description seem to have a lot of duplicated code. Coudl it make sense to merge them with an interface parameter? + my $descriptions = { + lib => $av->translated_description, # Rename with opac_translated_description to avoid confusion + opac_description => $av->opac_translated_description # Same with translated_description + }; Not sure what you meant with your comments here? 3) Testing The admin page currently explodes: Could not compile /home/vagrant/kohaclone/admin/authorised_values.pl: Can't locate Carp/Always.pm in @INC (you may need to install the Carp::Always module) (@INC contains: /home/vagrant/kohaclone /home/vagrant/kohaclone/installer /home/vagrant/kohaclone/lib/installer /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins) at /home/vagrant/kohaclone/admin/authorised_values.pl line 27. BEGIN failed--compilation aborted at /home/vagrant/kohaclone/admin/authorised_values.pl line 27. at /usr/share/perl5/CGI/Compile.pm line 132 As I understand it, this is just the 'base' and then we will have to work through the different AV categories... that about right? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #34 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #33)
Hi Jonathan,
Hi Katrin, thanks for your feedback!
starting QA here - not only a RM priority, but one of mine as well. I will try to come back at this as long as necessary:
1) QA test tools:
There are some about POD, but I think those are valid:
FAIL admin/authorised_values.pl FAIL valid Can't locate Carp/Always.pm in @INC (you may need to install the Carp::Always module) (@INC contains: /home/vagrant/kohaclone /home/vagrant/qa-test-tools /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins)
All issues related with Carp::Always will be resolved by a follow-up patch.
FAIL Koha/AuthorisedValues.pm
FAIL valid Name "Koha::Schema::Result::AuthorisedValue::LANGUAGE" used only once: possible typo
Not valid, it's what we are doing for Itemtype.pm
2) Code review
a) C4/Search.pm + $facet_label_value = $av->count ? $av->next->opac_translated_description : ''; # FIXME: Why are we displaying the opac description for staff?
I believe you are right here - this is a bug. Could be fixed here or later. Why are we not dealing with this in the templates?
Because we are in C4::Search :-/
b) Koha/AuthorisedValue.pm
opac_translated_description and tranlated_description seem to have a lot of duplicated code. Coudl it make sense to merge them with an interface parameter?
IMO it's more readable as it, but could be discussed.
+ my $descriptions = { + lib => $av->translated_description, # Rename with opac_translated_description to avoid confusion + opac_description => $av->opac_translated_description # Same with translated_description + };
Not sure what you meant with your comments here?
They do not make sense, I guess it's a c/p failure from Koha/Template/Plugin/AuthorisedValues.pm
3) Testing
The admin page currently explodes:
Could not compile /home/vagrant/kohaclone/admin/authorised_values.pl: Can't locate Carp/Always.pm in @INC (you may need to install the Carp::Always module) (@INC contains: /home/vagrant/kohaclone /home/vagrant/kohaclone/installer /home/vagrant/kohaclone/lib/installer /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins) at /home/vagrant/kohaclone/admin/authorised_values.pl line 27. BEGIN failed--compilation aborted at /home/vagrant/kohaclone/admin/authorised_values.pl line 27. at /usr/share/perl5/CGI/Compile.pm line 132
Because of missing Carp::Always, but I removed it now.
As I understand it, this is just the 'base' and then we will have to work through the different AV categories... that about right?
Nope, it should work for any AV. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91650|0 |1 is obsolete| | --- Comment #35 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 92192 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92192&action=edit Bug 20307: Some more fixes 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=20307 --- Comment #36 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 92193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92193&action=edit Bug 20307: Remove debug statement Carp::Always -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #37 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Back here... :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #38 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry Jonathan, not getting far again: When I click on a category in authorised values to edit existing values: Template process failed: undef error - The method Koha::AuthorisedValue->translated_descriptions is not covered by tests! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, my fault... forgot a restart_all. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #40 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have problems with adding end editing of translations: 1) Adding translations the same time as adding a new authorised value doesn't work. The first time you try, it seems to save, but doesn't display the values later. And the second time you try, it claims values already exist. I think the easiest way for now would be to not display the translate links when adding, only on editing. 2) The entity shown in the table of translations is "avs" - not sure if this is a code or should be translatable? It might not be understood well in other context. 3) After adding some values and translations to TERM I have switched to DEPARTMENT. Adding an OPAC description translation worked, but now I get an error when I try to add a staff translation: DBD::mysql::st execute failed: Duplicate entry 'avs-Department1-de-DE' for key 'entity_code_lang' [for Statement "INSERT INTO `localization` ( `code`, `entity`, `interface`, `lang`, `translation`) VALUES ( ?, ?, ?, ?, ? )" with ParamValues: 0="Department1", 1="avs", 2="intranet", 3="de-DE", 4="depds"] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. Duplicate ID at /usr/share/perl5/Exception/Class/Base.pm line 88 Exception::Class::Base::throw('Koha::Exceptions::Object::DuplicateID', 'error', 'Duplicate ID', 'duplicate_id', 'entity_code_lang') called at /home/vagrant/kohaclone/Koha/Object.pm line 160 I am not yet sure why this happens, my table looks like this: +-----------------+-----------+-----------+-------------+-------+-------------+ | localization_id | entity | interface | code | lang | translation | +-----------------+-----------+-----------+-------------+-------+-------------+ | 1 | avs | opac | | de-DE | 2019d | | 2 | avs | opac | | en | test | | 3 | avs | intranet | 2019 | de-DE | 2019d | | 5 | avs | intranet | 2019 | en | t | | 6 | itemtypes | NULL | BK | de-DE | Bücher | | 8 | avs | opac | Department1 | de-DE | dep_do | +-----------------+-----------+-----------+-------------+-------+-------------+ 4) Looking at the db structure: We know the code and that it is an authorised value, but we don't know the category! I think this is a mistake. Not always the tanslation for the same code is the same. Think about the numeric ones like Damaged, Lost... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #41 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 92359 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92359&action=edit Bug 20307: Disable the translate links if the object has not been saved yet We do not have the code yet (or can be edited after the translation has been done) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #42 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 92360 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92360&action=edit Bug 20307: Use 'auhorised_values' instead of 'avs' to avoid confusion And so we need to extend the size of localization.entity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #43 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 92361 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92361&action=edit Bug 20307: Code for AVs must be category and value And not only the authorized value, otherwise we could not handle the case where 2 categories have an identical authorized value. FIXME: When editing an AV, if you translate then change the AV's value, we will have inconsistent data, we should add some JS code to disable the translate link if the AV's value is modified. I would suggest to do it on a follow-up bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #44 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #40)
I have problems with adding end editing of translations:
1) Adding translations the same time as adding a new authorised value doesn't work. The first time you try, it seems to save, but doesn't display the values later. And the second time you try, it claims values already exist. I think the easiest way for now would be to not display the translate links when adding, only on editing.
Indeed, I removed the links on adding a new AV or itemtype.
2) The entity shown in the table of translations is "avs" - not sure if this is a code or should be translatable? It might not be understood well in other context.
It's an internal code, I have renamed it anyway.
3) After adding some values and translations to TERM I have switched to DEPARTMENT. Adding an OPAC description translation worked, but now I get an error when I try to add a staff translation:
DBD::mysql::st execute failed: Duplicate entry 'avs-Department1-de-DE' for key 'entity_code_lang' [for Statement "INSERT INTO `localization` ( `code`, `entity`, `interface`, `lang`, `translation`) VALUES ( ?, ?, ?, ?, ? )" with ParamValues: 0="Department1", 1="avs", 2="intranet", 3="de-DE", 4="depds"] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836. Duplicate ID at /usr/share/perl5/Exception/Class/Base.pm line 88 Exception::Class::Base::throw('Koha::Exceptions::Object::DuplicateID', 'error', 'Duplicate ID', 'duplicate_id', 'entity_code_lang') called at /home/vagrant/kohaclone/Koha/Object.pm line 160
I am not yet sure why this happens, my table looks like this:
+-----------------+-----------+-----------+-------------+-------+------------ -+ | localization_id | entity | interface | code | lang | translation | +-----------------+-----------+-----------+-------------+-------+------------ -+ | 1 | avs | opac | | de-DE | 2019d | | 2 | avs | opac | | en | test | | 3 | avs | intranet | 2019 | de-DE | 2019d | | 5 | avs | intranet | 2019 | en | t | | 6 | itemtypes | NULL | BK | de-DE | Bücher | | 8 | avs | opac | Department1 | de-DE | dep_do | +-----------------+-----------+-----------+-------------+-------+------------ -+
4) Looking at the db structure: We know the code and that it is an authorised value, but we don't know the category! I think this is a mistake. Not always the tanslation for the same code is the same. Think about the numeric ones like Damaged, Lost...
Indeed, big design issue. Thanks Katrin! It should be fixed now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #45 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I started with testing the DEPARTMENT again. I added a de-DE translation for the DEPARTMENT. None for en. 1) The language de-DE is not activated, but it starts to show the translation I added for German in the English interface. dep-dei - internal staff description in the table below, shows in the English OPAC GUI. Staff/OPAC might be a template issue, but still wondering why it shows up in the English GUI? +-----------------+-------------------+-----------+------------------------+-------+-------------+ | localization_id | entity | interface | code | lang | translation | +-----------------+-------------------+-----------+------------------------+-------+-------------+ | 1 | itemtypes | NULL | BK | de-DE | Bücher | | 2 | authorised_values | intranet | DEPARTMENT_Department1 | de-DE | Dep-dei | | 5 | authorised_values | opac | DEPARTMENT_Department1 | de-DE | dep-deo | +-----------------+-------------------+-----------+------------------------+-------+-------------+ 2) In staff admin: My translation for OPAC description shows as description in the OPAC summary (the OPAC description column being empty). When I edit the OPAC description, the translation shows there. So maybe just something wrong on the list of values? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #46 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Katrin Fischer from comment #45)
I started with testing the DEPARTMENT again.
I added a de-DE translation for the DEPARTMENT. None for en.
1) The language de-DE is not activated, but it starts to show the translation I added for German in the English interface. dep-dei - internal staff description in the table below, shows in the English OPAC GUI. Staff/OPAC might be a template issue, but still wondering why it shows up in the English GUI?
Where? When editing/adding a course reserve I see the default (untranslated) value.
2) In staff admin: My translation for OPAC description shows as description in the OPAC summary (the OPAC description column being empty). When I edit the OPAC description, the translation shows there. So maybe just something wrong on the list of values?
I do not get that one, sorry. Could you provide a screenshot? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91645|0 |1 is obsolete| | Attachment #91646|0 |1 is obsolete| | Attachment #91647|0 |1 is obsolete| | Attachment #91648|0 |1 is obsolete| | Attachment #91649|0 |1 is obsolete| | Attachment #91653|0 |1 is obsolete| | Attachment #92192|0 |1 is obsolete| | Attachment #92193|0 |1 is obsolete| | Attachment #92359|0 |1 is obsolete| | Attachment #92360|0 |1 is obsolete| | Attachment #92361|0 |1 is obsolete| | --- Comment #47 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94245 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94245&action=edit Bug 20307: Add DB column localization.interface 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=20307 --- Comment #48 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94246 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94246&action=edit Bug 20307: DBIC Schema changes 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=20307 --- Comment #49 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94247 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94247&action=edit Bug 20307: Update the localization unique key 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=20307 --- Comment #50 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94248 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94248&action=edit Bug 20307: DBIC Schema changes 2 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=20307 --- Comment #51 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94249&action=edit Bug 20307: Language overlay for authorised values 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=20307 --- Comment #52 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94250&action=edit Bug 20307: (QA follow-up) Move DB update to perl 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=20307 --- Comment #53 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94251&action=edit Bug 20307: Some more fixes 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=20307 --- Comment #54 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94252 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94252&action=edit Bug 20307: Remove debug statement Carp::Always -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #55 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94253 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94253&action=edit Bug 20307: Disable the translate links if the object has not been saved yet We do not have the code yet (or can be edited after the translation has been done) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #56 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94254 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94254&action=edit Bug 20307: Use 'auhorised_values' instead of 'avs' to avoid confusion And so we need to extend the size of localization.entity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #57 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94255 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94255&action=edit Bug 20307: Code for AVs must be category and value And not only the authorized value, otherwise we could not handle the case where 2 categories have an identical authorized value. FIXME: When editing an AV, if you translate then change the AV's value, we will have inconsistent data, we should add some JS code to disable the translate link if the AV's value is modified. I would suggest to do it on a follow-up bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #58 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 94256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94256&action=edit Bug 20307: Few more fixes due to bad rebase conflict resolutions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=20307 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94245|0 |1 is obsolete| | Attachment #94246|0 |1 is obsolete| | Attachment #94247|0 |1 is obsolete| | Attachment #94248|0 |1 is obsolete| | Attachment #94249|0 |1 is obsolete| | Attachment #94250|0 |1 is obsolete| | Attachment #94251|0 |1 is obsolete| | Attachment #94252|0 |1 is obsolete| | Attachment #94253|0 |1 is obsolete| | Attachment #94254|0 |1 is obsolete| | Attachment #94255|0 |1 is obsolete| | Attachment #94256|0 |1 is obsolete| | --- Comment #59 from Michal Denar <black23@gmail.com> --- Created attachment 94700 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94700&action=edit Bug 20307: Add DB column localization.interface Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #60 from Michal Denar <black23@gmail.com> --- Created attachment 94701 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94701&action=edit Bug 20307: DBIC Schema changes Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #61 from Michal Denar <black23@gmail.com> --- Created attachment 94702 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94702&action=edit Bug 20307: Update the localization unique key Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #62 from Michal Denar <black23@gmail.com> --- Created attachment 94703 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94703&action=edit Bug 20307: DBIC Schema changes 2 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #63 from Michal Denar <black23@gmail.com> --- Created attachment 94704 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94704&action=edit Bug 20307: Language overlay for authorised values Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #64 from Michal Denar <black23@gmail.com> --- Created attachment 94705 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94705&action=edit Bug 20307: (QA follow-up) Move DB update to perl Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #65 from Michal Denar <black23@gmail.com> --- Created attachment 94706 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94706&action=edit Bug 20307: Some more fixes Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #66 from Michal Denar <black23@gmail.com> --- Created attachment 94707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94707&action=edit Bug 20307: Remove debug statement Carp::Always Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #67 from Michal Denar <black23@gmail.com> --- Created attachment 94708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94708&action=edit Bug 20307: Disable the translate links if the object has not been saved yet We do not have the code yet (or can be edited after the translation has been done) Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #68 from Michal Denar <black23@gmail.com> --- Created attachment 94709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94709&action=edit Bug 20307: Use 'auhorised_values' instead of 'avs' to avoid confusion And so we need to extend the size of localization.entity Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #69 from Michal Denar <black23@gmail.com> --- Created attachment 94710 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94710&action=edit Bug 20307: Code for AVs must be category and value And not only the authorized value, otherwise we could not handle the case where 2 categories have an identical authorized value. FIXME: When editing an AV, if you translate then change the AV's value, we will have inconsistent data, we should add some JS code to disable the translate link if the AV's value is modified. I would suggest to do it on a follow-up bug. Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #70 from Michal Denar <black23@gmail.com> --- Created attachment 94711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94711&action=edit Bug 20307: Few more fixes due to bad rebase conflict resolutions Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #71 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- QA: This is not a priority for 19.11, it's too late. But please keep it in mind for early 19.12 ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #72 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #71)
QA: This is not a priority for 19.11, it's too late. But please keep it in mind for early 19.12 ;)
+1! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_05_target -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #73 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I've added a new keyword for things we should target early next cycle.. rel_20_05_target and christened it by adding it to this bug :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #74 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This is looking pretty solid to me at the moment.. would love to see a QA stamp on it soon if anyone has the time to take a look :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #75 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #74)
This is looking pretty solid to me at the moment.. would love to see a QA stamp on it soon if anyone has the time to take a look :)
Am I allowed to remove the use of C4::Language in Koha::*? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #76 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #75)
(In reply to Martin Renvoize from comment #74)
This is looking pretty solid to me at the moment.. would love to see a QA stamp on it soon if anyone has the time to take a look :)
Am I allowed to remove the use of C4::Language in Koha::*?
I agree this should be pushed. And until we have a guideline for this, we can deal with fixing it on a separate bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #77 from Kyle M Hall <kyle@bywatersolutions.com> --- Could you please add unit tests for the new subs? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #78 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97074 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97074&action=edit Bug 20307: Fix existing tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #79 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97075 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97075&action=edit Bug 20307: Fix logic in search_with_localization and add tests Maybe we will want to replace this method at some point. There was something wrong in the logic. I did not manage to implement what I really needed here. The real SQL query we need is: SELECT SELECT *, COALESCE( `localization_intranet`.`translation`, `me`.`lib` ) AS `translated_description`, COALESCE( `localization_opac`.`translation`, `me`.`lib` ) AS `opac_translated_description` FROM `authorised_values` `me` LEFT JOIN (SELECT localization_id, code, lang, translation FROM localization WHERE entity='authorised_values' AND interface='intranet') `localization_intranet` ON ( `localization_intranet`.`lang` = 'es-ES' AND CONCAT(me.category, '_', `me`.`authorised_value`) = `localization_intranet`.`code` ) LEFT JOIN (SELECT localization_id, code, lang, translation FROM localization WHERE entity='authorised_values' AND interface='opac') `localization_opac` ON ( `localization_opac`.`lang` = 'es-ES' AND CONCAT(me.category, '_', `me`.`authorised_value`) = `localization_opac`.`code` ) WHERE me.category="?" ORDER BY `translated_description`; So 2 left join on the same table, with different on clause (to deal with the 2 interfaces) That would give us something like: | id | category | authorised_value | lib | lib_opac | imageurl | translated_description | opac_translated_description | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #80 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I would like another signoff here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94700|0 |1 is obsolete| | --- Comment #81 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98863&action=edit Bug 20307: Add DB column localization.interface Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94701|0 |1 is obsolete| | --- Comment #82 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98864 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98864&action=edit Bug 20307: DBIC Schema changes Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94702|0 |1 is obsolete| | --- Comment #83 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98865&action=edit Bug 20307: Update the localization unique key Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94703|0 |1 is obsolete| | --- Comment #84 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98866&action=edit Bug 20307: DBIC Schema changes 2 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94704|0 |1 is obsolete| | --- Comment #85 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98867&action=edit Bug 20307: Language overlay for authorised values Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94705|0 |1 is obsolete| | --- Comment #86 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98868 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98868&action=edit Bug 20307: (QA follow-up) Move DB update to perl Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94706|0 |1 is obsolete| | --- Comment #87 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98869 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98869&action=edit Bug 20307: Some more fixes Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94707|0 |1 is obsolete| | --- Comment #88 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98870&action=edit Bug 20307: Remove debug statement Carp::Always Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94708|0 |1 is obsolete| | --- Comment #89 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98871 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98871&action=edit Bug 20307: Disable the translate links if the object has not been saved yet We do not have the code yet (or can be edited after the translation has been done) Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94709|0 |1 is obsolete| | --- Comment #90 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98872 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98872&action=edit Bug 20307: Use 'auhorised_values' instead of 'avs' to avoid confusion And so we need to extend the size of localization.entity Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94710|0 |1 is obsolete| | --- Comment #91 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98873 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98873&action=edit Bug 20307: Code for AVs must be category and value And not only the authorized value, otherwise we could not handle the case where 2 categories have an identical authorized value. FIXME: When editing an AV, if you translate then change the AV's value, we will have inconsistent data, we should add some JS code to disable the translate link if the AV's value is modified. I would suggest to do it on a follow-up bug. Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94711|0 |1 is obsolete| | --- Comment #92 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98874&action=edit Bug 20307: Few more fixes due to bad rebase conflict resolutions Signed-off-by: Michal Denar <black23@gmail.com> 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97074|0 |1 is obsolete| | --- Comment #93 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98875 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98875&action=edit Bug 20307: Fix existing tests 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97075|0 |1 is obsolete| | --- Comment #94 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 98876 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98876&action=edit Bug 20307: Fix logic in search_with_localization and add tests Maybe we will want to replace this method at some point. There was something wrong in the logic. I did not manage to implement what I really needed here. The real SQL query we need is: SELECT SELECT *, COALESCE( `localization_intranet`.`translation`, `me`.`lib` ) AS `translated_description`, COALESCE( `localization_opac`.`translation`, `me`.`lib` ) AS `opac_translated_description` FROM `authorised_values` `me` LEFT JOIN (SELECT localization_id, code, lang, translation FROM localization WHERE entity='authorised_values' AND interface='intranet') `localization_intranet` ON ( `localization_intranet`.`lang` = 'es-ES' AND CONCAT(me.category, '_', `me`.`authorised_value`) = `localization_intranet`.`code` ) LEFT JOIN (SELECT localization_id, code, lang, translation FROM localization WHERE entity='authorised_values' AND interface='opac') `localization_opac` ON ( `localization_opac`.`lang` = 'es-ES' AND CONCAT(me.category, '_', `me`.`authorised_value`) = `localization_opac`.`code` ) WHERE me.category="?" ORDER BY `translated_description`; So 2 left join on the same table, with different on clause (to deal with the 2 interfaces) That would give us something like: | id | category | authorised_value | lib | lib_opac | imageurl | translated_description | opac_translated_description | 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #95 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Re-tested and all seems to be working well.. Signing off... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|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=20307 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Status|Signed Off |Failed QA --- Comment #96 from Julian Maurice <julian.maurice@biblibre.com> --- A few complaints from QA script: FAIL Koha/Schema/Result/AuthorisedValueLocalization.pm FAIL pod coverage POD coverage was greater before, try perl -MPod::Coverage=PackageName -e666 FAIL installer/data/mysql/atomicupdate/bug_20307.sql FAIL git manipulation The file has been added and deleted in the same patchset So, maybe patches should be squashed. Also: 1) The value stored in localization.code is a concatenation of the AV category code, a '_', and the AV code. Which means that if we have a category A with a value B_C, and a category A_B with a value C, they will share their translations. 2) It feels weird to have the ability to translate for all languages. I mean, the original description is already written in one of those languages, right ? So if I add a translation for each language, the original description will never be used. Not really a problem though, as it allows to have the original description in the language we want, and we can just not add a translation for that language. 3) There is some places where translated descriptions are not used (the items table in cataloguing/additem.pl for instance) but that can be added later (not blocking) 4) The new column 'interface' will be only useful for authorized value, right ? Why not append the interface to the entity name instead of adding a new column ("authorised_values:opac" for instance) ? Actually, the AV category code could be added there too to avoid (1) ("authorised_values:opac:CCODE"). 5) Please add a test plan :) Even if it's not exhaustive it really helps to have one. 6) Koha::AuthorisedValues::search_with_localization does something really strange : it sets package variables $Koha::Schema::Result::AuthorisedValue::LANGUAGE and $Koha::Schema::Result::AuthorisedValue::INTERFACE. I understand that they are then used in the has_many subroutine for 'localization', and that the same thing is done for itemtypes, but that feels wrong to use global variables like that. Can't we use a "normal" join in search_with_localization ? And why has_many ? An authorised value should have only 1 (or 0) translation, given a particular language and interface. Failing QA for (1) that should be fixed, but I really would like to know your opinions on the other points -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #97 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Julian Maurice from comment #96) Thanks Julian!
A few complaints from QA script:
FAIL Koha/Schema/Result/AuthorisedValueLocalization.pm FAIL pod coverage POD coverage was greater before, try perl -MPod::Coverage=PackageName -e666
=> False positive, there is no sub there.
FAIL installer/data/mysql/atomicupdate/bug_20307.sql FAIL git manipulation The file has been added and deleted in the same patchset
So, maybe patches should be squashed.
Different authors.
Also: 1) The value stored in localization.code is a concatenation of the AV category code, a '_', and the AV code. Which means that if we have a category A with a value B_C, and a category A_B with a value C, they will share their translations.
I can pick something else than '_', but the problem will exist for any characters. % or $ would fit better?
2) It feels weird to have the ability to translate for all languages. I mean, the original description is already written in one of those languages, right ? So if I add a translation for each language, the original description will never be used. Not really a problem though, as it allows to have the original description in the language we want, and we can just not add a translation for that language.
This development basically mimic what is done for item types. So if there is a change to do in the way they are translated, that should be done before or after this development to affect both screen. I do not think it's a problem anyway. The "default" (the one in the authorised_value table) is used when there is no translation available.
3) There is some places where translated descriptions are not used (the items table in cataloguing/additem.pl for instance) but that can be added later (not blocking)
I can commit on fixing any bugs we are going to find after those patches are pushed. I will take a look at additem.
4) The new column 'interface' will be only useful for authorized value, right ? Why not append the interface to the entity name instead of adding a new column ("authorised_values:opac" for instance) ? Actually, the AV category code could be added there too to avoid (1) ("authorised_values:opac:CCODE").
I think it makes sense to have the interface. The idea is to provide an interface in the admin module to have a global view of the different entities that are translated. So we could imagine a filter to display only opac/staff. Also it could make sense to have the interface for some of the system preferences. As the feature is here, I prefer to keep it and see how it could be useful that add work to drop it then re-add it later. Do not you agree?
5) Please add a test plan :) Even if it's not exhaustive it really helps to have one.
As I said already, a test plan is hard to provide. One could be: - Pick an authorised value that is displayed in lot of places (LOST/DAMAGED for instance) - Provide a translation for some of the values - Go to different pages where the AV is displayed (opac and staff) and make sure the values you translated is the one that is displayed.
6) Koha::AuthorisedValues::search_with_localization does something really strange : it sets package variables $Koha::Schema::Result::AuthorisedValue::LANGUAGE and $Koha::Schema::Result::AuthorisedValue::INTERFACE. I understand that they are then used in the has_many subroutine for 'localization', and that the same thing is done for itemtypes, but that feels wrong to use global variables like that. Can't we use a "normal" join in search_with_localization ? And why has_many ? An authorised value should have only 1 (or 0) translation, given a particular language and interface.
They are used actually in the view (Koha/Schema/Result/AuthorisedValueLocalization.pm). Take a look at this commit where I tried to explain it commit 80018625cf03ccd00957035f99065ed5793b80e3 Bug 17835: Create a ItemtypeLocalization view I spent quite a lot of time to find a correct solution when I implemented bug 17835. Maybe there is a better way to do it, but here I am following an existing pattern, that works so far. I think the description also answer why 1-N (has_many): 1 entry in authorised_value has several entries in the view. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #98 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101070&action=edit Bug 20307: Replace separator with # To avoid colision we replace the separator with something that is supposed to be less used than underscore The problematic case was explaing by Julian on comment 96: """ The value stored in localization.code is a concatenation of the AV category code, a '_', and the AV code. Which means that if we have a category A with a value B_C, and a category A_B with a value C, they will share their translations. """ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #99 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Jonathan Druart from comment #97)
I can pick something else than '_', but the problem will exist for any characters.
That's why I suggested appending the AV code to the entity name, instead of prepending it to the AV value. Have you considered this ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #100 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 101450 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101450&action=edit Bug 20307: Move av.category to loc.entity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #101 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Julian Maurice from comment #99)
(In reply to Jonathan Druart from comment #97)
I can pick something else than '_', but the problem will exist for any characters.
That's why I suggested appending the AV code to the entity name, instead of prepending it to the AV value. Have you considered this ?
I failed to make it work, see last patch. Maybe there is something obvious I missed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #101450|Bug 20307: Move av.category |[DO NOT APPLY/PUSH] Bug description|to loc.entity |20307: Move av.category to | |loc.entity -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #102 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #98)
Created attachment 101070 [details] [review] Bug 20307: Replace separator with #
To avoid colision we replace the separator with something that is supposed to be less used than underscore
The problematic case was explaing by Julian on comment 96: """ The value stored in localization.code is a concatenation of the AV category code, a '_', and the AV code. Which means that if we have a category A with a value B_C, and a category A_B with a value C, they will share their translations. """
It sounds unlikely as our categories should be unique enough, aren't they? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #103 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Katrin Fischer from comment #102)
It sounds unlikely as our categories should be unique enough, aren't they?
But users can create their own categories. I agree that it is unlikely, but it is still possible. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24975 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #104 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Marked as blocked by bug 24975 that offers a more elegant way to localize our DB strings. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_05_candidate |rel_20_11_target -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26403 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26403 [Bug 26403] "Issue refund" is not fully translatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |26418 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26418 [Bug 26418] The "description" for REFUND accountlines is not translatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|26418 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26418 [Bug 26418] The "description" for REFUND accountlines is not translatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 lauren_denny@sil.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lauren_denny@sil.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_11_target, | |RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #105 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #104)
Marked as blocked by bug 24975 that offers a more elegant way to localize our DB strings.
Too bad that this one is Blocked and the other one is Does not apply. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #106 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #105)
(In reply to Jonathan Druart from comment #104)
Marked as blocked by bug 24975 that offers a more elegant way to localize our DB strings.
Too bad that this one is Blocked and the other one is Does not apply.
Can you help please? Jonathan is absent for a couple months. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24977 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #107 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Ping people -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #108 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Give your opinion on the 2 implementations, that's the only way to make things move forward. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|26403 | See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26403 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26403 [Bug 26403] "Issue refund" is not fully translatable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35200 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 --- Comment #109 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #108)
Give your opinion on the 2 implementations, that's the only way to make things move forward.
Is this something we could maybe gain more attention for by putting it on the roadmap or on the agenda for a meeting? I really want it to happen, but not sure if I could give helpful feedback on implementation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20307 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart+koha@gmail. |koha-bugs@lists.koha-commun |com |ity.org --- Comment #110 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- See bug 24977 comment 9, it was the last movement for this. I am out however. -- 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=20307 --- Comment #111 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #110)
See bug 24977 comment 9, it was the last movement for this.
I am out however.
Does it mean we should follow this approach? Would this benefit from putting some heads together at the hackfest? -- 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=20307 --- Comment #112 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Katrin Fischer from comment #111)
(In reply to Jonathan Druart from comment #110)
See bug 24977 comment 9, it was the last movement for this.
I am out however.
Does it mean we should follow this approach?
It means what it says. There are FIXMEs and bad perf impact possible. It needed feedback and help. -- 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=20307 Martin Renvoize <martin.renvoize@ptfs-europe.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=20307 Koha collecto <koha@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@collecto.ca -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org