[Bug 11393] New: Language menu not show up as name for Thai (th-THA was shown)
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Bug ID: 11393 Summary: Language menu not show up as name for Thai (th-THA was shown) Change sponsored?: --- Product: Koha Version: 3.12 Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: pongtawat.c@gmail.com QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr When Thai translation is installed and enabled. The language menu at the bottom of OPAC screen shown up as language code "th-THA". Also, the preference "language" and "opaclanguage" also show up as "(th-THA)". However, if I change the Thai template folder from "opac-tmpl/prog/th-THA" to "opac-tmpl/prog/th", the language menu, as well as the preferences, will display entry for Thai as "ภาษาไทย" which is correct. So, I don't know if there is some value missing (or incorrect) in database for "th-THA" or that the translation template should be "th". -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11973 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 --- Comment #1 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 26646 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26646&action=edit Bug 11393 - Language menu not show up as name for Thai (th-THA was shown) The problem is with the name of PO files Currently Koha expect, among other variants, that PO filenames began with (using as example *-pref.po): {lang}-pref.po {lang}-{region}-pref.po {lang}-{scrip}-pref.po {lang}-{script}-{region}-pref.po and expect 2 chars for lang and region, and 4 for script So the problem with Thai translation files are that it's names do not match that convention. This patch only rename Thai files as th-THA-* to th-TH-*. In that way language description is right. translate script use that chars to make dirs, and use dirs to find description. To test: 1) Go to I18N/L10N sysprefs 2) Install th-THA language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-THA) 3) Reload page, wrong description 4) Apply patch 5) Install th-TH language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-TH) 6) Reload page, right description 7) If you want do "mkdir koha-tmpl/intranet-tmpl/prog/th-Thai", reload, also right description To the reporter of this Bug: the rename of the folder is a good workaround, when this patch is pushed to stable I'll rename Thai files -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |bgkriegel@gmail.com Patch complexity|--- |Trivial patch Version|3.12 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- git checkout -b bug_11393 origin/master cd misc/translator perl translate install th-THA (ignoring lots of warnings/errors) staff client -> home -> koha administration -> global system preferences -> I18N/L10N check both th-THA's save reload the page lang menu appears on bottom. apply the patch reload the page -- still th-THA rm -rf ../../koha-tmpl/intranet-tmpl/prog/th-THA/ rm -rf ../../koha-tmpl/opac-tmpl/bootstrap/th-THA/ rm -rf ../../koha-tmpl/opac-tmpl/ccsr/th-THA/ rm -rf ../../koha-tmpl/opac-tmpl/prog/th-THA/ perl translate install th-TH (ignoring lots of warnings/errors) reload the page -- now th-TH and correct description. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Hi Marc, If you translate first with th-THA files it fails, because those filenames do not match the lang If you raname first and then translate all is right, I think :) What do you find wrong? Regards, Bernardo -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Bernardo Gonzalez Kriegel from comment #3)
If you translate first with th-THA files it fails, because those filenames do not match the lang.
yes.
If you [rename] first and then translate all is right, I think :)
yes.
What do you find wrong?
I was it expecting it to fix my mistaken installation of th-THA. Is that what it should do? Some code in updatedatabase.pl (though probably the wrong place for it) could easily check for and rename the directories if they exist. After all, that is what the original reporter said was the solution for the scenario. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to M. Tompsett from comment #4)
I was it expecting it to fix my mistaken installation of th-THA. Is that what it should do?
Some code in updatedatabase.pl (though probably the wrong place for it) could easily check for and rename the directories if they exist.
After all, that is what the original reporter said was the solution for the scenario.
Well, I know that this patch is pointless as a solution to the reporter problem. The real solution is not only change names or update database for current installs, we need to rename some dirs on current installation and that is beyond of what we can do (or I are willing to do) I will rename all th-THA* -> th-TH files on translation server, that will be included on next release or update of master (perhaps if Bug 7939 pass), and this becomes moot. The intent of this patch was to update th names on master, to show that in that way it solves the problem. Normal releases do not change or update translation files on master. If you think that is not enough, I'll put it to sleep. Thank you for testing :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26646|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 26688 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26688&action=edit [SIGNED OFF] Bug 11393 - Language menu not show up as name for Thai (th-THA was shown) The problem is with the name of PO files Currently Koha expect, among other variants, that PO filenames began with (using as example *-pref.po): {lang}-pref.po {lang}-{region}-pref.po {lang}-{scrip}-pref.po {lang}-{script}-{region}-pref.po and expect 2 chars for lang and region, and 4 for script So the problem with Thai translation files are that it's names do not match that convention. This patch only rename Thai files as th-THA-* to th-TH-*. In that way language description is right. translate script use that chars to make dirs, and use dirs to find description. To test: 1) Go to I18N/L10N sysprefs 2) Install th-THA language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-THA) 3) Reload page, wrong description 4) Apply patch 5) Install th-TH language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-TH) 6) Reload page, right description 7) If you want do "mkdir koha-tmpl/intranet-tmpl/prog/th-Thai", reload, also right description To the reporter of this Bug: the rename of the folder is a good workaround, when this patch is pushed to stable I'll rename Thai files Signed-off-by: Mark Tompsett <mtompset@hotmail.com> This does not correct existing problems which need human intervention. It does, however, allow for a correct installation of Thai after the patch is made. If we really want a patch for fixing an existing install. I wrote it, but have not tested it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 26689 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26689&action=edit Bug 11393 - Untested patch for doing the human intervention part. This is intentionally going to be obsoleted, but attached to the bug so it could be referenced, if needed. File::Copy is already a dependency, and File::Find is a core module as far as I can tell. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26689|0 |1 is obsolete| | --- Comment #8 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 26689 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26689 Bug 11393 - Untested patch for doing the human intervention part. Intentionally obsoleted, because I don't think it is wanted at this time, nor is it preferred. However, I do want it somewhere accessible if someone would like to see my attempt. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26688|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 26706 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26706&action=edit [PASSED QA] Bug 11393 - Language menu not show up as name for Thai (th-THA was shown) The problem is with the name of PO files Currently Koha expect, among other variants, that PO filenames began with (using as example *-pref.po): {lang}-pref.po {lang}-{region}-pref.po {lang}-{script}-pref.po {lang}-{script}-{region}-pref.po and expect 2 chars for lang and region, and 4 for script So the problem with Thai translation files are that it's names do not match that convention. This patch only rename Thai files as th-THA-* to th-TH-*. In that way language description is right. translate script use that chars to make dirs, and use dirs to find description. To test: 1) Go to I18N/L10N sysprefs 2) Install th-THA language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-THA) 3) Reload page, wrong description 4) Apply patch 5) Install th-TH language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-TH) 6) Reload page, right description 7) If you want do "mkdir koha-tmpl/intranet-tmpl/prog/th-Thai", reload, also right description To the reporter of this Bug: the rename of the folder is a good workaround, when this patch is pushed to stable I'll rename Thai files Signed-off-by: Mark Tompsett <mtompset@hotmail.com> This does not correct existing problems which need human intervention. It does, however, allow for a correct installation of Thai after the patch is made. If we really want a patch for fixing an existing install. I wrote it, but have not tested it. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> As pointed out by Mark, this does not fix existing installations. Putting a note in the release notes might be something we can do here. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Bernardo! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11393 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED CC| |fridolyn.somers@biblibre.co | |m Resolution|--- |FIXED --- Comment #11 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Already in 3.14 from PO updates -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org