Commit Graph

257 Commits

Author SHA1 Message Date
Bastien Montagne
23d9953c80 I18n tools: Fix issue when extracting messages on release builds.
This was also affecting prototype of buildbot-driven UI messages
extraction...
2021-10-04 12:17:50 +02:00
Bastien Montagne
87a3cb3bff Cleanup: Neighbour -> Neighbor. and other minor UI messages fixes.
Blender English should use 'American' variants, not 'British' variants.
2021-10-04 11:14:57 +02:00
Campbell Barton
f49dff97d4 Cleanup: spelling in strings 2021-10-03 12:13:29 +11:00
Bastien Montagne
410dc76177 Various UI messages fixes and updates. 2021-09-13 12:40:37 +02:00
Bastien Montagne
e2a411570e Cleanup/fixes in UI messages. 2021-08-09 14:42:47 +02:00
Campbell Barton
d3a699925d Cleanup: use 'cls' for class methods first argument 2021-08-09 15:03:32 +10:00
Bastien Montagne
82ff5dd911 Fix i18n utils_cli mistake.
Reported by James Monthea (@jmonteath), thanks.
2021-07-21 10:37:45 +02:00
Campbell Barton
432bfbf7a3 Cleanup: pep8 2021-07-06 12:05:27 +10:00
Campbell Barton
013fc69ea8 Cleanup: unused argument & variable warnings 2021-06-15 10:50:43 +10:00
Bastien Montagne
a53d34a28a Minor updates to i18n spellcheck tool. 2021-05-03 12:22:46 +02:00
Campbell Barton
37793b90be Cleanup: unused imports 2021-03-06 19:26:18 +11:00
Campbell Barton
bd79691599 Cleanup: unused variables 2021-03-06 19:00:18 +11:00
Bastien Montagne
32073993a8 i18n messages extraction script: fix handling of C unicode-escapes.
rB1f5647c07d15 introduced for the first time a unicode escape in strings
to be translated, directly extracted from C-code itself.

This revealed that this case was not properly handled by current code,
for now we work around using `raw_unicode_escape` encoding/decoding of
python.
2021-02-22 18:32:49 +01:00
Bastien Montagne
dd2e0150ae Various UI messages fixes and tweaks. 2021-02-22 15:48:54 +01:00
Bastien Montagne
623ddc4aa6 Fix i18n messages extraction tool after update to support py 3.10.
The new defferred approach broke existing way to access items from
struct definition...

See T85872.
2021-02-22 12:20:25 +01:00
Bastien Montagne
823f0da702 Cleanup: UI messages fixes. 2020-12-28 10:22:02 +01:00
Bastien Montagne
626a9aae6d Fix part of T84004: Some 2.92 alpha UI strings can't be translated.
Adding 'new' (?) `heading` parameter of some UILayout functions...
2020-12-21 11:50:38 +01:00
Bastien Montagne
c34ba26856 Fix part of T84004: Some 2.92 alpha UI strings can't be translated.
Not sure why, but py files from `bl_operators` were never considered for
i18n string extraction... They do define some UI strings though.
2020-12-21 11:35:02 +01:00
Bastien Montagne
42e2dd2178 Fix some UI messages and update i18n spellcheck utils. 2020-12-21 10:49:33 +01:00
Campbell Barton
8cc951d2ae Cleanup: trailing space 2020-12-11 15:32:14 +11:00
Bastien Montagne
2072134faa UI: Fix mistakes in UI messages. 2020-12-07 10:57:27 +01:00
Bastien Montagne
fe1f05de1b i18n utils CLI: add missing RTL process command. 2020-12-04 15:54:50 +01:00
Bastien Montagne
ca4b809e63 i18n utils: Add first version of the CLI wrapper around i18n tools.
Plan is to use that in new 'buildbot' pipeline to automate generation of
i18n files for Blender.
2020-12-04 15:14:16 +01:00
Bastien Montagne
b3306cf669 i18n utils: Add a helper to list and match po files with languages codes.
This code was previously done in the add-on, but we'll need it for the
CLI tool as well, so now it is a utils generator instead.
2020-12-04 15:14:16 +01:00
Bastien Montagne
06ae2e3a60 i18n utils : Reduce dependency to Blender bpy API, step 2.
Remove some top imports of bpy, only import it in a few specific
functions that only make sense when used whithin Blender anyway.
2020-12-04 15:14:16 +01:00
Bastien Montagne
7bd8b8cdac i18n utils: reduce dependency to Blender bpy API, step 1.
This involves re-implementing some of Blender-defined helpers in utils,
we keep debug code to ensure those are still matching on
behavior/results sides.

This will allow to get more i18n tools independent from blender
executable.
2020-12-04 15:14:16 +01:00
Bastien Montagne
69dd7e42c8 i18n utils: Cleanup. 2020-12-04 15:14:16 +01:00
Bastien Montagne
6e7617211b UI messages fixes... 2020-10-06 10:38:21 +02:00
Campbell Barton
41d2d6da0c Cleanup: pep8 (indentation, spacing, long lines) 2020-10-02 11:59:16 +10:00
Bastien Montagne
9d3550d781 Various fixes in UI messages.
Along some other typos in comments or variable names.
2020-09-21 15:18:13 +02: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
701a9d3917 Cleanup: typos & co in UI messages (and some other places). 2020-08-04 13:26:58 +02:00
Bastien Montagne
0158571b34 I18n utils: fix broken case when 'settings' argument is default NULL one. 2020-07-13 12:51:29 +02:00
Bastien Montagne
b358a92faf Various UI messages fixes... 2020-06-15 10:51:26 +02:00
Aaron Carlisle
caa1b16acc UI: Do not use term 'Subsurf'
So not to be confused with subsurf scatter

Differential Revision: https://developer.blender.org/D8005
2020-06-14 19:06:58 -04:00
Bastien Montagne
c9ff8b5cd6 Various fixes, cleanup and improvements to i18n module.
* Remove multi-processing in messages class update, was no giving much
  speedup if any at all.
* Remove some debug prints.
* Make messages class pickleable.

* Filter better actual setting values from Settings class.
* Make settings pickleable.

All this will allow to use multi-processing in the i18n addon itself.
2020-05-05 18:08:40 +02:00
Philipp Oeser
2845b232a7 Fix T75522: Math node truncate operator tooltip provides no explanation 2020-04-29 11:36:20 +02:00
Bastien Montagne
aa2544793d Various typos fixes in UI messages. 2020-04-20 15:27:01 +02:00
Bastien Montagne
2a2d0d463a i18n: Disable es_ES locale.
We already have generic `es` one, having more only makes sense if poeple
actually maintain them and they have different contents...
2020-04-06 11:23:29 +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
Campbell Barton
5b0f1e7649 Cleanup: formatting, strip trailing space 2020-03-05 08:05:21 +11: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
f6a90f018c i18n: Add Slovak language. 2019-10-03 11:11:37 +02:00
Campbell Barton
c8c3e7d284 Cleanup: trailing space, remove tabs, pep8 2019-09-10 06:17:59 +10: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
Campbell Barton
2790740813 Cleanup: spelling 2019-08-17 00:57:05 +10:00
Campbell Barton
0d719fcacb Cleanup: spelling 2019-08-12 01:10:43 +10: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