Skip to content

Commit

Permalink
Merge pull request #178 from terrastruct/setup-locale
Browse files Browse the repository at this point in the history
setup locale
  • Loading branch information
alixander authored Aug 2, 2023
2 parents 9f946ae + b5b9968 commit bd3e24e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ yarn
yarn run dev
```

### Translations

Help wanted for translations.

Current efforts:

- Korean (Thanks @Baejw0111)

To preview in dev mode: `yarn dev --locale ko`.

Translations are filed under `i18n/ko/docusaurus-plugin-content-docs/current`.

Once we have enough docs translated for a certain language (e.g. above 80%), we'll enable
the locale switcher on the nav bar for that language.

### Note

Diagrams are auto generated by `ci/render.sh`.
Expand Down
18 changes: 18 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ const config = {
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",

i18n: {
defaultLocale: "en",
locales: ["en", "ko"],
localeConfigs: {
en: {
label: "English",
},
ko: {
label: "Korean (한국인)",
},
},
},

presets: [
[
"classic",
Expand Down Expand Up @@ -72,6 +85,11 @@ const config = {
position: "right",
label: "Playground",
},
// TODO enable when a language has been translated
// {
// type: "localeDropdown",
// position: "right",
// },
{
type: "custom-iconLink",
position: "right",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO
4 changes: 2 additions & 2 deletions src/styles/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ html[data-theme="dark"] {
}

.navbar__link {
border: 1px solid var(--border);
border-radius: 4px;
display: flex;
align-items: center;
margin-top: 0;
font-weight: 600;
color: var(--navbar-text-color);
Expand Down

0 comments on commit bd3e24e

Please sign in to comment.