From f06c9a195331e01e6085d2f4ddd3950920bb5629 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 15 Apr 2003 22:04:49 +0000 Subject: [PATCH] - Fixed 2 syntax errors in plmenu.zh_TW.Big5 (Mike FABIAN ) - Some .po file fixes (Mike FABIAN ) - Fixed the problem with the root menu code changing the locale setting as a side effect of loading a localized menu - Fixed e memory leak in the code that reads a localized root menu --- ChangeLog | 5 +++++ WPrefs.app/po/hr.po | 14 ++++++++++---- WindowMaker/plmenu.zh_TW.Big5 | 4 ++-- po/hr.po | 16 ++++++++++------ po/no.po | 3 +-- po/pl.po | 7 +++---- src/rootmenu.c | 13 +++++++++---- 7 files changed, 40 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 195bdf8a..c0a6122e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -73,6 +73,11 @@ Changes since version 0.80.2: - Updated Bulgarian translations (Anton Zinoviev ) - Fixed a bug in WINGs' hashtable which free'd the wrong memory in the WMResetHashTable() function (possible source of SIGSEGVs) +- Fixed 2 syntax errors in plmenu.zh_TW.Big5 (Mike FABIAN ) +- Some .po file fixes (Mike FABIAN ) +- Fixed the problem with the root menu code changing the locale setting as + a side effect of loading a localized menu +- Fixed e memory leak in the code that reads a localized root menu Changes since version 0.80.1: diff --git a/WPrefs.app/po/hr.po b/WPrefs.app/po/hr.po index 3dccf86b..972f84ac 100644 --- a/WPrefs.app/po/hr.po +++ b/WPrefs.app/po/hr.po @@ -1,11 +1,17 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# msgid "" msgstr "" -"Date: 1998-08-24 14:36:41-0300\n" -"From: Toni Biliæ tbilic@oliver.efos.hr \n" +"Project-Id-Version: WindowMaker 0.80.2\n" +"POT-Creation-Date: 1998-08-24 14:36:41-0300\n" +"PO-Revision-Date: 1998-08-24 14:36:41-0300\n" +"Last-Translator: Toni Biliæ tbilic@oliver.efos.hr \n" "Language-Team: Croatian \n" +"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-2\n" -"Xgettext-Options: --default-domain=WPrefs --add-comments --keyword=_\n" -"Files: ../../WPrefs/Configurations.c ../../WPrefs/Expert.c ../../WPrefs/Focus.c ../../WPrefs/KeyboardSettings.c ../../WPrefs/KeyboardShortcuts.c ../../WPrefs/Menu.c ../../WPrefs/MenuGuru.c ../../WPrefs/MenuPreferences.c ../../WPrefs/MouseSettings.c ../../WPrefs/Paths.c ../../WPrefs/Preferences.c ../../WPrefs/Text.c ../../WPrefs/TextureAndColor.c ../../WPrefs/WPrefs.c ../../WPrefs/WindowHandling.c ../../WPrefs/Workspace.c ../../WPrefs/main.c ../../WPrefs/xmodifier.c\n" +"Content-Transfer-Encoding: 8bit\n" #: ../../WPrefs/Configurations.c:142 ../../WPrefs/Configurations.c:148 ../../WPrefs/MouseSettings.c:510 ../../WPrefs/WindowHandling.c:270 ../../WPrefs/WindowHandling.c:282 ../../WPrefs/Workspace.c:71 ../../WPrefs/Workspace.c:77 msgid "could not load icon %s" diff --git a/WindowMaker/plmenu.zh_TW.Big5 b/WindowMaker/plmenu.zh_TW.Big5 index 56a68d9f..674ce7fe 100644 --- a/WindowMaker/plmenu.zh_TW.Big5 +++ b/WindowMaker/plmenu.zh_TW.Big5 @@ -91,7 +91,7 @@ ("¹Ï¤ù", OPEN_MENU, "-noext #wmdatadir#/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds WITH wmsetbg -u -t") ), ("Àx¦s¥DÃD", SHEXEC, "getstyle -t $HOME/GNUstep/Library/WindowMaker/Themes/%a(¥DÃD¦WºÙ)"), - ("Àx¦s¹Ï¥Ü¶°", SHEXEC, "geticonset $HOME/GNUstep/Library/WindowMaker/IconSets/%a(¹Ï¥Ü¶°¦WºÙ)") + ("Àx¦s¹Ï¥Ü¶°", SHEXEC, "geticonset $HOME/GNUstep/Library/WindowMaker/IconSets/%a(¹Ï¥Ü¶°¦WºÙ)"), ("°¾¦n³]©w¤½¥Îµ{¦¡", EXEC, "/usr/local/GNUstep/Apps/WPrefs.app/WPrefs") ), ("Â÷¶}", @@ -99,6 +99,6 @@ ("±Ò°Ê BlackBox", RESTART, blackbox), ("±Ò°Ê kwm", RESTART, kwm), ("±Ò°Ê IceWM", RESTART, icewm), - ("Â÷¶}...", EXIT), + ("Â÷¶}...", EXIT) ) ) diff --git a/po/hr.po b/po/hr.po index a8faf568..834bee58 100644 --- a/po/hr.po +++ b/po/hr.po @@ -1,12 +1,16 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# msgid "" msgstr "" -"Date: 1998-08-18 16:28:19+0200\n" -"From: Toni Biliæ \n" -"Language-Team: Croatian \n" +"Project-Id-Version: 0.80.2\n" +"PO-Revision-Date: 1998-08-18 16:28:19+0200\n" +"Last-Translator: Toni Biliæ \n" +"Language-Team: Croatian\n" "MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8-bit\n" -"Content-Type: text/plain; charset=iso-8859-2\n" - +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" #: ../src/appicon.c:509 ../src/dialog.c:215 ../src/dialog.c:271 ../src/dock.c:2953 ../src/dockedapp.c:206 ../src/winspector.c:279 ../src/winspector.c:295 msgid "Error" diff --git a/po/no.po b/po/no.po index cb1cab6f..4876d439 100644 --- a/po/no.po +++ b/po/no.po @@ -2,10 +2,9 @@ # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: WindowMaker 0.80.2\n" "POT-Creation-Date: 1998-05-23 12:54+0200\n" "PO-Revision-Date: 1998-05-23 H12:54+0200\n" "Last-Translator: Marcus Ramberg \n" diff --git a/po/pl.po b/po/pl.po index f102b923..f6f0d1c6 100644 --- a/po/pl.po +++ b/po/pl.po @@ -5,12 +5,11 @@ # Copyright (C) 1999 Free Software Foundation, Inc. # Piotr Dembiñski , 1998. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: WindowMaker 0.80.2\n" "POT-Creation-Date: 1999-01-24 14:05+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2003-04-15 20:21+0200\n" "Last-Translator: Piotr Dembiñski \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" @@ -521,7 +520,7 @@ msgstr "nie mo #: ../src/main.c:297 #, c-format msgid "%s:could not execute initialization script" -msgstr "#s:nie mo¿na wykonaæ skryptu inicjalizacji" +msgstr "%s:nie mo¿na wykonaæ skryptu inicjalizacji" #: ../src/main.c:314 #, c-format diff --git a/src/rootmenu.c b/src/rootmenu.c index ca8d2fb4..1f20b4df 100644 --- a/src/rootmenu.c +++ b/src/rootmenu.c @@ -362,8 +362,7 @@ legalPanelCommand(WMenu *menu, WMenuEntry *entry) static char* getLocalizedMenuFile(char *menu) { - char *buffer; - char *ptr; + char *buffer, *ptr, *locale; int len; if (!Locale) @@ -377,8 +376,12 @@ getLocalizedMenuFile(char *menu) if (access(buffer, F_OK)==0) { return buffer; } + + /* position of locale in our buffer */ + locale = buffer + strlen(menu) + 1; + /* check if it is in the form aa_bb.encoding and check for aa_bb */ - ptr = strchr(Locale, '.'); + ptr = strchr(locale, '.'); if (ptr) { *ptr = 0; if (access(buffer, F_OK)==0) { @@ -386,7 +389,7 @@ getLocalizedMenuFile(char *menu) } } /* now check for aa */ - ptr = strchr(buffer, '_'); + ptr = strchr(locale, '_'); if (ptr) { *ptr = 0; if (access(buffer, F_OK)==0) { @@ -394,6 +397,8 @@ getLocalizedMenuFile(char *menu) } } + wfree(buffer); + return NULL; } -- 2.11.4.GIT