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 sidebar navigation for Japanese docs #762

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

Conversation

josh-wong
Copy link
Member

@josh-wong josh-wong commented Nov 29, 2024

Caution

This PR should not be merged until after we're ready to add the displayed_sidebar: docsEnglish configuration to the front-matter properties of English docs and displayed_sidebar: docsJapanese configuration to the front-matter properties of Japanese docs. By adding this configuration, we can specify the appropriate sidebar language that should be displayed for the respective language when the visitor is on a page.

This method follows Docusaurus's method for sidebars, as described in Understanding sidebar association.

Description

This PR adds sidebar navigation for Japanese docs for ScalarDB 3.13 and 3.14. Since we hard-code the titles in the sidebar navigation for the English docs, which were the only docs we had up until recently, the Japanese docs default to the English titles in the sidebar navigation. Because of this, we need to have sidebars for both languages.

See an example of the sidebar navigation at:

In addition, with the sidebar being in Japanese, the version dropdown menu should also be displayed in Japanese when visiting docs in Japanese.

Related issues and/or PRs

Note

Similar changes are being done in the ScalarDB docs:

Changes made

  • Changed the default sidebar name from docs to docsEnglish.
  • Added a sidebar structure for Japanese docs (docsJapanese) that matches the English docs.
  • Translated the titles (labels) in the docsJapanese sidebar into Japanese.
  • Added .json files to show the version dropdown menu in Japanese, as is standard practice when having docs in multiple languages in Docusaurus.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have updated the side navigation as necessary.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes. N/A
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

@josh-wong josh-wong added the sidebar navigation Updates to the sidebar navigation label Nov 29, 2024
@josh-wong josh-wong self-assigned this Nov 29, 2024
Copy link

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

@josh-wong I left some comments. I noticed References were wrongly translated to 管理. I put some suggestions on them, but I didn't consider consistency. So feel free change them. Also, I think Authorization should be translated to 認可 when it's used with Authentication.

sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated
{
type: 'doc',
id: 'run-non-transactional-storage-operations-through-primitive-crud-interface',
label: 'プリミティブ CRUD インターフェースを使用して実行する',

Choose a reason for hiding this comment

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

Directly translated プリミティブ sounds a bit odd to me. Maybe we don't need to mention primitive in this case?

Suggested change
label: 'プリミティブ CRUD インターフェースを使用して実行する',
label: 'CRUD インターフェースを使用して実行する',

Copy link
Member Author

@josh-wong josh-wong Dec 2, 2024

Choose a reason for hiding this comment

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

@komamitsu Sorry, I had a translation in the wrong place and had forgotten to translate the label above that one. I've fixed that in 2ce715b.

Since one of the earlier titles is labeled as CRUD インターフェースを使用して実行する, I think we should keep this as プリミティブ CRUD インターフェースを使用して実行する. Is that OK?

sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
versioned_sidebars/version-3.13-sidebars.json Outdated Show resolved Hide resolved
versioned_sidebars/version-3.13-sidebars.json Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
versioned_sidebars/version-3.13-sidebars.json Outdated Show resolved Hide resolved
versioned_sidebars/version-3.13-sidebars.json Outdated Show resolved Hide resolved
@josh-wong josh-wong force-pushed the sidebar-nav/add-japanese-sidebar-nav branch from 053b0d9 to 2ce715b Compare December 2, 2024 06:17
@josh-wong josh-wong force-pushed the sidebar-nav/add-japanese-sidebar-nav branch from 2ce715b to 7c1de4c Compare December 2, 2024 06:20
Co-authored-by: Mitsunori Komatsu <[email protected]>
@josh-wong josh-wong requested a review from komamitsu December 2, 2024 06:22
@josh-wong
Copy link
Member Author

@komamitsu Thank you for your review! I've applied your suggestions in c08ceab. PTAL when you have time🙇🏻‍♂️

@josh-wong josh-wong force-pushed the sidebar-nav/add-japanese-sidebar-nav branch from b2cc7c7 to 6550b79 Compare December 2, 2024 09:41
Copy link

@kota2and3kan kota2and3kan left a comment

Choose a reason for hiding this comment

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

Thank you for the updates!
I left two suggestions.
Please take a look when you have time! 🙇‍♂️

sidebars.js Outdated Show resolved Hide resolved
versioned_sidebars/version-3.13-sidebars.json Outdated Show resolved Hide resolved
Copy link

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link

@kota2and3kan kota2and3kan left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

sidebars.js Outdated Show resolved Hide resolved
sidebars.js Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Outdated Show resolved Hide resolved
sidebars.js Show resolved Hide resolved
@josh-wong josh-wong requested a review from choplin December 5, 2024 00:20
@josh-wong
Copy link
Member Author

@feeblefakie As you suggested, I applied 体言止め throughout. PTAL!

@josh-wong josh-wong requested a review from feeblefakie December 5, 2024 00:21
@josh-wong josh-wong force-pushed the sidebar-nav/add-japanese-sidebar-nav branch from bd8f99e to eca1bef Compare December 5, 2024 03:09
Copy link

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link

@choplin choplin left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sidebar navigation Updates to the sidebar navigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants