Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Tests to create screenshots for translation keys #165

Open
Jeehut opened this issue Feb 6, 2020 · 0 comments
Open

Integrate with Tests to create screenshots for translation keys #165

Jeehut opened this issue Feb 6, 2020 · 0 comments

Comments

@Jeehut
Copy link
Member

Jeehut commented Feb 6, 2020

The idea is that for translators, it would be great to have some context for the translations. For this, automated unit / UI tests could be used where the accessory APIs could help finding the translations and match them to the Strings files. Then, a JSON file could be created that contains both the translation key, different translations per language and also a file name of the screenshot. Then, another tool or service could use these outputs (JSON file and screenshots) to show screenshots related to keys.

An alternative output method could be that the screenshots are automatically named after the keys (+ language), e.g. the key onboarding.page_1.title could result in a JPG file (so save space) named onboarding.page_1.title-de.jpg for the language German. The image then should have some kind of hint to the position of the string, e.g. the bounds could be used to draw a rectangle, whose color and line width could be made configurable.

Actually, probably no JSON output is needed if the images just follow the key names and include the language name as well.

Note that there should also be a statistics stating the "Translation Screenshot Coverage" of all the tests in a given project. This value would be similar to "Code Coverage" but only related to translation keys. Also a command could output the list of not-yet covered translation keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant