Argh, too many Blender websites to subscribe to... just for a bug no one likely cares about

I’m writing an add-on / extension which requires hardening of Blender’s Scripting & Security policy for imported scripts (wasn’t the original purpose of the add-on, lol, but is necessary)…

And discovered that Swedish, of all languages, is not translating properly for the Auto Script Execution Warning Dialog that pops up when you try to open a file with a Registered script.

…and IDK if anyone’ll care for the bug report anyway since the issue is resolved in 5.2, at least. (Didn’t test 5.1, but issue persists in 5.0.)

…AND now I have to code around it.

The good news, I suppose, is that I had to code around it already, since Blender doesn’t provide access to the dialog from bpy, which I suppose is fair, I guess, so I coded a replacement.

I did an absolutely amazing job, too, lol. I finally cracked how to do an actual modal button dialog with Blender’s UI — something that no one has believed can be done for ages.

I’m actually kind of afraid to release it into the wild since that’ll just tell other people how to do the deep magic, and then it’ll immediately get abused and devs will have to do something to break the magic and I’ll be sad.

For comparison, here’s Blender’s dialog on the left and my version of it on the right:

This image was snagged from 4.5, sorry, 5.something introduced the red bar at the top, which it is not possible to do in bpy. It is also not possible to get the “bold” (brighter) title text from bpy. I suppose some fancy font swapping could fix that, but that’s too far a kludge for almost zero benefit and plenty of potential failure when displaying translated text.

I also removed the dumb “permanently allow” checkbox — I don’t think it belongs there, but feedback may change my mind at some future point. (If so I’ll add it in.)

And I admit that I dislike the stupid X-stop sign. Not a fatal error, just a serious warning. My yellow icon is cooler, heh.

Anyhow, it works great, responds to keyboard input, keeps alive until an option is selected either explicitly (pressing a button or a key) or implicitly (clicking outside the dialog).


The purpose of the extension / add-on is to manage scripts attached to assets, allowing you to run them or to disable them properly (to plug a security hole in Blender) — reversable, of course, so once you decide a script is safe you can one-click re-register and activate it.


Anyway, I’ve been adding translations for a good dozen languages (the ones I can manage and also don’t not want to do, heh) and discovered the Swedish issue. Now I’ve got to go update all my .mo files to use my own version of the dialog’s text instead of relying on the system translation for it. Fooey.

And I’m here blowing off a little stress from that. Making a bug report isn’t tough, but I had to create accounts on at least two Blender sites that I’ll never use again. Meh.


I suppose I should make it worth your time to have read through all this. So, here ye go:

That’s right. Y’all deserved that. You should have seen it coming. Enjoy!

4 Likes

Nice workaround! Crazy how much effort is needed to get around weird edge cases sometimes.

I contributed a bunch of Swedish translations a few years back. Hope I didn’t have anything to do with that :sweat_smile:

2 Likes

A quick glance through 4.5’s ~/locale/sv/LC_MESSAGES/blender.mo says it is because the translation is missing. But it’s there in 5.2:

msgid ""
"For security reasons, automatic execution of Python scripts in this file was "
"disabled:"
msgstr ""
"Av säkerhetsskäl har automatisk körning av Python-skript i denna fil "
"inaktiverats:"
msgid "Permanently allow execution of scripts"
msgstr "Tillåt permanent körning av skript"
msgid "This may lead to unexpected behavior"
msgstr "Detta kan leda till oväntat beteende."

So chances are that whatever tool Blender devs have set up for the translators didn’t scrape those particular strings for you, which might very well have been a source-code problem.

Easy enough to get lost in the 8205 strings that are translated in 4.5.
These days there are more than 37 thousand strings in the translation table. If you were to do 20 translations an hour, for 7 hours a day, 5 days a week, it’d take you a full year to get through them all.

Translators deserve every good thing that goes their way. :wink:

Yeah, that would make sense! I did about 3600 translations in December 2023. At that point Swedish did not have very good coverage at all, maybe 4-5% or so. I just checked and it’s up to 94% these days. Very impressive!

Translating is this dangerous combination of tedious and unforgiving. It’s easy to make mistakes, and then a bad translation will be in there until you or someone else fixes it…

2 Likes

Heh, yeah. It’s especially nerve-wracking for someone like myself, who doesn’t know Swedish at all, heh. And then I have to choose between something like “Icke-betrodda” and “Opålitliga” when doing a direct comparison with quoted-for-emphasis strings like:

{} scripts imported as “Untrusted” → {} skript importerades som “Icke Betrodda”
The script is now “Trusted” → Skriptet är nu “Betrodd”

I have no idea how stilted this looks.
(I mean, it should be a little stilted, but still…)

EDIT:
I figure if this ever gets included as part of the Blender core (which is what I kind of want to see, considering the security issues it solves), I imagine some translators will fix my first pass version pretty quickly.

It’s certainly not easy! “Icke-betrodda” does work but I would personally lean more towards “Ej betrodda”. I believe either is fine though. “Opålitliga” is more like “unreliable”, as used about a person, so that’s not a great fit.

Waiting for Blender translators to fix it eventually is definitely playing the long game!

1 Like

Hah, whew. Thank you. I’m glad I understood it properly.

As for your preference, it is now mine, since I do not know the shades of meaning between the two constructs. I will update my sv.mo. (And look up “ej” vs “icke” to learn the difference.)

1 Like

Happy to help! It’s just a very slight difference, because they both negate what comes after. “Ej” is the short version of “inte” (English “not”) and “icke” is more like the English “non-”.

1 Like

I have learned that the differences in language often have an almost physical impact on a person’s perception of the world around them. Your preference for “ej” here, for example, may have something to do with how it is used in your daily life — in this case it fits better with the kind of writing you would find in software or on a sign, right? You can’t complain when an equivalent word is used in its place, because it is technically correct, but in context just seems… off, right?

Language is about how people feel about things.

:grin:

Yeah, I do believe language affects perception a lot. Even if different languages have words and phrases to describe the same things, there is always subtle differences that affect the meaning, tone or just feeling of the word… Translation is definitely not easy to do well!

1 Like

Argh. I can’t stand French.
Ça n’a aucun sens.

How does the user know in official documentation that “unregistering”1 a script doesn’t also “unregister”2 it from the .blend? Will the script still be there the next time the .blend is opened? Who can know?

Were I some guy in France (or Canada, I guess) trying to use Blender, the first time I saw that I would be really nervous about losing work.

1 Un-marking it as “execute on launch”
2 Un-saving it (make it not saved in the .blend)

That, and things in French always come out longer than in any other language. How is that?
Easy. Just don’t pronounce half the letters in the words. :laughing: :sob:

一如既往,中文(简体)真是一种享受。


EDIT: OK, so now I’ve got:

  • German
  • Spanish
  • French
  • Italian
  • Japanese
  • Russian
  • Swedish
  • Chinese (Simplified)

Any other language you think would be reasonable for an add-on / extension to support as a default?

Just as a matter of update: the official word on missing translations is:

It’s not a bug

and

[updated] translations are not backported to older versions of Blender

https://projects.blender.org/blender/blender/issues/163573#issuecomment-2035336

So, there you have it.

1 Like