Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDuckCow committed Aug 24, 2024
2 parents b02feea + 74ef0d9 commit 1fc0a85
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion MCprep_addon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
20 changes: 13 additions & 7 deletions MCprep_addon/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions push_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fc0a85

Please sign in to comment.