Fix error in rigify property generation
[blender-addons.git] / ui_translate / __init__.py
blob20f7b884836ba03e8d91ce72b97b235f8647b347
1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
19 # <pep8 compliant>
21 bl_info = {
22 "name": "Manage UI translations",
23 "author": "Bastien Montagne",
24 "version": (1, 3, 1),
25 "blender": (2, 92, 0),
26 "location": "Main \"File\" menu, text editor, any UI control",
27 "description": "Allows managing UI translations directly from Blender "
28 "(update main .po files, update scripts' translations, etc.)",
29 "warning": "Still in development, not all features are fully implemented yet!",
30 "doc_url": "http://wiki.blender.org/index.php/Dev:Doc/How_to/Translate_Blender",
31 "support": 'OFFICIAL',
32 "category": "System",
36 if "bpy" in locals():
37 import importlib
38 importlib.reload(settings)
39 importlib.reload(edit_translation)
40 importlib.reload(update_svn)
41 importlib.reload(update_addon)
42 importlib.reload(update_ui)
43 else:
44 import bpy
45 from . import (
46 settings,
47 edit_translation,
48 update_svn,
49 update_addon,
50 update_ui,
54 classes = settings.classes + edit_translation.classes + update_svn.classes + update_addon.classes + update_ui.classes
57 def register():
58 for cls in classes:
59 bpy.utils.register_class(cls)
61 bpy.types.WindowManager.i18n_update_svn_settings = \
62 bpy.props.PointerProperty(type=update_ui.I18nUpdateTranslationSettings)
64 # Init addon's preferences (unfortunately, as we are using an external storage for the properties,
65 # the load/save user preferences process has no effect on them :( ).
66 if __name__ in bpy.context.preferences.addons:
67 pref = bpy.context.preferences.addons[__name__].preferences
68 import os
69 if os.path.isfile(pref.persistent_data_path):
70 pref._settings.load(pref.persistent_data_path, reset=True)
73 def unregister():
74 for cls in classes:
75 bpy.utils.unregister_class(cls)
77 del bpy.types.WindowManager.i18n_update_svn_settings