- Make browse dialog title and filter localizable. Based on a patch by Katayama Hirofumi MZ.
CORE-12903

svn path=/trunk/; revision=74484
This commit is contained in:
Thomas Faber 2017-05-06 09:27:32 +00:00
parent 9ef60ad5b0
commit 3dfda10ed9
25 changed files with 118 additions and 51 deletions

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Въпрос"
5850 "Пускане на РеактОС"
5851 "Пусков изборник"
5852 "Излизане от РеактОС"
5853 "Влизане в РеактОС"
IDS_REACTOS_LOGOFF "Излизане от РеактОС"
IDS_REACTOS_LOGON "Влизане в РеактОС"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -266,7 +266,9 @@ BEGIN
5849 "Otázka"
5850 "Spuštění systému ReactOS"
5851 "Otevření nabídky Start"
5852 "Odhlášení od systému ReactOS"
5853 "Přihlášení k systému ReactOS"
IDS_REACTOS_LOGOFF "Odhlášení od systému ReactOS"
IDS_REACTOS_LOGON "Přihlášení k systému ReactOS"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Frage"
5850 "ReactOS starten"
5851 "Startmenü"
5852 "ReactOS-Abmeldung"
5853 "ReactOS-Anmeldung"
IDS_REACTOS_LOGOFF "ReactOS-Abmeldung"
IDS_REACTOS_LOGON "ReactOS-Anmeldung"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Question"
5850 "Start ReactOS"
5851 "Start Menu"
5852 "ReactOS Logoff"
5853 "ReactOS Logon"
IDS_REACTOS_LOGOFF "ReactOS Logoff"
IDS_REACTOS_LOGON "ReactOS Logon"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Question"
5850 "Start ReactOS"
5851 "Start Menu"
5852 "ReactOS Logoff"
5853 "ReactOS Logon"
IDS_REACTOS_LOGOFF "ReactOS Logoff"
IDS_REACTOS_LOGON "ReactOS Logon"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Pregunta"
5850 "Iniciar ReactOS"
5851 "Menú Inicio"
5852 "Cierre de sesión de ReactOS"
5853 "Inicio de sesión en ReactOS"
IDS_REACTOS_LOGOFF "Cierre de sesión de ReactOS"
IDS_REACTOS_LOGON "Inicio de sesión en ReactOS"
5854 "Explorador de ReactOS"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Question"
5850 "Démarrer ReactOS"
5851 "Menu démarrer"
5852 "Déconnexion ReactOS"
5853 "Connexion ReactOS"
IDS_REACTOS_LOGOFF "Déconnexion ReactOS"
IDS_REACTOS_LOGON "Connexion ReactOS"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -263,7 +263,9 @@ BEGIN
5849 "שאלה"
5850 "התחלת ReactOS"
5851 "תפריט התחל"
5852 "ReactOS ניתוק"
5853 "ReactOS התחברות"
IDS_REACTOS_LOGOFF "ReactOS ניתוק"
IDS_REACTOS_LOGON "ReactOS התחברות"
5854 "ReactOS סייר"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Question"
5850 "Start ReactOS"
5851 "Start Menu"
5852 "ReactOS Logoff"
5853 "ReactOS Logon"
IDS_REACTOS_LOGOFF "ReactOS Logoff"
IDS_REACTOS_LOGON "ReactOS Logon"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Domanda"
5850 "Avvio ReactOS"
5851 "Menu avvio"
5852 "Fine sessione di ReactOS"
5853 "Inizio sessione di ReactOS"
IDS_REACTOS_LOGOFF "Fine sessione di ReactOS"
IDS_REACTOS_LOGON "Inizio sessione di ReactOS"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "質問"
5850 "ReactOSの開始"
5851 "メニューの開始"
5852 "ReactOSログオフ"
5853 "ReactOSログオン"
IDS_REACTOS_LOGOFF "ReactOSログオフ"
IDS_REACTOS_LOGON "ReactOSログオン"
5854 "ReactOSエクスプローラー"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Question"
5850 "Start ReactOS"
5851 "Start Menu"
5852 "ReactOS Logoff"
5853 "ReactOS Logon"
IDS_REACTOS_LOGOFF "ReactOS Logoff"
IDS_REACTOS_LOGON "ReactOS Logon"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Spørsmål"
5850 "Start ReactOS"
5851 "Start Meny"
5852 "ReactOS Logg av"
5853 "ReactOS Logg på"
IDS_REACTOS_LOGOFF "ReactOS Logg av"
IDS_REACTOS_LOGON "ReactOS Logg på"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -274,7 +274,9 @@ BEGIN
5849 "Znak zapytania"
5850 "Uruchomienie ReactOS"
5851 "Menu Start"
5852 "Wylogowanie z ReactOS"
5853 "Logowanie do ReactOS"
IDS_REACTOS_LOGOFF "Wylogowanie z ReactOS"
IDS_REACTOS_LOGON "Logowanie do ReactOS"
5854 "Eksplorator ReactOS"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Question"
5850 "Start ReactOS"
5851 "Start Menu"
5852 "ReactOS Logoff"
5853 "ReactOS Logon"
IDS_REACTOS_LOGOFF "ReactOS Logoff"
IDS_REACTOS_LOGON "ReactOS Logon"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -266,7 +266,9 @@ BEGIN
5849 "Întrebare"
5850 "Pornire ReactOS"
5851 "Meniul Pornire"
5852 "Ieșire din ReactOS"
5853 "Intrare în ReactOS"
IDS_REACTOS_LOGOFF "Ieșire din ReactOS"
IDS_REACTOS_LOGON "Intrare în ReactOS"
5854 "Explorator ReactOS"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -261,7 +261,9 @@ BEGIN
5849 "Вопрос"
5850 "Запуск ReactOS"
5851 "Главное меню"
5852 "Выход из ReactOS"
5853 "Вход в ReactOS"
IDS_REACTOS_LOGOFF "Выход из ReactOS"
IDS_REACTOS_LOGON "Вход в ReactOS"
5854 "Проводник ReactOS"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -266,7 +266,9 @@ BEGIN
5849 "Otázka"
5850 "Spustenie systému ReactOS"
5851 "Ponuka Štart"
5852 "Odhlásenie zo systému ReactOS"
5853 "Prihlásenie do systému ReactOS"
IDS_REACTOS_LOGOFF "Odhlásenie zo systému ReactOS"
IDS_REACTOS_LOGON "Prihlásenie do systému ReactOS"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -265,7 +265,9 @@ BEGIN
5849 "Pyetje"
5850 "Fillo ReactOS"
5851 "Fillo Menune"
5852 "Dil ReactOS"
5853 "Hyr ReactOS"
IDS_REACTOS_LOGOFF "Dil ReactOS"
IDS_REACTOS_LOGON "Hyr ReactOS"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -263,7 +263,9 @@ BEGIN
5849 "Soru"
5850 "ReactOS'u Başlat"
5851 "Başlat Seçkesi"
5852 "Oturumu Kapat"
5853 "Oturum Aç"
IDS_REACTOS_LOGOFF "Oturumu Kapat"
IDS_REACTOS_LOGON "Oturum Aç"
5854 "ReactOS Gezgini"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -269,7 +269,9 @@ BEGIN
5849 "Запитання"
5850 "Запуск ReactOS"
5851 "Головне меню"
5852 "Вихід із ReactOS"
5853 "Вхід до ReactOS"
IDS_REACTOS_LOGOFF "Вихід із ReactOS"
IDS_REACTOS_LOGON "Вхід до ReactOS"
5854 "ReactOS Explorer"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -268,7 +268,9 @@ BEGIN
5849 "问题"
5850 "启动 ReactOS"
5851 "「开始」菜单"
5852 "ReactOS 注销"
5853 "ReactOS 登录"
IDS_REACTOS_LOGOFF "ReactOS 注销"
IDS_REACTOS_LOGON "ReactOS 登录"
5854 "ReactOS 浏览器"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -267,7 +267,9 @@ BEGIN
5849 "問題"
5850 "啟動 ReactOS"
5851 "「開始」選單"
5852 "ReactOS 登出"
5853 "ReactOS 登入"
IDS_REACTOS_LOGOFF "ReactOS 登出"
IDS_REACTOS_LOGON "ReactOS 登入"
5854 "ReactOS 瀏覽器"
IDS_BROWSE_FOR_SOUND "Search for new sounds"
IDS_WAVE_FILES_FILTER "Wave Files (*.wav)|*.wav|"
END

View file

@ -69,6 +69,8 @@
#define IDS_REACTOS_LOGOFF 5852
#define IDS_REACTOS_LOGON 5853
#define IDS_REACTOS_DEFAULT_SCHEME 5856
#define IDS_BROWSE_FOR_SOUND 6144
#define IDS_WAVE_FILES_FILTER 6166
/* Strings */
#define IDS_CPLNAME 1000

View file

@ -56,6 +56,23 @@ static PAPP_MAP s_App = NULL;
TCHAR szDefault[MAX_PATH];
/* A filter string is a list separated by NULL and ends with double NULLs. */
LPWSTR MakeFilter(LPWSTR psz)
{
WCHAR *pch;
ASSERT(psz[0] != UNICODE_NULL &&
psz[wcslen(psz) - 1] == L'|');
for (pch = psz; *pch != UNICODE_NULL; pch++)
{
/* replace vertical bar with NULL */
if (*pch == L'|')
{
*pch = UNICODE_NULL;
}
}
return psz;
}
PLABEL_MAP FindLabel(PAPP_MAP pAppMap, TCHAR * szName)
{
@ -337,7 +354,7 @@ AddSoundProfile(HWND hwndDlg, HKEY hKey, TCHAR * szSubKey, BOOL SetDefault)
/* Associate the value with the item in the combobox */
SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pScheme);
/* Optionally, select the profile */
/* Optionally, select the profile */
if (SetDefault)
SendDlgItemMessage(hwndDlg, IDC_SOUND_SCHEME, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0);
@ -922,6 +939,7 @@ SoundsDlgProc(HWND hwndDlg,
{
OPENFILENAMEW ofn;
WCHAR filename[MAX_PATH];
WCHAR szFilter[256], szTitle[256];
LPWSTR pFileName;
LRESULT lResult;
@ -964,11 +982,12 @@ SoundsDlgProc(HWND hwndDlg,
ofn.hwndOwner = hwndDlg;
ofn.lpstrFile = filename;
ofn.lpstrFile[0] = L'\0';
ofn.nMaxFile = MAX_PATH;
ofn.lpstrFilter = L"Wave Files (*.wav)\0*.wav\0"; //FIXME non-nls
ofn.nMaxFile = _countof(filename);
LoadStringW(hApplet, IDS_WAVE_FILES_FILTER, szFilter, _countof(szFilter));
ofn.lpstrFilter = MakeFilter(szFilter);
ofn.nFilterIndex = 0;
ofn.lpstrFileTitle = L"Search for new sounds"; //FIXME non-nls
ofn.nMaxFileTitle = wcslen(ofn.lpstrFileTitle);
LoadStringW(hApplet, IDS_BROWSE_FOR_SOUND, szTitle, _countof(szTitle));
ofn.lpstrTitle = szTitle;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;