Git Product home page Git Product logo

Comments (6)

adrianliaw avatar adrianliaw commented on August 23, 2024

Hi @Nienzu, for me it's working normally if I change all the double-colons into the translated form as described in the translation guideline. Could you please provide more information on which string, with what translated string would produce the English result? Please also include the warning messages from Sphinx when you run make.

from python-docs-zh-tw.

Nienzu avatar Nienzu commented on August 23, 2024

I am not sure whether the warning messages are the reason or not. I will leave another comment to point the double-colons problem.

Part of the messages is below:

Running Sphinx v1.7.9
loading translations [zh_TW]... done
building [mo]: all of 477 po files
writing output... [100%] locales/zh_TW/LC_MESSAGES/library/turtle.mo
building [html]: all source files
updating environment: 474 added, 0 changed, 0 removed
reading sources... [100%] whatsnew/index
/Users/tommy/Desktop/cpython/Doc/library/functions.rst:260: WARNING: Inline literal start-string without end-string.
/Users/tommy/Desktop/cpython/Doc/library/functions.rst:260: WARNING: Inline literal start-string without end-string.
looking for now-outdated files... none found

Content of /Users/tommy/Desktop/cpython/Doc/library/functions.rst:260 is below:

#: ../../library/functions.rst:260
msgid ""
"The argument *optimize* specifies the optimization level of the compiler; "
"the default value of ``-1`` selects the optimization level of the "
"interpreter as given by :option:`-O` options.  Explicit levels are ``0`` (no "
"optimization; ``__debug__`` is true), ``1`` (asserts are removed, "
"``__debug__`` is false) or ``2`` (docstrings are removed too)."
msgstr ""
"*optimize* 用來指定編譯器的最佳化級別;預設值 ``-1`` 選擇與直譯器的 :option:"
"`-O` 選項相同的最佳化級別。其他級別為 ``0`` (沒有最佳化;``__debug__`` 為 "
"True)、``1`` (斷言被刪除, ``__debug__`` 為 False)或 ``2``(文件字串也被刪"
"除)。"

I have tried to fix it, but I didn't figure it out.

from python-docs-zh-tw.

Nienzu avatar Nienzu commented on August 23, 2024

One of the double-colons problem is like below. Btw, any of the double-colons is the same as this example.

#: ../../library/functions.rst:64
msgid ""
"Return ``True`` if any element of the *iterable* is true.  If the iterable "
"is empty, return ``False``.  Equivalent to::"
msgstr ""
"如果 *iterable* 的任一元素為 True,返回 ``True`` 。如果 iterable 為空,返回 "
"``False``。等價於:\n"
"::"

Result
2018-10-03 12 26 27

If I use , it will look like below.

#: ../../library/functions.rst:64
msgid ""
"Return ``True`` if any element of the *iterable* is true.  If the iterable "
"is empty, return ``False``.  Equivalent to::"
msgstr ""
"如果 *iterable* 的任一元素為 True,返回 ``True`` 。如果 iterable 為空,返回 "
"``False``。等價於:"

Result
2018-10-03 12 38 54

from python-docs-zh-tw.

adrianliaw avatar adrianliaw commented on August 23, 2024

You need an extra blank line between the double colon and the previous line of text, that's what "注意額外的空行是必須的" is about, see rST spec on literal blocks for the syntax specification.

The generated output may not look different because of the rST directives defined specifically for Python documentations, but without the double-colons they actually mean a different thing called block quotes. It's better to explicitly represent a literal block with a literal block.

from python-docs-zh-tw.

Nienzu avatar Nienzu commented on August 23, 2024

@adrianliaw Thanks for your explanation. I fixed rST syntax and the reason for the warning message( rST 260).
I think this issue could be closed now.

from python-docs-zh-tw.

adrianliaw avatar adrianliaw commented on August 23, 2024

@Nienzu Thanks a lot! Let me review it in a bit

from python-docs-zh-tw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.