From bd5b3375f059e71564e6baad26ab1def3dbada15 Mon Sep 17 00:00:00 2001 From: nendo Date: Tue, 10 Mar 2026 16:20:27 +0900 Subject: [PATCH] fix: remove unused User import and add i18n keys to all locales Fixes trunk_check (unused import) and check-translations (missing keys in non-en_US locales) CI failures. --- backend/tests/endpoints/test_client_tokens.py | 2 +- frontend/src/locales/cs_CZ/settings.json | 17 +++++++++++++++++ frontend/src/locales/de_DE/settings.json | 17 +++++++++++++++++ frontend/src/locales/en_GB/settings.json | 17 +++++++++++++++++ frontend/src/locales/es_ES/settings.json | 17 +++++++++++++++++ frontend/src/locales/fr_FR/settings.json | 17 +++++++++++++++++ frontend/src/locales/hu_HU/settings.json | 17 +++++++++++++++++ frontend/src/locales/it_IT/settings.json | 17 +++++++++++++++++ frontend/src/locales/ja_JP/settings.json | 17 +++++++++++++++++ frontend/src/locales/ko_KR/settings.json | 17 +++++++++++++++++ frontend/src/locales/pl_PL/settings.json | 17 +++++++++++++++++ frontend/src/locales/pt_BR/settings.json | 17 +++++++++++++++++ frontend/src/locales/ro_RO/settings.json | 17 +++++++++++++++++ frontend/src/locales/ru_RU/settings.json | 17 +++++++++++++++++ frontend/src/locales/zh_CN/settings.json | 17 +++++++++++++++++ frontend/src/locales/zh_TW/settings.json | 17 +++++++++++++++++ 16 files changed, 256 insertions(+), 1 deletion(-) diff --git a/backend/tests/endpoints/test_client_tokens.py b/backend/tests/endpoints/test_client_tokens.py index 406ce39fa..36578984e 100644 --- a/backend/tests/endpoints/test_client_tokens.py +++ b/backend/tests/endpoints/test_client_tokens.py @@ -11,7 +11,7 @@ from handler.auth.base_handler import hash_client_token from handler.database import db_client_token_handler, db_user_handler from handler.redis_handler import sync_cache from models.client_token import ClientToken -from models.user import Role, User +from models.user import Role @pytest.fixture diff --git a/frontend/src/locales/cs_CZ/settings.json b/frontend/src/locales/cs_CZ/settings.json index 6fc4eba2a..09a3c3574 100644 --- a/frontend/src/locales/cs_CZ/settings.json +++ b/frontend/src/locales/cs_CZ/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Fyzický obal", "boxart-style": "Styl obalu", "canceled": "Zrušeno", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Vyčištění", "cleanup-all": "Vyčistit vše", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/de_DE/settings.json b/frontend/src/locales/de_DE/settings.json index 581a8076e..da024e062 100644 --- a/frontend/src/locales/de_DE/settings.json +++ b/frontend/src/locales/de_DE/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Physisch", "boxart-style": "Boxart-Stil", "canceled": "Abgebrochen", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Bereinigung", "cleanup-all": "Alles bereinigen", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/en_GB/settings.json b/frontend/src/locales/en_GB/settings.json index d92c5535a..009c67c6c 100644 --- a/frontend/src/locales/en_GB/settings.json +++ b/frontend/src/locales/en_GB/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Physical", "boxart-style": "Boxart style", "canceled": "Cancelled", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Cleanup", "cleanup-all": "Clean up all", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/es_ES/settings.json b/frontend/src/locales/es_ES/settings.json index 23d46680c..0478735d1 100644 --- a/frontend/src/locales/es_ES/settings.json +++ b/frontend/src/locales/es_ES/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Físico", "boxart-style": "Estilo de carátula", "canceled": "Cancelado", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Limpieza", "cleanup-all": "Limpiar todo", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/fr_FR/settings.json b/frontend/src/locales/fr_FR/settings.json index f2c5e2069..e372220f0 100644 --- a/frontend/src/locales/fr_FR/settings.json +++ b/frontend/src/locales/fr_FR/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Physique", "boxart-style": "Style de jaquette", "canceled": "Annulé", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Nettoyage", "cleanup-all": "Tout nettoyer", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/hu_HU/settings.json b/frontend/src/locales/hu_HU/settings.json index 8aba59b6f..0633c04b2 100644 --- a/frontend/src/locales/hu_HU/settings.json +++ b/frontend/src/locales/hu_HU/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Fizikai", "boxart-style": "Boxart stílus", "canceled": "Visszavonva", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Takarítás", "cleanup-all": "Mindent tisztítson meg", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/it_IT/settings.json b/frontend/src/locales/it_IT/settings.json index 3acabf951..8a865407c 100644 --- a/frontend/src/locales/it_IT/settings.json +++ b/frontend/src/locales/it_IT/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Fisico", "boxart-style": "Stile copertina", "canceled": "Annullato", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Pulizia", "cleanup-all": "Pulisci tutto", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/ja_JP/settings.json b/frontend/src/locales/ja_JP/settings.json index b06b4150b..2074eadc6 100644 --- a/frontend/src/locales/ja_JP/settings.json +++ b/frontend/src/locales/ja_JP/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "物理", "boxart-style": "ボックスアートスタイル", "canceled": "キャンセル済み", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "クリーンアップ", "cleanup-all": "すべてクリーンアップ", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/ko_KR/settings.json b/frontend/src/locales/ko_KR/settings.json index 1097315de..452b3a55d 100644 --- a/frontend/src/locales/ko_KR/settings.json +++ b/frontend/src/locales/ko_KR/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "물리적", "boxart-style": "박스아트 스타일", "canceled": "취소됨", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "정리", "cleanup-all": "모두 정리", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/pl_PL/settings.json b/frontend/src/locales/pl_PL/settings.json index ecc6427f7..9b60eac5b 100644 --- a/frontend/src/locales/pl_PL/settings.json +++ b/frontend/src/locales/pl_PL/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Fizyczny", "boxart-style": "Styl okładki", "canceled": "Anulowano", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Czyszczenie", "cleanup-all": "Wyczyść wszystko", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/pt_BR/settings.json b/frontend/src/locales/pt_BR/settings.json index 9d54b0b2f..d71afb12b 100644 --- a/frontend/src/locales/pt_BR/settings.json +++ b/frontend/src/locales/pt_BR/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Físico", "boxart-style": "Estilo da capa", "canceled": "Cancelado", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Limpeza", "cleanup-all": "Limpar tudo", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/ro_RO/settings.json b/frontend/src/locales/ro_RO/settings.json index d7b99becb..4e885ecd0 100644 --- a/frontend/src/locales/ro_RO/settings.json +++ b/frontend/src/locales/ro_RO/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Fizic", "boxart-style": "Stilul copertii", "canceled": "Anulat", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Curățare", "cleanup-all": "Curăță tot", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/ru_RU/settings.json b/frontend/src/locales/ru_RU/settings.json index fbd72bc21..e1345786a 100644 --- a/frontend/src/locales/ru_RU/settings.json +++ b/frontend/src/locales/ru_RU/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "Физический", "boxart-style": "Стиль обложки", "canceled": "Отменено", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "Очистка", "cleanup-all": "Очистить все", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/zh_CN/settings.json b/frontend/src/locales/zh_CN/settings.json index 7db6a02bf..89be8d866 100644 --- a/frontend/src/locales/zh_CN/settings.json +++ b/frontend/src/locales/zh_CN/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "物理", "boxart-style": "封面样式", "canceled": "已取消", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "清理", "cleanup-all": "清理全部", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.", diff --git a/frontend/src/locales/zh_TW/settings.json b/frontend/src/locales/zh_TW/settings.json index b9cd6487f..125272040 100644 --- a/frontend/src/locales/zh_TW/settings.json +++ b/frontend/src/locales/zh_TW/settings.json @@ -13,6 +13,23 @@ "boxart-physical": "物理", "boxart-style": "封面樣式", "canceled": "已取消", + "client-api-tokens": "Client API Tokens", + "client-token-confirm-delete": "Are you sure you want to revoke this token? Any device using it will lose access.", + "client-token-confirm-regenerate": "This will invalidate the current credential. Any device using the old token will need to be re-paired.", + "client-token-copied": "Token copied to clipboard", + "client-token-created": "Token created successfully", + "client-token-deleted": "Token revoked successfully", + "client-token-delivery-hint": "This token will not be shown again.", + "client-token-expiry-30d": "30 days", + "client-token-expiry-90d": "90 days", + "client-token-expiry-1y": "1 year", + "client-token-expiry-never": "Never", + "client-token-name": "Token name", + "client-token-pair-claimed": "Device paired successfully!", + "client-token-pair-expired": "Pairing code expired", + "client-token-regenerated": "Token regenerated successfully", + "client-token-scopes": "Permissions", + "client-token-select-expiry": "Expiration", "cleanup": "清理", "cleanup-all": "清理全部", "cleanup-all-confirm": "This will permanently delete all missing ROMs{platform} from the database and their resource directories. This action cannot be undone.",