chore: make more translation keys avaliable (#6589)

This commit is contained in:
Frank Elsinga 2026-01-06 02:06:19 +01:00 committed by GitHub
commit 6f0276913b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 43 additions and 40 deletions

View File

@ -22,6 +22,7 @@ jobs:
contents: read
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04, windows-latest, ubuntu-22.04-arm]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
@ -41,13 +42,13 @@ jobs:
id: node-modules-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm clean-install --no-fund
- name: Rebuild native modules for ARM64
if: matrix.os == 'ubuntu-22.04-arm'
@ -65,6 +66,7 @@ jobs:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
node: [ 20, 22 ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
@ -86,8 +88,8 @@ jobs:
docker run --rm --platform linux/arm/v7 \
-v $PWD:/workspace \
-w /workspace \
arm32v7/node:${{ matrix.node }}-slim \
bash -c "npm install --production"
arm32v7/node:${{ matrix.node }} \
npm clean-install --no-fund --production
check-linters:
runs-on: ubuntu-latest
@ -104,13 +106,13 @@ jobs:
id: node-modules-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js 20
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 20
- run: npm install
- run: npm clean-install --no-fund
- run: npm run lint:prod
e2e-test:
@ -129,13 +131,13 @@ jobs:
id: node-modules-cache
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
key: node-modules-${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- name: Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22
- run: npm install
- run: npm clean-install --no-fund
- name: Rebuild native modules for ARM64
run: npm rebuild @louislam/sqlite3

View File

@ -7,7 +7,7 @@
<h5 class="modal-title">
{{ $t("Add API Key") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<!-- Name -->
@ -67,7 +67,7 @@
<h5 class="modal-title">
{{ $t("Key Added") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">

View File

@ -6,7 +6,7 @@
<h5 class="modal-title">
{{ $t("Badge Generator", [monitor.name]) }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="mb-3">

View File

@ -6,17 +6,17 @@
<h5 id="exampleModalLabel" class="modal-title">
{{ title || $t("Confirm") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<slot />
</div>
<div class="modal-footer">
<button type="button" class="btn" :class="btnStyle" data-bs-dismiss="modal" @click="yes">
{{ yesText }}
{{ yesText || $t("Yes") }}
</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" @click="no">
{{ noText }}
{{ noText || $t("No") }}
</button>
</div>
</div>
@ -37,12 +37,12 @@ export default {
/** Text to use as yes */
yesText: {
type: String,
default: "Yes", // TODO: No idea what to translate this
default: null,
},
/** Text to use as no */
noText: {
type: String,
default: "No",
default: null,
},
/** Title to show on modal. Defaults to translated version of "Config" */
title: {

View File

@ -6,7 +6,7 @@
<h5 class="modal-title">
{{ $t("New Group") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<form @submit.prevent="confirm">

View File

@ -7,7 +7,7 @@
<h5 id="exampleModalLabel" class="modal-title">
{{ $t("Setup Docker Host") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="mb-3">

View File

@ -6,7 +6,7 @@
<h5 class="modal-title">
{{ $t("Monitor Setting", [monitor.name]) }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="my-3 form-check">

View File

@ -7,7 +7,7 @@
<h5 id="exampleModalLabel" class="modal-title">
{{ $t("Setup Notification") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="mb-3">

View File

@ -7,7 +7,7 @@
<h5 id="exampleModalLabel" class="modal-title">
{{ $t("Setup Proxy") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="mb-3">

View File

@ -7,7 +7,7 @@
<h5 id="exampleModalLabel" class="modal-title">
{{ $t("Add a Remote Browser") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="mb-3">

View File

@ -6,10 +6,10 @@
<h5 class="modal-title">
{{ $t("Browser Screenshot") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body"></div>
<img :src="imageURL" alt="screenshot of the website">
<img :src="imageURL" :alt="$t('screenshot of the website')">
</div>
</div>
</div>

View File

@ -7,7 +7,7 @@
<h5 id="exampleModalLabel" class="modal-title">
{{ $t("Edit Tag") }}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="mb-3">

View File

@ -9,7 +9,7 @@
<span v-if="twoFAStatus == true" class="badge bg-primary">{{ $t("Active") }}</span>
<span v-if="twoFAStatus == false" class="badge bg-primary">{{ $t("Inactive") }}</span>
</h5>
<button :disabled="processing" type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" />
<button :disabled="processing" type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="$t('Close')" />
</div>
<div class="modal-body">
<div class="mb-3">

View File

@ -85,12 +85,12 @@ export default {
title() {
if (this.type === "1y") {
return `1${this.$t("-year")}`;
return `1 ${this.$tc("year", 1)}`;
}
if (this.type === "720") {
return `30${this.$t("-day")}`;
return `30 ${this.$tc("day", 30)}`;
}
return `24${this.$t("-hour")}`;
return `24 ${this.$tc("hour", 24)}`;
}
},
};

View File

@ -20,7 +20,7 @@
<div
class="btn-group"
role="group"
aria-label="Basic checkbox toggle button group"
:aria-label="$t('Basic checkbox toggle button group')"
>
<input
id="btncheck1"
@ -69,7 +69,7 @@
<div
class="btn-group"
role="group"
aria-label="Basic checkbox toggle button group"
:aria-label="$t('Basic checkbox toggle button group')"
>
<input
id="btncheck4"

View File

@ -52,10 +52,8 @@
"now": "now",
"time ago": "{0} ago",
"day": "day | days",
"-day": "-day",
"hour": "hour",
"-hour": "-hour",
"-year": "-year",
"hour": "hour | hours",
"year": "year | years",
"Response": "Response",
"Ping": "Ping",
"Monitor Type": "Monitor Type",
@ -1246,6 +1244,9 @@
"minimumIntervalWarning": "Intervals below 20 seconds may result in poor performance.",
"lowIntervalWarning": "Are you sure want to set the interval value below 20 seconds? Performance may be degraded, particularly if there are a large number of monitors.",
"imageResetConfirmation": "Image reset to default",
"screenshot of the website": "Screenshot of the website",
"Basic checkbox toggle button group": "Basic checkbox toggle button group",
"Basic radio toggle button group": "Basic radio toggle button group",
"mtls-auth-server-cert-label": "Cert",
"mtls-auth-server-cert-placeholder": "Cert body",
"mtls-auth-server-key-label": "Key",

View File

@ -237,7 +237,7 @@
>
<h4 class="col-4 col-sm-12">{{ pingTitle(true) }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2">
(24{{ $t("-hour") }})
({{ 24 }} {{ $tc("hour", 24) }})
</p>
<span class="col-4 col-sm-12 num">
<CountUp :value="avgPing" />
@ -250,7 +250,7 @@
>
<h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2">
(24{{ $t("-hour") }})
({{ 24 }} {{ $tc("hour", 24) }})
</p>
<span class="col-4 col-sm-12 num">
<Uptime :monitor="monitor" type="24" />
@ -263,7 +263,7 @@
>
<h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2">
(30{{ $t("-day") }})
({{ 30 }} {{ $tc("day", 30) }})
</p>
<span class="col-4 col-sm-12 num">
<Uptime :monitor="monitor" type="720" />
@ -276,7 +276,7 @@
>
<h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2">
(1{{ $t("-year") }})
({{ 1 }} {{ $tc("year", 1) }})
</p>
<span class="col-4 col-sm-12 num">
<Uptime :monitor="monitor" type="1y" />

View File

@ -33,7 +33,7 @@
{{ $t("setupDatabaseChooseDatabase") }}
</p>
<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
<div class="btn-group" role="group" :aria-label="$t('Basic radio toggle button group')">
<template v-if="info.isEnabledEmbeddedMariaDB">
<input id="btnradio3" v-model="dbConfig.type" type="radio" class="btn-check" autocomplete="off" value="embedded-mariadb">