gmarty / xgettext

Extracts translatable strings from source. Identical to xgettext but for template languages.
MIT License
77 stars 35 forks source link

Orphaned messages when using `--join-existing` #63

Closed eldarc closed 7 years ago

eldarc commented 7 years ago

Suppose source files contain following two messages: _('First message') _('Second message')

Those will be added to the .po file. Translators can translate them and translations will be saved and not overwritten when using --join-existing.

However, if the developer changed a message, for example _('Second message') to _('Third message') and _('Second message') has now 0 occurrences in all source files, it should be removed from the .po file.

Currently, the deepMerge method merges all messages from the existing .po file. Before doing the merge, orphaned messages should be marked and ignored when merging or a direct check should be performed while merging.

smhg commented 7 years ago

xgettext seems to do the same. This is our reference, so I'd keep it like that. One reason might be that this can be used by your translation software for future suggestions.

As a sidenote: poEdit offers a "Purge deleted translations" option that deletes these.