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

CI: detect missing glyphs in language file #4149

Open
mmilata opened this issue Sep 2, 2024 · 0 comments
Open

CI: detect missing glyphs in language file #4149

mmilata opened this issue Sep 2, 2024 · 0 comments
Labels
ci Continuous Integration (CI) related code Code improvements core Trezor Core firmware. Runs on Trezor Model T and T2B1. tests Automated integration tests translations Put this label on a PR to run tests in all languages

Comments

@mmilata
Copy link
Member

mmilata commented Sep 2, 2024

Currently, adding new glyphs requires manually regenerating font bitmap files. If a language JSON is updated with a string that uses new glyph then Trezor users will see �.

There are several approaches:

  • simple python script to compare the character whitelist that gen_font.py uses against set of chars used in language JSON
  • detect this in the renderer and panic!() in debug builds
  • CI job regenerates bitmaps then compares them with bitmaps in git
    • disadvantages: TTF of some fonts is in private repo, may possibly break on freetype updates
    • currently the characters are manually whitelisted, we'd also need to generate these from langJSONs

Related to: #992

@mmilata mmilata added core Trezor Core firmware. Runs on Trezor Model T and T2B1. ci Continuous Integration (CI) related tests Automated integration tests code Code improvements translations Put this label on a PR to run tests in all languages labels Sep 2, 2024
@mmilata mmilata added this to the 🌍 Translations milestone Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration (CI) related code Code improvements core Trezor Core firmware. Runs on Trezor Model T and T2B1. tests Automated integration tests translations Put this label on a PR to run tests in all languages
Projects
Status: No status
Development

No branches or pull requests

1 participant