-
Notifications
You must be signed in to change notification settings - Fork 25
[localization-de] e2e. ensure German localization is correct #1193
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
Conversation
738b551 to
cf5a005
Compare
766029c to
fd75eac
Compare
fd75eac to
95558ee
Compare
c974297 to
eccfe14
Compare
|
@tbsbdr during testing, I noticed that the login page and the public link page are not fully translated into German. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces German localization testing to ensure proper translation in the web interface. The implementation reuses existing accessibility tests by adding language detection capabilities when running with German as the default language.
- Added language detection using the
franc-minlibrary to analyze visible text strings - Modified accessibility check functions to support localization testing mode
- Updated test configuration to run localization tests only for release builds with "localization-de" in PR title
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/e2e/support/utils/accessibility.ts | Core language detection logic with allowlist for non-German terms and text extraction |
| tests/e2e/support/objects/runtime/session.ts | Updated function call to use new accessibility/localization checker |
| tests/e2e/cucumber/steps/ui/a11.y.ts | Updated step definition to use new function name |
| tests/e2e/support/objects/app-files/link/actions.ts | Added role mapping and German link name handling |
| package.json | Added franc-min dependency for language detection |
| .woodpecker.star | Added CI configuration for German localization testing |
| Multiple navigation files | Replaced text-based selectors with more robust CSS selectors |
| tests/e2e/cucumber/features/a11y/smoke.feature | Updated test scenarios and fixed selector reference |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
JammingBen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The franc library seems a bit stale, last commit happened last year... Since this is a dev dependency only, I'm fine with that. Still, I'm wondering if it would be better to test this by comparing the collected strings against the translation.json files. It would also be more accurate then guessing the language. Just thinking out loud, not sure if it would have any other problems though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
3cf645c to
b87cadf
Compare
81ddb36 to
0baedb8
Compare
265219f to
1b34371
Compare
|
Here is a list of untranslated words: 🌐 Language check failed in before clicking login submit. Non-German texts: Not sure if this should be translated: |
Since the a11y tests already run through most of the web interface, I decided to reuse them for localization testing by simply running the tests with opencloud on german language
OC_DEFAULT_LANGUAGE: "de"During these runs I collect all visible text strings from the web pages and analyze them to ensure they’re in German.
For language detection I currently use
franc(It’s not very accurate for short words (like Neu, OK, etc.), but so far it’s the best lightweight option I found)I decided to run these tests only when testing the release. To run these tests, you need to set the PR title to “localization-de”.
How it work:
I get all the text on the page (see Detected texts for language check) and find, for example, that
- Icon [eng]is an English word.full test output