Skip to content

Commit b2ab4c4

Browse files
committed
Update translations
1 parent d7b6750 commit b2ab4c4

File tree

12 files changed

+834
-783
lines changed

12 files changed

+834
-783
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ match i18next's interpolation syntax:
9393
* Stop the site if it is running locally.
9494
* Edit `locales/en/translation.json` to `{}` and save.
9595
* Run `npm start`.
96-
* Commit changes to `locales/en/translation.json`.
96+
* Run `npm run update_locales`
97+
* Commit changes to `locales`.
9798

9899
## Brand icons
99100

eleventy.config.js

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import UserConfig from "@11ty/eleventy";
22
import { EleventyHtmlBasePlugin, I18nPlugin, IdAttributePlugin } from "@11ty/eleventy";
3-
import i18next from 'i18next';
4-
import Backend from 'i18next-fs-backend';
5-
import { join } from 'path';
6-
import { readdirSync, lstatSync } from 'fs';
7-
import { fileURLToPath } from 'url';
8-
import { dirname } from 'path';
3+
import i18next from "i18next";
4+
import Backend from "i18next-fs-backend";
5+
import { join, dirname } from "path";
6+
import { readdirSync, lstatSync } from "fs";
7+
import { fileURLToPath } from "url";
98
import YAML from "yaml";
109
import { DateTime } from "luxon";
1110
import markdownIt from "markdown-it";
@@ -25,21 +24,18 @@ export default function (eleventyConfig) {
2524
// debug: true,
2625

2726
saveMissing: true,
28-
29-
// allow keys to be phrases having `:`, `.`
3027
nsSeparator: false,
3128
keySeparator: false,
32-
33-
// do not load a fallback
29+
returnEmptyString: false,
3430
fallbackLng: "en",
3531

3632
backend: {
37-
loadPath: join(__dirname, 'locales/{{lng}}/{{ns}}.json'),
38-
addPath: join(__dirname, 'locales/{{lng}}/{{ns}}.json'),
33+
loadPath: join(__dirname, "locales/{{lng}}/{{ns}}.json"),
34+
addPath: join(__dirname, "locales/{{lng}}/{{ns}}.json"),
3935
},
4036

41-
preload: readdirSync(join(__dirname, 'locales')).filter((fileName) => {
42-
const joinedPath = join(join(__dirname, 'locales'), fileName)
37+
preload: readdirSync(join(__dirname, "locales")).filter((fileName) => {
38+
const joinedPath = join(join(__dirname, "locales"), fileName)
4339
const isDirectory = lstatSync(joinedPath).isDirectory()
4440
return isDirectory;
4541
}),
@@ -96,6 +92,7 @@ export default function (eleventyConfig) {
9692
});
9793

9894
eleventyConfig.addFilter("i18n", function(msg, ...args) {
95+
msg = msg.trim().replaceAll(/\s{2,}/g, " ");
9996
const t = i18next.getFixedT(this.page.lang ?? "en");
10097

10198
if (args.length % 2 !== 0) {

locales/de/translation.json

Lines changed: 286 additions & 285 deletions
Large diffs are not rendered by default.

locales/en/translation.json

Lines changed: 63 additions & 62 deletions
Large diffs are not rendered by default.

locales/es/translation.json

Lines changed: 70 additions & 69 deletions
Large diffs are not rendered by default.

locales/fr/translation.json

Lines changed: 73 additions & 70 deletions
Large diffs are not rendered by default.

locales/id/translation.json

Lines changed: 72 additions & 73 deletions
Large diffs are not rendered by default.

locales/it/translation.json

Lines changed: 70 additions & 71 deletions
Large diffs are not rendered by default.

locales/sv/translation.json

Lines changed: 70 additions & 69 deletions
Large diffs are not rendered by default.

locales/uk/translation.json

Lines changed: 70 additions & 69 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)