Campbell Barton
41d2d6da0c
Cleanup: pep8 (indentation, spacing, long lines)
2020-10-02 11:59:16 +10:00
Bastien Montagne
9d674708ea
Fix T80589: Translations in python scripts are missing.
...
Python 3.8 changed handling of constant values in its AST tool.
This code should work on both officialy supported 3.7, and newer 3.8,
for now.
2020-09-13 19:50:08 +02:00
Bastien Montagne
9607e54985
Fix T74959: Need to be explicit about UTF8 encoding in py.
...
Because some OSs are still using old 8bits specific encodings... Angry
eye @windows...
2020-03-20 20:52:52 +01:00
Bastien Montagne
d119e163d0
Fix many typos and other issues in UI messages.
2020-02-17 13:01:07 +01:00
Campbell Barton
5a541cfcec
Cleanup: resolve static analyzer warnings in bl_i18n_utils
...
Reported in T73504
2020-01-30 11:48:26 +11:00
Bastien Montagne
22d157d469
I18n: dirty workaround for PITA ghost classes remaining after unregister.
...
Spent again a whole day trying to understand what happens here, with no
luck. For some reasons, OperatorProperties children of unregistered
operator classes remain accessible, with their `bl_rna` member, although
that one is 100% invalid (freed memory, crashes with ASAN builds).
Funny thing is, I cannot reproduce that situation when disabling the
add-on from the py console of a Blender-with-UI.
Note: issue revealed by X3D add-on, which is still enabled in factory
settings, while not being officially supported any more, this has to be
fixed in a separate commit.
2019-09-09 17:42:44 +02:00
Bastien Montagne
4cbcbacc6a
I18n messages extraction: do not report multi-lines messages anymore.
...
Those are now supported for tooltips.
2019-08-01 12:52:52 +02:00
Bastien Montagne
4b37abd61f
Cleanup a bit i18n message extraction code.
2019-08-01 12:52:52 +02:00
Bastien Montagne
a4869df4c9
I18n messages extraction: add 'generic' handling of Tools.
2019-03-31 18:49:11 +02:00
Campbell Barton
bbe98b18fb
Cleanup: use preferences prefix for Python operators
2019-03-02 00:23:42 +11:00
Bastien Montagne
59b530ca18
Fix and workaround for i18n messages extraction code.
2018-12-23 22:03:43 +01:00
Campbell Barton
916446e83f
Cleanup: move keymap hierarchy into own file
2018-11-20 11:38:13 +11:00
Campbell Barton
1c3411ac89
Keymap: expose tool keymaps in the preferences
...
Currently some modes share tool keymaps, we might want to disable
this since it's confusing editing one thing in multiple places.
However this should be resolved in the tool definitions.
2018-10-03 15:55:57 +10:00
Campbell Barton
09aa446100
Merge branch 'master' into blender2.8
2018-09-13 20:15:18 +10:00
Campbell Barton
ff432a410a
PyAPI: use brief description for operator repr
...
Only include description in docstring.
Also avoid using op_get_rna.
2018-09-13 19:59:15 +10:00
Bastien Montagne
a43ebc63fa
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/blenkernel/intern/collision.c
2018-09-03 17:44:36 +02:00
Brecht Van Lommel
4da2acae3a
Spelling fixes in comments and descriptions, patch by luzpaz.
...
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
Campbell Barton
80a31d30a4
Merge branch 'master' into blender2.8
2018-07-07 08:53:00 +02:00
Campbell Barton
4b373ed086
Cleanup: pep8
2018-07-07 08:48:35 +02:00
Brecht Van Lommel
74fd17e9d7
UI/Python: rename Lamps to Lights, to follow more standard terminology.
...
Internally it's still mostly named lamps, though some modules like Cycles
were already calling them lights.
2018-07-06 20:06:09 +02:00
Bastien Montagne
a22af1a84b
Fix i18n messages extraction script, and a few more UI messages...
2017-10-04 12:39:06 +02:00
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