qooxdoo-compiler icon indicating copy to clipboard operation
qooxdoo-compiler copied to clipboard

Translations should only be re-generated on request

Open cajus opened this issue 6 years ago • 5 comments

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.

cajus avatar Mar 08 '18 19:03 cajus

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.

cboulanger avatar Mar 08 '18 19:03 cboulanger

Or if --update-translation is added. Detecting changes would be a bit more difficult.

cajus avatar Mar 08 '18 19:03 cajus

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.

zaucker avatar Feb 22 '19 16:02 zaucker

please see new --update-po-files argument (in next PR)

johnspackman avatar Apr 30 '19 14:04 johnspackman

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.

derrell avatar Mar 04 '20 12:03 derrell