Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
77376936
Commit
77376936
authored
Jan 24, 2017
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use different default sublangs for Spanish and Chinese.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
77f78ddb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
15 deletions
+25
-15
locale.c
dlls/kernel32/locale.c
+16
-4
esn.nls
dlls/kernel32/nls/esn.nls
+1
-1
esp.nls
dlls/kernel32/nls/esp.nls
+1
-1
locale.c
dlls/kernel32/tests/locale.c
+4
-4
msvcr120.c
dlls/msvcr120/tests/msvcr120.c
+3
-5
No files found.
dlls/kernel32/locale.c
View file @
77376936
...
...
@@ -359,6 +359,18 @@ static UINT find_charset( const WCHAR *name )
return
0
;
}
static
WORD
get_default_sublang
(
LCID
lang
)
{
switch
(
PRIMARYLANGID
(
lang
))
{
case
LANG_SPANISH
:
return
SUBLANG_SPANISH_MODERN
;
case
LANG_CHINESE
:
return
SUBLANG_CHINESE_SIMPLIFIED
;
default:
return
SUBLANG_DEFAULT
;
}
}
/***********************************************************************
* find_locale_id_callback
...
...
@@ -402,7 +414,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type,
}
else
/* match default language */
{
if
(
SUBLANGID
(
LangID
)
==
SUBLANG_DEFAULT
)
matches
++
;
if
(
SUBLANGID
(
LangID
)
==
get_default_sublang
(
LangID
)
)
matches
++
;
}
if
(
data
->
codepage
)
...
...
@@ -1671,7 +1683,7 @@ INT WINAPI GetLocaleInfoW( LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len )
/* replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT */
if
(
SUBLANGID
(
lang_id
)
==
SUBLANG_NEUTRAL
)
lang_id
=
MAKELANGID
(
PRIMARYLANGID
(
lang_id
),
SUBLANG_DEFAULT
);
lang_id
=
MAKELANGID
(
PRIMARYLANGID
(
lang_id
),
get_default_sublang
(
lang_id
)
);
if
(
!
(
hrsrc
=
FindResourceExW
(
kernel32_handle
,
(
LPWSTR
)
RT_STRING
,
ULongToPtr
((
lctype
>>
4
)
+
1
),
lang_id
)))
...
...
@@ -2776,7 +2788,7 @@ LCID WINAPI ConvertDefaultLocale( LCID lcid )
langid
=
LANGIDFROMLCID
(
lcid
);
if
(
SUBLANGID
(
langid
)
==
SUBLANG_NEUTRAL
)
{
langid
=
MAKELANGID
(
PRIMARYLANGID
(
langid
),
SUBLANG_DEFAULT
);
langid
=
MAKELANGID
(
PRIMARYLANGID
(
langid
),
get_default_sublang
(
langid
)
);
lcid
=
MAKELCID
(
langid
,
SORTIDFROMLCID
(
lcid
));
}
}
...
...
@@ -4212,7 +4224,7 @@ static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSiz
langId
=
GetSystemDefaultLangID
();
if
(
SUBLANGID
(
langId
)
==
SUBLANG_NEUTRAL
)
langId
=
MAKELANGID
(
PRIMARYLANGID
(
langId
),
SUBLANG_DEFAULT
);
langId
=
MAKELANGID
(
PRIMARYLANGID
(
langId
),
get_default_sublang
(
langId
)
);
hResource
=
FindResourceExW
(
kernel32_handle
,
(
LPWSTR
)
RT_STRING
,
szResourceName
,
langId
);
...
...
dlls/kernel32/nls/esn.nls
View file @
77376936
...
...
@@ -123,7 +123,7 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN
LOCALE_SMONTHNAME12 "diciembre"
LOCALE_SMONTHNAME13 ""
LOCALE_SMONTHOUSANDSEP "."
LOCALE_SNAME "es-ES
_modern
"
LOCALE_SNAME "es-ES"
LOCALE_SNATIVECTRYNAME "España"
LOCALE_SNATIVECURRNAME "euro"
LOCALE_SNATIVEDIGITS "0123456789"
...
...
dlls/kernel32/nls/esp.nls
View file @
77376936
...
...
@@ -123,7 +123,7 @@ STRINGTABLE LANGUAGE LANG_SPANISH, SUBLANG_SPANISH
LOCALE_SMONTHNAME12 "diciembre"
LOCALE_SMONTHNAME13 ""
LOCALE_SMONTHOUSANDSEP "."
LOCALE_SNAME "es-ES"
LOCALE_SNAME "es-ES
_tradnl
"
LOCALE_SNATIVECTRYNAME "España"
LOCALE_SNATIVECURRNAME "euro"
LOCALE_SNATIVEDIGITS "0123456789"
...
...
dlls/kernel32/tests/locale.c
View file @
77376936
...
...
@@ -255,7 +255,7 @@ static const struct neutralsublang_name2_t neutralsublang_names2[] = {
{
{
'e'
,
's'
,
0
},
{
'e'
,
's'
,
'-'
,
'E'
,
'S'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_SPANISH
,
SUBLANG_SPANISH_MODERN
),
SORT_DEFAULT
),
MAKELCID
(
MAKELANGID
(
LANG_SPANISH
,
SUBLANG_SPANISH
),
SORT_DEFAULT
)
/* vista */
,
{
'e'
,
's'
,
'-'
,
'E'
,
'S'
,
'_'
,
't'
,
'r'
,
'a'
,
'd'
,
'n'
,
'l'
,
0
}
,
0x1
},
{
'e'
,
's'
,
'-'
,
'E'
,
'S'
,
'_'
,
't'
,
'r'
,
'a'
,
'd'
,
'n'
,
'l'
,
0
}
},
{
{
'g'
,
'a'
,
0
},
{
'g'
,
'a'
,
'-'
,
'I'
,
'E'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_IRISH
,
SUBLANG_IRISH_IRELAND
),
SORT_DEFAULT
),
0
,
{
0
},
0x3
},
{
{
'i'
,
't'
,
0
},
{
'i'
,
't'
,
'-'
,
'I'
,
'T'
,
0
},
...
...
@@ -273,7 +273,7 @@ static const struct neutralsublang_name2_t neutralsublang_names2[] = {
{
{
'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
)
,
0
,
{
0
},
0x3
},
MAKELCID
(
MAKELANGID
(
LANG_CHINESE
,
SUBLANG_CHINESE_SIMPLIFIED
),
SORT_DEFAULT
)
},
{
{
0
}
}
};
...
...
@@ -2684,7 +2684,7 @@ static const struct neutralsublang_name_t neutralsublang_names[] = {
{
{
'a'
,
'z'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_AZERI
,
SUBLANG_AZERI_LATIN
),
SORT_DEFAULT
)
},
{
{
'd'
,
'e'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_GERMAN
,
SUBLANG_GERMAN
),
SORT_DEFAULT
)
},
{
{
'e'
,
'n'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
SORT_DEFAULT
)
},
{
{
'e'
,
's'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_SPANISH
,
SUBLANG_SPANISH_MODERN
),
SORT_DEFAULT
)
,
1
},
{
{
'e'
,
's'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_SPANISH
,
SUBLANG_SPANISH_MODERN
),
SORT_DEFAULT
)
},
{
{
'g'
,
'a'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_IRISH
,
SUBLANG_IRISH_IRELAND
),
SORT_DEFAULT
)
},
{
{
'i'
,
't'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_ITALIAN
,
SUBLANG_ITALIAN
),
SORT_DEFAULT
)
},
{
{
'm'
,
's'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_MALAY
,
SUBLANG_MALAY_MALAYSIA
),
SORT_DEFAULT
)
},
...
...
@@ -2693,7 +2693,7 @@ static const struct neutralsublang_name_t neutralsublang_names[] = {
{
{
's'
,
'r'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_SERBIAN
,
SUBLANG_SERBIAN_SERBIA_LATIN
),
SORT_DEFAULT
),
1
},
{
{
's'
,
'v'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_SWEDISH
,
SUBLANG_SWEDISH
),
SORT_DEFAULT
)
},
{
{
'u'
,
'z'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_UZBEK
,
SUBLANG_UZBEK_LATIN
),
SORT_DEFAULT
)
},
{
{
'z'
,
'h'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_CHINESE
,
SUBLANG_CHINESE_SIMPLIFIED
),
SORT_DEFAULT
)
,
1
},
{
{
'z'
,
'h'
,
0
},
MAKELCID
(
MAKELANGID
(
LANG_CHINESE
,
SUBLANG_CHINESE_SIMPLIFIED
),
SORT_DEFAULT
)
},
{
{
0
}
}
};
...
...
dlls/msvcr120/tests/msvcr120.c
View file @
77376936
...
...
@@ -453,11 +453,10 @@ static void test____lc_locale_name_func(void)
const
char
*
locale
;
const
WCHAR
name
[
10
];
const
WCHAR
broken_name
[
10
];
BOOL
todo
;
}
tests
[]
=
{
{
"American"
,
{
'e'
,
'n'
,
0
},
{
'e'
,
'n'
,
'-'
,
'U'
,
'S'
,
0
}
},
{
"Belgian"
,
{
'n'
,
'l'
,
'-'
,
'B'
,
'E'
,
0
}
},
{
"Chinese"
,
{
'z'
,
'h'
,
0
},
{
'z'
,
'h'
,
'-'
,
'C'
,
'N'
,
0
}
,
TRUE
},
{
"Chinese"
,
{
'z'
,
'h'
,
0
},
{
'z'
,
'h'
,
'-'
,
'C'
,
'N'
,
0
}
},
{
"Dutch"
,
{
'n'
,
'l'
,
0
},
{
'n'
,
'l'
,
'-'
,
'N'
,
'L'
,
0
}
},
{
"English"
,
{
'e'
,
'n'
,
0
},
{
'e'
,
'n'
,
'-'
,
'U'
,
'S'
,
0
}
},
{
"French"
,
{
'f'
,
'r'
,
0
},
{
'f'
,
'r'
,
'-'
,
'F'
,
'R'
,
0
}
},
...
...
@@ -476,9 +475,8 @@ static void test____lc_locale_name_func(void)
lc_names
=
p____lc_locale_name_func
();
ok
(
lc_names
[
0
]
==
NULL
,
"%d - lc_names[0] = %s
\n
"
,
i
,
wine_dbgstr_w
(
lc_names
[
0
]));
todo_wine_if
(
tests
[
i
].
todo
)
ok
(
!
lstrcmpW
(
lc_names
[
1
],
tests
[
i
].
name
)
||
broken
(
!
lstrcmpW
(
lc_names
[
1
],
tests
[
i
].
broken_name
)),
"%d - lc_names[1] = %s
\n
"
,
i
,
wine_dbgstr_w
(
lc_names
[
1
]));
ok
(
!
lstrcmpW
(
lc_names
[
1
],
tests
[
i
].
name
)
||
broken
(
!
lstrcmpW
(
lc_names
[
1
],
tests
[
i
].
broken_name
)),
"%d - lc_names[1] = %s
\n
"
,
i
,
wine_dbgstr_w
(
lc_names
[
1
]));
for
(
j
=
LC_MIN
+
2
;
j
<=
LC_MAX
;
j
++
)
{
ok
(
!
lstrcmpW
(
lc_names
[
1
],
lc_names
[
j
]),
"%d - lc_names[%d] = %s, expected %s
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment