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.
The underlying problem in this bug is actually that the ccsr file is missing from the Pootle download.
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.
Uploading new .po files for CCSR theme? Is it really something we want? It will continue the expansion of Koha Git repository.
Frédéric, Isn't it required for translations?
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?
> 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.
> 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.
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'?
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
Created attachment 13573 [details] Italian transaltion of opac-ccsr.po
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
Ruth, adding you to this bug, as you'll be the next translation manager
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
Created attachment 13641 [details] zipped patch with ccsr.po for all languages I submit this patch zipped because it's very large (2.5MB).
Created attachment 13642 [details] [review] Bug 9018 Italian translation of ccsr.po (DISCLAIMER: apply AFTER gz archive)
Comment on attachment 13573 [details] 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)
No problem, I undestand that a patch is better. Thank you for your work.
Created attachment 13643 [details] 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.
I think CCSR OPAC translation is done on pootle now, so closing this.