Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
Init docusaurus i18n config
Browse files Browse the repository at this point in the history
  • Loading branch information
alstn2468 committed Apr 5, 2021
1 parent 6c20fc7 commit 36fa13c
Show file tree
Hide file tree
Showing 46 changed files with 325 additions and 3 deletions.
26 changes: 24 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
* @format
*/

function makeDocsEditUrl(locale, docPath) {
if (locale === 'en')
return `https://github.com/facebookexperimental/Recoil/edit/docs/docs/docs/${docPath}`
else
return `https://github.com/facebookexperimental/Recoil/edit/docs/docs/i18n/${locale}/docusaurus-plugin-content-docs/current/${docPath}`
}

module.exports = {
title: 'Recoil',
tagline: 'A state management library for React',
Expand All @@ -15,6 +22,18 @@ module.exports = {
favicon: 'img/favicon.png',
organizationName: 'facebookexperimental', // Usually your GitHub org/user name.
projectName: 'Recoil', // Usually your repo name.
i18n: {
defaultLocale: 'en',
locales: ['en', 'kr'],
localeConfigs: {
en: {
label: 'English',
},
kr: {
label: '한국어',
},
},
},
themeConfig: {
algolia: {
apiKey: '9c5a009951e793525603922b8ca66628',
Expand Down Expand Up @@ -47,6 +66,10 @@ module.exports = {
label: 'GitHub',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
Expand Down Expand Up @@ -129,8 +152,7 @@ module.exports = {
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/facebookexperimental/Recoil/edit/docs/docs/',
editUrl: ({ locale, docPath }) => makeDocsEditUrl(locale, docPath),
},
blog: {
showReadingTime: true,
Expand Down
194 changes: 194 additions & 0 deletions docs/i18n/kr/code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
{
"theme.NotFound.title": {
"message": "Page introuvable",
"description": "The title of the 404 page"
},
"theme.NotFound.p1": {
"message": "Nous n'avons pas trouvé ce que vous recherchez.",
"description": "The first paragraph of the 404 page"
},
"theme.NotFound.p2": {
"message": "Veuillez contacter le propriétaire du site qui vous a lié à l'URL d'origine et leur faire savoir que leur lien est cassé.",
"description": "The 2nd paragraph of the 404 page"
},
"theme.AnnouncementBar.closeButtonAriaLabel": {
"message": "Fermer",
"description": "The ARIA label for close button of announcement bar"
},
"theme.blog.paginator.navAriaLabel": {
"message": "Pagination de la liste des posts du blog",
"description": "The ARIA label for the blog pagination"
},
"theme.blog.paginator.newerEntries": {
"message": "Nouvelles entrées",
"description": "The label used to navigate to the newer blog posts page (previous page)"
},
"theme.blog.paginator.olderEntries": {
"message": "Anciennes entrées",
"description": "The label used to navigate to the older blog posts page (next page)"
},
"theme.blog.post.readingTime.plurals": {
"message": "Une minute de lecture|{readingTime} minutes de lecture",
"description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.tags.tagsListLabel": {
"message": "Tags :",
"description": "The label alongside a tag list"
},
"theme.blog.post.readMore": {
"message": "Lire plus",
"description": "The label used in blog post item excerpts to link to full blog posts"
},
"theme.blog.post.paginator.navAriaLabel": {
"message": "Pagination des blog posts",
"description": "The ARIA label for the blog posts pagination"
},
"theme.blog.post.paginator.newerPost": {
"message": "Article plus récent",
"description": "The blog post button label to navigate to the newer/previous post"
},
"theme.blog.post.paginator.olderPost": {
"message": "Article plus ancien",
"description": "The blog post button label to navigate to the older/next post"
},
"theme.tags.tagsPageTitle": {
"message": "Tags",
"description": "The title of the tag list page"
},
"theme.blog.post.plurals": {
"message": "Un article|{count} articles",
"description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.blog.tagTitle": {
"message": "{nPosts} tagués avec « {tagName} »",
"description": "The title of the page for a blog tag"
},
"theme.tags.tagsPageLink": {
"message": "Voir tous les tags",
"description": "The label of the link targeting the tag list page"
},
"theme.CodeBlock.copyButtonAriaLabel": {
"message": "Copier le code",
"description": "The ARIA label for copy code blocks button"
},
"theme.CodeBlock.copied": {
"message": "Copié",
"description": "The copied button label on code blocks"
},
"theme.CodeBlock.copy": {
"message": "Copier",
"description": "The copy button label on code blocks"
},
"theme.docs.sidebar.expandButtonTitle": {
"message": "Déplier le menu latéral",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.sidebar.expandButtonAriaLabel": {
"message": "Déplier le menu latéral",
"description": "The ARIA label and title attribute for expand button of doc sidebar"
},
"theme.docs.paginator.navAriaLabel": {
"message": "Pagination des documents",
"description": "The ARIA label for the docs pagination"
},
"theme.docs.paginator.previous": {
"message": "Précédent",
"description": "The label used to navigate to the previous doc"
},
"theme.docs.paginator.next": {
"message": "Suivant",
"description": "The label used to navigate to the next doc"
},
"theme.docs.sidebar.responsiveCloseButtonLabel": {
"message": "Fermer le menu latéral",
"description": "The ARIA label for close button of mobile doc sidebar"
},
"theme.docs.sidebar.responsiveOpenButtonLabel": {
"message": "Ouvrir le menu latéral",
"description": "The ARIA label for open button of mobile doc sidebar"
},
"theme.docs.sidebar.collapseButtonTitle": {
"message": "Réduire le menu latéral",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.sidebar.collapseButtonAriaLabel": {
"message": "Réduire le menu latéral",
"description": "The title attribute for collapse button of doc sidebar"
},
"theme.docs.versions.unreleasedVersionLabel": {
"message": "Ceci est la documentation de la prochaine version {versionLabel} de {siteTitle}.",
"description": "The label used to tell the user that he's browsing an unreleased doc version"
},
"theme.docs.versions.unmaintainedVersionLabel": {
"message": "Ceci est la documentation de {siteTitle} {versionLabel}, qui n'est plus activement maintenue.",
"description": "The label used to tell the user that he's browsing an unmaintained doc version"
},
"theme.docs.versions.latestVersionSuggestionLabel": {
"message": "Pour une documentation à jour, consultez la {latestVersionLink} ({versionLabel}).",
"description": "The label userd to tell the user that he's browsing an unmaintained doc version"
},
"theme.docs.versions.latestVersionLinkLabel": {
"message": "dernière version",
"description": "The label used for the latest version suggestion link label"
},
"theme.common.editThisPage": {
"message": "Éditer cette page",
"description": "The link label to edit the current page"
},
"theme.common.headingLinkTitle": {
"message": "Lien direct vers le titre",
"description": "Title for link to heading"
},
"theme.lastUpdated.atDate": {
"message": " le {date}",
"description": "The words used to describe on which date a page has been last updated"
},
"theme.lastUpdated.byUser": {
"message": " par {user}",
"description": "The words used to describe by who the page has been last updated"
},
"theme.lastUpdated.lastUpdatedAtBy": {
"message": "Dernière mise à jour{atDate}{byUser}",
"description": "The sentence used to display when a page has been last updated, and by who"
},
"theme.common.skipToMainContent": {
"message": "Aller au contenu principal",
"description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
},
"theme.SearchPage.documentsFound.plurals": {
"message": "Un document trouvé|{count} documents trouvés",
"description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
},
"theme.SearchPage.existingResultsTitle": {
"message": "Résultats de recherche pour « {query} »",
"description": "The search page title for non-empty query"
},
"theme.SearchPage.emptyResultsTitle": {
"message": "Rechercher dans la documentation",
"description": "The search page title for empty query"
},
"theme.SearchPage.inputPlaceholder": {
"message": "Tapez votre recherche ici",
"description": "The placeholder for search page input"
},
"theme.SearchPage.inputLabel": {
"message": "Chercher",
"description": "The ARIA label for search page input"
},
"theme.SearchPage.algoliaLabel": {
"message": "Recharche Algolia",
"description": "The ARIA label for Algolia mention"
},
"theme.SearchPage.noResultsText": {
"message": "Aucun résultat trouvé",
"description": "The paragraph for empty search result"
},
"theme.SearchPage.fetchingNewResults": {
"message": "Chargement de nouveaux résultats...",
"description": "The paragraph for fetching new search results"
},
"theme.SearchBar.label": {
"message": "Chercher",
"description": "The ARIA label and placeholder for search button"
}
}
42 changes: 42 additions & 0 deletions docs/i18n/kr/docusaurus-plugin-content-docs/current.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version.label": {
"message": "Suivant",
"description": "The label for version current"
},
"sidebar.docs.category.Introduction": {
"message": "Introduction",
"description": "The label for category Introduction in sidebar docs"
},
"sidebar.docs.category.Basic Tutorial": {
"message": "Tutoriel de base",
"description": "The label for category Basic Tutorial in sidebar docs"
},
"sidebar.docs.category.Guides": {
"message": "Guides",
"description": "The label for category Guides in sidebar docs"
},
"sidebar.docs.category.API Reference": {
"message": "Référence API",
"description": "The label for category API Reference in sidebar docs"
},
"sidebar.docs.category.Core": {
"message": "Concepts clés",
"description": "The label for category Core in sidebar docs"
},
"sidebar.docs.category.State": {
"message": "État",
"description": "The label for category State in sidebar docs"
},
"sidebar.docs.category.Snapshots": {
"message": "Instantané",
"description": "The label for category Snapshots in sidebar docs"
},
"sidebar.docs.category.Misc": {
"message": "Divers",
"description": "The label for category Misc in sidebar docs"
},
"sidebar.docs.category.Utils": {
"message": "Outils",
"description": "The label for category Utils in sidebar docs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ function CharacterCount() {

아래는 완성된 결과물이다.

import GettingStarted from '../../src/components/introduction/GettingStarted';
import GettingStarted from '../../../../../src/components/introduction/GettingStarted.jsx';

<GettingStarted />
File renamed without changes.
46 changes: 46 additions & 0 deletions docs/i18n/kr/docusaurus-theme-classic/footer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"link.title.Learn": {
"message": "Apprendre",
"description": "The title of the footer links column with title=Learn in the footer"
},
"link.title.Community": {
"message": "Communauté",
"description": "The title of the footer links column with title=Community in the footer"
},
"link.title.More": {
"message": "Plus",
"description": "The title of the footer links column with title=More in the footer"
},
"link.title.Legal": {
"message": "Légal",
"description": "The title of the footer links column with title=Legal in the footer"
},
"link.item.label.Getting Started": {
"message": "Commencer",
"description": "The label of footer link with label=Getting Started linking to docs/introduction/getting-started"
},
"link.item.label.Core Concepts": {
"message": "Concepts de base",
"description": "The label of footer link with label=Core Concepts linking to docs/introduction/core-concepts"
},
"link.item.label.Twitter": {
"message": "Twitter",
"description": "The label of footer link with label=Twitter linking to https://twitter.com/recoiljs"
},
"link.item.label.GitHub": {
"message": "GitHub",
"description": "The label of footer link with label=GitHub linking to https://github.com/facebookexperimental/Recoil"
},
"link.item.label.Privacy": {
"message": "Vie privée",
"description": "The label of footer link with label=Privacy linking to https://opensource.facebook.com/legal/privacy/"
},
"link.item.label.Terms": {
"message": "Termes",
"description": "The label of footer link with label=Terms linking to https://opensource.facebook.com/legal/terms/"
},
"copyright": {
"message": "Copyright © 2021 Facebook, Inc. Built with Docusaurus.",
"description": "The footer copyright"
}
}
18 changes: 18 additions & 0 deletions docs/i18n/kr/docusaurus-theme-classic/navbar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"item.label.Docs": {
"message": "Docs",
"description": "Navbar item with label Docs"
},
"item.label.Blog": {
"message": "Blog",
"description": "Navbar item with label Blog"
},
"item.label.External Resources": {
"message": "Resources Externes",
"description": "Navbar item with label External Resources"
},
"item.label.GitHub": {
"message": "GitHub",
"description": "Navbar item with label GitHub"
}
}

0 comments on commit 36fa13c

Please sign in to comment.