newrelic / docs-website

Source code for @newrelic docs. We welcome pull requests and questions on our docs!
https://docs.newrelic.com
Other
174 stars 1.26k forks source link

Docs [Translation Scaling] Automate translation of localized navs #5504

Closed roadlittledawn closed 2 years ago

roadlittledawn commented 2 years ago

Summary

When on a localized page, the left nav is translated via looking for the English value in src/i18n/nav/{LOCALE}/{LOCALE}.json. Currently this file is only updated manually and is often neglected / forgotten when nav YAML files are updated.

For now run this on a schedule once every month.

Spec

Example: nav JSON for upload Note: English values are used for both `title` and `englishTitle` fields. Full example in experimental branch Helpful links section below. ```js [ { "title": "Organizations and accounts", "englishTitle": "Organizations and accounts", "locale": "jp" }, { "title": "Accounts and billing", "englishTitle": "Accounts and billing", "locale": "jp" }, { "title": "Account setup", "englishTitle": "Account setup", "locale": "jp" }, { "title": "Sign up for New Relic", "englishTitle": "Sign up for New Relic", "locale": "jp" }, { "title": "Choose your data center", "englishTitle": "Choose your data center", "locale": "jp" }, { "title": "Troubleshoot password and login", "englishTitle": "Troubleshoot password and login", "locale": "jp" }, { "title": "Downgrade or cancel account", "englishTitle": "Downgrade or cancel account", "locale": "jp" }, { "title": "Release notes", "englishTitle": "Release notes", "locale": "jp" }, ] ```

Screenshots

Image: Localized left nav ![2022-01-05_07-36-35](https://user-images.githubusercontent.com/2952843/148245678-957310b9-9128-4415-bd6e-dcc154521bdc.png)

Acceptance criteria

Helpful link

github-actions[bot] commented 2 years ago

Hi @roadlittledawn 👋 Thank you for filing an issue! We'll triage your issue and let you know if we have questions, and then route it to the appropriate team so we can get it solved.

roadlittledawn commented 2 years ago

[note to selves] i created simple script and ran to generate new json file that reflects current nav YAML items and gave it to Julien yesterday. he is going to submit to smartling manually, and we can PR manually if it's back before this work is completed

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be automatically closed if no further activity occurs. Thank you for your contributions.

roadlittledawn commented 2 years ago

Was moved to jira