diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-10 16:31:37 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-10 16:31:37 +0300 |
commit | 6b11c1df57c7e293df98fb4af0f8a7ed05cb850a (patch) | |
tree | cedc7aa3bc96a1e4e3f551860b18a55763d42187 /plugins/UserInfoEx | |
parent | 9446fe458391fccdc34c1a962254847b661bd04d (diff) |
fixes #3906 (UInfoEx: не переводятся интересы в профиле контакта)
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r-- | plugins/UserInfoEx/src/psp_profile.cpp | 6 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_constants.cpp | 424 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_constants.h | 4 |
3 files changed, 211 insertions, 223 deletions
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index 2fe42aeab6..25e8d53a25 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -889,7 +889,7 @@ class PSPContactProfileDlg : public PSPBaseDlg if (dbvVal.type != DBVT_WCHAR)
continue;
mir_snprintf(pszSetting, szCatFormat, i);
- DB::Setting::GetAString(hContact, pszModule, pszSetting, &dbvCat);
+ DB::Setting::GetWString(hContact, pszModule, pszSetting, &dbvCat);
// create the item object
LPLCITEM pItem = (LPLCITEM)mir_alloc(sizeof(LCITEM));
@@ -919,8 +919,8 @@ class PSPContactProfileDlg : public PSPBaseDlg if (dbvCat.dVal != (uint32_t)idList[j].nID)
continue;
break;
- case DBVT_ASCIIZ:
- if (mir_strcmp(dbvCat.pszVal, idList[j].pszText))
+ case DBVT_WCHAR:
+ if (mir_wstrcmp(dbvCat.pwszVal, idList[j].pszText))
continue;
break;
}
diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 7a2caa562d..02136c9fde 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -22,223 +22,223 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
static IDSTRLIST TmplLanguages[] = {
- { 0, LPGEN("Unspecified"), nullptr},
- {55, LPGEN("Afrikaans"), nullptr},
- {58, LPGEN("Albanian"), nullptr},
- { 1, LPGEN("Arabic"), nullptr},
- {59, LPGEN("Armenian"), nullptr},
- {68, LPGEN("Azerbaijani"), nullptr},
- {72, LPGEN("Belorussian"), nullptr},
- { 2, LPGEN("Bhojpuri"), nullptr},
- {56, LPGEN("Bosnian"), nullptr},
- { 3, LPGEN("Bulgarian"), nullptr},
- { 4, LPGEN("Burmese"), nullptr},
- { 5, LPGEN("Cantonese"), nullptr},
- { 6, LPGEN("Catalan"), nullptr},
- {61, LPGEN("Chamorro"), nullptr},
- { 7, LPGEN("Chinese"), nullptr},
- { 8, LPGEN("Croatian"), nullptr},
- { 9, LPGEN("Czech"), nullptr},
- {10, LPGEN("Danish"), nullptr},
- {11, LPGEN("Dutch"), nullptr},
- {12, LPGEN("English"), nullptr},
- {13, LPGEN("Esperanto"), nullptr},
- {14, LPGEN("Estonian"), nullptr},
- {15, LPGEN("Farsi"), nullptr},
- {16, LPGEN("Finnish"), nullptr},
- {17, LPGEN("French"), nullptr},
- {18, LPGEN("Gaelic"), nullptr},
- {19, LPGEN("German"), nullptr},
- {20, LPGEN("Greek"), nullptr},
- {70, LPGEN("Gujarati"), nullptr},
- {21, LPGEN("Hebrew"), nullptr},
- {22, LPGEN("Hindi"), nullptr},
- {23, LPGEN("Hungarian"), nullptr},
- {24, LPGEN("Icelandic"), nullptr},
- {25, LPGEN("Indonesian"), nullptr},
- {26, LPGEN("Italian"), nullptr},
- {27, LPGEN("Japanese"), nullptr},
- {28, LPGEN("Khmer"), nullptr},
- {29, LPGEN("Korean"), nullptr},
- {69, LPGEN("Kurdish"), nullptr},
- {30, LPGEN("Lao"), nullptr},
- {31, LPGEN("Latvian"), nullptr},
- {32, LPGEN("Lithuanian"), nullptr},
- {65, LPGEN("Macedonian"), nullptr},
- {33, LPGEN("Malay"), nullptr},
- {63, LPGEN("Mandarin"), nullptr},
- {62, LPGEN("Mongolian"), nullptr},
- {34, LPGEN("Norwegian"), nullptr},
- {57, LPGEN("Persian"), nullptr},
- {35, LPGEN("Polish"), nullptr},
- {36, LPGEN("Portuguese"), nullptr},
- {60, LPGEN("Punjabi"), nullptr},
- {37, LPGEN("Romanian"), nullptr},
- {38, LPGEN("Russian"), nullptr},
- {39, LPGEN("Serbo-Croatian"), nullptr},
- {66, LPGEN("Sindhi"), nullptr},
- {40, LPGEN("Slovak"), nullptr},
- {41, LPGEN("Slovenian"), nullptr},
- {42, LPGEN("Somali"), nullptr},
- {43, LPGEN("Spanish"), nullptr},
- {44, LPGEN("Swahili"), nullptr},
- {45, LPGEN("Swedish"), nullptr},
- {46, LPGEN("Tagalog"), nullptr},
- {64, LPGEN("Taiwanese"), nullptr},
- {71, LPGEN("Tamil"), nullptr},
- {47, LPGEN("Tatar"), nullptr},
- {48, LPGEN("Thai"), nullptr},
- {49, LPGEN("Turkish"), nullptr},
- {50, LPGEN("Ukrainian"), nullptr},
- {51, LPGEN("Urdu"), nullptr},
- {52, LPGEN("Vietnamese"), nullptr},
- {67, LPGEN("Welsh"), nullptr},
- {53, LPGEN("Yiddish"), nullptr},
- {54, LPGEN("Yoruba"), nullptr},
+ { 0, LPGENW("Unspecified"), nullptr},
+ {55, LPGENW("Afrikaans"), nullptr},
+ {58, LPGENW("Albanian"), nullptr},
+ { 1, LPGENW("Arabic"), nullptr},
+ {59, LPGENW("Armenian"), nullptr},
+ {68, LPGENW("Azerbaijani"), nullptr},
+ {72, LPGENW("Belorussian"), nullptr},
+ { 2, LPGENW("Bhojpuri"), nullptr},
+ {56, LPGENW("Bosnian"), nullptr},
+ { 3, LPGENW("Bulgarian"), nullptr},
+ { 4, LPGENW("Burmese"), nullptr},
+ { 5, LPGENW("Cantonese"), nullptr},
+ { 6, LPGENW("Catalan"), nullptr},
+ {61, LPGENW("Chamorro"), nullptr},
+ { 7, LPGENW("Chinese"), nullptr},
+ { 8, LPGENW("Croatian"), nullptr},
+ { 9, LPGENW("Czech"), nullptr},
+ {10, LPGENW("Danish"), nullptr},
+ {11, LPGENW("Dutch"), nullptr},
+ {12, LPGENW("English"), nullptr},
+ {13, LPGENW("Esperanto"), nullptr},
+ {14, LPGENW("Estonian"), nullptr},
+ {15, LPGENW("Farsi"), nullptr},
+ {16, LPGENW("Finnish"), nullptr},
+ {17, LPGENW("French"), nullptr},
+ {18, LPGENW("Gaelic"), nullptr},
+ {19, LPGENW("German"), nullptr},
+ {20, LPGENW("Greek"), nullptr},
+ {70, LPGENW("Gujarati"), nullptr},
+ {21, LPGENW("Hebrew"), nullptr},
+ {22, LPGENW("Hindi"), nullptr},
+ {23, LPGENW("Hungarian"), nullptr},
+ {24, LPGENW("Icelandic"), nullptr},
+ {25, LPGENW("Indonesian"), nullptr},
+ {26, LPGENW("Italian"), nullptr},
+ {27, LPGENW("Japanese"), nullptr},
+ {28, LPGENW("Khmer"), nullptr},
+ {29, LPGENW("Korean"), nullptr},
+ {69, LPGENW("Kurdish"), nullptr},
+ {30, LPGENW("Lao"), nullptr},
+ {31, LPGENW("Latvian"), nullptr},
+ {32, LPGENW("Lithuanian"), nullptr},
+ {65, LPGENW("Macedonian"), nullptr},
+ {33, LPGENW("Malay"), nullptr},
+ {63, LPGENW("Mandarin"), nullptr},
+ {62, LPGENW("Mongolian"), nullptr},
+ {34, LPGENW("Norwegian"), nullptr},
+ {57, LPGENW("Persian"), nullptr},
+ {35, LPGENW("Polish"), nullptr},
+ {36, LPGENW("Portuguese"), nullptr},
+ {60, LPGENW("Punjabi"), nullptr},
+ {37, LPGENW("Romanian"), nullptr},
+ {38, LPGENW("Russian"), nullptr},
+ {39, LPGENW("Serbo-Croatian"), nullptr},
+ {66, LPGENW("Sindhi"), nullptr},
+ {40, LPGENW("Slovak"), nullptr},
+ {41, LPGENW("Slovenian"), nullptr},
+ {42, LPGENW("Somali"), nullptr},
+ {43, LPGENW("Spanish"), nullptr},
+ {44, LPGENW("Swahili"), nullptr},
+ {45, LPGENW("Swedish"), nullptr},
+ {46, LPGENW("Tagalog"), nullptr},
+ {64, LPGENW("Taiwanese"), nullptr},
+ {71, LPGENW("Tamil"), nullptr},
+ {47, LPGENW("Tatar"), nullptr},
+ {48, LPGENW("Thai"), nullptr},
+ {49, LPGENW("Turkish"), nullptr},
+ {50, LPGENW("Ukrainian"), nullptr},
+ {51, LPGENW("Urdu"), nullptr},
+ {52, LPGENW("Vietnamese"), nullptr},
+ {67, LPGENW("Welsh"), nullptr},
+ {53, LPGENW("Yiddish"), nullptr},
+ {54, LPGENW("Yoruba"), nullptr},
};
static IDSTRLIST TmplOccupations[] = {
- { 0, LPGEN("Unspecified"), nullptr},
- { 1, LPGEN("Academic"), nullptr},
- { 2, LPGEN("Administrative"), nullptr},
- { 3, LPGEN("Art/Entertainment"), nullptr},
- { 4, LPGEN("College Student"), nullptr},
- { 5, LPGEN("Computers"), nullptr},
- { 6, LPGEN("Community & Social"), nullptr},
- { 7, LPGEN("Education"), nullptr},
- { 8, LPGEN("Engineering"), nullptr},
- { 9, LPGEN("Financial Services"), nullptr},
- {10, LPGEN("Government"), nullptr},
- {11, LPGEN("High School Student"), nullptr},
- {12, LPGEN("Home"), nullptr},
- {13, LPGEN("ICQ - Providing Help"), nullptr},
- {14, LPGEN("Law"), nullptr},
- {15, LPGEN("Managerial"), nullptr},
- {16, LPGEN("Manufacturing"), nullptr},
- {17, LPGEN("Medical/Health"), nullptr},
- {18, LPGEN("Military"), nullptr},
- {19, LPGEN("Non-Government Organization"), nullptr},
- {20, LPGEN("Professional"), nullptr},
- {21, LPGEN("Retail"), nullptr},
- {22, LPGEN("Retired"), nullptr},
- {23, LPGEN("Science & Research"), nullptr},
- {24, LPGEN("Sports"), nullptr},
- {25, LPGEN("Technical"), nullptr},
- {26, LPGEN("University Student"), nullptr},
- {27, LPGEN("Web Building"), nullptr},
- {99, LPGEN("Other Services"), nullptr}
+ { 0, LPGENW("Unspecified"), nullptr},
+ { 1, LPGENW("Academic"), nullptr},
+ { 2, LPGENW("Administrative"), nullptr},
+ { 3, LPGENW("Art/Entertainment"), nullptr},
+ { 4, LPGENW("College Student"), nullptr},
+ { 5, LPGENW("Computers"), nullptr},
+ { 6, LPGENW("Community & Social"), nullptr},
+ { 7, LPGENW("Education"), nullptr},
+ { 8, LPGENW("Engineering"), nullptr},
+ { 9, LPGENW("Financial Services"), nullptr},
+ {10, LPGENW("Government"), nullptr},
+ {11, LPGENW("High School Student"), nullptr},
+ {12, LPGENW("Home"), nullptr},
+ {13, LPGENW("ICQ - Providing Help"), nullptr},
+ {14, LPGENW("Law"), nullptr},
+ {15, LPGENW("Managerial"), nullptr},
+ {16, LPGENW("Manufacturing"), nullptr},
+ {17, LPGENW("Medical/Health"), nullptr},
+ {18, LPGENW("Military"), nullptr},
+ {19, LPGENW("Non-Government Organization"), nullptr},
+ {20, LPGENW("Professional"), nullptr},
+ {21, LPGENW("Retail"), nullptr},
+ {22, LPGENW("Retired"), nullptr},
+ {23, LPGENW("Science & Research"), nullptr},
+ {24, LPGENW("Sports"), nullptr},
+ {25, LPGENW("Technical"), nullptr},
+ {26, LPGENW("University Student"), nullptr},
+ {27, LPGENW("Web Building"), nullptr},
+ {99, LPGENW("Other Services"), nullptr}
};
static IDSTRLIST TmplInterests[] = {
- { 0, LPGEN("Unspecified"), nullptr},
- {100, LPGEN("Art"), nullptr},
- {101, LPGEN("Cars"), nullptr},
- {102, LPGEN("Celebrity Fans"), nullptr},
- {103, LPGEN("Collections"), nullptr},
- {104, LPGEN("Computers"), nullptr},
- {105, LPGEN("Culture & Literature"), nullptr},
- {106, LPGEN("Fitness"), nullptr},
- {107, LPGEN("Games"), nullptr},
- {108, LPGEN("Hobbies"), nullptr},
- {109, LPGEN("ICQ - Providing Help"), nullptr},
- {110, LPGEN("Internet"), nullptr},
- {111, LPGEN("Lifestyle"), nullptr},
- {112, LPGEN("Movies/TV"), nullptr},
- {113, LPGEN("Music"), nullptr},
- {114, LPGEN("Outdoor Activities"), nullptr},
- {115, LPGEN("Parenting"), nullptr},
- {116, LPGEN("Pets/Animals"), nullptr},
- {117, LPGEN("Religion"), nullptr},
- {118, LPGEN("Science/Technology"), nullptr},
- {119, LPGEN("Skills"), nullptr},
- {120, LPGEN("Sports"), nullptr},
- {121, LPGEN("Web Design"), nullptr},
- {122, LPGEN("Nature and Environment"), nullptr},
- {123, LPGEN("News & Media"), nullptr},
- {124, LPGEN("Government"), nullptr},
- {125, LPGEN("Business & Economy"), nullptr},
- {126, LPGEN("Mystics"), nullptr},
- {127, LPGEN("Travel"), nullptr},
- {128, LPGEN("Astronomy"), nullptr},
- {129, LPGEN("Space"), nullptr},
- {130, LPGEN("Clothing"), nullptr},
- {131, LPGEN("Parties"), nullptr},
- {132, LPGEN("Women"), nullptr},
- {133, LPGEN("Social science"), nullptr},
- {134, LPGEN("60's"), nullptr},
- {135, LPGEN("70's"), nullptr},
- {136, LPGEN("80's"), nullptr},
- {137, LPGEN("50's"), nullptr},
- {138, LPGEN("Finance and corporate"), nullptr},
- {139, LPGEN("Entertainment"), nullptr},
- {140, LPGEN("Consumer electronics"), nullptr},
- {141, LPGEN("Retail stores"), nullptr},
- {142, LPGEN("Health and beauty"), nullptr},
- {143, LPGEN("Media"), nullptr},
- {144, LPGEN("Household products"), nullptr},
- {145, LPGEN("Mail order catalog"), nullptr},
- {146, LPGEN("Business services"), nullptr},
- {147, LPGEN("Audio and visual"), nullptr},
- {148, LPGEN("Sporting and athletic"), nullptr},
- {149, LPGEN("Publishing"), nullptr},
- {150, LPGEN("Home automation"), nullptr}
+ { 0, LPGENW("Unspecified"), nullptr},
+ {100, LPGENW("Art"), nullptr},
+ {101, LPGENW("Cars"), nullptr},
+ {102, LPGENW("Celebrity Fans"), nullptr},
+ {103, LPGENW("Collections"), nullptr},
+ {104, LPGENW("Computers"), nullptr},
+ {105, LPGENW("Culture & Literature"), nullptr},
+ {106, LPGENW("Fitness"), nullptr},
+ {107, LPGENW("Games"), nullptr},
+ {108, LPGENW("Hobbies"), nullptr},
+ {109, LPGENW("ICQ - Providing Help"), nullptr},
+ {110, LPGENW("Internet"), nullptr},
+ {111, LPGENW("Lifestyle"), nullptr},
+ {112, LPGENW("Movies/TV"), nullptr},
+ {113, LPGENW("Music"), nullptr},
+ {114, LPGENW("Outdoor Activities"), nullptr},
+ {115, LPGENW("Parenting"), nullptr},
+ {116, LPGENW("Pets/Animals"), nullptr},
+ {117, LPGENW("Religion"), nullptr},
+ {118, LPGENW("Science/Technology"), nullptr},
+ {119, LPGENW("Skills"), nullptr},
+ {120, LPGENW("Sports"), nullptr},
+ {121, LPGENW("Web Design"), nullptr},
+ {122, LPGENW("Nature and Environment"), nullptr},
+ {123, LPGENW("News & Media"), nullptr},
+ {124, LPGENW("Government"), nullptr},
+ {125, LPGENW("Business & Economy"), nullptr},
+ {126, LPGENW("Mystics"), nullptr},
+ {127, LPGENW("Travel"), nullptr},
+ {128, LPGENW("Astronomy"), nullptr},
+ {129, LPGENW("Space"), nullptr},
+ {130, LPGENW("Clothing"), nullptr},
+ {131, LPGENW("Parties"), nullptr},
+ {132, LPGENW("Women"), nullptr},
+ {133, LPGENW("Social science"), nullptr},
+ {134, LPGENW("60's"), nullptr},
+ {135, LPGENW("70's"), nullptr},
+ {136, LPGENW("80's"), nullptr},
+ {137, LPGENW("50's"), nullptr},
+ {138, LPGENW("Finance and corporate"), nullptr},
+ {139, LPGENW("Entertainment"), nullptr},
+ {140, LPGENW("Consumer electronics"), nullptr},
+ {141, LPGENW("Retail stores"), nullptr},
+ {142, LPGENW("Health and beauty"), nullptr},
+ {143, LPGENW("Media"), nullptr},
+ {144, LPGENW("Household products"), nullptr},
+ {145, LPGENW("Mail order catalog"), nullptr},
+ {146, LPGENW("Business services"), nullptr},
+ {147, LPGENW("Audio and visual"), nullptr},
+ {148, LPGENW("Sporting and athletic"), nullptr},
+ {149, LPGENW("Publishing"), nullptr},
+ {150, LPGENW("Home automation"), nullptr}
};
static IDSTRLIST TmplAffiliations[] = {
- { 0, LPGEN("Unspecified"), nullptr},
- {200, LPGEN("Alumni Org."), nullptr},
- {201, LPGEN("Charity Org."), nullptr},
- {202, LPGEN("Club/Social Org."), nullptr},
- {203, LPGEN("Community Org."), nullptr},
- {204, LPGEN("Cultural Org."), nullptr},
- {205, LPGEN("Fan Clubs"), nullptr},
- {206, LPGEN("Fraternity/Sorority"), nullptr},
- {207, LPGEN("Hobbyists Org."), nullptr},
- {208, LPGEN("International Org."), nullptr},
- {209, LPGEN("Nature and Environment Org."), nullptr},
- {210, LPGEN("Professional Org."), nullptr},
- {211, LPGEN("Scientific/Technical Org."), nullptr},
- {212, LPGEN("Self Improvement Group"), nullptr},
- {213, LPGEN("Spiritual/Religious Org."), nullptr},
- {214, LPGEN("Sports Org."), nullptr},
- {215, LPGEN("Support Org."), nullptr},
- {216, LPGEN("Trade and Business Org."), nullptr},
- {217, LPGEN("Union"), nullptr},
- {218, LPGEN("Volunteer Org."), nullptr},
- {299, LPGEN("Other"), nullptr},
+ { 0, LPGENW("Unspecified"), nullptr},
+ {200, LPGENW("Alumni Org."), nullptr},
+ {201, LPGENW("Charity Org."), nullptr},
+ {202, LPGENW("Club/Social Org."), nullptr},
+ {203, LPGENW("Community Org."), nullptr},
+ {204, LPGENW("Cultural Org."), nullptr},
+ {205, LPGENW("Fan Clubs"), nullptr},
+ {206, LPGENW("Fraternity/Sorority"), nullptr},
+ {207, LPGENW("Hobbyists Org."), nullptr},
+ {208, LPGENW("International Org."), nullptr},
+ {209, LPGENW("Nature and Environment Org."), nullptr},
+ {210, LPGENW("Professional Org."), nullptr},
+ {211, LPGENW("Scientific/Technical Org."), nullptr},
+ {212, LPGENW("Self Improvement Group"), nullptr},
+ {213, LPGENW("Spiritual/Religious Org."), nullptr},
+ {214, LPGENW("Sports Org."), nullptr},
+ {215, LPGENW("Support Org."), nullptr},
+ {216, LPGENW("Trade and Business Org."), nullptr},
+ {217, LPGENW("Union"), nullptr},
+ {218, LPGENW("Volunteer Org."), nullptr},
+ {299, LPGENW("Other"), nullptr},
};
static IDSTRLIST TmplPast[] = {
- { 0, LPGEN("Unspecified"), nullptr},
- {300, LPGEN("Elementary School"), nullptr},
- {301, LPGEN("High School"), nullptr},
- {302, LPGEN("College"), nullptr},
- {303, LPGEN("University"), nullptr},
- {304, LPGEN("Military"), nullptr},
- {305, LPGEN("Past Work Place"), nullptr},
- {306, LPGEN("Past Organization"), nullptr},
- {399, LPGEN("Other"), nullptr}
+ { 0, LPGENW("Unspecified"), nullptr},
+ {300, LPGENW("Elementary School"), nullptr},
+ {301, LPGENW("High School"), nullptr},
+ {302, LPGENW("College"), nullptr},
+ {303, LPGENW("University"), nullptr},
+ {304, LPGENW("Military"), nullptr},
+ {305, LPGENW("Past Work Place"), nullptr},
+ {306, LPGENW("Past Organization"), nullptr},
+ {399, LPGENW("Other"), nullptr}
};
static IDSTRLIST TmplMarital[]={
- { 0, LPGEN("Unspecified"), nullptr},
- {10, LPGEN("Single"), nullptr},
- {11, LPGEN("Close relationships"), nullptr},
- {12, LPGEN("Engaged"), nullptr},
- {20, LPGEN("Married"), nullptr},
- {30, LPGEN("Divorced"), nullptr},
- {31, LPGEN("Separated"), nullptr},
- {40, LPGEN("Widowed"), nullptr},
- {50, LPGEN("Actively searching"), nullptr },
- {60, LPGEN("In love"), nullptr },
- {70, LPGEN("It's complicated"), nullptr },
- {80, LPGEN("In a civil union"), nullptr }
+ { 0, LPGENW("Unspecified"), nullptr},
+ {10, LPGENW("Single"), nullptr},
+ {11, LPGENW("Close relationships"), nullptr},
+ {12, LPGENW("Engaged"), nullptr},
+ {20, LPGENW("Married"), nullptr},
+ {30, LPGENW("Divorced"), nullptr},
+ {31, LPGENW("Separated"), nullptr},
+ {40, LPGENW("Widowed"), nullptr},
+ {50, LPGENW("Actively searching"), nullptr },
+ {60, LPGENW("In love"), nullptr },
+ {70, LPGENW("It's complicated"), nullptr },
+ {80, LPGENW("In a civil union"), nullptr }
};
static IDSTRLIST TmplPrefixes[]={
- { 0, LPGEN("Unspecified"), nullptr},
- {'j', LPGEN("jun."), nullptr},
- {'s', LPGEN("sen."), nullptr}
+ { 0, LPGENW("Unspecified"), nullptr},
+ {'j', LPGENW("jun."), nullptr},
+ {'s', LPGENW("sen."), nullptr}
};
static IDSTRLIST *MyCountries = nullptr;
@@ -276,10 +276,10 @@ static void SvcConstantsTranslateList(LPIDSTRLIST pList, UINT nListCount) {
if (!pList[0].ptszTranslated) {
for (UINT i = 0; i < nListCount; i++)
- pList[i].ptszTranslated = Langpack_PcharToTchar(pList[i].pszText);
+ pList[i].ptszTranslated = TranslateW(pList[i].pszText);
// Ignore last item, if it is a "Other" item.
- if (!mir_strcmp(pList[nListCount-1].pszText, LPGEN("Other"))) nListCount--;
+ if (!mir_wstrcmp(pList[nListCount-1].pszText, LPGENW("Other"))) nListCount--;
// Sort list according translated text and ignore first item.
qsort(pList+1, nListCount-1, sizeof(pList[0]),
@@ -310,8 +310,8 @@ INT_PTR GetCountryList(LPUINT pnListSize, LPIDSTRLIST *pList) if (MyCountries) {
for (UINT i = 0; i < MyCountriesCount; i++) {
MyCountries[i].nID = country[i].id;
- MyCountries[i].pszText = country[i].szName;
- MyCountries[i].ptszTranslated = Langpack_PcharToTchar(country[i].szName);
+ MyCountries[i].pszText = mir_a2u(country[i].szName);
+ MyCountries[i].ptszTranslated = TranslateW(MyCountries[i].pszText);
}
// Sort list according translated text and ignore first item.
qsort(MyCountries+1, MyCountriesCount-1, sizeof(MyCountries[0]),
@@ -398,22 +398,10 @@ void SvcConstantsLoadModule(void) GetNamePrefixList(&nListSize, &pList);
}
-static void __forceinline SvcConstantsClearList(UINT pnListSize, LPIDSTRLIST pList)
-{
- if (pList)
- for (UINT i = 0; i < pnListSize; i++)
- MIR_FREE(pList[i].ptszTranslated);
-}
-
void SvcConstantsUnloadModule(void)
{
- SvcConstantsClearList(_countof(TmplMarital), TmplMarital);
- SvcConstantsClearList(_countof(TmplLanguages), TmplLanguages);
- SvcConstantsClearList(_countof(TmplOccupations), TmplOccupations);
- SvcConstantsClearList(_countof(TmplInterests), TmplInterests);
- SvcConstantsClearList(_countof(TmplPast), TmplPast);
- SvcConstantsClearList(_countof(TmplAffiliations), TmplAffiliations);
- SvcConstantsClearList(_countof(TmplPrefixes), TmplPrefixes);
- SvcConstantsClearList(MyCountriesCount, MyCountries);
+ for (UINT i = 0; i < MyCountriesCount; i++)
+ mir_free((void*)MyCountries[i].pszText);
+
MIR_FREE(MyCountries);
}
diff --git a/plugins/UserInfoEx/src/svc_constants.h b/plugins/UserInfoEx/src/svc_constants.h index 814d36d134..3edbed05d6 100644 --- a/plugins/UserInfoEx/src/svc_constants.h +++ b/plugins/UserInfoEx/src/svc_constants.h @@ -150,8 +150,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct CIDList
{
int nID;
- LPCSTR pszText;
- LPTSTR ptszTranslated;
+ LPCWSTR pszText;
+ LPWSTR ptszTranslated;
} IDSTRLIST, *LPIDSTRLIST;
|