diff --git a/MCprep_addon/__init__.py b/MCprep_addon/__init__.py index f9aeea73..3aee06aa 100755 --- a/MCprep_addon/__init__.py +++ b/MCprep_addon/__init__.py @@ -41,7 +41,7 @@ bl_info = { "name": "MCprep", "category": "Object", - "version": (3, 6, 1), + "version": (3, 6, 1, 1), "blender": (2, 80, 0), "location": "3D window toolshelf > MCprep tab", "description": "Minecraft workflow addon for rendering and animation", diff --git a/MCprep_addon/conf.py b/MCprep_addon/conf.py index 38bda7f6..b8cc5a95 100644 --- a/MCprep_addon/conf.py +++ b/MCprep_addon/conf.py @@ -143,15 +143,21 @@ def __init__(self): # i18n using Python's gettext module # # This only runs if translations.py does not exist - if not self.translations.exists(): - self.languages: dict[str, gettext.NullTranslations] = {} - for language in self.languages_folder.iterdir(): - self.languages[language.name] = gettext.translation("mcprep", - self.languages_folder, - fallback=True, - languages=[language.name]) + try: + if not self.translations.exists(): + self.languages: dict[str, gettext.NullTranslations] = {} + for language in self.languages_folder.iterdir(): + self.languages[language.name] = gettext.translation("mcprep", + self.languages_folder, + fallback=True, + languages=[language.name]) self.use_direct_i18n = True self.log("Loaded direct i18n!") + + except Exception: + self.languages = {} + self.log("Exception occured while loading translations!") + # This allows us to translate strings on the fly def _(self, msg: str) -> str: diff --git a/push_latest.sh b/push_latest.sh index 885618e4..d5b033ac 100755 --- a/push_latest.sh +++ b/push_latest.sh @@ -55,8 +55,14 @@ rm MCprep_addon/mcprep_addon_tracker.json rm mcprep_addon_trackerid.json echo "Building prod addon..." -bpy-addon-build -b translate # No --during-build dev to make it prod. -ls build/MCprep_addon.zip +bab -b translate # No --during-build dev to make it prod. +if [ $? -eq 0 ]; then + echo "Build complete" + ls build/MCprep_addon.zip +else + echo "Build failed" + exit +fi # ----------------------------------------------------------------------------- # Cross check no local changes, such as updated translations