-
-
Notifications
You must be signed in to change notification settings - Fork 39
reStructuredText typos #8
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
Comments
Awesome, we will work on this. Thanks for the suggestion! |
@JulienPalard I have a doubt regarding this section in French team's Makefile and the workflow, which I'd be glad if you could explain it:
How do you define this commit hash? Do the French team merge PO files against latest POT files for cypthon and then run "tx push", or simply run "tx pull" to download the updated translation files with the POT-Creation provided by Transifex? |
Oh this variable. We're not using transifex at all, so to bump our msgids, we dot it ourself, we have a When we merge This variable is used to create a worktree of cpython at the exact commit we merged, so the .rst files and the .po files exactly match together and we don't have warnings due to them being ... desynchronized. Beware, the last few days we worked a lot on our Makefile and .travis-ci.yml, we broke things, fixed things, ... But the current state looks stable on the HEAD of our 3.8. |
That explains. It seems French team's workflow is different, as Brazilian Portuguese team uses Transifex. I successfully set a GitHub Actions to do the same as French's Travis config, but now I have to figure out how to keep in sync with cpython repository 🤔 |
I have no idea how the pot files are kept in sync on transifex currently, is it still you alone @cocoatomo? |
Just now I noticed that the published documentation and strings in Transifex are up-to-date with latest commit on that branch. I guess it is easier than I thought. |
Please refer these files for understanding pot file generation. https://github.com/python/python-docs-ja/blob/3.8/.travis.yml |
That's very interesting, thanks for the information. |
@JulienPalard Everything is fixed in Transifex (to be pulled into this repository). However, I believe cpython's Doc/library/functions.rst file is making sphinx-build generate a false-positive warning. See:
Notice it does not mention the line number (where should be Also, looking at the po file, there is a string that does not lists the source file's line number:
Can you reproduce this? |
No, in the french
|
FWIW: I opened an issue about this: https://bugs.python.org/issue39229 |
So, I think this issue can be closed. Reason is that I already solved the issues reported in here, and also new ones. Thanks to this, this brought me awareness of the new to automatize the translation update and also build, to check for errors -- I'm currently a script in my fork and should open a PR soon. Thanks, Julien! |
Oh sry for the late reply on b.p.o :] Nice to see it all turned out OK, what was the issue finally? Can I also close https://bugs.python.org/issue39229 ? |
issue39229 is still there, but it is possible to work around it. The issue is in these lines of library/functions.rst: .. audit-event:: builtins.input/result result input These generate the following lines in the library/functions.po:
Notice there is no syntax error on my translation, but sphinx-build will output the following warning:
After some tests, I learned the following:
The workaround I mentioned earlier in this message is to replace:
In the string with "None" source line. But that is a local workaround, and other translators might presence the same issue. |
Other than that, all syntax errors are fixed. Sorry for the long post. |
This reminds me of:
I don't have time right now to check if it's related or not :( |
This issue is probably more directly related to bpo-37363: Add audit events on startup for the run commands (GH-14524), on the same file Doc/tools/extensions/pyspecific.py... |
I'm not speaking about what introduced the bug, more about how to fix it. I fixed a similar bug in beed84ca5e0f2784d758478d4e7c81c9c1088c4e, IIRC. |
Oh I see. I'll check more careful later to see if I can help somehow. |
@JulienPalard @cocoatomo If possible, can you please check the e-mail I sent to the translation mailing list: https://mail.python.org/archives/list/translation@python.org/thread/W3VEKFEKZKFUGV5UEL2XZLMXFUIQXQU6/ ? |
These paragraph are failing with cpython/Doc/library/ctypes.rst:: WARNING: inconsistent term references in translated message. original: [], translated: [':ref:`evento de auditoría <auditing>`'] Marking them as fuzzy is a workaround for now, and it will allow us to easily detect them in the future and fix them. References: * https://bugs.python.org/issue39229 * python/python-docs-pt-br#8 There is no way to skip this check only in one paragraph yet: sphinx-doc/sphinx#3985
@rffontenelle Is this still a bug? What are the next steps? |
I don't see any more errors in your repo (checked on Sentry and checked with a local build, everything's fine). |
Uh oh!
There was an error while loading. Please reload this page.
A sphinx build of pt-br yields errors. To avoid them in the future you may add a CI tool to check pull requests and the branches, like I did on french translation (I enfore more than a correct build: I enfore po file wrapping at 79 column and a spell checker, feel free to adapt).
From a local clone of cpython and a symlink you can test it locally:
locale
directorypt_BR
directory in itLC_MESSAGES
directory in it pointing to your python-docs-pt-brLike:
Then from the
Doc
directory of a cpython clone, run this to find suspicious things:Click to see actual result
Click to see actual result
Beware, this is giving your lines in rst files, not po files. But in your po files you should have the rst lines in comments so you can find them back. The trick is to compile with the exact same commit from which you generated the
pot
file, else you can have line numbering desynchronization and it gets hard. That's why my travis file explicitly gives a commit sha1 to my makefile: to always test with the right commit, which I bump manually when I merge my po files.Those errors are currently breaking the builds on d.p.o, and actually breaks the rendered documentation, for example: https://docs.python.org/pt-br/3/library/wave.html#wave.Wave_write.writeframesraw the
objeto de tipo byte
should be a link to the glossary, see here: https://docs.python.org/3/library/wave.html#wave.Wave_write.writeframesrawThe text was updated successfully, but these errors were encountered: