From Fedora Project Wiki
< L10N
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
Each time a typographic rule is not satisfied, the program stops and ask the user what to do. The figure 1 below shows how it looks like : | Each time a typographic rule is not satisfied, the program stops and ask the user what to do. The figure 1 below shows how it looks like : | ||
[[Image:po_purifier_1.png|center|frame| | [[Image:po_purifier_1.png|center|frame|400px|''Figure 1: Typographic Fault Detected'']] | ||
* The message to the user, that appears in English here, normally appears in the user's language, provided that the program has been localized. It has 2 parts: | * The message to the user, that appears in English here, normally appears in the user's language, provided that the program has been localized. It has 2 parts: | ||
Line 14: | Line 14: | ||
** The typo rule itself (it belongs to the typorules.py file) | ** The typo rule itself (it belongs to the typorules.py file) | ||
* In this case the French typo rule requires a no break space | * In this case the French typo rule requires a narrow no break space between a value and its unit and the location of the fault is shown with a green highlight. | ||
* To help the user, the message is shown twice. First with the various spaces colorized according to their type then with the typo fault highlighted. |
Revision as of 06:24, 2 June 2016
Description of the tool
This tool is a python script that can be found at https://github.com/jaaf/po_purifier. It scan a directory for .po files. For each file, it checks translated messages against typographic rules that reside in a configuration file nammed typorules.py. Each time a typographic rule is not satisfied, the program stops and ask the user what to do. The figure 1 below shows how it looks like :
- The message to the user, that appears in English here, normally appears in the user's language, provided that the program has been localized. It has 2 parts:
- The first part that tells the user a typo rule is infringed and that he has to decide for change or not (it is part of the program and has to be localized)
- The typo rule itself (it belongs to the typorules.py file)
- In this case the French typo rule requires a narrow no break space between a value and its unit and the location of the fault is shown with a green highlight.
- To help the user, the message is shown twice. First with the various spaces colorized according to their type then with the typo fault highlighted.