Four years after bug 29245. Triggered by work on bug 38630. Another try ;)
Created attachment 176621 [details] [review] Bug 38903: Fix theme in some getTranslatedLanguages calls Combining opac with pref template is wrong. This pref should actually be renamed to something like intranetTheme(s) or so. Replacing the obsolete prog theme in Languages.t by undef. This achieves the same: getting all themes for that interface. Test plan: Add some languages for opac and intranet. Do not enable exactly the same set. Enable TranslateNotices. Verify that you have all OPAC languages on memberentry and opac-messaging. And all languages on additional contents. Run t/db_dependent/Languages.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested with: OPAC languages: en, nl-NL, de-DE Staff languages: en, de-DE, fr-FR
Trivial adding self SO. You might view them as QA follow-ups for bug 38630 too. Julian: Could you QA here ?
I've tried different combinations of sysprefs, and even tried the exact same syspref values as in comment 1. All installed languages (even those that are disabled in both interfaces) show up in language selectors on memberentry and opac-messaging. Applying the patch does not change anything for me. The changes make sense to me but I cannot validate them because of that.
(In reply to Julian Maurice from comment #3) > I've tried different combinations of sysprefs, and even tried the exact same > syspref values as in comment 1. All installed languages (even those that are > disabled in both interfaces) show up in language selectors on memberentry > and opac-messaging. > Applying the patch does not change anything for me. > The changes make sense to me but I cannot validate them because of that. Strange. Would restart / flushing cache make a difference?
I restarted koha & memcached each time I switched branch (which I did a few times) so cache was not the problem
After looking at the code, I think this patch would make a difference only if the language directories in koha-tmpl/intranet-tmpl/prog/ are different from the language directories in koha-tmpl/opac-tmpl/bootstrap/ But how could we end up in this situation as the `translate install` command always install languages in both locations ?
(In reply to Julian Maurice from comment #6) > After looking at the code, I think this patch would make a difference only > if the language directories in koha-tmpl/intranet-tmpl/prog/ are different > from the language directories in koha-tmpl/opac-tmpl/bootstrap/ > But how could we end up in this situation as the `translate install` command > always install languages in both locations ? Yes thats an important observation. Look at my test description: OPAC languages: en, nl-NL, de-DE Staff languages: en, de-DE, fr-FR Note that we locally do not translate staff. So after e.g. installing nl-NL I am removing those folders on intranet-tmpl.
(In reply to Marcel de Rooy from comment #7) > Yes thats an important observation. Look at my test description: > OPAC languages: en, nl-NL, de-DE > Staff languages: en, de-DE, fr-FR > > Note that we locally do not translate staff. So after e.g. installing nl-NL > I am removing those folders on intranet-tmpl. I thought those were values of systempreferences OPACLanguages and StaffInterfaceLanguages... >_<