Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move locales dir#224

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@rffontenelle
Copy link
Contributor

@rffontenellerffontenelle commentedMar 4, 2025
edited
Loading

Locales directory needs to be inside the package directory to be installed, so changing the script to place translation files inside seems the best choice. I also added Brazilian Portuguese translation to use as tests.

However, I wasn't able to see the translated theme, so I'm placing this as draft and asking for help.

I tried:
1- building the binary translation file (msgfmt path/to/file.po -o path/to/file.mo); and then
2- building the doc:

git clone https://github.com/python/docsbuild-scriptspython ./docsbuild-scripts/build_docs.py --quick --build-root ./build_root --www-root ./www --log-directory ./logs --group"$(id -g)" --skip-cache-invalidation --theme"$(pwd)" --language pt-br --branch 3.13

I even can see the binary translation file installed:

$ find build_root -name messages.mobuild_root/venv-3.13/lib/python3.13/site-packages/python_docs_theme/locales/pt_BR/LC_MESSAGES/messages.mo

📚 Documentation preview 📚:https://python-docs-theme-previews--224.org.readthedocs.build/

@python-cla-bot

This comment was marked as resolved.

@Wulian233
Copy link

What's the status of this PR now? I was planning to contribute the simplified Chinese(zh_cn) translation after this PR was merged

@rffontenelle
Copy link
ContributorAuthor

I'm still at this:

However, I wasn't able to see the translated theme, so I'm placing this as draft and asking for help.

@StanFromIreland
Copy link
Member

I managed to get this working, partially. I loaded all footer/header translations but not the ones in the page, i.e. Copy and Copied! I am not quite sure where I went wrong, I will look into it more.

@rffontenelle
Copy link
ContributorAuthor

Replaced with a more complete solution:#246

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@rffontenelle@Wulian233@StanFromIreland

[8]ページ先頭

©2009-2025 Movatter.jp