Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
f6cfb5bc
Commit
f6cfb5bc
authored
9 years ago
by
Bastien Montagne
Browse files
Options
Downloads
Patches
Plain Diff
CLeanup: 'addon' -> 'add-on' in UI messages.
parent
b7e87b9c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ui_translate/settings.py
+1
-1
1 addition, 1 deletion
ui_translate/settings.py
ui_translate/update_addon.py
+13
-13
13 additions, 13 deletions
ui_translate/update_addon.py
ui_translate/update_ui.py
+2
-2
2 additions, 2 deletions
ui_translate/update_ui.py
with
16 additions
and
16 deletions
ui_translate/settings.py
+
1
−
1
View file @
f6cfb5bc
...
...
@@ -175,7 +175,7 @@ class UI_AP_i18n_settings(bpy.types.AddonPreferences):
def
draw
(
self
,
context
):
layout
=
self
.
layout
layout
.
label
(
text
=
"
WARNING: preferences are lost when addon is disabled, be sure to use
\"
Save Persistent
\"
"
layout
.
label
(
text
=
"
WARNING: preferences are lost when add
-
on is disabled, be sure to use
\"
Save Persistent
\"
"
"
if you want to keep your settings!
"
)
layout
.
prop
(
self
,
"
WARN_MSGID_NOT_CAPITALIZED
"
)
layout
.
prop
(
self
,
"
GETTEXT_MSGFMT_EXECUTABLE
"
)
...
...
This diff is collapsed.
Click to expand it.
ui_translate/update_addon.py
+
13
−
13
View file @
f6cfb5bc
...
...
@@ -57,12 +57,12 @@ def validate_module(op, context):
module_name
=
addon
.
module
if
not
module_name
:
op
.
report
({
'
ERROR
'
},
"
No addon module given!
"
)
op
.
report
({
'
ERROR
'
},
"
No add
-
on module given!
"
)
return
None
,
None
mod
=
utils_i18n
.
enable_addons
(
addons
=
{
module_name
},
check_only
=
True
)
if
not
mod
:
op
.
report
({
'
ERROR
'
},
"
Addon
'
{}
'
not found!
"
.
format
(
module_name
))
op
.
report
({
'
ERROR
'
},
"
Add
-
on
'
{}
'
not found!
"
.
format
(
module_name
))
return
None
,
None
return
module_name
,
mod
[
0
]
...
...
@@ -96,10 +96,10 @@ def enum_addons(self, context):
class
UI_OT_i18n_addon_translation_invoke
(
bpy
.
types
.
Operator
):
"""
Wrapper operator which will invoke given op after setting its module_name
"""
bl_idname
=
"
ui.i18n_addon_translation_invoke
"
bl_label
=
"
Update I18n Addon
"
bl_label
=
"
Update I18n Add
-
on
"
bl_property
=
"
module_name
"
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Addon
"
,
description
=
"
Addon to process
"
,
options
=
set
())
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Add
-
on
"
,
description
=
"
Add
-
on to process
"
,
options
=
set
())
op_id
=
StringProperty
(
name
=
"
Operator Name
"
,
description
=
"
Name (id) of the operator to invoke
"
)
def
invoke
(
self
,
context
,
event
):
...
...
@@ -122,11 +122,11 @@ class UI_OT_i18n_addon_translation_invoke(bpy.types.Operator):
return
op
(
'
INVOKE_DEFAULT
'
,
module_name
=
self
.
module_name
)
class
UI_OT_i18n_addon_translation_update
(
bpy
.
types
.
Operator
):
"""
Update given addon
'
s translation data (found as a py tuple in the addon
'
s source code)
"""
"""
Update given add
-
on
'
s translation data (found as a py tuple in the add
-
on
'
s source code)
"""
bl_idname
=
"
ui.i18n_addon_translation_update
"
bl_label
=
"
Update I18n Addon
"
bl_label
=
"
Update I18n Add
-
on
"
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Addon
"
,
description
=
"
Addon to process
"
,
options
=
set
())
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Add
-
on
"
,
description
=
"
Add
-
on to process
"
,
options
=
set
())
def
execute
(
self
,
context
):
global
_cached_enum_addons
...
...
@@ -175,11 +175,11 @@ class UI_OT_i18n_addon_translation_update(bpy.types.Operator):
class
UI_OT_i18n_addon_translation_import
(
bpy
.
types
.
Operator
):
"""
Import given addon
'
s translation data from PO files
"""
"""
Import given add
-
on
'
s translation data from PO files
"""
bl_idname
=
"
ui.i18n_addon_translation_import
"
bl_label
=
"
I18n Addon Import
"
bl_label
=
"
I18n Add
-
on Import
"
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Addon
"
,
description
=
"
Addon to process
"
,
options
=
set
())
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Add
-
on
"
,
description
=
"
Add
-
on to process
"
,
options
=
set
())
directory
=
StringProperty
(
maxlen
=
1024
,
subtype
=
'
FILE_PATH
'
,
options
=
{
'
HIDDEN
'
,
'
SKIP_SAVE
'
})
def
_dst
(
self
,
trans
,
path
,
uid
,
kind
):
...
...
@@ -254,11 +254,11 @@ class UI_OT_i18n_addon_translation_import(bpy.types.Operator):
class
UI_OT_i18n_addon_translation_export
(
bpy
.
types
.
Operator
):
"""
Export given addon
'
s translation data as PO files
"""
"""
Export given add
-
on
'
s translation data as PO files
"""
bl_idname
=
"
ui.i18n_addon_translation_export
"
bl_label
=
"
I18n Addon Export
"
bl_label
=
"
I18n Add
-
on Export
"
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Addon
"
,
description
=
"
Addon to process
"
,
options
=
set
())
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Add
-
on
"
,
description
=
"
Add
-
on to process
"
,
options
=
set
())
use_export_pot
=
BoolProperty
(
name
=
"
Export POT
"
,
default
=
True
,
description
=
"
Export (generate) a POT file too
"
)
use_update_existing
=
BoolProperty
(
name
=
"
Update Existing
"
,
default
=
True
,
description
=
"
Update existing po files, if any, instead of overwriting them
"
)
...
...
This diff is collapsed.
Click to expand it.
ui_translate/update_ui.py
+
2
−
2
View file @
f6cfb5bc
...
...
@@ -100,7 +100,7 @@ class UI_PT_i18n_update_translations_settings(bpy.types.Panel):
if
not
i18n_sett
.
is_init
:
layout
.
label
(
text
=
"
Could not init languages data!
"
)
layout
.
label
(
text
=
"
Please edit the preferences of the UI Translate addon
"
)
layout
.
label
(
text
=
"
Please edit the preferences of the UI Translate add
-
on
"
)
else
:
split
=
layout
.
split
(
0.75
)
split
.
template_list
(
"
UI_UL_i18n_languages
"
,
""
,
i18n_sett
,
"
langs
"
,
i18n_sett
,
"
active_lang
"
,
rows
=
8
)
...
...
@@ -132,7 +132,7 @@ class UI_PT_i18n_update_translations_settings(bpy.types.Panel):
layout
.
prop
(
i18n_sett
,
"
pot_path
"
)
layout
.
separator
()
layout
.
label
(
"
Addons:
"
)
layout
.
label
(
"
Add
-
ons:
"
)
row
=
layout
.
row
()
op
=
row
.
operator
(
"
ui.i18n_addon_translation_invoke
"
,
text
=
"
Refresh I18n Data...
"
)
op
.
op_id
=
"
ui.i18n_addon_translation_update
"
...
...
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