From 109614b6126e2f6c6be3f8fde0a652c9d5d508a0 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Mon, 30 Jan 2023 21:13:55 +0100 Subject: [PATCH] Fixed computation of missing translations --- material/.overrides/hooks/translations.py | 2 +- material/partials/languages/ja.html | 2 +- src/.overrides/hooks/translations.py | 2 +- src/partials/languages/ja.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/material/.overrides/hooks/translations.py b/material/.overrides/hooks/translations.py index 6ed4e68c9..b2f635707 100644 --- a/material/.overrides/hooks/translations.py +++ b/material/.overrides/hooks/translations.py @@ -51,7 +51,7 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files): # Map names and available translations names[code] = name known[code] = dict(re.findall( - r"^ \"([^\"]+)\": \"([^\"]+)\"(?:,|$)?", data, + r"^ \"([^\"]+)\": \"([^\"]*)\"(?:,|$)?", data, re.MULTILINE )) diff --git a/material/partials/languages/ja.html b/material/partials/languages/ja.html index 3da47ab9c..4c866d12e 100644 --- a/material/partials/languages/ja.html +++ b/material/partials/languages/ja.html @@ -9,7 +9,7 @@ "announce.dismiss": "非表示にします", "blog.archive": "過去の投稿", "blog.categories": "カテゴリー", - "blog.categories.in": " ", + "blog.categories.in": "", "blog.continue": "続きを読む", "blog.draft": "下書き", "blog.index": "ブログトップへ戻る", diff --git a/src/.overrides/hooks/translations.py b/src/.overrides/hooks/translations.py index 6ed4e68c9..b2f635707 100644 --- a/src/.overrides/hooks/translations.py +++ b/src/.overrides/hooks/translations.py @@ -51,7 +51,7 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files): # Map names and available translations names[code] = name known[code] = dict(re.findall( - r"^ \"([^\"]+)\": \"([^\"]+)\"(?:,|$)?", data, + r"^ \"([^\"]+)\": \"([^\"]*)\"(?:,|$)?", data, re.MULTILINE )) diff --git a/src/partials/languages/ja.html b/src/partials/languages/ja.html index fc38b6803..cce48ec7c 100644 --- a/src/partials/languages/ja.html +++ b/src/partials/languages/ja.html @@ -29,7 +29,7 @@ "announce.dismiss": "非表示にします", "blog.archive": "過去の投稿", "blog.categories": "カテゴリー", - "blog.categories.in": " ", + "blog.categories.in": "", "blog.continue": "続きを読む", "blog.draft": "下書き", "blog.index": "ブログトップへ戻る",