Bug 9216

Summary: Make table headings translatable
Product: Koha Reporter: Sophie MEYNIEUX <sophie.meynieux>
Component: NoticesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: bgkriegel, fridolin.somers, gmcharlt, jonathan.druart, katrin.fischer
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6030
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 9216 : adding columns.def.fr-FR for table headings translation
Bug 9216 : Adding copy of columns.def.{lang} (if it exists) into {lang} directory tree during translation process
Bug 9216: columns.def file is not translatable
Bug 9216: columns.def file is not translatable
[SIGNED-OFF] Bug 9216: columns.def file is not translatable
0001-PASSED-QA-Bug-9216-columns.def-file-is-not-translata.patch
0002-Bug-9216-Make-description-in-columns.def-more-specif.patch

Description Sophie MEYNIEUX 2012-12-05 10:08:29 UTC
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
Comment 1 Sophie MEYNIEUX 2012-12-05 12:59:04 UTC Comment hidden (obsolete)
Comment 2 Sophie MEYNIEUX 2012-12-05 12:59:26 UTC Comment hidden (obsolete)
Comment 3 Galen Charlton 2013-02-06 23:58:05 UTC
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?
Comment 4 Owen Leonard 2013-03-20 17:11:17 UTC
(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?
Comment 5 Jonathan Druart 2013-10-29 14:13:11 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2013-10-29 14:15:18 UTC
(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.
Comment 7 Bernardo Gonzalez Kriegel 2014-04-10 23:17:27 UTC
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
Comment 8 Jonathan Druart 2014-04-11 08:01:53 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2014-04-11 08:03:20 UTC
(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.
Comment 10 Bernardo Gonzalez Kriegel 2014-04-11 10:51:07 UTC Comment hidden (obsolete)
Comment 11 Bernardo Gonzalez Kriegel 2014-04-11 11:06:43 UTC
Almost an xml file now...
Comment 12 Katrin Fischer 2014-04-19 10:50:48 UTC
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 :)
Comment 13 Katrin Fischer 2014-04-19 10:57:49 UTC
Created attachment 27308 [details] [review]
0001-PASSED-QA-Bug-9216-columns.def-file-is-not-translata.patch
Comment 14 Katrin Fischer 2014-04-19 10:58:38 UTC
Created attachment 27309 [details] [review]
0002-Bug-9216-Make-description-in-columns.def-more-specif.patch
Comment 15 Galen Charlton 2014-04-19 14:37:49 UTC
Pushed to master.  Thanks, Jonathan!
Comment 16 Fridolin Somers 2014-08-06 12:28:12 UTC
Pushed to 3.14.x, will be in 3.14.10