18 Commits

Author SHA1 Message Date
05da464b16 I18N: Disable checks on original messages during extraction.
This has become way too much of a burden for the I18N team to deal with.
2024-05-06 12:41:48 +02:00
ddc9ecd46f UI Translations: fix add-on translation export
The export of add-on translations to PO files suffered from two
issues:

1. To find the best file candidate for each language, the exporter
   compares ISO codes. One of the codes it tried to compare with is
   the invalid `__POT__` (`settings.PARSER_TEMPLATE_ID`).

   This would raise an assert in
   `bl_i18n_utils.utils.locale_explode()` because its implementation
   is different from the original `bpy_translations.locale_explode()`
   when given invalid values.

   This key is now filtered out to avoid the exception.

2. With "Update Existing" enabled, it tried to update the nonexistant
   `trans.msgs` of the translations. The proper dictionary is
   `trans.trans`.

Pull Request: https://projects.blender.org/blender/blender-addons/pulls/104942
2023-10-11 14:26:12 +02:00
8f6b6bb465 UITranslate: Initial refactor/changes for repositories changes.
The removal of the SVN repository and move to a simpler GIT one + usage
of weblate for actual translation efforts changes quite a lot of things.

Matches updates done to the i18n_utils py module in Blender sourcecode
itself.

This adds support for the basic update workflow.

Main TODOs:
* Investigate using weblate API to make admin tasks (repo updates)
  easier and less risky.
* Make translating from Blender feature usable again (could also use
  weblate API here actually).

Related to https://projects.blender.org/infrastructure/blender-projects-platform/issues/65
2023-09-15 18:08:04 +02:00
e8da6131fd License headers: use SPDX-FileCopyrightText for all addons
Move copyright text to SPDX-FileCopyrightText or set to the
Blender Foundation so "make check_licenses" now runs without warnings.
2023-06-15 16:54:05 +10:00
016430de4b Cleanup: remove <pep8 compliant> comment
This is no longer necessary, see: T98554.
2022-06-03 11:50:32 +10:00
b8d86ccc0a File headers: use SPDX license identifiers
See T95597
2022-02-11 16:05:07 +11:00
448eeb681a Update for changes in the Python API using keyword only arguments 2021-06-09 03:12:45 +10:00
b3f7398f28 UI Translate: update to 2.8
Make operator properties into variable annotations.
Cleanup includes and descriptions.
PEP-8 compliance pass.
2018-11-11 15:03:02 +01:00
7f6ae93c54 UITranslation: remove usage of register_module. 2017-03-19 17:04:15 +01:00
f6cfb5bc61 CLeanup: 'addon' -> 'add-on' in UI messages. 2016-06-01 20:39:22 +02:00
73bf474a6d Cleanup: imports (formatting) 2015-04-10 11:43:35 +10:00
d47e9be4fb Fix: replaced Python module "imp" with "implib"
Python 3.4.0 deprecated the "imp" module, and replaced it with
"importlib". This changes imp.reload() into implib.reload().

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1016
2015-01-22 17:05:39 +11:00
327830452e Cache the addons' list (also fixes issue with edited strings). 2013-04-21 13:56:25 +00:00
86fb6178a6 Some cleanups and fixes, and use new "progressbar" api for main translation operators (which can be rather long), thanks Gaia! :) 2013-04-19 16:24:18 +00:00
9208bd771a UI translation: now addons' authors have all needed tools to manage their own translations.
* Update: update (or create) an addon's translation data (as some py code).
* Export PO: export an addon's translation data in a set of pot/po's files.
* Import PO: import a set of po's files to update an addon's translations.

Note: current i18n doc on wiki is completely outdated, I will try to fix this in following days.
2013-04-18 15:39:28 +00:00
46c41ca8e9 We need no more that hack! 2013-04-15 15:02:58 +00:00
7d6131d4e3 More fixes for addon i18n messages management. 2013-04-12 12:21:16 +00:00
906517bac3 Add base for addons' i18n tools. WARNING: nearly nothing is functionnal yet!
Also a few minor edits (and add a version number to this addon!)...
2013-04-09 08:59:56 +00:00