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
8f08aee0
Commit
8f08aee0
authored
Apr 07, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Only add translations for specific fields in version blocks.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9694aeb0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
wine_common_ver.rc
include/wine/wine_common_ver.rc
+6
-6
po.c
tools/wrc/po.c
+16
-0
No files found.
include/wine/wine_common_ver.rc
View file @
8f08aee0
...
...
@@ -125,14 +125,14 @@ FILESUBTYPE WINE_FILESUBTYPE
/* LANG_ENGLISH/SUBLANG_DEFAULT, WINE_CODEPAGE */
BLOCK "0409" WINE_CODEPAGE_STR
{
VALUE "CompanyName", "
#msgctxt#do not translate#
Microsoft Corporation" /* GameGuard depends on this */
VALUE "CompanyName", "Microsoft Corporation" /* GameGuard depends on this */
VALUE "FileDescription", WINE_FILEDESCRIPTION_STR
VALUE "FileVersion",
"#msgctxt#do not translate#"
WINE_FILEVERSION_STR
VALUE "InternalName",
"#msgctxt#do not translate#"
WINE_FILENAME
VALUE "LegalCopyright",
"#msgctxt#do not translate#"
WINE_LEGALCOPYRIGHT
VALUE "OriginalFilename",
"#msgctxt#do not translate#"
WINE_FILENAME_STR
VALUE "FileVersion", WINE_FILEVERSION_STR
VALUE "InternalName", WINE_FILENAME
VALUE "LegalCopyright", WINE_LEGALCOPYRIGHT
VALUE "OriginalFilename", WINE_FILENAME_STR
VALUE "ProductName", WINE_PRODUCTNAME_STR
VALUE "ProductVersion",
"#msgctxt#do not translate#"
WINE_PRODUCTVERSION_STR
VALUE "ProductVersion", WINE_PRODUCTVERSION_STR
WINE_EXTRAVALUES
}
}
...
...
tools/wrc/po.c
View file @
8f08aee0
...
...
@@ -917,6 +917,21 @@ static ver_block_t *get_version_langcharset_block( ver_block_t *block )
return
NULL
;
}
static
int
version_value_needs_translation
(
const
ver_value_t
*
val
)
{
int
ret
;
char
*
key
;
if
(
val
->
type
!=
val_str
)
return
0
;
if
(
!
(
key
=
convert_msgid_ascii
(
val
->
key
,
0
)))
return
0
;
/* most values contain version numbers or file names, only translate a few specific ones */
ret
=
(
!
strcasecmp
(
key
,
"FileDescription"
)
||
!
strcasecmp
(
key
,
"ProductName"
));
free
(
key
);
return
ret
;
}
static
void
add_pot_versioninfo
(
po_file_t
po
,
const
resource_t
*
res
)
{
ver_value_t
*
val
;
...
...
@@ -924,6 +939,7 @@ static void add_pot_versioninfo( po_file_t po, const resource_t *res )
if
(
!
langcharset
)
return
;
for
(
val
=
langcharset
->
values
;
val
;
val
=
val
->
next
)
if
(
version_value_needs_translation
(
val
))
add_po_string
(
po
,
val
->
value
.
str
,
NULL
,
NULL
);
}
...
...
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