generated from SteamDeckHomebrew/decky-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add multilingual support (#39)
* move default.json to data * initial translate code * simplify code * rename zh-cn json * closure! no useMemo * initial translate strings * update en.json * update zh-cn.json * more languages * update default strings * add translator credit * setup languages
- Loading branch information
Showing
18 changed files
with
437 additions
and
39 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"TRANSLATION": "Deutsch", | ||
"CREDIT": "", | ||
|
||
"SAVE": "Speichern", | ||
"DELETE": "Löschen", | ||
"CANCEL": "Abbrechen", | ||
"MESSAGE_SAVED": "Spielstartoptionen wurden gespeichert.", | ||
"MESSAGE_NON_STEAM": "Warnung: Dies ist KEIN Steam-Spiel! Einstellungen werden niemals gespeichert.", | ||
|
||
"CONTENT_TITLE": "Informationen", | ||
"CONTENT_NOTE0": "CheatDeck unterstützt derzeit nur den normalen Steam-Launcher.", | ||
"CONTENT_NOTE1": "Bitte aktivieren Sie den Entwicklermodus in den SteamOS-Einstellungen;", | ||
"CONTENT_NOTE2": "Sie finden die CheatDeck-Einstellung im Detailmenü des Spiels;", | ||
"CONTENT_NOTE3": "Verwenden Sie die STEAM-Taste, um zwischen Spiel- und Cheat-Fenstern zu wechseln;", | ||
"CONTENT_NOTE4": "Wenn Sie nicht auf das ausgewählte Cheat-Panel klicken können, schalten Sie das Spiel bitte in den Fenstermodus.", | ||
"CONTENT_GH_DESC": "Besuchen Sie die GitHub-Seite für weitere Informationen und Hilfe bei der Übersetzung.", | ||
"CONTENT_QR_DESC": "Link-QR anzeigen", | ||
|
||
"NORMAL_TITLE": "Normal", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "Cheat aktivieren", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "Wählen Sie die Cheat- oder Trainer-Exe-Datei aus dem Speicher aus", | ||
"NORMAL_CHEAT_LABEL": "EXE-Pfad", | ||
"NORMAL_LANG_TOGGLE_LABEL": "Sprache", | ||
"NORMAL_LANG_TOGGLE_DESC": "Legen Sie die Spielumgebungssprache fest", | ||
"NORMAL_LANG_LABEL": "Sprachcode", | ||
"NORMAL_LANG_DEFAULT": "Standard", | ||
|
||
"ADVANCED_TITLE": "Erweitert", | ||
"ADVANCED_DXVK_ASYNC_DESC": "Optimieren Sie die ProtonGE-Kompatibilitätsschicht, um die Framezeit und die Eingabeverzögerung zu reduzieren", | ||
"ADVANCED_RADV_PERFTEST_DESC": "Optimieren Sie das Shader-Cache-Verhalten der ProtonGE-Kompatibilitätsschicht", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "Geben Sie den Speicherpfad für Spieldaten an", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "Präfix-Ordner", | ||
|
||
"CUSTOM_TITLE": "Benutzerdefiniert", | ||
"CUSTOM_OPTION_LABEL": "Bezeichnung", | ||
"CUSTOM_OPTION_Fields": "Feld & Wert", | ||
"CUSTOM_EDIT_TITLE": "Option bearbeiten", | ||
"CUSTOM_NEW_TITLE": "Neue Option hinzufügen" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"TRANSLATION": "Translator", | ||
"CREDIT": "", | ||
|
||
"SAVE": "Save", | ||
"DELETE": "Delete", | ||
"CANCEL": "Cancel", | ||
"MESSAGE_SAVED": "Game launch options have been saved.", | ||
"MESSAGE_NON_STEAM": "Warning: This is NOT a Steam game! Settings will never be saved.", | ||
|
||
"CONTENT_TITLE": "Information", | ||
"CONTENT_NOTE0": "CheatDeck only support the normal Steam launcher for now.", | ||
"CONTENT_NOTE1": "Please enable developer mode in the SteamOS settings;", | ||
"CONTENT_NOTE2": "You can find the CheatDeck setting in the game details menu;", | ||
"CONTENT_NOTE3": "Use the STEAM key to switch between game and cheat windows;", | ||
"CONTENT_NOTE4": "If you are unable to click the selected cheat panel, please turn the game to window mode.", | ||
"CONTENT_GH_DESC": "Check the GitHub page for more information and help translation.", | ||
"CONTENT_QR_DESC": "Show Link QR", | ||
|
||
"NORMAL_TITLE": "Normal", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "Enable Cheat", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "Select the cheat or trainer exe file from storage", | ||
"NORMAL_CHEAT_LABEL": "EXE Path", | ||
"NORMAL_LANG_TOGGLE_LABEL": "Language", | ||
"NORMAL_LANG_TOGGLE_DESC": "Set the game enviroment language", | ||
"NORMAL_LANG_LABEL": "Language Code", | ||
"NORMAL_LANG_DEFAULT": "Default", | ||
|
||
"ADVANCED_TITLE": "Advanced", | ||
"ADVANCED_DXVK_ASYNC_DESC": "Optimize the ProtonGE compatibility layer to reduce frame time and input lag", | ||
"ADVANCED_RADV_PERFTEST_DESC": "Optimize the shader cache behavior of the ProtonGE compatibility layer", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "Specify the game data save path", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "Prefix Folder", | ||
|
||
"CUSTOM_TITLE": "Custom", | ||
"CUSTOM_OPTION_LABEL": "Label", | ||
"CUSTOM_OPTION_Fields": "Field & Value", | ||
"CUSTOM_EDIT_TITLE": "Edit Option", | ||
"CUSTOM_NEW_TITLE": "Add a New Option" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"TRANSLATION": "Traduction française", | ||
"CREDIT": "", | ||
|
||
"SAVE": "Enregistrer", | ||
"DELETE": "Supprimer", | ||
"CANCEL": "Annuler", | ||
"MESSAGE_SAVED": "Les options de lancement du jeu ont été enregistrées.", | ||
"MESSAGE_NON_STEAM": "Attention : Ceci n'est PAS un jeu Steam ! Les paramètres ne seront jamais enregistrés.", | ||
|
||
"CONTENT_TITLE": "Informations", | ||
"CONTENT_NOTE0": "CheatDeck ne prend en charge que le lanceur Steam normal pour le moment.", | ||
"CONTENT_NOTE1": "Veuillez activer le mode développeur dans les paramètres SteamOS ;", | ||
"CONTENT_NOTE2": "Vous pouvez trouver le paramètre CheatDeck dans le menu des détails du jeu ;", | ||
"CONTENT_NOTE3": "Utilisez la touche STEAM pour basculer entre le jeu et les fenêtres de triche ;", | ||
"CONTENT_NOTE4": "Si vous ne parvenez pas à cliquer sur le panneau de triche sélectionné, veuillez passer le jeu en mode fenêtré.", | ||
"CONTENT_GH_DESC": "Consultez la page GitHub pour plus d'informations et pour aider à la traduction.", | ||
"CONTENT_QR_DESC": "Afficher le QR Code du lien", | ||
|
||
"NORMAL_TITLE": "Normal", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "Activer la triche", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "Sélectionnez le fichier exe de triche ou d'entraîneur dans le stockage", | ||
"NORMAL_CHEAT_LABEL": "Chemin EXE", | ||
"NORMAL_LANG_TOGGLE_LABEL": "Langue", | ||
"NORMAL_LANG_TOGGLE_DESC": "Définir la langue de l'environnement du jeu", | ||
"NORMAL_LANG_LABEL": "Code de langue", | ||
"NORMAL_LANG_DEFAULT": "Par défaut", | ||
|
||
"ADVANCED_TITLE": "Avancé", | ||
"ADVANCED_DXVK_ASYNC_DESC": "Optimiser la couche de compatibilité ProtonGE pour réduire le temps d'image et le décalage d'entrée", | ||
"ADVANCED_RADV_PERFTEST_DESC": "Optimiser le comportement du cache de shader de la couche de compatibilité ProtonGE", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "Spécifier le chemin de sauvegarde des données de jeu", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "Dossier préfixe", | ||
|
||
"CUSTOM_TITLE": "Personnalisé", | ||
"CUSTOM_OPTION_LABEL": "Étiquette", | ||
"CUSTOM_OPTION_Fields": "Champ & Valeur", | ||
"CUSTOM_EDIT_TITLE": "Modifier l'option", | ||
"CUSTOM_NEW_TITLE": "Ajouter une nouvelle option" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"TRANSLATION": "日本語翻訳", | ||
"CREDIT": "", | ||
|
||
"SAVE": "保存", | ||
"DELETE": "削除", | ||
"CANCEL": "キャンセル", | ||
"MESSAGE_SAVED": "ゲームの起動オプションが保存されました。", | ||
"MESSAGE_NON_STEAM": "警告: これはSteamゲームではありません!設定は保存されません。", | ||
|
||
"CONTENT_TITLE": "情報", | ||
"CONTENT_NOTE0": "CheatDeckは現在、通常のSteamランチャーのみをサポートしています。", | ||
"CONTENT_NOTE1": "SteamOSの設定で開発者モードを有効にしてください。", | ||
"CONTENT_NOTE2": "ゲームの詳細メニューでCheatDeckの設定を見つけることができます。", | ||
"CONTENT_NOTE3": "STEAMキーを使用して、ゲームウィンドウとチートウィンドウを切り替えます。", | ||
"CONTENT_NOTE4": "選択したチートパネルをクリックできない場合は、ゲームをウィンドウモードにしてください。", | ||
"CONTENT_GH_DESC": "詳細情報と翻訳のヘルプについては、GitHubページをご覧ください。", | ||
"CONTENT_QR_DESC": "リンクQRを表示", | ||
|
||
"NORMAL_TITLE": "標準", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "チートを有効にする", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "ストレージからチートまたはトレーナーexeファイルを選択します", | ||
"NORMAL_CHEAT_LABEL": "EXEパス", | ||
"NORMAL_LANG_TOGGLE_LABEL": "言語", | ||
"NORMAL_LANG_TOGGLE_DESC": "ゲーム環境の言語を設定します", | ||
"NORMAL_LANG_LABEL": "言語コード", | ||
"NORMAL_LANG_DEFAULT": "デフォルト", | ||
|
||
"ADVANCED_TITLE": "詳細設定", | ||
"ADVANCED_DXVK_ASYNC_DESC": "ProtonGE互換性レイヤーを最適化して、フレーム時間と入力ラグを短縮します", | ||
"ADVANCED_RADV_PERFTEST_DESC": "ProtonGE互換性レイヤーのシェーダーキャッシュ動作を最適化します", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "ゲームデータの保存パスを指定します", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "プレフィックスフォルダー", | ||
|
||
"CUSTOM_TITLE": "カスタム", | ||
"CUSTOM_OPTION_LABEL": "ラベル", | ||
"CUSTOM_OPTION_Fields": "フィールドと値", | ||
"CUSTOM_EDIT_TITLE": "オプションを編集", | ||
"CUSTOM_NEW_TITLE": "新しいオプションを追加" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"TRANSLATION": "한국어 번역", | ||
"CREDIT": "", | ||
|
||
"SAVE": "저장", | ||
"DELETE": "삭제", | ||
"CANCEL": "취소", | ||
"MESSAGE_SAVED": "게임 실행 옵션이 저장되었습니다.", | ||
"MESSAGE_NON_STEAM": "경고: 스팀 게임이 아닙니다! 설정이 저장되지 않습니다.", | ||
|
||
"CONTENT_TITLE": "정보", | ||
"CONTENT_NOTE0": "CheatDeck은 현재 일반 스팀 런처만 지원합니다.", | ||
"CONTENT_NOTE1": "SteamOS 설정에서 개발자 모드를 활성화하십시오.", | ||
"CONTENT_NOTE2": "게임 세부 정보 메뉴에서 CheatDeck 설정을 찾을 수 있습니다.", | ||
"CONTENT_NOTE3": "STEAM 키를 사용하여 게임 및 치트 창 사이를 전환하십시오.", | ||
"CONTENT_NOTE4": "선택한 치트 패널을 클릭할 수 없는 경우 게임을 창 모드로 전환하십시오.", | ||
"CONTENT_GH_DESC": "자세한 정보 및 번역 지원은 GitHub 페이지를 확인하십시오.", | ||
"CONTENT_QR_DESC": "링크 QR 표시", | ||
|
||
"NORMAL_TITLE": "일반", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "치트 활성화", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "저장소에서 치트 또는 트레이너 exe 파일을 선택하십시오.", | ||
"NORMAL_CHEAT_LABEL": "EXE 경로", | ||
"NORMAL_LANG_TOGGLE_LABEL": "언어", | ||
"NORMAL_LANG_TOGGLE_DESC": "게임 환경 언어를 설정하십시오.", | ||
"NORMAL_LANG_LABEL": "언어 코드", | ||
"NORMAL_LANG_DEFAULT": "기본값", | ||
|
||
"ADVANCED_TITLE": "고급", | ||
"ADVANCED_DXVK_ASYNC_DESC": "프레임 시간 및 입력 지연을 줄이기 위해 ProtonGE 호환성 레이어를 최적화합니다.", | ||
"ADVANCED_RADV_PERFTEST_DESC": "ProtonGE 호환성 레이어의 셰이더 캐시 동작을 최적화합니다.", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "게임 데이터 저장 경로를 지정하십시오.", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "접두사 폴더", | ||
|
||
"CUSTOM_TITLE": "사용자 지정", | ||
"CUSTOM_OPTION_LABEL": "레이블", | ||
"CUSTOM_OPTION_Fields": "필드 및 값", | ||
"CUSTOM_EDIT_TITLE": "옵션 편집", | ||
"CUSTOM_NEW_TITLE": "새 옵션 추가" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"TRANSLATION": "Русский перевод", | ||
"CREDIT": "", | ||
|
||
"SAVE": "Сохранить", | ||
"DELETE": "Удалить", | ||
"CANCEL": "Отмена", | ||
"MESSAGE_SAVED": "Параметры запуска игры сохранены.", | ||
"MESSAGE_NON_STEAM": "Внимание: это НЕ игра Steam! Настройки не будут сохранены.", | ||
|
||
"CONTENT_TITLE": "Информация", | ||
"CONTENT_NOTE0": "CheatDeck пока поддерживает только обычный лаунчер Steam.", | ||
"CONTENT_NOTE1": "Включите режим разработчика в настройках SteamOS;", | ||
"CONTENT_NOTE2": "Настройки CheatDeck можно найти в меню подробной информации об игре;", | ||
"CONTENT_NOTE3": "Используйте клавишу STEAM для переключения между окнами игры и читов;", | ||
"CONTENT_NOTE4": "Если вы не можете щелкнуть выбранную панель читов, переключите игру в оконный режим.", | ||
"CONTENT_GH_DESC": "Посетите страницу GitHub для получения дополнительной информации и помощи с переводом.", | ||
"CONTENT_QR_DESC": "Показать QR-код ссылки", | ||
|
||
"NORMAL_TITLE": "Обычные", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "Включить читы", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "Выберите файл с читами или трейнером (exe) из хранилища", | ||
"NORMAL_CHEAT_LABEL": "Путь к EXE-файлу", | ||
"NORMAL_LANG_TOGGLE_LABEL": "Язык", | ||
"NORMAL_LANG_TOGGLE_DESC": "Установить язык игровой среды", | ||
"NORMAL_LANG_LABEL": "Код языка", | ||
"NORMAL_LANG_DEFAULT": "По умолчанию", | ||
|
||
"ADVANCED_TITLE": "Дополнительные", | ||
"ADVANCED_DXVK_ASYNC_DESC": "Оптимизировать слой совместимости ProtonGE для уменьшения времени кадра и задержки ввода", | ||
"ADVANCED_RADV_PERFTEST_DESC": "Оптимизировать поведение кэша шейдеров слоя совместимости ProtonGE", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "Указать путь сохранения данных игры", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "Папка префикса", | ||
|
||
"CUSTOM_TITLE": "Пользовательские", | ||
"CUSTOM_OPTION_LABEL": "Метка", | ||
"CUSTOM_OPTION_Fields": "Поле и значение", | ||
"CUSTOM_EDIT_TITLE": "Редактировать параметр", | ||
"CUSTOM_NEW_TITLE": "Добавить новый параметр" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"TRANSLATION": "简体中文翻译", | ||
"CREDIT": "sheffey", | ||
|
||
"SAVE": "保存", | ||
"DELETE": "删除", | ||
"CANCEL": "取消", | ||
"MESSAGE_SAVED": "游戏启动项已保存。", | ||
"MESSAGE_NON_STEAM": "警告: 非 Steam 游戏! 设置将不会被保存。", | ||
|
||
"CONTENT_TITLE": "说明", | ||
"CONTENT_NOTE0": "CheatDeck 目前仅支持原生 Steam 游戏启动器。", | ||
"CONTENT_NOTE1": "请在 SteamOS 设置中启用开发者模式;", | ||
"CONTENT_NOTE2": "你可以在游戏详情菜单中找到 CheatDeck 设置;", | ||
"CONTENT_NOTE3": "使用 STEAM 键来切换游戏窗口和修改器窗口;", | ||
"CONTENT_NOTE4": "如无法点击修改器窗口,请在游戏中启用窗口模式。", | ||
"CONTENT_GH_DESC": "查看 GitHub 页面以获取更多信息或帮助我们翻译该软件", | ||
"CONTENT_QR_DESC": "显示链接二维码", | ||
|
||
"NORMAL_TITLE": "常规", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "启用修改器", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "从系统存储中选择需要启用的游戏修改器", | ||
"NORMAL_CHEAT_LABEL": "EXE 路径", | ||
"NORMAL_LANG_TOGGLE_LABEL": "语言", | ||
"NORMAL_LANG_TOGGLE_DESC": "设置游戏环境语言", | ||
"NORMAL_LANG_LABEL": "语言编码", | ||
"NORMAL_LANG_DEFAULT": "默认", | ||
|
||
"ADVANCED_TITLE": "高级", | ||
"ADVANCED_DXVK_ASYNC_DESC": "优化 ProtonGE 兼容层减少帧时间和输入延迟", | ||
"ADVANCED_RADV_PERFTEST_DESC": "优化 ProtonGE 兼容层着色器缓存行为", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "指定游戏数据保存路径", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "Prefix 路径", | ||
|
||
"CUSTOM_TITLE": "自定义", | ||
"CUSTOM_OPTION_LABEL": "标签", | ||
"CUSTOM_OPTION_Fields": "字段 & 值", | ||
"CUSTOM_EDIT_TITLE": "编辑启动项", | ||
"CUSTOM_NEW_TITLE": "新建启动项" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"TRANSLATION": "繁體中文翻譯", | ||
"CREDIT": "sheffey", | ||
|
||
"SAVE": "儲存", | ||
"DELETE": "刪除", | ||
"CANCEL": "取消", | ||
"MESSAGE_SAVED": "遊戲啟動項已儲存。", | ||
"MESSAGE_NON_STEAM": "警告: 非 Steam 遊戲! 設定將不會被儲存。", | ||
|
||
"CONTENT_TITLE": "說明", | ||
"CONTENT_NOTE0": "CheatDeck 目前僅支援原生 Steam 遊戲啟動器。", | ||
"CONTENT_NOTE1": "請在 SteamOS 設定中啟用開發者模式;", | ||
"CONTENT_NOTE2": "您可以在遊戲詳情選單中找到 CheatDeck 設定;", | ||
"CONTENT_NOTE3": "使用 STEAM 鍵來切換遊戲視窗和修改器視窗;", | ||
"CONTENT_NOTE4": "如無法點擊修改器視窗,請在遊戲中啟用視窗模式。", | ||
"CONTENT_GH_DESC": "檢視 GitHub 頁面以取得更多資訊或協助我們翻譯該軟體", | ||
"CONTENT_QR_DESC": "顯示連結 QR Code", | ||
|
||
"NORMAL_TITLE": "一般", | ||
"NORMAL_CHEAT_TOGGLE_LABEL": "啟用修改器", | ||
"NORMAL_CHEAT_TOGGLE_DESC": "從系統儲存中選擇需要啟用的遊戲修改器", | ||
"NORMAL_CHEAT_LABEL": "EXE 路徑", | ||
"NORMAL_LANG_TOGGLE_LABEL": "語言", | ||
"NORMAL_LANG_TOGGLE_DESC": "設定遊戲環境語言", | ||
"NORMAL_LANG_LABEL": "語言編碼", | ||
"NORMAL_LANG_DEFAULT": "預設", | ||
|
||
"ADVANCED_TITLE": "進階", | ||
"ADVANCED_DXVK_ASYNC_DESC": "最佳化 ProtonGE 相容層減少幀時間和輸入延遲", | ||
"ADVANCED_RADV_PERFTEST_DESC": "最佳化 ProtonGE 相容層著色器快取行為", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_DESC": "指定遊戲資料儲存路徑", | ||
"ADVANCED_STEAM_COMPAT_DATA_PATH_LABEL": "Prefix 路徑", | ||
|
||
"CUSTOM_TITLE": "自訂", | ||
"CUSTOM_OPTION_LABEL": "標籤", | ||
"CUSTOM_OPTION_Fields": "欄位 & 值", | ||
"CUSTOM_EDIT_TITLE": "編輯啟動項", | ||
"CUSTOM_NEW_TITLE": "新增啟動項" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import logger from "./logger"; | ||
|
||
import * as de from "../data/i18n/de.json"; | ||
import * as en from "../data/i18n/en.json"; | ||
import * as fr from "../data/i18n/fr.json"; | ||
import * as ja from "../data/i18n/ja.json"; | ||
import * as ko from "../data/i18n/ko.json"; | ||
import * as ru from "../data/i18n/ru.json"; | ||
import * as zhCn from "../data/i18n/zh-cn.json"; | ||
import * as zhTw from "../data/i18n/zh-tw.json"; | ||
|
||
type Language = { [key: string]: string }; | ||
type Languages = { [key: string]: Language }; | ||
|
||
const languages: Languages = { | ||
de, | ||
en, | ||
fr, | ||
ja, | ||
ko, | ||
ru, | ||
zhCn, | ||
zhTw, | ||
}; | ||
|
||
function getCurrentLangCode(): string { | ||
const steamLang = window.LocalizationManager.m_rgLocalesToUse[0]; | ||
const langCode = steamLang.replace( | ||
/-([a-z])/g, (_, letter: string) => letter.toUpperCase(), | ||
); | ||
logger.info(`LanguageCode: ${langCode}`); | ||
return langCode; | ||
} | ||
|
||
function translate() { | ||
const langCode: string = getCurrentLangCode(); | ||
const lang: Language = languages[langCode] ?? languages.en; | ||
return function (label: string, defaultString: string): string { | ||
return lang[label] ?? defaultString; | ||
}; | ||
} | ||
|
||
const t = translate(); | ||
|
||
export default t; |
Oops, something went wrong.