Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
85a39a97
Commit
85a39a97
authored
Mar 28, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Reimplement LOCALE_*LANGNAME in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
956c88db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
locale.c
dlls/kernelbase/locale.c
+7
-6
locale.c
dlls/msvcrt/locale.c
+7
-2
No files found.
dlls/kernelbase/locale.c
View file @
85a39a97
...
...
@@ -906,10 +906,10 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return
-
1
;
case
LOCALE_SABBREVLANGNAME
:
return
-
1
;
return
locale_return_string
(
locale
->
sabbrevlangname
,
type
,
buffer
,
len
)
;
case
LOCALE_SNATIVELANGNAME
:
return
-
1
;
return
locale_return_string
(
locale
->
snativelangname
,
type
,
buffer
,
len
)
;
case
LOCALE_ICOUNTRY
:
return
-
1
;
...
...
@@ -1094,7 +1094,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return
-
1
;
case
LOCALE_SISO639LANGNAME
:
return
-
1
;
return
locale_return_string
(
locale
->
siso639langname
,
type
,
buffer
,
len
)
;
case
LOCALE_SISO3166CTRYNAME
:
return
-
1
;
...
...
@@ -1126,7 +1126,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return
-
1
;
case
LOCALE_SISO639LANGNAME2
:
return
-
1
;
return
locale_return_string
(
locale
->
siso639langname2
,
type
,
buffer
,
len
)
;
case
LOCALE_SISO3166CTRYNAME2
:
return
-
1
;
...
...
@@ -1150,7 +1150,8 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return
-
1
;
case
LOCALE_SLOCALIZEDLANGUAGENAME
:
return
-
1
;
/* FIXME: localization */
return
locale_return_string
(
locale
->
senglanguage
,
type
,
buffer
,
len
);
case
LOCALE_IREADINGLAYOUT
:
return
-
1
;
...
...
@@ -1201,7 +1202,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return
-
1
;
case
LOCALE_SENGLANGUAGE
:
return
-
1
;
return
locale_return_string
(
locale
->
senglanguage
,
type
,
buffer
,
len
)
;
case
LOCALE_SENGCOUNTRY
:
return
-
1
;
...
...
dlls/msvcrt/locale.c
View file @
85a39a97
...
...
@@ -525,8 +525,13 @@ static BOOL update_threadlocinfo_category(LCID lcid, unsigned short cp,
if
(
!
locinfo
->
lc_category
[
category
].
locale
)
{
int
len
=
0
;
len
+=
GetLocaleInfoA
(
lcid
,
LOCALE_SENGLANGUAGE
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
if
(
lcid
==
MAKELANGID
(
LANG_NORWEGIAN
,
SUBLANG_NORWEGIAN_NYNORSK
))
{
/* locale.nls contains "Norwegian Nynorsk" instead for LOCALE_SENGLANGUAGE */
strcpy
(
buf
,
"Norwegian-Nynorsk"
);
len
=
strlen
(
buf
)
+
1
;
}
else
len
+=
GetLocaleInfoA
(
lcid
,
LOCALE_SENGLANGUAGE
|
LOCALE_NOUSEROVERRIDE
,
buf
,
256
);
buf
[
len
-
1
]
=
'_'
;
len
+=
GetLocaleInfoA
(
lcid
,
LOCALE_SENGCOUNTRY
|
LOCALE_NOUSEROVERRIDE
,
&
buf
[
len
],
256
-
len
);
...
...
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