-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-31793: Documentation: Specialize smart-quotes for japanese. #4006
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
It seems like @methane likes it as well:
python/docsbuild-scripts#32 (comment)
LGTM. But how about completely disable smart-quote? When building English document for French, converting "foo" to «foo» will be good idea. |
French: 6.1.3. Fichiers Python « compilés » Original (english): https://docs.python.org/dev/tutorial/modules.html#compiled-python-files Do « and » come from the translation, or from smart quotes? If it comes from the translation, where are the smart quotes used? |
« and » come from the smart quotes, here's the po file:
|
Then, without smart-quote, translators can choose quote symbols. |
Ok. So I undertand that all quotes would have to be modified in the french PO file if we disable smart quotes for all languages. I dislike requesting the french translators to modify so many translations :-/ What is the impact of this change for the japanese PO translation? Does it break anything? |
@methane: "With smart-quote, translators can't." Hum. I don't understand something. The bpo title is "Allow to specialize smart quotes in documentation translations". What is the purpose of this PR in this case? |
@methane: "With smart-quote, translators can't." Sorry, I don't understand well the consequences of smart quotes. Let's say that this PR is merge.
Smart quotes only changed the rendered text if the translation keeps "..." quotes, no? But with this PR, "..." is left unchanged. Japanese translators are free to replace "..." quotes with whatever else in the PO file, no? |
A question is "Did smart quote been introduced just to fix translation of lazy translators, or is it a really interesting feature even for good translators". If it's "just to fix lazyness" I would be OK to drop it, let's do things properly in the first place. I searched an answer to this question and found http://docutils.sourceforge.net/docs/user/smartquotes.html Looks like SmartQuotes is also used to transform So completly removing smartquotes will also ask for english documents to be reviewed (actually a single sed is probably enough). The smartquotes documentat also say it may be better to do it right in the first place than relying on smartquotes:
If we're going to remove smartquotes, I'm OK to review french translation myself to fix quotes, let's not make this a blocking issue. |
|
We use 「おはよう」 for Japanese sentence, and both of 「Good morning!」and "Good morning!" are OK. So this pull request is OK for Japanese document. |
I searched a a few minutes in the french documentation and didn't found a paragraph where |
It seems to me that the automatic replacement of (Same rule for non-breaking spaces if the Python French translation uses the France variant; in Québec or Switzerland there are no spaces.) |
After reading most recent replies: if having straight quotes in source and using the automated replacement works for Julien, then +1! And if desired by the translation team, the source could be moved to correct quotes over time, removing the need for the transform. |
Thanks @JulienPalard for the PR, and @methane for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7. |
Thanks @JulienPalard for the PR, and @methane for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
GH-4324 is a backport of this pull request to the 2.7 branch. |
(cherry picked from commit 5a66c8a)
(cherry picked from commit 5a66c8a)
GH-4325 is a backport of this pull request to the 3.6 branch. |
This is a replacement for python#9337. * Using conf.py to disable smartquotes through Sphinx instead of using docutils.conf * Disable smartquotes for Japanese, French and Traditional Chinese translations See: * Suggesting to use conf.py: https://mail.python.org/pipermail/doc-sig/2018-September/004084.html * Original smartquotes issue in ja translations: https://bugs.python.org/issue31793 * Disabling for ja: python#4006 * Smartquotes issue in fr: python/python-docs-fr#303 * Smartquotes issue in zh_TW: https://mail.python.org/pipermail/doc-sig/2018-August/004079.html
Specializing and by doing so showing the way on how to specialize smart quoting of documentation in various languages.
I ran a test build using:
fr
anden
yielded not a single difference, butja
differed as expected, like:(6431 lines of diff on the generated HTML).
https://bugs.python.org/issue31793