Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
dc511902
Commit
dc511902
authored
Sep 20, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workaround missing unescaping in ttkit properties (issue #114)
parent
f14f6150
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
weblate/trans/util.py
weblate/trans/util.py
+11
-0
No files found.
weblate/trans/util.py
View file @
dc511902
...
...
@@ -19,6 +19,9 @@
#
import
hashlib
import
re
from
translate.misc
import
quote
from
translate.storage.properties
import
propunit
PLURAL_SEPARATOR
=
'
\
x00
\
x00
'
...
...
@@ -78,6 +81,14 @@ def get_target(unit):
if
unit
is
None
:
return
''
if
is_unit_key_value
(
unit
):
# Need to decode property encoded string
if
isinstance
(
unit
,
propunit
):
# This is basically stolen from
# translate.storage.properties.propunit.gettarget
# which for some reason does not return translation
value
=
quote
.
propertiesdecode
(
unit
.
value
)
value
=
re
.
sub
(
u"
\
\
\
\
"
,
u" "
,
value
)
return
value
return
unit
.
value
else
:
if
hasattr
(
unit
.
target
,
'strings'
):
...
...
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