From: Michael Müller michael@fds-team.de
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/kernel32/locale_rc.rc | 1 + dlls/kernel32/nls/srm.nls | 174 +++++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) create mode 100644 dlls/kernel32/nls/srm.nls
diff --git a/dlls/kernel32/locale_rc.rc b/dlls/kernel32/locale_rc.rc index c6bb407b1c5..86ababd0900 100644 --- a/dlls/kernel32/locale_rc.rc +++ b/dlls/kernel32/locale_rc.rc @@ -143,6 +143,7 @@ #include "nls/hrv.nls" /* 0x041a LANG_SERBIAN, SUBLANG_DEFAULT */ #include "nls/srl.nls" /* 0x081a LANG_SERBIAN, SUBLANG_SERBIAN_LATIN */ #include "nls/srb.nls" /* 0x0c1a LANG_SERBIAN, SUBLANG_SERBIAN_CYRILLIC */ +#include "nls/srm.nls" /* 0x241a LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN */
#include "nls/sky.nls" /* 0x041b LANG_SLOVAK, SUBLANG_DEFAULT */
diff --git a/dlls/kernel32/nls/srm.nls b/dlls/kernel32/nls/srm.nls new file mode 100644 index 00000000000..f4b1169943a --- /dev/null +++ b/dlls/kernel32/nls/srm.nls @@ -0,0 +1,174 @@ +/* + * Locale definitions for Serbian (Serbia, Latin) + * + * Copyright 2016 Michael Müller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN +{ + LOCALE_FONTSIGNATURE L"\x0027\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0002\x0000\x0000\x0400\x0012\x0000\x0000\xc5d4" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "381" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "3" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "0" + LOCALE_IDEFAULTANSICODEPAGE "1250" + LOCALE_IDEFAULTCODEPAGE "852" + LOCALE_IDEFAULTCOUNTRY "381" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "241a" + LOCALE_IDEFAULTMACCODEPAGE "10029" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IGEOID "271" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "241a" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "0" + LOCALE_INEGATIVEPERCENT "1" + LOCALE_INEGCURR "8" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "1" + LOCALE_INEGSYMPRECEDES "0" + LOCALE_INEUTRAL "0" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "1" + LOCALE_IPOSSIGNPOSN "1" + LOCALE_IPOSSYMPRECEDES "0" + LOCALE_IREADINGLAYOUT "0" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "1" + LOCALE_S1159 "pre podne" + LOCALE_S2359 "po podne" + LOCALE_SABBREVCTRYNAME "SRB" + LOCALE_SABBREVDAYNAME1 "pon" + LOCALE_SABBREVDAYNAME2 "uto" + LOCALE_SABBREVDAYNAME3 "sre" + LOCALE_SABBREVDAYNAME4 "čet" + LOCALE_SABBREVDAYNAME5 "pet" + LOCALE_SABBREVDAYNAME6 "sub" + LOCALE_SABBREVDAYNAME7 "ned" + LOCALE_SABBREVLANGNAME "SRM" + LOCALE_SABBREVMONTHNAME1 "jan" + LOCALE_SABBREVMONTHNAME2 "feb" + LOCALE_SABBREVMONTHNAME3 "mar" + LOCALE_SABBREVMONTHNAME4 "apr" + LOCALE_SABBREVMONTHNAME5 "maj" + LOCALE_SABBREVMONTHNAME6 "jun" + LOCALE_SABBREVMONTHNAME7 "jul" + LOCALE_SABBREVMONTHNAME8 "avg" + LOCALE_SABBREVMONTHNAME9 "sep" + LOCALE_SABBREVMONTHNAME10 "okt" + LOCALE_SABBREVMONTHNAME11 "nov" + LOCALE_SABBREVMONTHNAME12 "dec" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "Serbia" + LOCALE_SCURRENCY "Din." + LOCALE_SDATE "." + LOCALE_SDAYNAME1 "ponedeljak" + LOCALE_SDAYNAME2 "utorak" + LOCALE_SDAYNAME3 "sreda" + LOCALE_SDAYNAME4 "četvrtak" + LOCALE_SDAYNAME5 "petak" + LOCALE_SDAYNAME6 "subota" + LOCALE_SDAYNAME7 "nedelja" + LOCALE_SDECIMAL "," + LOCALE_SENGCOUNTRY "Serbia" + LOCALE_SENGCURRNAME "Serbian Dinar" + LOCALE_SENGLANGUAGE "Serbian (Latin)" + LOCALE_SGROUPING "3;0" + LOCALE_SINTLSYMBOL "RSD" + LOCALE_SISO3166CTRYNAME "RS" + LOCALE_SISO639LANGNAME "sr" + LOCALE_SLANGUAGE "Serbian (Latin, Serbia)" + LOCALE_SLIST ";" + LOCALE_SLONGDATE "dddd, dd. MMMM yyyy" + LOCALE_SMONDECIMALSEP "," + LOCALE_SMONGROUPING "3;0" + LOCALE_SMONTHDAY "d. MMMM" + LOCALE_SMONTHNAME1 "januar" + LOCALE_SMONTHNAME2 "februar" + LOCALE_SMONTHNAME3 "mart" + LOCALE_SMONTHNAME4 "april" + LOCALE_SMONTHNAME5 "maj" + LOCALE_SMONTHNAME6 "jun" + LOCALE_SMONTHNAME7 "jul" + LOCALE_SMONTHNAME8 "avgust" + LOCALE_SMONTHNAME9 "septembar" + LOCALE_SMONTHNAME10 "oktobar" + LOCALE_SMONTHNAME11 "novembar" + LOCALE_SMONTHNAME12 "decembar" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "." + LOCALE_SNAME "sr-Latn-RS" + LOCALE_SNAN "NaN" + LOCALE_SNATIVECTRYNAME "Srbija" + LOCALE_SNATIVECURRNAME "Srpski dinar" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVEDISPLAYNAME "srpski (Srbija)" + LOCALE_SNATIVELANGNAME "srpski" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SNEGINFINITY L"-\x221e" + LOCALE_SOPENTYPELANGUAGETAG "SRB " + LOCALE_SPARENT "sr-Latn" + LOCALE_SPOSINFINITY L"\x221e" + LOCALE_SPOSITIVESIGN "+" + LOCALE_SSCRIPTS "Latn;" + LOCALE_SSHORTDATE "d.M.yyyy" + LOCALE_SSHORTESTDAYNAME1 "pon" + LOCALE_SSHORTESTDAYNAME2 "uto" + LOCALE_SSHORTESTDAYNAME3 "sre" + LOCALE_SSHORTESTDAYNAME4 "čet" + LOCALE_SSHORTESTDAYNAME5 "pet" + LOCALE_SSHORTESTDAYNAME6 "sub" + LOCALE_SSHORTESTDAYNAME7 "ned" + LOCALE_SSHORTTIME "H:mm" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "." + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "H:mm:ss" + LOCALE_SYEARMONTH "MMMM yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +}
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/kernel32/tests/locale.c | 4 ++++ dlls/kernelbase/locale.c | 2 ++ 2 files changed, 6 insertions(+)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 3fdfa251144..0f409abe3e2 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -3652,6 +3652,10 @@ static void test_ConvertDefaultLocale(void) broken( lcid == 0x7c04 ) || /* winxp */ broken( lcid == 0x0404 ), /* vista */ "Expected lcid = %08x got %08x\n", MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ), lcid ); + lcid = ConvertDefaultLocale( LANG_SERBIAN_NEUTRAL ); + ok( lcid == MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN ) || + broken( lcid == MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_LATIN ) ), /* <= vista */ + "Expected lcid = %08x got %08x\n", MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN ), lcid );
/* Invariant language is not treated specially */ TEST_LCID(LANG_INVARIANT, SUBLANG_DEFAULT, SORT_DEFAULT); diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c index c60b796aa48..d2f71c97ac7 100644 --- a/dlls/kernelbase/locale.c +++ b/dlls/kernelbase/locale.c @@ -3189,6 +3189,8 @@ LCID WINAPI DECLSPEC_HOTPATCH ConvertDefaultLocale( LCID lcid ) return MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED ); case MAKELANGID( LANG_CHINESE, 0x1f ): return MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ); + case LANG_SERBIAN_NEUTRAL: + return MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN ); case MAKELANGID( LANG_SPANISH, SUBLANG_NEUTRAL ): return MAKELANGID( LANG_SPANISH, SUBLANG_SPANISH_MODERN ); case MAKELANGID( LANG_IRISH, SUBLANG_NEUTRAL ):
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/kernel32/tests/locale.c | 10 +++------- dlls/ntdll/locale.c | 3 +++ 2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 0f409abe3e2..b354f759335 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -2861,14 +2861,12 @@ static void test_LocaleNameToLCID(void) for (ptr = neutralsublang_names; *ptr->name; ptr++) { lcid = pLocaleNameToLCID(ptr->name, 0); - todo_wine_if (ptr->todo) - ok(lcid == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", - wine_dbgstr_w(ptr->name), lcid, ptr->lcid); + ok(lcid == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", + wine_dbgstr_w(ptr->name), lcid, ptr->lcid);
*buffer = 0; ret = pLCIDToLocaleName(lcid, buffer, ARRAY_SIZE(buffer), 0); ok(ret > 0, "%s: got %d\n", wine_dbgstr_w(ptr->name), ret); - todo_wine_if (ptr->todo) ok(!lstrcmpW(ptr->sname, buffer), "%s: got wrong locale name %s\n", wine_dbgstr_w(ptr->name), wine_dbgstr_w(buffer));
@@ -2974,7 +2972,6 @@ static void test_LocaleNameToLCID(void) status = pRtlLocaleNameToLcid( ptr->name, &lcid, 2 ); ok( !status || broken(ptr->lcid == MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)), /* vista */ "%s failed error %x\n", wine_dbgstr_w(ptr->name), status ); - todo_wine_if(ptr->todo) if (!status) ok( lcid == expect, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", wine_dbgstr_w(ptr->name), lcid, expect ); status = pRtlLocaleNameToLcid( ptr->sname, &lcid, 0 ); @@ -4824,8 +4821,7 @@ static void test_GetLocaleInfoEx(void) { val = 0; pGetLocaleInfoEx(ptr->name, LOCALE_ILANGUAGE|LOCALE_RETURN_NUMBER, (WCHAR*)&val, sizeof(val)/sizeof(WCHAR)); - todo_wine_if (ptr->todo) - ok(val == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", wine_dbgstr_w(ptr->name), val, ptr->lcid); + ok(val == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", wine_dbgstr_w(ptr->name), val, ptr->lcid); bufferW[0] = 0; ret = pGetLocaleInfoEx(ptr->name, LOCALE_SNAME, bufferW, ARRAY_SIZE(bufferW)); ok(ret == lstrlenW(bufferW)+1, "%s: got ret value %d\n", wine_dbgstr_w(ptr->name), ret); diff --git a/dlls/ntdll/locale.c b/dlls/ntdll/locale.c index 3979f41089b..e4d90a8b1d5 100644 --- a/dlls/ntdll/locale.c +++ b/dlls/ntdll/locale.c @@ -1358,6 +1358,9 @@ NTSTATUS WINAPI RtlLocaleNameToLcid( const WCHAR *name, LCID *lcid, ULONG flags case MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ): *lcid = MAKELCID( 0x7c04, SORT_DEFAULT ); break; + case MAKELANGID( LANG_SERBIAN, SUBLANG_NEUTRAL ): + *lcid = LANG_SERBIAN_NEUTRAL; + break; default: *lcid = MAKELANGID( PRIMARYLANGID(id), SUBLANG_NEUTRAL ); break;
From: Michael Müller michael@fds-team.de
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/kernel32/nls/srl.nls | 14 +++++++------- dlls/kernel32/tests/locale.c | 4 +--- 2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/dlls/kernel32/nls/srl.nls b/dlls/kernel32/nls/srl.nls index 948b5e11a2b..516bb512aae 100644 --- a/dlls/kernel32/nls/srl.nls +++ b/dlls/kernel32/nls/srl.nls @@ -66,7 +66,7 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN LOCALE_ITLZERO "0" LOCALE_S1159 "" LOCALE_S2359 "" - LOCALE_SABBREVCTRYNAME "SRB" + LOCALE_SABBREVCTRYNAME "SCG" LOCALE_SABBREVDAYNAME1 "pon" LOCALE_SABBREVDAYNAME2 "uto" LOCALE_SABBREVDAYNAME3 "sre" @@ -88,7 +88,7 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN LOCALE_SABBREVMONTHNAME11 "nov" LOCALE_SABBREVMONTHNAME12 "dec" LOCALE_SABBREVMONTHNAME13 "" - LOCALE_SCOUNTRY "Serbia" + LOCALE_SCOUNTRY "Serbia and Montenegro (Former)" LOCALE_SCURRENCY "Din." LOCALE_SDATE "." LOCALE_SDAYNAME1 "ponedeljak" @@ -99,12 +99,12 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN LOCALE_SDAYNAME6 "subota" LOCALE_SDAYNAME7 "nedelja" LOCALE_SDECIMAL "," - LOCALE_SENGCOUNTRY "Serbia" + LOCALE_SENGCOUNTRY "Serbia and Montenegro (Former)" LOCALE_SENGCURRNAME "Serbian Dinar" LOCALE_SENGLANGUAGE "Serbian (Latin)" LOCALE_SGROUPING "3;0" - LOCALE_SINTLSYMBOL "RSD" - LOCALE_SISO3166CTRYNAME "RS" + LOCALE_SINTLSYMBOL "CSD" + LOCALE_SISO3166CTRYNAME "CS" LOCALE_SISO639LANGNAME "sr" LOCALE_SLANGUAGE "Serbian (Latin)" LOCALE_SLIST ";" @@ -126,9 +126,9 @@ STRINGTABLE LANGUAGE LANG_SERBIAN, SUBLANG_SERBIAN_LATIN LOCALE_SMONTHNAME12 "decembar" LOCALE_SMONTHNAME13 "" LOCALE_SMONTHOUSANDSEP "." - LOCALE_SNAME "sr-Latn-RS" + LOCALE_SNAME "sr-Latn-CS" LOCALE_SNAN "NaN" - LOCALE_SNATIVECTRYNAME "Srbija" + LOCALE_SNATIVECTRYNAME "Srbija i Crna Gora (Bivši)" LOCALE_SNATIVECURRNAME "dinar" LOCALE_SNATIVEDIGITS "0123456789" LOCALE_SNATIVEDISPLAYNAME "srpski (Srbija)" diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index b354f759335..55566d3e703 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -2768,7 +2768,6 @@ struct neutralsublang_name_t { WCHAR name[3]; WCHAR sname[16]; LCID lcid; - int todo; };
static const struct neutralsublang_name_t neutralsublang_names[] = { @@ -2782,7 +2781,7 @@ static const struct neutralsublang_name_t neutralsublang_names[] = { { {'m','s',0}, {'m','s','-','M','Y',0}, MAKELCID(MAKELANGID(LANG_MALAY, SUBLANG_MALAY_MALAYSIA), SORT_DEFAULT) }, { {'n','l',0}, {'n','l','-','N','L',0}, MAKELCID(MAKELANGID(LANG_DUTCH, SUBLANG_DUTCH), SORT_DEFAULT) }, { {'p','t',0}, {'p','t','-','B','R',0}, MAKELCID(MAKELANGID(LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN), SORT_DEFAULT) }, - { {'s','r',0}, {'s','r','-','L','a','t','n','-','R','S',0}, MAKELCID(MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN), SORT_DEFAULT), 1 }, + { {'s','r',0}, {'s','r','-','L','a','t','n','-','R','S',0}, MAKELCID(MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN), SORT_DEFAULT) }, { {'s','v',0}, {'s','v','-','S','E',0}, MAKELCID(MAKELANGID(LANG_SWEDISH, SUBLANG_SWEDISH), SORT_DEFAULT) }, { {'u','z',0}, {'u','z','-','L','a','t','n','-','U','Z',0}, MAKELCID(MAKELANGID(LANG_UZBEK, SUBLANG_UZBEK_LATIN), SORT_DEFAULT) }, { {'z','h',0}, {'z','h','-','C','N',0}, MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT) }, @@ -2977,7 +2976,6 @@ static void test_LocaleNameToLCID(void) status = pRtlLocaleNameToLcid( ptr->sname, &lcid, 0 ); ok( !status || broken(ptr->lcid == MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN)), /* vista */ "%s failed error %x\n", wine_dbgstr_w(ptr->name), status ); - todo_wine_if(ptr->todo) if (!status) ok( lcid == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", wine_dbgstr_w(ptr->name), lcid, ptr->lcid ); }