Page MenuHome

I18n: make add-ons' info translatable
ClosedPublic

Authored by Damien Picard (pioverfour) on Aug 22 2022, 12:35 AM.

Details

Summary

The info provided by add-ons is very valuable to users, yet it wasn’t translatable yet.

Diff Detail

Repository
rB Blender

Event Timeline

Damien Picard (pioverfour) requested review of this revision.Aug 22 2022, 12:35 AM
Damien Picard (pioverfour) created this revision.
Damien Picard (pioverfour) retitled this revision from Make add-ons' info translatable to I18n: Make add-ons' info translatable.

Fix search and use tip_() for the Author and Description fields.

Damien Picard (pioverfour) retitled this revision from I18n: Make add-ons' info translatable to I18n: make add-ons' info translatable.

Tweak :src: comments

Tweak :src: comments again (sent the wrong diff 🤦)

Generally looks fine.

Would think non-official add-ons can simply add their own description etc. to their own translation file?

release/scripts/startup/bl_ui/space_userpref.py
1959

not sure there is much point in translating that one?

release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
928

Would be a bit more specific here, something like this maybe?

Add-on " + module.bl_info['name'] + "info: " + prop

Use more specific source comment for add-ons messages.

Would think non-official add-ons can simply add their own description etc. to their own translation file?

It works fine but I still need to update the add-on part of the I18n add-on to extract the bl_info, for convenience. But this can wait another day!

release/scripts/startup/bl_ui/space_userpref.py
1959

Are you talking about the whole line, or just the "%s: %s" bit?

If the whole line, then I believe most add-ons need to have their name translated, except if they have an original / fancy / brand name. And the category is already translated in the Enum, so it makes sense to translate it here as well. But maybe as a tip_, though, not sure…

If the %s bit, it’s not strictly needed but it was already extracted here and in several other places anyway. It allows changing the punctuation, which is more correct (and pleasing) in French and possibly other languages (well, that’s dubious but who knows!).

Bastien Montagne (mont29) added inline comments.
release/scripts/startup/bl_ui/space_userpref.py
1959

Was talking about the "%s: %s" part yes, but fair enough.

This revision is now accepted and ready to land.Aug 23 2022, 11:10 AM

Note: Will commit this to master, think it's too risky/too late for 3.3 at that point.

Hmm, this does not apply cleanly on master anymore, mind updating the patch? Thanks.

Rebase on latest master

Damien Picard (pioverfour) edited the summary of this revision. (Show Details)

While I was at it, I refactored slightly so that non-official add-ons could get their bl_info extracted to their translation_tuple.

This revision was automatically updated to reflect the committed changes.