Bug 12843 - Set printf errors as fuzzy on translation files
Summary: Set printf errors as fuzzy on translation files
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bernardo Gonzalez Kriegel
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-28 13:50 UTC by Bernardo Gonzalez Kriegel
Modified: 2015-06-04 23:23 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12843: Set printf errors as fuzzy on translation files (98.12 KB, patch)
2014-08-28 14:30 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bernardo Gonzalez Kriegel 2014-08-28 13:50:47 UTC
There are printf errors marked as valid translations on PO files.
This brakes some translations, e.g. Arabic
Comment 1 Bernardo Gonzalez Kriegel 2014-08-28 14:30:27 UTC
Created attachment 31257 [details] [review]
Bug 12843: Set printf errors as fuzzy on translation files

This patch set as fuzzy entries on translation files
masked as translated.

Problem is that some translations are broken

To test:
View Problems:
1. Translate to arabic, enable it, go to opac, there is nothing
(broken template)
(cd misc/translator; ./translate install ar-Arab)

2. Update fr-FR tranlation files, there are many errors
(cd misc/translator; ./translate update fr-FR)

3. Reset and clean

Fix:
4. Apply the patch

5. Repeat 1, now opac loads
6. Repeat 2, now update runs without warnings

What did I do?
foreach lang

a) extract printf errors not marked as fuzzy
pofilter --nonotes --nofuzzy -i langdir/ -o tmpdir/ -t printf

b) mark them as fuzzy, foreach file
msgattrib $file -o temp.po --set-fuzzy; mv temp.po $file

c) Merge fixed files with old ones
pomerge -t landir/ -i tmpdir/ -o langdir/
Comment 2 Tomás Cohen Arazi 2014-09-09 19:06:06 UTC
I'm closing this one, as I'm going to keep the current RM handling of .po updates: ask the Translation Manager to generate them, and send a pull request.