The files marc21_field_006.xml and marc21_field_008.xml each contain many string that needs to be translated in other languages. The problem is that the "translate" script in "misc/translator/" doesn't support xml files, so all the strings in theses two files can't be translated. Path to files : koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml
Changing component and version. Still a problem.
We will do some demos with German speaking librarians in a couple of weeks. As a temprary solution, I will translate the XMLs and copy them into the template directory.
Created attachment 7574 [details] Translated marc21_field_006.xml (German) as a temporary workaround. Rename the file to marc21_field_006.xml and copy it to (...)de-DE\modules\cataloguing\value_builder
Created attachment 7575 [details] Translated marc21_field_008.xml (German) as a temporary workaround. Rename the file to marc21_field_008.xml and copy it to (...)de-DE\modules\cataloguing\value_builder
Ah, I forgot it's a plugin. Copying the file and changing the mapping in the framework is a good workaround. Perhaps we should consider addding the translated files to Koha even.
Created attachment 9005 [details] [review] Bug 6709 : Patch for testing translating .xml files
I have a patch, and apart from killing the indentation it seems to work fine, can someone please test
Sadly it doesn't work correctly. I think this could work, if the XML had been designed in a different way from the beginning. It has the code as content of the elmement, while the description we want to translate is an attribute. The other way around, it would probably work quite nicely. With Chris' patch all the codes show up in the po file. Example: 14 <Value description="Date of distribution/ release/ issue and production/ recording session when different">p</Value> 15 <Value description="Questionable date">q</Value> 16 <Value description="Reprint / reissue date and original date">r</Value> 17 <Value description="Single know date / probable date">s</Value> 18 <Value description="Publication date and copyright date">t</Value> 19 <Value description="Continuings resource status unknown">u</Value>
Created attachment 17758 [details] [review] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated This patch changes 1) structure and schema for xml files used in MARC21 006 and 008 value builders. 2) JavaScript functions used to show value builders. 3) Adds xml processing to translation script Any translatable string has been moved to an xml element, those strings that no need translation remains as xml attributes. NOTE_1: I do not include as translatable material types codes, because those values are restricted in schema definition. But this restriction can be removed. NOTE_2: Anyone with experience in XML/XSD please check the new schema definition. NOTE_3: Anyone with experience in the former and JavaScript please check xmlControlfield.js To test: 1) Apply the patch 2) Verify that 006 and 008 value builders show and work properly 3) Update translation files for your favorite language, a new set of strings must show up corresponding to names and descriptions on value builders.
Created attachment 17759 [details] [review] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated This patch changes 1) structure and schema for xml files used in MARC21 006 and 008 value builders. 2) JavaScript functions used to show value builders. 3) Adds xml processing to translation script Any translatable string has been moved to an xml element, those strings that no need translation remains as xml attributes. NOTE_1: I do not include as translatable material types codes, because those values are restricted in schema definition. But this restriction can be removed. NOTE_2: Anyone with experience in XML/XSD please check the new schema definition. NOTE_3: Anyone with experience in the former and JavaScript please check xmlControlfield.js To test: 1) Apply the patch 2) Verify that 006 and 008 value builders show and work properly 3) Update translation files for your favorite language, a new set of strings must show up corresponding to names and descriptions on value builders. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signoff notes: Tested both value builders. They work as expected. Running $ perl translate update es-ES resulted in the xml string being added to the relevant .po file (the staff one). No koha-qa.pl errors BTW. To-.
Created attachment 17764 [details] [review] [PASSED QA] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated This patch changes 1) structure and schema for xml files used in MARC21 006 and 008 value builders. 2) JavaScript functions used to show value builders. 3) Adds xml processing to translation script Any translatable string has been moved to an xml element, those strings that no need translation remains as xml attributes. NOTE_1: I do not include as translatable material types codes, because those values are restricted in schema definition. But this restriction can be removed. NOTE_2: Anyone with experience in XML/XSD please check the new schema definition. NOTE_3: Anyone with experience in the former and JavaScript please check xmlControlfield.js To test: 1) Apply the patch 2) Verify that 006 and 008 value builders show and work properly 3) Update translation files for your favorite language, a new set of strings must show up corresponding to names and descriptions on value builders. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signoff notes: Tested both value builders. They work as expected. Running $ perl translate update es-ES resulted in the xml string being added to the relevant .po file (the staff one). No koha-qa.pl errors BTW. To-. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Did regression tests on the plugins for 006 and 008 and could spot not difference to behaviour before. Also tested the translation process and found it working nicely. Thank you for fixing this long standing translation bug!
Created attachment 17801 [details] [review] [SIGNED-OFF] Bug 6709 : Patch for testing translating .xml files Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 17802 [details] [review] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated This patch changes 1) structure and schema for xml files used in MARC21 006 and 008 value builders. 2) JavaScript functions used to show value builders. Xml processing is enabled in previous patch Any translatable string has been moved to an xml element, those strings that no need translation remains as xml attributes. NOTE_1: I do not include as translatable material types codes, because those values are restricted in schema definition. But this restriction can be removed. NOTE_2: Anyone with experience in XML/XSD please check the new schema definition. NOTE_3: Anyone with experience in the former and JavaScript please check xmlControlfield.js To test: 1) Apply the patch 2) Verify that 006 and 008 value builders show and work properly 3) Update translation files for your favorite language, a new set of strings must show up corresponding to names and descriptions on value builders.
Created attachment 17804 [details] [review] [SIGNED-OFF] Bug 6709 : Patch for testing translating .xml files Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Created attachment 17805 [details] [review] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated This patch changes 1) structure and schema for xml files used in MARC21 006 and 008 value builders. 2) JavaScript functions used to show value builders. Xml processing is enabled in previous patch Any translatable string has been moved to an xml element, those strings that no need translation remains as xml attributes. NOTE_1: I do not include as translatable material types codes, because those values are restricted in schema definition. But this restriction can be removed. NOTE_2: Anyone with experience in XML/XSD please check the new schema definition. NOTE_3: Anyone with experience in the former and JavaScript please check xmlControlfield.js To test: 1) Apply the patch 2) Verify that 006 and 008 value builders show and work properly 3) Update translation files for your favorite language, a new set of strings must show up corresponding to names and descriptions on value builders. Note: messed up patches, sending again.
Created attachment 17821 [details] [review] [PASSED QA] Bug 6709 : Patch for testing translating .xml files Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Comment on second patch.
Created attachment 17822 [details] [review] [PASSED QA] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated This patch changes 1) structure and schema for xml files used in MARC21 006 and 008 value builders. 2) JavaScript functions used to show value builders. Xml processing is enabled in previous patch Any translatable string has been moved to an xml element, those strings that no need translation remains as xml attributes. NOTE_1: I do not include as translatable material types codes, because those values are restricted in schema definition. But this restriction can be removed. NOTE_2: Anyone with experience in XML/XSD please check the new schema definition. NOTE_3: Anyone with experience in the former and JavaScript please check xmlControlfield.js To test: 1) Apply the patch 2) Verify that 006 and 008 value builders show and work properly 3) Update translation files for your favorite language, a new set of strings must show up corresponding to names and descriptions on value builders. Note: messed up patches, sending again. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass. Did regression tests on the plugins for 006 and 008 and could spot no differences in behavior of the plugins to before. Also tested the translation process and found it working nicely. Thank you for fixing this long standing translation bug!
This patch has been pushed to master and 3.12.x.
Doesn't apply in 3.10.x (not sure it is needed anyway)
(In reply to comment #19) > Doesn't apply in 3.10.x (not sure it is needed anyway) In case you think it's needed first apply Bug 9358, then this patch applies cleanly.
(In reply to comment #20) > (In reply to comment #19) > > Doesn't apply in 3.10.x (not sure it is needed anyway) > > In case you think it's needed first apply Bug 9358, then this patch applies > cleanly. Ah yeah I think its safe to have on 3.10.x and allows for translation so yep, ive updated the depends and will apply it now. Pushed to 3.10.x will be in 3.10.6
Both patches have been pushed to 3.8.x, and will be in 3.8.14. Thank you :)