Commit Graph

282 Commits

Author SHA1 Message Date
Joseph Faulkner b77494ec61 Fix T98527 : corrected label for Korean language in Blender preferences
Patch changes label from '한국 언어' to '한국어'

Reviewed By: persun, PratikPB2123, mont29

Maniphest Tasks: T98527

Differential Revision: https://developer.blender.org/D15120
2022-06-07 09:35:27 +02:00
Campbell Barton 3ca76ae0e8 Cleanup: remove "<pep8 compliant>" from headers
It can be assumed that all scripts comply with basic pep8 formatting
regarding white-space, indentation etc.

Also remove note in best practices page & update `tests/python/pep8.py`.

If we want to exclude some scripts from make format,
this can be done by adding them to `ignore_files` in:
source/tools/utils_maintenance/autopep8_format_paths.py

Or using `# nopep8` for to ignore for individual lines.

Ref T98554
2022-06-02 20:16:20 +10:00
Campbell Barton 30e666f747 Cleanup: format, reduce line length & strip trailing space 2022-05-19 11:17:01 +10:00
Bastien Montagne b8432c2c8e Tweak i18n messages extraction script to avoid unwanted messages.
Code would add a bit too often the identifier of an RNA class to
translated messages, this is only needed if there is no valid label
available for it.
2022-05-09 12:40:26 +02:00
Campbell Barton e0e737b72b Cleanup: line length for Python scripts 2022-04-26 15:16:11 +10:00
Campbell Barton e3724d29ff Cleanup: autopep8 2022-04-26 15:03:04 +10:00
Bastien Montagne 024a4da6b3 Fix various typos and other UI messages issues. 2022-04-22 16:19:05 +02:00
Bastien Montagne 535c9308ef Fix T97429: Translateable Unit Names Missing in the File.
Added some regex magic in i18n py module to also extract UI names from
all of our units definitions.

Those enum values are fully dynamically generated, so they cannot be
extracted from RNA introspection.
2022-04-22 16:19:05 +02:00
Campbell Barton 11dd7941af Cleanup: run autopep8 with max-line-length=120 (missed a file) 2022-04-20 15:55:17 +10:00
Campbell Barton 8ed8fa80f4 Cleanup: use autopep8 for bl_i18n_utils.settings
Disable autopep8 for some regex blocks that use indentation
to signify regex grouping.
2022-04-20 15:39:36 +10:00
Campbell Barton 08dbd3bc7f Cleanup: run autopep8 on release/scripts/modules/ 2022-04-20 15:12:10 +10:00
Bastien Montagne 0d0a45b89d Fix/workaround i18n script not finding some messages anymore.
For some reasons(c) some base classes (like `bpy.types.Modifier`) are
not listed anymore by a call to
`bpy.types.ID.__base__.__subclasses__()`, unless they are first accessed
explicitely (e.g. by executing `bpy.types.Modifier` etc.).
2022-04-11 15:45:52 +02:00
Bastien Montagne da130d751f Fix various UI messages issues. 2022-03-28 10:40:14 +02:00
Campbell Barton bff0cf1030 Cleanup: remove white-space before headers 2022-02-11 14:23:54 +11:00
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Bastien Montagne 3cd686cae8 Fix UI messages (typos etc.). 2022-02-07 11:12:37 +01:00
Bastien Montagne 6a4ee3fd56 Fix (unreported) i18n utils failing to create MO files in trunk.
Not really important anymore, since those are not used by Blender, but
better be consistent.
2022-01-03 11:48:24 +01:00
Bastien Montagne e51864a357 Add Georgian to our list of languages.
CC @Tamuna who started the translation for this language.
2022-01-03 11:13:15 +01:00
luzpaz dea26253a0 cleanup: fix typos in comments and docs
Followup to https://developer.blender.org/D10288

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D10346
2021-11-16 18:45:10 -05:00
Hans Goudey 67e5edbaa3 Fix: Incorrect translation search for modifier error messages
This function was renamed in rB2bb9a465e6c0e1ca765, but it looks like
that commit missed changing the corresponding translation regular
expression.

Differential Revision: https://developer.blender.org/D13171
2021-11-10 10:46:49 -06:00
Bastien Montagne ef30a876b5 I18n: Add some more acronyms to the spellchecker. 2021-11-03 16:13:46 +01:00
Bastien Montagne 2ecaa971f0 I18n: Fix several issues with UI messages extraction script.
* Fix systematic skipping of labels when they are the same as
  the identifier (Some cases are valid, like `RGB` or `HSV` e.g.).
* Add instead heuristics checks to skip non-UI properties (non-capitalized,
  or same name as identifier and Operator properties, mainly).
* Skip `bl_icon` and `icon` properties.
* Properly search for properties in all parent classes (some cases with
  e.g. `Panel` would break due to intermediary utils classes, leading to
  those internal UI properties not being skipped as expected).

Related to T43295.
2021-11-03 16:13:46 +01:00
Bastien Montagne cde982d672 I18n: Fix all new cpp files not being parsed by UI message extractor.
The 'new' `.cc`/`.hh` extensions were never added to UI message
extractor.

Related to T43295.
2021-11-02 17:02:33 +01:00
Bastien Montagne 2f667c2bc9 Fix UI messages, typos, etc. 2021-11-01 17:28:07 +01:00
Campbell Barton e288e392a8 Cleanup: line length in Python scripts 2021-10-24 21:04:04 +11:00
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