diff --git a/packages/docusaurus-plugin-pwa/package.json b/packages/docusaurus-plugin-pwa/package.json index 8673e05684..2d606565fc 100644 --- a/packages/docusaurus-plugin-pwa/package.json +++ b/packages/docusaurus-plugin-pwa/package.json @@ -25,6 +25,7 @@ "@babel/preset-env": "^7.15.6", "@docusaurus/core": "2.0.0-beta.9", "@docusaurus/theme-common": "2.0.0-beta.9", + "@docusaurus/theme-translations": "2.0.0-beta.9", "@docusaurus/utils": "2.0.0-beta.9", "@docusaurus/utils-validation": "2.0.0-beta.9", "babel-loader": "^8.2.2", diff --git a/packages/docusaurus-plugin-pwa/src/index.ts b/packages/docusaurus-plugin-pwa/src/index.ts index 918353a0c4..33f7131211 100644 --- a/packages/docusaurus-plugin-pwa/src/index.ts +++ b/packages/docusaurus-plugin-pwa/src/index.ts @@ -10,6 +10,7 @@ import type {PluginOptions} from '@docusaurus/plugin-pwa'; import {normalizeUrl} from '@docusaurus/utils'; import {compile} from '@docusaurus/core/lib/webpack/utils'; import LogPlugin from '@docusaurus/core/lib/webpack/plugins/LogPlugin'; +import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; import path from 'path'; import webpack, {Configuration} from 'webpack'; @@ -49,7 +50,11 @@ export default function ( context: LoadContext, options: PluginOptions, ): Plugin { - const {outDir, baseUrl} = context; + const { + outDir, + baseUrl, + i18n: {currentLocale}, + } = context; const { debug, offlineModeActivationStrategies, @@ -71,6 +76,13 @@ export default function ( return isProd ? [swRegister] : []; }, + getDefaultCodeTranslationMessages() { + return readDefaultCodeTranslationMessages({ + locale: currentLocale, + name: 'plugin-pwa', + }); + }, + configureWebpack(config) { if (!isProd) { return {}; diff --git a/packages/docusaurus-theme-classic/codeTranslations/README.md b/packages/docusaurus-theme-classic/codeTranslations/README.md deleted file mode 100644 index 1e25a836a1..0000000000 --- a/packages/docusaurus-theme-classic/codeTranslations/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Default theme translations - -The Docusaurus theme includes default translations for labels used by the theme itself (like the pagination "Next" / "Previous"). - -## For Docusaurus users: - -Please help us provide exhaustive translations: - -- add your `language.json` file if it is missing (copy `base.json` and remove the attributes `___DESCRIPTION`) -- double-check your `language.json` file for bad or missing translations - -## For maintainers: - -After updating the theme code, you can "synchronize" the translations by running: - -``` -yarn workspace @docusaurus/theme-classic update-code-translations -``` - -Then, ask contributors to translate the newly added labels on this [issue](https://github.com/facebook/docusaurus/issues/3526) diff --git a/packages/docusaurus-theme-classic/package.json b/packages/docusaurus-theme-classic/package.json index c4e4e8a5b5..b870604c0c 100644 --- a/packages/docusaurus-theme-classic/package.json +++ b/packages/docusaurus-theme-classic/package.json @@ -28,6 +28,7 @@ "@docusaurus/plugin-content-docs": "2.0.0-beta.9", "@docusaurus/plugin-content-pages": "2.0.0-beta.9", "@docusaurus/theme-common": "2.0.0-beta.9", + "@docusaurus/theme-translations": "2.0.0-beta.9", "@docusaurus/types": "2.0.0-beta.9", "@docusaurus/utils": "2.0.0-beta.9", "@docusaurus/utils-validation": "2.0.0-beta.9", diff --git a/packages/docusaurus-theme-classic/src/index.ts b/packages/docusaurus-theme-classic/src/index.ts index f3cbee2e19..f54af080ba 100644 --- a/packages/docusaurus-theme-classic/src/index.ts +++ b/packages/docusaurus-theme-classic/src/index.ts @@ -12,7 +12,7 @@ import path from 'path'; import {createRequire} from 'module'; import type {AcceptedPlugin, Plugin as PostCssPlugin} from 'postcss'; import rtlcss from 'rtlcss'; -import {readDefaultCodeTranslationMessages} from '@docusaurus/utils'; +import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; const requireFromDocusaurusCore = createRequire( require.resolve('@docusaurus/core/package.json'), @@ -134,11 +134,12 @@ export default function docusaurusThemeClassic( getTranslationFiles: async () => getTranslationFiles({themeConfig}), translateThemeConfig, - getDefaultCodeTranslationMessages: () => - readDefaultCodeTranslationMessages({ - dirPath: path.resolve(__dirname, '..', 'codeTranslations'), + getDefaultCodeTranslationMessages() { + return readDefaultCodeTranslationMessages({ locale: currentLocale, - }), + name: 'theme-common', + }); + }, getClientModules() { const modules = [ diff --git a/packages/docusaurus-theme-classic/update-code-translations.test.js b/packages/docusaurus-theme-classic/update-code-translations.test.js deleted file mode 100644 index 692b521378..0000000000 --- a/packages/docusaurus-theme-classic/update-code-translations.test.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const {extractThemeCodeMessages} = require('./update-code-translations'); -const path = require('path'); -const fs = require('fs-extra'); -const {mapValues, pickBy} = require('lodash'); - -// Seems the 5s default timeout fails sometimes -jest.setTimeout(15000); - -describe('update-code-translations', () => { - test(`to have base.json contain EXACTLY all the translations extracted from the theme. Please run "yarn workspace @docusaurus/theme-classic update-code-translations" to keep base.json up-to-date.`, async () => { - const baseMessages = pickBy( - JSON.parse( - await fs.readFile( - path.join(__dirname, 'codeTranslations', 'base.json'), - ), - ), - (_, key) => !key.endsWith('___DESCRIPTION'), - ); - - const codeMessages = mapValues( - await extractThemeCodeMessages(), - (translation) => translation.message, - ); - expect(codeMessages).toEqual(baseMessages); - }); -}); diff --git a/packages/docusaurus-theme-live-codeblock/package.json b/packages/docusaurus-theme-live-codeblock/package.json index 790f09febf..e54873a611 100644 --- a/packages/docusaurus-theme-live-codeblock/package.json +++ b/packages/docusaurus-theme-live-codeblock/package.json @@ -18,7 +18,9 @@ "license": "MIT", "dependencies": { "@docusaurus/core": "2.0.0-beta.9", + "@docusaurus/theme-translations": "2.0.0-beta.9", "@docusaurus/utils-validation": "2.0.0-beta.9", + "@docusaurus/utils": "2.0.0-beta.9", "@philpl/buble": "^0.19.7", "clsx": "^1.1.1", "fs-extra": "^10.0.0", diff --git a/packages/docusaurus-theme-live-codeblock/src/index.ts b/packages/docusaurus-theme-live-codeblock/src/index.ts index 7b4cd2b011..a88dfc0eda 100644 --- a/packages/docusaurus-theme-live-codeblock/src/index.ts +++ b/packages/docusaurus-theme-live-codeblock/src/index.ts @@ -6,9 +6,14 @@ */ import path from 'path'; -import {Plugin} from '@docusaurus/types'; +import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; +import {DocusaurusContext, Plugin} from '@docusaurus/types'; + +export default function theme(context: DocusaurusContext): Plugin { + const { + i18n: {currentLocale}, + } = context; -export default function theme(): Plugin { return { name: 'docusaurus-theme-live-codeblock', @@ -16,6 +21,13 @@ export default function theme(): Plugin { return path.resolve(__dirname, './theme'); }, + getDefaultCodeTranslationMessages() { + return readDefaultCodeTranslationMessages({ + locale: currentLocale, + name: 'theme-live-codeblock', + }); + }, + configureWebpack() { return { resolve: { diff --git a/packages/docusaurus-theme-search-algolia/package.json b/packages/docusaurus-theme-search-algolia/package.json index b7b57443da..f3d3ddf936 100644 --- a/packages/docusaurus-theme-search-algolia/package.json +++ b/packages/docusaurus-theme-search-algolia/package.json @@ -23,6 +23,7 @@ "@docsearch/react": "^3.0.0-alpha.39", "@docusaurus/core": "2.0.0-beta.9", "@docusaurus/theme-common": "2.0.0-beta.9", + "@docusaurus/theme-translations": "2.0.0-beta.9", "@docusaurus/utils": "2.0.0-beta.9", "@docusaurus/utils-validation": "2.0.0-beta.9", "algoliasearch": "^4.10.5", diff --git a/packages/docusaurus-theme-search-algolia/src/index.ts b/packages/docusaurus-theme-search-algolia/src/index.ts index faeb8a5986..ad1e5a49c0 100644 --- a/packages/docusaurus-theme-search-algolia/src/index.ts +++ b/packages/docusaurus-theme-search-algolia/src/index.ts @@ -9,6 +9,7 @@ import path from 'path'; import fs from 'fs'; import {defaultConfig, compile} from 'eta'; import {normalizeUrl, getSwizzledComponent} from '@docusaurus/utils'; +import {readDefaultCodeTranslationMessages} from '@docusaurus/theme-translations'; import openSearchTemplate from './templates/opensearch'; import {memoize} from 'lodash'; @@ -35,6 +36,7 @@ export default function theme( const { baseUrl, siteConfig: {title, url, favicon}, + i18n: {currentLocale}, } = context; const pageComponent = './theme/SearchPage/index.js'; const pagePath = @@ -56,6 +58,13 @@ export default function theme( return path.resolve(__dirname, '..', 'src', 'theme'); }, + getDefaultCodeTranslationMessages() { + return readDefaultCodeTranslationMessages({ + locale: currentLocale, + name: 'theme-search-algolia', + }); + }, + async contentLoaded({actions: {addRoute}}) { addRoute({ path: normalizeUrl([baseUrl, 'search']), diff --git a/packages/docusaurus-theme-translations/README.md b/packages/docusaurus-theme-translations/README.md new file mode 100644 index 0000000000..d12c98ba44 --- /dev/null +++ b/packages/docusaurus-theme-translations/README.md @@ -0,0 +1,20 @@ +# Docusaurus theme translations + +This package includes default translations for labels (like the pagination "Next" / "Previous") used by official Docusaurus themes. + +## For Docusaurus users: + +Please help us provide exhaustive translations: + +- add new translation by running `yarn workspace @docusaurus/theme-translations update %new_lang_code%`, then edit generated JSON files +- double-check existent `language.json` file for bad or missing translations + +## For maintainers: + +After updating the theme code, you can "synchronize" the translations by running: + +``` +yarn workspace @docusaurus/theme-translations update +``` + +Then, ask contributors to translate the newly added labels on this [issue](https://github.com/facebook/docusaurus/issues/3526) diff --git a/packages/docusaurus-theme-translations/locales/ar/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/ar/plugin-pwa.json new file mode 100644 index 0000000000..5876b26ea7 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ar/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "إغلاق", + "theme.PwaReloadPopup.info": "نسخة جديدة متاحة", + "theme.PwaReloadPopup.refreshButtonText": "تحديث" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/ar.json b/packages/docusaurus-theme-translations/locales/ar/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/ar.json rename to packages/docusaurus-theme-translations/locales/ar/theme-common.json index faa8166942..42fb8d07d3 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/ar.json +++ b/packages/docusaurus-theme-translations/locales/ar/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "لم نتمكن من العثور على ما كنت تبحث عنه.", "theme.NotFound.p2": "يرجى الاتصال بمالك الموقع الذي ربطك بعنوان URL الأصلي وإخباره بأن الارتباط الخاص به معطل.", "theme.NotFound.title": "الصفحة غير موجودة", - "theme.Playground.liveEditor": "محرر مباشر", - "theme.Playground.result": "النتيجة", - "theme.PwaReloadPopup.closeButtonAriaLabel": "إغلاق", - "theme.PwaReloadPopup.info": "نسخة جديدة متاحة", - "theme.PwaReloadPopup.refreshButtonText": "تحديث", - "theme.SearchBar.label": "بحث", - "theme.SearchPage.algoliaLabel": "البحث بواسطه Algolia", - "theme.SearchPage.documentsFound.plurals": "تم العثور على مستند واحد|تم العثور على {count} مستندات", - "theme.SearchPage.emptyResultsTitle": "ابحث في الوثائق", - "theme.SearchPage.existingResultsTitle": "نتائج البحث عن \"{query}\"", - "theme.SearchPage.fetchingNewResults": "جلب نتائج جديدة ...", - "theme.SearchPage.inputLabel": "بحث", - "theme.SearchPage.inputPlaceholder": "اكتب ما تبحث عنه هنا", - "theme.SearchPage.noResultsText": "لم يتم العثور على نتائج", "theme.TOCCollapsible.toggleButtonLabel": "محتويات هذه الصفحة", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/ar/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/ar/theme-live-codeblock.json new file mode 100644 index 0000000000..08e67dd7ce --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ar/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "محرر مباشر", + "theme.Playground.result": "النتيجة" +} diff --git a/packages/docusaurus-theme-translations/locales/ar/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/ar/theme-search-algolia.json new file mode 100644 index 0000000000..a7a675e7e8 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ar/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "بحث", + "theme.SearchPage.algoliaLabel": "البحث بواسطه Algolia", + "theme.SearchPage.documentsFound.plurals": "تم العثور على مستند واحد|تم العثور على {count} مستندات", + "theme.SearchPage.emptyResultsTitle": "ابحث في الوثائق", + "theme.SearchPage.existingResultsTitle": "نتائج البحث عن \"{query}\"", + "theme.SearchPage.fetchingNewResults": "جلب نتائج جديدة ...", + "theme.SearchPage.inputLabel": "بحث", + "theme.SearchPage.inputPlaceholder": "اكتب ما تبحث عنه هنا", + "theme.SearchPage.noResultsText": "لم يتم العثور على نتائج" +} diff --git a/packages/docusaurus-theme-translations/locales/base/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/base/plugin-pwa.json new file mode 100644 index 0000000000..31fffc2d0e --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/base/plugin-pwa.json @@ -0,0 +1,8 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Close", + "theme.PwaReloadPopup.closeButtonAriaLabel___DESCRIPTION": "The ARIA label for close button of PWA reload popup", + "theme.PwaReloadPopup.info": "New version available", + "theme.PwaReloadPopup.info___DESCRIPTION": "The text for PWA reload popup", + "theme.PwaReloadPopup.refreshButtonText": "Refresh", + "theme.PwaReloadPopup.refreshButtonText___DESCRIPTION": "The text for PWA reload button" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/base.json b/packages/docusaurus-theme-translations/locales/base/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/base.json rename to packages/docusaurus-theme-translations/locales/base/theme-common.json index 6a02a7d823..21c56d97ac 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/base.json +++ b/packages/docusaurus-theme-translations/locales/base/theme-common.json @@ -19,34 +19,6 @@ "theme.NotFound.p2___DESCRIPTION": "The 2nd paragraph of the 404 page", "theme.NotFound.title": "Page Not Found", "theme.NotFound.title___DESCRIPTION": "The title of the 404 page", - "theme.Playground.liveEditor": "Live Editor", - "theme.Playground.liveEditor___DESCRIPTION": "The live editor label of the live codeblocks", - "theme.Playground.result": "Result", - "theme.Playground.result___DESCRIPTION": "The result label of the live codeblocks", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Close", - "theme.PwaReloadPopup.closeButtonAriaLabel___DESCRIPTION": "The ARIA label for close button of PWA reload popup", - "theme.PwaReloadPopup.info": "New version available", - "theme.PwaReloadPopup.info___DESCRIPTION": "The text for PWA reload popup", - "theme.PwaReloadPopup.refreshButtonText": "Refresh", - "theme.PwaReloadPopup.refreshButtonText___DESCRIPTION": "The text for PWA reload button", - "theme.SearchBar.label": "Search", - "theme.SearchBar.label___DESCRIPTION": "The ARIA label and placeholder for search button", - "theme.SearchPage.algoliaLabel": "Search by Algolia", - "theme.SearchPage.algoliaLabel___DESCRIPTION": "The ARIA label for Algolia mention", - "theme.SearchPage.documentsFound.plurals": "One document found|{count} documents found", - "theme.SearchPage.documentsFound.plurals___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.emptyResultsTitle": "Search the documentation", - "theme.SearchPage.emptyResultsTitle___DESCRIPTION": "The search page title for empty query", - "theme.SearchPage.existingResultsTitle": "Search results for \"{query}\"", - "theme.SearchPage.existingResultsTitle___DESCRIPTION": "The search page title for non-empty query", - "theme.SearchPage.fetchingNewResults": "Fetching new results...", - "theme.SearchPage.fetchingNewResults___DESCRIPTION": "The paragraph for fetching new search results", - "theme.SearchPage.inputLabel": "Search", - "theme.SearchPage.inputLabel___DESCRIPTION": "The ARIA label for search page input", - "theme.SearchPage.inputPlaceholder": "Type your search here", - "theme.SearchPage.inputPlaceholder___DESCRIPTION": "The placeholder for search page input", - "theme.SearchPage.noResultsText": "No results were found", - "theme.SearchPage.noResultsText___DESCRIPTION": "The paragraph for empty search result", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.TOCCollapsible.toggleButtonLabel___DESCRIPTION": "The label used by the button on the collapsible TOC component", "theme.blog.archive.description": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/base/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/base/theme-live-codeblock.json new file mode 100644 index 0000000000..c441cd3e1d --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/base/theme-live-codeblock.json @@ -0,0 +1,6 @@ +{ + "theme.Playground.liveEditor": "Live Editor", + "theme.Playground.liveEditor___DESCRIPTION": "The live editor label of the live codeblocks", + "theme.Playground.result": "Result", + "theme.Playground.result___DESCRIPTION": "The result label of the live codeblocks" +} diff --git a/packages/docusaurus-theme-translations/locales/base/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/base/theme-search-algolia.json new file mode 100644 index 0000000000..ec8d06b463 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/base/theme-search-algolia.json @@ -0,0 +1,20 @@ +{ + "theme.SearchBar.label": "Search", + "theme.SearchBar.label___DESCRIPTION": "The ARIA label and placeholder for search button", + "theme.SearchPage.algoliaLabel": "Search by Algolia", + "theme.SearchPage.algoliaLabel___DESCRIPTION": "The ARIA label for Algolia mention", + "theme.SearchPage.documentsFound.plurals": "One document found|{count} documents found", + "theme.SearchPage.documentsFound.plurals___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.emptyResultsTitle": "Search the documentation", + "theme.SearchPage.emptyResultsTitle___DESCRIPTION": "The search page title for empty query", + "theme.SearchPage.existingResultsTitle": "Search results for \"{query}\"", + "theme.SearchPage.existingResultsTitle___DESCRIPTION": "The search page title for non-empty query", + "theme.SearchPage.fetchingNewResults": "Fetching new results...", + "theme.SearchPage.fetchingNewResults___DESCRIPTION": "The paragraph for fetching new search results", + "theme.SearchPage.inputLabel": "Search", + "theme.SearchPage.inputLabel___DESCRIPTION": "The ARIA label for search page input", + "theme.SearchPage.inputPlaceholder": "Type your search here", + "theme.SearchPage.inputPlaceholder___DESCRIPTION": "The placeholder for search page input", + "theme.SearchPage.noResultsText": "No results were found", + "theme.SearchPage.noResultsText___DESCRIPTION": "The paragraph for empty search result" +} diff --git a/packages/docusaurus-theme-translations/locales/bn/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/bn/plugin-pwa.json new file mode 100644 index 0000000000..803ee4017a --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/bn/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "বন্ধ করুন", + "theme.PwaReloadPopup.info": "নতুন সংস্করণ উপলব্ধ", + "theme.PwaReloadPopup.refreshButtonText": "রিফ্রেশ" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/bn.json b/packages/docusaurus-theme-translations/locales/bn/theme-common.json similarity index 77% rename from packages/docusaurus-theme-classic/codeTranslations/bn.json rename to packages/docusaurus-theme-translations/locales/bn/theme-common.json index b45e9b4f9b..7423984c7a 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/bn.json +++ b/packages/docusaurus-theme-translations/locales/bn/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "আপনি যা খুঁজছিলেন তা আমরা খুঁজে পাইনি।", "theme.NotFound.p2": "দয়া করে সাইটের মালিকের সাথে যোগাযোগ করুন যা আপনাকে মূল URL এর সাথে যুক্ত করেছে এবং তাদের লিঙ্কটি ভাঙ্গা রয়েছে তা তাদের জানান।", "theme.NotFound.title": "পেজটি খুঁজে পাওয়া যায়নি", - "theme.Playground.liveEditor": "লাইভ এডিটর", - "theme.Playground.result": "ফলাফল", - "theme.PwaReloadPopup.closeButtonAriaLabel": "বন্ধ করুন", - "theme.PwaReloadPopup.info": "নতুন সংস্করণ উপলব্ধ", - "theme.PwaReloadPopup.refreshButtonText": "রিফ্রেশ", - "theme.SearchBar.label": "সার্চ", - "theme.SearchPage.algoliaLabel": "আলগোলিয়া দ্বারা অনুসন্ধান করুন", - "theme.SearchPage.documentsFound.plurals": "একটি ডকুমেন্ট পাওয়া গেছে|{count} ডকুমেন্টস পাওয়া গেছে", - "theme.SearchPage.emptyResultsTitle": "ডকুমেন্টেশন অনুসন্ধান করুন", - "theme.SearchPage.existingResultsTitle": "\"{query}\" এর জন্য অনুসন্ধান ফলাফল", - "theme.SearchPage.fetchingNewResults": "নতুন ফলাফল আনা হচ্ছে...", - "theme.SearchPage.inputLabel": "সার্চ", - "theme.SearchPage.inputPlaceholder": "আপনার অনুসন্ধান এখানে টাইপ করুন", - "theme.SearchPage.noResultsText": "কোন ফলাফল পাওয়া যায়নি", "theme.TOCCollapsible.toggleButtonLabel": "এই পেজ এ রয়েছে", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/bn/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/bn/theme-live-codeblock.json new file mode 100644 index 0000000000..494dfb7199 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/bn/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "লাইভ এডিটর", + "theme.Playground.result": "ফলাফল" +} diff --git a/packages/docusaurus-theme-translations/locales/bn/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/bn/theme-search-algolia.json new file mode 100644 index 0000000000..94375d80d3 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/bn/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "সার্চ", + "theme.SearchPage.algoliaLabel": "আলগোলিয়া দ্বারা অনুসন্ধান করুন", + "theme.SearchPage.documentsFound.plurals": "একটি ডকুমেন্ট পাওয়া গেছে|{count} ডকুমেন্টস পাওয়া গেছে", + "theme.SearchPage.emptyResultsTitle": "ডকুমেন্টেশন অনুসন্ধান করুন", + "theme.SearchPage.existingResultsTitle": "\"{query}\" এর জন্য অনুসন্ধান ফলাফল", + "theme.SearchPage.fetchingNewResults": "নতুন ফলাফল আনা হচ্ছে...", + "theme.SearchPage.inputLabel": "সার্চ", + "theme.SearchPage.inputPlaceholder": "আপনার অনুসন্ধান এখানে টাইপ করুন", + "theme.SearchPage.noResultsText": "কোন ফলাফল পাওয়া যায়নি" +} diff --git a/packages/docusaurus-theme-translations/locales/cs/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/cs/plugin-pwa.json new file mode 100644 index 0000000000..9f7e1b99d6 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/cs/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Zavřít", + "theme.PwaReloadPopup.info": "Nová verze k dispozici", + "theme.PwaReloadPopup.refreshButtonText": "Obnovit" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/cs.json b/packages/docusaurus-theme-translations/locales/cs/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/cs.json rename to packages/docusaurus-theme-translations/locales/cs/theme-common.json index 41c8123537..edb9876abe 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/cs.json +++ b/packages/docusaurus-theme-translations/locales/cs/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Nepodařilo se nám najít co jste hledal(a).", "theme.NotFound.p2": "Kontaktujte prosím vlastníka webu, který vás odkázal na původní URL a upozorněte ho, že jejich odkaz nefunguje.", "theme.NotFound.title": "Stránka nenalezena", - "theme.Playground.liveEditor": "Live Editor", - "theme.Playground.result": "Výsledek", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Zavřít", - "theme.PwaReloadPopup.info": "Nová verze k dispozici", - "theme.PwaReloadPopup.refreshButtonText": "Obnovit", - "theme.SearchBar.label": "Hledat", - "theme.SearchPage.algoliaLabel": "Vyhledávání od Algolia", - "theme.SearchPage.documentsFound.plurals": "Jeden dokument nalezen|{count} dokumenty nalezeny||{count} dokumentů nalezeno||{count} dokumentů nalezeno", - "theme.SearchPage.emptyResultsTitle": "Prohledat dokumentaci", - "theme.SearchPage.existingResultsTitle": "Výsledky vyhledávání pro \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Stahuji nové výsledky...", - "theme.SearchPage.inputLabel": "Hledat", - "theme.SearchPage.inputPlaceholder": "Zde napište hledaný text", - "theme.SearchPage.noResultsText": "Nic nebylo nalezeno", "theme.TOCCollapsible.toggleButtonLabel": "Na této stránce", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/cs/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/cs/theme-live-codeblock.json new file mode 100644 index 0000000000..c39266697a --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/cs/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Live Editor", + "theme.Playground.result": "Výsledek" +} diff --git a/packages/docusaurus-theme-translations/locales/cs/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/cs/theme-search-algolia.json new file mode 100644 index 0000000000..90dd869562 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/cs/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Hledat", + "theme.SearchPage.algoliaLabel": "Vyhledávání od Algolia", + "theme.SearchPage.documentsFound.plurals": "Jeden dokument nalezen|{count} dokumenty nalezeny||{count} dokumentů nalezeno||{count} dokumentů nalezeno", + "theme.SearchPage.emptyResultsTitle": "Prohledat dokumentaci", + "theme.SearchPage.existingResultsTitle": "Výsledky vyhledávání pro \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Stahuji nové výsledky...", + "theme.SearchPage.inputLabel": "Hledat", + "theme.SearchPage.inputPlaceholder": "Zde napište hledaný text", + "theme.SearchPage.noResultsText": "Nic nebylo nalezeno" +} diff --git a/packages/docusaurus-theme-translations/locales/da/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/da/plugin-pwa.json new file mode 100644 index 0000000000..506908601b --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/da/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Luk", + "theme.PwaReloadPopup.info": "Ny version er tilgængelig", + "theme.PwaReloadPopup.refreshButtonText": "Genopfrisk" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/da.json b/packages/docusaurus-theme-translations/locales/da/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/da.json rename to packages/docusaurus-theme-translations/locales/da/theme-common.json index cb46ce376e..a7f93b74c4 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/da.json +++ b/packages/docusaurus-theme-translations/locales/da/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Vi kunne ikke finde det, du søgte.", "theme.NotFound.p2": "Venligst kontakt ejeren til webstedet, som førte dig frem denne URL, og informer dem om at linket ikke virker.", "theme.NotFound.title": "Siden blev ikke fundet", - "theme.Playground.liveEditor": "Live editor", - "theme.Playground.result": "Resultat", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Luk", - "theme.PwaReloadPopup.info": "Ny version er tilgængelig", - "theme.PwaReloadPopup.refreshButtonText": "Genopfrisk", - "theme.SearchBar.label": "Søg", - "theme.SearchPage.algoliaLabel": "Søg med Algolia", - "theme.SearchPage.documentsFound.plurals": "Et dokument fundet|{count} dokumenter fundet", - "theme.SearchPage.emptyResultsTitle": "Søg i dokumentationen", - "theme.SearchPage.existingResultsTitle": "Søgeresultater for \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Henter nye resultater...", - "theme.SearchPage.inputLabel": "Søg", - "theme.SearchPage.inputPlaceholder": "Indtast din søgning her", - "theme.SearchPage.noResultsText": "Ingen resultater fundet", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/da/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/da/theme-live-codeblock.json new file mode 100644 index 0000000000..44b092222c --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/da/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Live editor", + "theme.Playground.result": "Resultat" +} diff --git a/packages/docusaurus-theme-translations/locales/da/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/da/theme-search-algolia.json new file mode 100644 index 0000000000..a67cec19d0 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/da/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Søg", + "theme.SearchPage.algoliaLabel": "Søg med Algolia", + "theme.SearchPage.documentsFound.plurals": "Et dokument fundet|{count} dokumenter fundet", + "theme.SearchPage.emptyResultsTitle": "Søg i dokumentationen", + "theme.SearchPage.existingResultsTitle": "Søgeresultater for \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Henter nye resultater...", + "theme.SearchPage.inputLabel": "Søg", + "theme.SearchPage.inputPlaceholder": "Indtast din søgning her", + "theme.SearchPage.noResultsText": "Ingen resultater fundet" +} diff --git a/packages/docusaurus-theme-translations/locales/de/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/de/plugin-pwa.json new file mode 100644 index 0000000000..78c1256511 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/de/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Schließen", + "theme.PwaReloadPopup.info": "Neue Version verfügbar", + "theme.PwaReloadPopup.refreshButtonText": "Aktualisieren" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/de.json b/packages/docusaurus-theme-translations/locales/de/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/de.json rename to packages/docusaurus-theme-translations/locales/de/theme-common.json index a8e991b056..9f0e1d0885 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/de.json +++ b/packages/docusaurus-theme-translations/locales/de/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Wir konnten nicht finden, wonach Sie gesucht haben.", "theme.NotFound.p2": "Bitte kontaktieren Sie den Besitzer der Seite, die Sie mit der ursprünglichen URL verlinkt hat, und teilen Sie ihm mit, dass der Link nicht mehr funktioniert.", "theme.NotFound.title": "Seite nicht gefunden", - "theme.Playground.liveEditor": "Live Editor", - "theme.Playground.result": "Ergebnisse", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Schließen", - "theme.PwaReloadPopup.info": "Neue Version verfügbar", - "theme.PwaReloadPopup.refreshButtonText": "Aktualisieren", - "theme.SearchBar.label": "Suche", - "theme.SearchPage.algoliaLabel": "Suche von Algolia", - "theme.SearchPage.documentsFound.plurals": "Ein Dokument gefunden|{count} Dokumente gefunden", - "theme.SearchPage.emptyResultsTitle": "Suche in der Dokumentation", - "theme.SearchPage.existingResultsTitle": "Suchergebnisse für \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Neue Ergebnisse abrufen...", - "theme.SearchPage.inputLabel": "Suche", - "theme.SearchPage.inputPlaceholder": "Geben Sie hier Ihre Suche ein", - "theme.SearchPage.noResultsText": "Es wurden keine Ergebnisse gefunden", "theme.TOCCollapsible.toggleButtonLabel": "Auf dieser Seite", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/de/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/de/theme-live-codeblock.json new file mode 100644 index 0000000000..2b888e17d3 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/de/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Live Editor", + "theme.Playground.result": "Ergebnisse" +} diff --git a/packages/docusaurus-theme-translations/locales/de/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/de/theme-search-algolia.json new file mode 100644 index 0000000000..9f4322be35 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/de/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Suche", + "theme.SearchPage.algoliaLabel": "Suche von Algolia", + "theme.SearchPage.documentsFound.plurals": "Ein Dokument gefunden|{count} Dokumente gefunden", + "theme.SearchPage.emptyResultsTitle": "Suche in der Dokumentation", + "theme.SearchPage.existingResultsTitle": "Suchergebnisse für \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Neue Ergebnisse abrufen...", + "theme.SearchPage.inputLabel": "Suche", + "theme.SearchPage.inputPlaceholder": "Geben Sie hier Ihre Suche ein", + "theme.SearchPage.noResultsText": "Es wurden keine Ergebnisse gefunden" +} diff --git a/packages/docusaurus-theme-translations/locales/es/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/es/plugin-pwa.json new file mode 100644 index 0000000000..a9993be078 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/es/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Cerrar", + "theme.PwaReloadPopup.info": "Nueva versión disponible", + "theme.PwaReloadPopup.refreshButtonText": "Actualizar" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/es.json b/packages/docusaurus-theme-translations/locales/es/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/es.json rename to packages/docusaurus-theme-translations/locales/es/theme-common.json index 700ebed3f1..7555045616 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/es.json +++ b/packages/docusaurus-theme-translations/locales/es/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "No pudimos encontrar lo que buscaba.", "theme.NotFound.p2": "Comuníquese con el dueño del sitio que lo vinculó a la URL original y hágale saber que su vínculo está roto.", "theme.NotFound.title": "Página No Encontrada", - "theme.Playground.liveEditor": "Editor en vivo", - "theme.Playground.result": "Resultado", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Cerrar", - "theme.PwaReloadPopup.info": "Nueva versión disponible", - "theme.PwaReloadPopup.refreshButtonText": "Actualizar", - "theme.SearchBar.label": "Buscar", - "theme.SearchPage.algoliaLabel": "Búsqueda por Algolia", - "theme.SearchPage.documentsFound.plurals": "Un documento encontrado|{count} documentos encontrados", - "theme.SearchPage.emptyResultsTitle": "Búsqueda en la documentación", - "theme.SearchPage.existingResultsTitle": "Resultados de búsqueda para \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Obteniendo nuevos resultados...", - "theme.SearchPage.inputLabel": "Buscar", - "theme.SearchPage.inputPlaceholder": "Escribe tu búsqueda aquí", - "theme.SearchPage.noResultsText": "No se encontraron resultados", "theme.TOCCollapsible.toggleButtonLabel": "En esta página", "theme.blog.archive.description": "Archivo", "theme.blog.archive.title": "Archivo", diff --git a/packages/docusaurus-theme-translations/locales/es/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/es/theme-live-codeblock.json new file mode 100644 index 0000000000..b676360a47 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/es/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Editor en vivo", + "theme.Playground.result": "Resultado" +} diff --git a/packages/docusaurus-theme-translations/locales/es/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/es/theme-search-algolia.json new file mode 100644 index 0000000000..7a005d971d --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/es/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Buscar", + "theme.SearchPage.algoliaLabel": "Búsqueda por Algolia", + "theme.SearchPage.documentsFound.plurals": "Un documento encontrado|{count} documentos encontrados", + "theme.SearchPage.emptyResultsTitle": "Búsqueda en la documentación", + "theme.SearchPage.existingResultsTitle": "Resultados de búsqueda para \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Obteniendo nuevos resultados...", + "theme.SearchPage.inputLabel": "Buscar", + "theme.SearchPage.inputPlaceholder": "Escribe tu búsqueda aquí", + "theme.SearchPage.noResultsText": "No se encontraron resultados" +} diff --git a/packages/docusaurus-theme-translations/locales/fa/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/fa/plugin-pwa.json new file mode 100644 index 0000000000..91713f508a --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fa/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "بستن", + "theme.PwaReloadPopup.info": "نسخه جدیدی منتشر شده است.", + "theme.PwaReloadPopup.refreshButtonText": "بروزرسانی" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/fa.json b/packages/docusaurus-theme-translations/locales/fa/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/fa.json rename to packages/docusaurus-theme-translations/locales/fa/theme-common.json index 18c5923e11..18c90202b2 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/fa.json +++ b/packages/docusaurus-theme-translations/locales/fa/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "صفحه ای که دنبال آن بودید پیدا نشد.", "theme.NotFound.p2": "لطفا با صاحب وبسایت تماس بگیرید و ایشان را از مشکل پیش آمده مطلع کنید.", "theme.NotFound.title": "صفحه ای که دنبال آن بودید پیدا نشد.", - "theme.Playground.liveEditor": "ویرایشگر زنده", - "theme.Playground.result": "نتیجه", - "theme.PwaReloadPopup.closeButtonAriaLabel": "بستن", - "theme.PwaReloadPopup.info": "نسخه جدیدی منتشر شده است.", - "theme.PwaReloadPopup.refreshButtonText": "بروزرسانی", - "theme.SearchBar.label": "جستجو", - "theme.SearchPage.algoliaLabel": "جستجو با Algolia", - "theme.SearchPage.documentsFound.plurals": "یک مورد پیدا شد|{count} مورد پیدا شد", - "theme.SearchPage.emptyResultsTitle": "جستجو در متن", - "theme.SearchPage.existingResultsTitle": "جستجو برای عبارت \"{query}\"", - "theme.SearchPage.fetchingNewResults": "در حال دریافت نتایج...", - "theme.SearchPage.inputLabel": "جستجو", - "theme.SearchPage.inputPlaceholder": "عبارت مورد نظر را اینجا بنویسید", - "theme.SearchPage.noResultsText": "هیچ نتیجه ای پیدا نشد", "theme.TOCCollapsible.toggleButtonLabel": "مطالب این صفحه", "theme.blog.archive.description": "آرشیو", "theme.blog.archive.title": "آرشیو", diff --git a/packages/docusaurus-theme-translations/locales/fa/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/fa/theme-live-codeblock.json new file mode 100644 index 0000000000..5b919380db --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fa/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "ویرایشگر زنده", + "theme.Playground.result": "نتیجه" +} diff --git a/packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json new file mode 100644 index 0000000000..94540a252e --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fa/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "جستجو", + "theme.SearchPage.algoliaLabel": "جستجو با Algolia", + "theme.SearchPage.documentsFound.plurals": "یک مورد پیدا شد|{count} مورد پیدا شد", + "theme.SearchPage.emptyResultsTitle": "جستجو در متن", + "theme.SearchPage.existingResultsTitle": "جستجو برای عبارت \"{query}\"", + "theme.SearchPage.fetchingNewResults": "در حال دریافت نتایج...", + "theme.SearchPage.inputLabel": "جستجو", + "theme.SearchPage.inputPlaceholder": "عبارت مورد نظر را اینجا بنویسید", + "theme.SearchPage.noResultsText": "هیچ نتیجه ای پیدا نشد" +} diff --git a/packages/docusaurus-theme-translations/locales/fil/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/fil/plugin-pwa.json new file mode 100644 index 0000000000..8b17f45b9a --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fil/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Isara", + "theme.PwaReloadPopup.info": "May available na bagong bersiyón", + "theme.PwaReloadPopup.refreshButtonText": "I-refresh" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/fil.json b/packages/docusaurus-theme-translations/locales/fil/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/fil.json rename to packages/docusaurus-theme-translations/locales/fil/theme-common.json index 8cff6b7020..e1577372e5 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/fil.json +++ b/packages/docusaurus-theme-translations/locales/fil/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Hindi namin mahanap ang iyong hinananap.", "theme.NotFound.p2": "Mangyaring makipag-ugnayan sa may-ari ng site na nag-link sa iyo sa orihinal na URL at sabihin sa kanila na ang kanilang link ay putol.", "theme.NotFound.title": "Hindi Nahanap ang Pahina", - "theme.Playground.liveEditor": "Live na Editor", - "theme.Playground.result": "Resulta", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Isara", - "theme.PwaReloadPopup.info": "May available na bagong bersiyón", - "theme.PwaReloadPopup.refreshButtonText": "I-refresh", - "theme.SearchBar.label": "Maghanap", - "theme.SearchPage.algoliaLabel": "Paghahanap hatid ng Algolia", - "theme.SearchPage.documentsFound.plurals": "Isang dokumento ang nahanap|{count} na mga dokumento ang nahanap", - "theme.SearchPage.emptyResultsTitle": "Maghanap sa dokumentasyón", - "theme.SearchPage.existingResultsTitle": "Resulta ng paghahanap para sa \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Kumukuha ng mga bagong resulta...", - "theme.SearchPage.inputLabel": "Maghanap", - "theme.SearchPage.inputPlaceholder": "I-type and inyong hinahanap dito", - "theme.SearchPage.noResultsText": "Walang resultang nahanap", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/fil/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/fil/theme-live-codeblock.json new file mode 100644 index 0000000000..a5682c6888 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fil/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Live na Editor", + "theme.Playground.result": "Resulta" +} diff --git a/packages/docusaurus-theme-translations/locales/fil/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/fil/theme-search-algolia.json new file mode 100644 index 0000000000..8edf8eff1c --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fil/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Maghanap", + "theme.SearchPage.algoliaLabel": "Paghahanap hatid ng Algolia", + "theme.SearchPage.documentsFound.plurals": "Isang dokumento ang nahanap|{count} na mga dokumento ang nahanap", + "theme.SearchPage.emptyResultsTitle": "Maghanap sa dokumentasyón", + "theme.SearchPage.existingResultsTitle": "Resulta ng paghahanap para sa \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Kumukuha ng mga bagong resulta...", + "theme.SearchPage.inputLabel": "Maghanap", + "theme.SearchPage.inputPlaceholder": "I-type and inyong hinahanap dito", + "theme.SearchPage.noResultsText": "Walang resultang nahanap" +} diff --git a/packages/docusaurus-theme-translations/locales/fr/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/fr/plugin-pwa.json new file mode 100644 index 0000000000..761775d154 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fr/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Fermer", + "theme.PwaReloadPopup.info": "Nouvelle version disponible", + "theme.PwaReloadPopup.refreshButtonText": "Rafraîchir" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/fr.json b/packages/docusaurus-theme-translations/locales/fr/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/fr.json rename to packages/docusaurus-theme-translations/locales/fr/theme-common.json index 1871304383..1737cfea90 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/fr.json +++ b/packages/docusaurus-theme-translations/locales/fr/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Nous n'avons pas trouvé ce que vous recherchez.", "theme.NotFound.p2": "Veuillez contacter le propriétaire du site qui vous a lié à l'URL d'origine et leur faire savoir que leur lien est cassé.", "theme.NotFound.title": "Page introuvable", - "theme.Playground.liveEditor": "Éditeur en direct", - "theme.Playground.result": "Résultat", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Fermer", - "theme.PwaReloadPopup.info": "Nouvelle version disponible", - "theme.PwaReloadPopup.refreshButtonText": "Rafraîchir", - "theme.SearchBar.label": "Chercher", - "theme.SearchPage.algoliaLabel": "Recherche par Algolia", - "theme.SearchPage.documentsFound.plurals": "Un document trouvé|{count} documents trouvés", - "theme.SearchPage.emptyResultsTitle": "Rechercher dans la documentation", - "theme.SearchPage.existingResultsTitle": "Résultats de recherche pour « {query} »", - "theme.SearchPage.fetchingNewResults": "Chargement de nouveaux résultats...", - "theme.SearchPage.inputLabel": "Chercher", - "theme.SearchPage.inputPlaceholder": "Tapez votre recherche ici", - "theme.SearchPage.noResultsText": "Aucun résultat trouvé", "theme.TOCCollapsible.toggleButtonLabel": "Sur cette page", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/fr/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/fr/theme-live-codeblock.json new file mode 100644 index 0000000000..d9b50676f5 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fr/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Éditeur en direct", + "theme.Playground.result": "Résultat" +} diff --git a/packages/docusaurus-theme-translations/locales/fr/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/fr/theme-search-algolia.json new file mode 100644 index 0000000000..e56e24b95c --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/fr/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Chercher", + "theme.SearchPage.algoliaLabel": "Recherche par Algolia", + "theme.SearchPage.documentsFound.plurals": "Un document trouvé|{count} documents trouvés", + "theme.SearchPage.emptyResultsTitle": "Rechercher dans la documentation", + "theme.SearchPage.existingResultsTitle": "Résultats de recherche pour « {query} »", + "theme.SearchPage.fetchingNewResults": "Chargement de nouveaux résultats...", + "theme.SearchPage.inputLabel": "Chercher", + "theme.SearchPage.inputPlaceholder": "Tapez votre recherche ici", + "theme.SearchPage.noResultsText": "Aucun résultat trouvé" +} diff --git a/packages/docusaurus-theme-translations/locales/he/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/he/plugin-pwa.json new file mode 100644 index 0000000000..ecb1140665 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/he/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "סגור", + "theme.PwaReloadPopup.info": "קיימת גרסא חדשה", + "theme.PwaReloadPopup.refreshButtonText": "רענן" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/he.json b/packages/docusaurus-theme-translations/locales/he/theme-common.json similarity index 77% rename from packages/docusaurus-theme-classic/codeTranslations/he.json rename to packages/docusaurus-theme-translations/locales/he/theme-common.json index f1c6e2e52b..e734c167d5 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/he.json +++ b/packages/docusaurus-theme-translations/locales/he/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "אנחנו לא מוצאים את מה שאתה מנסה לחפש.", "theme.NotFound.p2": "הקישור אינו תקין, אנא פנה למנהל האתר ממנו קיבלת קישור זה.", "theme.NotFound.title": "דף לא נמצא", - "theme.Playground.liveEditor": "Live Editor", - "theme.Playground.result": "תוצאה", - "theme.PwaReloadPopup.closeButtonAriaLabel": "סגור", - "theme.PwaReloadPopup.info": "קיימת גרסא חדשה", - "theme.PwaReloadPopup.refreshButtonText": "רענן", - "theme.SearchBar.label": "חיפוש", - "theme.SearchPage.algoliaLabel": "חיפוש by Algolia", - "theme.SearchPage.documentsFound.plurals": "נמצא מסמך אחד|{count} מסמכים נמצאו|{count} מסמכים נמצאו|{count} מסמכים נמצאו", - "theme.SearchPage.emptyResultsTitle": "חפש בדוקומנטאציה", - "theme.SearchPage.existingResultsTitle": "תוצאות חיפוש עבור \"{query}\"", - "theme.SearchPage.fetchingNewResults": "טוען תוצאות חיפוש חדשות...", - "theme.SearchPage.inputLabel": "חיפוש", - "theme.SearchPage.inputPlaceholder": "הקלד כאן לחיפוש", - "theme.SearchPage.noResultsText": "לא נמצאו תוצאות", "theme.TOCCollapsible.toggleButtonLabel": "בעמוד זה", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/he/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/he/theme-live-codeblock.json new file mode 100644 index 0000000000..14c9a96ddc --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/he/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Live Editor", + "theme.Playground.result": "תוצאה" +} diff --git a/packages/docusaurus-theme-translations/locales/he/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/he/theme-search-algolia.json new file mode 100644 index 0000000000..5a0b551623 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/he/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "חיפוש", + "theme.SearchPage.algoliaLabel": "חיפוש by Algolia", + "theme.SearchPage.documentsFound.plurals": "נמצא מסמך אחד|{count} מסמכים נמצאו|{count} מסמכים נמצאו|{count} מסמכים נמצאו", + "theme.SearchPage.emptyResultsTitle": "חפש בדוקומנטאציה", + "theme.SearchPage.existingResultsTitle": "תוצאות חיפוש עבור \"{query}\"", + "theme.SearchPage.fetchingNewResults": "טוען תוצאות חיפוש חדשות...", + "theme.SearchPage.inputLabel": "חיפוש", + "theme.SearchPage.inputPlaceholder": "הקלד כאן לחיפוש", + "theme.SearchPage.noResultsText": "לא נמצאו תוצאות" +} diff --git a/packages/docusaurus-theme-translations/locales/hi/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/hi/plugin-pwa.json new file mode 100644 index 0000000000..420a25be48 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/hi/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "बंद करे", + "theme.PwaReloadPopup.info": "नया वर्जन उपलब्ध है", + "theme.PwaReloadPopup.refreshButtonText": "रिफ्रेश" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/hi.json b/packages/docusaurus-theme-translations/locales/hi/theme-common.json similarity index 77% rename from packages/docusaurus-theme-classic/codeTranslations/hi.json rename to packages/docusaurus-theme-translations/locales/hi/theme-common.json index 1c7792160d..e0f82feac3 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/hi.json +++ b/packages/docusaurus-theme-translations/locales/hi/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "हमें वह नहीं मिला, जिसकी आपको तलाश थी।", "theme.NotFound.p2": "कृपया उस साइट के मालिक से संपर्क करें जिसने आपको मूल URL से जोड़ा है और उन्हें बताएं कि उनका लिंक टूट गया है।", "theme.NotFound.title": "पेज नहीं मिला", - "theme.Playground.liveEditor": "लाइव एडिटर", - "theme.Playground.result": "परिणाम", - "theme.PwaReloadPopup.closeButtonAriaLabel": "बंद करे", - "theme.PwaReloadPopup.info": "नया वर्जन उपलब्ध है", - "theme.PwaReloadPopup.refreshButtonText": "रिफ्रेश", - "theme.SearchBar.label": "खोज करें", - "theme.SearchPage.algoliaLabel": "अल्गोलिया द्वारा खोजें", - "theme.SearchPage.documentsFound.plurals": "एक डॉक्यूमेंट मिला|{count} डॉक्यूमेंट मिलें", - "theme.SearchPage.emptyResultsTitle": "डॉक्यूमेंटेशन में खोजें", - "theme.SearchPage.existingResultsTitle": "\"{query}\" के लिए खोज परिणाम", - "theme.SearchPage.fetchingNewResults": "नए परिणाम प्राप्त कियें जा रहे हैं...", - "theme.SearchPage.inputLabel": "खोज करें", - "theme.SearchPage.inputPlaceholder": "अपनी खोज यहाँ टाइप करें", - "theme.SearchPage.noResultsText": "कोई परिणाम नहीं मिलें", "theme.TOCCollapsible.toggleButtonLabel": "इस पेज पर", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/hi/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/hi/theme-live-codeblock.json new file mode 100644 index 0000000000..3f90304a16 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/hi/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "लाइव एडिटर", + "theme.Playground.result": "परिणाम" +} diff --git a/packages/docusaurus-theme-translations/locales/hi/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/hi/theme-search-algolia.json new file mode 100644 index 0000000000..e974c83899 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/hi/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "खोज करें", + "theme.SearchPage.algoliaLabel": "अल्गोलिया द्वारा खोजें", + "theme.SearchPage.documentsFound.plurals": "एक डॉक्यूमेंट मिला|{count} डॉक्यूमेंट मिलें", + "theme.SearchPage.emptyResultsTitle": "डॉक्यूमेंटेशन में खोजें", + "theme.SearchPage.existingResultsTitle": "\"{query}\" के लिए खोज परिणाम", + "theme.SearchPage.fetchingNewResults": "नए परिणाम प्राप्त कियें जा रहे हैं...", + "theme.SearchPage.inputLabel": "खोज करें", + "theme.SearchPage.inputPlaceholder": "अपनी खोज यहाँ टाइप करें", + "theme.SearchPage.noResultsText": "कोई परिणाम नहीं मिलें" +} diff --git a/packages/docusaurus-theme-translations/locales/ja/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/ja/plugin-pwa.json new file mode 100644 index 0000000000..7b24dbda90 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ja/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "閉じる", + "theme.PwaReloadPopup.info": "新しいバージョンがあります", + "theme.PwaReloadPopup.refreshButtonText": "更新" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/ja.json b/packages/docusaurus-theme-translations/locales/ja/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/ja.json rename to packages/docusaurus-theme-translations/locales/ja/theme-common.json index fb8af4b703..a5e2d1b939 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/ja.json +++ b/packages/docusaurus-theme-translations/locales/ja/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "お探しのページが見つかりませんでした。", "theme.NotFound.p2": "このページにリンクしているサイトの所有者に連絡をしてリンクが壊れていることを伝えてください。", "theme.NotFound.title": "ページが見つかりません", - "theme.Playground.liveEditor": "Live Editor", - "theme.Playground.result": "Result", - "theme.PwaReloadPopup.closeButtonAriaLabel": "閉じる", - "theme.PwaReloadPopup.info": "新しいバージョンがあります", - "theme.PwaReloadPopup.refreshButtonText": "更新", - "theme.SearchBar.label": "検索", - "theme.SearchPage.algoliaLabel": "Algoliaで検索", - "theme.SearchPage.documentsFound.plurals": "{count}件のドキュメントが見つかりました", - "theme.SearchPage.emptyResultsTitle": "ドキュメントを検索", - "theme.SearchPage.existingResultsTitle": "『{query}』の検索結果", - "theme.SearchPage.fetchingNewResults": "新しい検索結果を取得しています...", - "theme.SearchPage.inputLabel": "検索", - "theme.SearchPage.inputPlaceholder": "ここに検索するキーワードを入力してください", - "theme.SearchPage.noResultsText": "検索結果が見つかりませんでした", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/ja/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/ja/theme-live-codeblock.json new file mode 100644 index 0000000000..4f4a503fe0 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ja/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Live Editor", + "theme.Playground.result": "Result" +} diff --git a/packages/docusaurus-theme-translations/locales/ja/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/ja/theme-search-algolia.json new file mode 100644 index 0000000000..5f6ef56479 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ja/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "検索", + "theme.SearchPage.algoliaLabel": "Algoliaで検索", + "theme.SearchPage.documentsFound.plurals": "{count}件のドキュメントが見つかりました", + "theme.SearchPage.emptyResultsTitle": "ドキュメントを検索", + "theme.SearchPage.existingResultsTitle": "『{query}』の検索結果", + "theme.SearchPage.fetchingNewResults": "新しい検索結果を取得しています...", + "theme.SearchPage.inputLabel": "検索", + "theme.SearchPage.inputPlaceholder": "ここに検索するキーワードを入力してください", + "theme.SearchPage.noResultsText": "検索結果が見つかりませんでした" +} diff --git a/packages/docusaurus-theme-translations/locales/ko/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/ko/plugin-pwa.json new file mode 100644 index 0000000000..3ec1f39364 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ko/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "닫기", + "theme.PwaReloadPopup.info": "새로운 버전이 있습니다.", + "theme.PwaReloadPopup.refreshButtonText": "새로 고침" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/ko.json b/packages/docusaurus-theme-translations/locales/ko/theme-common.json similarity index 77% rename from packages/docusaurus-theme-classic/codeTranslations/ko.json rename to packages/docusaurus-theme-translations/locales/ko/theme-common.json index bbcd0272fc..be84577d37 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/ko.json +++ b/packages/docusaurus-theme-translations/locales/ko/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "원하는 페이지를 찾을 수 없습니다.", "theme.NotFound.p2": "사이트 관리자에게 링크가 깨진 것을 알려주세요.", "theme.NotFound.title": "페이지를 찾을 수 없습니다.", - "theme.Playground.liveEditor": "라이브 에디터", - "theme.Playground.result": "결과", - "theme.PwaReloadPopup.closeButtonAriaLabel": "닫기", - "theme.PwaReloadPopup.info": "새로운 버전이 있습니다.", - "theme.PwaReloadPopup.refreshButtonText": "새로 고침", - "theme.SearchBar.label": "검색", - "theme.SearchPage.algoliaLabel": "Search by Algolia", - "theme.SearchPage.documentsFound.plurals": "{count}개 문서를 찾았습니다.", - "theme.SearchPage.emptyResultsTitle": "문서를 검색합니다.", - "theme.SearchPage.existingResultsTitle": "\"{query}\"개 검색 결과가 있습니다.", - "theme.SearchPage.fetchingNewResults": "새로운 검색 결과를 얻을 수 있습니다...", - "theme.SearchPage.inputLabel": "검색", - "theme.SearchPage.inputPlaceholder": "여기에 검색할 키워드를 입력하세요.", - "theme.SearchPage.noResultsText": "검색 결과가 없습니다.", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/ko/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/ko/theme-live-codeblock.json new file mode 100644 index 0000000000..1111a00dd4 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ko/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "라이브 에디터", + "theme.Playground.result": "결과" +} diff --git a/packages/docusaurus-theme-translations/locales/ko/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/ko/theme-search-algolia.json new file mode 100644 index 0000000000..19b0b21e00 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ko/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "검색", + "theme.SearchPage.algoliaLabel": "Search by Algolia", + "theme.SearchPage.documentsFound.plurals": "{count}개 문서를 찾았습니다.", + "theme.SearchPage.emptyResultsTitle": "문서를 검색합니다.", + "theme.SearchPage.existingResultsTitle": "\"{query}\"개 검색 결과가 있습니다.", + "theme.SearchPage.fetchingNewResults": "새로운 검색 결과를 얻을 수 있습니다...", + "theme.SearchPage.inputLabel": "검색", + "theme.SearchPage.inputPlaceholder": "여기에 검색할 키워드를 입력하세요.", + "theme.SearchPage.noResultsText": "검색 결과가 없습니다." +} diff --git a/packages/docusaurus-theme-translations/locales/pl/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/pl/plugin-pwa.json new file mode 100644 index 0000000000..6f02287f07 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pl/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Zamknij", + "theme.PwaReloadPopup.info": "Nowa wersja jest dostępna", + "theme.PwaReloadPopup.refreshButtonText": "Odśwież" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/pl.json b/packages/docusaurus-theme-translations/locales/pl/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/pl.json rename to packages/docusaurus-theme-translations/locales/pl/theme-common.json index c30247a3ac..16f6e77b02 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/pl.json +++ b/packages/docusaurus-theme-translations/locales/pl/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Nie mogliśmy znaleźć strony której szukasz.", "theme.NotFound.p2": "Proszę skontaktuj się z właścielem strony, z której link doprowadził Cię tutaj i poinformuj ich, że odnośnik jest nieprawidłowy.", "theme.NotFound.title": "Strona nie została znaleziona", - "theme.Playground.liveEditor": "Edytor live", - "theme.Playground.result": "Rezultat", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Zamknij", - "theme.PwaReloadPopup.info": "Nowa wersja jest dostępna", - "theme.PwaReloadPopup.refreshButtonText": "Odśwież", - "theme.SearchBar.label": "Szukaj", - "theme.SearchPage.algoliaLabel": "Dostawca rozwiązania Algolia", - "theme.SearchPage.documentsFound.plurals": "One document found|{count} documents found", - "theme.SearchPage.emptyResultsTitle": "Wyszukaj w dokumentacji", - "theme.SearchPage.existingResultsTitle": "Wyniki wyszukiwania dla \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Pobieranie nowych wyników…", - "theme.SearchPage.inputLabel": "Szukaj", - "theme.SearchPage.inputPlaceholder": "wpisz szukaną frazę tutaj…", - "theme.SearchPage.noResultsText": "Nie znaleziono żadnych wyników", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/pl/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/pl/theme-live-codeblock.json new file mode 100644 index 0000000000..889e7e027f --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pl/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Edytor live", + "theme.Playground.result": "Rezultat" +} diff --git a/packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json new file mode 100644 index 0000000000..ba039366ec --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pl/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Szukaj", + "theme.SearchPage.algoliaLabel": "Dostawca rozwiązania Algolia", + "theme.SearchPage.documentsFound.plurals": "One document found|{count} documents found", + "theme.SearchPage.emptyResultsTitle": "Wyszukaj w dokumentacji", + "theme.SearchPage.existingResultsTitle": "Wyniki wyszukiwania dla \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Pobieranie nowych wyników…", + "theme.SearchPage.inputLabel": "Szukaj", + "theme.SearchPage.inputPlaceholder": "wpisz szukaną frazę tutaj…", + "theme.SearchPage.noResultsText": "Nie znaleziono żadnych wyników" +} diff --git a/packages/docusaurus-theme-translations/locales/pt-BR/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/pt-BR/plugin-pwa.json new file mode 100644 index 0000000000..ac6d5aba3c --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pt-BR/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Fechar", + "theme.PwaReloadPopup.info": "Nova versão disponível", + "theme.PwaReloadPopup.refreshButtonText": "Atualizar" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/pt-BR.json b/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/pt-BR.json rename to packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json index 1bbe322024..864f6101eb 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/pt-BR.json +++ b/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Não foi possível encontrar o que você está procurando.", "theme.NotFound.p2": "Entre em contato com o proprietário do site que lhe trouxe para cá e lhe informe que o link está quebrado.", "theme.NotFound.title": "Página não encontrada", - "theme.Playground.liveEditor": "Editor em tempo real", - "theme.Playground.result": "Resultado", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Fechar", - "theme.PwaReloadPopup.info": "Nova versão disponível", - "theme.PwaReloadPopup.refreshButtonText": "Atualizar", - "theme.SearchBar.label": "Buscar", - "theme.SearchPage.algoliaLabel": "Busca feita por Algolia", - "theme.SearchPage.documentsFound.plurals": "Um documento encontrado|{count} documentos encontrados", - "theme.SearchPage.emptyResultsTitle": "Busca da documentação", - "theme.SearchPage.existingResultsTitle": "Resultado da busca por \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Trazendo novos resultados...", - "theme.SearchPage.inputLabel": "Buscar", - "theme.SearchPage.inputPlaceholder": "Digite sua busca aqui", - "theme.SearchPage.noResultsText": "Nenhum resultado foi encontrado", "theme.TOCCollapsible.toggleButtonLabel": "Nessa página", "theme.blog.archive.description": "Arquivo", "theme.blog.archive.title": "Arquivo", diff --git a/packages/docusaurus-theme-translations/locales/pt-BR/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/pt-BR/theme-live-codeblock.json new file mode 100644 index 0000000000..a54f8c268b --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pt-BR/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Editor em tempo real", + "theme.Playground.result": "Resultado" +} diff --git a/packages/docusaurus-theme-translations/locales/pt-BR/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/pt-BR/theme-search-algolia.json new file mode 100644 index 0000000000..de22281343 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pt-BR/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Buscar", + "theme.SearchPage.algoliaLabel": "Busca feita por Algolia", + "theme.SearchPage.documentsFound.plurals": "Um documento encontrado|{count} documentos encontrados", + "theme.SearchPage.emptyResultsTitle": "Busca da documentação", + "theme.SearchPage.existingResultsTitle": "Resultado da busca por \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Trazendo novos resultados...", + "theme.SearchPage.inputLabel": "Buscar", + "theme.SearchPage.inputPlaceholder": "Digite sua busca aqui", + "theme.SearchPage.noResultsText": "Nenhum resultado foi encontrado" +} diff --git a/packages/docusaurus-theme-translations/locales/pt-PT/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/pt-PT/plugin-pwa.json new file mode 100644 index 0000000000..ac6d5aba3c --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pt-PT/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Fechar", + "theme.PwaReloadPopup.info": "Nova versão disponível", + "theme.PwaReloadPopup.refreshButtonText": "Atualizar" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/pt-PT.json b/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/pt-PT.json rename to packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json index 3b5b905ae2..36704810d9 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/pt-PT.json +++ b/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Não foi possível encontrar o que procura.", "theme.NotFound.p2": "Por favor, contacte o proprietário do site que o trouxe aqui e informe-lhe que o link está partido.", "theme.NotFound.title": "Página não encontrada", - "theme.Playground.liveEditor": "Editor em tempo real", - "theme.Playground.result": "Resultado", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Fechar", - "theme.PwaReloadPopup.info": "Nova versão disponível", - "theme.PwaReloadPopup.refreshButtonText": "Atualizar", - "theme.SearchBar.label": "Pesquisar", - "theme.SearchPage.algoliaLabel": "Pesquisa por Algolia", - "theme.SearchPage.documentsFound.plurals": "Um documento encontrado|{count} documentos encontrados", - "theme.SearchPage.emptyResultsTitle": "Pesquisar pela documentação", - "theme.SearchPage.existingResultsTitle": "Resultados da pesquisa por \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Procurando novos resultados...", - "theme.SearchPage.inputLabel": "Pesquisar", - "theme.SearchPage.inputPlaceholder": "Escreva aqui a sua pesquisa", - "theme.SearchPage.noResultsText": "Nenhum resultado encontrado", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/pt-PT/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/pt-PT/theme-live-codeblock.json new file mode 100644 index 0000000000..a54f8c268b --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pt-PT/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Editor em tempo real", + "theme.Playground.result": "Resultado" +} diff --git a/packages/docusaurus-theme-translations/locales/pt-PT/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/pt-PT/theme-search-algolia.json new file mode 100644 index 0000000000..34130eb435 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/pt-PT/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Pesquisar", + "theme.SearchPage.algoliaLabel": "Pesquisa por Algolia", + "theme.SearchPage.documentsFound.plurals": "Um documento encontrado|{count} documentos encontrados", + "theme.SearchPage.emptyResultsTitle": "Pesquisar pela documentação", + "theme.SearchPage.existingResultsTitle": "Resultados da pesquisa por \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Procurando novos resultados...", + "theme.SearchPage.inputLabel": "Pesquisar", + "theme.SearchPage.inputPlaceholder": "Escreva aqui a sua pesquisa", + "theme.SearchPage.noResultsText": "Nenhum resultado encontrado" +} diff --git a/packages/docusaurus-theme-translations/locales/ru/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/ru/plugin-pwa.json new file mode 100644 index 0000000000..407cc68b4d --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ru/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Закрыть", + "theme.PwaReloadPopup.info": "Доступна новая версия", + "theme.PwaReloadPopup.refreshButtonText": "Обновить" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/ru.json b/packages/docusaurus-theme-translations/locales/ru/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/ru.json rename to packages/docusaurus-theme-translations/locales/ru/theme-common.json index b71a39a6bb..1257523bf7 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/ru.json +++ b/packages/docusaurus-theme-translations/locales/ru/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "К сожалению, мы не смогли найти запрашиваемую вами страницу.", "theme.NotFound.p2": "Пожалуйста, обратитесь к владельцу сайта, с которого вы перешли на эту ссылку, чтобы сообщить ему, что ссылка не работает.", "theme.NotFound.title": "Страница не найдена", - "theme.Playground.liveEditor": "Интерактивный редактор", - "theme.Playground.result": "Результат", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Закрыть", - "theme.PwaReloadPopup.info": "Доступна новая версия", - "theme.PwaReloadPopup.refreshButtonText": "Обновить", - "theme.SearchBar.label": "Поиск", - "theme.SearchPage.algoliaLabel": "Поиск от Algolia", - "theme.SearchPage.documentsFound.plurals": "{count} документ|{count} документа|{count} документов", - "theme.SearchPage.emptyResultsTitle": "Поиск по сайту", - "theme.SearchPage.existingResultsTitle": "Результаты поиска по запросу \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Загрузка новых результатов поиска...", - "theme.SearchPage.inputLabel": "Поиск", - "theme.SearchPage.inputPlaceholder": "Введите фразу для поиска", - "theme.SearchPage.noResultsText": "По запросу ничего не найдено", "theme.TOCCollapsible.toggleButtonLabel": "Содержание этой страницы", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/ru/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/ru/theme-live-codeblock.json new file mode 100644 index 0000000000..36253bb83d --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ru/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Интерактивный редактор", + "theme.Playground.result": "Результат" +} diff --git a/packages/docusaurus-theme-translations/locales/ru/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/ru/theme-search-algolia.json new file mode 100644 index 0000000000..f165f3c5d2 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/ru/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Поиск", + "theme.SearchPage.algoliaLabel": "Поиск от Algolia", + "theme.SearchPage.documentsFound.plurals": "{count} документ|{count} документа|{count} документов", + "theme.SearchPage.emptyResultsTitle": "Поиск по сайту", + "theme.SearchPage.existingResultsTitle": "Результаты поиска по запросу \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Загрузка новых результатов поиска...", + "theme.SearchPage.inputLabel": "Поиск", + "theme.SearchPage.inputPlaceholder": "Введите фразу для поиска", + "theme.SearchPage.noResultsText": "По запросу ничего не найдено" +} diff --git a/packages/docusaurus-theme-translations/locales/sr/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/sr/plugin-pwa.json new file mode 100644 index 0000000000..cabb00a476 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/sr/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Затвори", + "theme.PwaReloadPopup.info": "Постоји нова верзија", + "theme.PwaReloadPopup.refreshButtonText": "Освежи" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/sr.json b/packages/docusaurus-theme-translations/locales/sr/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/sr.json rename to packages/docusaurus-theme-translations/locales/sr/theme-common.json index 87a5f712e0..64e06d3fd5 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/sr.json +++ b/packages/docusaurus-theme-translations/locales/sr/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Тражени резултат не постоји.", "theme.NotFound.p2": "Молимо вас да контактирате власника сајта који вас је упутио овде и обавестите га да је њихова веза нетачна.", "theme.NotFound.title": "Страница није пронађена", - "theme.Playground.liveEditor": "Уређивач", - "theme.Playground.result": "Резултат", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Затвори", - "theme.PwaReloadPopup.info": "Постоји нова верзија", - "theme.PwaReloadPopup.refreshButtonText": "Освежи", - "theme.SearchBar.label": "Тражи", - "theme.SearchPage.algoliaLabel": "Претрага из Algolia", - "theme.SearchPage.documentsFound.plurals": "Један пронађен документ|{count} пронађених докумената", - "theme.SearchPage.emptyResultsTitle": "Тражи документацију", - "theme.SearchPage.existingResultsTitle": "Резултати за \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Траже се нови резултати...", - "theme.SearchPage.inputLabel": "Тражи", - "theme.SearchPage.inputPlaceholder": "Овде унесите термин", - "theme.SearchPage.noResultsText": "Резултати нису пронађени", "theme.TOCCollapsible.toggleButtonLabel": "На овој страници", "theme.blog.archive.description": "Архива", "theme.blog.archive.title": "Архива", diff --git a/packages/docusaurus-theme-translations/locales/sr/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/sr/theme-live-codeblock.json new file mode 100644 index 0000000000..f12b647641 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/sr/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Уређивач", + "theme.Playground.result": "Резултат" +} diff --git a/packages/docusaurus-theme-translations/locales/sr/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/sr/theme-search-algolia.json new file mode 100644 index 0000000000..5dc155e4fd --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/sr/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Тражи", + "theme.SearchPage.algoliaLabel": "Претрага из Algolia", + "theme.SearchPage.documentsFound.plurals": "Један пронађен документ|{count} пронађених докумената", + "theme.SearchPage.emptyResultsTitle": "Тражи документацију", + "theme.SearchPage.existingResultsTitle": "Резултати за \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Траже се нови резултати...", + "theme.SearchPage.inputLabel": "Тражи", + "theme.SearchPage.inputPlaceholder": "Овде унесите термин", + "theme.SearchPage.noResultsText": "Резултати нису пронађени" +} diff --git a/packages/docusaurus-theme-translations/locales/tr/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/tr/plugin-pwa.json new file mode 100644 index 0000000000..0cc5565938 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/tr/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Kapat", + "theme.PwaReloadPopup.info": "Yeni sürüm mevcut", + "theme.PwaReloadPopup.refreshButtonText": "Yenile" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/tr.json b/packages/docusaurus-theme-translations/locales/tr/theme-common.json similarity index 80% rename from packages/docusaurus-theme-classic/codeTranslations/tr.json rename to packages/docusaurus-theme-translations/locales/tr/theme-common.json index f74a793b0d..039d7cc054 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/tr.json +++ b/packages/docusaurus-theme-translations/locales/tr/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Aradığınız şeyi bulamadık.", "theme.NotFound.p2": "Lütfen sizi orijinal URL'ye yönlendiren sitenin sahibiyle iletişime geçin ve bağlantısının bozuk olduğunu bildirin.", "theme.NotFound.title": "Sayfa Bulunamadı", - "theme.Playground.liveEditor": "Canlı Düzenleyici", - "theme.Playground.result": "Sonuç", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Kapat", - "theme.PwaReloadPopup.info": "Yeni sürüm mevcut", - "theme.PwaReloadPopup.refreshButtonText": "Yenile", - "theme.SearchBar.label": "Ara", - "theme.SearchPage.algoliaLabel": "Algolia ile Ara", - "theme.SearchPage.documentsFound.plurals": "Bir döküman bulundu|{count} döküman bulundu", - "theme.SearchPage.emptyResultsTitle": "Dokümanlarda ara", - "theme.SearchPage.existingResultsTitle": "Arama sonuçları", - "theme.SearchPage.fetchingNewResults": "Yeni sonuçlar getiriliyor...", - "theme.SearchPage.inputLabel": "Ara", - "theme.SearchPage.inputPlaceholder": "Aramanızı buraya yazın", - "theme.SearchPage.noResultsText": "Hiçbir sonuç bulunamadı", "theme.TOCCollapsible.toggleButtonLabel": "Bu sayfada", "theme.blog.archive.description": "Arşiv", "theme.blog.archive.title": "Arşiv", diff --git a/packages/docusaurus-theme-translations/locales/tr/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/tr/theme-live-codeblock.json new file mode 100644 index 0000000000..c8f5ee3389 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/tr/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Canlı Düzenleyici", + "theme.Playground.result": "Sonuç" +} diff --git a/packages/docusaurus-theme-translations/locales/tr/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/tr/theme-search-algolia.json new file mode 100644 index 0000000000..c258a0ae34 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/tr/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Ara", + "theme.SearchPage.algoliaLabel": "Algolia ile Ara", + "theme.SearchPage.documentsFound.plurals": "Bir döküman bulundu|{count} döküman bulundu", + "theme.SearchPage.emptyResultsTitle": "Dokümanlarda ara", + "theme.SearchPage.existingResultsTitle": "Arama sonuçları", + "theme.SearchPage.fetchingNewResults": "Yeni sonuçlar getiriliyor...", + "theme.SearchPage.inputLabel": "Ara", + "theme.SearchPage.inputPlaceholder": "Aramanızı buraya yazın", + "theme.SearchPage.noResultsText": "Hiçbir sonuç bulunamadı" +} diff --git a/packages/docusaurus-theme-translations/locales/vi/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/vi/plugin-pwa.json new file mode 100644 index 0000000000..b151c78696 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/vi/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "Đóng", + "theme.PwaReloadPopup.info": "Có phiên bản mới", + "theme.PwaReloadPopup.refreshButtonText": "Cập nhật" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/vi.json b/packages/docusaurus-theme-translations/locales/vi/theme-common.json similarity index 79% rename from packages/docusaurus-theme-classic/codeTranslations/vi.json rename to packages/docusaurus-theme-translations/locales/vi/theme-common.json index e0b756d14d..b634daf687 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/vi.json +++ b/packages/docusaurus-theme-translations/locales/vi/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "Chúng tôi không thể tìm thấy những gì bạn đang tìm kiếm.", "theme.NotFound.p2": "Vui lòng liên hệ với trang web đã dẫn bạn tới đây và thông báo cho họ biết rằng đường dẫn này bị hỏng.", "theme.NotFound.title": "Không tìm thấy trang", - "theme.Playground.liveEditor": "Trình soạn thảo trực tuyến", - "theme.Playground.result": "Kết quả", - "theme.PwaReloadPopup.closeButtonAriaLabel": "Đóng", - "theme.PwaReloadPopup.info": "Có phiên bản mới", - "theme.PwaReloadPopup.refreshButtonText": "Cập nhật", - "theme.SearchBar.label": "Tìm kiếm", - "theme.SearchPage.algoliaLabel": "Tìm kiếm với Algolia", - "theme.SearchPage.documentsFound.plurals": "Tìm thấy một kết quả|Tìm thấy {count} kết quả", - "theme.SearchPage.emptyResultsTitle": "Tìm kiếm", - "theme.SearchPage.existingResultsTitle": "Kết quả tìm kiếm cho \"{query}\"", - "theme.SearchPage.fetchingNewResults": "Đang tải thêm kết quả...", - "theme.SearchPage.inputLabel": "Tìm kiếm", - "theme.SearchPage.inputPlaceholder": "Nhập từ khóa cần tìm vào đây", - "theme.SearchPage.noResultsText": "Không tìm thấy kết quả nào", "theme.TOCCollapsible.toggleButtonLabel": "Trên trang này", "theme.blog.archive.description": "Lưu trữ", "theme.blog.archive.title": "Lưu trữ", diff --git a/packages/docusaurus-theme-translations/locales/vi/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/vi/theme-live-codeblock.json new file mode 100644 index 0000000000..ca314fb3fc --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/vi/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "Trình soạn thảo trực tuyến", + "theme.Playground.result": "Kết quả" +} diff --git a/packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json new file mode 100644 index 0000000000..82f27ccca7 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/vi/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "Tìm kiếm", + "theme.SearchPage.algoliaLabel": "Tìm kiếm với Algolia", + "theme.SearchPage.documentsFound.plurals": "Tìm thấy một kết quả|Tìm thấy {count} kết quả", + "theme.SearchPage.emptyResultsTitle": "Tìm kiếm", + "theme.SearchPage.existingResultsTitle": "Kết quả tìm kiếm cho \"{query}\"", + "theme.SearchPage.fetchingNewResults": "Đang tải thêm kết quả...", + "theme.SearchPage.inputLabel": "Tìm kiếm", + "theme.SearchPage.inputPlaceholder": "Nhập từ khóa cần tìm vào đây", + "theme.SearchPage.noResultsText": "Không tìm thấy kết quả nào" +} diff --git a/packages/docusaurus-theme-translations/locales/zh-Hans/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/zh-Hans/plugin-pwa.json new file mode 100644 index 0000000000..661de5f058 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/zh-Hans/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "关闭", + "theme.PwaReloadPopup.info": "有可用的新版本", + "theme.PwaReloadPopup.refreshButtonText": "刷新" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/zh-Hans.json b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/zh-Hans.json rename to packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json index cf0d97a23a..171d08f8ee 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/zh-Hans.json +++ b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "我们找不到您要找的页面。", "theme.NotFound.p2": "请联系原始链接来源网站的所有者,并告知他们链接已损坏。", "theme.NotFound.title": "找不到页面", - "theme.Playground.liveEditor": "实时编辑器", - "theme.Playground.result": "结果", - "theme.PwaReloadPopup.closeButtonAriaLabel": "关闭", - "theme.PwaReloadPopup.info": "有可用的新版本", - "theme.PwaReloadPopup.refreshButtonText": "刷新", - "theme.SearchBar.label": "搜索", - "theme.SearchPage.algoliaLabel": "通过 Algolia 搜索", - "theme.SearchPage.documentsFound.plurals": "找到 {count} 份文件", - "theme.SearchPage.emptyResultsTitle": "在文档中搜索", - "theme.SearchPage.existingResultsTitle": "「{query}」的搜索结果", - "theme.SearchPage.fetchingNewResults": "正在获取新的搜索结果...", - "theme.SearchPage.inputLabel": "搜索", - "theme.SearchPage.inputPlaceholder": "在此输入搜索字词", - "theme.SearchPage.noResultsText": "未找到任何结果", "theme.TOCCollapsible.toggleButtonLabel": "本页总览", "theme.blog.archive.description": "历史博文", "theme.blog.archive.title": "历史博文", diff --git a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-live-codeblock.json new file mode 100644 index 0000000000..a0f8457b22 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "实时编辑器", + "theme.Playground.result": "结果" +} diff --git a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-search-algolia.json new file mode 100644 index 0000000000..32a67458e5 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "搜索", + "theme.SearchPage.algoliaLabel": "通过 Algolia 搜索", + "theme.SearchPage.documentsFound.plurals": "找到 {count} 份文件", + "theme.SearchPage.emptyResultsTitle": "在文档中搜索", + "theme.SearchPage.existingResultsTitle": "「{query}」的搜索结果", + "theme.SearchPage.fetchingNewResults": "正在获取新的搜索结果...", + "theme.SearchPage.inputLabel": "搜索", + "theme.SearchPage.inputPlaceholder": "在此输入搜索字词", + "theme.SearchPage.noResultsText": "未找到任何结果" +} diff --git a/packages/docusaurus-theme-translations/locales/zh-Hant/plugin-pwa.json b/packages/docusaurus-theme-translations/locales/zh-Hant/plugin-pwa.json new file mode 100644 index 0000000000..67362bf03a --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/zh-Hant/plugin-pwa.json @@ -0,0 +1,5 @@ +{ + "theme.PwaReloadPopup.closeButtonAriaLabel": "關閉", + "theme.PwaReloadPopup.info": "有可用的新版本", + "theme.PwaReloadPopup.refreshButtonText": "刷新" +} diff --git a/packages/docusaurus-theme-classic/codeTranslations/zh-Hant.json b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json similarity index 78% rename from packages/docusaurus-theme-classic/codeTranslations/zh-Hant.json rename to packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json index 2edfbf796b..15308e3df1 100644 --- a/packages/docusaurus-theme-classic/codeTranslations/zh-Hant.json +++ b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json @@ -9,20 +9,6 @@ "theme.NotFound.p1": "我們找不到您要找的頁面。", "theme.NotFound.p2": "請聯絡原始連結來源網站的所有者,並通知他們連結已毀損。", "theme.NotFound.title": "找不到頁面", - "theme.Playground.liveEditor": "即時編輯器", - "theme.Playground.result": "結果", - "theme.PwaReloadPopup.closeButtonAriaLabel": "關閉", - "theme.PwaReloadPopup.info": "有可用的新版本", - "theme.PwaReloadPopup.refreshButtonText": "刷新", - "theme.SearchBar.label": "搜尋", - "theme.SearchPage.algoliaLabel": "透過 Algolia 搜尋", - "theme.SearchPage.documentsFound.plurals": "找到 {count} 份文件", - "theme.SearchPage.emptyResultsTitle": "在文件中搜尋", - "theme.SearchPage.existingResultsTitle": "「{query}」的搜尋結果", - "theme.SearchPage.fetchingNewResults": "正在獲取新的搜尋結果...", - "theme.SearchPage.inputLabel": "搜尋", - "theme.SearchPage.inputPlaceholder": "在此輸入搜尋字詞", - "theme.SearchPage.noResultsText": "未找到任何結果", "theme.TOCCollapsible.toggleButtonLabel": "本頁導覽", "theme.blog.archive.description": "歷史博文", "theme.blog.archive.title": "歷史博文", diff --git a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-live-codeblock.json b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-live-codeblock.json new file mode 100644 index 0000000000..a20739c1cf --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-live-codeblock.json @@ -0,0 +1,4 @@ +{ + "theme.Playground.liveEditor": "即時編輯器", + "theme.Playground.result": "結果" +} diff --git a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-search-algolia.json b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-search-algolia.json new file mode 100644 index 0000000000..6fdf316a47 --- /dev/null +++ b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-search-algolia.json @@ -0,0 +1,11 @@ +{ + "theme.SearchBar.label": "搜尋", + "theme.SearchPage.algoliaLabel": "透過 Algolia 搜尋", + "theme.SearchPage.documentsFound.plurals": "找到 {count} 份文件", + "theme.SearchPage.emptyResultsTitle": "在文件中搜尋", + "theme.SearchPage.existingResultsTitle": "「{query}」的搜尋結果", + "theme.SearchPage.fetchingNewResults": "正在獲取新的搜尋結果...", + "theme.SearchPage.inputLabel": "搜尋", + "theme.SearchPage.inputPlaceholder": "在此輸入搜尋字詞", + "theme.SearchPage.noResultsText": "未找到任何結果" +} diff --git a/packages/docusaurus-theme-translations/package.json b/packages/docusaurus-theme-translations/package.json new file mode 100644 index 0000000000..b832a6e249 --- /dev/null +++ b/packages/docusaurus-theme-translations/package.json @@ -0,0 +1,33 @@ +{ + "name": "@docusaurus/theme-translations", + "version": "2.0.0-beta.9", + "description": "Docusaurus theme translations.", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "files": [ + "locales" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/facebook/docusaurus.git", + "directory": "packages/docusaurus-theme-translations" + }, + "license": "MIT", + "scripts": { + "build": "tsc", + "watch": "tsc --watch", + "update": "node -e 'require(\"./update.js\").run()'" + }, + "dependencies": { + "@docusaurus/core": "2.0.0-beta.9", + "chalk": "^4.1.2", + "fs-extra": "^10.0.0", + "lodash": "^4.17.20" + }, + "engines": { + "node": ">=14" + } +} diff --git a/packages/docusaurus-utils/src/__tests__/__fixtures__/defaultCodeTranslations/en.json b/packages/docusaurus-theme-translations/src/__tests__/__fixtures__/defaultCodeTranslations/en/default.json similarity index 100% rename from packages/docusaurus-utils/src/__tests__/__fixtures__/defaultCodeTranslations/en.json rename to packages/docusaurus-theme-translations/src/__tests__/__fixtures__/defaultCodeTranslations/en/default.json diff --git a/packages/docusaurus-utils/src/__tests__/__fixtures__/defaultCodeTranslations/fr-FR.json b/packages/docusaurus-theme-translations/src/__tests__/__fixtures__/defaultCodeTranslations/fr-FR/default.json similarity index 100% rename from packages/docusaurus-utils/src/__tests__/__fixtures__/defaultCodeTranslations/fr-FR.json rename to packages/docusaurus-theme-translations/src/__tests__/__fixtures__/defaultCodeTranslations/fr-FR/default.json diff --git a/packages/docusaurus-utils/src/__tests__/__fixtures__/defaultCodeTranslations/fr.json b/packages/docusaurus-theme-translations/src/__tests__/__fixtures__/defaultCodeTranslations/fr/default.json similarity index 100% rename from packages/docusaurus-utils/src/__tests__/__fixtures__/defaultCodeTranslations/fr.json rename to packages/docusaurus-theme-translations/src/__tests__/__fixtures__/defaultCodeTranslations/fr/default.json diff --git a/packages/docusaurus-utils/src/__tests__/codeTranslationsUtils.test.ts b/packages/docusaurus-theme-translations/src/__tests__/index.test.ts similarity index 80% rename from packages/docusaurus-utils/src/__tests__/codeTranslationsUtils.test.ts rename to packages/docusaurus-theme-translations/src/__tests__/index.test.ts index ffb7b0b62c..9db51b9bc8 100644 --- a/packages/docusaurus-utils/src/__tests__/codeTranslationsUtils.test.ts +++ b/packages/docusaurus-theme-translations/src/__tests__/index.test.ts @@ -9,7 +9,7 @@ import fs from 'fs-extra'; import { codeTranslationLocalesToTry, readDefaultCodeTranslationMessages, -} from '../codeTranslationsUtils'; +} from '../index'; describe('codeTranslationLocalesToTry', () => { test('should return appropriate locale lists', () => { @@ -29,10 +29,16 @@ describe('readDefaultCodeTranslationMessages', () => { '__fixtures__', 'defaultCodeTranslations', ); + const name = 'default'; + + async function readAsJSON(locale: string, filename: string = name) { + console.log(path.resolve(dirPath, locale, `${filename}.json`)); - async function readAsJSON(filename: string) { return JSON.parse( - await fs.readFile(path.resolve(dirPath, filename), 'utf8'), + await fs.readFile( + path.resolve(dirPath, locale, `${filename}.json`), + 'utf8', + ), ); } @@ -52,6 +58,7 @@ describe('readDefaultCodeTranslationMessages', () => { readDefaultCodeTranslationMessages({ locale: 'es', dirPath, + name, }), ).resolves.toEqual({}); }); @@ -61,6 +68,7 @@ describe('readDefaultCodeTranslationMessages', () => { readDefaultCodeTranslationMessages({ locale: 'fr', dirPath: __dirname, + name, }), ).resolves.toEqual({}); }); @@ -70,8 +78,9 @@ describe('readDefaultCodeTranslationMessages', () => { readDefaultCodeTranslationMessages({ locale: 'fr', dirPath, + name, }), - ).resolves.toEqual(await readAsJSON('fr.json')); + ).resolves.toEqual(await readAsJSON('fr')); }); test('for fr-FR', async () => { @@ -79,8 +88,9 @@ describe('readDefaultCodeTranslationMessages', () => { readDefaultCodeTranslationMessages({ locale: 'fr-FR', dirPath, + name, }), - ).resolves.toEqual(await readAsJSON('fr-FR.json')); + ).resolves.toEqual(await readAsJSON('fr-FR')); }); test('for en', async () => { @@ -88,8 +98,9 @@ describe('readDefaultCodeTranslationMessages', () => { readDefaultCodeTranslationMessages({ locale: 'en', dirPath, + name, }), - ).resolves.toEqual(await readAsJSON('en.json')); + ).resolves.toEqual(await readAsJSON('en')); }); test('for en-US', async () => { @@ -97,8 +108,9 @@ describe('readDefaultCodeTranslationMessages', () => { readDefaultCodeTranslationMessages({ locale: 'en-US', dirPath, + name, }), - ).resolves.toEqual(await readAsJSON('en.json')); + ).resolves.toEqual(await readAsJSON('en')); }); test('for en-WHATEVER', async () => { @@ -106,7 +118,8 @@ describe('readDefaultCodeTranslationMessages', () => { readDefaultCodeTranslationMessages({ locale: 'en-WHATEVER', dirPath, + name, }), - ).resolves.toEqual(await readAsJSON('en.json')); + ).resolves.toEqual(await readAsJSON('en')); }); }); diff --git a/packages/docusaurus-utils/src/codeTranslationsUtils.ts b/packages/docusaurus-theme-translations/src/index.ts similarity index 77% rename from packages/docusaurus-utils/src/codeTranslationsUtils.ts rename to packages/docusaurus-theme-translations/src/index.ts index d6a3cf51c9..62a1c6186b 100644 --- a/packages/docusaurus-utils/src/codeTranslationsUtils.ts +++ b/packages/docusaurus-theme-translations/src/index.ts @@ -8,6 +8,14 @@ import path from 'path'; import fs from 'fs-extra'; +function getDefaultLocalesDirPath(): string { + const parentDirPath = path.join(__dirname, '..'); + const pkg = JSON.parse( + fs.readFileSync(path.join(parentDirPath, 'package.json'), 'utf8'), + ); + return path.join(parentDirPath, pkg.files[0]); +} + // Return an ordered list of locales we should try export function codeTranslationLocalesToTry(locale: string): string[] { const intlLocale = Intl.Locale ? new Intl.Locale(locale) : undefined; @@ -29,19 +37,21 @@ export function codeTranslationLocalesToTry(locale: string): string[] { // Useful to implement getDefaultCodeTranslationMessages() in themes export async function readDefaultCodeTranslationMessages({ - dirPath, + dirPath = getDefaultLocalesDirPath(), locale, + name, }: { - dirPath: string; + dirPath?: string; locale: string; + name: string; }): Promise> { const localesToTry = codeTranslationLocalesToTry(locale); // Return the content of the first file that match // fr_FR.json => fr.json => nothing // eslint-disable-next-line no-restricted-syntax - for (const fileName of localesToTry) { - const filePath = path.resolve(dirPath, `${fileName}.json`); + for (const localeToTry of localesToTry) { + const filePath = path.resolve(dirPath, localeToTry, `${name}.json`); if (await fs.pathExists(filePath)) { const fileContent = await fs.readFile(filePath, 'utf8'); diff --git a/packages/docusaurus-theme-translations/tsconfig.json b/packages/docusaurus-theme-translations/tsconfig.json new file mode 100644 index 0000000000..f5902ba108 --- /dev/null +++ b/packages/docusaurus-theme-translations/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "incremental": true, + "tsBuildInfoFile": "./lib/.tsbuildinfo", + "rootDir": "src", + "outDir": "lib" + } +} diff --git a/packages/docusaurus-theme-classic/update-code-translations.js b/packages/docusaurus-theme-translations/update.js similarity index 63% rename from packages/docusaurus-theme-classic/update-code-translations.js rename to packages/docusaurus-theme-translations/update.js index 4ea617abfd..74b5b20866 100644 --- a/packages/docusaurus-theme-classic/update-code-translations.js +++ b/packages/docusaurus-theme-translations/update.js @@ -8,19 +8,48 @@ const chalk = require('chalk'); const path = require('path'); const fs = require('fs-extra'); -const globby = require('globby'); const {mapValues, pickBy, difference, orderBy} = require('lodash'); -const CodeDirPaths = [ - path.join(__dirname, 'lib-next'), - // TODO other themes should rather define their own translations in the future? - path.join(__dirname, '..', 'docusaurus-theme-common', 'lib'), - path.join(__dirname, '..', 'docusaurus-theme-search-algolia', 'lib', 'theme'), - path.join(__dirname, '..', 'docusaurus-theme-live-codeblock', 'src', 'theme'), - path.join(__dirname, '..', 'docusaurus-plugin-pwa', 'lib', 'theme'), +const LocalesDirPath = path.join(__dirname, 'locales'); +const Themes = [ + { + name: 'theme-common', + src: [ + getPackageCodePath('docusaurus-theme-classic'), + getPackageCodePath('docusaurus-theme-common'), + ], + }, + { + name: 'theme-search-algolia', + src: [getPackageCodePath('docusaurus-theme-search-algolia')], + }, + { + name: 'theme-live-codeblock', + src: [getPackageCodePath('docusaurus-theme-live-codeblock')], + }, + { + name: 'plugin-pwa', + src: [getPackageCodePath('docusaurus-plugin-pwa')], + }, ]; +const AllThemesSrcDirs = Themes.flatMap((theme) => theme.src); -console.log('Will scan folders for code translations:', CodeDirPaths); +console.log('Will scan folders for code translations:', AllThemesSrcDirs); + +function getPackageCodePath(packageName) { + const packagePath = path.join(__dirname, '..', packageName); + const packageJsonPath = path.join(packagePath, 'package.json'); + const {main} = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); + const packageSrcPath = path.join(packagePath, path.dirname(main)); + const packageLibNextPath = packageSrcPath.replace('lib', 'lib-next'); + return fs.existsSync(packageLibNextPath) + ? packageLibNextPath + : packageSrcPath; +} + +function getThemeLocalePath(locale, themeName) { + return path.join(LocalesDirPath, locale, `${themeName}.json`); +} function removeDescriptionSuffix(key) { if (key.replace('___DESCRIPTION')) { @@ -49,7 +78,7 @@ function logKeys(keys) { return `Keys:\n- ${keys.join('\n- ')}`; } -async function extractThemeCodeMessages() { +async function extractThemeCodeMessages(targetDirs = AllThemesSrcDirs) { // Unsafe import, should we create a package for the translationsExtractor ? const { globSourceCodeFilePaths, @@ -57,7 +86,7 @@ async function extractThemeCodeMessages() { // eslint-disable-next-line global-require } = require('@docusaurus/core/lib/server/translations/translationsExtractor'); - const filePaths = (await globSourceCodeFilePaths(CodeDirPaths)).filter( + const filePaths = (await globSourceCodeFilePaths(targetDirs)).filter( (filePath) => ['.js', '.jsx'].includes(path.extname(filePath)), ); @@ -98,7 +127,7 @@ async function writeMessagesFile(filePath, messages) { const sortedMessages = sortObjectKeys(messages); const content = `${JSON.stringify(sortedMessages, null, 2)}\n`; // \n makes prettier happy - await fs.writeFile(filePath, content); + await fs.outputFile(filePath, content); console.log( `${path.basename(filePath)} updated (${ Object.keys(sortedMessages).length @@ -106,26 +135,24 @@ async function writeMessagesFile(filePath, messages) { ); } -async function getCodeTranslationFiles() { - const codeTranslationsDir = path.join(__dirname, 'codeTranslations'); - const baseFile = path.join(codeTranslationsDir, 'base.json'); - const localesFiles = (await globby(codeTranslationsDir)).filter( - (filepath) => - path.extname(filepath) === '.json' && !filepath.endsWith('base.json'), - ); +async function getCodeTranslationFiles(themeName) { + const baseFile = getThemeLocalePath('base', themeName); + const localesFiles = (await fs.readdir(LocalesDirPath)) + .filter((dirName) => dirName !== 'base') + .map((locale) => getThemeLocalePath(locale, themeName)); return {baseFile, localesFiles}; } const DescriptionSuffix = '___DESCRIPTION'; -async function updateBaseFile(baseFile) { +async function updateBaseFile(baseFile, targetDirs) { const baseMessagesWithDescriptions = await readMessagesFile(baseFile); const baseMessages = pickBy( baseMessagesWithDescriptions, (_, key) => !key.endsWith(DescriptionSuffix), ); - const codeExtractedTranslations = await extractThemeCodeMessages(); + const codeExtractedTranslations = await extractThemeCodeMessages(targetDirs); const codeMessages = mapValues( codeExtractedTranslations, (translation) => translation.message, @@ -138,7 +165,7 @@ async function updateBaseFile(baseFile) { if (unknownMessages.length) { console.log( - chalk.red(`Some messages exist in base.json but were not found by the code extractor! + chalk.red(`Some messages exist in base locale but were not found by the code extractor! They won't be removed automatically, so do the cleanup manually if necessary! ${logKeys(unknownMessages)}`), ); @@ -208,14 +235,40 @@ ${logKeys(untranslatedKeys)}`), } async function updateCodeTranslations() { - logSection('Will update base file'); - const {baseFile, localesFiles} = await getCodeTranslationFiles(); - const baseFileMessages = await updateBaseFile(baseFile); + for (const theme of Themes) { + const {baseFile, localesFiles} = await getCodeTranslationFiles(theme.name); + logSection(`Will update base file for ${theme.name}`); + const baseFileMessages = await updateBaseFile(baseFile, theme.src); + const [, newLocale] = process.argv; - // eslint-disable-next-line no-restricted-syntax - for (const localeFile of localesFiles) { - logSection(`Will update ${path.basename(localeFile)}`); - await updateLocaleCodeTranslations(localeFile, baseFileMessages); + if (newLocale) { + const newLocalePath = getThemeLocalePath(newLocale, theme.name); + + if (!fs.existsSync(newLocalePath)) { + await writeMessagesFile(newLocalePath, baseFileMessages); + console.error( + chalk.green( + `Locale file ${path.basename(newLocalePath)} have been created.`, + ), + ); + } else { + console.error( + chalk.red( + `Locale file ${path.basename(newLocalePath)} was already created!`, + ), + ); + } + } else { + for (const localeFile of localesFiles) { + logSection( + `Will update ${path.basename( + path.dirname(localeFile), + )} locale in ${path.basename(localeFile, path.extname(localeFile))}`, + ); + + await updateLocaleCodeTranslations(localeFile, baseFileMessages); + } + } } } diff --git a/packages/docusaurus-theme-translations/update.test.js b/packages/docusaurus-theme-translations/update.test.js new file mode 100644 index 0000000000..5f786dca76 --- /dev/null +++ b/packages/docusaurus-theme-translations/update.test.js @@ -0,0 +1,43 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +const {extractThemeCodeMessages} = require('./update'); +const path = require('path'); +const fs = require('fs-extra'); +const {mapValues, pickBy} = require('lodash'); +const pkg = require('./package.json'); + +// Seems the 5s default timeout fails sometimes +jest.setTimeout(15000); + +describe('theme-translations package', () => { + test(`to have base messages files contain EXACTLY all the translations extracted from the theme. Please run "yarn workspace @docusaurus/theme-translations update" to keep base messages files up-to-date.`, async () => { + const baseMessagesDirPath = path.join(__dirname, pkg.files[0], 'base'); + const baseMessages = pickBy( + await fs + .readdirSync(baseMessagesDirPath) + .reduce(async (messages, baseMessagesFile) => { + messages = { + ...(await messages), + ...JSON.parse( + await fs.readFile( + path.join(baseMessagesDirPath, baseMessagesFile), + ), + ), + }; + return messages; + }, {}), + (_, key) => !key.endsWith('___DESCRIPTION'), + ); + const codeMessages = mapValues( + await extractThemeCodeMessages(), + (translation) => translation.message, + ); + + expect(codeMessages).toEqual(baseMessages); + }); +}); diff --git a/packages/docusaurus-utils/src/index.ts b/packages/docusaurus-utils/src/index.ts index 7641e3eee5..3bacc56b80 100644 --- a/packages/docusaurus-utils/src/index.ts +++ b/packages/docusaurus-utils/src/index.ts @@ -30,7 +30,6 @@ export * from './tags'; export const posixPath = posixPathImport; -export * from './codeTranslationsUtils'; export * from './markdownParser'; export * from './markdownLinks'; export * from './escapePath'; diff --git a/website/blog/2021-03-09-releasing-docusaurus-i18n.md b/website/blog/2021-03-09-releasing-docusaurus-i18n.md index 719e99a075..5a40395226 100644 --- a/website/blog/2021-03-09-releasing-docusaurus-i18n.md +++ b/website/blog/2021-03-09-releasing-docusaurus-i18n.md @@ -44,7 +44,7 @@ The goals of the Docusaurus i18n system are: - **Easy to use with [Crowdin](https://crowdin.com/)**: multiple Docusaurus 1 sites use Crowdin, and should be able to migrate to v2 - **Good SEO defaults**: we set useful SEO headers like [`hreflang`](https://developers.google.com/search/docs/advanced/crawling/localized-versions) for you - **RTL support**: locales reading right-to-left (Arabic, Hebrew, etc.) are supported and easy to implement -- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/codeTranslations) +- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/src/codeTranslations) ## Showcase diff --git a/website/docs/i18n/i18n-introduction.md b/website/docs/i18n/i18n-introduction.md index 83bc7390df..43c101c0fe 100644 --- a/website/docs/i18n/i18n-introduction.md +++ b/website/docs/i18n/i18n-introduction.md @@ -27,7 +27,7 @@ The goals of the Docusaurus i18n system are: - **Easy to use with [Crowdin](https://crowdin.com/)**: multiple Docusaurus v1 sites use Crowdin, and should be able to migrate to v2 - **Good SEO defaults**: we set useful SEO headers like [`hreflang`](https://developers.google.com/search/docs/advanced/crawling/localized-versions) for you - **RTL support**: locales reading right-to-left (Arabic, Hebrew, etc.) are supported and easy to implement -- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/codeTranslations) +- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/src/codeTranslations) ### i18n non-goals {#i18n-non-goals} diff --git a/website/docs/i18n/i18n-tutorial.md b/website/docs/i18n/i18n-tutorial.md index 675b1fba70..0f5932deaf 100644 --- a/website/docs/i18n/i18n-tutorial.md +++ b/website/docs/i18n/i18n-tutorial.md @@ -64,7 +64,7 @@ We haven't provided any translation, and the site is **mostly untranslated**. Docusaurus provides **default translations** for generic theme labels, such as "Next" and "Previous" for the pagination. -Please help us complete those **[default translations](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/codeTranslations)**. +Please help us complete those **[default translations](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/src/codeTranslations)**. ::: diff --git a/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-introduction.md b/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-introduction.md index 83bc7390df..43c101c0fe 100644 --- a/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-introduction.md +++ b/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-introduction.md @@ -27,7 +27,7 @@ The goals of the Docusaurus i18n system are: - **Easy to use with [Crowdin](https://crowdin.com/)**: multiple Docusaurus v1 sites use Crowdin, and should be able to migrate to v2 - **Good SEO defaults**: we set useful SEO headers like [`hreflang`](https://developers.google.com/search/docs/advanced/crawling/localized-versions) for you - **RTL support**: locales reading right-to-left (Arabic, Hebrew, etc.) are supported and easy to implement -- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/codeTranslations) +- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/src/codeTranslations) ### i18n non-goals {#i18n-non-goals} diff --git a/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-tutorial.md b/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-tutorial.md index 675b1fba70..0f5932deaf 100644 --- a/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-tutorial.md +++ b/website/versioned_docs/version-2.0.0-beta.8/i18n/i18n-tutorial.md @@ -64,7 +64,7 @@ We haven't provided any translation, and the site is **mostly untranslated**. Docusaurus provides **default translations** for generic theme labels, such as "Next" and "Previous" for the pagination. -Please help us complete those **[default translations](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/codeTranslations)**. +Please help us complete those **[default translations](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/src/codeTranslations)**. ::: diff --git a/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-introduction.md b/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-introduction.md index 83bc7390df..43c101c0fe 100644 --- a/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-introduction.md +++ b/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-introduction.md @@ -27,7 +27,7 @@ The goals of the Docusaurus i18n system are: - **Easy to use with [Crowdin](https://crowdin.com/)**: multiple Docusaurus v1 sites use Crowdin, and should be able to migrate to v2 - **Good SEO defaults**: we set useful SEO headers like [`hreflang`](https://developers.google.com/search/docs/advanced/crawling/localized-versions) for you - **RTL support**: locales reading right-to-left (Arabic, Hebrew, etc.) are supported and easy to implement -- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/codeTranslations) +- **Default translations**: classic theme labels are translated for you in [many languages](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/src/codeTranslations) ### i18n non-goals {#i18n-non-goals} diff --git a/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-tutorial.md b/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-tutorial.md index 675b1fba70..0f5932deaf 100644 --- a/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-tutorial.md +++ b/website/versioned_docs/version-2.0.0-beta.9/i18n/i18n-tutorial.md @@ -64,7 +64,7 @@ We haven't provided any translation, and the site is **mostly untranslated**. Docusaurus provides **default translations** for generic theme labels, such as "Next" and "Previous" for the pagination. -Please help us complete those **[default translations](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/codeTranslations)**. +Please help us complete those **[default translations](https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-theme-classic/src/codeTranslations)**. :::