Create a test to check that new translations have the same tags as the english version
When we get new translations, they don’t always come with all the T0xxx tags. It would be usefule to have a integration test that compares the tags from the english cards against all other language files and report “missing” sentences and sentences identical to the english sentences. We also need a way to define T00XXX sentences that shouldn’t be counted as exceptions (e.g: mute them). This way, if we need to make changes or add a new translation we can be sure that they work. It could be good to check that the tags/sentences aren’t empty too.
There should be a test that generate a file (preferably in markdown) containing the translations that is missing tags. The file should be uploaded to a pull-reguest and the pre-release. These github action jobs can be used for that.
pull-request: https://github.com/OWASP/cornucopia/blob/2a8e3755334e7a71b0909a88203297abcd088243/.github/workflows/run-tests-generate-output.yaml#L136
pre-release: https://github.com/OWASP/cornucopia/blob/2a8e3755334e7a71b0909a88203297abcd088243/.github/workflows/pre-release.yml#L112
instead of generating a file for the pre-release, it would be even better to upload the markdown output as part of the pre-release description. That way, the markdown formatting will be presented as readable text as part of the pre-release:
e.g:
Pre release
.. general description
Missing translations
The following sentences has not been translated from english to the other available languages.
Spanish
File: ….
T00145, …
Hungarian
File: …
T00145, …
Commits
….