Commit Graph

1 Commits

Author SHA1 Message Date
Alessandro Portale
024c327993 scripts: Add scrubts.py for .ts file cleanup
Rewrites a .ts file, removing duplicate messages of a specified
translation context and joining adjacent occurrences of that context.
Unlike lrelease and lconvert, this script does an exact comparison of
the whole <message/> xml tag.

Use on all .ts files:
 for tsfile in share/qtcreator/translations/qtcreator_*.ts; do python
scripts/scrubts.py $tsfile -context FooBar; done

Change-Id: I2dea5a0b00e35031718e654b289d6ad39dbaac2a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-02 07:23:46 +00:00