I am translating the Blender reference manual pages (
https://docs.blender.org/manual/vi/3.0/index.html) to Vietnamese and in the past all PO files, with corresponding
directories are generated on
'make gettext'
then the process of making a language will based on changes in that
build/gettext
directory to regenerate HTML files in the
build/html
directory.
This process has the advantages that only changed files are grouped in the set of changed files and hence the process 'remake' after changes reduces the amount of files that needed to be reconstructed.
However, with the amount of duplication texts occurring in this method over pages, Blender has decided to generate a SINGLE po file, called
'blender_manual.po'
in a directory reserved for the set of language, for example, for Vietnamese, it would be in:
locale/vi/LC_MESSAGES
directory.
This is good for removing duplication redundancies. HOWEVER, the downside is that during the process of translating the document, translators, like me, often need to remake the changes, often just after a page or even just a few lines, to visualise what changes looked like in HTML format, so I can adjust the translation, the code included etc...
then
cd blender_docs
make
would produce an English default set of files
Now if you do the following command from the 'blender_docs' directory:
then do:
export BF_LANG=vi; make gettext; make html
and follow the instruction on the command line to open the page. Then making some small changes by
cd locale/vi/LC_MESSAGES
touch blender_manual.po
then run make command again:
export BF_LANG=vi; make html
you will see the report:
Running Sphinx v4.1.1
loading translations [vi]... done
loading pickled environment... done
building [mo]: targets for 1 po files that are out of date
writing output... [100%] ../locale/vi/LC_MESSAGES/blender_manual.mo
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 1803 changed, 0 removed
indicating 1803 files has been changed.
This information is TRUE, and FALSE at the same time.
It is TRUE that the file has been changed and that POTENTIALLY affect ALL html files, but it is FALSE because NONE of the HTML files has been changed, just the TIMESTAMP that was changed.
The structure of the
'blender_manual.po'
is like this:
#: ../../manual/about/contribute/index.rst:18 ../../manual/about/index.rst:20
#: ../../manual/advanced/scripting/introduction.rst:41
#: ../../manual/compositing/introduction.rst:32
#: ../../manual/getting_started/configuration/hardware.rst:163
#: ../../manual/getting_started/index.rst:5 ../../manual/index.rst:20
#: ../../manual/modeling/meshes/uv/unwrapping/introduction.rst:42
#: ../../manual/sculpt_paint/texture_paint/introduction.rst:46
msgid "Getting Started"
msgstr "Khởi Đầu -- Getting Started"
so the block of comments in the Message class, above the msgid and msgstr here, shown the actual files that uses this instance of msgid.
I was wondering if there is a way to make of the list of files in the 'comment' block to work out actual changes, and thus asking sphinx-intl to ONLY regenerate for those files ONLY.
Do you know how to overcome this remake problem?
Best regards,
Hoang Tran