Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
html2protoxml
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexis Filipozzi
html2protoxml
Commits
956bfd67
There was a problem fetching the pipeline summary.
Commit
956bfd67
authored
8 years ago
by
Alexis Filipozzi
Browse files
Options
Downloads
Patches
Plain Diff
add style in DOWMLStyle element
parent
283f2b2f
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.txt
+0
-24
0 additions, 24 deletions
README.txt
formatter.py
+30
-1
30 additions, 1 deletion
formatter.py
with
30 additions
and
25 deletions
README.txt
+
0
−
24
View file @
956bfd67
...
...
@@ -8,27 +8,3 @@ Pour installer lxml il faut installer paquets :
- libxml2-dev
- python2.7-dev
- libxslt1-dev
Il faudra fournir un fichier de style guide-style.protoxml à la racine du dossier traduit, par exemple :
<?xml version="1.0" encoding="UTF-8"?>
<package name="com.daysofwonder.dowml">
<message class="DOWMLStyle">
<text_attributes>
<size>22</size>
<font>TimesNewRomanPSMT</font>
<alignment>NEAR</alignment>
<vertical_alignment>NEAR</vertical_alignment>
</text_attributes>
<layout>
<!--<size relative_width="1" relative_height="1"/>-->
<secondary_alignment>CENTER</secondary_alignment>
<weight>1</weight>
</layout>
</message>
</package>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
formatter.py
+
30
−
1
View file @
956bfd67
...
...
@@ -21,9 +21,38 @@ class Formatter:
root
.
append
(
message
)
style
=
etree
.
Element
(
"
style
"
)
style
.
attrib
[
"
inherits
"
]
=
(
"
../
"
*
self
.
_recursion_level
)
+
"
guide-style.protoxml
"
text_attrib
=
etree
.
Element
(
"
text_attributes
"
)
style
.
append
(
text_attrib
)
message
.
append
(
style
)
size
=
etree
.
Element
(
"
size
"
)
size
.
text
=
"
22
"
text_attrib
.
append
(
size
)
font
=
etree
.
Element
(
"
font
"
)
font
.
text
=
"
TimesNewRomanPSMT
"
text_attrib
.
append
(
font
)
align
=
etree
.
Element
(
"
alignment
"
)
align
.
text
=
"
NEAR
"
text_attrib
.
append
(
align
)
vert_align
=
etree
.
Element
(
"
vertical_alignment
"
)
vert_align
.
text
=
"
NEAR
"
text_attrib
.
append
(
vert_align
)
lay
=
etree
.
Element
(
"
layout
"
)
style
.
append
(
lay
)
sec_align
=
etree
.
Element
(
"
secondary_alignment
"
)
sec_align
.
text
=
"
CENTER
"
lay
.
append
(
sec_align
)
weight
=
etree
.
Element
(
"
weight
"
)
weight
.
text
=
"
1
"
lay
.
append
(
weight
)
body
=
etree
.
Element
(
"
body
"
)
message
.
append
(
body
)
...
...
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