Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test chinese #2600

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Test chinese #2600

merged 2 commits into from
Jan 4, 2024

Conversation

cvvergara
Copy link
Member

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.

@cvvergara cvvergara added Translation Translations from transifex CI Conitnuous Integration labels Jan 3, 2024
@cvvergara cvvergara added this to the Release 3.7.0 milestone Jan 3, 2024
@cvvergara cvvergara merged commit 136e743 into pgRouting:develop Jan 4, 2024
8 of 9 checks passed
@cvvergara
Copy link
Member Author

@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: []

Screenshot from 2024-01-04 09-22-49

In sphinx you need to separate with spaces other wise it will not recognize the command:
image

I modified some lets see how it comes

@cvvergara cvvergara deleted the test-chinese branch January 4, 2024 15:28
@w345731923
Copy link

@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?

@cvvergara
Copy link
Member Author

cvvergara commented Jan 15, 2024

@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

  1. The space at the end is missing
  2. not using back tick

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

AuBousquet pushed a commit to AuBousquet/pgrouting that referenced this pull request Nov 8, 2024
* [ci] processing chinese documentation test
* adding rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Conitnuous Integration Translation Translations from transifex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants