[Bug 29245] New: getTranslatedLanguages needs attention
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Bug ID: 29245 Summary: getTranslatedLanguages needs attention Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Adjust POD Parameter which OPAC calls with preference (which is prog for staff) Maybe more? -- 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=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24223 -- 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=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29246 -- 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=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | Status|NEW |ASSIGNED -- 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=29245 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126312 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126312&action=edit Bug 29245: Fix parameters of getTranslatedLanguages Removed which parameter. Unused. Added fallbacks for interface and theme. Adjusted POD. No test plan. If qa tools doesnt complain, you are fine. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126313 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126313&action=edit Bug 29245: Prepare Languages.t for changes Add license. Reorganize in subtests. Cosmetic changes: whitespace. Add rollback. Test plan: Run the test again. Confirm that it still passes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126314&action=edit Bug 29245: Extend tests for getTranslatedLanguages Test plan: Run test again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- WIP: Need to check calls in codebase now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126314|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126315&action=edit Bug 29245: Extend tests for getTranslatedLanguages Test plan: Run test again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126315|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126322 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126322&action=edit Bug 29245: Extend tests for getTranslatedLanguages Test plan: Run test again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29251 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29251 [Bug 29251] Local use sysprefs: Language list does not work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126312|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126345&action=edit Bug 29245: Fix parameters of getTranslatedLanguages Removed which parameter. Unused. Added fallbacks for interface and theme. Adjusted POD. No test plan. If qa tools doesnt complain, you are fine. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126313|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126346&action=edit Bug 29245: Prepare Languages.t for changes Add license. Reorganize in subtests. Cosmetic changes: whitespace. Add rollback. Test plan: Run the test again. Confirm that it still passes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126322|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126347 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126347&action=edit Bug 29245: Extend tests for getTranslatedLanguages Test plan: Run test again. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 126348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126348&action=edit Bug 29245: Fix calls of getTranslatedLanguages admin/preferences: $current_languages was ignored already. admin/systempreferences: see preferences; note that bug 29251 should fix already broken behavior. tools/letter: combining opac and prog was wrong, but caught by the else branch in get_opac_languages. members/memberentry: same as letter. tools/additional-contents: actually no change, but better to write in full. opac/opac-messaging.pl: same as letter, caught by else. admin/itemtypes: should be same as admin/localization. Test plan: Have a few opac and staff languages. Check on some of the above forms the languages display. Keep in mind that some staff scripts select translated languages for the OPAC. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|getTranslatedLanguages |Fix the parameters of |needs attention |getTranslatedLanguages -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Trivial small fix, waiting for 2 months ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Tbh this doesn't read like a trivial fix from the number of code changes. I also think we shouldn't hardcode templates, as this breaks the templating system: if ( C4::Context->preference('TranslateNotices') ) { my $translated_languages = - C4::Languages::getTranslatedLanguages( 'opac', - C4::Context->preference('template') ); + C4::Languages::getTranslatedLanguages( 'opac', 'bootstrap' ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think one problem is the lack of a test plan apart from running the tests, which limits the people who can test, and that there is no easy to understand description of the issue this is trying to fix. - This makes it harder to test, especially for our non-programmer testers. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #12)
Tbh this doesn't read like a trivial fix from the number of code changes. I also think we shouldn't hardcode templates, as this breaks the templating system:
if ( C4::Context->preference('TranslateNotices') ) { my $translated_languages = - C4::Languages::getTranslatedLanguages( 'opac', - C4::Context->preference('template') ); + C4::Languages::getTranslatedLanguages( 'opac', 'bootstrap' );
Try a git grep ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #13)
I think one problem is the lack of a test plan apart from running the tests, which limits the people who can test, and that there is no easy to understand description of the issue this is trying to fix. - This makes it harder to test, especially for our non-programmer testers.
You're probably right :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I count myself as a non-progammer tester as well - I think you mean that we already break the rule for not hardcoding the template, but I think those are bugs we should fix then. Hea shows that having your own OPAC template is not as rare as one would think. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #16)
I count myself as a non-progammer tester as well - I think you mean that we already break the rule for not hardcoding the template, but I think those are bugs we should fix then. Hea shows that having your own OPAC template is not as rare as one would think.
This is an architectural patch, not the popular kind, yes. And insisting that it should also fix such occurrences makes it even harder. Since the patch is about fixing parameters, I would be tempted to say that it is outside the scope too ;) Having a look now how to get this on track again. But if it takes too much time, I will abandon it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29040 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29040 [Bug 29040] Uninitialized value warning in Languages.pm -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|m.de.rooy@rijksmuseum.nl |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|NEW |RESOLVED --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This just takes too much time. Without the prospect of getting someone to sign off. Closing the report. -- 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=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|29251 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29251 [Bug 29251] Local use sysprefs: Language list does not work -- 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=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|29040 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29040 [Bug 29040] Uninitialized value warning in Languages.pm -- 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=29245 --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #17)
(In reply to Katrin Fischer from comment #16)
I count myself as a non-progammer tester as well - I think you mean that we already break the rule for not hardcoding the template, but I think those are bugs we should fix then. Hea shows that having your own OPAC template is not as rare as one would think.
This is an architectural patch, not the popular kind, yes. And insisting that it should also fix such occurrences makes it even harder. Since the patch is about fixing parameters, I would be tempted to say that it is outside the scope too ;)
Having a look now how to get this on track again. But if it takes too much time, I will abandon it.
I didn't mean fixing them on this bug - just that I would consider it a bug and that we should not add more hardcoded 'bootstraps'. -- 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=29245 --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #19)
(In reply to Marcel de Rooy from comment #17)
(In reply to Katrin Fischer from comment #16)
I count myself as a non-progammer tester as well - I think you mean that we already break the rule for not hardcoding the template, but I think those are bugs we should fix then. Hea shows that having your own OPAC template is not as rare as one would think.
This is an architectural patch, not the popular kind, yes. And insisting that it should also fix such occurrences makes it even harder. Since the patch is about fixing parameters, I would be tempted to say that it is outside the scope too ;)
Having a look now how to get this on track again. But if it takes too much time, I will abandon it.
I didn't mean fixing them on this bug - just that I would consider it a bug and that we should not add more hardcoded 'bootstraps'.
No problem. I understand your point and was willing to revert a few occurrences too. But working further, I decided to refactor a little bit more. Add more tests and at some point my time was up ;) -- 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=29245 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38630 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org