@docusaurus/core 0.0.0-5129 → 0.0.0-5132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,6 +89,7 @@ const LocaleConfigSchema = utils_validation_1.Joi.object({
89
89
  htmlLang: utils_validation_1.Joi.string(),
90
90
  direction: utils_validation_1.Joi.string().equal('ltr', 'rtl').default('ltr'),
91
91
  calendar: utils_validation_1.Joi.string(),
92
+ path: utils_validation_1.Joi.string(),
92
93
  });
93
94
  const I18N_CONFIG_SCHEMA = utils_validation_1.Joi.object({
94
95
  defaultLocale: utils_validation_1.Joi.string().required(),
@@ -21,6 +21,7 @@ function getDefaultLocaleConfig(locale) {
21
21
  htmlLang: locale,
22
22
  // If the locale name includes -u-ca-xxx the calendar will be defined
23
23
  calendar: new Intl.Locale(locale).calendar ?? 'gregory',
24
+ path: locale,
24
25
  };
25
26
  }
26
27
  exports.getDefaultLocaleConfig = getDefaultLocaleConfig;
@@ -46,8 +46,7 @@ async function loadContext(options) {
46
46
  pathType: 'fs',
47
47
  });
48
48
  const siteConfig = { ...initialSiteConfig, baseUrl };
49
- // TODO allow customizing localizationDir per-locale
50
- const localizationDir = path_1.default.resolve(siteDir, i18n.path, i18n.currentLocale);
49
+ const localizationDir = path_1.default.resolve(siteDir, i18n.path, i18n.localeConfigs[i18n.currentLocale].path);
51
50
  const codeTranslationFileContent = (await (0, translations_1.readCodeTranslationFileContent)({ localizationDir })) ?? {};
52
51
  // We only need key->message for code translations
53
52
  const codeTranslations = lodash_1.default.mapValues(codeTranslationFileContent, (value) => value.message);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "0.0.0-5129",
4
+ "version": "0.0.0-5132",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,13 +43,13 @@
43
43
  "@babel/runtime": "^7.18.3",
44
44
  "@babel/runtime-corejs3": "^7.18.3",
45
45
  "@babel/traverse": "^7.18.2",
46
- "@docusaurus/cssnano-preset": "0.0.0-5129",
47
- "@docusaurus/logger": "0.0.0-5129",
48
- "@docusaurus/mdx-loader": "0.0.0-5129",
46
+ "@docusaurus/cssnano-preset": "0.0.0-5132",
47
+ "@docusaurus/logger": "0.0.0-5132",
48
+ "@docusaurus/mdx-loader": "0.0.0-5132",
49
49
  "@docusaurus/react-loadable": "5.5.2",
50
- "@docusaurus/utils": "0.0.0-5129",
51
- "@docusaurus/utils-common": "0.0.0-5129",
52
- "@docusaurus/utils-validation": "0.0.0-5129",
50
+ "@docusaurus/utils": "0.0.0-5132",
51
+ "@docusaurus/utils-common": "0.0.0-5132",
52
+ "@docusaurus/utils-validation": "0.0.0-5132",
53
53
  "@slorber/static-site-generator-webpack-plugin": "^4.0.7",
54
54
  "@svgr/webpack": "^6.2.1",
55
55
  "autoprefixer": "^10.4.7",
@@ -106,8 +106,8 @@
106
106
  "webpackbar": "^5.0.2"
107
107
  },
108
108
  "devDependencies": {
109
- "@docusaurus/module-type-aliases": "0.0.0-5129",
110
- "@docusaurus/types": "0.0.0-5129",
109
+ "@docusaurus/module-type-aliases": "0.0.0-5132",
110
+ "@docusaurus/types": "0.0.0-5132",
111
111
  "@types/detect-port": "^1.3.2",
112
112
  "@types/react-dom": "^18.0.5",
113
113
  "@types/react-router-config": "^5.0.6",
@@ -127,5 +127,5 @@
127
127
  "engines": {
128
128
  "node": ">=16.14"
129
129
  },
130
- "gitHead": "4df826a4ee16cabf5865fac844f6be58bcd7a7ea"
130
+ "gitHead": "7bc79d62e7f61a79a92b01373533ebd051f8671b"
131
131
  }