I18n: Extract and translate asset catalog and asset names and descriptions #105747
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#105747
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pioverfour:dp_translate_asset_nodes_menu"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Node Add menu can have special dynamic submenus containing node
assets. These submenus are generated by parsing the asset blend files
from release/datafiles/assets, and the interface drawing is specific
to these menus.
This PR enables the translation of these dynamic menus, including
their names and the description of the operators, as well as their
extraction from the catalog sidecar file and asset blend file.
ae38734bda
to806ca1f9e4
Feels a bit weird to translated data that way, but this is indeed a fairly confusing mix between UI and data. :(
@ -931,0 +939,4 @@
for line in data:
if (line == "\n" or line.startswith("VERSION") or line.startswith("#")):
continue
print("line:", len(line), line)
debug prints should not be committed ;)
@ -983,2 +1029,4 @@
dump_template_messages(msgs, reports, settings)
# Get strings from asset catalogs and blend files.
dump_asset_messages(msgs, reports, settings)
Would rather call this as a last step, since it load blend files... (also document that with a comment to the call)?
@ -528,2 +528,4 @@
REL_TEMPLATES_DIR = os.path.join("scripts", "startup", "bl_app_templates_system")
# Where to search for assets (relative to SOURCE_DIR).
REL_ASSETS_DIR = os.path.join("release", "datafiles", "assets")
This is not relative to
SOURCE_DIR
, but to the installed data (like3.6/datafiles/assets
on linux builds e.g.)?In source context, assets are from an SVN lib, so they live outside of the root git checkout (typically
../lib/assets/
relative toSOURCE_DIR
).So this path should rather be considered as relative to
bpy.utils.resource_path('LOCAL')
...806ca1f9e4
tob68e6a00a4
@ -931,0 +939,4 @@
catalogs = set()
for line in data:
Oops, sorry about that!
@ -980,6 +1029,7 @@ def dump_messages(do_messages, do_checks, settings):
dump_preset_messages(msgs, reports, settings)
# Get strings from startup templates.
# This loads each startup blend file in turn.
I moved it down, but another function loaded blends,
dump_template_messages()
for startup templates. Should I move it down too, or leave it be so messages remain stable?@ -528,2 +528,4 @@
REL_TEMPLATES_DIR = os.path.join("scripts", "startup", "bl_app_templates_system")
# Name of the built-in asset catalog file.
ASSET_CATALOG_FILE = "blender_assets.cats.txt"
My bad, I use symbolic links and thought this dir was from the sources.
I tried finding an API to access catalogs, but couldn’t find it. No one knew on the chat either, so I guess that’s our best option…
This also seems to not be properly rebased on current main?
@ -980,6 +1029,7 @@ def dump_messages(do_messages, do_checks, settings):
dump_preset_messages(msgs, reports, settings)
# Get strings from startup templates.
# This loads each startup blend file in turn.
Not ideal, but would leave here for now 9for that reason of keeping existing messages order as stable as possible).
b68e6a00a4
toa849bb3dc4
Closing this, I’ll open a new PR to try solving the rebase issue Gitea has.
Pull request closed