diff doc/developers.txt @ 8080:d1c29284ccd9

feat: issue2551287 - roundup-gettext extracts strings from detectors/extensions Enhance roundup_gettext.py to extract strings from detectors/extensions. If the polib module is available, roundup-gettext will extract translatable strings from the tracker's Python code. If polib is missing, it will print a warning. Marcus did most of the work, I had to do a python 2-> conversion of pygettext.py.
author John Rouillard <rouilj@ieee.org>
date Sat, 13 Jul 2024 18:27:11 -0400
parents 828f79ae965b
children d913db0ab498
line wrap: on
line diff
--- a/doc/developers.txt	Sat Jul 13 10:22:55 2024 -0400
+++ b/doc/developers.txt	Sat Jul 13 18:27:11 2024 -0400
@@ -540,11 +540,12 @@
 
   roundup-gettext <tracker_home>
 
-extracting translatable messages from tracker's html templates.
+extracting translatable messages from tracker's html templates and
+detectors / extensions (assuming `polib`_ is installed) [2]_.
 This utility creates message template file ``messages.pot`` in
 ``locale`` subdirectory of the tracker home directory.  Translated
-messages may be put in *locale*.po files (where *locale* is selected
-locale name) in the same directory, e.g.: ``locale/ru.po``.
+messages may be put in *locale*.po files (where *locale* is the two
+character locale name) in the same directory, e.g.: ``locale/ru.po``.
 These message catalogs are searched prior to system-wide translations
 kept in the ``share`` directory.
 
@@ -562,6 +563,10 @@
 of the ASCII range will cause Roundup to crash with a
 UnicodeDecodeError.
 
+.. [2] Note that it will not extract `deferred translations`_
+         from detectors or extensions. Those have to be manually
+         added to messages.pot.
+
 Translating Messages
 ^^^^^^^^^^^^^^^^^^^^
 
@@ -666,6 +671,7 @@
 .. _po filetype plugin:
     https://www.vim.org/scripts/script.php?script_id=64
 .. _PO utilities: https://github.com/pinard/po-utils
+.. _polib: https://polib.readthedocs.io
 .. _poEdit: https://poedit.net/
 .. _pology: http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html
 .. _pylint: https://pylint.pycqa.org/en/latest/

Roundup Issue Tracker: http://roundup-tracker.org/