Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ module.exports = {
plugins: [
'perfectionist'
],
overrides: [
{
files: ['l10n/*.json'],
parser: 'jsonc-eslint-parser',
plugins: ['jsonc'],
rules: {
// Catch trailing commas (the class of bug that broke translations in commit 48cc7ad)
'jsonc/comma-dangle': ['error', 'never'],
// Disable JS-style rules inherited from @nextcloud that produce noise on auto-generated files
'comma-spacing': 'off',
'eol-last': 'off',
'no-irregular-whitespace': 'off',
},
Comment on lines +14 to +24
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The override uses jsonc-eslint-parser, which will successfully parse JSONC features like comments. Without an explicit rule, a PR could introduce // or /* */ comments in l10n/*.json and npm run lint:l10n would still pass even though the files would no longer be valid JSON for runtime consumers. Consider adding a JSONC rule (e.g. jsonc/no-comments: 'error', and/or otherwise enforcing strict JSON) in this override so the linter blocks commented translation files.

Copilot uses AI. Check for mistakes.
},
],
globals: {
expect: true,
OC: true,
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/lint-l10n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# SPDX-FileCopyrightText: 2026 STRATO GmbH
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Lint l10n

on: pull_request

Choose a reason for hiding this comment

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

Lets prevent this action from running on every PR if there have been no changes to the translation jsons

  pull_request:
    paths:
      - 'l10n/**/*.json'


permissions:
contents: read

concurrency:
group: lint-l10n-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read

Comment on lines +16 to +21
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

changes and summary jobs only run lightweight steps (paths-filter / a single shell check). Other workflows in this repo run these kinds of jobs on ubuntu-latest-low (e.g. .github/workflows/lint-eslint.yml) to reduce CI resource usage; consider switching runs-on for these jobs to ubuntu-latest-low as well.

Copilot uses AI. Check for mistakes.
outputs:
src: ${{ steps.changes.outputs.src }}

steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
continue-on-error: true
with:
filters: |
src:
- '.github/workflows/**'
- 'l10n/**'
- '.eslintrc.*'
- 'package.json'
- 'package-lock.json'

lint:
runs-on: ubuntu-latest

needs: changes
if: needs.changes.outputs.src != 'false'

name: l10n JSON lint

steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'

- name: Install dependencies
env:
CYPRESS_INSTALL_BINARY: 0
PUPPETEER_SKIP_DOWNLOAD: true
run: npm ci

- name: Lint l10n JSON files
run: npm run lint:l10n

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: [changes, lint]

if: always()

name: l10n

steps:
- name: Summary status
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
2 changes: 1 addition & 1 deletion l10n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,6 @@
"IMAP access / password" : "IMAP-Zugang/Passwort",
"Generate password" : "Passwort generieren",
"Copy password" : "Passwort kopieren",
"Please save this password now. For security reasons, it will not be shown again." : "Bitte speichern Sie dieses Passwort jetzt. Aus Sicherheitsgründen wird es nicht erneut angezeigt.",
"Please save this password now. For security reasons, it will not be shown again." : "Bitte speichern Sie dieses Passwort jetzt. Aus Sicherheitsgründen wird es nicht erneut angezeigt."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
2 changes: 1 addition & 1 deletion l10n/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@
"Mailvelope is a browser extension that enables easy OpenPGP encryption and decryption for emails." : "Mailvelope is a browser extension that enables easy OpenPGP encryption and decryption for emails.",
"Step 1: Install Mailvelope browser extension" : "Step 1: Install Mailvelope browser extension",
"Step 2: Enable Mailvelope for the current domain" : "Step 2: Enable Mailvelope for the current domain",
"To access your mailbox via IMAP, you can generate an app-specific password. This password allows IMAP clients to connect to your account." : "To access your mailbox via IMAP, you can generate an app-specific password. This password allows IMAP clients to connect to your account."
"To access your mailbox via IMAP, you can generate an app-specific password. This password allows IMAP clients to connect to your account." : "To access your mailbox via IMAP, you can generate an app-specific password. This password allows IMAP clients to connect to your account.",
"IMAP access / password" : "IMAP access / password",
"Generate password" : "Generate password",
"Copy password" : "Copy password",
Expand Down
4 changes: 2 additions & 2 deletions l10n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,6 @@
"IMAP access / password" : "Acceso IMAP / contraseña",
"Generate password" : "Generar contraseña",
"Copy password" : "Copiar contraseña",
"Please save this password now. For security reasons, it will not be shown again." : "Guarde esta contraseña ahora. Por motivos de seguridad, no se volverá a mostrar.",
,"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
"Please save this password now. For security reasons, it will not be shown again." : "Guarde esta contraseña ahora. Por motivos de seguridad, no se volverá a mostrar."
},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
}
2 changes: 1 addition & 1 deletion l10n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,6 @@
"IMAP access / password" : "Accès IMAP / mot de passe",
"Generate password" : "générer un mot de passe",
"Copy password" : "copier le mot de passe",
"Please save this password now. For security reasons, it will not be shown again." : "Veuillez enregistrer ce mot de passe dès maintenant. Pour des raisons de sécurité, il ne sera plus affiché.",
"Please save this password now. For security reasons, it will not be shown again." : "Veuillez enregistrer ce mot de passe dès maintenant. Pour des raisons de sécurité, il ne sera plus affiché."
},"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
}
2 changes: 1 addition & 1 deletion l10n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,6 @@
"IMAP access / password" : "Accesso IMAP / password",
"Generate password" : "generare password",
"Copy password" : "copia password",
"Please save this password now. For security reasons, it will not be shown again." : "Salva questa password adesso. Per motivi di sicurezza, non verrà più visualizzata.",
"Please save this password now. For security reasons, it will not be shown again." : "Salva questa password adesso. Per motivi di sicurezza, non verrà più visualizzata."
},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
}
2 changes: 1 addition & 1 deletion l10n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,6 @@
"IMAP access / password" : "IMAP-toegang / wachtwoord",
"Generate password" : "wachtwoord genereren",
"Copy password" : "wachtwoord kopiëren",
"Please save this password now. For security reasons, it will not be shown again." : "Sla dit wachtwoord nu op. Om veiligheidsredenen wordt het niet opnieuw weergegeven.",
"Please save this password now. For security reasons, it will not be shown again." : "Sla dit wachtwoord nu op. Om veiligheidsredenen wordt het niet opnieuw weergegeven."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
2 changes: 1 addition & 1 deletion l10n/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,6 @@
"IMAP access / password" : "IMAP-åtkomst / lösenord",
"Generate password" : "generera lösenord",
"Copy password" : "kopiera lösenord",
"Please save this password now. For security reasons, it will not be shown again." : "Spara detta lösenord nu. Av säkerhetsskäl kommer det inte att visas igen.",
"Please save this password now. For security reasons, it will not be shown again." : "Spara detta lösenord nu. Av säkerhetsskäl kommer det inte att visas igen."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}
168 changes: 165 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading