From: Jordi Mas (jmas@softcatala.org)
Date: Fri Sep 12 2003 - 14:55:06 EDT
Hello,
This is actually funny. We are not listing English US in the list of languages
that you can select in Options/Languages under win32, that has happening
because EN-US is an internal string set. This patch fixes this issue.
Requesting permission to commit.
Jordi,
--Jordi Mas i Hernāndez - Abiword developer - http://www.abisource.com jmas@softcatala.org - Softcatalā member - http://www.softcatala.org - Personal Homepage http://www.softcatala.org/~jmas
Index: src/wp/ap/win/ap_Win32App.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32App.cpp,v
retrieving revision 1.127
diff -u -r1.127 ap_Win32App.cpp
--- src/wp/ap/win/ap_Win32App.cpp 3 Jul 2003 15:34:04 -0000 1.127
+++ src/wp/ap/win/ap_Win32App.cpp 12 Sep 2003 18:59:28 -0000
@@ -1572,23 +1572,21 @@
const char * szDirectory = NULL;
const XML_Char * szStringSet = NULL;
UT_Vector* pVec = new UT_Vector();
- UT_Language lang;
- char* pStringSet = NULL;
- UT_String str;
-
-
- if (!((getPrefsValue(AP_PREF_KEY_StringSet,&szStringSet))
- && (szStringSet)
- && (*szStringSet)
- && (UT_stricmp(szStringSet,AP_PREF_DEFAULT_StringSet) != 0)))
- return pVec;
-
+ UT_Language lang;
+
for (UT_uint32 i=0; i< lang.getCount(); i++)
{
- const char *p = (const char*)lang.getNthLangCode(i);
- if (doesStringSetExist(p))
- pVec->addItem(strdup((char*)p));
- }
+ const char *pLangCode = (const char*)lang.getNthLangCode(i);
+ if (doesStringSetExist(pLangCode))
+ pVec->addItem(strdup((char*)pLangCode));
+ else
+ {
+ /*The en-US is the default internal string set and wont be found on disk but it should be also listed*/
+ if (strcmp(pLangCode, "en-US")==0)
+ pVec->addItem(strdup((char*)pLangCode));
+ }
+
+ }
return pVec;
}
This archive was generated by hypermail 2.1.4 : Fri Sep 12 2003 - 15:08:38 EDT