Variables like %s or %d are included in strings and any discrepancy in them may generate an error for the translation. Common errors include mismatch in their number or if these are translated. http://translate.sourceforge.net/wiki/toolkit/pofilter_tests#variables http://translate.sourceforge.net/wiki/toolkit/pofilter This will include a number of different validation checks that can be enabled independently for different source document types. NB Python printf (checked for order) and Java MessageFormat only Examples of some strings with variables: gedit: ===== msgid "Loading %d file…" msgid_plural "Loading %d files…" msgstr[0] "" msgstr[1] "" msgid "Loading file '%s'…" msgid "Changes made to the document in the last hour and %d minute will be permanently lost." msgid "Found and replaced %d occurrences" gconf: ===== msgid "Root node of '%s' must be <evoldap>, not <%s>" msgid "Contacting LDAP server: host '%s', port '%d', base DN '%s'" msgid "Error saving GConf tree to '%s': %s\n" msgid "Failed to give up lock on XML directory \"%s\": %s" msgid "Could not stat `%s': %s"
Implementation should detect any variables that starts with % follow by variable name.
Implemented in 1.5 branch. See https://github.com/zanata/zanata/commit/942b44ce93e958e02afe03bd0e4b31cd95b91a1b
Implemented fix. See https://github.com/zanata/zanata/commit/8c5e2aee6e66704623c9a1dc18701786d600ff58
- updated to use localisable message strings - updated printf matching regex to match most standard variable patterns See https://github.com/zanata/zanata/commit/f8eaaa0666357c6fe284d6cf4618650ec3513fc0 https://github.com/zanata/zanata/compare/e69ee68374a74eac8535980bc7dd833ba7795b83...030653ed8063238147f95b7219d0838f75150194
UI updates, see: https://github.com/zanata/zanata/compare/030653ed8063238147f95b7219d0838f75150194...d24ee4588f41cc49290f17ec2aef518266d7edbb