From 470cfa3133c5dbf0e00fe8124dda8bd6a75a52b1 Mon Sep 17 00:00:00 2001 From: Pk11 Date: Sun, 7 Mar 2021 20:55:00 -0600 Subject: [PATCH 1/2] Add Japanese translation --- index.html | 1 + js/locale.js | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/index.html b/index.html index 954f398..20a089b 100644 --- a/index.html +++ b/index.html @@ -191,6 +191,7 @@ + diff --git a/js/locale.js b/js/locale.js index fe00273..706098f 100644 --- a/js/locale.js +++ b/js/locale.js @@ -160,5 +160,32 @@ const LOCALIZATION={ 'error_unzipping': 'Erro ao extrair arquivo', 'error_invalid_patch': 'Patch inválido', 'warning_too_big': 'Uso de arquivos muito grandes não recomendado.' + }, + 'ja':{ + 'creator_mode': '作成モード', + + 'apply_patch': 'パッチを当て', + 'rom_file': 'ROMファィル:', + 'patch_file': 'パッチファイル:', + 'remove_header': 'ヘッダーを削除', + 'add_header': '一時的なヘッダーを追加', + 'compatible_formats': '互換性のあるフォーマット:', + 'applying_patch': 'パッチを当ている…', + 'downloading': 'ダウンロードしている…', + 'unzipping': '解凍している…', + + 'create_patch': 'パッチを作成', + 'original_rom': '元のROM:', + 'modified_rom': '変更されたROM:', + 'patch_type': 'パッチのタイプ:', + 'creating_patch': 'パッチを作成している…', + + 'error_crc_input': 'ソースROMチェックサムの不一致', + 'error_crc_output': 'ターゲットROMチェクサムの不一致', + 'error_crc_patch': 'バッチチェックサムの不一致', + 'error_downloading': 'パッチのダウンロードエラー', + 'error_unzipping': 'パッチの解凍エラー', + 'error_invalid_patch': '無効なパッチエラー', + 'warning_too_big': '大きなファイルの使いはおすすめしない。' } }; From 51603e9252b6166f41a9ce43966be642963307bf Mon Sep 17 00:00:00 2001 From: Pk11 Date: Mon, 8 Mar 2021 00:46:12 -0600 Subject: [PATCH 2/2] Set document language on language change Prevents Chinese forms of characters being used for Japanese (or vise versa if Chinese gets added) if the computer's language isn't set to that language. --- js/RomPatcher.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/RomPatcher.js b/js/RomPatcher.js index e4fe820..37863c8 100644 --- a/js/RomPatcher.js +++ b/js/RomPatcher.js @@ -183,6 +183,8 @@ function setLanguage(langCode){ userLanguage=LOCALIZATION[langCode]; + document.documentElement.lang = langCode; + var translatableElements=document.querySelectorAll('*[data-localize]'); for(var i=0; i