Closed cvvergara closed 6 months ago
@w345731923 Adding support for documentation in Chinese In the Check Documentation action you will find an Translations update from OSGeo Weblate and by clicking to the Documentation zh-Hans you will see the errors generated.
The most common problem I find is for example: here
/home/runner/work/pgrouting/pgrouting/build/doc/BFS-category.rst:56:<translated>:1: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/home/runner/work/pgrouting/pgrouting/build/doc/BFS-category.rst:128:<translated>:1: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/home/runner/work/pgrouting/pgrouting/build/doc/BFS-category.rst:131:<translated>:1: WARNING: Inline literal start-string without end-string.
/home/runner/work/pgrouting/pgrouting/build/doc/BFS-category.rst:56:<translated>:1: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/home/runner/work/pgrouting/pgrouting/build/doc/BFS-category.rst:56: WARNING: inconsistent references in translated message. original: ['`Edges SQL`_'], translated: []
In sphinx you need to separate with spaces other wise it will not recognize the command:
I modified some lets see how it comes
@cvvergara I get it, he needs to be separated by spaces. There are many "Inline interpreted text or phrase reference start-string without end-string." in the Documentation zh-Hans. What is the reason?
@w345731923 Yes basically its the spaces
Suppose:
See **This** is a bold text
and `text <link>`__ is a link
(using 中国 to represent Chinese translation) Example translation with errors:
中国 **中国**中国
中国 `中国 <link>'__ 中国
There
Basically if things start with a special symbol they end with the special symbol, there should be a space before the start and after the ending symbol. And no space in between.
中国 Symbol中国中国中国Symbol 中国
| | | |
| | | space
| No space No space
space
中国 `One tick can be translated` 中国
中国 ``Two ticks do not translate`` 中国
中国 *One asterisk is Italic (no space after the asterisk) can be translated* 中国
* List is a list element has a space after the asterisk, which is at the beginning of a line, and ends without an asterisk
中国 **This is bold can be translated** 中国
中国 `text can be translated <link>`__ 中国
Don't translate:
``name`` -- normally a parameter name
|sphinx-constant| -- normally has only column's names
pgr_functionName -- with or without ``
Any thing else its your decision to translate. https://docs.pgrouting.org/dev/en/pgr_dijkstra.html#signatures https://docs.pgrouting.org/dev/es/pgr_dijkstra.html#signatures https://github.com/pgRouting/pgrouting/blob/main/locale/es/LC_MESSAGES/pgrouting_doc_strings.po#L7015
Creates a test for checking translations for chinese. Expected check to "fail" but it will serve as a guide for translators on where they need to fix the translation to march sphinx syntax.