From ac3cb9bc336513e6a87109bde1a657b562cf6711 Mon Sep 17 00:00:00 2001 From: haniwa55 <35873133+haniwa55@users.noreply.github.com> Date: Tue, 30 Jan 2018 00:09:32 +0900 Subject: [PATCH] lang : Japanese translation. (#144) * added Japanese translation. * ArcCPZ.cs add encrypt & encode methods --- ArcFormats/Cmvs/ArcCPZ.cs | 166 ++++++ ArcFormats/Strings/arcStrings.ja-JP.resx | 494 ++++++++++++++++ GUI/Strings/guiStrings.ja-JP.resx | 694 +++++++++++++++++++++++ GameRes/Strings/garStrings.ja-JP.resx | 156 +++++ 4 files changed, 1510 insertions(+) create mode 100644 ArcFormats/Strings/arcStrings.ja-JP.resx create mode 100644 GUI/Strings/guiStrings.ja-JP.resx create mode 100644 GameRes/Strings/garStrings.ja-JP.resx diff --git a/ArcFormats/Cmvs/ArcCPZ.cs b/ArcFormats/Cmvs/ArcCPZ.cs index 080a46b7..b88fa409 100644 --- a/ArcFormats/Cmvs/ArcCPZ.cs +++ b/ArcFormats/Cmvs/ArcCPZ.cs @@ -288,6 +288,38 @@ namespace GameRes.Formats.Purple } } + void EncryptIndexStage1 (byte[] data, uint key, CmvsScheme scheme) + { + var secret = scheme.Cpz5Secret; + var secret_key = new uint[24]; + int secret_length = Math.Min(24, secret.Length); + for (int i = 0; i < secret_length; ++i) + secret_key[i] = secret[i] - key; + + int shift = (int)(((key >> 24) ^ (key >> 16) ^ (key >> 8) ^ key ^ 0xB) & 0xF) + 7; + unsafe + { + fixed (byte* raw = data) + { + uint* data32 = (uint*)raw; + int i = 5; + for (int n = data.Length / 4; n > 0; --n) + { + *data32 = (Binary.RotL((*data32 - 0x01010101), shift) - scheme.IndexAddend) ^ secret_key[i]; + ++data32; + i = (i + 1) % 24; + } + byte* data8 = (byte*)data32; + for (int n = data.Length & 3; n > 0; --n) + { + *data8 = (byte)((*data8 + scheme.IndexSubtrahend) ^ (secret_key[i] >> (n * 4))); + ++data8; + i = (i + 1) % 24; + } + } + } + } + void DecryptIndexDirectory (byte[] data, int length, uint[] key) { uint seed = 0x76548AEF; @@ -313,6 +345,31 @@ namespace GameRes.Formats.Purple } } + void EncryptIndexDirectory (byte[] data, int length, uint[] key) + { + uint seed = 0x76548AEF; + unsafe + { + fixed (byte* raw = data) + { + uint* data32 = (uint*)raw; + int i; + for (i = 0; i < length / 4; ++i) + { + *data32 = (Binary.RotR(*data32 + seed, 3) + 0x4A91C262) ^ key[i & 3]; + ++data32; + seed += 0x10FB562A; + } + byte* data8 = (byte*)data32; + for (int j = length & 3; j > 0; --j) + { + *data8 = (byte)((*data8 - 0x37) ^ (key[i++ & 3] >> 6)); + ++data8; + } + } + } + } + void DecryptIndexEntry (byte[] data, int offset, int length, uint[] key, uint seed) { if (offset < 0 || offset > data.Length) @@ -341,6 +398,34 @@ namespace GameRes.Formats.Purple } } + void EncryptIndexEntry (byte[] data, int offset, int length, uint[] key, uint seed) + { + if (offset < 0 || offset > data.Length) + throw new ArgumentOutOfRangeException("offset"); + if (length < 0 || length > data.Length || length > data.Length - offset) + throw new ArgumentException("length"); + unsafe + { + fixed (byte* raw = &data[offset]) + { + uint* data32 = (uint*)raw; + int i; + for (i = 0; i < length / 4; ++i) + { + *data32 = (Binary.RotR((*data32 - 0x37A19E8B), 2) + seed) ^ key[i & 3]; + ++data32; + seed -= 0x139FA9B; + } + byte* data8 = (byte*)data32; + for (int j = length & 3; j > 0; --j) + { + *data8 = (byte)((*data8 - 5) ^ (key[i++ & 3] >> 4)); + ++data8; + } + } + } + } + byte[] UnpackPs2 (byte[] data) { DecryptPs2 (data); @@ -411,6 +496,20 @@ namespace GameRes.Formats.Purple data[i+1] -= data[src++]; } } + + void EncryptPb3 (byte[] data) + { + byte key1 = data[data.Length - 3]; + byte key2 = data[data.Length - 2]; + int src = data.Length - 0x2F; + for (int i = 8; i < 0x34; i += 2) + { + data[i] += data[src++]; + data[i] ^= key1; + data[i + 1] += data[src++]; + data[i + 1] ^= key2; + } + } } internal class Cpz5Decoder @@ -455,6 +554,21 @@ namespace GameRes.Formats.Purple data[offset+i] = m_decode_table[key ^ data[offset+i]]; } + public void Encode (byte[] data, int offset, int length, byte key) + { + for (int i = 0; i < length; ++i) + { + for (int s = 0; s < m_decode_table.Length; s++) + { + if (data[offset+i] == m_decode_table[s]) + { + data[offset+i] = (byte)(key ^ s); + break; + } + } + } + } + public void DecryptEntry (byte[] data, uint[] cmvs_md5, uint seed) { if (null == data) @@ -497,5 +611,57 @@ namespace GameRes.Formats.Purple } } } + + public void EncryptEntry (byte[] data, uint[] cmvs_md5, uint seed) + { + if (null == data) + throw new ArgumentNullException("data"); + if (null == cmvs_md5 || cmvs_md5.Length < 4) + throw new ArgumentException("cmvs_md5"); + + int secret_length = Math.Min(m_scheme.Cpz5Secret.Length, 0x10) * sizeof(uint); + byte[] key_bytes = new byte[secret_length]; + + uint key = cmvs_md5[1] >> 2; + Buffer.BlockCopy(m_scheme.Cpz5Secret, 0, key_bytes, 0, secret_length); + for (int i = 0; i < secret_length; ++i) + key_bytes[i] = (byte)(key ^ m_decode_table[key_bytes[i]]); + + uint[] secret_key = new uint[0x10]; + Buffer.BlockCopy(key_bytes, 0, secret_key, 0, secret_length); + for (int i = 0; i < secret_key.Length; ++i) + secret_key[i] ^= seed; + + unsafe + { + fixed (byte* raw = data) + { + uint* data32 = (uint*)raw; + key = m_scheme.EntryInitKey; + int k = m_scheme.EntryKeyPos; + for (int i = data.Length / 4; i > 0; --i) + { + uint backup = *data32; + *data32 = (((cmvs_md5[key & 3] ^ *data32) + seed) ^ (secret_key[k] >> 1)) ^ secret_key[(key >> 6) & 0xf]; + k = (k + 1) & 0xf; + key += seed + backup; + ++data32; + } + byte* data8 = (byte*)data32; + for (int i = data.Length & 3; i > 0; --i) + { + for (int s = 0; s < m_decode_table.Length; s++) + { + if (*data8 == m_decode_table[s]) + { + *data8 = (byte)(s ^ m_scheme.EntryTailKey); + break; + } + } + ++data8; + } + } + } + } } } diff --git a/ArcFormats/Strings/arcStrings.ja-JP.resx b/ArcFormats/Strings/arcStrings.ja-JP.resx new file mode 100644 index 00000000..d644c6e6 --- /dev/null +++ b/ArcFormats/Strings/arcStrings.ja-JP.resx @@ -0,0 +1,494 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ベースとなるアーカイブを指定する + Base archive + + + 新しいアーカイブには、ベースとなるアーカイブのエントリも含まれます。 + New archive will also contain entries from the base archive. + + + ベースとなるアーカイブを選択してください。 + Select base archive + + + Amaterasu Translations Muv-Luv archive + Amaterasu Translations Muv-Luv archive + + + AMIアーカイブに適切なファイルは見つかりませんでした。 + No files suitable for AMI archive found. + + + アーカイブコンテンツは暗号化されています。 +タイトルもしくは適切な暗号化方式を選択してください。 + Archive content is encrypted. +Choose appropriate encryption scheme. + + + 暗号化なし + no encryption + + + リセット + Reset + + + 独自のイメージ形式 + âge proprietary image format + + + Liar-soft proprietary script format + Liar-soft proprietary script format + + + 暗号化アーカイブの作成は実装されていません。 + Encrypted archives creation is not implemented. + + + CatSystem2 engine resource archive + CatSystem2 engine resource archive + + + 数値鍵は32ビットの16進数でなければなりません。 + Numeric key should be a 32-bit hexadecimal integer + + + 数値鍵 + Numeric key + + + アーカイブフォルダは暗号化されています。 + Archive directory is encrypted. + + + Kogado game engine resource archive + Kogado game engine resource archive + + + パスフレーズ + Passphrase + + + 方式 + Scheme + + + Liar-soft image archive + Liar-soft image archive + + + ファイルを追加中 + Adding file + + + チェックサムの計算中... + Calculating checksum... + + + インデックスの圧縮中... + Compressing index... + + + アーカイブ作成に必要な暗号鍵。 + Encryption key required for archive creation. + + + 暗号化メソッドが実装されていません。 + Encryption method not implemented + + + ファイル名の拡張子が長すぎます。 + File name extension too long. + + + ファイル名が長すぎます。 + File name is too long + + + ファイル名に不正な文字が含まれています。 + File name contains illegal characters + + + {0}: 認識できないイメージ形式です。 + {0}: image format not recognized. + + + 指定されたアーカイブversionが無効です。 + Invalid archive version specified. + + + ファイル名に拡張子がありません。 + File name without extension. + + + ファイル数がアーカイブの上限を超えています。 + Number of files exceedes archive limit. + + + インデックスの更新中... + Updating index... + + + インデックスを作成中... + Writing index... + + + コンテンツを圧縮する + Compress contents + + + Nitro+ resource archive + Nitro+ resource archive + + + 暗号鍵 +(コンテンツが暗号化されていなくても必要です) + Encryption keys +(required even if contents is not encrypted) + + + Nitro+ Steins;Gate resource archive + Nitro+ Steins;Gate resource archive + + + NScripter アーカイブ形式 + NScripter game engine resource archive + + + アーカイブタイプ + Archive type + + + 圧縮 + Compression + + + 圧縮なし + None + + + Flying Shine resource archive + Flying Shine resource archive + + + コンテンツのスクランブル化 + Scramble contents + + + Ren'Py game engine archive + Ren'Py game engine archive + + + 32ビットの暗号鍵 + 32-bit key + + + Amaterasu Translations Muv-Luv script file + Amaterasu Translations Muv-Luv script file + + + ファイル名エンコーディング + Filename encoding + + + 16進数 + Hex number + + + 最大ファイル名の長さ +(拡張子を含まない) + Maximum file name length +(not including extension) + + + Liar-soft game resource archive + Liar-soft game resource archive + + + コンテンツを圧縮する + Compress contents + + + フォルダを圧縮する + Compress directory + + + KiriKiri game engine resource archive + KiriKiri game engine resource archive + + + Version + Version + + + フォルダ構造を保持する + Retain directory structure + + + Yu-Ris game engine resource archive + Yu-Ris game engine resource archive + + + 8ビットの暗号鍵 + 8-bit encryption key + + + アーカイブ Version + Archive version + + + アーカイブフォルダは暗号化されています。 +適切な暗号化方式を選択してください。 + Archive directory is encrypted. +Choose appropriate encryption scheme. + + + 暗号化方式 + Encryption scheme + + + 暗号鍵 + Encryption keys + + + デフォルト + Default + + + 32ビットの16進数 + 32-bit hex number + + + デフォルト + Default + + + アーカイブはスクリプトにより暗号化されています。 +暗号化方式を選択するか、パスフレーズを入力してください。 + Archive contains encrypted scripts. +Choose encryption scheme or enter a passphrase. + + + タイトルを選択するか、パスワードを入力してください。 + Choose title or enter a password + + + タイトルを選択するか、パスワードを入力してください。 + Choose title or enter a password + + + ファイルはRPMアーカイブ形式に近いですが、 +暗号鍵の推測は失敗しました。 +適切な暗号化方式を選択します。 + File resembles RPM resource archive, +but encryption key guess failed. +Choose appropriate encryption scheme. + + + デフォルトの暗号化方式を使用する + Use default encryption scheme + + + ゲームの実行ファイルを選択してください。 + Choose game executable file + + + EXE確認 + Check EXE + + + 実行ファイル + Executable Files + + + 「EXE確認」ボタンを押してゲーム実行ファイル内の暗号鍵を探してください。 + Press "Check EXE" button to look for key within game executable file. + + + アーカイブ暗号鍵を入力するか、または定義済みの暗号化方式を選択します。 + Alternatively, enter archive encryption key or choose one of the predefined encryption schemes. + + + {0} 内に暗号鍵が見つかりません。 + Key not found within {0}. + + + 暗号化を無視する + Ignore encryption + + + イメージは暗号化されています。 + Image is encrypted. + + + タイトルを選択するか、暗号鍵を入力してください。 + Choose title or enter a key + + + 8ビットの暗号鍵 + 8-bit encryption key + + + アーカイブコンテンツは暗号化されています。 + Archive content is encrypted. + + + 推測してください。 + Try to guess + + + アーカイブコンテンツは暗号化されている可能性があります。 +適切な暗号化方式を選択してください。 + Archive contents might be encrypted, +choose appropriate encryption scheme. + + + アーカイブコンテンツは暗号化されています。 +タイトルもしくは適切な暗号化方式を選択してください。 + Archive content could be encrypted. +Choose appropriate encryption scheme. + + + タイトルを選択するか、暗号鍵を入力してください。 + Choose title or enter a key + + + イメージは暗号化されています。 +適切な暗号化方式を選択してください。 + Image is encrypted. +Choose appropriate encryption scheme. + + + アーカイブはスクリプトにより暗号化されています。 +暗号化方式を選択するか、パスフレーズを入力してください。 + Archive contains encrypted scripts. +Choose encryption scheme or enter a passphrase. + + + RC8ビットマップから透過データをロードする + Load transparency data from RC8 bitmap + + + 増分フレームを自動的に結合する + Automatically combine incremental frames + + \ No newline at end of file diff --git a/GUI/Strings/guiStrings.ja-JP.resx b/GUI/Strings/guiStrings.ja-JP.resx new file mode 100644 index 00000000..34d395e3 --- /dev/null +++ b/GUI/Strings/guiStrings.ja-JP.resx @@ -0,0 +1,694 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + キャンセル + Cancel + + + 抽出 + Extract + + + 確認 + OK + + + 閉じる + _Close + + + コピー + Copy + + + アーカイブの作成... + Create archive... + + + カット + Cut + + + ファイルの削除 + _Delete + + + エクスプローラーを開く + Browse in _Explorer + + + アーカイブからファイルの抽出 + Extract + + + アーカイブを開く + Open + + + ペースト + Paste + + + 表示の更新 + Refresh + + + 名前の変更 + _Rename + + + ファイルの並び順 + Sort by + + + 名前 + Name + + + サイズ + Size + + + タイプ + Type + + + 指定しない + Unsorted + + + 名前 + Name + + + サイズ + Size + + + タイプ + Type + + + アーカイブ形式 + Archive format + + + アーカイブ名 + Archive name + + + アーカイブオプション + Archive options + + + {0} からファイルの抽出先 + Extract files from {0} to + + + {0} の抽出先 + Extract {0} to + + + GARbroについて + About Game Resource browser + + + {0} を削除しました。 + Deleted {0} + + + フォルダが見つかりません。 + directory not found + + + アーカイブは空です。 + archive is empty + + + ファイルの抽出中にエラーが発生しました。 + Error extracting file + + + ファイルを開く際にエラーが発生しました。 + Error opening file + + + {0} を {1} に抽出しました。 + Extracted {0} into {1} + + + {0} ファイル抽出しました。 + Extracted {0} file + + + {0} からファイルを抽出しています。 + Extracting files from {0} + + + {0} からファイルを抽出しています。 + Extracting file from {0} + + + {0} から {1} にファイルを抽出しています。 + Extracting files from {0} to {1} + + + イメージ {0} x {1} x {2}bpp + Image {0} x {1} x {2}bpp + + + 抽出するファイルがありません。 + no files to extract + + + 準備完了 + Ready + + + イメージの形式を解読できません。 + unable to interpret image format + + + Version {0} + Version {0} + + + [builtin] + [builtin] + + + アーカイブ + Archives + + + イメージ + Images + + + GARbroについて + About Game Resource browser + + + 全てのファイル + All Files + + + 同じ形式 + as is + + + アーカイブの選択 + Choose archive location + + + 抽出先フォルダを選択してください + Choose destination directory + + + アーカイブの作成 + Create archive + + + アーカイブの作成エラー + Archive creation error + + + <DIR> + <DIR> + + + テキストエンコーディング + Text encoding + + + イメージの抽出 + Extract images + + + テキストの抽出 + Extract text + + + アーカイブからファイルの抽出 + Extract from archive + + + アーカイブ形式 + Archive parameters + + + 保存するファイルは + Save as + + + 保存するイメージは + Save images as + + + GARbro + Game Resource browser + + + 戻る + Back + + + 進む + Forward + + + ファイル {0} は +すでに存在しています。 + +上書きしますか? + File {0} +already exists. + +Overwrite? + + + 上書きの確認 + Confirm overwrite + + + アーカイブ {0} を作成しています。 + Creating archive {0} + + + アーカイブを開く... + Open... + + + 最近使用したファイル + Recent files + + + 抽出するファイルを選択してください。 + Choose files to extract + + + 終了 + E_xit + + + ファイル + E_xit + + + ヘルプ + _Help + + + {0} ファイル抽出しました。 + Extracted {0} files + + + {0} ファイル + {0} file + + + {0} ファイル + {0} files + + + これらのファイルを削除してもよろしいですか? + Are you sure you want to delete these files? + + + ファイルの削除 + Delete files + + + {0} ファイルを削除しました。 + Deleted {0} file + + + {0} ファイルを削除しました。 + Deleted {0} files + + + プレビューウィンドウをイメージに合わせる + Fit preview _window to image + + + メインメニューの表示/非表示 + Show/hide main _menu bar + + + ステータスバーの表示/非表示 + Show/hide _status bar + + + ツールバーの表示/非表示 + Show/hide _toolbar + + + 表示 + _View + + + マルチメディアの形式変換... + Convert multimedia... + + + 変換 + Convert + + + イメージの変換形式 + Choose destination format for images + + + マルチメディアの形式変換 + Media conversion + + + ファイル {0} を変換しています。 + Converting file {0} + + + マルチメディアの形式変換エラー + Multimedia conversion error + + + エンコーディング + Encoding + + + オーディオを共通形式に変換する + Convert audio to common format + + + オーディオの抽出 + Extract audio + + + WAV/MP3/OGGのいずれか + Either WAV, MP3 or OGG + + + オーディオ + Audio + + + ライセンス + License + + + オーディオの形式を解読できません。 + unable to interpret audio format + + + マルチメディア(イメージまたはオーディオ)ファイルが選択されていません。 + No media files selected. + + + オーディオは、WAV/MP3/OGGのいずれかに変換されます。 + Audio will be converted to either WAV, MP3 or OGG. + + + 復元できないファイルをスキップする + Skip incovertible files. + + + "{0}" に一致するエントリはありません。 + No entries matching "{0}" + + + {0} ファイルが選択へ追加されました。 + {0} file added to selection + + + {0} ファイルが選択へ追加されました。 + {0} files added to selection + + + ワイルドカードマスクを入力 + Enter wildcard mask + + + ファイル選択 + Select files + + + ファイルの抽出中にエラーが発生しました。 +{0} +{1} + Error occured while extracting file +{0} +{1} + + + ファイルタイプの設定 + Assign file type + + + none + none + + + 抽出先フォルダ + Destination directory + + + {0} / {3} / {2}bps / {1}Hz を再生中 + {0}=filename, {1}=sampling rate, {2}=bitrate, {3}=total time + + + 開発サイト + Development site + + + マスクでファイルを選択... + Select files by mask... + + + 中止 + _Abort + + + 継続 + _Continue + + + エラーを無視する + _Ignore further errors + + + ファイルの抽出エラー + File extraction error + + + 上書き + _Overwrite + + + 名前の変更 + _Rename + + + スキップ + _Skip + + + 全てのファイルを上書き + A_pply to all duplicate files + + + どうしますか? + What should be done? + + + ファイルの変換中にエラーが発生しました。 +{0} +{1} + Error occured while converting file +{0} +{1} + + + ファイル {0} は既に抽出先フォルダに存在します。 + File {0} already exists in the destination folder. + + + ダウンロード + _Download + + + リリースノート + Release notes + + + アップデートの確認... + _Check for updates... + + + 現在利用可能なアップデートはありません。 + No updates currently available. + + + 使用可能な形式データベースをアップデートします。 + Formats database update available. + + + 形式データベースをアップデートしました。 + Formats database updated. + + + アップデートの確認に失敗しました。 + Update check failed. + + + 現在のGARbroは最新versionです。 + GARbro version is up to date. + + + 利用可能な新しいバージョン: + New version available: + + + アプリケーションのアップデート + Application update + + + ダウンロードページにアクセス + Visit download page + + + アップデートのダウンロードに失敗しました。 + Update download failed. + + + 適用 + Apply + + + 環境設定 + _Preferences + + + 形式 + Formats + + + 環境設定 + Preferences + + \ No newline at end of file diff --git a/GameRes/Strings/garStrings.ja-JP.resx b/GameRes/Strings/garStrings.ja-JP.resx new file mode 100644 index 00000000..67f0e5b6 --- /dev/null +++ b/GameRes/Strings/garStrings.ja-JP.resx @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 透過サポートなど、さまざまな拡張機能を有効にします。 + Enables various extensions, such as transparency support. + + + BMP形式の拡張機能を有効にします。 + Enable BMP format extensions + + + ファイルが空です。 + File is empty + + + ファイルが大きすぎます。 + File is too large + + + 不適切な暗号化方式 + Inappropriate encryption scheme + + + 無効なファイル名 + Invalid file name + + + 無効なファイル形式 + Invalid file format + + + 不明な暗号化方式 + Unknown encryption scheme + + + アーカイブとして不明な形式でファイルを開くことができませんでした。 + file could not be opened as resource archive + + \ No newline at end of file