Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
5f89c17e
Commit
5f89c17e
authored
1 year ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix some python scripts for translations and skeleton
parent
6131fc27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!3
Update to main branch
,
!2
Rebase onto current main branch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/code_tools/modified_strings.py
+3
-3
3 additions, 3 deletions
scripts/code_tools/modified_strings.py
scripts/content_tools/skel_tool.py
+2
-2
2 additions, 2 deletions
scripts/content_tools/skel_tool.py
with
5 additions
and
5 deletions
scripts/code_tools/modified_strings.py
+
3
−
3
View file @
5f89c17e
...
...
@@ -315,7 +315,7 @@ def save_translation_file(per_lang_data, aux_data, outfile):
worksheet
.
set_column
(
'
B:B
'
,
80
,
wrap_format
)
print
(
"
Writing
"
,
outfile
)
writer
.
sav
e
()
writer
.
clos
e
()
if
__name__
==
"
__main__
"
:
...
...
@@ -325,7 +325,7 @@ def save_translation_file(per_lang_data, aux_data, outfile):
parser
.
add_argument
(
"
--deleted
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
show all translated entities which don
'
t exist in english
"
)
parser
.
add_argument
(
"
--skip_spreadsheet
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
skip creating the translation spreadsheet
"
)
parser
.
add_argument
(
"
--rev
"
,
help
=
"
revision with modified strings, default HEAD
"
,
default
=
"
HEAD
"
)
parser
.
add_argument
(
"
--rev_base
"
,
help
=
"
previous revision to compare against, default ma
ster
"
,
default
=
"
ma
ster
"
)
parser
.
add_argument
(
"
--rev_base
"
,
help
=
"
previous revision to compare against, default ma
in
"
,
default
=
"
ma
in
"
)
parser
.
add_argument
(
"
--base_lang
"
,
help
=
"
base language, default en (normally leave unchanged - other values are only useful for testing)
"
,
default
=
"
en
"
)
parser
.
add_argument
(
"
--lang
"
,
help
=
"
target languages, or
'
all_valid
'
or
'
supported
'
; default is
'
supported
'"
,
nargs
=
"
+
"
,
default
=
[
"
supported
"
])
args
=
parser
.
parse_args
()
...
...
@@ -397,7 +397,7 @@ def save_translation_file(per_lang_data, aux_data, outfile):
if
args
.
deleted
:
deletion_file
=
"
Translate_deletions.txt
"
print
(
"
Saving deletion info to
"
,
deletion_file
)
with
open
(
deletion_file
,
"
w
"
)
as
f
:
with
open
(
deletion_file
,
"
w
"
,
encoding
=
"
utf-8
"
)
as
f
:
for
lang
in
langs
:
find_deletions
(
mod_tree
,
base_tree
,
lang
,
args
,
f
)
This diff is collapsed.
Click to expand it.
scripts/content_tools/skel_tool.py
+
2
−
2
View file @
5f89c17e
...
...
@@ -83,10 +83,10 @@ def enforce_alias_rules(tree, element, fix=False):
if
name
:
std_alias
=
"
avatar_
"
+
name
if
not
std_alias
in
alias_lis
:
print
"
missing expected alias
"
,
name
,
std_alias
print
(
"
missing expected alias
"
,
name
,
std_alias
)
for
alias
in
alias_lis
:
if
alias
.
startswith
(
"
avatar_
"
)
and
alias
!=
std_alias
:
print
"
invalid avatar_ alias
"
,
name
,
alias
print
(
"
invalid avatar_ alias
"
,
name
,
alias
)
def
enforce_symmetry
(
tree
,
element
,
field
,
fix
=
False
):
name
=
element
.
get
(
"
name
"
)
...
...
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