This can be confusing for translator (in case if e.g. no-object-pascal-format flag is copied) and desyncs flags in translation from flags in base file (this will cause all flags missing in base file to be removed from translation on next regeneration). Moreover, set of these flags can differ depending on translation in case they are copied from different items which have different flags (e.g. in partially translated files).
git-svn-id: trunk@61284 -
In base .pot file (template):
- Newly created item has no user flags.
- Existing updated item has its user flags kept intact.
In translation .po file:
- Newly created item gets user flags copied from base file (all flags missing in base file are removed).
- Existing updated item gets user flags copied from base file (all flags missing in base file are removed except fuzzy flag, whose state is kept).
After copying user flags, object-pascal-format, badformat and fuzzy flags are set automatically for each item (if needed).
This makes flags in translations (.po files) follow the ones from base file (.pot file) when they are added or removed in all cases (even when an item in .pot file gets its last flag deleted).
git-svn-id: trunk@61231 -
- Automatically set the "object-pascal-format" flag for strings containing format chars. It allows tracking of format errors by external tools such as Poedit.
- The "no-object-pascal-format" flag can be specified for a string in the main .pot file if needed.
- It is possible to specify flags in the main .pot file for particular strings and these flags will be preserved and propagated to language specific .po files during the update.
- Fixed delimiter for flags. At least Poedit expects that flags are separated by comma and space, not just comma.
- TPOFileItem.ModifyFlag() can accept the comma separated list of flags and returns true if the Flags property has been modified.
git-svn-id: trunk@61225 -
Reasons:
1. PO format does not prohibit multiline strings without trailing lineendings (and e.g. recent versions of Poedit do not complain about them).
2. Now multiline strings in PO files match exactly corresponding resourcestrings.
3. As a consequence of previous point we unbroke loading multiline translations from MO files.
git-svn-id: trunk@60343 -
1) Do not try to calculate statistics while reading/updating PO file. Instead calculate it on first read of Statistics property after file read/update. This simplifies logic, makes it easier to maintain and avoids unnecessary calculations when statisics are not actually needed (basically all cases except POChecker).
2) Grouped statistics fields in one record (all these values are usually needed at the same time).
3) Adapted POChecker to the new interface.
git-svn-id: trunk@57965 -
Reasons:
1) NrErrors was added for POChecker, but it does not use this property.
2) NrErrors count reflected only formatting errors, but this count has little value without list of strings with these errors.
3) PO file errors/problems are not limited by formatting errors (e.g. there can be master/child PO file string mismatches). Detecting them is out of scope of TPOFile class, so NrErrors count in many cases could be misleading.
git-svn-id: trunk@57948 -
Change identifier of some resourcestring from "a" to "b" => PO file contains both "a" and "b" items, but should contain only "b" one.
git-svn-id: trunk@57382 -
"a" -> "c"
"b" -> "c"
Copying fuzzy translations has been disabled because it practically does not help translators and can create potential confusion (some items (like in case above) will appear to have false history, and suggested translation is incorrect anyway). Instead now we guarantee to suggest non-fuzzy translation if it exists.
TPOFile.OriginalList property is removed: it was meant for PoChecker and is not needed by it anymore, its underlying field contents have been changed in order to allow aforementioned changes and most likely will be changed again in near future.
git-svn-id: trunk@57346 -