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

Add i18n support #1760

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Add i18n support #1760

merged 1 commit into from
Dec 13, 2023

Conversation

dalance
Copy link
Contributor

@dalance dalance commented Oct 26, 2023

This PR adds internationalization support based on https://github.com/google/mdbook-i18n-helpers.
This doesn't contain actual translations.
If this is acceptable, I want to port the Japanese translation from https://github.com/rust-lang-ja/rust-by-example-ja.
How about it?

#1520

@rustbot
Copy link
Collaborator

rustbot commented Oct 26, 2023

r? @marioidival

(rustbot has picked a reviewer for you, use r? to override)

@marioidival
Copy link
Member

@dalance I have a question. Do we not need to anything about currently code (Makefile or set up) to run correctly?

@dalance
Copy link
Contributor Author

dalance commented Nov 19, 2023

I think there is no need to modify the existing codes.
mdbook-i18n-helpers will be called by mdbook internally if MDBOOK_BOOK__LANGUAGE is specified.

If mdbook-i18n-helpers is not installed, a warning will be shown only.
So the existing users will not be affected by this PR.

I think an instruction for translators and the note about the above warning for the existing users may be required.

@marioidival
Copy link
Member

Nice, can you add this information around? @dalance

@dalance
Copy link
Contributor Author

dalance commented Nov 20, 2023

I changed mdbook-i18n-helpers from git to v0.3.0 in rbe.yml, and added some information in README.md and TRANSLATING.md.

@marioidival marioidival merged commit 32f5fa0 into rust-lang:master Dec 13, 2023
1 check passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 19, 2023
Update books

## rust-lang/edition-guide

2 commits in 34fca48ed284525b2f124bf93c51af36d6685492..bbffb074e16bef89772818b400b6c76a65eac126
2023-12-11 18:46:08 UTC to 2023-12-06 21:38:11 UTC

- Update links and text about rustfix. (rust-lang/edition-guide#287)
- Add C-string literals. (rust-lang/edition-guide#286)

## rust-embedded/book

1 commits in 22bca3d0f6e9b9b556689b54ce96f25b46ecd1b3..3f9df2b9885c6741365da2e12ed6662cd0e827d6
2023-12-11 21:22:20 UTC to 2023-12-11 21:22:20 UTC

- rust-lang#363 (rust-embedded/book#364)

## rust-lang/nomicon

2 commits in 83d015105e6d490fc30d6c95da1e56152a50e228..f6bd083c4ccfc4ce6699b8b4154e3c45c5a27a8c
2023-12-10 03:19:24 UTC to 2023-12-10 03:18:32 UTC

- Minor improvements to Vec (rust-lang/nomicon#415)
- Improve the `PhantomData` table (rust-lang/nomicon#417)

## rust-lang/reference

1 commits in 692d216f5a1151e8852ddb308ba64040e634c876..f9f5b5babd95515e7028c32d6ca4d9790f64c146
2023-12-10 16:16:17 UTC to 2023-12-10 16:16:17 UTC

- Document object unsafety of async-fn-in-trait  (rust-lang/reference#1435)

## rust-lang/rust-by-example

11 commits in da0a06aada31a324ae84a9eaee344f6a944b9683..4c2b24ff9d9cf19f2fcff799a3a49b9a2c50ae8e
2023-12-18 13:02:23 UTC to 2023-12-10 12:10:43 UTC

- nested destructure example for structs (rust-lang/rust-by-example#1787)
- Make example in pipe.md compatible with both Windows and Unix-type system with less code (rust-lang/rust-by-example#1780)
- Add i18n support (rust-lang/rust-by-example#1760)
- Add pub keyword before mod bar definition in doc.md (rust-lang/rust-by-example#1785)
- Update address and title of github source of rust playground in playground.md (rust-lang/rust-by-example#1784)
- Update example in ffi.md to make it compatible with both Windows OS and Unit-type systems (rust-lang/rust-by-example#1781)
- Update the path of html_playground_url in playground.md (rust-lang/rust-by-example#1783)
- Update unit_testing.md ignore running the last example because it's test (rust-lang/rust-by-example#1782)
- Update example in fs.md and use target_family instead of target_os (rust-lang/rust-by-example#1779)
- Update the example in pipe.md to make it compatible with both Windows OS and Unix-type systems (rust-lang/rust-by-example#1778)
- Update the example in fs.md to ensure compatibility with both Window and Unix-type systems. (rust-lang/rust-by-example#1777)

## rust-lang/rustc-dev-guide

7 commits in 904bb5aa7b21adad58ffae610e2830c7b0f813b0..0610665a8687b1b0aa037917a1598b9f2a21e3ef
2023-12-17 17:21:38 UTC to 2023-12-05 16:40:26 UTC

- add a mailmap (rust-lang/rustc-dev-guide#1839)
- Move Editions chapter to "Contributing to Rust". (rust-lang/rustc-dev-guide#1838)
- Remove feature edition fields. (rust-lang/rustc-dev-guide#1836)
- Add a chapter on editions. (rust-lang/rustc-dev-guide#1835)
- Remove mentions of plugin lints (rust-lang/rustc-dev-guide#1833)
- Fix typo of unused_parens (rust-lang/rustc-dev-guide#1832)
- Replace experts map with reviewers from triagebot (rust-lang/rustc-dev-guide#1831)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 19, 2023
Rollup merge of rust-lang#119087 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/edition-guide

2 commits in 34fca48ed284525b2f124bf93c51af36d6685492..bbffb074e16bef89772818b400b6c76a65eac126
2023-12-11 18:46:08 UTC to 2023-12-06 21:38:11 UTC

- Update links and text about rustfix. (rust-lang/edition-guide#287)
- Add C-string literals. (rust-lang/edition-guide#286)

## rust-embedded/book

1 commits in 22bca3d0f6e9b9b556689b54ce96f25b46ecd1b3..3f9df2b9885c6741365da2e12ed6662cd0e827d6
2023-12-11 21:22:20 UTC to 2023-12-11 21:22:20 UTC

- rust-lang#363 (rust-embedded/book#364)

## rust-lang/nomicon

2 commits in 83d015105e6d490fc30d6c95da1e56152a50e228..f6bd083c4ccfc4ce6699b8b4154e3c45c5a27a8c
2023-12-10 03:19:24 UTC to 2023-12-10 03:18:32 UTC

- Minor improvements to Vec (rust-lang/nomicon#415)
- Improve the `PhantomData` table (rust-lang/nomicon#417)

## rust-lang/reference

1 commits in 692d216f5a1151e8852ddb308ba64040e634c876..f9f5b5babd95515e7028c32d6ca4d9790f64c146
2023-12-10 16:16:17 UTC to 2023-12-10 16:16:17 UTC

- Document object unsafety of async-fn-in-trait  (rust-lang/reference#1435)

## rust-lang/rust-by-example

11 commits in da0a06aada31a324ae84a9eaee344f6a944b9683..4c2b24ff9d9cf19f2fcff799a3a49b9a2c50ae8e
2023-12-18 13:02:23 UTC to 2023-12-10 12:10:43 UTC

- nested destructure example for structs (rust-lang/rust-by-example#1787)
- Make example in pipe.md compatible with both Windows and Unix-type system with less code (rust-lang/rust-by-example#1780)
- Add i18n support (rust-lang/rust-by-example#1760)
- Add pub keyword before mod bar definition in doc.md (rust-lang/rust-by-example#1785)
- Update address and title of github source of rust playground in playground.md (rust-lang/rust-by-example#1784)
- Update example in ffi.md to make it compatible with both Windows OS and Unit-type systems (rust-lang/rust-by-example#1781)
- Update the path of html_playground_url in playground.md (rust-lang/rust-by-example#1783)
- Update unit_testing.md ignore running the last example because it's test (rust-lang/rust-by-example#1782)
- Update example in fs.md and use target_family instead of target_os (rust-lang/rust-by-example#1779)
- Update the example in pipe.md to make it compatible with both Windows OS and Unix-type systems (rust-lang/rust-by-example#1778)
- Update the example in fs.md to ensure compatibility with both Window and Unix-type systems. (rust-lang/rust-by-example#1777)

## rust-lang/rustc-dev-guide

7 commits in 904bb5aa7b21adad58ffae610e2830c7b0f813b0..0610665a8687b1b0aa037917a1598b9f2a21e3ef
2023-12-17 17:21:38 UTC to 2023-12-05 16:40:26 UTC

- add a mailmap (rust-lang/rustc-dev-guide#1839)
- Move Editions chapter to "Contributing to Rust". (rust-lang/rustc-dev-guide#1838)
- Remove feature edition fields. (rust-lang/rustc-dev-guide#1836)
- Add a chapter on editions. (rust-lang/rustc-dev-guide#1835)
- Remove mentions of plugin lints (rust-lang/rustc-dev-guide#1833)
- Fix typo of unused_parens (rust-lang/rustc-dev-guide#1832)
- Replace experts map with reviewers from triagebot (rust-lang/rustc-dev-guide#1831)
@dalance dalance deleted the i18n branch June 17, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants