ntdll: Map LANG_SERBIAN_NEUTRAL in RtlLocaleNameToLcid().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f51e44c180
commit
db3e08770f
|
@ -2861,14 +2861,12 @@ static void test_LocaleNameToLCID(void)
|
||||||
for (ptr = neutralsublang_names; *ptr->name; ptr++)
|
for (ptr = neutralsublang_names; *ptr->name; ptr++)
|
||||||
{
|
{
|
||||||
lcid = pLocaleNameToLCID(ptr->name, 0);
|
lcid = pLocaleNameToLCID(ptr->name, 0);
|
||||||
todo_wine_if (ptr->todo)
|
|
||||||
ok(lcid == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n",
|
ok(lcid == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n",
|
||||||
wine_dbgstr_w(ptr->name), lcid, ptr->lcid);
|
wine_dbgstr_w(ptr->name), lcid, ptr->lcid);
|
||||||
|
|
||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
ret = pLCIDToLocaleName(lcid, buffer, ARRAY_SIZE(buffer), 0);
|
ret = pLCIDToLocaleName(lcid, buffer, ARRAY_SIZE(buffer), 0);
|
||||||
ok(ret > 0, "%s: got %d\n", wine_dbgstr_w(ptr->name), ret);
|
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",
|
ok(!lstrcmpW(ptr->sname, buffer), "%s: got wrong locale name %s\n",
|
||||||
wine_dbgstr_w(ptr->name), wine_dbgstr_w(buffer));
|
wine_dbgstr_w(ptr->name), wine_dbgstr_w(buffer));
|
||||||
|
|
||||||
|
@ -2974,7 +2972,6 @@ static void test_LocaleNameToLCID(void)
|
||||||
status = pRtlLocaleNameToLcid( ptr->name, &lcid, 2 );
|
status = pRtlLocaleNameToLcid( ptr->name, &lcid, 2 );
|
||||||
ok( !status || broken(ptr->lcid == MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)), /* vista */
|
ok( !status || broken(ptr->lcid == MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)), /* vista */
|
||||||
"%s failed error %x\n", wine_dbgstr_w(ptr->name), status );
|
"%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",
|
if (!status) ok( lcid == expect, "%s: got wrong lcid 0x%04x, expected 0x%04x\n",
|
||||||
wine_dbgstr_w(ptr->name), lcid, expect );
|
wine_dbgstr_w(ptr->name), lcid, expect );
|
||||||
status = pRtlLocaleNameToLcid( ptr->sname, &lcid, 0 );
|
status = pRtlLocaleNameToLcid( ptr->sname, &lcid, 0 );
|
||||||
|
@ -4824,7 +4821,6 @@ static void test_GetLocaleInfoEx(void)
|
||||||
{
|
{
|
||||||
val = 0;
|
val = 0;
|
||||||
pGetLocaleInfoEx(ptr->name, LOCALE_ILANGUAGE|LOCALE_RETURN_NUMBER, (WCHAR*)&val, sizeof(val)/sizeof(WCHAR));
|
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;
|
bufferW[0] = 0;
|
||||||
ret = pGetLocaleInfoEx(ptr->name, LOCALE_SNAME, bufferW, ARRAY_SIZE(bufferW));
|
ret = pGetLocaleInfoEx(ptr->name, LOCALE_SNAME, bufferW, ARRAY_SIZE(bufferW));
|
||||||
|
|
|
@ -1358,6 +1358,9 @@ NTSTATUS WINAPI RtlLocaleNameToLcid( const WCHAR *name, LCID *lcid, ULONG flags
|
||||||
case MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ):
|
case MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ):
|
||||||
*lcid = MAKELCID( 0x7c04, SORT_DEFAULT );
|
*lcid = MAKELCID( 0x7c04, SORT_DEFAULT );
|
||||||
break;
|
break;
|
||||||
|
case MAKELANGID( LANG_SERBIAN, SUBLANG_NEUTRAL ):
|
||||||
|
*lcid = LANG_SERBIAN_NEUTRAL;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
*lcid = MAKELANGID( PRIMARYLANGID(id), SUBLANG_NEUTRAL );
|
*lcid = MAKELANGID( PRIMARYLANGID(id), SUBLANG_NEUTRAL );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue