Skip to content

Commit

Permalink
Merge pull request #16460 from hrydgard/translation-string-fixes
Browse files Browse the repository at this point in the history
Translation string fixes
  • Loading branch information
hrydgard authored Nov 29, 2022
2 parents b9dc206 + 39e835b commit d34e38c
Show file tree
Hide file tree
Showing 46 changed files with 467 additions and 131 deletions.
10 changes: 8 additions & 2 deletions Tools/langtool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ use structopt::StructOpt;
struct Opt {
#[structopt(subcommand)]
cmd: Command,
#[structopt(short, long)]
dry_run: bool,
}

#[derive(StructOpt, Debug)]
Expand Down Expand Up @@ -170,7 +172,9 @@ fn main() {
}
}

target_ini.write().unwrap();
if !opt.dry_run {
target_ini.write().unwrap();
}
}

println!("Langtool processing {}", reference_ini_filename);
Expand Down Expand Up @@ -199,5 +203,7 @@ fn main() {
_ => {}
}

// println!("{:#?}", target_ini);
if !opt.dry_run {
reference_ini.write().unwrap();
}
}
38 changes: 19 additions & 19 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ void GameSettingsScreen::CreateViews() {
LinearLayout *systemSettings = AddTab("GameSettingsSystem", ms->T("System"));

systemSettings->Add(new ItemHeader(sy->T("UI")));
systemSettings->Add(new Choice(dev->T("Language", "Language")))->OnClick.Handle(this, &GameSettingsScreen::OnLanguage);
systemSettings->Add(new Choice(sy->T("Language")))->OnClick.Handle(this, &GameSettingsScreen::OnLanguage);
systemSettings->Add(new CheckBox(&g_Config.bUISound, sy->T("UI Sound")));
const Path bgPng = GetSysDirectory(DIRECTORY_SYSTEM) / "background.png";
const Path bgJpg = GetSysDirectory(DIRECTORY_SYSTEM) / "background.jpg";
Expand Down Expand Up @@ -1592,8 +1592,8 @@ UI::EventReturn GameSettingsScreen::OnChangeMacAddress(UI::EventParams &e) {
}

UI::EventReturn GameSettingsScreen::OnLanguage(UI::EventParams &e) {
auto dev = GetI18NCategory("Developer");
auto langScreen = new NewLanguageScreen(dev->T("Language"));
auto sy = GetI18NCategory("System");
auto langScreen = new NewLanguageScreen(sy->T("Language"));
langScreen->OnChoice.Handle(this, &GameSettingsScreen::OnLanguageChange);
if (e.v)
langScreen->SetPopupOrigin(e.v);
Expand Down Expand Up @@ -1756,12 +1756,27 @@ void DeveloperToolsScreen::CreateViews() {
list->Add(new Choice(dev->T("Logging Channels")))->OnClick.Handle(this, &DeveloperToolsScreen::OnLogConfig);
list->Add(new CheckBox(&g_Config.bLogFrameDrops, dev->T("Log Dropped Frame Statistics")));
if (GetGPUBackend() == GPUBackend::VULKAN) {
list->Add(new CheckBox(&g_Config.bGpuLogProfiler, gr->T("GPU log profiler")));
list->Add(new CheckBox(&g_Config.bGpuLogProfiler, dev->T("GPU log profiler")));
}
list->Add(new ItemHeader(dev->T("Texture Replacement")));
list->Add(new CheckBox(&g_Config.bSaveNewTextures, dev->T("Save new textures")));
list->Add(new CheckBox(&g_Config.bReplaceTextures, dev->T("Replace textures")));

Choice *createTextureIni = list->Add(new Choice(dev->T("Create/Open textures.ini file for current game")));
createTextureIni->OnClick.Handle(this, &DeveloperToolsScreen::OnOpenTexturesIniFile);
createTextureIni->SetEnabledFunc([&] {
if (!PSP_IsInited())
return false;

// Disable the choice to Open/Create if the textures.ini file already exists, and we can't open it due to platform support limitations.
if (!System_GetPropertyBool(SYSPROP_SUPPORTS_OPEN_FILE_IN_EDITOR)) {
if (hasTexturesIni_ == HasIni::MAYBE)
hasTexturesIni_ = TextureReplacer::IniExists(g_paramSFO.GetDiscID()) ? HasIni::YES : HasIni::NO;
return hasTexturesIni_ != HasIni::YES;
}
return true;
});

Draw::DrawContext *draw = screenManager()->getDrawContext();

// Experimental, will move to main graphics settings later.
Expand Down Expand Up @@ -1810,21 +1825,6 @@ void DeveloperToolsScreen::CreateViews() {

// Reconsider whenever recreating views.
hasTexturesIni_ = HasIni::MAYBE;

Choice *createTextureIni = list->Add(new Choice(dev->T("Create/Open textures.ini file for current game")));
createTextureIni->OnClick.Handle(this, &DeveloperToolsScreen::OnOpenTexturesIniFile);
createTextureIni->SetEnabledFunc([&] {
if (!PSP_IsInited())
return false;

// Disable the choice to Open/Create if the textures.ini file already exists, and we can't open it due to platform support limitations.
if (!System_GetPropertyBool(SYSPROP_SUPPORTS_OPEN_FILE_IN_EDITOR)) {
if (hasTexturesIni_ == HasIni::MAYBE)
hasTexturesIni_ = TextureReplacer::IniExists(g_paramSFO.GetDiscID()) ? HasIni::YES : HasIni::NO;
return hasTexturesIni_ != HasIni::YES;
}
return true;
});
}

void DeveloperToolsScreen::onFinish(DialogResult result) {
Expand Down
4 changes: 2 additions & 2 deletions UI/MiscScreens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ void HandleCommonMessages(const char *message, const char *value, ScreenManager
UpdateUIState(UISTATE_MENU);
manager->push(new GameSettingsScreen(Path()));
} else if (!strcmp(message, "language screen") && isActiveScreen) {
auto dev = GetI18NCategory("Developer");
auto langScreen = new NewLanguageScreen(dev->T("Language"));
auto sy = GetI18NCategory("System");
auto langScreen = new NewLanguageScreen(sy->T("Language"));
langScreen->OnChoice.Add([](UI::EventParams &) {
NativeMessageReceived("recreateviews", "");
if (host) {
Expand Down
12 changes: 10 additions & 2 deletions assets/lang/ar_AE.ini
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ FPU = FPU
Framedump tests = Framedump tests
Frame Profiler = Frame profiler
GPU Driver Test = GPU driver test
GPU Log Profiler = GPU Log Profiler
GPU log profiler = GPU log profiler
GPU Profile = GPU profile
Jit Compare = Jit compare
JIT debug tools = JIT debug tools
Expand Down Expand Up @@ -501,7 +501,7 @@ Frame Rate Control = ‎التحكم في معدل الإطارات
Frame Skipping = ‎تخطي الإطارات
Frame Skipping Type = Frame skipping type
FullScreen = ‎الشاشة الكاملة
GPU log profiler = GPU log profiler
Geometry shader culling = Geometry shader culling
GPUReadbackRequired = Warning: This game requires "Skip GPU Readbacks" to be set to Off.
Hack Settings = Hack settings (may cause glitches)
Hardware Tessellation = Hardware tessellation
Expand Down Expand Up @@ -555,6 +555,8 @@ Software Skinning = ‎طلاء برمجي
SoftwareSkinning Tip = Combine skinned model draws on the CPU, faster in most games
Speed = ‎السرعة
Speed Hacks = Speed Hacks (can cause rendering errors!)
Stereo display shader = Stereo display shader
Stereo rendering = Stereo rendering
Stretch = ‎المط
Texture Filter = ‎منقي الرسوم
Texture Filtering = ‎مفلتر الرسوم
Expand Down Expand Up @@ -840,11 +842,13 @@ Brightness = Brightness
Cartoon = ‎كرتوني
CatmullRom = Bicubic (Catmull-Rom) Upscaler
ColorCorrection = Color correction
ColorPreservation = Color preservation
Contrast = Contrast
CRT = ‎CRT خطوط الفحص
FXAA = ‎FXAA منعم الحواف
Gamma = Gamma
Grayscale = ‎التدرج الرمادي
GreenLevel = GreenLevel
Intensity = Intensity
InverseColors = ‎عكس الألوان
MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler
Expand All @@ -853,9 +857,11 @@ NaturalA = Natural Colors (no blur)
Off = ‎مغلق
Power = Power
PSPColor = PSP color
RedBlue = Red/Blue glasses
Saturation = Saturation
Scanlines = Scanlines (CRT)
Sharpen = ‎تنعيم الحواف
SideBySide = Side by side (SBS)
SSAA(Gauss) = Supersampling AA (Gauss)
Tex4xBRZ = 4xBRZ
TexMMPX = MMPX
Expand Down Expand Up @@ -1099,6 +1105,8 @@ Color Tint = Color Tint
Error: load undo state is from a different game = Error: load undo state is from a different game
Failed to load state for load undo. Error in the file system. = Failed to load state for load undo. Error in the file system.
Floating symbols = Floating symbols
Game crashed = Game crashed
Language = ‎اللغة
Memory Stick folder = Memory Stick folder
Memory Stick size = Memory Stick size
Change Nickname = ‎تغيير الأسم المستعار
Expand Down
12 changes: 10 additions & 2 deletions assets/lang/az_AZ.ini
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ FPU = FPU
Framedump tests = Framedump tests
Frame Profiler = Frame profiler
GPU Driver Test = GPU driver test
GPU Log Profiler = GPU Log Profiler
GPU log profiler = GPU log profiler
GPU Profile = GPU profile
Jit Compare = Jit compare
JIT debug tools = JIT debug tools
Expand Down Expand Up @@ -493,7 +493,7 @@ Frame Rate Control = Framerate control
Frame Skipping = Kvadrat Keçid et (Sürət)
Frame Skipping Type = Frame skipping type
FullScreen = Fullscreen
GPU log profiler = GPU log profiler
Geometry shader culling = Geometry shader culling
GPUReadbackRequired = Warning: This game requires "Skip GPU Readbacks" to be set to Off.
Hack Settings = Hack settings (may cause glitches)
Hardware Tessellation = Hardware tessellation
Expand Down Expand Up @@ -547,6 +547,8 @@ Software Skinning = Software skinning
SoftwareSkinning Tip = Combine skinned model draws on the CPU, faster in most games
Speed = Speed
Speed Hacks = Speed Hacks (can cause rendering errors!)
Stereo display shader = Stereo display shader
Stereo rendering = Stereo rendering
Stretch = Stretch
Texture Filter = Texture filtering
Texture Filtering = Texture filtering
Expand Down Expand Up @@ -832,11 +834,13 @@ Brightness = Brightness
Cartoon = Cartoon
CatmullRom = Bicubic (Catmull-Rom) Upscaler
ColorCorrection = Color correction
ColorPreservation = Color preservation
Contrast = Contrast
CRT = CRT scanlines
FXAA = FXAA Antialiasing
Gamma = Gamma
Grayscale = Grayscale
GreenLevel = GreenLevel
Intensity = Intensity
InverseColors = Inverse Colors
MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler
Expand All @@ -845,9 +849,11 @@ NaturalA = Natural Colors (no blur)
Off = Off
Power = Power
PSPColor = PSP color
RedBlue = Red/Blue glasses
Saturation = Saturation
Scanlines = Scanlines (CRT)
Sharpen = Sharpen
SideBySide = Side by side (SBS)
SSAA(Gauss) = Supersampling AA (Gauss)
Tex4xBRZ = 4xBRZ
TexMMPX = MMPX
Expand Down Expand Up @@ -1091,6 +1097,8 @@ Color Tint = Color Tint
Error: load undo state is from a different game = Error: load undo state is from a different game
Failed to load state for load undo. Error in the file system. = Failed to load state for load undo. Error in the file system.
Floating symbols = Floating symbols
Game crashed = Game crashed
Language = Language
Memory Stick folder = Memory Stick folder
Memory Stick size = Memory Stick size
Change Nickname = Change nickname
Expand Down
12 changes: 10 additions & 2 deletions assets/lang/bg_BG.ini
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ FPU = FPU
Framedump tests = Framedump tests
Frame Profiler = Frame profiler
GPU Driver Test = GPU driver test
GPU Log Profiler = GPU Log Profiler
GPU log profiler = GPU log profiler
GPU Profile = GPU profile
Jit Compare = Jit compare
JIT debug tools = JIT debug tools
Expand Down Expand Up @@ -493,7 +493,7 @@ Frame Rate Control = Framerate control
Frame Skipping = Прескачане на кадри
Frame Skipping Type = Frame skipping type
FullScreen = Цял екран
GPU log profiler = GPU log profiler
Geometry shader culling = Geometry shader culling
GPUReadbackRequired = Warning: This game requires "Skip GPU Readbacks" to be set to Off.
Hack Settings = Hack settings (may cause glitches)
Hardware Tessellation = Hardware tessellation
Expand Down Expand Up @@ -547,6 +547,8 @@ Software Skinning = Software skinning
SoftwareSkinning Tip = Combine skinned model draws on the CPU, faster in most games
Speed = Скорост
Speed Hacks = Speed Hacks (can cause rendering errors!)
Stereo display shader = Stereo display shader
Stereo rendering = Stereo rendering
Stretch = Stretch
Texture Filter = Текстурно филтриране
Texture Filtering = Текстурно филтриране
Expand Down Expand Up @@ -832,11 +834,13 @@ Brightness = Brightness
Cartoon = Анимация
CatmullRom = Bicubic (Catmull-Rom) Upscaler
ColorCorrection = Color correction
ColorPreservation = Color preservation
Contrast = Contrast
CRT = CRT scanlines
FXAA = FXAA Antialiasing
Gamma = Gamma
Grayscale = Сива скала
GreenLevel = GreenLevel
Intensity = Intensity
InverseColors = Противоположни цветове
MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler
Expand All @@ -845,9 +849,11 @@ NaturalA = Natural Colors (no blur)
Off = Изключено
Power = Power
PSPColor = PSP color
RedBlue = Red/Blue glasses
Saturation = Saturation
Scanlines = Scanlines (CRT)
Sharpen = Изостряне
SideBySide = Side by side (SBS)
SSAA(Gauss) = Supersampling AA (Gauss)
Tex4xBRZ = 4xBRZ
TexMMPX = MMPX
Expand Down Expand Up @@ -1091,6 +1097,8 @@ Color Tint = Color Tint
Error: load undo state is from a different game = Error: load undo state is from a different game
Failed to load state for load undo. Error in the file system. = Failed to load state for load undo. Error in the file system.
Floating symbols = Floating symbols
Game crashed = Game crashed
Language = Език
Memory Stick folder = Memory Stick folder
Memory Stick size = Memory Stick size
Change Nickname = Промени прякор
Expand Down
12 changes: 10 additions & 2 deletions assets/lang/ca_ES.ini
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ FPU = FPU
Framedump tests = Framedump tests
Frame Profiler = Amideu el rendiment
GPU Driver Test = GPU driver test
GPU Log Profiler = GPU Log Profiler
GPU log profiler = GPU log profiler
GPU Profile = GPU profile
Jit Compare = Comparació Jit
JIT debug tools = JIT debug tools
Expand Down Expand Up @@ -493,7 +493,7 @@ Frame Rate Control = Framerate control
Frame Skipping = Saltar fotogrames (skip)
Frame Skipping Type = Frame skipping type
FullScreen = Fullscreen
GPU log profiler = GPU log profiler
Geometry shader culling = Geometry shader culling
GPUReadbackRequired = Warning: This game requires "Skip GPU Readbacks" to be set to Off.
Hack Settings = Hack settings (may cause glitches)
Hardware Tessellation = Hardware tessellation
Expand Down Expand Up @@ -547,6 +547,8 @@ Software Skinning = Software skinning
SoftwareSkinning Tip = Combine skinned model draws on the CPU, faster in most games
Speed = Speed
Speed Hacks = Speed Hacks (can cause rendering errors!)
Stereo display shader = Stereo display shader
Stereo rendering = Stereo rendering
Stretch = Stretch
Texture Filter = Texture filtering
Texture Filtering = Texture filtering
Expand Down Expand Up @@ -832,11 +834,13 @@ Brightness = Brightness
Cartoon = Cartoon
CatmullRom = Bicubic (Catmull-Rom) Upscaler
ColorCorrection = Color correction
ColorPreservation = Color preservation
Contrast = Contrast
CRT = CRT scanlines
FXAA = FXAA Antialiasing
Gamma = Gamma
Grayscale = Grayscale
GreenLevel = GreenLevel
Intensity = Intensity
InverseColors = Inverse Colors
MitchellNetravali = Bicubic (Mitchell-Netravali) Upscaler
Expand All @@ -845,9 +849,11 @@ NaturalA = Natural Colors (no blur)
Off = Off
Power = Power
PSPColor = PSP color
RedBlue = Red/Blue glasses
Saturation = Saturation
Scanlines = Scanlines (CRT)
Sharpen = Sharpen
SideBySide = Side by side (SBS)
SSAA(Gauss) = Supersampling AA (Gauss)
Tex4xBRZ = 4xBRZ
TexMMPX = MMPX
Expand Down Expand Up @@ -1091,6 +1097,8 @@ Color Tint = Color Tint
Error: load undo state is from a different game = Error: load undo state is from a different game
Failed to load state for load undo. Error in the file system. = Failed to load state for load undo. Error in the file system.
Floating symbols = Floating symbols
Game crashed = Game crashed
Language = Llengua
Memory Stick folder = Memory Stick folder
Memory Stick size = Memory Stick size
Change Nickname = Change nickname
Expand Down
Loading

0 comments on commit d34e38c

Please sign in to comment.