Headings of table are defined in columns.def file, but only in english. French libraries want them in french. This patch adds a columns.def.fr-FR file and copies this file into the fr-FR directory tree during the translation process. columns.def.{lang} can be added as well
Created attachment 13895 [details] [review] Bug 9216 : adding columns.def.fr-FR for table headings translation
Created attachment 13896 [details] [review] Bug 9216 : Adding copy of columns.def.{lang} (if it exists) into {lang} directory tree during translation process
Would it not be better to fold columns.def into the normal translation process, i.e., so that translators can supply or update a PO file for which language-specific columns.def.lang files can be generated?
(In reply to comment #3) > Would it not be better to fold columns.def into the normal translation > process This sounds sensible to me, but I say that without knowing how hard it would be to accomplish. Perhaps someone who knows could comment?
Created attachment 22521 [details] [review] Bug 9216: columns.def file is not translatable The sql column headers is stored into the columns.def file. This file is not managed by the translation script. This patch makes possible the headers translation. Note: The translation xml tags were added to avoid all lines to be put on a single line. Test plan: 1/ update your po file cd misc/translate; perl translate -f columns update LANG # Replace by another language here 2/ translate header columns (search "columns.def" in your po file). Be careful, you have to keep the column names! 3/ install the translated columns.def perl translate -f columns install LANG # Replace by another language here 4/ go on the report module > create a new report > next > next 5/ change the language on the 3rd step, you should see the column header translated.
(In reply to Galen Charlton from comment #3) > Would it not be better to fold columns.def into the normal translation > process, i.e., so that translators can supply or update a PO file for which > language-specific columns.def.lang files can be generated? It is what I do in this last patch.
Jonathan, it works, but there is a small conflict on applying the patch, columns.def may have changed Anyway, may I suggest using instead of <translation>biblioitems.volumedesc: Volume information</translation> something like <table name="biblioitems.volumedesc:">Volume information</table> I think it's equally easier to match and split. And as a bonus column names remain untouched and some strings can have translations. In the first case, we have on PO file msgid "biblioitems.volumedesc: Volume information" in the second msgid "Volume information" which is better to translate Regards
Created attachment 26989 [details] [review] Bug 9216: columns.def file is not translatable The sql column headers is stored into the columns.def file. This file is not managed by the translation script. This patch makes possible the headers translation. Note: The translation xml tags were added to avoid all lines to be put on a single line. Test plan: 1/ update your po file cd misc/translate; perl translate -f columns update LANG # Replace by another language here 2/ translate header columns (search "columns.def" in your po file). 3/ install the translated columns.def perl translate -f columns install LANG # Replace by another language here 4/ go on the report module > create a new report > next > next 5/ change the language on the 3rd step, you should see the column header translated.
(In reply to Bernardo Gonzalez Kriegel from comment #7) > Anyway, may I suggest using instead of > <translation>biblioitems.volumedesc: Volume information</translation> > something like > <table name="biblioitems.volumedesc:">Volume information</table> > I think it's equally easier to match and split. Very good idea! I did that in the new patch.
Created attachment 27007 [details] [review] [SIGNED-OFF] Bug 9216: columns.def file is not translatable The sql column headers is stored into the columns.def file. This file is not managed by the translation script. This patch makes possible the headers translation. Note: The translation xml tags were added to avoid all lines to be put on a single line. Test plan: 1/ update your po file cd misc/translate; perl translate -f columns update LANG # Replace by another language here 2/ translate header columns (search "columns.def" in your po file). 3/ install the translated columns.def perl translate -f columns install LANG # Replace by another language here 4/ go on the report module > create a new report > next > next 5/ change the language on the 3rd step, you should see the column header translated. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described, no koha-qa errors [on es-ES about a third of the strings translated!! :-) ]
Almost an xml file now...
I really like that someone is fixing this long standing bug! I think it Could be easier to translate the columns correctly, if we had the the original column in the translation string as well. Or maybe as a note? Still, this is a big improvement and works nicely :)
Created attachment 27308 [details] [review] 0001-PASSED-QA-Bug-9216-columns.def-file-is-not-translata.patch
Created attachment 27309 [details] [review] 0002-Bug-9216-Make-description-in-columns.def-more-specif.patch
Pushed to master. Thanks, Jonathan!
Pushed to 3.14.x, will be in 3.14.10