Fix io_anim_camera error exporting cameras with quotes in their name
[blender-addons.git] / ui_translate / __init__.py
blob06c91430ef8df4ba163b3805daba985022066392
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # <pep8 compliant>
5 bl_info = {
6 "name": "Manage UI translations",
7 "author": "Bastien Montagne",
8 "version": (1, 3, 2),
9 "blender": (2, 92, 0),
10 "location": "Main \"File\" menu, text editor, any UI control",
11 "description": "Allows managing UI translations directly from Blender "
12 "(update main .po files, update scripts' translations, etc.)",
13 "warning": "Still in development, not all features are fully implemented yet!",
14 "doc_url": "http://wiki.blender.org/index.php/Dev:Doc/How_to/Translate_Blender",
15 "support": 'OFFICIAL',
16 "category": "System",
20 if "bpy" in locals():
21 import importlib
22 importlib.reload(settings)
23 importlib.reload(edit_translation)
24 importlib.reload(update_svn)
25 importlib.reload(update_addon)
26 importlib.reload(update_ui)
27 else:
28 import bpy
29 from . import (
30 settings,
31 edit_translation,
32 update_svn,
33 update_addon,
34 update_ui,
38 classes = settings.classes + edit_translation.classes + update_svn.classes + update_addon.classes + update_ui.classes
41 def register():
42 for cls in classes:
43 bpy.utils.register_class(cls)
45 bpy.types.WindowManager.i18n_update_svn_settings = \
46 bpy.props.PointerProperty(type=update_ui.I18nUpdateTranslationSettings)
48 # Init addon's preferences (unfortunately, as we are using an external storage for the properties,
49 # the load/save user preferences process has no effect on them :( ).
50 if __name__ in bpy.context.preferences.addons:
51 pref = bpy.context.preferences.addons[__name__].preferences
52 import os
53 if os.path.isfile(pref.persistent_data_path):
54 pref._settings.load(pref.persistent_data_path, reset=True)
57 def unregister():
58 for cls in classes:
59 bpy.utils.unregister_class(cls)
61 del bpy.types.WindowManager.i18n_update_svn_settings