From 1e405fef46bc7cfff7e230700ac797e3e5473bbb Mon Sep 17 00:00:00 2001 From: cross <26484083+crossn@users.noreply.github.com> Date: Sun, 11 Oct 2026 01:26:09 +0900 Subject: [PATCH] Translate core UI to Japanese --- Source/RMG/Translations/rmg_ja_JP.ts | 1957 +++++++++++++++++ .../UserInterface/Dialog/SettingsDialog.cpp | 72 +- .../Dialog/UnifiedInputDialog.cpp | 88 +- Source/RMG/UserInterface/MainWindow.cpp | 62 +- Source/RMG/Utilities/QtMessageBox.cpp | 5 +- 5 files changed, 2093 insertions(+), 91 deletions(-) diff --git a/Source/RMG/Translations/rmg_ja_JP.ts b/Source/RMG/Translations/rmg_ja_JP.ts index 4e2b7d216..36d5ac29c 100644 --- a/Source/RMG/Translations/rmg_ja_JP.ts +++ b/Source/RMG/Translations/rmg_ja_JP.ts @@ -3,6 +3,14 @@ SettingsDialog + + Show live replay viewer count + ライブリプレイの視聴者数を表示 + + + Show the live replay viewer count in the top-left corner while playing or watching a match. + 対戦中または観戦中に、ライブリプレイの視聴者数を左上に表示します。 + Language 言語 @@ -23,5 +31,1954 @@ Language changes take effect after restarting the application. 言語の変更は、アプリケーションの再起動後に反映されます。 + + seconds + 秒 + + + messages + 件 + + + Settings + 設定 + + + Theme + テーマ + + + Show legacy themes + 旧テーマを表示 + + + Icon theme + アイコンテーマ + + + Automatic + 自動 + + + White + 白 + + + Black + 黒 + + + Start netplay automatically on application start + アプリ起動時にネットプレイを自動開始 + + + Theme changes apply immediately + テーマの変更はすぐに反映されます + + + Hide cursor during emulation + エミュレーション中はカーソルを隠す + + + Hide cursor during fullscreen emulation + 全画面エミュレーション中はカーソルを隠す + + + Pause emulation on focus loss + フォーカスを失ったら一時停止する + + + Resume emulation on focus gain + フォーカスを得たら再開する + + + Automatically switch to fullscreen on emulation start + エミュレーション開始時に自動で全画面表示にする + + + Exclusive Fullscreen + 全画面表示 + + + Use exclusive fullscreen instead of borderless + 指定したモニター・解像度・リフレッシュレートで全画面表示する + + + This fullscreen mode is beta and does not support toggling fullscreen or OSD messages. + この方式は試験機能です。全画面表示の切り替えとOSDメッセージには対応していません。 + + + Use experimental fullscreen mode + 実験的な全画面表示方式を使用する + + + Monitor + モニター + + + Resolution + 解像度 + + + Refresh rate + リフレッシュレート + + + Ask for confirmation during drag and drop + ドラッグ&ドロップ時に確認する + + + Ask for confirmation on exit + 終了時に確認する + + + OpenGL type + OpenGLの種類 + + + OpenGL + OpenGL + + + OpenGL ES + OpenGL ES + + + Statusbar message duration + ステータスバーのメッセージ表示時間 + + + Changes will be applied on next emulation run + 変更は次回のエミュレーション実行時に適用されます + + + Search sub-directories + サブフォルダーも検索する + + + ROM search limit + 検索するROMの上限数 + + + Show verbose messages + 詳細なログメッセージを表示する + + + OSD + 画面表示(OSD) + + + Enable On-Screen Display + ゲーム画面上の情報表示(OSD)を有効にする + + + Global OSD settings + 画面表示(OSD)の共通設定 + + + Background color + 背景色 + + + Text color + 文字色 + + + Show Kaillera chat on-screen + KailleraチャットをOSDに表示する + + + Chat settings + チャット設定 + + + Location + 表示位置 + + + Bottom Left + 左下 + + + Top Left + 左上 + + + Top Right + 右上 + + + Bottom Right + 右下 + + + Vertical padding + 縦方向の余白 + + + Horizontal padding + 横方向の余白 + + + Duration + 表示時間 + + + Scale + 表示倍率 + + + Max messages + 最大メッセージ数 + + + Show Kaillera port labels + Kailleraのポートラベルを表示する + + + The On-Screen Display will only work with OpenGL video plugins. + 画面表示(OSD)はOpenGLビデオプラグインでのみ動作します。 + + + Nickname + ニックネーム + + + Server list URL + サーバー一覧URL + + + Dispatcher URL + ディスパッチャーURL + + + Start ROM + ROMを開く + + + Start Combo + ROMと64DDディスクを開く + + + Shutdown + シャットダウン + + + Hard Reset + ハードリセット + + + Pause + 一時停止 + + + Soft Reset + ソフトリセット + + + Capture Screenshot + スクリーンショットを撮影 + + + Limit FPS + FPSを制限 + + + Netplay Chat + ネットプレイチャット + + + Save State + ステートを保存 + + + Save As + 名前を付けて保存 + + + Load State + ステートを読み込み + + + Load + 読み込み + + + Cheats + チート + + + GS Button + GSボタン + + + Exit + 終了 + + + 25% + 25% + + + 50% + 50% + + + 75% + 75% + + + 100% + 100% + + + 125% + 125% + + + 150% + 150% + + + 175% + 175% + + + 200% + 200% + + + 225% + 225% + + + 250% + 250% + + + 275% + 275% + + + 300% + 300% + + + Slot 0 + スロット0 + + + Slot 1 + スロット1 + + + Slot 2 + スロット2 + + + Slot 3 + スロット3 + + + Slot 4 + スロット4 + + + Slot 5 + スロット5 + + + Slot 6 + スロット6 + + + Slot 7 + スロット7 + + + Slot 8 + スロット8 + + + Slot 9 + スロット9 + + + Increase Volume + 音量を上げる + + + Decrease Volume + 音量を下げる + + + Toggle Mute Volume + ミュートを切り替え + + + Graphics + グラフィックス + + + Audio + オーディオ + + + RSP + RSP + + + Input + 入力 + + + Full Screen + 全画面表示 + + + Log + ログ + + + Refresh ROM List + ROM一覧を更新 + + + Search + 検索 + + + Remove duplicate keybindings + 重複したキー割り当てを削除 + + + Save filename format + セーブファイル名の形式 + + + Internal ROM Name + 内部ROM名 + + + CPU emulator + CPUエミュレーター + + + Pure Interpreter + 純粋インタープリター + + + Cached Interpreter + キャッシュ付きインタープリター + + + Dynamic Recompiler + 動的リコンパイラー + + + Video capture backend + ビデオキャプチャバックエンド + + + None + なし + + + SDL3 + SDL3 + + + &Use PIF ROM + &PIF ROMを使用 + + + NTSC PIF ROM + NTSC PIF ROM + + + Change + 変更 + + + PAL PIF ROM + PAL PIF ROM + + + Override game specific settings + ゲーム固有設定を上書き + + + Memory Size + メモリー容量 + + + 4 MB + 4 MB + + + 8 MB + 8 MB + + + Counter Factor + カウンタ係数 + + + SI DMA Duration + SI DMA時間 + + + Randomize PI/SI interrupt timing + PI/SI割り込みタイミングをランダム化 + + + Good Name + ゲーム名(GoodName) + + + Save Type + セーブタイプ + + + 4 KB EEPROM + 4 KB EEPROM + + + 16 KB EEPROM + 16 KB EEPROM + + + SRAM + SRAM + + + Flash RAM + Flash RAM + + + Controller pak + コントローラーパック + + + Transfer Pak + トランスファーパック + + + No + いいえ + + + Yes + はい + + + Override core settings + コア設定を上書き + + + CPU Emulator + CPUエミュレーター + + + Overclocking Factor + オーバークロック係数 + + + Randomize PI/SI Interrupt Timing + PI/SI割り込みタイミングをランダム化 + + + Video Plugin + ビデオプラグイン + + + Audio Plugin + オーディオプラグイン + + + Input Plugin + 入力プラグイン + + + Reality Signal Processor Plugin + RSP(Reality Signal Processor)プラグイン + + + Make sure to use a LLE RSP plugin (e.g. paraLLEl RSP) when using a LLE Video plugin (e.g. paraLLEl) + LLEビデオプラグイン(例: paraLLEl)を使用する場合は、LLE RSPプラグイン(例: paraLLEl RSP)を使用してください + + + Screenshot Directory + スクリーンショットの保存先 + + + Save (State) Directory + セーブステートの保存先 + + + Save (SRAM) Directory + SRAMの保存先 + + + Changes will be applied on next application run + 変更は次回のアプリケーション起動時に適用されます + + + Networking + ネットワーク + + + P2P host port + P2Pホストポート + + + Recording + 録画 + + + Enable recording by default + デフォルトで録画を有効にする + + + Records folder + 録画フォルダー + + + Disable default recording above folder size cap + フォルダー容量の上限を超えたらデフォルト録画を無効にする + + + Cap size + 容量上限 + + + Notifications + 通知 + + + Flash taskbar on player join + プレイヤー参加時にタスクバーを点滅する + + + Beep on player join + プレイヤー参加時にビープ音を鳴らす + + + Interface + インターフェース + + + General + 一般 + + + Emulation + エミュレーション + + + ROM Browser + ROMブラウザー + + + Netplay + ネットプレイ + + + Hotkeys + ホットキー + + + System + システム + + + Speed Factor + 速度倍率 + + + Current Save State + 現在のセーブステート + + + View + 表示 + + + Core + コア + + + Game + ゲーム + + + Plugins + プラグイン + + + Directories + 保存先 + + + + MainWindow + + Rosalie's Mupen GUI (VERSION) + RosalieのMupen GUI (VERSION) + + + S&ystem + システム(&S) + + + &Reset + リセット(&R) + + + &Current Save State + 現在のセーブステート(&C) + + + Speed &Factor + 速度倍率(&F) + + + Setti&ngs + 設定(&N) + + + View + 表示 + + + He&lp + ヘルプ(&L) + + + Netplay + ネットプレイ + + + Debug + デバッグ + + + toolBar + ツールバー + + + &Start ROM + ROMを開く (&S) + + + &P2P + P2P(&P) + + + S&hutdown + シャットダウン(&H) + + + &Netplay + ネットプレイ(&N) + + + &Soft Reset + ソフトリセット (&S) + + + &Hard Reset + ハードリセット(&H) + + + &Pause + 一時停止(&P) + + + Scree&nshot + スクリーンショット(&N) + + + &Limit FPS + FPSを制限(&L) + + + Sa&ve State + ステートを保存(&V) + + + Save As... + 名前を付けて保存... + + + L&oad State + ステートを読み込み(&O) + + + Loa&d... + 読み込み...(&D) + + + &Slot 0 + スロット0(&S) + + + Slot &1 + スロット1(&1) + + + Slot &2 + スロット2(&2) + + + Slot &3 + スロット3(&3) + + + Slot &4 + スロット4(&4) + + + Slot &5 + スロット5(&5) + + + Slot &6 + スロット6(&6) + + + Slot &7 + スロット7(&7) + + + Slot &8 + スロット8(&8) + + + Slot &9 + スロット9(&9) + + + Cheats... + チート... + + + &GS Button + GSボタン(&G) + + + &Exit + 終了(&E) + + + &Graphics + グラフィックス(&G) + + + &Input + 入力(&I) + + + &RSP + RSP(&R) + + + &Audio + オーディオ(&A) + + + &Settings + 設定(&S) + + + &Plugins + プラグイン(&P) + + + &Playback + 再生(&P) + + + &Fullscreen + 全画面表示(&F) + + + &Github Repository + GitHubリポジトリ(&G) + + + &About RMG + RMGについて (&A) + + + &Toolbar + ツールバー(&T) + + + &Status Bar + ステータスバー(&S) + + + &Game List + ゲーム一覧(&G) + + + Ga&me Grid + ゲームグリッド(&M) + + + &Refresh ROMs + ROMを更新(&R) + + + &Log + ログ(&L) + + + &Clear ROM Cache + ROMキャッシュを削除(&C) + + + &Uniform Size (Grid View) + 均一サイズ(グリッド表示)(&U) + + + &25% + 25%(&2) + + + &50% + 50%(&5) + + + &100% + 100%(&1) + + + 125% + 125% + + + 150% + 150% + + + 2&00% + 200%(&0) + + + &75% + 75%(&7) + + + 175% + 175% + + + 225% + 225% + + + 250% + 250% + + + 275% + 275% + + + &300% + 300%(&3) + + + Legacy Server + Kaillera + + + Peer to Peer + P2P + + + Rollback Lobby + ロールバックロビー + + + Search + 検索 + + + &Save Rollback State + ロールバック状態を保存 (&S) + + + &Load Rollback State + ロールバック状態を読み込む (&L) + + + Start Recording Debug Replay + デバッグ用リプレイの記録を開始 + + + Verify Debug Replay (Fast Forward) + デバッグ用リプレイを検証 (早送り) + + + Verify Debug Replay (with Graphics) + デバッグ用リプレイを検証 (描画あり) + + + Stress Debug Replay (Rollback 2 Every 5) + デバッグ用リプレイの負荷テスト (5回ごとに2回ロールバック) + + + Client Record/Replay 600 Inputs + クライアントの入力600回分を記録・再生 + + + + UserInterface::MainWindow + + %1 viewer + 視聴者:%1人 + + + %1 viewers + 視聴者:%1人 + + + Watching Live | %1 + ライブ観戦中 | %1 + + + Open N64 ROM or 64DD Disk + N64 ROM または 64DD ディスクを開く + + + N64 ROMs & Disks (*.n64 *.z64 *.v64 *.ndd *.d64 *.zip *.7z) + N64 ROMおよびディスク (*.n64 *.z64 *.v64 *.ndd *.d64 *.zip *.7z) + + + Open N64 ROM + N64 ROM を開く + + + N64 ROMs (*.n64 *.z64 *.v64 *.zip *.7z) + N64 ROM (*.n64 *.z64 *.v64 *.zip *.7z) + + + Open 64DD Disk + 64DD ディスクを開く + + + N64DD Disk Image (*.ndd *.d64 *.zip *.7z) + N64DDディスクイメージ (*.ndd *.d64 *.zip *.7z) + + + Save State + ステートを保存 + + + Save State (*.state);;Project64 Save State (*.pj);;All Files (*) + セーブステート (*.state);;Project64 セーブステート (*.pj);;すべてのファイル (*) + + + Open Save State + セーブステートを開く + + + Save State (*.dat *.state *.st* *.pj*);;All Files (*) + セーブステート (*.dat *.state *.st* *.pj*);;すべてのファイル (*) + + + Error + エラー + + + Are you sure you want to exit RMG? + RMGを終了しますか? + + + Don't ask for confirmation again + 今後この確認を表示しない + + + Are you sure you want to launch the drag & dropped ROM? + ドラッグ&ドロップしたROMを起動しますか? + + + Cannot start emulation when emulation is already running or being started + エミュレーションは既に実行中または起動中のため開始できません。 + + + Saved state to slot: %1 + スロット %1 にステートを保存しました + + + Saved state to: %1 + ステートを保存しました: %1 + + + State loaded from slot: %1 + スロット %1 からステートを読み込みました + + + State loaded from: %1 + ステートを読み込みました: %1 + + + Playback speed: %1% + 再生速度: %1% + + + Volume: %1% + 音量: %1% + + + Volume unmuted + 音量のミュートを解除しました + + + Volume muted + 音量をミュートしました + + + Failed to load save state + ステートの読み込みに失敗しました + + + Failed to load save state. + ステートの読み込みに失敗しました。 + + + Loaded save state. + ステートを読み込みました。 + + + Failed to save state. + ステートの保存に失敗しました。 + + + Saved state. + ステートを保存しました。 + + + Failed to capture screenshot. + スクリーンショットの撮影に失敗しました。 + + + Captured screenshot. + スクリーンショットを撮影しました。 + + + Core Error + コアエラー + + + Selected save slot: %1 + 選択中のセーブスロット: %1 + + + Slow controller USB polling detected. Try another USB port without a hub. + コントローラーのUSB応答が遅くなっています。ハブを使わずPC本体の別のUSBポートに接続してください。 + + + Controller connection is slow + コントローラーの接続が低速です + + + Your controller's USB connection is responding slowly, which can increase input latency. The USB port or a hub may be the cause. + +Try connecting the adapter to a different USB port, preferably directly on your computer. + コントローラーのUSB接続の応答が遅く、入力遅延が増える可能性があります。USBポートやハブが原因かもしれません。 + +アダプターをPC本体の別のUSBポートに接続してみてください。 + + + Input Settings + 入力設定 + + + + UserInterface::Dialog::SettingsDialog + + Select Screenshot Directory + スクリーンショット保存先を選択 + + + Select Save (State) Directory + ステートセーブ保存先を選択 + + + Select Save (SRAM) Directory + SRAM保存先を選択 + + + Select Kaillera Records Directory + Kaillera記録の保存先を選択 + + + Open NTSC PIF ROM + NTSC PIF ROMを開く + + + PIF ROMs (*.rom) + PIF ROM (*.rom) + + + Open PAL PIF ROM + PAL PIF ROMを開く + + + GameCube Adapter + GameCubeアダプター + + + Generic USB Input + 汎用USB入力 + + + Raphnetraw N64 Adapter + Raphnetraw N64アダプター + + + Logging + ログ記録 + + + Use rollback engine for local play + ローカルプレイでロールバックエンジンを使用 + + + Enable verbose rollback stats logging + 詳細なロールバック統計ログを有効化 + + + Log netplay stalls only (lightweight freeze diagnostics) + ネットプレイのフリーズ時のみログを記録する(軽量診断) + + + Logs only when a rollback session stalls (a multi-second freeze), with per-peer +network stats so you can see which player's input stopped arriving. Writes nothing +during smooth play, so the log stays tiny — unlike verbose stats, which writes every +frame. Safe to leave on; one player logging is enough to identify the culprit. + ロールバックセッションが停止(数秒間フリーズ)したときだけ、プレイヤーごとのネットワーク統計を記録します。どのプレイヤーから入力が届かなくなったか確認できます。正常に動作している間は何も記録しないため、毎フレーム記録する詳細統計ログよりファイルが小さくなります。常時有効にしても問題ありません。原因特定には1人が記録すれば十分です。 + + + Enable pacing trace logging + ペーシングトレースログを有効にする + + + Writes detailed frontend and core pacing CSV logs when a rollback session ends. +Enable this only while diagnosing frame pacing; it is disabled by default. + ロールバックセッション終了時にフロントエンドとコアのペーシング詳細をCSVに記録します。フレームペーシングの診断時のみ有効にしてください。既定では無効です。 + + + Enable verbose PIF input logging + PIF入力の詳細ログを有効化 + + + Enable verbose Glide input logging + Glide入力の詳細ログを有効化 + + + Enable lobby ping diagnostics logging + ロビーping診断ログを有効化 + + + Write a detailed lobby_ping_*.log file (in the Logs folder) tracing ICE/STUN +candidate gathering, signaling, connectivity checks, and peer pings. Candidate +addresses are included, but ICE credentials are redacted. Only useful when +debugging connection problems. Applies the next time you connect to the lobby. + ICE/STUN候補の収集、シグナリング、接続確認、ピアへのpingを記録した詳細な lobby_ping_*.log ファイルをLogsフォルダーに作成します。候補アドレスは記録されますが、ICE認証情報は伏せられます。接続問題の診断にのみ使用してください。次回ロビー接続時に反映されます。 + + + Hide my location from other players + ロビーで自分の国旗・国名を表示しない + + + Your row in the netplay lobby shows no country flag, and no country in its +hover tooltip, for everyone on the server. Region-based ping estimates still +work. Players you actually play with still exchange connection addresses — +this hides the flag, not your traffic. Applies the next time you connect. + ネットプレイロビーでは、他のプレイヤーに自分の国旗と国名を表示しません。地域に基づくPing推定は引き続き機能します。実際に対戦する相手とは接続アドレスを引き続き交換します。この設定で隠れるのは国旗・国名の表示であり、通信そのものではありません。次回ロビー接続時に反映されます。 + + + Rollback + ロールバック + + + Primary Monitor + メインモニター + + + Display %1 + ディスプレイ %1 + + + Desktop Default + デスクトップの既定 + + + %1 Hz + %1 Hz + + + **Use Core Plugin Settings** + **コアのプラグイン設定を使用** + + + + QtMessageBox + + Information + 情報 + + + Error + エラー + + + + QWidget + + Warning + 警告 + + + Controller messages + コントローラーのメッセージ + + + + QObject + + Unnamed controller + 名前のないコントローラー + + + + UserInterface::Dialog::UnifiedInputDialog + + Not set + 未設定 + + + Input %1 + 入力%1 + + + button %1 + ボタン%1 + + + axis %1%2 + 軸%1%2 + + + hat %1:%2 + ハット%1:%2 + + + L (digital) + L(デジタル) + + + R (digital) + R(デジタル) + + + D-Up + 十字キー上 + + + D-Down + 十字キー下 + + + D-Left + 十字キー左 + + + D-Right + 十字キー右 + + + L (analog) + L(アナログ) + + + R (analog) + R(アナログ) + + + C-Stick Up + Cスティック上 + + + C-Stick Down + Cスティック下 + + + C-Stick Left + Cスティック左 + + + C-Stick Right + Cスティック右 + + + C-Up + Cボタン上 + + + C-Down + Cボタン下 + + + C-Left + Cボタン左 + + + C-Right + Cボタン右 + + + Stick Up + スティック上 + + + Stick Down + スティック下 + + + Stick Left + スティック左 + + + Stick Right + スティック右 + + + Input Settings + 入力設定 + + + Player %1 + プレイヤー%1 + + + Device details and troubleshooting + デバイスの詳細とトラブルシューティング + + + Device details + デバイスの詳細 + + + Automatic (Recommended) + 自動(推奨) + + + Cached + キャッシュ + + + Default + 標準 + + + Polling mode: + ポーリング方式: + + + Save and Close + 保存して閉じる + + + Adapter ports + アダプターのポート + + + Choose a different adapter port for each enabled player. + 有効にするプレイヤーごとに異なるアダプターポートを選択してください。 + + + Controller + コントローラー + + + Player Port + プレイヤーのポート + + + Controller type: + コントローラーの種類: + + + The controller type applies to all four players. + コントローラーの種類は4人のプレイヤー全員に適用されます。 + + + Enable Port + ポートを有効にする + + + Device / port: + デバイス / ポート: + + + Device: + デバイス: + + + Profile + プロファイル + + + Create a named profile from these settings. + 現在の設定から名前付きプロファイルを作成します。 + + + New profile + 新しいプロファイル + + + Delete the selected profile. + 選択したプロファイルを削除します。 + + + Delete profile + プロファイルを削除 + + + Hotkeys + ホットキー + + + Options + オプション + + + Controller bindings + コントローラーの割り当て + + + Digital Pad + 十字キー + + + Analog Stick + アナログスティック + + + Stick + スティック + + + X: + X: + + + Y: + Y: + + + Buttons + ボタン + + + C Buttons + Cボタン + + + Stick Settings + スティック設定 + + + Use real N64 stick range + 実機のN64スティック可動範囲を使用 + + + Deadzone: + デッドゾーン: + + + Range: + 範囲: + + + Stick sensitivity: + スティック感度: + + + Trigger Settings + トリガー設定 + + + Digital + デジタル + + + Analog + アナログ + + + L trigger: + Lトリガー: + + + R trigger: + Rトリガー: + + + Trigger threshold: + トリガーのしきい値: + + + Slow controller USB polling detected. +Try another USB port directly on your computer, without a hub. + コントローラーのUSBポーリングが低速です。 +ハブを使わず、PC本体の別のUSBポートに接続してください。 + + + GameCube adapter is in USB mode. +Set its switch to Wii U/NS (native) mode. + GameCubeアダプターがUSBモードになっています。 +スイッチをWii U/NS(ネイティブ)モードに切り替えてください。 + + + Cannot access the native GameCube adapter. +Check its driver and close other apps using it. + GameCubeアダプターにアクセスできません。 +ドライバーを確認し、アダプターを使用中の他のアプリを閉じてください。 + + + No GameCube controller answered on the selected adapter port. + 選択したアダプターポートのGameCubeコントローラーから応答がありません。 + + + Raphnet adapter selected as USB input. +Choose N64 Controller (Raphnet) for better support. + RaphnetアダプターがUSB入力として選択されています。 +より適切なN64コントローラー(Raphnet)を選択してください。 + + + Raphnet adapter detected + Raphnetアダプターを検出しました + + + For this adapter, N64 Controller (Raphnet) is the recommended controller type. Switch to it now? + このアダプターにはN64コントローラー(Raphnet)を推奨します。今すぐ切り替えますか? + + + Use Raphnet + Raphnetを使用 + + + Keep USB + USBのままにする + + + USB Controller / Keyboard + USBコントローラー / キーボード + + + Controller type can be changed after the game ends. + ゲーム終了後にコントローラーの種類を変更できます。 + + + N64 Controller (Raphnet) + N64コントローラー(Raphnet) + + + GameCube Controller (Native) + GameCubeコントローラー(ネイティブ) + + + Input Device + 入力デバイス + + + Adapter Port + アダプターポート + + + None + なし + + + Keyboard + キーボード + + + %1 (disconnected) + %1(切断中) + + + %1 +USB %2 +%3 + %1 +USB %2 +%3 + + + Adapter port %1 + アダプターポート%1 + + + No adapter port + アダプターポートなし + + + Press input... + 入力を待っています... + + + Fixed + 固定 + + + %1% + %1% + + + Player %1 settings + プレイヤー%1の設定 + + + Current game + 現在のゲーム + + + New Profile + 新しいプロファイル + + + Profile name: + プロファイル名: + + + Profile name + プロファイル名 + + + Use a unique name without quotes, semicolons, brackets, or line breaks. + 引用符、セミコロン、角括弧、改行を含まない一意の名前を入力してください。 + + + No raphnet raw-access adapter was detected. + Raphnetのrawアクセス対応アダプターが見つかりませんでした。 + + + Could not start the raphnet input test. Close other apps using the adapter; RMG-K will retry automatically. + Raphnet入力テストを開始できませんでした。アダプターを使用中の他のアプリを閉じてください。RMG-Kが自動的に再試行します。 + + + No valid controller response. Check the selected adapter port and connection. + コントローラーから有効な応答がありません。選択したアダプターポートと接続を確認してください。 + + + Advanced settings + 詳細設定 + + + %1ms + %1ミリ秒 + + + Waiting for response + 応答を待っています + + + USB Port Speed: %1 • %2 + USBポート速度: %1 • %2 + + + Cached Mode + キャッシュモード + + + Default Mode + 標準モード + + + Waiting for a controller response. Plug a controller into the adapter and select its port. A missing response is not a latency measurement. + コントローラーの応答を待っています。コントローラーをアダプターに接続し、ポートを選択してください。応答がない状態では遅延を測定できません。 + + + Controller response: %1 samples · average %2 ms · peak %3 ms. + コントローラーの応答: %1件 · 平均%2ミリ秒 · 最大%3ミリ秒。 + + + Default mode may reduce FPS + 標準モードではFPSが低下する可能性があります + + + Slow USB polling has been detected (cutoff: %1 ms). Default mode makes the game wait for controller reads, which may reduce FPS. + +Use Default mode anyway? + USBポーリングが低速です(判定基準: %1ミリ秒)。標準モードではコントローラーの読み取りをゲームが待つため、FPSが低下する可能性があります。 + +それでも標準モードを使用しますか? + + + Proceed Anyway + 続行する + + + GameCube adapter scan unavailable: %1 + GameCubeアダプターをスキャンできません: %1 + + + No GameCube adapter detected in Wii U/NS (native) mode. + Wii U/NS(ネイティブ)モードのGameCubeアダプターが見つかりませんでした。 + + + GameCube adapter access failed. Check the driver and close other apps using the adapter. + GameCubeアダプターにアクセスできません。ドライバーを確認し、アダプターを使用中の他のアプリを閉じてください。 + + + GameCube adapter detected, but polling failed: %1 + GameCubeアダプターを検出しましたが、ポーリングに失敗しました: %1 + + + No SDL controller selected. + SDLコントローラーが選択されていません。 + + + Selected controller is disconnected. Reconnect it or select another controller. + 選択したコントローラーが切断されています。再接続するか、別のコントローラーを選択してください。 + + + SDL input unavailable: %1 + SDL入力を利用できません: %1 + + + Could not open SDL gamepad: %1 + SDLゲームパッドを開けません: %1 + + + Could not open SDL joystick: %1 + SDLジョイスティックを開けません: %1 + + + raphnet adapter: HID %1 raw interface detected (%2 channel) + raphnetアダプター: HID %1のrawインターフェースを検出(%2チャネル) + + + raphnet adapter: HID %1 raw interface detected (%2 channels) + raphnetアダプター: HID %1のrawインターフェースを検出(%2チャネル) + + + Native GameCube adapter: USB %1 detected and openable -> GameCube native + ネイティブGameCubeアダプター: USB %1を検出し、接続可能 → GameCubeネイティブ + + + Native GameCube adapter: USB %1 detected, but access failed (check the driver and other apps) + ネイティブGameCubeアダプター: USB %1を検出しましたが、アクセスできません(ドライバーと他のアプリを確認) + + + Native GameCube adapter: USB %1 not detected + ネイティブGameCubeアダプター: USB %1は見つかりませんでした + + + Native GameCube adapter scan failed: %1 + ネイティブGameCubeアダプターのスキャンに失敗しました: %1 + + + Native GameCube adapter scan unavailable: %1 + ネイティブGameCubeアダプターのスキャンを利用できません: %1 + + + SDL scan unavailable: %1 + SDLスキャンを利用できません: %1 + + + SDL gamepad + SDLゲームパッド + + + SDL joystick + SDLジョイスティック + + + VID:PID unknown + VID:PID不明 + + + VID:PID %1 + VID:PID %1 + + + %1 id %2: name unavailable [%3] -> ignored + %1 ID %2: 名前を取得できません [%3] → 無視 + + + Raphnet raw interface confirmed + Raphnetのrawインターフェースを確認 + + + Raphnet USB device; compatible raw interface not detected + Raphnet USBデバイスです。対応するrawインターフェースは見つかりませんでした + + + Mayflash GameCube adapter in USB mode; switch to Wii U/NS (native) mode for better support + Mayflash GameCubeアダプターがUSBモードです。より適切なWii U/NS(ネイティブ)モードに切り替えてください + + + GameCube-like SDL name; native mode not confirmed + GameCubeに似たSDLデバイス名です。ネイティブモードは確認できませんでした + + + Other USB + その他のUSBデバイス + + + %1 id %2: "%3" [%4] -> %5 + %1 ID %2: 「%3」[%4] → %5 + + + SDL scan: no named gamepad or joystick devices detected + SDLスキャン: 名前のあるゲームパッドまたはジョイスティックが見つかりませんでした + + + + UnifiedInputDialog + + Clear binding + 割り当てを解除 + + + Clear %1 binding + %1の割り当てを解除 + + + + RomBrowserEmptyWidget + + <html><head/><body><p><span style=" font-weight:700;">No ROMs in supported formats were found.</span></p><p>Please select a directory with ROMs to begin.</p><p>ROMs in the following formats will be scanned and listed: </p></body></html> + <html><head/><body><p><span style=" font-weight:700;">対応形式のROMが見つかりませんでした。</span></p><p>ROMが保存されているフォルダーを選択してください。</p><p>以下の形式のROMを検索して一覧表示します:</p></body></html> + + + .n64/.z64/.v64 (N64 Roms) + .n64/.z64/.v64 (N64 ROM) + + + .ndd/.d64 (64DD Disks) + .ndd/.d64 (64DD ディスク) + + + .zip/.7z (Archive) + .zip/.7z (アーカイブ) + + + Select ROM Directory... + ROMフォルダーを選択... + + + Refresh + 更新 + diff --git a/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp b/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp index aceb17f06..9e7ae4572 100644 --- a/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp +++ b/Source/RMG/UserInterface/Dialog/SettingsDialog.cpp @@ -238,34 +238,34 @@ SettingsDialog::SettingsDialog(QWidget *parent, QString file) : QDialog(parent) QWidget* rollbackTab = new QWidget(this->tabWidget); QVBoxLayout* rollbackLayout = new QVBoxLayout(rollbackTab); - QGroupBox* rollbackLoggingGroupBox = new QGroupBox("Logging", rollbackTab); + QGroupBox* rollbackLoggingGroupBox = new QGroupBox(tr("Logging"), rollbackTab); QVBoxLayout* rollbackLoggingLayout = new QVBoxLayout(rollbackLoggingGroupBox); - this->rollbackEnableLocalTestingCheckBox = new QCheckBox("Use rollback engine for local play", rollbackTab); - this->rollbackVerboseStatsCheckBox = new QCheckBox("Enable verbose rollback stats logging", rollbackLoggingGroupBox); - this->rollbackStallDiagnosticsCheckBox = new QCheckBox("Log netplay stalls only (lightweight freeze diagnostics)", rollbackLoggingGroupBox); + this->rollbackEnableLocalTestingCheckBox = new QCheckBox(tr("Use rollback engine for local play"), rollbackTab); + this->rollbackVerboseStatsCheckBox = new QCheckBox(tr("Enable verbose rollback stats logging"), rollbackLoggingGroupBox); + this->rollbackStallDiagnosticsCheckBox = new QCheckBox(tr("Log netplay stalls only (lightweight freeze diagnostics)"), rollbackLoggingGroupBox); this->rollbackStallDiagnosticsCheckBox->setToolTip( - "Logs only when a rollback session stalls (a multi-second freeze), with per-peer\n" - "network stats so you can see which player's input stopped arriving. Writes nothing\n" - "during smooth play, so the log stays tiny — unlike verbose stats, which writes every\n" - "frame. Safe to leave on; one player logging is enough to identify the culprit."); - this->rollbackPacingTraceCheckBox = new QCheckBox("Enable pacing trace logging", rollbackLoggingGroupBox); + tr("Logs only when a rollback session stalls (a multi-second freeze), with per-peer\n" + "network stats so you can see which player's input stopped arriving. Writes nothing\n" + "during smooth play, so the log stays tiny — unlike verbose stats, which writes every\n" + "frame. Safe to leave on; one player logging is enough to identify the culprit.")); + this->rollbackPacingTraceCheckBox = new QCheckBox(tr("Enable pacing trace logging"), rollbackLoggingGroupBox); this->rollbackPacingTraceCheckBox->setToolTip( - "Writes detailed frontend and core pacing CSV logs when a rollback session ends.\n" - "Enable this only while diagnosing frame pacing; it is disabled by default."); - this->rollbackVerbosePifInputLoggingCheckBox = new QCheckBox("Enable verbose PIF input logging", rollbackLoggingGroupBox); - this->rollbackVerboseGlideInputLoggingCheckBox = new QCheckBox("Enable verbose Glide input logging", rollbackLoggingGroupBox); - this->rollbackPingDiagnosticsCheckBox = new QCheckBox("Enable lobby ping diagnostics logging", rollbackLoggingGroupBox); + tr("Writes detailed frontend and core pacing CSV logs when a rollback session ends.\n" + "Enable this only while diagnosing frame pacing; it is disabled by default.")); + this->rollbackVerbosePifInputLoggingCheckBox = new QCheckBox(tr("Enable verbose PIF input logging"), rollbackLoggingGroupBox); + this->rollbackVerboseGlideInputLoggingCheckBox = new QCheckBox(tr("Enable verbose Glide input logging"), rollbackLoggingGroupBox); + this->rollbackPingDiagnosticsCheckBox = new QCheckBox(tr("Enable lobby ping diagnostics logging"), rollbackLoggingGroupBox); this->rollbackPingDiagnosticsCheckBox->setToolTip( - "Write a detailed lobby_ping_*.log file (in the Logs folder) tracing ICE/STUN\n" - "candidate gathering, signaling, connectivity checks, and peer pings. Candidate\n" - "addresses are included, but ICE credentials are redacted. Only useful when\n" - "debugging connection problems. Applies the next time you connect to the lobby."); - this->rollbackHideLocationCheckBox = new QCheckBox("Hide my location from other players", rollbackTab); + tr("Write a detailed lobby_ping_*.log file (in the Logs folder) tracing ICE/STUN\n" + "candidate gathering, signaling, connectivity checks, and peer pings. Candidate\n" + "addresses are included, but ICE credentials are redacted. Only useful when\n" + "debugging connection problems. Applies the next time you connect to the lobby.")); + this->rollbackHideLocationCheckBox = new QCheckBox(tr("Hide my location from other players"), rollbackTab); this->rollbackHideLocationCheckBox->setToolTip( - "Your row in the netplay lobby shows no country flag, and no country in its\n" - "hover tooltip, for everyone on the server. Region-based ping estimates still\n" - "work. Players you actually play with still exchange connection addresses —\n" - "this hides the flag, not your traffic. Applies the next time you connect."); + tr("Your row in the netplay lobby shows no country flag, and no country in its\n" + "hover tooltip, for everyone on the server. Region-based ping estimates still\n" + "work. Players you actually play with still exchange connection addresses —\n" + "this hides the flag, not your traffic. Applies the next time you connect.")); rollbackLayout->addWidget(this->rollbackEnableLocalTestingCheckBox); rollbackLayout->addWidget(this->rollbackHideLocationCheckBox); rollbackLoggingLayout->addWidget(this->rollbackVerboseStatsCheckBox); @@ -276,7 +276,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, QString file) : QDialog(parent) rollbackLoggingLayout->addWidget(this->rollbackPingDiagnosticsCheckBox); rollbackLayout->addWidget(rollbackLoggingGroupBox); rollbackLayout->addStretch(); - this->tabWidget->addTab(rollbackTab, "Rollback"); + this->tabWidget->addTab(rollbackTab, tr("Rollback")); this->setIconsForEmulationInfoText(); @@ -392,7 +392,7 @@ void SettingsDialog::populateExclusiveFullscreenModes(void) if (!this->exclusiveMonitorComboBox->property("populated").toBool()) { this->exclusiveMonitorComboBox->clear(); - this->exclusiveMonitorComboBox->addItem("Primary Monitor", ""); + this->exclusiveMonitorComboBox->addItem(tr("Primary Monitor"), ""); DISPLAY_DEVICEW displayDevice = {}; displayDevice.cb = sizeof(displayDevice); for (DWORD i = 0; EnumDisplayDevicesW(NULL, i, &displayDevice, 0); i++) @@ -410,7 +410,7 @@ void SettingsDialog::populateExclusiveFullscreenModes(void) int displayIdx = devName.lastIndexOf("DISPLAY"); if (displayIdx >= 0) { - displayNum = "Display " + devName.mid(displayIdx + 7); + displayNum = tr("Display %1").arg(devName.mid(displayIdx + 7)); } QString label; if (EnumDisplayDevicesW(displayDevice.DeviceName, 0, &monitor, 0)) @@ -471,7 +471,7 @@ void SettingsDialog::populateExclusiveFullscreenModes(void) // populate resolutions this->exclusiveResolutionComboBox->clear(); - this->exclusiveResolutionComboBox->addItem("Desktop Default", ""); + this->exclusiveResolutionComboBox->addItem(tr("Desktop Default"), ""); for (const auto& res : resolutions) { QString text = QString("%1x%2").arg(res.width).arg(res.height); @@ -508,10 +508,10 @@ void SettingsDialog::populateExclusiveFullscreenModes(void) // populate refresh rates this->exclusiveRefreshRateComboBox->clear(); - this->exclusiveRefreshRateComboBox->addItem("Desktop Default", 0); + this->exclusiveRefreshRateComboBox->addItem(tr("Desktop Default"), 0); for (int rate : refreshRates) { - QString text = QString("%1 Hz").arg(rate); + QString text = tr("%1 Hz").arg(rate); this->exclusiveRefreshRateComboBox->addItem(text, rate); } @@ -773,7 +773,7 @@ void SettingsDialog::loadGamePluginSettings(void) for (QComboBox *comboBox : comboBoxArray) { comboBox->clear(); - comboBox->addItem("**Use Core Plugin Settings**"); + comboBox->addItem(tr("**Use Core Plugin Settings**")); } for (const auto &p : this->pluginList) @@ -917,7 +917,7 @@ void SettingsDialog::loadInterfaceEmulationSettings(void) this->exclusiveMonitorComboBox->clear(); // monitor combobox is populated in populateExclusiveFullscreenModes // seed with saved value so it gets selected after population - this->exclusiveMonitorComboBox->addItem("Primary Monitor", ""); + this->exclusiveMonitorComboBox->addItem(tr("Primary Monitor"), ""); if (!savedMonitor.isEmpty()) { this->exclusiveMonitorComboBox->addItem(savedMonitor, savedMonitor); @@ -926,7 +926,7 @@ void SettingsDialog::loadInterfaceEmulationSettings(void) this->exclusiveMonitorComboBox->blockSignals(false); this->exclusiveResolutionComboBox->blockSignals(true); this->exclusiveResolutionComboBox->clear(); - this->exclusiveResolutionComboBox->addItem("Desktop Default", ""); + this->exclusiveResolutionComboBox->addItem(tr("Desktop Default"), ""); if (!savedRes.isEmpty()) { this->exclusiveResolutionComboBox->addItem(savedRes, savedRes); @@ -935,10 +935,10 @@ void SettingsDialog::loadInterfaceEmulationSettings(void) this->exclusiveResolutionComboBox->blockSignals(false); this->exclusiveRefreshRateComboBox->blockSignals(true); this->exclusiveRefreshRateComboBox->clear(); - this->exclusiveRefreshRateComboBox->addItem("Desktop Default", 0); + this->exclusiveRefreshRateComboBox->addItem(tr("Desktop Default"), 0); if (savedRate > 0) { - this->exclusiveRefreshRateComboBox->addItem(QString("%1 Hz").arg(savedRate), savedRate); + this->exclusiveRefreshRateComboBox->addItem(tr("%1 Hz").arg(savedRate), savedRate); this->exclusiveRefreshRateComboBox->setCurrentIndex(1); } this->exclusiveRefreshRateComboBox->blockSignals(false); @@ -2228,10 +2228,10 @@ void SettingsDialog::on_coreCpuEmulatorComboBox_currentIndexChanged(int index) void SettingsDialog::on_changeNTSCPifRomButton_clicked(void) { - this->chooseFile(this->ntscPifRomLineEdit, tr("Open NTSC PIF ROM"), "PIF ROMs (*.rom)", { "5C124E7948ADA85DA603A522782940D0", "4921D5F2165DEE6E2496F4388C4C81DA" }); + this->chooseFile(this->ntscPifRomLineEdit, tr("Open NTSC PIF ROM"), tr("PIF ROMs (*.rom)"), { "5C124E7948ADA85DA603A522782940D0", "4921D5F2165DEE6E2496F4388C4C81DA" }); } void SettingsDialog::on_changePALPifRomButton_clicked(void) { - this->chooseFile(this->palPifRomLineEdit, tr("Open PAL PIF ROM"), "PIF ROMs (*.rom)", { "D4232DC935CAD0650AC2664D52281F3A", "2B6EEC586FAA43F3462333B844834554" }); + this->chooseFile(this->palPifRomLineEdit, tr("Open PAL PIF ROM"), tr("PIF ROMs (*.rom)"), { "D4232DC935CAD0650AC2664D52281F3A", "2B6EEC586FAA43F3462333B844834554" }); } diff --git a/Source/RMG/UserInterface/Dialog/UnifiedInputDialog.cpp b/Source/RMG/UserInterface/Dialog/UnifiedInputDialog.cpp index 38a8fc2f8..d37238463 100644 --- a/Source/RMG/UserInterface/Dialog/UnifiedInputDialog.cpp +++ b/Source/RMG/UserInterface/Dialog/UnifiedInputDialog.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -523,7 +524,7 @@ QString binding_text(const BindingValue& binding) { if (binding_is_empty(binding)) { - return QStringLiteral("Not set"); + return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Not set"); } QStringList parts; @@ -537,10 +538,23 @@ QString binding_text(const BindingValue& binding) continue; } - parts.append(binding.text[i].isEmpty() ? QStringLiteral("Input %1").arg(binding.data[i]) : binding.text[i]); + QString displayText = binding.text[i]; + const InputType type = static_cast(binding.types[i]); + if (displayText.isEmpty()) + displayText = QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Input %1").arg(binding.data[i]); + else if (type == InputType::JoystickButton && displayText == QStringLiteral("button %1").arg(binding.data[i])) + displayText = QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "button %1").arg(binding.data[i]); + else if (type == InputType::JoystickAxis && + displayText == QStringLiteral("axis %1%2").arg(binding.data[i]).arg(binding.extraData[i] ? QStringLiteral("+") : QStringLiteral("-"))) + displayText = QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "axis %1%2") + .arg(binding.data[i]).arg(binding.extraData[i] ? QStringLiteral("+") : QStringLiteral("-")); + else if (type == InputType::JoystickHat && displayText == QStringLiteral("hat %1:%2").arg(binding.data[i]).arg(binding.extraData[i])) + displayText = QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "hat %1:%2") + .arg(binding.data[i]).arg(binding.extraData[i]); + parts.append(displayText); } - return parts.isEmpty() ? QStringLiteral("Not set") : parts.join(QStringLiteral(", ")); + return parts.isEmpty() ? QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Not set") : parts.join(QStringLiteral(", ")); } void set_single_binding(BindingValue& binding, InputType type, int data, int extraData, const QString& text) @@ -643,21 +657,21 @@ QString gc_input_to_string(GCInput input) case GCInput::Y: return QStringLiteral("Y"); case GCInput::Z: return QStringLiteral("Z"); case GCInput::Start: return QStringLiteral("Start"); - case GCInput::L: return QStringLiteral("L (digital)"); - case GCInput::R: return QStringLiteral("R (digital)"); - case GCInput::DpadUp: return QStringLiteral("D-Up"); - case GCInput::DpadDown: return QStringLiteral("D-Down"); - case GCInput::DpadLeft: return QStringLiteral("D-Left"); - case GCInput::DpadRight: return QStringLiteral("D-Right"); - case GCInput::LeftTrigger: return QStringLiteral("L (analog)"); - case GCInput::RightTrigger: return QStringLiteral("R (analog)"); - case GCInput::CStickUp: return QStringLiteral("C-Stick Up"); - case GCInput::CStickDown: return QStringLiteral("C-Stick Down"); - case GCInput::CStickLeft: return QStringLiteral("C-Stick Left"); - case GCInput::CStickRight: return QStringLiteral("C-Stick Right"); + case GCInput::L: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "L (digital)"); + case GCInput::R: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "R (digital)"); + case GCInput::DpadUp: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Up"); + case GCInput::DpadDown: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Down"); + case GCInput::DpadLeft: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Left"); + case GCInput::DpadRight: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Right"); + case GCInput::LeftTrigger: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "L (analog)"); + case GCInput::RightTrigger: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "R (analog)"); + case GCInput::CStickUp: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Up"); + case GCInput::CStickDown: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Down"); + case GCInput::CStickLeft: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Left"); + case GCInput::CStickRight: return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Right"); case GCInput::None: default: - return QStringLiteral("Not set"); + return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Not set"); } } @@ -815,10 +829,37 @@ void apply_n64_buttons(UserInterface::Widget::ControllerImageWidget* widget, uin set_button(widget, N64ControllerButton::CButtonRight, (buttons & kN64ButtonCRight) != 0); } +QString binding_target_display_label(const char* label) +{ + const QString raw = QString::fromLatin1(label); + if (raw == QStringLiteral("D-Up")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Up"); + if (raw == QStringLiteral("D-Down")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Down"); + if (raw == QStringLiteral("D-Left")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Left"); + if (raw == QStringLiteral("D-Right")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "D-Right"); + if (raw == QStringLiteral("C-Up")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Up"); + if (raw == QStringLiteral("C-Down")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Down"); + if (raw == QStringLiteral("C-Left")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Left"); + if (raw == QStringLiteral("C-Right")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Right"); + if (raw == QStringLiteral("Stick Up")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Stick Up"); + if (raw == QStringLiteral("Stick Down")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Stick Down"); + if (raw == QStringLiteral("Stick Left")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Stick Left"); + if (raw == QStringLiteral("Stick Right")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "Stick Right"); + if (raw == QStringLiteral("L (digital)")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "L (digital)"); + if (raw == QStringLiteral("R (digital)")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "R (digital)"); + if (raw == QStringLiteral("L (analog)")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "L (analog)"); + if (raw == QStringLiteral("R (analog)")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "R (analog)"); + if (raw == QStringLiteral("C-Stick Up")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Up"); + if (raw == QStringLiteral("C-Stick Down")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Down"); + if (raw == QStringLiteral("C-Stick Left")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Left"); + if (raw == QStringLiteral("C-Stick Right")) return QCoreApplication::translate("UserInterface::Dialog::UnifiedInputDialog", "C-Stick Right"); + return raw; +} + QPushButton* add_mapping_row(QGridLayout* layout, ControllerPage* page, int row, int bindingIndex, QWidget* parent) { const BindingTarget& target = kBindingTargets[static_cast(bindingIndex)]; - auto* label = new QLabel(QString::fromLatin1(target.label), parent); + const QString displayLabel = binding_target_display_label(target.label); + auto* label = new QLabel(displayLabel, parent); auto* button = new QPushButton(parent); auto* clearButton = new QPushButton(parent); @@ -829,7 +870,7 @@ QPushButton* add_mapping_row(QGridLayout* layout, ControllerPage* page, int row, clearButton->setFixedWidth(24); clearButton->setToolTip(QCoreApplication::translate("UnifiedInputDialog", "Clear binding")); clearButton->setAccessibleName(QCoreApplication::translate("UnifiedInputDialog", "Clear %1 binding") - .arg(QString::fromLatin1(target.label))); + .arg(displayLabel)); clearButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); layout->addWidget(label, row, 0); @@ -1760,7 +1801,9 @@ void UnifiedInputDialog::updatePageDeviceChoices(int pageIndex) { const UsbDeviceChoice& device = this->usbDevices[i]; if (pageIndex == 0 && device.type == InputDeviceType::None) continue; - const QString name = device.displayName.isEmpty() ? usb_device_label(device) : device.displayName; + const QString name = device.type == InputDeviceType::None ? tr("None") : + device.type == InputDeviceType::Keyboard ? tr("Keyboard") : + (device.displayName.isEmpty() ? usb_device_label(device) : device.displayName); page->deviceComboBox->addItem(device.connected ? name : tr("%1 (disconnected)").arg(name), i); if (device.type == InputDeviceType::Joystick) page->deviceComboBox->setItemData(page->deviceComboBox->count() - 1, @@ -3488,10 +3531,11 @@ UnifiedInputDialog::InputDetectionReport UnifiedInputDialog::ScanInputDevices(vo } report.foundRaphnet = true; - report.lines.append(tr("raphnet adapter: HID %1 raw interface detected (%2 channel%3)") + report.lines.append((adapter->rawChannels == 1 ? + tr("raphnet adapter: HID %1 raw interface detected (%2 channel)") : + tr("raphnet adapter: HID %1 raw interface detected (%2 channels)")) .arg(format_usb_id(kRaphnetVendorId, static_cast(current->product_id))) - .arg(adapter->rawChannels) - .arg(adapter->rawChannels == 1 ? QString() : QStringLiteral("s"))); + .arg(adapter->rawChannels)); } hid_free_enumeration(devices); hid_exit(); diff --git a/Source/RMG/UserInterface/MainWindow.cpp b/Source/RMG/UserInterface/MainWindow.cpp index e5ee1a1cb..9cb509e43 100644 --- a/Source/RMG/UserInterface/MainWindow.cpp +++ b/Source/RMG/UserInterface/MainWindow.cpp @@ -1851,7 +1851,7 @@ void MainWindow::closeEvent(QCloseEvent *event) CoreSettingsGetBoolValue(SettingsID::GUI_ConfirmExitWhileInGame)) { bool skipExitConfirmation = false; - bool ret = QtMessageBox::Question(this, "Are you sure you want to exit RMG?", "Don't ask for confirmation again", skipExitConfirmation); + bool ret = QtMessageBox::Question(this, tr("Are you sure you want to exit RMG?"), tr("Don't ask for confirmation again"), skipExitConfirmation); if (!ret) { event->ignore(); @@ -2263,7 +2263,7 @@ void MainWindow::showErrorMessage(QString text, QString details, bool force) QMessageBox* msgBox = new QMessageBox(this); msgBox->setIcon(QMessageBox::Icon::Critical); - msgBox->setWindowTitle("Error"); + msgBox->setWindowTitle(tr("Error")); msgBox->setText(text); msgBox->setDetailedText(details); msgBox->addButton(QMessageBox::Ok); @@ -2574,7 +2574,7 @@ void MainWindow::launchEmulationThread(QString cartRom, QString diskRom, bool re if (!dragdrop && this->emulationThread->isRunning()) { - this->showErrorMessage("EmulationThread::run Failed", "Cannot start emulation when emulation is already running or being started"); + this->showErrorMessage("EmulationThread::run Failed", tr("Cannot start emulation when emulation is already running or being started")); return; } @@ -3696,8 +3696,8 @@ void MainWindow::on_EventFilter_FileDropped(QDropEvent *event) if (inEmulation && confirmDragDrop) { confirmDragDrop = false; - bool ret = QtMessageBox::Question(this, "Are you sure you want to launch the drag & dropped ROM?", - "Don't ask for confirmation again", confirmDragDrop); + bool ret = QtMessageBox::Question(this, tr("Are you sure you want to launch the drag & dropped ROM?"), + tr("Don't ask for confirmation again"), confirmDragDrop); if (!ret) { return; @@ -3911,7 +3911,7 @@ void MainWindow::on_Action_System_OpenRom(void) this->on_Action_System_Pause(); } - QString romFile = QFileDialog::getOpenFileName(this, tr("Open N64 ROM or 64DD Disk"), "", "N64 ROMs & Disks (*.n64 *.z64 *.v64 *.ndd *.d64 *.zip *.7z)"); + QString romFile = QFileDialog::getOpenFileName(this, tr("Open N64 ROM or 64DD Disk"), "", tr("N64 ROMs & Disks (*.n64 *.z64 *.v64 *.ndd *.d64 *.zip *.7z)")); if (romFile.isEmpty()) { if (isRunning && !isPaused) @@ -3939,7 +3939,7 @@ void MainWindow::on_Action_System_OpenCombo(void) this->on_Action_System_Pause(); } - QString cartRom = QFileDialog::getOpenFileName(this, tr("Open N64 ROM"), "", "N64 ROMs (*.n64 *.z64 *.v64 *.zip *.7z)"); + QString cartRom = QFileDialog::getOpenFileName(this, tr("Open N64 ROM"), "", tr("N64 ROMs (*.n64 *.z64 *.v64 *.zip *.7z)")); if (cartRom.isEmpty()) { if (isRunning && !isPaused) @@ -3950,7 +3950,7 @@ void MainWindow::on_Action_System_OpenCombo(void) } - QString diskRom = QFileDialog::getOpenFileName(this, tr("Open 64DD Disk"), "", "N64DD Disk Image (*.ndd *.d64 *.zip *.7z)"); + QString diskRom = QFileDialog::getOpenFileName(this, tr("Open 64DD Disk"), "", tr("N64DD Disk Image (*.ndd *.d64 *.zip *.7z)")); if (diskRom.isEmpty()) { if (isRunning && !isPaused) @@ -4090,7 +4090,7 @@ void MainWindow::on_Action_System_SaveState(void) } else { - OnScreenDisplaySetMessage("Saved state to slot: " + std::to_string(CoreGetSaveStateSlot())); + OnScreenDisplaySetMessage(tr("Saved state to slot: %1").arg(CoreGetSaveStateSlot()).toStdString()); } } @@ -4120,7 +4120,7 @@ void MainWindow::on_Action_System_SaveAs(void) } else { - OnScreenDisplaySetMessage("Saved state to: " + QDir::toNativeSeparators(fileName).toStdString()); + OnScreenDisplaySetMessage(tr("Saved state to: %1").arg(QDir::toNativeSeparators(fileName)).toStdString()); } } @@ -4141,7 +4141,7 @@ void MainWindow::on_Action_System_LoadState(void) } else { - OnScreenDisplaySetMessage("State loaded from slot: " + std::to_string(CoreGetSaveStateSlot())); + OnScreenDisplaySetMessage(tr("State loaded from slot: %1").arg(CoreGetSaveStateSlot()).toStdString()); } } @@ -4169,7 +4169,7 @@ void MainWindow::on_Action_System_Load(void) } else { - OnScreenDisplaySetMessage("State loaded from: " + QDir::toNativeSeparators(fileName).toStdString()); + OnScreenDisplaySetMessage(tr("State loaded from: %1").arg(QDir::toNativeSeparators(fileName)).toStdString()); } } @@ -4309,7 +4309,7 @@ void MainWindow::on_Action_Settings_Input(void) } }, this)) { - this->showErrorMessage("Input Settings", QString::fromStdString(CoreGetError())); + this->showErrorMessage(tr("Input Settings"), QString::fromStdString(CoreGetError())); } return; } @@ -4470,9 +4470,9 @@ void MainWindow::on_Lobby_SpectateClosed(QString reason) void MainWindow::on_Lobby_LiveReplayViewerCountChanged(int viewerCount, bool isSpectator) { - const std::string prefix = isSpectator ? "Watching Live | " : ""; - const std::string noun = viewerCount == 1 ? " viewer" : " viewers"; - OnScreenDisplaySetLiveReplayStatus(prefix + std::to_string(viewerCount) + noun); + const QString viewers = (viewerCount == 1 ? tr("%1 viewer") : tr("%1 viewers")).arg(viewerCount); + const QString status = isSpectator ? tr("Watching Live | %1").arg(viewers) : viewers; + OnScreenDisplaySetLiveReplayStatus(status.toStdString()); } void MainWindow::stopLobbySpectate() @@ -5792,11 +5792,11 @@ void MainWindow::on_RomBrowser_PlayGameWith(CoreRomType type, QString file) if (type == CoreRomType::Cartridge) { // cartridge mainRom = file; - otherRom = QFileDialog::getOpenFileName(this, tr("Open 64DD Disk"), "", "N64DD Disk Image (*.ndd *.d64 *.zip *.7z)"); + otherRom = QFileDialog::getOpenFileName(this, tr("Open 64DD Disk"), "", tr("N64DD Disk Image (*.ndd *.d64 *.zip *.7z)")); } else { // disk - mainRom = QFileDialog::getOpenFileName(this, tr("Open N64 ROM"), "", "N64 ROMs (*.n64 *.z64 *.v64 *.zip *.7z)"); + mainRom = QFileDialog::getOpenFileName(this, tr("Open N64 ROM"), "", tr("N64 ROMs (*.n64 *.z64 *.v64 *.zip *.7z)")); otherRom = file; } @@ -6302,7 +6302,7 @@ void MainWindow::on_Core_DebugCallback(QList messages) // emulation run, we'll stop displaying it if (this->ui_DebugCallbackErrors.count(statusbarMessage.Message) < 50) { - this->showErrorMessage("Core Error", statusbarMessage.Message, false); + this->showErrorMessage(tr("Core Error"), statusbarMessage.Message, false); } this->ui_DebugCallbackErrors.append(statusbarMessage.Message); return; @@ -6344,7 +6344,7 @@ void MainWindow::on_Core_StateCallback(CoreStateCallbackType type, int value) { QAction* slotAction = this->ui_SlotActions[value]; QString dateTimeText = this->getSaveStateSlotDateTimeText(slotAction); - std::string message = "Selected save slot: " + std::to_string(value); + std::string message = tr("Selected save slot: %1").arg(value).toStdString(); if (this->ui_LoadSaveStateSlotTimerId != -1) { @@ -6371,21 +6371,21 @@ void MainWindow::on_Core_StateCallback(CoreStateCallbackType type, int value) } break; case CoreStateCallbackType::SpeedFactor: { - OnScreenDisplaySetMessage("Playback speed: " + std::to_string(value) + "%"); + OnScreenDisplaySetMessage(tr("Playback speed: %1%").arg(value).toStdString()); } break; case CoreStateCallbackType::AudioVolume: { - OnScreenDisplaySetMessage("Volume: " + std::to_string(value) + "%"); + OnScreenDisplaySetMessage(tr("Volume: %1%").arg(value).toStdString()); } break; case CoreStateCallbackType::AudioMute: { if (value == 0) { - OnScreenDisplaySetMessage("Volume unmuted"); + OnScreenDisplaySetMessage(tr("Volume unmuted").toStdString()); } else { - OnScreenDisplaySetMessage("Volume muted"); + OnScreenDisplaySetMessage(tr("Volume muted").toStdString()); } } break; case CoreStateCallbackType::SaveStateLoaded: @@ -6395,7 +6395,7 @@ void MainWindow::on_Core_StateCallback(CoreStateCallbackType type, int value) this->ui_LoadSaveStateSlotCounter++; if (this->ui_LoadSaveStateSlotCounter >= 5) { // give up after 5 attempts - this->showErrorMessage("Failed to load save state"); + this->showErrorMessage(tr("Failed to load save state")); this->ui_LoadSaveStateSlotCounter = 0; this->ui_LoadSaveStateSlotTimerId = -1; this->ui_LoadSaveStateSlot = -1; @@ -6413,11 +6413,11 @@ void MainWindow::on_Core_StateCallback(CoreStateCallbackType type, int value) } else if (value == 0) { - OnScreenDisplaySetMessage("Failed to load save state."); + OnScreenDisplaySetMessage(tr("Failed to load save state.").toStdString()); } else if (!this->ui_ManuallyLoadedState) { - OnScreenDisplaySetMessage("Loaded save state."); + OnScreenDisplaySetMessage(tr("Loaded save state.").toStdString()); } this->ui_ManuallyLoadedState = false; @@ -6426,11 +6426,11 @@ void MainWindow::on_Core_StateCallback(CoreStateCallbackType type, int value) { if (value == 0) { - OnScreenDisplaySetMessage("Failed to save state."); + OnScreenDisplaySetMessage(tr("Failed to save state.").toStdString()); } else if (!this->ui_ManuallySavedState) { - OnScreenDisplaySetMessage("Saved state."); + OnScreenDisplaySetMessage(tr("Saved state.").toStdString()); } // refresh savestate slot times in 1 second, @@ -6450,11 +6450,11 @@ void MainWindow::on_Core_StateCallback(CoreStateCallbackType type, int value) { if (value == 0) { - OnScreenDisplaySetMessage("Failed to capture screenshot."); + OnScreenDisplaySetMessage(tr("Failed to capture screenshot.").toStdString()); } else { - OnScreenDisplaySetMessage("Captured screenshot."); + OnScreenDisplaySetMessage(tr("Captured screenshot.").toStdString()); } } break; } diff --git a/Source/RMG/Utilities/QtMessageBox.cpp b/Source/RMG/Utilities/QtMessageBox.cpp index 1253484df..4f6af640f 100644 --- a/Source/RMG/Utilities/QtMessageBox.cpp +++ b/Source/RMG/Utilities/QtMessageBox.cpp @@ -10,6 +10,7 @@ #include "QtMessageBox.hpp" #include +#include #include #include @@ -50,12 +51,12 @@ static void show_messagebox(QMessageBox::Icon icon, QString title, QWidget* pare void QtMessageBox::Info(QWidget* parent, QString text, QString details) { - show_messagebox(QMessageBox::Icon::Information, "Information", parent, text, details); + show_messagebox(QMessageBox::Icon::Information, QCoreApplication::translate("QtMessageBox", "Information"), parent, text, details); } void QtMessageBox::Error(QWidget* parent, QString text, QString details) { - show_messagebox(QMessageBox::Icon::Critical, "Error", parent, text, details); + show_messagebox(QMessageBox::Icon::Critical, QCoreApplication::translate("QtMessageBox", "Error"), parent, text, details); } bool QtMessageBox::Question(QWidget* parent, QString text, QString checkBoxText, bool& checkBoxValue)