[Bug 12705] New: News not possible for one sublanguage if two sublanguages are installed
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Bug ID: 12705 Summary: News not possible for one sublanguage if two sublanguages are installed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org To reproduce: Install and enable (in systempreferences:I18N/L10N language) e.g. Português Português (pt-PT) Português (pt-BR) Deutsch Deutsch (de-CH) Deutsch (de-DE) Go to cgi-bin/koha/tools/koha-news.pl and try to create news. The dropdown 'Display location' contains: - All - Librarian interface - Slip - OPAC (pt-BR) - OPAC (en) - OPAC (de-DE) OPAC (de-CH) and OPAC (pt-PT) are missing. It is not possible to create news for them (even if you disable e.g. de-DE or pt-BR) in system preferences). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=5968 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 30518 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30518&action=edit Bug 12705 - News not possible for one sublanguage if two sublanguages are installed To reproduce problem: Install and enable (in systempreferences:I18N/L10N language) e.g. Português Português (pt-PT) Português (pt-BR) Deutsch Deutsch (de-CH) Deutsch (de-DE) Go to cgi-bin/koha/tools/koha-news.pl and try to create news. The dropdown 'Display location' contains: - All - Librarian interface - Slip - OPAC (pt-BR) - OPAC (en) - OPAC (de-DE) OPAC (de-CH) and OPAC (pt-PT) are missing. It is not possible to create news for them (even if you disable e.g. de-DE or pt-BR) in system preferences). This patch reduces the possible languages to the main language. In the example above you will get: - All - Librarian interface - Slip - OPAC (pt) - OPAC (en) - OPAC (de) The OPAC then desiplays the news for all variants of a language. E.g. news for OPAC (de) is displayed for de-DE and de-ch News that already existed before applying the patch e.g. for de-DE will display for all de variants (de-DE and de-CH). To test: - Go to cgi-bin/koha/tools/koha-news.pl - Dropdown for location will display only main languages for OPAC (e.g. de instead of de-DE) - Create news for a language - Got to main page of OPAC, choose language variant - News should display - Choose other language variant for same language - News should display as well. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P4 Status|NEW |Needs Signoff Patch complexity|--- |Small patch Assignee|gmcharlt@gmail.com |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Marc, your patch works and has no errors, but I wonder if someone could see this as a regression because you can't put a news on a specific variant of a language. You can't right now, but the problem is the strange structure returned by getTranslatedLanguages() If you change this foreach my $language ( @$tlangs ) { push @lang_list, { language => $language->{'rfc4646_subtag'}, selected => ( $new_detail->{lang} eq $language->{'rfc4646_subtag'} ? 1 : 0 ), }; } with this foreach my $language ( @$tlangs ) { foreach my $sublanguage ( @{$language->{'sublanguages_loop'}} ) { push @lang_list, { language => $sublanguage->{'rfc4646_subtag'}, selected => ( $new_detail->{lang} eq $sublanguage->{'rfc4646_subtag'} ? 1 : 0 ), }; } } } then the problem is solved. Perhaps a new feature could be a multiple selection on target languages or interfaces for news display location. Another feature could show here only 'active' languages, i.e. only push if ( $sublanguage->{'enabled'} ) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 --- Comment #3 from Marc Véron <veron@veron.ch> --- Bernardo, thanks for the comment. I considered to change getTranslatedLanguages() but: a) I could not really find out what to change... b) I was afraid that changes could have side effects because the function is used at several places Anyway, I think it is better to keep the behaviour as it was originally intended (News per language variants). At the moment the most important thing for me is to fix the bug, because I can not display de-CH news at the moment. Regarding the new features: ---- Perhaps a new feature could be a multiple selection on target languages or interfaces for news display location. MV: That would be nice for a follow up ---- Another feature could show here only 'active' languages, i.e. only push if ( $sublanguage->{'enabled'} ) MV: As far as I remember there was a discussion somewhere about this idea with following scenario: It could be possible that a library plans to introduce an additional language. They prepare some news in this language, but do not yet enable it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Marc Véron from comment #3)
Regarding the new features: ---- Perhaps a new feature could be a multiple selection on target languages or interfaces for news display location. MV: That would be nice for a follow up
Yeah, will think about that
Another feature could show here only 'active' languages, i.e. only push if ( $sublanguage->{'enabled'} ) MV: As far as I remember there was a discussion somewhere about this idea with following scenario: It could be possible that a library plans to introduce an additional language. They prepare some news in this language, but do not yet enable it.
Right, no changes there then :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30518|0 |1 is obsolete| | --- Comment #5 from Marc Véron <veron@veron.ch> --- Comment on attachment 30518 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30518 Bug 12705 - News not possible for one sublanguage if two sublanguages are installed New patch follows. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 --- Comment #6 from Marc Véron <veron@veron.ch> --- Created attachment 30646 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30646&action=edit Bug 12705 - News not possible for one sublanguage if two sublanguages are installed To test: - Install two language variants (e.g. de-DE and de-CH) - Create OPAC news for each of them - Verify that they are displayed in OPAC as appropriate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7541 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=5969 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30646|0 |1 is obsolete| | --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 30648 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30648&action=edit [SIGNED-OFF] Bug 12705 - News not possible for one sublanguage if two sublanguages are installed To test: - Install two language variants (e.g. de-DE and de-CH) - Create OPAC news for each of them - Verify that they are displayed in OPAC as appropriate Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works Ok, no koha-qa errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- *** Bug 7541 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30648|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30898 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30898&action=edit [PASSED QA] Bug 12705 - News not possible for one sublanguage if two sublanguages are installed To test: - Install two language variants (e.g. de-DE and de-CH) - Create OPAC news for each of them - Verify that they are displayed in OPAC as appropriate Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works Ok, no koha-qa errors Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works ok, all installed languages now show up in the pull downs and display for the selected language in the OPAC. Passes tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_candidate CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 --- Comment #11 from Mason James <mtj@kohaaloha.com> --- (In reply to Tomás Cohen Arazi from comment #10)
Patch pushed to master.
Thanks Marc!
Pushed to 3.16.x, patch will be in 3.16.8 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12705 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_3_16_candidate |rel_3_14_candidate -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org