Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Translate the launch options rows into German, Swedish and Chinese

v0lumehi24125d3c65b9
diff --git a/frontend-qt/nspb_qt/localization.py b/frontend-qt/nspb_qt/localization.py
index 0406a382..d0495f01 100644
--- a/frontend-qt/nspb_qt/localization.py
+++ b/frontend-qt/nspb_qt/localization.py
@@ -414,6 +414,34 @@ TABLE: dict[str, tuple[str, str, str, str]] = {
'launch.section.Game': ('游戏', 'Game', 'Spel', 'Spiel'),
'launch.section.Controls': ('控制', 'Controls', 'Kontroller', 'Steuerung'),
'launch.section.Performance': ('性能', 'Performance', 'Prestanda', 'Leistung'),
+ 'launch.set.DM_FPS_TARGET': ('帧率', 'Frame rate', 'Bildfrekvens', 'Bildrate'),
+ 'launch.set.DM_DYNAMIC_RESOLUTION': ('动态分辨率', 'Dynamic resolution', 'Dynamisk upplösning', 'Dynamische Auflösung'),
+ 'launch.set.DM_DYNAMIC_RESOLUTION.note': ('负载较高时在 70% 到 100% 之间调整分辨率。关闭后保持所选主机模式的完整分辨率。', 'Adjusts resolution between 70% and 100% under load. Turn off to keep full resolution for the selected console mode.', 'Anpassar upplösningen mellan 70 % och 100 % under belastning. Stäng av för att behålla full upplösning för det valda konsolläget.', 'Passt die Auflösung unter Last zwischen 70 % und 100 % an. Ausschalten, um die volle Auflösung des gewählten Konsolenmodus zu behalten.'),
+ 'launch.set.DM_RENDER_SCALE': ('渲染比例', 'Render scale', 'Renderskala', 'Render-Skalierung'),
+ 'launch.set.DM_OPMODE': ('主机模式', 'Console mode', 'Konsolläge', 'Konsolenmodus'),
+ 'launch.opt.DM_OPMODE.1': ('底座模式', 'Docked', 'Dockad', 'Angedockt'),
+ 'launch.opt.DM_OPMODE.0': ('掌机模式', 'Handheld', 'Handhållen', 'Handheld'),
+ 'launch.set.DM_PRESENT_UPSCALE': ('放大', 'Upscaling', 'Uppskalning', 'Hochskalierung'),
+ 'launch.set.DM_PRESENT_UPSCALE.note': ('占用更多 GPU 时间,可能增加发热。', 'Uses more GPU time and can increase heat.', 'Använder mer GPU-tid och kan öka värmen.', 'Braucht mehr GPU-Zeit und kann die Wärme erhöhen.'),
+ 'launch.opt.DM_PRESENT_UPSCALE.off': ('标准', 'Standard', 'Standard', 'Standard'),
+ 'launch.set.DM_LANG': ('游戏语言', 'Game language', 'Spelspråk', 'Spielsprache'),
+ 'launch.set.DM_FULLSCREEN': ('显示模式', 'Display mode', 'Visningsläge', 'Anzeigemodus'),
+ 'launch.opt.DM_FULLSCREEN.0': ('窗口', 'Window', 'Fönster', 'Fenster'),
+ 'launch.opt.DM_FULLSCREEN.1': ('全屏', 'Fullscreen', 'Helskärm', 'Vollbild'),
+ 'launch.set.DM_SHOW_FPS': ('帧率显示', 'Frame-rate counter', 'Bildfrekvensräknare', 'Bildraten-Anzeige'),
+ 'launch.set.DM_TOUCH_HAPTICS': ('触控反馈', 'Touch feedback', 'Beröringsåterkoppling', 'Touch-Feedback'),
+ 'launch.set.DM_RUMBLE': ('游戏震动', 'Game rumble', 'Spelvibration', 'Spiel-Vibration'),
+ 'launch.set.DM_RUMBLE_GAIN': ('震动强度', 'Rumble strength', 'Vibrationsstyrka', 'Vibrationsstärke'),
+ 'launch.set.DM_RUMBLE_MIN': ('震动下限', 'Rumble cutoff', 'Vibrationsgräns', 'Vibrationsschwelle'),
+ 'launch.set.DM_PRESENT_SNAP': ('帧缓冲', 'Frame buffering', 'Bildbuffring', 'Bildpufferung'),
+ 'launch.set.DM_PRESENT_SNAP.note': ('显示延迟最多增加一帧。', 'Up to one frame more display latency.', 'Upp till en bildruta mer fördröjning på skärmen.', 'Bis zu ein Bild mehr Anzeigeverzögerung.'),
+ 'launch.set.DM_PSO_MTL4': ('Metal 4 管线', 'Metal 4 pipelines', 'Metal 4-pipelines', 'Metal-4-Pipelines'),
+ 'launch.set.DM_PSO_MTL4.note': ('保留管线存档,占用更多内存。', 'Keeps a pipeline archive and uses more memory.', 'Behåller ett pipelinearkiv och använder mer minne.', 'Behält ein Pipeline-Archiv und braucht mehr Speicher.'),
+ 'launch.set.DM_PSO_PREBUILD': ('预先构建管线', 'Pipeline prebuild', 'Förbygg pipelines', 'Pipelines vorab erstellen'),
+ 'launch.set.DM_PSO_PREBUILD.note': ('首次启动需要等待几分钟,仅此一次。', 'The first start waits a few minutes for it, once.', 'Första starten väntar några minuter på det, en gång.', 'Der erste Start wartet dafür einmalig einige Minuten.'),
+ 'launch.set.DM_NVN_ENC_THREAD': ('编码线程', 'Encode thread', 'Kodningstråd', 'Encode-Thread'),
+ 'launch.set.DM_FPS_HOLD': ('帧延迟时保持', 'Hold frames when late', 'Håll bilder när de är sena', 'Bilder halten, wenn sie zu spät sind'),
+ 'launch.set.DM_METAL_HUD': ('性能 HUD', 'Performance HUD', 'Prestandaöversikt', 'Leistungsanzeige'),
'nav.library': ('游戏库', 'Library', 'Bibliotek', 'Bibliothek'),
'nav.builds': ('构建', 'Builds', 'Byggen', 'Builds'),
'nav.settings': ('设置', 'Settings', 'Inställningar', 'Einstellungen'),
diff --git a/frontend/Sources/NSPortBuilder/LaunchOptionsView.swift b/frontend/Sources/NSPortBuilder/LaunchOptionsView.swift
index ea4c28ba..19ab2ed9 100644
--- a/frontend/Sources/NSPortBuilder/LaunchOptionsView.swift
+++ b/frontend/Sources/NSPortBuilder/LaunchOptionsView.swift
@@ -147,6 +147,15 @@ struct LaunchOptionsView: View {
return name == key ? section : name
}
+ /// A setting's text in the launcher's language when this launcher has it (a game's launcher.json is in English), else the list's own.
+ private func text(_ key: String, _ fallback: String) -> String {
+ guard m.lang != .en else { return fallback }
+ let translated = m.t(key)
+ return translated == key ? fallback : translated
+ }
+ private func label(_ s: LaunchSetting) -> String { text("launch.set." + s.env, s.label) }
+ private func note(_ s: LaunchSetting) -> String { s.note.isEmpty ? "" : text("launch.set." + s.env + ".note", s.note) }
+
private func set(_ s: LaunchSetting, _ value: String) {
if s.storeBacked { store?.set(s, value) } else { library.setLaunchOption(s, value, for: gameID) }
choicesRevision += 1
@@ -169,13 +178,13 @@ struct LaunchOptionsView: View {
let pixels = s.kind == "range" ? s.pixels(scale: Double(value) ?? 1, docked: isDocked) : nil
HStack(alignment: .center, spacing: 16) {
VStack(alignment: .leading, spacing: 3) {
- Text(s.label).font(.manrope(14, .medium))
+ Text(label(s)).font(.manrope(14, .medium))
if let full = s.kind == "range" ? s.pixels(scale: 1, docked: isDocked) : nil {
// The render scale in pixels: the share of the game's own size in the console mode chosen
Text(String(format: m.t(isDocked ? "launch.scaleOfDocked" : "launch.scaleOfHandheld"), Int(((Double(value) ?? 1) * 100).rounded()), full))
.font(.manrope(12)).foregroundStyle(.secondary)
- } else if !s.note.isEmpty {
- Text(s.note).font(.manrope(12)).foregroundStyle(.secondary).fixedSize(horizontal: false, vertical: true)
+ } else if !note(s).isEmpty {
+ Text(note(s)).font(.manrope(12)).foregroundStyle(.secondary).fixedSize(horizontal: false, vertical: true)
}
}
Spacer(minLength: 12)
@@ -210,11 +219,11 @@ struct LaunchOptionsView: View {
HStack(spacing: 10) {
switch s.kind {
case "choice":
- let options = (s.options ?? []).map { (value: $0[0], label: $0.count > 1 ? $0[1] : $0[0]) }
+ let options = (s.options ?? []).map { (value: $0[0], label: text("launch.opt.\(s.env).\($0[0])", $0.count > 1 ? $0[1] : $0[0])) }
if LaunchControl.isSegmented(env: s.env, labels: options.map(\.label)) {
LauncherSegmented(options: options, selection: value) { set(s, $0) }
} else {
- LauncherDropdown(options: options, selection: value, label: s.label, fill: true) { set(s, $0) }
+ LauncherDropdown(options: options, selection: value, label: label(s), fill: true) { set(s, $0) }
}
case "range":
let lo = s.min ?? 0, hi = s.max ?? 1
diff --git a/frontend/Sources/NSPortBuilder/Localization.swift b/frontend/Sources/NSPortBuilder/Localization.swift
index a18c1436..3def7147 100644
--- a/frontend/Sources/NSPortBuilder/Localization.swift
+++ b/frontend/Sources/NSPortBuilder/Localization.swift
@@ -457,6 +457,34 @@ enum L10n {
"launch.section.Game": ("\u{6e38}\u{620f}", "Game"),
"launch.section.Controls": ("\u{63a7}\u{5236}", "Controls"),
"launch.section.Performance": ("\u{6027}\u{80fd}", "Performance"),
+ "launch.set.DM_FPS_TARGET": ("帧率", "Frame rate"),
+ "launch.set.DM_DYNAMIC_RESOLUTION": ("动态分辨率", "Dynamic resolution"),
+ "launch.set.DM_DYNAMIC_RESOLUTION.note": ("负载较高时在 70% 到 100% 之间调整分辨率。关闭后保持所选主机模式的完整分辨率。", "Adjusts resolution between 70% and 100% under load. Turn off to keep full resolution for the selected console mode."),
+ "launch.set.DM_RENDER_SCALE": ("渲染比例", "Render scale"),
+ "launch.set.DM_OPMODE": ("主机模式", "Console mode"),
+ "launch.opt.DM_OPMODE.1": ("底座模式", "Docked"),
+ "launch.opt.DM_OPMODE.0": ("掌机模式", "Handheld"),
+ "launch.set.DM_PRESENT_UPSCALE": ("放大", "Upscaling"),
+ "launch.set.DM_PRESENT_UPSCALE.note": ("占用更多 GPU 时间,可能增加发热。", "Uses more GPU time and can increase heat."),
+ "launch.opt.DM_PRESENT_UPSCALE.off": ("标准", "Standard"),
+ "launch.set.DM_LANG": ("游戏语言", "Game language"),
+ "launch.set.DM_FULLSCREEN": ("显示模式", "Display mode"),
+ "launch.opt.DM_FULLSCREEN.0": ("窗口", "Window"),
+ "launch.opt.DM_FULLSCREEN.1": ("全屏", "Fullscreen"),
+ "launch.set.DM_SHOW_FPS": ("帧率显示", "Frame-rate counter"),
+ "launch.set.DM_TOUCH_HAPTICS": ("触控反馈", "Touch feedback"),
+ "launch.set.DM_RUMBLE": ("游戏震动", "Game rumble"),
+ "launch.set.DM_RUMBLE_GAIN": ("震动强度", "Rumble strength"),
+ "launch.set.DM_RUMBLE_MIN": ("震动下限", "Rumble cutoff"),
+ "launch.set.DM_PRESENT_SNAP": ("帧缓冲", "Frame buffering"),
+ "launch.set.DM_PRESENT_SNAP.note": ("显示延迟最多增加一帧。", "Up to one frame more display latency."),
+ "launch.set.DM_PSO_MTL4": ("Metal 4 管线", "Metal 4 pipelines"),
+ "launch.set.DM_PSO_MTL4.note": ("保留管线存档,占用更多内存。", "Keeps a pipeline archive and uses more memory."),
+ "launch.set.DM_PSO_PREBUILD": ("预先构建管线", "Pipeline prebuild"),
+ "launch.set.DM_PSO_PREBUILD.note": ("首次启动需要等待几分钟,仅此一次。", "The first start waits a few minutes for it, once."),
+ "launch.set.DM_NVN_ENC_THREAD": ("编码线程", "Encode thread"),
+ "launch.set.DM_FPS_HOLD": ("帧延迟时保持", "Hold frames when late"),
+ "launch.set.DM_METAL_HUD": ("性能 HUD", "Performance HUD"),
"nav.library": ("\u{6e38}\u{620f}\u{5e93}", "Library"),
"nav.builds": ("\u{6784}\u{5efa}", "Builds"),
"nav.settings": ("\u{8bbe}\u{7f6e}", "Settings"),
@@ -1420,6 +1448,34 @@ enum L10n {
"launch.section.Game": "Spel",
"launch.section.Controls": "Kontroller",
"launch.section.Performance": "Prestanda",
+ "launch.set.DM_FPS_TARGET": "Bildfrekvens",
+ "launch.set.DM_DYNAMIC_RESOLUTION": "Dynamisk upplösning",
+ "launch.set.DM_DYNAMIC_RESOLUTION.note": "Anpassar upplösningen mellan 70 % och 100 % under belastning. Stäng av för att behålla full upplösning för det valda konsolläget.",
+ "launch.set.DM_RENDER_SCALE": "Renderskala",
+ "launch.set.DM_OPMODE": "Konsolläge",
+ "launch.opt.DM_OPMODE.1": "Dockad",
+ "launch.opt.DM_OPMODE.0": "Handhållen",
+ "launch.set.DM_PRESENT_UPSCALE": "Uppskalning",
+ "launch.set.DM_PRESENT_UPSCALE.note": "Använder mer GPU-tid och kan öka värmen.",
+ "launch.opt.DM_PRESENT_UPSCALE.off": "Standard",
+ "launch.set.DM_LANG": "Spelspråk",
+ "launch.set.DM_FULLSCREEN": "Visningsläge",
+ "launch.opt.DM_FULLSCREEN.0": "Fönster",
+ "launch.opt.DM_FULLSCREEN.1": "Helskärm",
+ "launch.set.DM_SHOW_FPS": "Bildfrekvensräknare",
+ "launch.set.DM_TOUCH_HAPTICS": "Beröringsåterkoppling",
+ "launch.set.DM_RUMBLE": "Spelvibration",
+ "launch.set.DM_RUMBLE_GAIN": "Vibrationsstyrka",
+ "launch.set.DM_RUMBLE_MIN": "Vibrationsgräns",
+ "launch.set.DM_PRESENT_SNAP": "Bildbuffring",
+ "launch.set.DM_PRESENT_SNAP.note": "Upp till en bildruta mer fördröjning på skärmen.",
+ "launch.set.DM_PSO_MTL4": "Metal 4-pipelines",
+ "launch.set.DM_PSO_MTL4.note": "Behåller ett pipelinearkiv och använder mer minne.",
+ "launch.set.DM_PSO_PREBUILD": "Förbygg pipelines",
+ "launch.set.DM_PSO_PREBUILD.note": "Första starten väntar några minuter på det, en gång.",
+ "launch.set.DM_NVN_ENC_THREAD": "Kodningstråd",
+ "launch.set.DM_FPS_HOLD": "Håll bilder när de är sena",
+ "launch.set.DM_METAL_HUD": "Prestandaöversikt",
"nav.library": "Bibliotek",
"nav.builds": "Byggen",
"nav.settings": "Inställningar",
@@ -2300,6 +2356,34 @@ enum L10n {
"launch.section.Game": "Spiel",
"launch.section.Controls": "Steuerung",
"launch.section.Performance": "Leistung",
+ "launch.set.DM_FPS_TARGET": "Bildrate",
+ "launch.set.DM_DYNAMIC_RESOLUTION": "Dynamische Auflösung",
+ "launch.set.DM_DYNAMIC_RESOLUTION.note": "Passt die Auflösung unter Last zwischen 70 % und 100 % an. Ausschalten, um die volle Auflösung des gewählten Konsolenmodus zu behalten.",
+ "launch.set.DM_RENDER_SCALE": "Render-Skalierung",
+ "launch.set.DM_OPMODE": "Konsolenmodus",
+ "launch.opt.DM_OPMODE.1": "Angedockt",
+ "launch.opt.DM_OPMODE.0": "Handheld",
+ "launch.set.DM_PRESENT_UPSCALE": "Hochskalierung",
+ "launch.set.DM_PRESENT_UPSCALE.note": "Braucht mehr GPU-Zeit und kann die Wärme erhöhen.",
+ "launch.opt.DM_PRESENT_UPSCALE.off": "Standard",
+ "launch.set.DM_LANG": "Spielsprache",
+ "launch.set.DM_FULLSCREEN": "Anzeigemodus",
+ "launch.opt.DM_FULLSCREEN.0": "Fenster",
+ "launch.opt.DM_FULLSCREEN.1": "Vollbild",
+ "launch.set.DM_SHOW_FPS": "Bildraten-Anzeige",
+ "launch.set.DM_TOUCH_HAPTICS": "Touch-Feedback",
+ "launch.set.DM_RUMBLE": "Spiel-Vibration",
+ "launch.set.DM_RUMBLE_GAIN": "Vibrationsstärke",
+ "launch.set.DM_RUMBLE_MIN": "Vibrationsschwelle",
+ "launch.set.DM_PRESENT_SNAP": "Bildpufferung",
+ "launch.set.DM_PRESENT_SNAP.note": "Bis zu ein Bild mehr Anzeigeverzögerung.",
+ "launch.set.DM_PSO_MTL4": "Metal-4-Pipelines",
+ "launch.set.DM_PSO_MTL4.note": "Behält ein Pipeline-Archiv und braucht mehr Speicher.",
+ "launch.set.DM_PSO_PREBUILD": "Pipelines vorab erstellen",
+ "launch.set.DM_PSO_PREBUILD.note": "Der erste Start wartet dafür einmalig einige Minuten.",
+ "launch.set.DM_NVN_ENC_THREAD": "Encode-Thread",
+ "launch.set.DM_FPS_HOLD": "Bilder halten, wenn sie zu spät sind",
+ "launch.set.DM_METAL_HUD": "Leistungsanzeige",
"nav.library": "Bibliothek",
"nav.builds": "Builds",
"nav.settings": "Einstellungen",