Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated.
Summary: marc21_field_006.xml and marc21_field_008.xml can't be translated.
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bernardo Gonzalez Kriegel
QA Contact:
URL:
Keywords:
Depends on: 9358
Blocks: 10178
  Show dependency treegraph
 
Reported: 2011-08-11 16:48 UTC by Frédérick Capovilla
Modified: 2014-12-07 20:02 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Translated marc21_field_006.xml (German) as a temporary workaround. (54.49 KB, text/xml)
2012-02-11 16:04 UTC, Marc Véron
Details
Translated marc21_field_008.xml (German) as a temporary workaround. (90.86 KB, text/xml)
2012-02-11 16:06 UTC, Marc Véron
Details
Bug 6709 : Patch for testing translating .xml files (889 bytes, patch)
2012-04-08 08:11 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated (304.75 KB, patch)
2013-04-27 19:05 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated (305.01 KB, patch)
2013-04-27 23:22 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[PASSED QA] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated (305.33 KB, patch)
2013-04-28 10:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6709 : Patch for testing translating .xml files (963 bytes, patch)
2013-04-29 16:07 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated (304.14 KB, patch)
2013-04-29 16:10 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6709 : Patch for testing translating .xml files (963 bytes, patch)
2013-04-29 16:14 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated (304.18 KB, patch)
2013-04-29 16:14 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 6709 : Patch for testing translating .xml files (1.02 KB, patch)
2013-04-29 20:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 6709 - marc21_field_006.xml and marc21_field_008.xml can't be translated (304.52 KB, patch)
2013-04-29 20:50 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Frédérick Capovilla 2011-08-11 16:48:01 UTC
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
Comment 1 Katrin Fischer 2011-12-14 10:05:32 UTC
Changing component and version. Still a problem.
Comment 2 Marc Véron 2012-02-10 10:04:18 UTC
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.
Comment 3 Marc Véron 2012-02-11 16:04:40 UTC
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
Comment 4 Marc Véron 2012-02-11 16:06:50 UTC
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
Comment 5 Katrin Fischer 2012-02-13 08:23:02 UTC
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.
Comment 6 Chris Cormack 2012-04-08 08:11:01 UTC Comment hidden (obsolete)
Comment 7 Chris Cormack 2012-04-08 08:20:10 UTC
I have a patch, and apart from killing the indentation it seems to work fine, can someone please test
Comment 8 Katrin Fischer 2012-04-08 09:51:28 UTC
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>
Comment 9 Bernardo Gonzalez Kriegel 2013-04-27 19:05:43 UTC Comment hidden (obsolete)
Comment 10 Tomás Cohen Arazi 2013-04-27 23:22:23 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2013-04-28 10:02:24 UTC Comment hidden (obsolete)
Comment 12 Bernardo Gonzalez Kriegel 2013-04-29 16:07:08 UTC Comment hidden (obsolete)
Comment 13 Bernardo Gonzalez Kriegel 2013-04-29 16:10:06 UTC Comment hidden (obsolete)
Comment 14 Bernardo Gonzalez Kriegel 2013-04-29 16:14:09 UTC Comment hidden (obsolete)
Comment 15 Bernardo Gonzalez Kriegel 2013-04-29 16:14:23 UTC Comment hidden (obsolete)
Comment 16 Katrin Fischer 2013-04-29 20:50:11 UTC
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.
Comment 17 Katrin Fischer 2013-04-29 20:50:31 UTC
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!
Comment 18 Jared Camins-Esakov 2013-05-01 10:56:51 UTC
This patch has been pushed to master and 3.12.x.
Comment 19 Chris Cormack 2013-05-09 06:24:11 UTC
Doesn't apply in 3.10.x (not sure it is needed anyway)
Comment 20 Bernardo Gonzalez Kriegel 2013-05-09 10:55:07 UTC
(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.
Comment 21 Chris Cormack 2013-05-09 19:37:45 UTC
(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
Comment 22 Chris Hall 2013-06-06 09:29:56 UTC
Both patches have been pushed to 3.8.x, and will be in 3.8.14.
Thank you :)