https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0fa744241fd9600c97095…
commit 0fa744241fd9600c970955bb29494fb9f05ee5e2
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Wed Sep 26 16:15:07 2018 +0300
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Sep 27 12:10:06 2018 +0200
[DEVCPUX] Add russian translation
Also make MHz string translatable. Addendum to 793e2a3.
---
dll/shellext/devcpux/lang/en-US.rc | 5 +++++
dll/shellext/devcpux/lang/ru-RU.rc | 21 +++++++++++++++++++++
dll/shellext/devcpux/processor.c | 8 +++++++-
dll/shellext/devcpux/processor.rc | 5 ++++-
dll/shellext/devcpux/resource.h | 2 ++
5 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/dll/shellext/devcpux/lang/en-US.rc b/dll/shellext/devcpux/lang/en-US.rc
index 4ea9377e0a..428531e5a8 100644
--- a/dll/shellext/devcpux/lang/en-US.rc
+++ b/dll/shellext/devcpux/lang/en-US.rc
@@ -15,6 +15,11 @@ BEGIN
LTEXT "test", IDC_CORESPEED, 57, 68, 181, 8
END
+STRINGTABLE
+BEGIN
+ IDS_MEGAHERTZ "%ld MHz"
+END
+
/*
DLG_PROCESSORINFO DIALOGEX 0, 0, 252, 218
STYLE DS_SHELLFONT | WS_POPUP | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
diff --git a/dll/shellext/devcpux/lang/ru-RU.rc b/dll/shellext/devcpux/lang/ru-RU.rc
new file mode 100644
index 0000000000..6e5217b28f
--- /dev/null
+++ b/dll/shellext/devcpux/lang/ru-RU.rc
@@ -0,0 +1,21 @@
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+
+DLG_PROCESSORINFO DIALOGEX 0, 0, 252, 218
+STYLE DS_SHELLFONT | WS_POPUP | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Процессор"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "Возможности:", -1, 7, 23, 50, 8
+ LTEXT "test", IDC_FEATURES, 57, 23, 181, 8
+ LTEXT "Модель:", -1, 7, 38, 50, 8
+ LTEXT "test", IDC_MODEL, 57, 38, 181, 8
+ LTEXT "Степпинг:", -1, 7, 53, 50, 51
+ LTEXT "test", IDC_STEPPING, 57, 53, 181, 8
+ LTEXT "Частота ядра:", -1, 7, 68, 50, 8
+ LTEXT "test", IDC_CORESPEED, 57, 68, 181, 8
+END
+
+STRINGTABLE
+BEGIN
+ IDS_MEGAHERTZ "%ld МГц"
+END
diff --git a/dll/shellext/devcpux/processor.c b/dll/shellext/devcpux/processor.c
index 8544af1c35..06c2667af2 100644
--- a/dll/shellext/devcpux/processor.c
+++ b/dll/shellext/devcpux/processor.c
@@ -92,11 +92,17 @@ ProcessorDlgProc (HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM
lParam)
WCHAR szFeatures[MAX_PATH] = L"";
WCHAR szModel[3];
WCHAR szStepping[3];
+ WCHAR szMhz[16];
WCHAR szCurrentMhz[10];
BOOL bFirst = TRUE;
SYSTEM_INFO SystemInfo;
PROCESSOR_POWER_INFORMATION PowerInfo;
+ if (!LoadStringW(g_hInstance, IDS_MEGAHERTZ, szMhz, ARRAYSIZE(szMhz)))
+ {
+ StringCbCopyW(szMhz, sizeof(szMhz), L"%ld MHz");
+ }
+
if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE))
AddFeature(szFeatures, sizeof(szFeatures), L"MMX",
&bFirst);
if (IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE))
@@ -119,7 +125,7 @@ ProcessorDlgProc (HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM
lParam)
SetDlgItemTextW(hDlg, IDC_STEPPING, szStepping);
CallNtPowerInformation(11, NULL, 0, &PowerInfo, sizeof(PowerInfo));
- StringCbPrintfW(szCurrentMhz, sizeof(szCurrentMhz), L"%ld %s",
PowerInfo.CurrentMhz, L"MHz");
+ StringCbPrintfW(szCurrentMhz, sizeof(szCurrentMhz), szMhz,
PowerInfo.CurrentMhz);
SetDlgItemTextW(hDlg, IDC_CORESPEED, szCurrentMhz);
return TRUE;
diff --git a/dll/shellext/devcpux/processor.rc b/dll/shellext/devcpux/processor.rc
index e98f907589..0771485902 100644
--- a/dll/shellext/devcpux/processor.rc
+++ b/dll/shellext/devcpux/processor.rc
@@ -14,4 +14,7 @@
#ifdef LANGUAGE_EN_US
#include "lang/en-US.rc"
-#endif
\ No newline at end of file
+#endif
+#ifdef LANGUAGE_RU_RU
+ #include "lang/ru-RU.rc"
+#endif
diff --git a/dll/shellext/devcpux/resource.h b/dll/shellext/devcpux/resource.h
index e3543d061e..2eee3a93e9 100644
--- a/dll/shellext/devcpux/resource.h
+++ b/dll/shellext/devcpux/resource.h
@@ -6,3 +6,5 @@
#define IDC_MODEL 302
#define IDC_STEPPING 303
#define IDC_CORESPEED 304
+
+#define IDS_MEGAHERTZ 400