Skip to content

Conversation

@ScharfViktor
Copy link
Contributor

@ScharfViktor ScharfViktor commented Sep 15, 2025

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:

And "Brian" selects the space "my_space"
   And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->spaces"
🔤 Detected texts for language check: [
 'Quota ändern',
 'Deaktivieren',
 'Suchen',
 'Icon',
 'Mitglieder',
 'Gesamtquota'
]
🌐 Language check failed in admin settings->spaces. Non-German texts:
- Icon [eng]

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

   @a11y
  Scenario: check files view wrapper accessibility # tests/e2e/cucumber/features/a11y/smoke.feature:4
(node:34811) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
    Given "Admin" creates following users using API
      │ id    │
      │ Alice │
      │ Brian │
    And "Admin" creates following groups using API
      │ id    │
      │ sales │
    And "Admin" assigns following roles to the users using API
      │ id    │ role        │
      │ Alice │ Space Admin │
      │ Brian │ Admin       │
    And "Admin" adds user to the group using API
      │ user  │ group │
      │ Alice │ sales │
    And "Alice" creates the following project spaces using API
      │ name     │ id       │
      │ my_space │ my_space │
    And "Alice" creates the following folder in space "my_space" using API
      │ name        │
      │ spaceFolder │
    And "Alice" creates the following folders in personal space using API
      │ name          │
      │ parent        │
      │ deletedFolder │
    And "Alice" deletes the following resource from personal space using API
      │ resource      │
      │ deletedFolder │
    And "Alice" uploads the following local file into personal space using API
      │ localFile       │ to              │
      │ testavatar.jpeg │ testavatar.jpeg │
      │ lorem.txt       │ lorem.txt       │
    And "Alice" adds the following tags for the following resources using API
      │ resource        │ tags      │
      │ testavatar.jpeg │ alice tag │
    And "Alice" shares the following resource using API
      │ resource │ recipient │ type  │ role     │
      │ parent   │ Brian     │ user  │ Can edit │
      │ parent   │ sales     │ group │ Can edit │
    When "Alice" logs in
🔤 Detected texts for language check: [ 'Sign in', 'Password', 'Log in', '- excellent file sharing' ]
🌐 Language check failed in before clicking login submit. Non-German texts:
 - Password [eng]
 - Log in [eng]
 - - excellent file sharing [eng]
    And "Brian" logs in
🔤 Detected texts for language check: [ 'Sign in', 'Password', 'Log in', '- excellent file sharing' ]
🌐 Language check failed in before clicking login submit. Non-German texts:
 - Password [eng]
 - Log in [eng]
 - - excellent file sharing [eng]
    And "Alice" opens the "files" app
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "personal space"
🔤 Detected texts for language check: [
  'Persönlich',
  'Keine Elemente ausgewählt.',
  'Persönlich',
  'Hochladen'
]
    And "Alice" switches to the "table-condensed" view
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "personal space"
🔤 Detected texts for language check: [
  'Persönlich',
  'Keine Elemente ausgewählt.',
  'Persönlich',
  'Hochladen',
  'Größe'
]
    And "Brian" opens the "files" app
    And "Brian" checks the accessibility of the DOM selector ".files-view-wrapper" on the "personal space"
🔤 Detected texts for language check: [
  'Persönlich',
  'Keine Elemente ausgewählt.',
  'Persönlich',
  'Dieser Ordner ist leer.',
  'Hochladen',
  'Keine Dateien gefunden'
]
    And "Alice" navigates to the shared with me page
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "shares"
🔤 Detected texts for language check: [
  'Mit mir geteilte Dateien',
  'Keine Elemente ausgewählt.',
  'Mit mir geteilt',
  'Mit anderen geteilt',
  'Mit mir geteilt',
  'Filter:',
  'Geteilt von',
  'Suchen',
  'Info',
  'Geteilt von',
  'Geteilt mit',
  'Geteilt am',
  'Ansehen, herunterladen, hochladen, editieren, hinzufügen, löschen.',
  'Mit deinen Geräten synchronisiert'
]
🌐 Language check failed in shares. Non-German texts:
 - Info [eng]
    And "Alice" navigates to the shared with others page
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "shares"
🔤 Detected texts for language check: [
  'Mit anderen geteilte Dateien',
  'Keine Elemente ausgewählt.',
  'Mit mir geteilt',
  'Mit anderen geteilt',
  'Mit anderen geteilt',
  'Filter:',
  'Geteilt mit',
  'Geteilt am',
  'Persönlich'
]
    And "Alice" navigates to the shared via link page
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "shares"
🔤 Detected texts for language check: [
  'Keine Elemente ausgewählt.',
  'Mit mir geteilt',
  'Mit anderen geteilt'
]
    And "Alice" navigates to the projects space page
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "project spaces"
🔤 Detected texts for language check: [ 'Keine Elemente ausgewählt.', 'Suchen', 'Gesamtquota' ]
    And "Alice" switches to the "tiles" view
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "project spaces"
🔤 Detected texts for language check: [ 'Keine Elemente ausgewählt.', 'Suchen' ]
    And "Alice" navigates to the project space "my_space"
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "project spaces"
🔤 Detected texts for language check: [ 'Keine Elemente ausgewählt.', 'Hochladen' ]
    And "Alice" switches to the "table" view
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "project spaces"
🔤 Detected texts for language check: [ 'Keine Elemente ausgewählt.', 'Hochladen', 'Größe' ]
    And "Alice" navigates to the trashbin
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "deleted files"
🔤 Detected texts for language check: [
  'Keine Elemente ausgewählt.',
  'Gelöschte Dateien',
  'Suchen',
  'Persönlich'
]
    And "Alice" opens trashbin of the personal space
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "deleted files -> Personal"
🔤 Detected texts for language check: [
  'Persönlich',
  'Keine Elemente ausgewählt.',
  'Gelöschte Dateien',
  'Persönlich',
  'Persönlich',
  'Gelöscht',
  'deletedFolder',
  'Persönlich'
]
    And "Alice" searches "test" using the global search and the "all files" filter and presses enter
    And "Alice" checks the accessibility of the DOM selector ".files-view-wrapper" on the "Search result"
🔤 Detected texts for language check: [ 'Keine Elemente ausgewählt.', 'Filter:', 'Größe', 'Persönlich' ]
    And "Brian" checks the accessibility of the DOM selector "#oc-topbar" on the "top bar"
🔤 Detected texts for language check: [ 'Alle Dateien', 'Search' ]
    And "Brian" opens location search panel
    And "Brian" checks the accessibility of the DOM selector ".tippy-content" on the "search panel"
🔤 Detected texts for language check: [ 'Aktueller Ordner', 'Alle Dateien' ]
    And "Brian" opens notifications dropdown
    And "Brian" checks the accessibility of the DOM selector "#oc-notifications-drop" on the "notifications dropdown"
🔤 Detected texts for language check: [ 'Alle als gelesen markieren', 'hat', 'mit Ihnen geteilt' ]
    And "Brian" opens the apps menu
    And "Brian" checks the accessibility of the DOM selector "#app-switcher-dropdown" on the "apps menu"
🔤 Detected texts for language check: [
  'Dateien',
  'Texteditor',
  'App Store',
  'Aktivitäten',
  'ScienceMesh',
  'Kalender'
]
🌐 Language check failed in apps menu. Non-German texts:
 - Texteditor [eng]
 - App Store [eng]
 - ScienceMesh [eng]
    And "Brian" checks the accessibility of the DOM selector "#web-nav-sidebar" on the "left sidebar"
🔤 Detected texts for language check: [ 'Persönlich', 'Gelöschte Dateien', 'Up to date' ]
🌐 Language check failed in left sidebar. Non-German texts:
 - Up to date [eng]
    And "Brian" opens the user menu
    And "Brian" opens "Profile" on the user menu
    And "Brian" checks the accessibility of the DOM selector "#account-information" on the "account menu->profile"
🔤 Detected texts for language check: [
  'Kontoinformationen',
  'Wert der Information',
  'Hochladen',
  'Persönlicher Speicherplatz',
  'Gruppenzugehörigkeiten',
  'Sie gehören keiner Gruppe an.'
]
🌐 Language check failed in account menu->profile. Non-German texts:
 - Kontoinformationen [eng]
    And "Brian" opens "Preferences" on the user menu
    And "Brian" checks the accessibility of the DOM selector "#account-preferences" on the "account menu->preferences"
🔤 Detected texts for language check: [
  'Einstellungen',
  'Sprache',
  'Wählen Sie Ihre Sprache.',
  'Deutsch - German',
  '**********',
  'Design',
  'Automatisch (dem System entsprechend)',
  'Optionen anzeigen'
]
🌐 Language check failed in account menu->preferences. Non-German texts:
 - ********** [und]
    And "Brian" opens "Extensions" on the user menu
    And "Brian" checks the accessibility of the DOM selector "#account-extensions" on the "account menu->extensions"
🔤 Detected texts for language check: [ 'Erweiterungen', 'Wert der Erweiterung' ]
    And "Brian" opens "Calendar" on the user menu
    And "Brian" checks the accessibility of the DOM selector "#account-calendar" on the "account menu->calendar"
🔤 Detected texts for language check: [
  'Kalender',
  'Ein App-Token muss erstellt werden und kann dann verwendet werden.'
]
    And "Brian" opens "GDPR" on the user menu
    And "Brian" checks the accessibility of the DOM selector "#account-gdpr" on the "account menu->gdpr"
🔤 Detected texts for language check: [ 'DSGVO' ]
🌐 Language check failed in account menu->gdpr. Non-German texts:
 - DSGVO [eng]
    And "Brian" opens the "admin-settings" app
    And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->general"
🔤 Detected texts for language check: [ 'Allgemein', 'Allgemein', 'Info' ]
🌐 Language check failed in admin settings->general. Non-German texts:
 - Info [eng]
    And "Brian" navigates to the users management page
    And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->users"
🔤 Detected texts for language check: [
  'Person anlegen',
  'Filter:',
  'Gruppen',
  'Rollen',
  'Suchen',
  'Select users',
  'Rolle'
]
    And "Brian" selects the user "Alice"
    And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->users"
🔤 Detected texts for language check: [
  'Person anlegen',
  'Löschen',
  'Quota ändern',
  'Zu Gruppe(n) hinzufügen',
  'Aus Gruppen entfernen',
  'Filter:',
  'Gruppen',
  'Rollen',
  'Suchen',
  'Select users',
  'Rolle'
]
    And "Brian" opens the edit panel of user "Alice" using the context menu
    And "Brian" checks the accessibility of the DOM selector "#sidebar-panel-EditPanel" on the "admin settings->users->edit user sidebar panel"
🔤 Detected texts for language check: [
  'Rolle',
  'Persönliches Quota',
  'Gruppen',
  'Keine Änderungen',
  'Zurücknehmen',
  'Speichern'
]
    And "Brian" navigates to the groups management page
    And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->groups"
🔤 Detected texts for language check: [
  'Gruppen',
  'Gruppen',
  'Suchen',
  'Mitglieder',
  'apollos',
  'chess-lovers',
  'machine-lovers',
  'programmers',
  'unix-lovers',
  'users',
  'vlsi-lovers'
]
🌐 Language check failed in admin settings->groups. Non-German texts:
 - apollos [eng]
 - programmers [eng]
    And "Brian" selects the group "sales"
    And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->groups"
🔤 Detected texts for language check: [
  'Gruppen',      'Gruppen',
  'Löschen',      'Suchen',
  'Mitglieder',   'apollos',
  'chess-lovers', 'machine-lovers',
  'programmers',  'unix-lovers',
  'users',        'vlsi-lovers'
]
🌐 Language check failed in admin settings->groups. Non-German texts:
 - apollos [eng]
 - programmers [eng]
    And "Brian" opens the edit panel of group "sales" using the context menu
    And "Brian" checks the accessibility of the DOM selector "#sidebar-panel-EditPanel" on the "admin settings->groups->edit group sidebar panel"
🔤 Detected texts for language check: [ 'Keine Änderungen', 'Zurücknehmen', 'Speichern' ]
    And "Brian" navigates to the project spaces management page
    And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->spaces"
🔤 Detected texts for language check: [ 'Suchen', 'Icon', 'Mitglieder', 'Gesamtquota' ]
🌐 Language check failed in admin settings->spaces. Non-German texts:
 - Icon [eng]
    And "Brian" selects the space "my_space"
    And "Brian" checks the accessibility of the DOM selector "#admin-settings-view-wrapper" on the "admin settings->spaces"
🔤 Detected texts for language check: [
  'Quota ändern',
  'Deaktivieren',
  'Suchen',
  'Icon',
  'Mitglieder',
  'Gesamtquota'
]
🌐 Language check failed in admin settings->spaces. Non-German texts:
 - Icon [eng]
    And "Brian" lists the members of project space "my_space" using a sidebar panel
    And "Brian" checks the accessibility of the DOM selector "#sidebar-panel-SpaceMembers" on the "admin settings->spaces->members sidebar panel"
🔤 Detected texts for language check: [ 'Mitglieder', 'Mitglieder filtern', 'Kann verwalten' ]
    And "Alice" navigates to the project space "my_space"
    And "Alice" checks the accessibility of the DOM selector "#files-view" on the "project space page"
🔤 Detected texts for language check: [ 'Keine Elemente ausgewählt.', 'Hochladen', 'Größe' ]
    And "Brian" opens the "files" app
    And "Brian" navigates to the projects space page
    And "Brian" checks the accessibility of the DOM selector "#files-view" on the "project spaces page"
🔤 Detected texts for language check: [ 'Keine Elemente ausgewählt.' ]
    And "Alice" opens the "files" app
    And "Alice" opens the right sidebar of the resource "lorem.txt"
    And "Alice" checks the accessibility of the DOM selector "#sidebar-panel-details" on the "right sidebar"
🔤 Detected texts for language check: [ 'Details', 'Größe', 'Aktivitäten' ]
    And "Alice" opens a "actions" panel of the resource "lorem.txt"
    And "Alice" checks the accessibility of the DOM selector "#sidebar-panel-actions" on the "right sidebar->actions panel"
🔤 Detected texts for language check: [
  'Text Editor',
  'Herunterladen',
  'Löschen',
  'Ausschneiden',
  'Kopieren'
]
🌐 Language check failed in right sidebar->actions panel. Non-German texts:
 - Text Editor [eng]
    And "Alice" opens a "versions" panel of the resource "lorem.txt"
    And "Alice" checks the accessibility of the DOM selector "#sidebar-panel-versions" on the "right sidebar->versions panel"
🔤 Detected texts for language check: []
    And "Alice" opens a "activities" panel of the resource "lorem.txt"
    And "Alice" checks the accessibility of the DOM selector "#sidebar-panel-activities" on the "right sidebar->activities panel"
🔤 Detected texts for language check: [ 'Aktivitäten', 'added' ]
🌐 Language check failed in right sidebar->activities panel. Non-German texts:
 - added [eng]
    And "Alice" opens a "sharing" panel of the resource "lorem.txt"
    And "Alice" checks the accessibility of the DOM selector "#sidebar-panel-sharing" on the "right sidebar->sharing panel"
🔤 Detected texts for language check: [
  'Suchen',
  'Kann anzeigen',
  'Teilen',
  'Die Datei ist nicht öffentlich geteilt.'
]
    And "Alice" creates a public link of following resource using the sidebar panel
      │ resource │ role             │ password │
      │ parent   │ Secret File Drop │ %public% │
🔤 Detected texts for language check: [ 'Kann anzeigen', 'Weitere Optionen' ]
🔤 Detected texts for language check: [
  'Kann anzeigen',
  'Ansehen, herunterladen',
  'File Drop (geheim)',
  'Nur hochladen, existierende Inhalte werden nicht angezeigt'
]
    And "Anonymous" opens the public link "Unnamed link"
    And "Anonymous" checks the accessibility of the DOM selector "#opencloud" on the "public link page->before unlock"
🔤 Detected texts for language check: [ 'Skip to main', 'This resource is password-protected', 'Continue' ]
🌐 Language check failed in public link page->before unlock. Non-German texts:
 - Skip to main [eng]
 - This resource is password-protected [eng]
 - Continue [eng]
    And "Anonymous" unlocks the public link with password "%public%"
    And "Anonymous" checks the accessibility of the DOM selector "#files" on the "public link page"
🔤 Detected texts for language check: [ 'Drop files here to upload or click to select file' ]
🌐 Language check failed in public link page. Non-German texts:
 - Drop files here to upload or click to select file [eng]
    And "Alice" logs out
    And "Brian" logs out

Waiting for the debugger to disconnect...
1 scenario (1 passed)
101 steps (101 passed)

@ScharfViktor ScharfViktor changed the title [full-ci] e2e. ensure German localization is correct [localization-de] e2e. ensure German localization is correct Oct 7, 2025
@ScharfViktor ScharfViktor force-pushed the GermanLanguacheCheck branch 2 times, most recently from c974297 to eccfe14 Compare October 8, 2025 14:56
@ScharfViktor
Copy link
Contributor Author

@tbsbdr during testing, I noticed that the login page and the public link page are not fully translated into German.

@ScharfViktor ScharfViktor marked this pull request as ready for review October 8, 2025 14:59
Copilot AI review requested due to automatic review settings October 8, 2025 14:59
Copy link
Contributor

Copilot AI left a 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-min library 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.

Copy link
Contributor

@JammingBen JammingBen left a 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.

Copy link
Contributor

@tammi-23 tammi-23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@ScharfViktor ScharfViktor force-pushed the GermanLanguacheCheck branch 2 times, most recently from 3cf645c to b87cadf Compare October 9, 2025 12:31
@ScharfViktor ScharfViktor merged commit 808ef4b into main Oct 9, 2025
29 checks passed
@ScharfViktor ScharfViktor deleted the GermanLanguacheCheck branch October 9, 2025 15:18
@openclouders openclouders mentioned this pull request Oct 9, 2025
1 task
@ScharfViktor
Copy link
Contributor Author

ScharfViktor commented Oct 10, 2025

Here is a list of untranslated words:

🌐 Language check failed in before clicking login submit. Non-German texts:

 - Password [eng]
 - Log in [eng]
 - - excellent file sharing [eng]
 - Info [eng]
 - Icon [eng]
 - added [eng]
 - Skip to main [eng]
 - This resource is password-protected [eng]
 - Continue [eng]
 - Drop files here to upload or click to select file [eng]

Not sure if this should be translated:

 - Texteditor [eng]
 - App Store [eng]
 - ScienceMesh [eng]
 - SGVO [eng]
 - Text Editor [eng]

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants