AnimAll and Sun Position: update translations for regeneration ease

Bring back the auto-generated block delimiters
Also: sort unregister() in reverse order to register()
This commit is contained in:
Damien Picard 2022-07-16 20:39:30 +02:00
parent 0e3978e17a
commit 0b6aaad9be
4 changed files with 38 additions and 41 deletions

View File

@ -662,14 +662,12 @@ def register():
register_classes()
bpy.types.Scene.animall_properties = bpy.props.PointerProperty(type=AnimallProperties)
update_panel(None, bpy.context)
bpy.app.translations.register(__name__, translations.translations_dict)
def unregister():
bpy.app.translations.unregister(__name__)
del bpy.types.Scene.animall_properties
unregister_classes()
bpy.app.translations.unregister(__name__)
if __name__ == "__main__":
register()

View File

@ -1,11 +1,16 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ##### BEGIN AUTOGENERATED I18N SECTION #####
# NOTE: You can safely move around this auto-generated block (with the begin/end markers!),
# and edit the translations by hand.
# Just carefully respect the format of the tuple!
# Tuple of tuples:
# ((msgctxt, msgid), (sources, gen_comments), (lang, translation, (is_fuzzy, comments)), ...)
translations_tuple = (
(("*", ""),
((), ()),
("fr_FR", "Project-Id-Version: AnimAll 0.9.6 (0)\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2022-06-24 00:41:10.347798\nPO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\nLast-Translator: FULL NAME <EMAIL@ADDRESS>\nLanguage-Team: LANGUAGE <LL@li.org>\nLanguage: __POT__\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit",
("fr_FR", "Project-Id-Version: AnimAll 0.9.6 (0)\n",
(False,
("Blender's translation file (po format).",
"Copyright (C) 2022 The Blender Foundation.",
@ -248,3 +253,5 @@ for msg in translations_tuple:
for lang, trans, (is_fuzzy, comments) in msg[2:]:
if trans and not is_fuzzy:
translations_dict.setdefault(lang, {})[key] = trans
# ##### END AUTOGENERATED I18N SECTION #####

View File

@ -48,16 +48,13 @@ def register():
register_classes()
bpy.types.Scene.sun_pos_properties = (
bpy.props.PointerProperty(type=properties.SunPosProperties,
name="Sun Position",
description="Sun Position Settings"))
bpy.app.translations.register(__name__, translations.translations_dict)
name="Sun Position",
description="Sun Position Settings"))
bpy.app.handlers.frame_change_post.append(sun_calc.sun_handler)
bpy.app.translations.register(__name__, translations.translations_dict)
def unregister():
del bpy.types.Scene.sun_pos_properties
unregister_classes()
bpy.app.translations.unregister(__name__)
bpy.app.handlers.frame_change_post.remove(sun_calc.sun_handler)
del bpy.types.Scene.sun_pos_properties
unregister_classes()

View File

@ -1,11 +1,16 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# ##### BEGIN AUTOGENERATED I18N SECTION #####
# NOTE: You can safely move around this auto-generated block (with the begin/end markers!),
# and edit the translations by hand.
# Just carefully respect the format of the tuple!
# Tuple of tuples:
# ((msgctxt, msgid), (sources, gen_comments), (lang, translation, (is_fuzzy, comments)), ...)
translations_tuple = (
(("*", ""),
((), ()),
("fr_FR", "Project-Id-Version: Sun Position 3.1.2 (0)\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2022-06-30 15:02:06.261278\nPO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\nLast-Translator: FULL NAME <EMAIL@ADDRESS>\nLanguage-Team: LANGUAGE <LL@li.org>\nLanguage: __POT__\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit",
("fr_FR", "Project-Id-Version: Sun Position 3.1.2 (0)\n",
(False,
("Blender's translation file (po format).",
"Copyright (C) 2022 The Blender Foundation.",
@ -117,12 +122,6 @@ translations_tuple = (
("fr_FR", "Préréglages de position du Soleil",
(False, ())),
),
(("Operator", "Synchroniser Soleil et texture"),
(("bpy.types.WORLD_OT_sunpos_show_hdr",),
()),
("fr_FR", "",
(False, ())),
),
(("*", "UTC zone"),
(("bpy.types.SunPosProperties.UTC_zone",),
()),
@ -287,12 +286,6 @@ translations_tuple = (
("fr_FR", "Objet soleil à utiliser dans la scène",
(False, ())),
),
(("*", "Day Time"),
(("bpy.types.SunPosProperties.UTC_zone",),
()),
("fr_FR", "Heure",
(False, ())),
),
(("*", "Time of the day"),
(("bpy.types.SunPosProperties.time",),
()),
@ -414,42 +407,42 @@ translations_tuple = (
(False, ())),
),
(("*", "UTC:"),
(("scripts/addons/sun_position/ui_sun.py:270",),
(("scripts/addons/sun_position/ui_sun.py:272",),
()),
("fr_FR", "UTC : ",
(False, ())),
),
(("*", "Sunrise:"),
(("scripts/addons/sun_position/ui_sun.py:285",),
()),
("fr_FR", "Lever : ",
(False, ())),
),
(("*", "Sunset:"),
(("scripts/addons/sun_position/ui_sun.py:288",),
()),
("fr_FR", "Coucher : ",
(False, ())),
),
(("*", "Please select World in the World panel."),
(("scripts/addons/sun_position/ui_sun.py:95",
"scripts/addons/sun_position/ui_sun.py:153"),
()),
("fr_FR", "Veuillez sélecttionner le monde dans le panneau Monde",
("fr_FR", "Veuillez sélectionner le monde dans le panneau Monde",
(False, ())),
),
(("*", "Azimuth:"),
(("scripts/addons/sun_position/ui_sun.py:206",),
(("scripts/addons/sun_position/ui_sun.py:205",),
()),
("fr_FR", "Azimut :",
(False, ())),
),
(("*", "Elevation:"),
(("scripts/addons/sun_position/ui_sun.py:209",),
(("scripts/addons/sun_position/ui_sun.py:208",),
()),
("fr_FR", "Hauteur :",
(False, ())),
),
(("*", "Sunrise:"),
(("scripts/addons/sun_position/ui_sun.py:284",),
()),
("fr_FR", "Lever : ",
(False, ())),
),
(("*", "Sunset:"),
(("scripts/addons/sun_position/ui_sun.py:287",),
()),
("fr_FR", "Coucher : ",
(False, ())),
),
(("*", "Please activate Use Nodes in the World panel."),
(("scripts/addons/sun_position/ui_sun.py:92",
"scripts/addons/sun_position/ui_sun.py:150"),
@ -465,3 +458,5 @@ for msg in translations_tuple:
for lang, trans, (is_fuzzy, comments) in msg[2:]:
if trans and not is_fuzzy:
translations_dict.setdefault(lang, {})[key] = trans
# ##### END AUTOGENERATED I18N SECTION #####