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
36bc86bf
Commit
36bc86bf
authored
Jan 14, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Remove the context prefix when generating the po file for English.
parent
036fe88e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
po.c
tools/wrc/po.c
+9
-8
No files found.
tools/wrc/po.c
View file @
36bc86bf
...
...
@@ -301,6 +301,11 @@ static void po_xerror2( int severity, po_message_t message1,
static
const
struct
po_xerror_handler
po_xerror_handler
=
{
po_xerror
,
po_xerror2
};
static
int
is_english
(
const
language_t
*
lan
)
{
return
lan
->
id
==
LANG_ENGLISH
&&
lan
->
sub
==
SUBLANG_DEFAULT
;
}
static
char
*
convert_string_utf8
(
const
string_t
*
str
,
int
codepage
)
{
string_t
*
newstr
=
convert_string
(
str
,
str_unicode
,
codepage
);
...
...
@@ -371,7 +376,7 @@ static void add_po_string( po_file_t po, const string_t *msgid, const string_t *
po_message_t
msg
;
po_message_iterator_t
iterator
;
int
codepage
;
char
*
id
,
*
id_buffer
,
*
context
,
*
str_buffer
=
NULL
;
char
*
id
,
*
id_buffer
,
*
context
,
*
str
=
NULL
,
*
str
_buffer
=
NULL
;
if
(
!
msgid
->
size
)
return
;
...
...
@@ -383,13 +388,14 @@ static void add_po_string( po_file_t po, const string_t *msgid, const string_t *
if
(
lang
)
codepage
=
get_language_codepage
(
lang
->
id
,
lang
->
sub
);
else
codepage
=
get_language_codepage
(
0
,
0
);
assert
(
codepage
!=
-
1
);
str_buffer
=
convert_string_utf8
(
msgstr
,
codepage
);
str_buffer
=
str
=
convert_string_utf8
(
msgstr
,
codepage
);
if
(
is_english
(
lang
))
get_message_context
(
&
str
);
}
if
(
!
(
msg
=
find_message
(
po
,
id
,
context
,
&
iterator
)))
{
msg
=
po_message_create
();
po_message_set_msgid
(
msg
,
id
);
po_message_set_msgstr
(
msg
,
str
_buffer
?
str_buffe
r
:
""
);
po_message_set_msgstr
(
msg
,
str
?
st
r
:
""
);
if
(
context
)
po_message_set_msgctxt
(
msg
,
context
);
po_message_insert
(
iterator
,
msg
);
}
...
...
@@ -631,11 +637,6 @@ static void add_po_menu( const resource_t *english, const resource_t *res )
add_po_menu_items
(
po
,
english_items
,
items
,
res
->
res
.
men
->
lvc
.
language
);
}
static
int
is_english
(
const
language_t
*
lan
)
{
return
lan
->
id
==
LANG_ENGLISH
&&
lan
->
sub
==
SUBLANG_DEFAULT
;
}
static
resource_t
*
find_english_resource
(
resource_t
*
res
)
{
resource_t
*
ptr
;
...
...
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