[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4183] trunk/py/scripts/addons/ render_copy_settings: Fix to i18n stuff (mostly, handles correctly non-WITH_INTERNATIONAL builds, which do not have any bpy .app.translations module).
Bastien Montagne
montagne29 at wanadoo.fr
Mon Jan 21 12:00:18 CET 2013
Revision: 4183
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4183
Author: mont29
Date: 2013-01-21 11:00:17 +0000 (Mon, 21 Jan 2013)
Log Message:
-----------
Fix to i18n stuff (mostly, handles correctly non-WITH_INTERNATIONAL builds, which do not have any bpy.app.translations module).
Modified Paths:
--------------
trunk/py/scripts/addons/render_copy_settings/__init__.py
trunk/py/scripts/addons/render_copy_settings/translations.py
Modified: trunk/py/scripts/addons/render_copy_settings/__init__.py
===================================================================
--- trunk/py/scripts/addons/render_copy_settings/__init__.py 2013-01-21 00:41:55 UTC (rev 4182)
+++ trunk/py/scripts/addons/render_copy_settings/__init__.py 2013-01-21 11:00:17 UTC (rev 4183)
@@ -90,7 +90,8 @@
bpy.types.Scene.render_copy_settings = PointerProperty(type=RenderCopySettings)
bpy.utils.register_module(__name__)
- bpy.app.translations.register(__name__, translations.translations_dict)
+ if hasattr(bpy.app, "translations"):
+ bpy.app.translations.register(__name__, translations.translations_dict)
def unregister():
@@ -101,7 +102,8 @@
del bpy.types.Scene.render_copy_settings
bpy.utils.unregister_module(__name__)
- bpy.app.translations.unregister(__name__)
+ if hasattr(bpy.app, "translations"):
+ bpy.app.translations.unregister(__name__)
if __name__ == "__main__":
Modified: trunk/py/scripts/addons/render_copy_settings/translations.py
===================================================================
--- trunk/py/scripts/addons/render_copy_settings/translations.py 2013-01-21 00:41:55 UTC (rev 4182)
+++ trunk/py/scripts/addons/render_copy_settings/translations.py 2013-01-21 11:00:17 UTC (rev 4183)
@@ -20,9 +20,9 @@
# Tuple of tuples (key, (sources, comments), (lang, translation, (is_fuzzy, comments)), ...)
translations_tuple = (
- (("", "Allows to copy a selection of render settings from current scene to others."),
+ ((None, "Allows to copy a selection of render settings from current scene to others."),
((), ()),
- ("fr", "Permet de copier une sélection des réglages de rendu depuis la scène courante vers d’autres scènes",
+ ("fr", "Permet de copier une sélection des réglages de rendu depuis la scène courante vers d’autres scènes.",
(False, ())),
),
)
More information about the Bf-extensions-cvs
mailing list