Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
36bc86bf
Commit
36bc86bf
authored
14 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
wrc: Remove the context prefix when generating the po file for English.
parent
036fe88e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/wrc/po.c
+9
-8
9 additions, 8 deletions
tools/wrc/po.c
with
9 additions
and
8 deletions
tools/wrc/po.c
+
9
−
8
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment