[Bug 9018] New: Translate update command doesn't work without existing ccsr file
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 Priority: P5 - low Change sponsored?: --- Bug ID: 9018 CC: frederic@tamil.fr Assignee: koha-bugs@lists.koha-community.org Summary: Translate update command doesn't work without existing ccsr file Severity: major Classification: Unclassified OS: All Reporter: katrin.fischer@bsz-bw.de Hardware: All Status: NEW Version: master Component: I18N/L10N Product: Koha I tried updating the German po files for testing and found that the 'perl translate update de-DE' command gives some error message in the end: Update templates 'OPAC ccsr' From: /home/katrin/kohacloneG/koha-tmpl/opac-tmpl/ccsr/en/ To : /home/katrin/kohacloneG/misc/translator/po/de-DE-opac-ccsr.po Warning: Can't determine original templates' charset, defaulting to UTF-8 Warning: Charset Out defaulting to UTF-8 msgmerge: Öffnen der Datei »/home/katrin/kohacloneG/misc/translator/po/de-DE-opac-ccsr.po« zum Lesen fehlgeschlagen: Datei oder Verzeichnis nicht gefunden Update FAILED. Rough translation: File can not be opened for reading... There are also no files for the ccsr theme in Pootle - so if you can't generate the file yourself and there is no file to be used on Pootle, the new theme is currently not translatable. This makes this kind of a bigger problem. I was using the German 3.10 po files downloaded from Pootle and the 3.10.x branch from git. -- 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=9018 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8633 -- 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=9018 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- The underlying problem in this bug is actually that the ccsr file is missing from the Pootle download. -- 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=9018 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Translate update command |Po file for ccsr theme |doesn't work without |missing on |existing ccsr file |translate.koha-community.or | |g Severity|major |normal --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I confirm, I tried 'perl translate create de-DE' now and that seems to do the trick for creating the file. Adding the new theme to Pootle is still something we should do, but I am downgrading the severity. -- 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=9018 --- Comment #3 from Frédéric Demians <frederic@tamil.fr> --- Uploading new .po files for CCSR theme? Is it really something we want? It will continue the expansion of Koha Git repository. -- 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=9018 --- Comment #4 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Frédéric, Isn't it required for translations? -- 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=9018 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I worry less about the size of the repositories for a developer and more about a library who wants to intall the new theme and will run into problems. I think we should at least enable translating the ccsr file on Pootle. Then it could be discussed if those files will also be included in the pull request or not. I am not sure I am happy with having a separate file, because it will require people to translate the same terms twice. In strings the 2 OPAC files are probably very very similar. Would it be possible to maybe have only one opac po file for both themes? -- 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=9018 --- Comment #6 from Frédéric Demians <frederic@tamil.fr> ---
Isn't it required for translations?
If it is, as it seems to be, we could patch the translation script to fail silently, and gracefully, if there isn't CCSR .po file. -- 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=9018 --- Comment #7 from Frédéric Demians <frederic@tamil.fr> ---
I worry less about the size of the repositories for a developer and more about a library who wants to intall the new theme and will run into problems. I think we should at least enable translating the ccsr file on Pootle. Then it could be discussed if those files will also be included in the pull request or not.
I was thinking leaving that job to Ruth...
Would it be possible to maybe have only one opac po file for both themes?
Possible but no easy. It requires diving into translation machinery, which is not that clean. -- 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=9018 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Frederic, I understand. But we should keep an eye on the problem, maybe get it solved for 3.10.1. For now it would be good to add some documentation what a library that wants to use a translated CCSR theme can do that. Maybe the script could fail more gracefully, but still give a hint that for using a translated CCSR theme a separate po file is needed that can be created by running 'translate create'? -- 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=9018 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=9018 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.tajoli@cineca.it --- Comment #9 from Zeno Tajoli <z.tajoli@cineca.it> --- In my opinion for 3.10.0 we need to create 'empty' xx-XX-opac-ccsr.po files. In fact now it is impossible to install a new language if you use tarball or git. At least in tarball we need the 'empty' xx-XX-opac-ccsr.po files. For git a README is enough. In my opinion we can use this problem to create a new git tree wtih only .po files. In the develop of 3.12.x we can delete the .po file and place only a README in /misc/translator/po. We we create tarball and package we can union the two git trees. For git users only a README in the dir. I attach the italian traslation it-IT-opac-ccsr.po to this bug -- 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=9018 --- Comment #10 from Zeno Tajoli <z.tajoli@cineca.it> --- Created attachment 13573 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13573&action=edit Italian transaltion of opac-ccsr.po -- 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=9018 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #11 from Paul Poulain <paul.poulain@biblibre.com> --- I've suggested to frederic another option: foreach LANG { * cp LANG-i-opac-t-prog-v-3006000.po LANG-opac-ccsr.po * ./translate update LANG } 90% of the ccsr will be translated (it's 108 strings long, and there are less than 10 fuzzy/to translate) the only problem with this option is that the resulting .po contains a lot of "old strings comments" in the file : when a string "disappear", the .po just put a #~ on it (and moves it at the end of the file). So if it appear again, it will be translated "magically". Usually it's useful. But in this case it's a problem, as 95% of the file will contain comments. for fr-FR = * full size = 223 395b * after manually removing all the #~ = 25 008b -- 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=9018 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ruth@bywatersolutions.com Assignee|koha-bugs@lists.koha-commun |ruth@bywatersolutions.com |ity.org | --- Comment #12 from Paul Poulain <paul.poulain@biblibre.com> --- Ruth, adding you to this bug, as you'll be the next translation manager -- 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=9018 --- Comment #13 from Paul Poulain <paul.poulain@biblibre.com> --- Before releasing 3.10.0, I wrote the following small script, to generate pre-filled ccsr.po: #!/bin/perl use File::Copy; opendir(my $dh, 'po/'); @fichiers = grep { /(.*)-i-opac-t-prog-v-3006000\.po/ } readdir($dh); foreach my $file (@fichiers) { $file =~ s/-i-opac-t-prog-v-3006000\.po//; print "==> $file\n"; copy("po/".$file."-i-opac-t-prog-v-3006000\.po","po/".$file."-opac-ccsr.po"); system("./tmpl_process3.pl update -i /home/paul/koha.dev/koha-community/koha-tmpl/opac-tmpl/ccsr/en/ -r -s po/$file-opac-ccsr.po"); } + perl -i -ne 'print if ! /^#\~/' po/*.po perl -i -00 -pe '' po/*.po to remove blank/old&irrelevant lines So, I've generated all ccsr translation files, that are 90% translated for languages that are 100% translated. The patch is a little bit large (Ruth, your first task as TM will will probably to work on how translation are stored in our git repository... see http://wiki.koha-community.org/wiki/Git_Splitting_and_Shrinking -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 --- Comment #14 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 13641 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13641&action=edit zipped patch with ccsr.po for all languages I submit this patch zipped because it's very large (2.5MB). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 --- Comment #15 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 13642 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13642&action=edit Bug 9018 Italian translation of ccsr.po -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13573|0 |1 is obsolete| | --- Comment #16 from Paul Poulain <paul.poulain@biblibre.com> --- Comment on attachment 13573 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13573 Italian transaltion of opac-ccsr.po Zeno, I obsolete this file, because i've uploaded the equivalent patch to this bug (and it will be in 3.10.0) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13642|Bug 9018 Italian |Bug 9018 Italian description|translation of ccsr.po |translation of ccsr.po | |(DISCLAIMER: apply AFTER gz | |archive) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 --- Comment #17 from Zeno Tajoli <z.tajoli@cineca.it> --- No problem, I undestand that a patch is better. Thank you for your work. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 --- Comment #18 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 13643 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13643&action=edit zipped patch with ccsr.po for all languages (2nd version) I discovered that zh-Hans-CN-opac-ccsr.po was badly broken, and very very very large. So I removed it and created an empty .po for this language. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13641|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9018 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think CCSR OPAC translation is done on pootle now, so closing this. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org