summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar lat9nq2023-05-09 01:36:17 -0400
committerGravatar lat9nq2023-07-21 10:56:07 -0400
commitc530532de7f532eb39278b25d9810ced2e61872a (patch)
treee2b73bfe32a529d479e902e110bca00600cbca78 /src
parentshared_widget: Fix header (diff)
downloadyuzu-c530532de7f532eb39278b25d9810ced2e61872a.tar.gz
yuzu-c530532de7f532eb39278b25d9810ced2e61872a.tar.xz
yuzu-c530532de7f532eb39278b25d9810ced2e61872a.zip
shared_translation: Add UI widget translations
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/shared_translation.cpp128
1 files changed, 73 insertions, 55 deletions
diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp
index a13636af6..d38815e77 100644
--- a/src/yuzu/configuration/shared_translation.cpp
+++ b/src/yuzu/configuration/shared_translation.cpp
@@ -11,6 +11,7 @@
11#include <QWidget> 11#include <QWidget>
12#include "common/settings.h" 12#include "common/settings.h"
13#include "yuzu/configuration/shared_translation.h" 13#include "yuzu/configuration/shared_translation.h"
14#include "yuzu/uisettings.h"
14 15
15namespace ConfigurationShared { 16namespace ConfigurationShared {
16 17
@@ -18,102 +19,105 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {
18 std::unique_ptr<TranslationMap> translations = std::make_unique<TranslationMap>(); 19 std::unique_ptr<TranslationMap> translations = std::make_unique<TranslationMap>();
19 const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); }; 20 const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); };
20 21
21#define INSERT(ID, NAME, TOOLTIP) \ 22#define INSERT(SETTINGS, ID, NAME, TOOLTIP) \
22 translations->insert(std::pair{Settings::values.ID.Id(), std::pair{tr((NAME)), tr((TOOLTIP))}}) 23 translations->insert(std::pair{SETTINGS::values.ID.Id(), std::pair{tr((NAME)), tr((TOOLTIP))}})
23 24
24 // A setting can be ignored by giving it a blank name 25 // A setting can be ignored by giving it a blank name
25 26
26 // Audio 27 // Audio
27 INSERT(sink_id, "Output Engine:", ""); 28 INSERT(Settings, sink_id, "Output Engine:", "");
28 INSERT(audio_output_device_id, "Output Device:", ""); 29 INSERT(Settings, audio_output_device_id, "Output Device:", "");
29 INSERT(audio_input_device_id, "Input Device:", ""); 30 INSERT(Settings, audio_input_device_id, "Input Device:", "");
30 INSERT(audio_muted, "Mute audio when in background", ""); 31 INSERT(Settings, audio_muted, "Mute audio when in background", "");
31 INSERT(volume, "Volume:", ""); 32 INSERT(Settings, volume, "Volume:", "");
32 33
33 // Core 34 // Core
34 INSERT(use_multi_core, "Multicore CPU Emulation", ""); 35 INSERT(Settings, use_multi_core, "Multicore CPU Emulation", "");
35 INSERT(use_unsafe_extended_memory_layout, "Unsafe extended memory layout (8GB DRAM)", ""); 36 INSERT(Settings, use_unsafe_extended_memory_layout, "Unsafe extended memory layout (8GB DRAM)",
37 "");
36 38
37 // Cpu 39 // Cpu
38 INSERT(cpu_accuracy, "Accuracy:", ""); 40 INSERT(Settings, cpu_accuracy, "Accuracy:", "");
39 INSERT(cpu_accuracy_first_time, "", ""); 41 INSERT(Settings, cpu_accuracy_first_time, "", "");
40 42
41 // Cpu Debug 43 // Cpu Debug
42 44
43 // Cpu Unsafe 45 // Cpu Unsafe
44 INSERT(cpuopt_unsafe_unfuse_fma, "Unfuse FMA (improve performance on CPUs without FMA)", ""); 46 INSERT(Settings, cpuopt_unsafe_unfuse_fma,
45 INSERT(cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", ""); 47 "Unfuse FMA (improve performance on CPUs without FMA)", "");
46 INSERT(cpuopt_unsafe_ignore_standard_fpcr, "Faster ASIMD instructions (32 bits only)", ""); 48 INSERT(Settings, cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", "");
47 INSERT(cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", ""); 49 INSERT(Settings, cpuopt_unsafe_ignore_standard_fpcr, "Faster ASIMD instructions (32 bits only)",
48 INSERT(cpuopt_unsafe_fastmem_check, "Disable address space checks", ""); 50 "");
49 INSERT(cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", ""); 51 INSERT(Settings, cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", "");
52 INSERT(Settings, cpuopt_unsafe_fastmem_check, "Disable address space checks", "");
53 INSERT(Settings, cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", "");
50 54
51 // Renderer 55 // Renderer
52 INSERT(renderer_backend, "API:", ""); 56 INSERT(Settings, renderer_backend, "API:", "");
53 INSERT(vulkan_device, "Device:", ""); 57 INSERT(Settings, vulkan_device, "Device:", "");
54 INSERT(shader_backend, "Shader Backend:", ""); 58 INSERT(Settings, shader_backend, "Shader Backend:", "");
55 INSERT(resolution_setup, "Resolution:", ""); 59 INSERT(Settings, resolution_setup, "Resolution:", "");
56 INSERT(scaling_filter, "Window Adapting Filter:", ""); 60 INSERT(Settings, scaling_filter, "Window Adapting Filter:", "");
57 INSERT(fsr_sharpening_slider, "AMD FidelityFX™ Super Resolution Sharpness:", ""); 61 INSERT(Settings, fsr_sharpening_slider, "AMD FidelityFX™ Super Resolution Sharpness:", "");
58 INSERT(anti_aliasing, "Anti-Aliasing Method:", ""); 62 INSERT(Settings, anti_aliasing, "Anti-Aliasing Method:", "");
59 INSERT(fullscreen_mode, "Fullscreen Mode:", ""); 63 INSERT(Settings, fullscreen_mode, "Fullscreen Mode:", "");
60 INSERT(aspect_ratio, "Aspect Ratio:", ""); 64 INSERT(Settings, aspect_ratio, "Aspect Ratio:", "");
61 INSERT(use_disk_shader_cache, "Use disk pipeline cache", ""); 65 INSERT(Settings, use_disk_shader_cache, "Use disk pipeline cache", "");
62 INSERT(use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", ""); 66 INSERT(Settings, use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", "");
63 INSERT(nvdec_emulation, "NVDEC emulation:", ""); 67 INSERT(Settings, nvdec_emulation, "NVDEC emulation:", "");
64 INSERT(accelerate_astc, "ASTC Decoding Method:", ""); 68 INSERT(Settings, accelerate_astc, "ASTC Decoding Method:", "");
65 INSERT(vsync_mode, "VSync Mode:", 69 INSERT(Settings, vsync_mode, "VSync Mode:",
66 "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen " 70 "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen "
67 "refresh rate.\nFIFO Relaxed is similar to FIFO but allows tearing as it recovers from " 71 "refresh rate.\nFIFO Relaxed is similar to FIFO but allows tearing as it recovers from "
68 "a slow down.\nMailbox can have lower latency than FIFO and does not tear but may drop " 72 "a slow down.\nMailbox can have lower latency than FIFO and does not tear but may drop "
69 "frames.\nImmediate (no synchronization) just presents whatever is available and can " 73 "frames.\nImmediate (no synchronization) just presents whatever is available and can "
70 "exhibit tearing."); 74 "exhibit tearing.");
71 INSERT(bg_red, "", ""); 75 INSERT(Settings, bg_red, "", "");
72 INSERT(bg_green, "", ""); 76 INSERT(Settings, bg_green, "", "");
73 INSERT(bg_blue, "", ""); 77 INSERT(Settings, bg_blue, "", "");
74 78
75 // Renderer (Advanced Graphics) 79 // Renderer (Advanced Graphics)
76 INSERT(async_presentation, "Enable asynchronous presentation (Vulkan only)", ""); 80 INSERT(Settings, async_presentation, "Enable asynchronous presentation (Vulkan only)", "");
77 INSERT(renderer_force_max_clock, "Force maximum clocks (Vulkan only)", 81 INSERT(Settings, renderer_force_max_clock, "Force maximum clocks (Vulkan only)",
78 "Runs work in the background while waiting for graphics commands to keep the GPU from " 82 "Runs work in the background while waiting for graphics commands to keep the GPU from "
79 "lowering its clock speed."); 83 "lowering its clock speed.");
80 INSERT(max_anisotropy, "Anisotropic Filtering:", ""); 84 INSERT(Settings, max_anisotropy, "Anisotropic Filtering:", "");
81 INSERT(gpu_accuracy, "Accuracy Level:", ""); 85 INSERT(Settings, gpu_accuracy, "Accuracy Level:", "");
82 INSERT(use_asynchronous_shaders, "Use asynchronous shader building (Hack)", 86 INSERT(Settings, use_asynchronous_shaders, "Use asynchronous shader building (Hack)",
83 "Enables asynchronous shader compilation, which may reduce shader stutter. This feature " 87 "Enables asynchronous shader compilation, which may reduce shader stutter. This feature "
84 "is experimental."); 88 "is experimental.");
85 INSERT(use_fast_gpu_time, "Use Fast GPU Time (Hack)", 89 INSERT(Settings, use_fast_gpu_time, "Use Fast GPU Time (Hack)",
86 "Enables Fast GPU Time. This option will force most games to run at their highest " 90 "Enables Fast GPU Time. This option will force most games to run at their highest "
87 "native resolution."); 91 "native resolution.");
88 INSERT(use_vulkan_driver_pipeline_cache, "Use Vulkan pipeline cache", 92 INSERT(Settings, use_vulkan_driver_pipeline_cache, "Use Vulkan pipeline cache",
89 "Enables GPU vendor-specific pipeline cache. This option can improve shader loading " 93 "Enables GPU vendor-specific pipeline cache. This option can improve shader loading "
90 "time significantly in cases where the Vulkan driver does not store pipeline cache " 94 "time significantly in cases where the Vulkan driver does not store pipeline cache "
91 "files internally."); 95 "files internally.");
92 INSERT(enable_compute_pipelines, "Enable Compute Pipelines (Intel Vulkan Only)", 96 INSERT(Settings, enable_compute_pipelines, "Enable Compute Pipelines (Intel Vulkan Only)",
93 "Enable compute pipelines, required by some games.\nThis setting only exists for Intel " 97 "Enable compute pipelines, required by some games.\nThis setting only exists for Intel "
94 "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled " 98 "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled "
95 "on all other drivers."); 99 "on all other drivers.");
96 INSERT(use_reactive_flushing, "Enable Reactive Flushing", 100 INSERT(Settings, use_reactive_flushing, "Enable Reactive Flushing",
97 "Uses reactive flushing instead of predictive flushing, allowing more accurate memory " 101 "Uses reactive flushing instead of predictive flushing, allowing more accurate memory "
98 "syncing."); 102 "syncing.");
99 103
100 // Renderer (Debug) 104 // Renderer (Debug)
101 105
102 // Renderer (General) 106 // Renderer (General)
103 INSERT(use_speed_limit, "Limit Speed Percent", ""); 107 INSERT(Settings, use_speed_limit, "", "");
104 INSERT(speed_limit, "Limit Speed Percent", ""); 108 INSERT(Settings, speed_limit, "Limit Speed Percent", "");
105 109
106 // System 110 // System
107 INSERT(rng_seed_enabled, "RNG Seed", ""); 111 INSERT(Settings, rng_seed_enabled, "RNG Seed", "");
108 INSERT(rng_seed, "RNG Seed", ""); 112 INSERT(Settings, rng_seed, "RNG Seed", "");
109 INSERT(device_name, "Device Name", ""); 113 INSERT(Settings, device_name, "Device Name", "");
110 INSERT(custom_rtc_enabled, "Custom RTC", ""); 114 INSERT(Settings, custom_rtc_enabled, "Custom RTC", "");
111 INSERT(custom_rtc, "Custom RTC", ""); 115 INSERT(Settings, custom_rtc, "Custom RTC", "");
112 INSERT(language_index, "Language:", ""); 116 INSERT(Settings, language_index, "Language:", "");
113 INSERT(region_index, "Region:", ""); 117 INSERT(Settings, region_index, "Region:", "");
114 INSERT(time_zone_index, "Time Zone:", ""); 118 INSERT(Settings, time_zone_index, "Time Zone:", "");
115 INSERT(sound_index, "Sound Output Mode:", ""); 119 INSERT(Settings, sound_index, "Sound Output Mode:", "");
116 INSERT(use_docked_mode, "", ""); 120 INSERT(Settings, use_docked_mode, "", "");
117 121
118 // Controls 122 // Controls
119 123
@@ -127,6 +131,20 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {
127 131
128 // Web Service 132 // Web Service
129 133
134 // Ui
135
136 // Ui General
137 INSERT(UISettings, select_user_on_boot, "Prompt for user on game boot", "");
138 INSERT(UISettings, pause_when_in_background, "Pause emulation when in background", "");
139 INSERT(UISettings, confirm_before_closing, "Confirm exit while emulation is running", "");
140 INSERT(UISettings, hide_mouse, "Hide mouse on inactivity", "");
141
142 // Ui Debugging
143
144 // Ui Multiplayer
145
146 // Ui Games list
147
130#undef INSERT 148#undef INSERT
131 149
132 return translations; 150 return translations;