[MPlayer-cvslog] r34251 - in trunk: gui/win32/dialogs.c gui/win32/gui.c gui/win32/gui.h gui/win32/preferences.c gui/win32/widgetrender.c help/help_mp-de.h help/help_mp-en.h

ib subversion at mplayerhq.hu
Tue Oct 25 15:46:43 CEST 2011


Author: ib
Date: Tue Oct 25 15:46:43 2011
New Revision: 34251

Log:
Internationalize and localize the Win32 GUI.

Replace string constants by symbolic constants and
add new symbolic constants where necessary.

Modified:
   trunk/gui/win32/dialogs.c
   trunk/gui/win32/gui.c
   trunk/gui/win32/gui.h
   trunk/gui/win32/preferences.c
   trunk/gui/win32/widgetrender.c

Changes in other areas also in this revision:
Modified:
   trunk/help/help_mp-de.h
   trunk/help/help_mp-en.h

Modified: trunk/gui/win32/dialogs.c
==============================================================================
--- trunk/gui/win32/dialogs.c	Tue Oct 25 15:40:30 2011	(r34250)
+++ trunk/gui/win32/dialogs.c	Tue Oct 25 15:46:43 2011	(r34251)
@@ -110,7 +110,7 @@ int display_openfilewindow(gui_t *gui, i
                            "Avisynth Scripts (*.avs)\0*.avs\0"
                            "Audio Files (*.mp3;*.wav;*.ra)\0*.mp3;*.wav;*.ra\000";
     fileopen.nFilterIndex = 0;
-    fileopen.lpstrTitle = "Add file(s)...";
+    fileopen.lpstrTitle = acp(MSGTR_FileSelect);
     fileopen.Flags = OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST| OFN_LONGNAMES | OFN_EXPLORER| OFN_READONLY | OFN_HIDEREADONLY;
     fileopen.lpstrFile = filelist;
     fileopen.lpstrCustomFilter = NULL;
@@ -171,7 +171,7 @@ void display_opensubtitlewindow(gui_t *g
     subtitleopen.lpstrFilter = "All Files (*.*)\0*.*\0"
                                "Subtitle Files (*.srt;*.txt;*.vob)\0*.srt;*.txt;*.vob\0";
     subtitleopen.nFilterIndex = 0;
-    subtitleopen.lpstrTitle = "Add Subtitle...";
+    subtitleopen.lpstrTitle = acp(MSGTR_SubtitleSelect);
     subtitleopen.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_EXPLORER | OFN_READONLY | OFN_HIDEREADONLY;
     subtitleopen.lpstrFile = subtitlefile;
     subtitleopen.lpstrCustomFilter = NULL;
@@ -195,7 +195,7 @@ static void display_loadplaylistwindow(g
     playlistopen.lpstrFilter = "All Files (*.*)\0*.*\0"
                                "Playlist Files (*.m3u;*.pls;*.txt)\0*.m3u;*.pls;*.txt\0";
     playlistopen.nFilterIndex = 0;
-    playlistopen.lpstrTitle = "Load Playlist...";
+    playlistopen.lpstrTitle = acp(MSGTR_PlaylistSelect);
     playlistopen.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_EXPLORER | OFN_READONLY | OFN_HIDEREADONLY;
     playlistopen.lpstrFile = playlistfile;
     playlistopen.lpstrCustomFilter = NULL;
@@ -222,7 +222,7 @@ static void display_saveplaylistwindow(g
     playlistsave.hInstance = GetModuleHandle(NULL);
     playlistsave.lpstrFilter = "Playlist Files (*.pls)\0*.pls\0";
     playlistsave.nFilterIndex = 0;
-    playlistsave.lpstrTitle = "Save Playlist...";
+    playlistsave.lpstrTitle = acp(MSGTR_PlaylistSave);
     playlistsave.Flags = OFN_LONGNAMES | OFN_EXPLORER | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
     playlistsave.lpstrFile = playlistname;
     playlistsave.lpstrCustomFilter = NULL;
@@ -270,7 +270,7 @@ static LRESULT CALLBACK OpenUrlWndProc(H
     switch (iMsg)
     {
         case WM_CREATE:
-            wdg = CreateWindow("button", "Ok",
+            wdg = CreateWindow("button", acp(MSGTR_Ok),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                4, 43, 80, 25, hwnd,
                                (HMENU) ID_OK,
@@ -278,7 +278,7 @@ static LRESULT CALLBACK OpenUrlWndProc(H
                                NULL);
             SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            wdg = CreateWindow("button", "Cancel",
+            wdg = CreateWindow("button", acp(MSGTR_Cancel),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                90, 43, 80, 25, hwnd,
                                (HMENU) ID_CANCEL,
@@ -360,7 +360,7 @@ LRESULT CALLBACK SubUrlWndProc(HWND hwnd
             switch (LOWORD(wParam))
             {
                 case VK_RETURN:
-                    SendMessage(FindWindow(NULL, "MPlayer - Open URL..."), WM_COMMAND, (WPARAM) ID_OK, 0);
+                    SendMessage(FindWindow(NULL, acp(MSGTR_Network)), WM_COMMAND, (WPARAM) ID_OK, 0);
                     break;
             }
     }
@@ -375,7 +375,7 @@ void display_openurlwindow(gui_t *gui, i
     int x, y;
 
     if(add) addurl = 1;
-    if(FindWindow(NULL, "MPlayer - Open URL...")) return;
+    if(FindWindow(NULL, acp(MSGTR_Network))) return;
     wc.style         = CS_HREDRAW | CS_VREDRAW;
     wc.lpfnWndProc   = OpenUrlWndProc;
     wc.cbClsExtra    = 0;
@@ -384,13 +384,13 @@ void display_openurlwindow(gui_t *gui, i
     wc.hCursor       = LoadCursor(NULL,IDC_ARROW);
     wc.hIcon         = gui->icon;
     wc.hbrBackground = SOLID_GREY2;
-    wc.lpszClassName = "MPlayer - URL";
+    wc.lpszClassName = acp(MSGTR_Network);
     wc.lpszMenuName  = NULL;
     RegisterClass(&wc);
     x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (320 / 2);
     y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (100 / 2);
-    hWnd = CreateWindow("MPlayer - URL",
-                        "MPlayer - Open URL...",
+    hWnd = CreateWindow(acp(MSGTR_Network),
+                        acp(MSGTR_Network),
                         WS_POPUPWINDOW | WS_CAPTION,
                         x,
                         y,
@@ -408,13 +408,13 @@ void display_openurlwindow(gui_t *gui, i
 static void create_playlistmenu(gui_t *gui)
 {
     gui->playlistmenu = CreatePopupMenu();
-    AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDFILE, "Add File...");
-    AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDURL, "Add Url...");
+    AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDFILE, acp(MSGTR_PLAYLIST_AddFile));
+    AppendMenu(gui->playlistmenu, MF_STRING, ID_ADDURL, acp(MSGTR_PLAYLIST_AddURL));
     AppendMenu(gui->playlistmenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->playlistmenu, MF_STRING, ID_REMOVE, "Remove Selected");
-    AppendMenu(gui->playlistmenu, MF_STRING, ID_CLEAR, "Clear Playlist");
+    AppendMenu(gui->playlistmenu, MF_STRING, ID_REMOVE, acp(MSGTR_Remove));
+    AppendMenu(gui->playlistmenu, MF_STRING, ID_CLEAR, acp(MSGTR_Clear));
     AppendMenu(gui->playlistmenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->playlistmenu, MF_STRING, ID_CLOSE, "Close");
+    AppendMenu(gui->playlistmenu, MF_STRING, ID_CLOSE, acp(MSGTR_Close));
 }
 
 static void updatetracklist(HWND hwnd)
@@ -440,7 +440,7 @@ static LRESULT CALLBACK PlayListWndProc(
     {
         case WM_CREATE:
         {
-            wdg = CreateWindow("button", "Play",
+            wdg = CreateWindow("button", acp(MSGTR_MENU_Play),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                4, 10, 80, 25, hwnd,
                                (HMENU) ID_PLAY,
@@ -448,7 +448,7 @@ static LRESULT CALLBACK PlayListWndProc(
                                NULL);
             SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            wdg = CreateWindow ("button", "Up",
+            wdg = CreateWindow ("button", acp(MSGTR_Up),
                                 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                 4, 37, 80, 25, hwnd,
                                 (HMENU) ID_UP,
@@ -456,7 +456,7 @@ static LRESULT CALLBACK PlayListWndProc(
                                 NULL);
             SendMessage(wdg, WM_SETFONT,(WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            wdg = CreateWindow ("button", "Down",
+            wdg = CreateWindow ("button", acp(MSGTR_Down),
                                 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                 4, 64, 80, 25, hwnd,
                                 (HMENU) ID_DOWN,
@@ -464,7 +464,7 @@ static LRESULT CALLBACK PlayListWndProc(
                                 NULL);
             SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0);
 
-            wdg = CreateWindow ("button", "Remove",
+            wdg = CreateWindow ("button", acp(MSGTR_Remove),
                                 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                 4, 91, 80, 25, hwnd,
                                 (HMENU) ID_REMOVE,
@@ -472,7 +472,7 @@ static LRESULT CALLBACK PlayListWndProc(
                                 NULL);
             SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0);
 
-            wdg = CreateWindow ("button", "Load",
+            wdg = CreateWindow ("button", acp(MSGTR_Load),
                                 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                 4, 118, 80, 25, hwnd,
                                 (HMENU) ID_PLAYLISTLOAD,
@@ -480,7 +480,7 @@ static LRESULT CALLBACK PlayListWndProc(
                                 NULL);
             SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0);
 
-            wdg = CreateWindow ("button", "Save",
+            wdg = CreateWindow ("button", acp(MSGTR_Save),
                                 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                 4, 145, 80, 25, hwnd,
                                 (HMENU) ID_PLAYLISTSAVE,
@@ -488,7 +488,7 @@ static LRESULT CALLBACK PlayListWndProc(
                                 NULL);
             SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT),0);
 
-            wdg = CreateWindow ("button", "Close",
+            wdg = CreateWindow ("button", acp(MSGTR_Close),
                                 WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                 4, 193, 80, 25, hwnd,
                                 (HMENU) ID_CLOSE,
@@ -610,13 +610,13 @@ static LRESULT CALLBACK PlayListWndProc(
 
 void update_playlistwindow(void)
 {
-    HWND hWnd = FindWindow(NULL, "MPlayer Playlist");
+    HWND hWnd = FindWindow(NULL, acp(MSGTR_PlayList));
     if (hWnd) updatetracklist(hWnd);
 }
 
 void display_playlistwindow(gui_t *gui)
 {
-    HWND hWnd = FindWindow(NULL, "MPlayer Playlist");
+    HWND hWnd = FindWindow(NULL, acp(MSGTR_PlayList));
     HINSTANCE hInstance = GetModuleHandle(NULL);
     WNDCLASS wc;
     int x, y;
@@ -635,14 +635,14 @@ void display_playlistwindow(gui_t *gui)
     wc.hCursor       = LoadCursor(NULL,IDC_ARROW);
     wc.hIcon         = gui->icon;
     wc.hbrBackground = SOLID_GREY2;
-    wc.lpszClassName = "MPlayer - Playlist";
+    wc.lpszClassName = acp(MSGTR_PlayList);
     wc.lpszMenuName  = NULL;
     RegisterClass(&wc);
     create_playlistmenu(gui);
     x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (400 / 2);   /* Erik: center popup window on screen */
     y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (254 / 2);
-    hWnd = CreateWindow("MPlayer - Playlist",
-                        "MPlayer Playlist",
+    hWnd = CreateWindow(acp(MSGTR_PlayList),
+                        acp(MSGTR_PlayList),
                         WS_POPUPWINDOW | WS_CAPTION | WS_MINIMIZEBOX,
                         x,
                         y,
@@ -734,7 +734,7 @@ static LRESULT CALLBACK SkinBrowserWndPr
 
 void display_skinbrowser(gui_t* gui)
 {
-    HWND hWnd = FindWindow(NULL, "Skin Browser");
+    HWND hWnd = FindWindow(NULL, acp(MSGTR_SkinBrowser));
     HINSTANCE hInstance = GetModuleHandle(NULL);
     WNDCLASS wc;
     int x, y;
@@ -753,13 +753,13 @@ void display_skinbrowser(gui_t* gui)
     wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
     wc.hIcon         = gui->icon;
     wc.hbrBackground = SOLID_GREY2;
-    wc.lpszClassName = "Skin Browser";
+    wc.lpszClassName = acp(MSGTR_SkinBrowser);
     wc.lpszMenuName  = NULL;
     RegisterClass(&wc);
     x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (180 / 2);
     y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (102 / 2);
-    hWnd = CreateWindow("Skin Browser",
-                        "Skin Browser",
+    hWnd = CreateWindow(acp(MSGTR_SkinBrowser),
+                        acp(MSGTR_SkinBrowser),
                         WS_POPUPWINDOW |WS_CAPTION,
                         x,
                         y,
@@ -787,7 +787,7 @@ static LRESULT CALLBACK TitleChapterWndP
     switch (iMsg)
     {
         case WM_CREATE:
-            wdg = CreateWindow("button", "Ok",
+            wdg = CreateWindow("button", acp(MSGTR_Ok),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                4, 43, 80, 25, hwnd,
                                (HMENU) ID_OK,
@@ -795,7 +795,7 @@ static LRESULT CALLBACK TitleChapterWndP
                                NULL);
                               SendMessage(wdg, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            wdg = CreateWindow("button", "Cancel",
+            wdg = CreateWindow("button", acp(MSGTR_Cancel),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                90, 43, 80, 25, hwnd,
                                (HMENU) ID_CANCEL,
@@ -872,7 +872,7 @@ void display_chapterselwindow(gui_t *gui
     int x, y;
 
     if (guiInfo.StreamType != STREAMTYPE_DVD) return;
-    if (FindWindow(NULL, "Select Title/Chapter...")) return;
+    if (FindWindow(NULL, acp(MSGTR_SelectChapter))) return;
 
     wc.style         = CS_HREDRAW | CS_VREDRAW;
     wc.lpfnWndProc   = TitleChapterWndProc;
@@ -882,13 +882,13 @@ void display_chapterselwindow(gui_t *gui
     wc.hCursor       = LoadCursor(NULL,IDC_ARROW);
     wc.hIcon         = gui->icon;
     wc.hbrBackground = SOLID_GREY2;
-    wc.lpszClassName = "Select Title/Chapter...";
+    wc.lpszClassName = acp(MSGTR_SelectChapter);
     wc.lpszMenuName  = NULL;
     RegisterClass(&wc);
     x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (180 / 2);
     y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (100 / 2);
-    hWnd = CreateWindow("Select Title/Chapter...",
-                        "Select Title/Chapter...",
+    hWnd = CreateWindow(acp(MSGTR_SelectChapter),
+                        acp(MSGTR_SelectChapter),
                         WS_POPUPWINDOW | WS_CAPTION,
                         x,
                         y,
@@ -912,7 +912,7 @@ static LRESULT CALLBACK EqWndProc(HWND h
     {
         case WM_CREATE:
         {
-            btn = CreateWindow("button", "Reset",
+            btn = CreateWindow("button", acp(MSGTR_Clear),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                157, 143, 80, 25, hwnd,
                                (HMENU) ID_DEFAULTS,
@@ -920,7 +920,7 @@ static LRESULT CALLBACK EqWndProc(HWND h
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Close",
+            btn = CreateWindow("button", acp(MSGTR_Close),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                243, 143, 80, 25, hwnd,
                                (HMENU) ID_CLOSE,
@@ -928,7 +928,7 @@ static LRESULT CALLBACK EqWndProc(HWND h
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Brightness",
+            label = CreateWindow("static", acp(MSGTR_EQU_Brightness),
                                  WS_CHILD | WS_VISIBLE,
                                  12, 122, 70, 15, hwnd,
                                  NULL,
@@ -936,7 +936,7 @@ static LRESULT CALLBACK EqWndProc(HWND h
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Contrast",
+            label = CreateWindow("static", acp(MSGTR_EQU_Contrast),
                                  WS_CHILD | WS_VISIBLE,
                                  99, 122, 70, 15, hwnd,
                                  NULL,
@@ -944,14 +944,14 @@ static LRESULT CALLBACK EqWndProc(HWND h
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Hue",
+            label = CreateWindow("static", acp(MSGTR_EQU_Hue),
                                  WS_CHILD | WS_VISIBLE,
                                  191, 122, 70, 15, hwnd,
                                  NULL,
                                  ((LPCREATESTRUCT) lParam) -> hInstance, NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Saturation",
+            label = CreateWindow("static", acp(MSGTR_EQU_Saturation),
                                  WS_CHILD | WS_VISIBLE,
                                  260, 122, 70, 15, hwnd,
                                  NULL,
@@ -1087,7 +1087,7 @@ void display_eqwindow(gui_t *gui)
     int x, y;
 
     if(!guiInfo.sh_video) return;
-    if(FindWindow(NULL, "MPlayer - Equalizer")) return;
+    if(FindWindow(NULL, acp(MSGTR_Equalizer))) return;
     wc.style         = CS_HREDRAW | CS_VREDRAW;
     wc.lpfnWndProc   = EqWndProc;
     wc.cbClsExtra    = 0;
@@ -1096,13 +1096,13 @@ void display_eqwindow(gui_t *gui)
     wc.hCursor       = LoadCursor(NULL,IDC_ARROW);
     wc.hIcon         = gui->icon;
     wc.hbrBackground = SOLID_GREY2;
-    wc.lpszClassName = "MPlayer - Equalizer";
+    wc.lpszClassName = acp(MSGTR_Equalizer);
     wc.lpszMenuName  = NULL;
     RegisterClass(&wc);
     x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (332 / 2);
     y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (200 / 2);
-    hWnd = CreateWindow("MPlayer - Equalizer",
-                        "MPlayer - Equalizer",
+    hWnd = CreateWindow(acp(MSGTR_Equalizer),
+                        acp(MSGTR_Equalizer),
                         WS_POPUPWINDOW | WS_CAPTION,
                         x,
                         y,

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	Tue Oct 25 15:40:30 2011	(r34250)
+++ trunk/gui/win32/gui.c	Tue Oct 25 15:46:43 2011	(r34251)
@@ -69,6 +69,53 @@ play_tree_t *playtree = NULL;
 static HBRUSH    colorbrush = NULL;           //Handle to colorkey brush
 static COLORREF windowcolor = RGB(255,0,255); //Windowcolor == colorkey
 
+/**
+ * @brief Convert an UTF-8 encoded string into ANSI codepage encoding.
+ *
+ * @param utf8 UTF-8 encoded string
+ *
+ * @return string containing ANSI codepage encoding of @a utf8 (or, in case
+ *         of error, a string containing the question mark character)
+ */
+LPSTR acp (LPCSTR utf8)
+{
+    static LPSTR acp_str = NULL;
+    int chars;
+    LPWSTR uc_str;
+
+    chars = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
+
+    if (chars)
+    {
+        uc_str = malloc(sizeof(*uc_str) * (chars + 1));
+
+        if (uc_str)
+        {
+            MultiByteToWideChar(CP_UTF8, 0, utf8, -1, uc_str, chars);
+
+            chars = WideCharToMultiByte(CP_ACP, 0, uc_str, -1, NULL, 0, NULL, 0);
+
+            if (chars)
+            {
+                free(acp_str);
+                acp_str = malloc(sizeof(*acp_str) * (chars + 1));
+
+                if (acp_str)
+                {
+                    WideCharToMultiByte(CP_ACP, 0, uc_str, -1, acp_str, chars, NULL, 0);
+                    free(uc_str);
+
+                    return acp_str;
+                }
+            }
+
+            free(uc_str);
+        }
+    }
+
+    return "?";
+}
+
 static void console_toggle(void)
 {
     if (console_state)
@@ -133,7 +180,7 @@ static void display_about_box(HWND hWnd)
 {
     char about_msg[512];
     snprintf(about_msg, sizeof(about_msg), MP_TITLE "\n" COPYRIGHT, "MPlayer");
-    MessageBox(hWnd, about_msg, "About", MB_OK);
+    MessageBox(hWnd, about_msg, acp(MSGTR_About), MB_OK);
 }
 
 static image *get_drawground(HWND hwnd)
@@ -376,7 +423,7 @@ static LRESULT CALLBACK SubProc(HWND hWn
                     BROWSEINFO bi;
                     LPITEMIDLIST pidl;
                     memset(&bi, 0, sizeof(BROWSEINFO));
-                    bi.lpszTitle = "Choose a Directory...";
+                    bi.lpszTitle = acp(MSGTR_DirectorySelect);
                     pidl = SHBrowseForFolder(&bi);
                     if (SHGetPathFromIDList(pidl, path))
                     {
@@ -927,7 +974,7 @@ static LRESULT CALLBACK EventProc(HWND h
                     BROWSEINFO bi;
                     LPITEMIDLIST pidl;
                     memset(&bi, 0, sizeof(BROWSEINFO));
-                    bi.lpszTitle = "Choose a Directory...";
+                    bi.lpszTitle = acp(MSGTR_DirectorySelect);
                     pidl = SHBrowseForFolder(&bi);
                     if (SHGetPathFromIDList(pidl, path))
                     {
@@ -1144,51 +1191,51 @@ static void create_menu(gui_t *gui)
     gui->diskmenu = CreatePopupMenu();
     gui->menu=CreatePopupMenu();
     gui->trayplaymenu = CreatePopupMenu();
-    AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, "Open...");
-    AppendMenu(gui->trayplaymenu, MF_STRING, IDFILE_OPEN, "File...");
-    AppendMenu(gui->trayplaymenu, MF_STRING, IDURL_OPEN, "Url...");
-    AppendMenu(gui->trayplaymenu, MF_STRING, IDDIR_OPEN, "Directory...");
+    AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
+    AppendMenu(gui->trayplaymenu, MF_STRING, IDFILE_OPEN, acp(MSGTR_MENU_PlayFile));
+    AppendMenu(gui->trayplaymenu, MF_STRING, IDURL_OPEN, acp(MSGTR_MENU_PlayURL));
+    AppendMenu(gui->trayplaymenu, MF_STRING, IDDIR_OPEN, acp(MSGTR_MENU_PlayDirectory));
     AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->diskmenu, "Play &CD/DVD/VCD/SVCD");
+    AppendMenu(gui->menu, MF_STRING | MF_POPUP, (UINT_PTR) gui->diskmenu, acp(MSGTR_MENU_PlayDisc));
     AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->menu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle");
-    AppendMenu(gui->menu, MF_STRING, ID_SKINBROWSER, "Skin Browser");
+    AppendMenu(gui->menu, MF_STRING, IDSUBTITLE_OPEN, acp(MSGTR_MENU_LoadSubtitle));
+    AppendMenu(gui->menu, MF_STRING, ID_SKINBROWSER, acp(MSGTR_MENU_SkinBrowser));
     AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->menu, MF_STRING, ID_PREFS, "Preferences");
-    AppendMenu(gui->menu, MF_STRING, ID_CONSOLE, "Debug Console");
-    AppendMenu(gui->menu, MF_STRING, ID_ONLINEHELP, "Online Help");
-    AppendMenu(gui->menu, MF_STRING, IDHELP_ABOUT, "About");
+    AppendMenu(gui->menu, MF_STRING, ID_PREFS, acp(MSGTR_MENU_Preferences));
+    AppendMenu(gui->menu, MF_STRING, ID_CONSOLE, acp(MSGTR_MENU_DebugConsole));
+    AppendMenu(gui->menu, MF_STRING, ID_ONLINEHELP, acp(MSGTR_MENU_OnlineHelp));
+    AppendMenu(gui->menu, MF_STRING, IDHELP_ABOUT, acp(MSGTR_MENU_AboutMPlayer));
     AppendMenu(gui->menu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->menu, MF_STRING, IDEXIT, "&Exit");
+    AppendMenu(gui->menu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
 }
 
 static void create_traymenu(gui_t *gui)
 {
     gui->traymenu = CreatePopupMenu();
     gui->trayplaybackmenu = CreatePopupMenu();
-    AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, "Open...");
+    AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
     AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaybackmenu, "Playback");
-    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKB, "Seek Backwards");
-    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PTRACK, "Previous Track");
-    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PLAY, "Play/Pause");
-    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_STOP, "Stop");
-    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_NTRACK, "Next Track");
-    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKF, "Seek Forwards");
+    AppendMenu(gui->traymenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaybackmenu, acp(MSGTR_MENU_Playing));
+    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack));
+    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream));
+    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause));
+    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop));
+    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream));
+    AppendMenu(gui->trayplaybackmenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw));
     AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->traymenu, MF_STRING, ID_MUTE, "Toggle Mute");
+    AppendMenu(gui->traymenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute));
     AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->traymenu, MF_STRING, IDSUBTITLE_OPEN, "Open Subtitle");
-    AppendMenu(gui->traymenu, MF_STRING, ID_PLAYLIST, "Playlist");
+    AppendMenu(gui->traymenu, MF_STRING, IDSUBTITLE_OPEN, acp(MSGTR_MENU_LoadSubtitle));
+    AppendMenu(gui->traymenu, MF_STRING, ID_PLAYLIST, acp(MSGTR_MENU_PlayList));
     AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->traymenu, MF_STRING, ID_SHOWHIDE, "Show/Hide");
+    AppendMenu(gui->traymenu, MF_STRING, ID_SHOWHIDE, acp(MSGTR_MENU_ShowHide));
     AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->traymenu, MF_STRING, ID_PREFS, "Preferences");
-    AppendMenu(gui->traymenu, MF_STRING, ID_CONSOLE, "Debug Console");
-    AppendMenu(gui->traymenu, MF_STRING, ID_ONLINEHELP, "Online Help");
-    AppendMenu(gui->traymenu, MF_STRING, IDHELP_ABOUT, "About");
+    AppendMenu(gui->traymenu, MF_STRING, ID_PREFS, acp(MSGTR_MENU_Preferences));
+    AppendMenu(gui->traymenu, MF_STRING, ID_CONSOLE, acp(MSGTR_MENU_DebugConsole));
+    AppendMenu(gui->traymenu, MF_STRING, ID_ONLINEHELP, acp(MSGTR_MENU_OnlineHelp));
+    AppendMenu(gui->traymenu, MF_STRING, IDHELP_ABOUT, acp(MSGTR_MENU_AboutMPlayer));
     AppendMenu(gui->traymenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->traymenu, MF_STRING, IDEXIT, "&Exit");
+    AppendMenu(gui->traymenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
 }
 
 static void create_submenu(gui_t *gui)
@@ -1197,33 +1244,33 @@ static void create_submenu(gui_t *gui)
     gui->dvdmenu = CreatePopupMenu();
     gui->aspectmenu = CreatePopupMenu();
     gui->subtitlemenu = CreatePopupMenu();
-    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, "Open...");
+    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->trayplaymenu, acp(MSGTR_MENU_Open));
     AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, "Seek Backwards");
-    AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, "Previous Track");
-    AppendMenu(gui->submenu, MF_STRING, ID_PLAY, "Play/Pause");
-    AppendMenu(gui->submenu, MF_STRING, ID_STOP, "Stop");
-    AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, "Next Track");
-    AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, "Seek Forwards");
+    AppendMenu(gui->submenu, MF_STRING, ID_SEEKB, acp(MSGTR_MENU_SeekBack));
+    AppendMenu(gui->submenu, MF_STRING, ID_PTRACK, acp(MSGTR_MENU_PrevStream));
+    AppendMenu(gui->submenu, MF_STRING, ID_PLAY, acp(MSGTR_MENU_Play "/" MSGTR_MENU_Pause));
+    AppendMenu(gui->submenu, MF_STRING, ID_STOP, acp(MSGTR_MENU_Stop));
+    AppendMenu(gui->submenu, MF_STRING, ID_NTRACK, acp(MSGTR_MENU_NextStream));
+    AppendMenu(gui->submenu, MF_STRING, ID_SEEKF, acp(MSGTR_MENU_SeekForw));
     AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, "Toggle Fullscreen");
-    AppendMenu(gui->submenu, MF_STRING, ID_MUTE, "Toggle Mute");
+    AppendMenu(gui->submenu, MF_STRING, ID_FULLSCREEN, acp(MSGTR_MENU_FullScreen));
+    AppendMenu(gui->submenu, MF_STRING, ID_MUTE, acp(MSGTR_MENU_Mute));
     AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->aspectmenu, "Aspect Ratio");
-    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->subtitlemenu, "Subtitle Options");
-    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->dvdmenu, "DVD Options");
+    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->aspectmenu, acp(MSGTR_MENU_AspectRatio));
+    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->subtitlemenu, acp(MSGTR_MENU_Subtitles));
+    AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT_PTR) gui->dvdmenu, acp(MSGTR_MENU_DVD));
 #ifdef CONFIG_DVDREAD
-    AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, "Select Title/Chapter...");
+    AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, acp(MSGTR_SelectChapter));
 #endif
-    AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, "Subtitle Visibility On/Off");
-    AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_CYCLE, "Cycle Subtitle Languages");
-    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT1, "Set 16:9");
-    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT2, "Set 4:3");
-    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "Set 2.35");
+    AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, acp(MSGTR_MENU_SubtitlesOnOff));
+    AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_CYCLE, acp(MSGTR_MENU_SubtitleLanguages));
+    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT1, "16:9");
+    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT2, "4:3");
+    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT3, "2.35");
     AppendMenu(gui->aspectmenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, "Original Aspect");
+    AppendMenu(gui->aspectmenu, MF_STRING, ID_ASPECT4, acp(MSGTR_MENU_Original));
     AppendMenu(gui->submenu, MF_SEPARATOR, 0, 0);
-    AppendMenu(gui->submenu, MF_STRING, IDEXIT, "&Exit");
+    AppendMenu(gui->submenu, MF_STRING, IDEXIT, acp(MSGTR_MENU_Exit));
 }
 
 static void maketransparent(HWND hwnd, COLORREF crTransparent)

Modified: trunk/gui/win32/gui.h
==============================================================================
--- trunk/gui/win32/gui.h	Tue Oct 25 15:40:30 2011	(r34250)
+++ trunk/gui/win32/gui.h	Tue Oct 25 15:46:43 2011	(r34251)
@@ -104,6 +104,7 @@ int create_window(gui_t *gui, char *skin
 int create_subwindow(gui_t *gui);
 int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear);
 void capitalize(char *filename);
+LPSTR acp(LPCSTR utf8);
 
 void renderinfobox(skin_t *skin, window_priv_t *priv);
 void renderwidget(skin_t *skin, image *dest, widget *item, int state);

Modified: trunk/gui/win32/preferences.c
==============================================================================
--- trunk/gui/win32/preferences.c	Tue Oct 25 15:40:30 2011	(r34250)
+++ trunk/gui/win32/preferences.c	Tue Oct 25 15:46:43 2011	(r34251)
@@ -76,56 +76,56 @@ static LRESULT CALLBACK PrefsWndProc(HWN
         case WM_CREATE:
         {
             /* video and audio drivers */
-            label = CreateWindow("static", "Video Driver:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Video),
                                  WS_CHILD | WS_VISIBLE,
                                  10, 13, 70, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Audio Driver:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Audio),
                                  WS_CHILD | WS_VISIBLE,
                                  190, 13, 70, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Extra stereo coefficient:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Coefficient),
                                  WS_CHILD | WS_VISIBLE,
                                  10, 148, 115, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Audio delay:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_AudioDelay),
                                  WS_CHILD | WS_VISIBLE,
                                  36, 187, 115, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "OSD level:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_FRAME_OSD_Level),
                                  WS_CHILD | WS_VISIBLE,
                                  10, 286, 115, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "DVD device:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_DVDDevice),
                                  WS_CHILD | WS_VISIBLE,
                                  80, 385, 115, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "CD device:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_CDROMDevice),
                                  WS_CHILD | WS_VISIBLE,
                                  202, 385, 115, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
                                  NULL);
             SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            label = CreateWindow("static", "Priority:",
+            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Priority),
                                  WS_CHILD | WS_VISIBLE,
                                  217, 286, 115, 15, hwnd,
                                  NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
@@ -163,7 +163,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                 NULL);
 
             /* checkboxes */
-            btn = CreateWindow("button", "Enable double buffering",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DoubleBuffer),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                25, 35, 150, 25,
                                hwnd, (HMENU) ID_DOUBLE,
@@ -171,7 +171,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Enable direct rendering",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DirectRender),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                25, 57, 150, 25,
                                hwnd, (HMENU) ID_DIRECT,
@@ -179,7 +179,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Enable framedropping",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_FrameDrop),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                25, 79, 150, 25,
                                hwnd, (HMENU) ID_FRAMEDROP,
@@ -187,7 +187,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Quit after playing",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NoIdle),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                25, 101, 150, 25,
                                hwnd, (HMENU) ID_IDLE,
@@ -195,7 +195,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Normalize sound",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NormalizeSound),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                205, 35, 150, 25,
                                hwnd, (HMENU) ID_NORMALIZE,
@@ -203,7 +203,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Enable software mixer",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_SoftwareMixer),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                205, 57, 150, 25,
                                hwnd, (HMENU) ID_SOFTMIX,
@@ -211,7 +211,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Enable extra stereo",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_ExtraStereo),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                205, 79, 150, 25,
                                hwnd, (HMENU) ID_EXTRASTEREO,
@@ -219,7 +219,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Enable cache",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_Cache),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                10, 222, 90, 25,
                                hwnd, (HMENU) ID_CACHE,
@@ -227,7 +227,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Enable autosync",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_AutoSync),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                192, 222, 100, 25, hwnd,
                                (HMENU) ID_AUTOSYNC,
@@ -235,7 +235,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Display videos in the sub window (DirectX only)",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_VideoInSubwin),
                                WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
                                85, 249, 250, 25,
                                hwnd, (HMENU) ID_SUBWINDOW,
@@ -244,7 +244,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
             /* osd level */
-            btn = CreateWindow("button", "Subtitles only",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL0),
                                WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
                                95, 282, 100, 25, hwnd,
                                (HMENU) ID_NONE,
@@ -252,7 +252,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Volume and seek",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL1),
                                WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
                                95, 302, 180, 25, hwnd,
                                (HMENU) ID_OSD1,
@@ -260,7 +260,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Volume, seek, timer and percentage",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL2),
                                WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
                                95, 322, 250, 25, hwnd,
                                (HMENU) ID_OSD2,
@@ -268,7 +268,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Volume, seek, timer, percentage and total time",
+            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL3),
                                WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
                                95, 342, 250, 25, hwnd,
                                (HMENU) ID_OSD3,
@@ -276,7 +276,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Apply",
+            btn = CreateWindow("button", acp(MSGTR_Ok),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                199, 417, 80, 25, hwnd,
                                (HMENU) ID_APPLY,
@@ -284,7 +284,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Cancel",
+            btn = CreateWindow("button", acp(MSGTR_Cancel),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                285, 417, 80, 25, hwnd,
                                (HMENU) ID_CANCEL,
@@ -292,7 +292,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                                NULL);
             SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
-            btn = CreateWindow("button", "Defaults",
+            btn = CreateWindow("button", acp(MSGTR_Default),
                                WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
                                4, 417, 80, 25, hwnd,
                                (HMENU) ID_DEFAULTS,
@@ -403,11 +403,11 @@ static LRESULT CALLBACK PrefsWndProc(HWN
             SendMessage(ao_driver, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
             /* priority list, i'm leaving out realtime for safety's sake */
-            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "low");
-            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "belownormal");
-            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "normal");
-            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "abovenormal");
-            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "high");
+            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityLow));
+            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalBelow));
+            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormal));
+            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalAbove));
+            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityHigh));
             SendMessage(prio, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
             /* set our preferences on what we already have */
@@ -683,7 +683,7 @@ static LRESULT CALLBACK PrefsWndProc(HWN
                     SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)cdromdevice);
                     cdrom_device = strdup(cdromdevice);
 
-                    MessageBox(hwnd, "You must restart MPlayer for the changes to take effect.", "MPlayer - Info:", MB_OK);
+                    MessageBox(hwnd, acp(MSGTR_PREFERENCES_Message), acp(MSGTR_MSGBOX_LABEL_Warning), MB_OK);
                     DestroyWindow(hwnd);
                     break;
                 }
@@ -700,7 +700,7 @@ void display_prefswindow(gui_t *gui)
     HINSTANCE hInstance = GetModuleHandle(NULL);
     WNDCLASS wc;
     int x, y;
-    if(FindWindow(NULL, "MPlayer - Preferences")) return;
+    if(FindWindow(NULL, acp(MSGTR_Preferences))) return;
     wc.style         = CS_HREDRAW | CS_VREDRAW;
     wc.lpfnWndProc   = PrefsWndProc;
     wc.cbClsExtra    = 0;
@@ -709,13 +709,13 @@ void display_prefswindow(gui_t *gui)
     wc.hCursor       = LoadCursor(NULL,IDC_ARROW);
     wc.hIcon         = gui->icon;
     wc.hbrBackground = SOLID_GREY;
-    wc.lpszClassName = "MPlayer - Preferences";
+    wc.lpszClassName = acp(MSGTR_Preferences);
     wc.lpszMenuName  = NULL;
     RegisterClass(&wc);
     x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (375 / 2);
     y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (474 / 2);
-    hWnd = CreateWindow("MPlayer - Preferences",
-                        "MPlayer - Preferences",
+    hWnd = CreateWindow(acp(MSGTR_Preferences),
+                        acp(MSGTR_Preferences),
                         WS_POPUPWINDOW | WS_CAPTION,
                         x,
                         y,

Modified: trunk/gui/win32/widgetrender.c
==============================================================================
--- trunk/gui/win32/widgetrender.c	Tue Oct 25 15:40:30 2011	(r34250)
+++ trunk/gui/win32/widgetrender.c	Tue Oct 25 15:46:43 2011	(r34251)
@@ -29,6 +29,7 @@
 #include "gui/interface.h"
 #include "gui.h"
 
+#include "help_mp.h"
 #include "libavutil/avstring.h"
 
 #define MAX_LABELSIZE 250
@@ -138,7 +139,7 @@ static char *TranslateFilename (int c, c
                 else if (len > 4 && tmp[len - 4] == '.') tmp[len - 4] = 0;
                 else if (len > 5 && tmp[len - 5] == '.') tmp[len - 5] = 0;
             }
-            else av_strlcpy(tmp, "No file loaded.", tmplen);
+            else av_strlcpy(tmp, MSGTR_NoFileLoaded, tmplen);
             break;
 
         case STREAMTYPE_STREAM:
@@ -147,13 +148,13 @@ static char *TranslateFilename (int c, c
 
 #ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
-            if (guiInfo.Chapter) snprintf(tmp, tmplen, "Chapter %d", guiInfo.Chapter);
-            else av_strlcat(tmp, "No chapter", tmplen);
+            if (guiInfo.Chapter) snprintf(tmp, tmplen, MSGTR_Chapter, guiInfo.Chapter);
+            else av_strlcat(tmp, MSGTR_NoChapter, tmplen);
             break;
 #endif
 
         default:
-            av_strlcpy(tmp, "No media opened.", tmplen);
+            av_strlcpy(tmp, MSGTR_NoMediaOpened, tmplen);
             break;
     }
 
@@ -205,7 +206,7 @@ static char *generatetextfromlabel(widge
     stringreplace(text, "$b", "%3.2f", guiInfo.Balance);
     stringreplace(text, "$B", "%3.1f", guiInfo.Balance);
     stringreplace(text, "$t", "%.2i", guiInfo.Track);
-    stringreplace(text, "$o", "%s", TranslateFilename(0, tmp, sizeof(tmp)));
+    stringreplace(text, "$o", "%s", acp(TranslateFilename(0, tmp, sizeof(tmp))));
     stringreplace(text, "$x", "%i", guiInfo.VideoWidth);
     stringreplace(text, "$y", "%i", guiInfo.VideoHeight);
     stringreplace(text, "$C", "%s", guiInfo.sh_video ? codecname : "");
@@ -230,8 +231,8 @@ static char *generatetextfromlabel(widge
 #endif
     else stringreplace(text, "$T", "u");
 
-    stringreplace(text, "$f", TranslateFilename(1, tmp, sizeof(tmp)));
-    stringreplace(text, "$F", TranslateFilename(2, tmp, sizeof(tmp)));
+    stringreplace(text, "$f", acp(TranslateFilename(1, tmp, sizeof(tmp))));
+    stringreplace(text, "$F", acp(TranslateFilename(2, tmp, sizeof(tmp))));
 
     return text;
 }


More information about the MPlayer-cvslog mailing list