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
a74314d3
Commit
a74314d3
authored
Jan 14, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split text generating from rendering
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
2fee3539
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
weblate/trans/widgets.py
weblate/trans/widgets.py
+6
-3
No files found.
weblate/trans/widgets.py
View file @
a74314d3
...
...
@@ -192,8 +192,7 @@ class Widget(object):
outline
=
COLOR_DATA
[
self
.
color
][
'border'
]
)
def
render_text
(
self
,
text
,
lang_text
,
base_font_size
,
bold_font
,
pos_x
,
pos_y
):
def
get_text
(
self
,
text
,
lang_text
):
# Use language variant if desired
if
self
.
lang
is
not
None
and
lang_text
is
not
None
:
text
=
lang_text
...
...
@@ -201,7 +200,11 @@ class Widget(object):
text
=
text
.
replace
(
'English'
,
self
.
lang
.
name
)
# Format text
text
=
text
%
self
.
params
return
text
%
self
.
params
def
render_text
(
self
,
text
,
lang_text
,
base_font_size
,
bold_font
,
pos_x
,
pos_y
):
text
=
self
.
get_text
(
text
,
lang_text
)
base_font
=
is_base
(
text
)
offset
=
0
...
...
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