Commit Graph

3585 Commits

Author SHA1 Message Date
Andrej730 30d5141408 allow missing translations.py as not everyone will need translations for BBIM 2024-04-16 11:26:46 +02:00
Andrej730 1b69de2fd4 auto enable "Manage UI Translations" addon if it's not enabled 2024-04-16 11:26:46 +02:00
Andrej730 a3d029f9d9 add without-blender-way to generate translations module from po files
though it does require `bpy` module which is available only for python 3.10.
Actually, `bpy` module by itself is not necessary - we just need `bl_i18n_utils` that becomes available after `import `bpy`. So alternatively we can just download that module from Blender https://projects.blender.org/blender/blender/src/branch/main/scripts/modules/bl_i18n_utils
2024-04-16 11:26:46 +02:00
Andrej730 e1147c1cb8 black format 2024-04-16 11:26:46 +02:00
Andrej730 364c6efc68 check if translation ui is loaded by current Blender session instead of current Blender file
as it's more reliable and thing could change after Blender restart
2024-04-16 11:26:46 +02:00
Andrej730 793eebbdbb expose i18n path in translator UI
removed bim.open_po_directory operator as it's now available just from alt-clicking on the path browsing button
2024-04-16 11:26:46 +02:00
Andrej730 37d6b24e84 Update bbim_setup_translations.py 2024-04-16 11:26:46 +02:00
Andrej730 e76ef4bb73 fix issues with empty paths accepted as valid paths 2024-04-16 11:26:46 +02:00
Andrej730 1435207ab6 separate developer/translator ui 2024-04-16 11:26:46 +02:00
Andrej730 41b9000401 generate pot file too converting translations.py 2024-04-16 11:26:46 +02:00
Andrej730 94b1a1ba4e change test addon name from localization_test 2024-04-16 11:26:46 +02:00
Andrej730 b34882e6d1 semi-automatic setup for necessary directories 2024-04-16 11:26:46 +02:00
Andrej730 4a0625e730 register translations dict only if addon is already loaded 2024-04-16 11:26:46 +02:00
Andrej730 3973a6ab4d open .po directory operator 2024-04-16 11:26:46 +02:00
Andrej730 b9ecc394cf Operator to disable BBIM and restart Blender
as it's needed to reload the translations

Update bbim_setup_translations.py

Update bbim_setup_translations.py
2024-04-16 11:26:46 +02:00
Andrej730 b3990e7267 convert setup_translations to blender addon for UI 2024-04-16 11:26:46 +02:00
Andrej730 f8ca92279d monkey patch blender's dump_addon_messages
The way blender gather messages to translate is:
1) disable the addon
2) parse all available strings
3) enable the addon
4) parse all strings available strings again and subtract the ones gathered at step 2.

But due Blender bug (https://projects.blender.org/blender/blender/issues/116579) not all addon parts unregistered at step 1, so some addon's strings left out and gathered at step 2 and then subtracted at step 4. At the end, we loose them and they will be missing from resulting translations files.

I've monkey patched dump_addon_messages so it now works a bit more safe:
0) It expects addon to be disabled and Blender restarted after
1) Gather all Blender strings
2) Enable addon
3) Gather all Blender strings again and subtract strings from step 1.
2024-04-16 11:26:46 +02:00
Andrej730 e9078453eb setup_translations - original dump_addon_messages
same as with dump_py_messages - this commit is needed to track monkey patch changes later on
2024-04-16 11:26:46 +02:00
Andrej730 df41f541de fix error converting translations to .po if .po files already exist 2024-04-16 11:26:46 +02:00
Andrej730 a2ea7bf1d8 monkey patch dump_py_messages to ignore blenderbim dependencies 2024-04-16 11:26:46 +02:00
Andrej730 a4be606a37 setup_translations - original dump_py_messages
as we're going to monkey patch it and this commit is needed to keep the history of changes
2024-04-16 11:26:46 +02:00
Andrej730 4342a03246 update translations in current blender session 2024-04-16 11:26:46 +02:00
Andrej730 b0c0839d3e setup_translations.py - use just 1 directory to store .po files
and use temp directory to store .po files for ui_translate.export/import
2024-04-16 11:26:46 +02:00
Andrej730 fd01d71d2c fixed typo 2024-04-16 11:26:46 +02:00
Andrej730 3046f2f207 BBIM - register translation strings #889 2024-04-16 11:26:46 +02:00
Andrej730 0371c2c74e BBIM script to reload/export/import translation strings #889 2024-04-16 11:26:46 +02:00
Eduardo Schilling 144f028c84 Roof slope as percentage property 2024-04-16 11:26:46 +02:00
Dion Moult d6074fa6d6 Fix #4223. Basic lint error. 2024-04-16 11:26:36 +02:00
Dion Moult 36f2448234 Fix #4219. Update documentation for creating a new model. 2024-04-16 11:26:36 +02:00
Bruno Postle 616d23d804 IfcGit fixes suggested by ruff 2024-04-16 11:26:36 +02:00
Andrej730 44c9aee727 BBIM - upgrade to IFC4X3 on loading projects
Added "Upgrate to IFC4X3" button on loading new projects to migrate them to IFC4x3 as Ifc4x3 got approved now will be used more widely.

https://i.imgur.com/mHSIV7T.png
2024-04-16 11:26:36 +02:00
Dion Moult 8be42ced69 Fix #4139. Bulk purge orphaned classes and move advanced operators to debug panel. 2024-04-16 11:26:36 +02:00
Andrej730 dab051dd85 minor fix for bim.create_all_shapes printed messages 2024-04-16 11:26:36 +02:00
Dion Moult 07241649e4 Fix #4173. Don't recreate boundaries of building elements that already exist.
Inline opening processing. Minor improvement to detecting attributes for int/ext and physical/virtual.
2024-04-16 11:26:36 +02:00
Dion Moult a3c87f1b0e Fix #4195. Forgot to add UI for contains selector. 2024-04-16 11:26:36 +02:00
Dion Moult b0a4e8c8e4 See #4173. Prototype new approach to generating 1st level space boundaries. 2024-04-16 11:26:36 +02:00
Dion Moult c8456532ad Fix bug where UI didn't show applicable psets to specific predefined types 2024-04-16 11:26:36 +02:00
Dion Moult a9857f867c Fix #4196. Settings are now saved when you save Spreadsheet export JSON files. Also a new setting to generate an SVG alongside the spreadsheet (intended to be used as a schedule placed on a sheet). 2024-04-16 11:26:36 +02:00
Dion Moult c60ad6b8a0 Minor fix 2024-04-16 11:26:36 +02:00
Dion Moult 54bf41816b Fix #4197. URLs in SVG schedules are now clickable. 2024-04-16 11:26:36 +02:00
Dion Moult 6846021768 Fix #4199. Bug where external references on sheets weren't properly referenced leading to no names. 2024-04-16 11:26:36 +02:00
Dion Moult 33051c0139 Fix #4203. Fix bug where removing nested cost items left orphaned relationships. 2024-04-16 11:26:36 +02:00
Dion Moult d530d34441 Fix #4204. Add support for XLSX schedules on sheets. 2024-04-16 11:26:36 +02:00
Christoph Mellueh 062822502f sort code alphabetically 2024-04-16 11:26:36 +02:00
Christoph Mellueh 04afbce3a8 improve core file for better zen 2024-04-16 11:26:36 +02:00
Christoph Mellueh 0005f15364 update BsDD to match new API
+ move Functions from operator to core/tool
2024-04-16 11:26:36 +02:00
Dion Moult a91c76b25c Fix #4198. Minor regression in updating text literals. 2024-04-16 11:26:36 +02:00
c4rlosdias 43259c0124 Added more comparisons in search 2024-04-16 11:26:36 +02:00
Christoph Mellueh 2dfd1cae6d add pset view to groups 2024-04-16 11:26:35 +02:00
Dion Moult 7e262c5c9a Fix #4186. Support different RL insertion modes when adding occurrences of a type. 2024-04-16 11:26:35 +02:00