diff --git a/rpcs3/rpcs3qt/emu_settings.cpp b/rpcs3/rpcs3qt/emu_settings.cpp index ce0de1492e..0ec8da9d95 100644 --- a/rpcs3/rpcs3qt/emu_settings.cpp +++ b/rpcs3/rpcs3qt/emu_settings.cpp @@ -685,177 +685,177 @@ QString emu_settings::GetLocalizedSetting(const QString& original, SettingsType case emu_settings::SPUBlockSize: switch (static_cast(index)) { - case spu_block_size_type::safe: return tr("Safe"); - case spu_block_size_type::mega: return tr("Mega"); - case spu_block_size_type::giga: return tr("Giga"); + case spu_block_size_type::safe: return tr("Safe", "SPU block size"); + case spu_block_size_type::mega: return tr("Mega", "SPU block size"); + case spu_block_size_type::giga: return tr("Giga", "SPU block size"); } break; case emu_settings::EnableTSX: switch (static_cast(index)) { - case tsx_usage::disabled: return tr("Disabled"); - case tsx_usage::enabled: return tr("Enabled"); - case tsx_usage::forced: return tr("Forced"); + case tsx_usage::disabled: return tr("Disabled", "Enable TSX"); + case tsx_usage::enabled: return tr("Enabled", "Enable TSX"); + case tsx_usage::forced: return tr("Forced", "Enable TSX"); } break; case emu_settings::Renderer: switch (static_cast(index)) { - case video_renderer::null: return tr("Disable Video Output"); - case video_renderer::opengl: return tr("OpenGL"); - case video_renderer::vulkan: return tr("Vulkan"); + case video_renderer::null: return tr("Disable Video Output", "Video renderer"); + case video_renderer::opengl: return tr("OpenGL", "Video renderer"); + case video_renderer::vulkan: return tr("Vulkan", "Video renderer"); } break; case emu_settings::FrameLimit: switch (static_cast(index)) { - case frame_limit_type::none: return tr("Off"); - case frame_limit_type::_59_94: return tr("59.94"); - case frame_limit_type::_50: return tr("50"); - case frame_limit_type::_60: return tr("60"); - case frame_limit_type::_30: return tr("30"); - case frame_limit_type::_auto: return tr("Auto"); + case frame_limit_type::none: return tr("Off", "Frame limit"); + case frame_limit_type::_59_94: return tr("59.94", "Frame limit"); + case frame_limit_type::_50: return tr("50", "Frame limit"); + case frame_limit_type::_60: return tr("60", "Frame limit"); + case frame_limit_type::_30: return tr("30", "Frame limit"); + case frame_limit_type::_auto: return tr("Auto", "Frame limit"); } break; case emu_settings::MSAA: switch (static_cast(index)) { - case msaa_level::none: return tr("Disabled"); - case msaa_level::_auto: return tr("Auto"); + case msaa_level::none: return tr("Disabled", "MSAA"); + case msaa_level::_auto: return tr("Auto", "MSAA"); } break; case emu_settings::AudioRenderer: switch (static_cast(index)) { - case audio_renderer::null: return tr("Disable Audio Output"); + case audio_renderer::null: return tr("Disable Audio Output", "Audio renderer"); #ifdef _WIN32 - case audio_renderer::xaudio: return tr("XAudio2"); + case audio_renderer::xaudio: return tr("XAudio2", "Audio renderer"); #endif #ifdef HAVE_ALSA - case audio_renderer::alsa: return tr("ALSA"); + case audio_renderer::alsa: return tr("ALSA", "Audio renderer"); #endif #ifdef HAVE_PULSE - case audio_renderer::pulse: return tr("PulseAudio"); + case audio_renderer::pulse: return tr("PulseAudio", "Audio renderer"); #endif - case audio_renderer::openal: return tr("OpenAL"); + case audio_renderer::openal: return tr("OpenAL", "Audio renderer"); #ifdef HAVE_FAUDIO - case audio_renderer::faudio: return tr("FAudio"); + case audio_renderer::faudio: return tr("FAudio", "Audio renderer"); #endif } break; case emu_settings::MicrophoneType: switch (static_cast(index)) { - case microphone_handler::null: return tr("Disabled"); - case microphone_handler::standard: return tr("Standard"); - case microphone_handler::singstar: return tr("SingStar"); - case microphone_handler::real_singstar: return tr("Real SingStar"); - case microphone_handler::rocksmith: return tr("Rocksmith"); + case microphone_handler::null: return tr("Disabled", "Microphone handler"); + case microphone_handler::standard: return tr("Standard", "Microphone handler"); + case microphone_handler::singstar: return tr("SingStar", "Microphone handler"); + case microphone_handler::real_singstar: return tr("Real SingStar", "Microphone handler"); + case microphone_handler::rocksmith: return tr("Rocksmith", "Microphone handler"); } break; case emu_settings::KeyboardHandler: switch (static_cast(index)) { - case keyboard_handler::null: return tr("Null"); - case keyboard_handler::basic: return tr("Basic"); + case keyboard_handler::null: return tr("Null", "Keyboard handler"); + case keyboard_handler::basic: return tr("Basic", "Keyboard handler"); } break; case emu_settings::MouseHandler: switch (static_cast(index)) { - case mouse_handler::null: return tr("Null"); - case mouse_handler::basic: return tr("Basic"); + case mouse_handler::null: return tr("Null", "Mouse handler"); + case mouse_handler::basic: return tr("Basic", "Mouse handler"); } break; case emu_settings::CameraType: switch (static_cast(index)) { - case fake_camera_type::unknown: return tr("Unknown"); - case fake_camera_type::eyetoy: return tr("EyeToy"); - case fake_camera_type::eyetoy2: return tr("PS Eye"); - case fake_camera_type::uvc1_1: return tr("UVC 1.1"); + case fake_camera_type::unknown: return tr("Unknown", "Camera type"); + case fake_camera_type::eyetoy: return tr("EyeToy", "Camera type"); + case fake_camera_type::eyetoy2: return tr("PS Eye", "Camera type"); + case fake_camera_type::uvc1_1: return tr("UVC 1.1", "Camera type"); } break; case emu_settings::Camera: switch (static_cast(index)) { - case camera_handler::null: return tr("Null"); - case camera_handler::fake: return tr("Fake"); + case camera_handler::null: return tr("Null", "Camera handler"); + case camera_handler::fake: return tr("Fake", "Camera handler"); } break; case emu_settings::Move: switch (static_cast(index)) { - case move_handler::null: return tr("Null"); - case move_handler::fake: return tr("Fake"); - case move_handler::mouse: return tr("Mouse"); + case move_handler::null: return tr("Null", "Move handler"); + case move_handler::fake: return tr("Fake", "Move handler"); + case move_handler::mouse: return tr("Mouse", "Move handler"); } break; case emu_settings::InternetStatus: switch (static_cast(index)) { - case np_internet_status::disabled: return tr("Disconnected"); - case np_internet_status::enabled: return tr("Connected"); + case np_internet_status::disabled: return tr("Disconnected", "Internet Status"); + case np_internet_status::enabled: return tr("Connected", "Internet Status"); } break; case emu_settings::PSNStatus: switch (static_cast(index)) { - case np_psn_status::disabled: return tr("Disconnected"); - case np_psn_status::fake: return tr("Simulated"); + case np_psn_status::disabled: return tr("Disconnected", "PSN Status"); + case np_psn_status::fake: return tr("Simulated", "PSN Status"); } break; case emu_settings::SleepTimersAccuracy: switch (static_cast(index)) { - case sleep_timers_accuracy_level::_as_host: return tr("As Host"); - case sleep_timers_accuracy_level::_usleep: return tr("Usleep Only"); - case sleep_timers_accuracy_level::_all_timers: return tr("All Timers"); + case sleep_timers_accuracy_level::_as_host: return tr("As Host", "Sleep timers accuracy"); + case sleep_timers_accuracy_level::_usleep: return tr("Usleep Only", "Sleep timers accuracy"); + case sleep_timers_accuracy_level::_all_timers: return tr("All Timers", "Sleep timers accuracy"); } break; case emu_settings::PerfOverlayDetailLevel: switch (static_cast(index)) { - case detail_level::minimal: return tr("Minimal"); - case detail_level::low: return tr("Low"); - case detail_level::medium: return tr("Medium"); - case detail_level::high: return tr("High"); + case detail_level::minimal: return tr("Minimal", "Detail Level"); + case detail_level::low: return tr("Low", "Detail Level"); + case detail_level::medium: return tr("Medium", "Detail Level"); + case detail_level::high: return tr("High", "Detail Level"); } break; case emu_settings::PerfOverlayPosition: switch (static_cast(index)) { - case screen_quadrant::top_left: return tr("Top Left"); - case screen_quadrant::top_right: return tr("Top Right"); - case screen_quadrant::bottom_left: return tr("Bottom Left"); - case screen_quadrant::bottom_right: return tr("Bottom Right"); + case screen_quadrant::top_left: return tr("Top Left", "Performance overlay position"); + case screen_quadrant::top_right: return tr("Top Right", "Performance overlay position"); + case screen_quadrant::bottom_left: return tr("Bottom Left", "Performance overlay position"); + case screen_quadrant::bottom_right: return tr("Bottom Right", "Performance overlay position"); } break; case emu_settings::LibLoadOptions: switch (static_cast(index)) { - case lib_loading_type::manual: return tr("Manually load selected libraries"); - case lib_loading_type::hybrid: return tr("Load automatic and manual selection"); - case lib_loading_type::liblv2only: return tr("Load liblv2.sprx only"); - case lib_loading_type::liblv2both: return tr("Load liblv2.sprx and manual selection"); - case lib_loading_type::liblv2list: return tr("Load liblv2.sprx and strict selection"); + case lib_loading_type::manual: return tr("Manually load selected libraries", "Libraries"); + case lib_loading_type::hybrid: return tr("Load automatic and manual selection", "Libraries"); + case lib_loading_type::liblv2only: return tr("Load liblv2.sprx only", "Libraries"); + case lib_loading_type::liblv2both: return tr("Load liblv2.sprx and manual selection", "Libraries"); + case lib_loading_type::liblv2list: return tr("Load liblv2.sprx and strict selection", "Libraries"); } break; case emu_settings::PPUDecoder: switch (static_cast(index)) { - case ppu_decoder_type::precise: return tr("Interpreter (precise)"); - case ppu_decoder_type::fast: return tr("Interpreter (fast)"); - case ppu_decoder_type::llvm: return tr("Recompiler (LLVM)"); + case ppu_decoder_type::precise: return tr("Interpreter (precise)", "PPU decoder"); + case ppu_decoder_type::fast: return tr("Interpreter (fast)", "PPU decoder"); + case ppu_decoder_type::llvm: return tr("Recompiler (LLVM)", "PPU decoder"); } break; case emu_settings::SPUDecoder: switch (static_cast(index)) { - case spu_decoder_type::precise: return tr("Interpreter (precise)"); - case spu_decoder_type::fast: return tr("Interpreter (fast)"); - case spu_decoder_type::asmjit: return tr("Recompiler (ASMJIT)"); - case spu_decoder_type::llvm: return tr("Recompiler (LLVM)"); + case spu_decoder_type::precise: return tr("Interpreter (precise)", "SPU decoder"); + case spu_decoder_type::fast: return tr("Interpreter (fast)", "SPU decoder"); + case spu_decoder_type::asmjit: return tr("Recompiler (ASMJIT)", "SPU decoder"); + case spu_decoder_type::llvm: return tr("Recompiler (LLVM)", "SPU decoder"); } break; case emu_settings::EnterButtonAssignment: diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 5fa11da26d..6a7683d8ca 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -60,7 +60,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std if (game) { ui->tab_widget_settings->removeTab(8); - ui->buttonBox->button(QDialogButtonBox::StandardButton::Save)->setText(tr("Save custom configuration")); + ui->buttonBox->button(QDialogButtonBox::StandardButton::Save)->setText(tr("Save custom configuration", "Settings dialog")); } // Localized tooltips @@ -84,12 +84,12 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std if (game) { m_emu_settings->LoadSettings(game->serial); - setWindowTitle(tr("Settings: [") + qstr(game->serial) + "] " + qstr(game->name)); + setWindowTitle(tr("Settings: [%0] %1", "Settings dialog").arg(qstr(game->serial)).arg(qstr(game->name))); } else { m_emu_settings->LoadSettings(); - setWindowTitle(tr("Settings")); + setWindowTitle(tr("Settings", "Settings dialog")); } // Discord variables @@ -194,7 +194,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceComboBox(ui->preferredSPUThreads, emu_settings::PreferredSPUThreads, true); SubscribeTooltip(ui->gb_spu_threads, tooltips.settings.preferred_spu_threads); - ui->preferredSPUThreads->setItemText(ui->preferredSPUThreads->findData("0"), tr("Auto")); + ui->preferredSPUThreads->setItemText(ui->preferredSPUThreads->findData("0"), tr("Auto", "Preferred SPU threads")); if (utils::has_rtm()) { @@ -227,8 +227,8 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std else { ui->enableTSX->setEnabled(false); - ui->enableTSX->addItem(tr("Not supported")); - SubscribeTooltip(ui->enableTSX, tr("Unfortunately your CPU model does not support this instruction set.")); + ui->enableTSX->addItem(tr("Not supported", "Enable TSX")); + SubscribeTooltip(ui->enableTSX, tr("Unfortunately your CPU model does not support this instruction set.", "Enable TSX")); } // PPU tool tips @@ -330,7 +330,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std if (res_index >= 0) { // Rename the default resolution for users - ui->resBox->setItemText(res_index, tr("1280x720 (Recommended)")); + ui->resBox->setItemText(res_index, tr("1280x720 (Recommended)", "Resolution")); // Set the current selection to the default if the original setting wasn't valid if (saved_index_removed) @@ -356,13 +356,13 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std switch (int val = ui->anisotropicFilterOverride->itemData(i).toInt()) { case 0: - ui->anisotropicFilterOverride->setItemText(i, tr("Auto")); + ui->anisotropicFilterOverride->setItemText(i, tr("Auto", "Anisotropic filter override")); break; case 2: case 4: case 8: case 16: - ui->anisotropicFilterOverride->setItemText(i, tr("%1x").arg(val)); + ui->anisotropicFilterOverride->setItemText(i, tr("%1x", "Anisotropic filter override").arg(val)); break; default: ui->anisotropicFilterOverride->removeItem(i); @@ -418,9 +418,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std { if (percentage == resolution_scale_def) { - return QString(tr("100% (Default)")); + return tr("100% (Default)", "Resolution scale"); } - return QString("%1% (%2x%3)").arg(percentage).arg(1280 * percentage / 100).arg(720 * percentage / 100); + return tr("%1% (%2x%3)", "Resolution scale").arg(percentage).arg(1280 * percentage / 100).arg(720 * percentage / 100); }; ui->resolutionScale->setPageStep(50); ui->resolutionScaleMin->setText(QString::number(ui->resolutionScale->minimum())); @@ -447,9 +447,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std { if (dim == minimum_scalable_dimension_def) { - return tr("%1x%1 (Default)").arg(dim); + return tr("%1x%1 (Default)", "Minimum scalable dimension").arg(dim); } - return QString("%1x%1").arg(dim); + return tr("%1x%1", "Minimum scalable dimension").arg(dim); }; ui->minimumScalableDimension->setPageStep(64); ui->minimumScalableDimensionMin->setText(QString::number(ui->minimumScalableDimension->minimum())); @@ -511,14 +511,14 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // Enable/disable MSAA depending on renderer ui->antiAliasing->setEnabled(renderer.has_msaa); ui->antiAliasing->blockSignals(true); - ui->antiAliasing->setCurrentText(renderer.has_msaa ? qstr(m_emu_settings->GetSetting(emu_settings::MSAA)) : tr("Disabled")); + ui->antiAliasing->setCurrentText(renderer.has_msaa ? qstr(m_emu_settings->GetSetting(emu_settings::MSAA)) : tr("Disabled", "MSAA")); ui->antiAliasing->blockSignals(false); // Fill combobox with placeholder if no adapters needed if (!renderer.has_adapters) { ui->graphicsAdapterBox->clear(); - ui->graphicsAdapterBox->addItem(tr("Not needed for %1 renderer").arg(text)); + ui->graphicsAdapterBox->addItem(tr("Not needed for %1 renderer", "Graphics adapter").arg(text)); return; } // Fill combobox @@ -734,7 +734,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std change_microphone_device(index+1, m_emu_settings->m_microphone_creator.mic_none); // Ensures the value is set in config } else + { mics_combo[index]->setCurrentText(qstr(m_emu_settings->m_microphone_creator.sel_list[index])); + } } m_emu_settings->EnhanceComboBox(ui->microphoneBox, emu_settings::MicrophoneType); @@ -765,13 +767,13 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // Sliders - EnhanceSlider(emu_settings::MasterVolume, ui->masterVolume, ui->masterVolumeLabel, tr("Master: %0 %")); + EnhanceSlider(emu_settings::MasterVolume, ui->masterVolume, ui->masterVolumeLabel, tr("Master: %0 %", "Master volume")); SubscribeTooltip(ui->master_volume, tooltips.settings.master_volume); - EnhanceSlider(emu_settings::AudioBufferDuration, ui->audioBufferDuration, ui->audioBufferDurationLabel, tr("Audio Buffer Duration: %0 ms")); + EnhanceSlider(emu_settings::AudioBufferDuration, ui->audioBufferDuration, ui->audioBufferDurationLabel, tr("Audio Buffer Duration: %0 ms", "Audio buffer duration")); SubscribeTooltip(ui->audio_buffer_duration, tooltips.settings.audio_buffer_duration); - EnhanceSlider(emu_settings::TimeStretchingThreshold, ui->timeStretchingThreshold, ui->timeStretchingThresholdLabel, tr("Time Stretching Threshold: %0 %")); + EnhanceSlider(emu_settings::TimeStretchingThreshold, ui->timeStretchingThreshold, ui->timeStretchingThresholdLabel, tr("Time Stretching Threshold: %0 %", "Time stretching threshold")); SubscribeTooltip(ui->time_stretching_threshold, tooltips.settings.time_stretching_threshold); // _____ __ ____ _______ _ @@ -826,7 +828,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // Sliders - EnhanceSlider(emu_settings::MaximumCacheSize, ui->maximumCacheSize, ui->maximumCacheSizeLabel, tr("Maximum size: %0 MB")); + EnhanceSlider(emu_settings::MaximumCacheSize, ui->maximumCacheSize, ui->maximumCacheSizeLabel, tr("Maximum size: %0 MB", "Maximum cache size")); ui->maximumCacheSize->setEnabled(ui->enableCacheClearing->isChecked()); // Radio Buttons @@ -930,7 +932,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // Comboboxes m_emu_settings->EnhanceComboBox(ui->maxSPURSThreads, emu_settings::MaxSPURSThreads, true); - ui->maxSPURSThreads->setItemText(ui->maxSPURSThreads->findData("6"), tr("Unlimited (Default)")); + ui->maxSPURSThreads->setItemText(ui->maxSPURSThreads->findData("6"), tr("Unlimited (Default)", "Max SPURS threads")); SubscribeTooltip(ui->gb_max_spurs_threads, tooltips.settings.max_spurs_threads); m_emu_settings->EnhanceComboBox(ui->sleepTimersAccuracy, emu_settings::SleepTimersAccuracy); @@ -938,7 +940,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // Sliders - EnhanceSlider(emu_settings::DriverWakeUpDelay, ui->wakeupDelay, ui->wakeupText, tr(reinterpret_cast(u8"%0 µs"))); + EnhanceSlider(emu_settings::DriverWakeUpDelay, ui->wakeupDelay, ui->wakeupText, tr(reinterpret_cast(u8"%0 µs"), "Driver wake up delay")); SnapSlider(ui->wakeupDelay, 200); ui->wakeupDelay->setMaximum(7000); // Very large values must be entered with config.yml changes ui->wakeupDelay->setPageStep(200); @@ -948,7 +950,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std ui->wakeupDelay->setValue(wakeup_def); }); - EnhanceSlider(emu_settings::VBlankRate, ui->vblank, ui->vblankText, tr("%0 Hz")); + EnhanceSlider(emu_settings::VBlankRate, ui->vblank, ui->vblankText, tr("%0 Hz", "VBlank rate")); SnapSlider(ui->vblank, 30); ui->vblank->setPageStep(60); const int vblank_def = stoi(m_emu_settings->GetSettingDefault(emu_settings::VBlankRate)); @@ -957,7 +959,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std ui->vblank->setValue(vblank_def); }); - EnhanceSlider(emu_settings::ClocksScale, ui->clockScale, ui->clockScaleText, tr("%0 %")); + EnhanceSlider(emu_settings::ClocksScale, ui->clockScale, ui->clockScaleText, tr("%0 %", "Clocks scale")); SnapSlider(ui->clockScale, 10); ui->clockScale->setPageStep(50); const int clocks_scale_def = stoi(m_emu_settings->GetSettingDefault(emu_settings::ResolutionScale)); @@ -1048,7 +1050,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std ui->lleList->addItem(item); } - ui->searchBox->setPlaceholderText(tr("Search libraries")); + ui->searchBox->setPlaceholderText(tr("Search libraries", "Library search box")); auto on_lib_button_clicked = [=, this](int ind) { @@ -1122,7 +1124,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceComboBox(ui->maxLLVMThreads, emu_settings::MaxLLVMThreads, true, true, std::thread::hardware_concurrency()); SubscribeTooltip(ui->gb_max_llvm, tooltips.settings.max_llvm_threads); - ui->maxLLVMThreads->setItemText(ui->maxLLVMThreads->findData("0"), tr("All (%1)").arg(std::thread::hardware_concurrency())); + ui->maxLLVMThreads->setItemText(ui->maxLLVMThreads->findData("0"), tr("All (%1)", "Max LLVM threads").arg(std::thread::hardware_concurrency())); m_emu_settings->EnhanceComboBox(ui->perfOverlayDetailLevel, emu_settings::PerfOverlayDetailLevel); SubscribeTooltip(ui->perf_overlay_detail_level, tooltips.settings.perf_overlay_detail_level); @@ -1216,27 +1218,27 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // Sliders - EnhanceSlider(emu_settings::PerfOverlayUpdateInterval, ui->perfOverlayUpdateInterval, ui->label_update_interval, tr("Update Interval: %0 ms")); + EnhanceSlider(emu_settings::PerfOverlayUpdateInterval, ui->perfOverlayUpdateInterval, ui->label_update_interval, tr("Update Interval: %0 ms", "Performance overlay update interval")); SubscribeTooltip(ui->perf_overlay_update_interval, tooltips.settings.perf_overlay_update_interval); - EnhanceSlider(emu_settings::PerfOverlayFontSize, ui->perfOverlayFontSize, ui->label_font_size, tr("Font Size: %0 px")); + EnhanceSlider(emu_settings::PerfOverlayFontSize, ui->perfOverlayFontSize, ui->label_font_size, tr("Font Size: %0 px", "Performance overlay font size")); SubscribeTooltip(ui->perf_overlay_font_size, tooltips.settings.perf_overlay_font_size); - EnhanceSlider(emu_settings::PerfOverlayOpacity, ui->perfOverlayOpacity, ui->label_opacity, tr("Opacity: %0 %")); + EnhanceSlider(emu_settings::PerfOverlayOpacity, ui->perfOverlayOpacity, ui->label_opacity, tr("Opacity: %0 %", "Performance overlay opacity")); SubscribeTooltip(ui->perf_overlay_opacity, tooltips.settings.perf_overlay_opacity); - EnhanceSlider(emu_settings::ShaderLoadBgDarkening, ui->shaderLoadBgDarkening, ui->label_shaderLoadBgDarkening, tr("Background darkening: %0 %")); + EnhanceSlider(emu_settings::ShaderLoadBgDarkening, ui->shaderLoadBgDarkening, ui->label_shaderLoadBgDarkening, tr("Background darkening: %0 %", "Shader load background darkening")); SubscribeTooltip(ui->shaderLoadBgDarkening, tooltips.settings.shader_load_bg_darkening); - EnhanceSlider(emu_settings::ShaderLoadBgBlur, ui->shaderLoadBgBlur, ui->label_shaderLoadBgBlur, tr("Background blur: %0 %")); + EnhanceSlider(emu_settings::ShaderLoadBgBlur, ui->shaderLoadBgBlur, ui->label_shaderLoadBgBlur, tr("Background blur: %0 %", "Shader load background blur")); SubscribeTooltip(ui->shaderLoadBgBlur, tooltips.settings.shader_load_bg_blur); // SpinBoxes - m_emu_settings->EnhanceSpinBox(ui->perfOverlayMarginX, emu_settings::PerfOverlayMarginX, "", tr("px")); + m_emu_settings->EnhanceSpinBox(ui->perfOverlayMarginX, emu_settings::PerfOverlayMarginX, "", tr("px", "Performance overlay margin x")); SubscribeTooltip(ui->perfOverlayMarginX, tooltips.settings.perf_overlay_margin_x); - m_emu_settings->EnhanceSpinBox(ui->perfOverlayMarginY, emu_settings::PerfOverlayMarginY, "", tr("px")); + m_emu_settings->EnhanceSpinBox(ui->perfOverlayMarginY, emu_settings::PerfOverlayMarginY, "", tr("px", "Performance overlay margin y")); SubscribeTooltip(ui->perfOverlayMarginY, tooltips.settings.perf_overlay_margin_y); // Global settings (gui_settings) @@ -1303,7 +1305,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std } else { - title_data.title = sstr(tr("My Game")); + title_data.title = sstr(tr("My Game", "Game window title")); title_data.title_id = "ABCD12345"; } @@ -1338,15 +1340,15 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std const std::vector> window_title_glossary = { - { "%G", tr("GPU Model") }, - { "%C", tr("CPU Model") }, - { "%c", tr("Thread Count") }, - { "%M", tr("System Memory") }, - { "%F", tr("Framerate") }, - { "%R", tr("Renderer") }, - { "%T", tr("Title") }, - { "%t", tr("Title ID") }, - { "%V", tr("RPCS3 Version") } + { "%G", tr("GPU Model", "Game window title") }, + { "%C", tr("CPU Model", "Game window title") }, + { "%c", tr("Thread Count", "Game window title") }, + { "%M", tr("System Memory", "Game window title") }, + { "%F", tr("Framerate", "Game window title") }, + { "%R", tr("Renderer", "Game window title") }, + { "%T", tr("Title", "Game window title") }, + { "%t", tr("Title ID", "Game window title") }, + { "%V", tr("RPCS3 Version", "Game window title") } }; QString glossary; @@ -1356,14 +1358,14 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std glossary += format + "\t = " + description + "\n"; } - return tr("Glossary:\n\n%0\nPreview:\n\n%1\n").arg(glossary).arg(game_window_title); + return tr("Glossary:\n\n%0\nPreview:\n\n%1\n", "Game window title").arg(glossary).arg(game_window_title); }; const std::string game_title_format = m_emu_settings->GetSetting(emu_settings::WindowTitleFormat); QString edited_format = qstr(game_title_format); - input_dialog dlg(-1, edited_format, tr("Game Window Title Format"), get_game_window_title_label(edited_format), "", this); + input_dialog dlg(-1, edited_format, tr("Game Window Title Format", "Game window title"), get_game_window_title_label(edited_format), "", this); dlg.resize(width() * .75, dlg.height()); connect(&dlg, &input_dialog::text_changed, [&](const QString& text) @@ -1532,7 +1534,7 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std connect(ui->pb_reset_default, &QAbstractButton::clicked, [=, this] { - if (QMessageBox::question(this, tr("Reset GUI to default?"), tr("This will include your stylesheet as well. Do you wish to proceed?"), + if (QMessageBox::question(this, tr("Reset GUI to default?", "Reset"), tr("This will include your stylesheet as well. Do you wish to proceed?", "Reset"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { apply_gui_options(true); @@ -1610,15 +1612,15 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std connect(ui->pb_gl_icon_color, &QAbstractButton::clicked, [=, this]() { - color_dialog(gui::gl_iconColor, tr("Choose gamelist icon color"), ui->pb_gl_icon_color); + color_dialog(gui::gl_iconColor, tr("Choose gamelist icon color", "Settings: color dialog"), ui->pb_gl_icon_color); }); connect(ui->pb_sd_icon_color, &QAbstractButton::clicked, [=, this]() { - color_dialog(gui::sd_icon_color, tr("Choose save manager icon color"), ui->pb_sd_icon_color); + color_dialog(gui::sd_icon_color, tr("Choose save manager icon color", "Settings: color dialog"), ui->pb_sd_icon_color); }); connect(ui->pb_tr_icon_color, &QAbstractButton::clicked, [=, this]() { - color_dialog(gui::tr_icon_color, tr("Choose trophy manager icon color"), ui->pb_tr_icon_color); + color_dialog(gui::tr_icon_color, tr("Choose trophy manager icon color", "Settings: color dialog"), ui->pb_tr_icon_color); }); AddConfigs(); @@ -1761,8 +1763,8 @@ void settings_dialog::AddStylesheets() { ui->combo_stylesheets->clear(); - ui->combo_stylesheets->addItem(tr("None"), gui::None); - ui->combo_stylesheets->addItem(tr("Default (Bright)"), gui::Default); + ui->combo_stylesheets->addItem(tr("None", "Stylesheets"), gui::None); + ui->combo_stylesheets->addItem(tr("Default (Bright)", "Stylesheets"), gui::Default); for (const QString& entry : m_gui_settings->GetStylesheetEntries()) { @@ -1788,8 +1790,8 @@ void settings_dialog::AddStylesheets() void settings_dialog::OnBackupCurrentConfig() { QInputDialog* dialog = new QInputDialog(this); - dialog->setWindowTitle(tr("Choose a unique name")); - dialog->setLabelText(tr("Configuration Name: ")); + dialog->setWindowTitle(tr("Choose a unique name", "Backup GUI config")); + dialog->setLabelText(tr("Configuration Name: ", "Backup GUI config")); dialog->resize(500, 100); while (dialog->exec() != QDialog::Rejected) @@ -1800,17 +1802,17 @@ void settings_dialog::OnBackupCurrentConfig() if (gui_config_name.isEmpty()) { - QMessageBox::warning(this, tr("Error"), tr("Name cannot be empty")); + QMessageBox::warning(this, tr("Error", "Backup GUI config warning 1"), tr("Name cannot be empty", "Backup GUI config warning 1")); continue; } if (gui_config_name.contains(".")) { - QMessageBox::warning(this, tr("Error"), tr("Must choose a name with no '.'")); + QMessageBox::warning(this, tr("Error", "Backup GUI config warning 2"), tr("Must choose a name with no '.'", "Backup GUI config warning 2")); continue; } if (ui->combo_configs->findText(gui_config_name) != -1) { - QMessageBox::warning(this, tr("Error"), tr("Please choose a non-existing name")); + QMessageBox::warning(this, tr("Error", "Backup GUI config warning 3"), tr("Please choose a non-existing name", "Backup GUI config warning 3")); continue; } Q_EMIT GuiSettingsSaveRequest();