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 support for Hugo-native multi-language functionality #997

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

johndmulhausen
Copy link
Contributor

@johndmulhausen johndmulhausen commented Jan 16, 2025

Description

Rather than use multiple branches and shell script logic to produce the Japanese and Korean builds, this PR aims to simply use the native functionality built directly into Hugo for featuring docsets for difference locales.

This PR:

  • Adds script that wipes out, then replaces, ko and ja subdirectories within content with the English docs, modified for localized build (given target lang values in relref, and given language-specific menu IDs).
  • Modifies a number of links that somehow became ambiguous for Hugo in a multi-language situation
  • Modifies config file to refer to new content sources
  • Adds a fresh "seed" of English content, ready to be translated

TODO:

  • Actually translate the "seed" of content.

Ticket

Resolves DOCS-1188

To preview

See: https://docs-i18n-test.pages.dev

Note

The production script, /scripts/production.sh is deleted in this branch, as CloudFlare's native/default Hugo environment becomes compatible with our repo once this merges, cutting build times from 6:30-7:00 minutes to 2:00-2:30 minutes!

Copy link

cloudflare-workers-and-pages bot commented Jan 16, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 12e92b5
Status: ✅  Deploy successful!
Preview URL: https://bf74632c.docodile.pages.dev
Branch Preview URL: https://i18n.docodile.pages.dev

View logs

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

vale

content/ref/python/data-types/molecule.md|42 col 47| [Google.Spacing] 'm.M' should have one space.
content/ref/python/data-types/molecule.md|42 col 109| [Google.Spacing] 't.C' should have one space.
content/ref/python/data-types/molecule.md|42 col 121| [Google.Spacing] 'm.M' should have one space.
content/ref/python/data-types/molecule.md|44 col 58| [Google.Spacing] 't.C' should have one space.
content/ref/python/data-types/molecule.md|44 col 70| [Google.Spacing] 'm.M' should have one space.
content/ref/python/data-types/molecule.md|45 col 88| [Google.Spacing] 't.C' should have one space.
content/ref/python/data-types/molecule.md|45 col 93| [Google.Spacing] 'm.A' should have one space.
content/ref/python/data-types/molecule.md|45 col 101| [Google.Spacing] 'm.M' should have one space.
content/ref/python/data-types/molecule.md|62 col 30| [Google.Spacing] 'b.M' should have one space.
content/ref/python/data-types/molecule.md|69 col 58| [Google.Spacing] 't.C' should have one space.
content/ref/python/data-types/molecule.md|69 col 70| [Google.Spacing] 'm.M' should have one space.
content/ref/python/data-types/molecule.md|70 col 88| [Google.Spacing] 't.C' should have one space.
content/ref/python/data-types/molecule.md|70 col 93| [Google.Spacing] 'm.A' should have one space.
content/ref/python/data-types/molecule.md|70 col 101| [Google.Spacing] 'm.M' should have one space.
content/ref/python/data-types/object3d.md|46 col 24| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/data-types/object3d.md|91 col 466| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/data-types/wbtracetree.md|18 col 146| [Google.LyHyphens] 'completely-user' doesn't need a hyphen.
content/ref/python/data-types/video.md|20 col 131| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/data-types/video.md|20 col 138| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/data-types/video.md|20 col 155| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/data-types/table.md|26 col 77| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/data-types/table.md|26 col 86| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/data-types/table.md|28 col 25| [Google.Spacing] 's.D' should have one space.
content/ref/python/data-types/table.md|107 col 41| [Google.Spacing] 'b.I' should have one space.
content/ref/python/data-types/table.md|107 col 56| [Google.Spacing] 'b.C' should have one space.
content/ref/python/data-types/table.md|112 col 55| [Google.Spacing] 's.T' should have one space.
content/ref/python/integrations/keras/wandbmetricslogger.md|37 col 19| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/integrations/keras/wandbmetricslogger.md|37 col 28| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/integrations/keras/wandbmetricslogger.md|37 col 48| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/integrations/keras/wandbmetricslogger.md|37 col 99| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/integrations/keras/wandbmetricslogger.md|37 col 220| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/integrations/keras/wandbcallback.md|38 col 68| [Google.Spacing] 's. T' should have one space.
content/ref/python/integrations/keras/wandbcallback.md|59 col 261| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/integrations/keras/wandbcallback.md|84 col 39| [Google.Spacing] 's.M' should have one space.
content/ref/python/integrations/keras/wandbcallback.md|84 col 57| [Google.Spacing] 's.S' should have one space.
content/ref/python/init.md|89 col 397| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/launch-library/launch.md|30 col 39| [Google.Spacing] 'b.J' should have one space.
content/ref/python/launch-library/launch.md|39 col 130| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/launch-library/launch.md|40 col 146| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/launch-library/launch.md|59 col 68| [Google.Latin] Use 'for example' instead of 'e.g.'.
content/ref/python/integrations/keras/wandbmodelcheckpoint.md|35 col 64| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/integrations/keras/wandbmodelcheckpoint.md|43 col 31| [Google.Spacing] 's.P' should have one space.
content/ref/python/integrations/keras/wandbmodelcheckpoint.md|44 col 62| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/launch-library/launch_add.md|37 col 39| [Google.Spacing] 'b.J' should have one space.
content/ref/python/login.md|27 col 45| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/login.md|27 col 53| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/login.md|27 col 65| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/login.md|27 col 84| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/login.md|27 col 136| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/login.md|27 col 222| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/login.md|27 col 276| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/file.md|58 col 164| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/log.md|30 col 66| [Google.Latin] Use 'for example' instead of 'e.g.'.
content/ref/python/log.md|60 col 26| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/log.md|68 col 52| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/runqueue.md|21 col 110| [Google.Exclamation] Don't use exclamation points in text.
content/ref/python/public-api/runs.md|57 col 74| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/runs.md|57 col 85| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/runs.md|62 col 36| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/runs.md|63 col 36| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/runs.md|63 col 120| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/save.md|19 col 22| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/artifact.md|37 col 37| [Google.LyHyphens] 'semantically-friendly' doesn't need a hyphen.
content/ref/python/artifact.md|58 col 51| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/artifact.md|58 col 62| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/artifact.md|58 col 78| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/artifact.md|80 col 9| [Google.Spacing] 'b.W' should have one space.
content/ref/python/artifact.md|146 col 35| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/artifact.md|146 col 56| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/artifact.md|146 col 150| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/artifact.md|179 col 3| [Google.OptionalPlurals] Don't use plurals in parentheses such as in 'http(s)'.
content/ref/python/artifact.md|199 col 49| [Google.OptionalPlurals] Don't use plurals in parentheses such as in 'resource(s)'.
content/ref/python/artifact.md|249 col 33| [Google.Latin] Use 'that is' instead of 'i.e.'.
content/ref/python/artifact.md|254 col 219| [Google.Latin] Use 'that is' instead of 'i.e.'.
content/ref/python/artifact.md|612 col 51| [Google.Latin] Use 'that is' instead of 'i.e.'.
content/ref/python/public-api/run.md|290 col 96| [Google.Latin] Use 'that is' instead of 'i.e.'.
content/ref/python/public-api/run.md|290 col 199| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/watch.md|7 col 30| [Google.OptionalPlurals] Don't use plurals in parentheses such as in 'model(s)'.
content/ref/python/public-api/api.md|102 col 268| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|148 col 257| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|298 col 70| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|298 col 89| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|298 col 106| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|298 col 120| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|310 col 56| [Google.Spacing] 'b.E' should have one space.
content/ref/python/public-api/api.md|400 col 8| [Google.Spacing] 'b.E' should have one space.
content/ref/python/public-api/api.md|439 col 48| [Google.OptionalPlurals] Don't use plurals in parentheses such as in 'job(s)'.
content/ref/python/public-api/api.md|440 col 50| [Google.OptionalPlurals] Don't use plurals in parentheses such as in 'job(s)'.
content/ref/python/public-api/api.md|715 col 79| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|715 col 98| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|715 col 115| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|715 col 129| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/public-api/api.md|726 col 56| [Google.Spacing] 'b.E' should have one space.
content/ref/python/run.md|141 col 92| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|141 col 99| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|141 col 106| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|141 col 114| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|141 col 122| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|141 col 141| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|142 col 101| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|399 col 66| [Google.Latin] Use 'for example' instead of 'e.g.'.
content/ref/python/run.md|429 col 26| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|437 col 52| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|784 col 61| [Google.Latin] Use 'that is' instead of 'i.e.'.
content/ref/python/run.md|813 col 22| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|890 col 19| [Google.Spacing] 'n.M' should have one space.
content/ref/python/run.md|890 col 46| [Google.Spacing] 'n.M' should have one space.
content/ref/python/run.md|997 col 54| [Google.OptionalPlurals] Don't use plurals in parentheses such as in 'file(s)'.
content/ref/python/run.md|1014 col 30| [Google.OptionalPlurals] Don't use plurals in parentheses such as in 'model(s)'.
content/ref/python/run.md|1021 col 25| [Google.Spacing] 'n.M' should have one space.
content/ref/python/run.md|1021 col 51| [Google.Spacing] 'n.M' should have one space.
content/ref/python/run.md|1021 col 144| [Google.Spacing] 'h.F' should have one space.
content/ref/python/run.md|1021 col 219| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|1021 col 232| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|1021 col 281| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|1021 col 294| [Google.Quotes] Commas and periods go inside quotation marks.
content/ref/python/run.md|1021 col 311| [Google.Quotes] Commas and periods go inside quotation marks.

@johndmulhausen johndmulhausen marked this pull request as ready for review February 20, 2025 05:00
@johndmulhausen johndmulhausen requested a review from a team as a code owner February 20, 2025 05:00
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
@wandb wandb deleted a comment from github-actions bot Feb 20, 2025
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.

None yet

1 participant