qooxdoo-compiler
qooxdoo-compiler copied to clipboard
Translations should only be re-generated on request
Currently the translations get extracted on every run - which results in changes for all the nice .po files over and over again. Even if nothing changed.
That's true, git always reports the files to be changed, and I have to manually revert them. It would be good if they are only updated if something has changed.
Or if --update-translation
is added. Detecting changes would be a bit more difficult.
The files are indeed changed whenever a line "moves" in a source file (due to deletion or insertion of lines). The actual translations are not changed, but the new location is added to the comments of the translation rather than updating the line number.
Perhaps completely rewriting the .po files would work. With the old tool chain the translations weren't automatically updated either, so @cajus 's suggestion sounds reasonable.
please see new --update-po-files
argument (in next PR)
As discussed on gitter, right now, changes of strings are not tracked if the new option is not provided, and in fact, no translation files are ever created even the first time without that option. The proposal, instead, is to update strings in the .po file automatically, but only update the line numbers if the special option is specified. Alternatively, a compile-time flag can allow leaving the line numbers out entirely. The line numbers are required by the standard, but are not required by many po editors.