Commit Graph

30 Commits

Author SHA1 Message Date
Bastien Montagne 1a1bcad43a Fix T49158: Untranslatable elements in UI.
We cannot skip 'collections clesse' when generating i18n messages from RNA, some of them
are visible and UI...
2016-08-26 15:46:56 +02:00
Bastien Montagne fe8b197269 Fix T49150: make new 'operator categories' in search menu i18n-aware. 2016-08-23 21:48:16 +02:00
Bastien Montagne 337b718695 Fix T47371 - add access to 'static' enum items.
Some dynamic enums, which do not need a valid context pointer, have their 'itemf'
callback always called. This is annoying for introspection tools (like the ones generating
translations, or API documentation), because it means they never have access to all possible
options (enum items).

So now, there is also an `enum_items_static` accessor to get only statically-defined
enum items.

Note: only i18n tools take advantage of this currently, others are still to be updated.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1782
2016-02-09 12:51:07 +01:00
Bastien Montagne 46a7b46c30 Fix broken i18n messages extracting script with new py code.
Some py devs are way too smart for our own good... :P
2016-01-14 17:00:16 +01:00
Bastien Montagne 2eb0c990f1 i18n extraction tools: keep even better order of entries in PO files.
Important to avoid too much changes, especially on the git repo (we are still getting
way too much changes there currently...).
2015-09-28 20:32:09 +02:00
Bastien Montagne 451a077511 I18n extract: better handling of commandline args. 2015-06-03 17:15:00 +02:00
Bastien Montagne 7b743defd4 Fix wrong 'check context' handling in addon i18n messages generator.
Reported (with patch) by yedpodtrzitko (yed podtrzitko), thanks a bunch!

Differential Revision: https://developer.blender.org/D1327
2015-05-29 11:08:26 +02:00
Bastien Montagne e092a58fb5 I18n message extractor script: py code: do not consider strings inside 'Compare' AST nodes.
Otherwise, we'd get 'MOVIE' from `text="Build Proxy / Timecode" if clip.source == 'MOVIE' else "Build Proxy")`...
2015-05-25 21:17:49 +02:00
Campbell Barton 616eb6818f cleanup 2015-02-13 16:17:00 +11:00
Campbell Barton 7095f47665 cleanup: pep8
also remove empty class parenthesis
2015-01-29 15:35:06 +11:00
Campbell Barton 2c3a503731 UI: Rename Addons -> Add-ons
D812 by @thefallenweeble

internally variable names & paths remain the same, this is for labels & tips only.
2014-11-14 12:19:14 +01:00
Campbell Barton 0e0e528ea4 Cleanup: pep8 2014-09-17 18:36:17 +10:00
Bastien Montagne 52f2c8aec5 Add support for new "bl_category" member (new panels "tabs" system). 2014-01-23 22:30:18 +01:00
Bastien Montagne a5c7b9202b i18n module cleanup: remove hack used during svn -> git transition phase! 2013-11-25 22:00:14 +01:00
Bastien Montagne 84daa57188 Update i18n tools for new build_hash... 2013-11-04 18:26:56 +00:00
Bastien Montagne a567dd20c0 More "relpath" try/except protection... 2013-08-18 15:17:33 +00:00
Bastien Montagne 0e4b092c2d More fixes for addon i18n messages management. 2013-04-12 12:19:50 +00:00
Bastien Montagne 6382f6bedd Various edits preparing addons' translations tools (not everything yet functionnal/tested, though).
Also workaround a nasty bug, where unregistered py classes remain listed in relevant __subclasses__() calls, which would lead to crash with python addons i18n tools (main translation was not affected, as messages extracting tools are executed in a brand new "factory startup" Blender ;) ).
2013-04-09 08:56:35 +00:00
Campbell Barton 8e3d590b76 code cleanup: python/pep8 and double-promotion warnings. 2013-03-28 19:33:14 +00:00
Bastien Montagne c54fba6a11 I18n: fix/enhance how predefined contexts are handled in py code. Now they should be specified by an attribute with the same name as the one in bpy.app.translations.contexts named tuple (i18n_contexts.default, .id_windowmanager, etc.).
This way, i18n message extracting code is now able to get the right context!
2013-03-28 15:03:47 +00:00
Bastien Montagne 4cb9414b39 I18n: use id_windowmanager context for keymap idnames. Solves some issues with those names (notably "Clip" one, and "Screen" too) in some translations. Also move "Key" as "Keyboard" (opposed to "Keyframe") to same context. 2013-03-25 11:35:42 +00:00
Bastien Montagne 72a3714695 Update to i18n tools (new [CTX_]DATA_ macros, and some more exceptions to spell check...). 2013-03-25 08:30:38 +00:00
Bastien Montagne fbbbb90af3 Some renaming/cleanup in i18n tools. 2013-03-19 08:33:24 +00:00
Bastien Montagne f09f2d1c31 Fix more UI i18n issues (reported by Leon Cheung). 2013-03-11 15:01:03 +00:00
Bastien Montagne 6da449b86c More UI message i18n fixes and improvements...
Fix for keyingsets tips, and make them (and a few others) findable by i18n messages extracting code (for some reasons, their bl_rna.description are void???).
2013-03-10 17:42:08 +00:00
Bastien Montagne 7a94ad9408 More UI message i18n fixes and improvements... 2013-03-10 16:14:29 +00:00
Bastien Montagne 462e4bee87 More tweaks (gaining about ten seconds for each po in update branches process!). 2013-03-01 14:28:38 +00:00
Bastien Montagne 4238d6d758 Various small enhancements/fixes.
Most notable difference from now on will be that all py is handled from current blender's resource dirs, no more from source dir. Better for consistency, and avoid e.g. cycles' addon to be checked twice...
2013-02-27 16:24:20 +00:00
Bastien Montagne b1543f07bf Another bunch of UI translation fixes, thanks to Leon Cheung, Gabriel Gazzán and S. Lockal for spotting them! 2013-02-24 15:40:28 +00:00
Bastien Montagne 2c348d003e Big i18n tools update, I/II.
Notes:
* Everything is still a bit raw and sometimes hackish.
* Not every feature implemented yet.
* A bunch of cleanup is still needed.
* Doc needs to be updated too!
2013-02-24 08:50:55 +00:00