From b78179959ed5528be5005c8ce995b6daeb86057a Mon Sep 17 00:00:00 2001 From: "S. Kozyr" Date: Tue, 11 Jun 2024 09:57:07 +0300 Subject: [PATCH] Explicit is better than implicit. Missing FAQ translation should raise an error. Added translation placeholders `{translate me}` Signed-off-by: S. Kozyr --- content/faq/_index.de.md | 10 ++++++++++ content/faq/_index.fr.md | 10 ++++++++++ content/faq/_index.pl.md | 10 ++++++++++ content/faq/_index.pt-BR.md | 10 ++++++++++ content/faq/_index.pt.md | 10 ++++++++++ content/faq/_index.tr.md | 10 ++++++++++ content/faq/_index.zh-Hans.md | 10 ++++++++++ templates/base.html | 4 ---- 8 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 content/faq/_index.de.md create mode 100644 content/faq/_index.fr.md create mode 100644 content/faq/_index.pl.md create mode 100644 content/faq/_index.pt-BR.md create mode 100644 content/faq/_index.pt.md create mode 100644 content/faq/_index.tr.md create mode 100644 content/faq/_index.zh-Hans.md diff --git a/content/faq/_index.de.md b/content/faq/_index.de.md new file mode 100644 index 00000000..db5adae3 --- /dev/null +++ b/content/faq/_index.de.md @@ -0,0 +1,10 @@ +--- +title: Frequently Asked Questions {translate me} +description: This FAQ has answers to many questions about Organic Maps app, our contributors, and our project {translate me} +extra: + menu_title: F.A.Q. {translate me} +--- + +### This page is replaced with taxonomy "faq" from templates/faq/list.html template + +This file is needed for top_menu.html and bottom_menu.html templates to show F.A.Q. diff --git a/content/faq/_index.fr.md b/content/faq/_index.fr.md new file mode 100644 index 00000000..db5adae3 --- /dev/null +++ b/content/faq/_index.fr.md @@ -0,0 +1,10 @@ +--- +title: Frequently Asked Questions {translate me} +description: This FAQ has answers to many questions about Organic Maps app, our contributors, and our project {translate me} +extra: + menu_title: F.A.Q. {translate me} +--- + +### This page is replaced with taxonomy "faq" from templates/faq/list.html template + +This file is needed for top_menu.html and bottom_menu.html templates to show F.A.Q. diff --git a/content/faq/_index.pl.md b/content/faq/_index.pl.md new file mode 100644 index 00000000..db5adae3 --- /dev/null +++ b/content/faq/_index.pl.md @@ -0,0 +1,10 @@ +--- +title: Frequently Asked Questions {translate me} +description: This FAQ has answers to many questions about Organic Maps app, our contributors, and our project {translate me} +extra: + menu_title: F.A.Q. {translate me} +--- + +### This page is replaced with taxonomy "faq" from templates/faq/list.html template + +This file is needed for top_menu.html and bottom_menu.html templates to show F.A.Q. diff --git a/content/faq/_index.pt-BR.md b/content/faq/_index.pt-BR.md new file mode 100644 index 00000000..db5adae3 --- /dev/null +++ b/content/faq/_index.pt-BR.md @@ -0,0 +1,10 @@ +--- +title: Frequently Asked Questions {translate me} +description: This FAQ has answers to many questions about Organic Maps app, our contributors, and our project {translate me} +extra: + menu_title: F.A.Q. {translate me} +--- + +### This page is replaced with taxonomy "faq" from templates/faq/list.html template + +This file is needed for top_menu.html and bottom_menu.html templates to show F.A.Q. diff --git a/content/faq/_index.pt.md b/content/faq/_index.pt.md new file mode 100644 index 00000000..db5adae3 --- /dev/null +++ b/content/faq/_index.pt.md @@ -0,0 +1,10 @@ +--- +title: Frequently Asked Questions {translate me} +description: This FAQ has answers to many questions about Organic Maps app, our contributors, and our project {translate me} +extra: + menu_title: F.A.Q. {translate me} +--- + +### This page is replaced with taxonomy "faq" from templates/faq/list.html template + +This file is needed for top_menu.html and bottom_menu.html templates to show F.A.Q. diff --git a/content/faq/_index.tr.md b/content/faq/_index.tr.md new file mode 100644 index 00000000..db5adae3 --- /dev/null +++ b/content/faq/_index.tr.md @@ -0,0 +1,10 @@ +--- +title: Frequently Asked Questions {translate me} +description: This FAQ has answers to many questions about Organic Maps app, our contributors, and our project {translate me} +extra: + menu_title: F.A.Q. {translate me} +--- + +### This page is replaced with taxonomy "faq" from templates/faq/list.html template + +This file is needed for top_menu.html and bottom_menu.html templates to show F.A.Q. diff --git a/content/faq/_index.zh-Hans.md b/content/faq/_index.zh-Hans.md new file mode 100644 index 00000000..db5adae3 --- /dev/null +++ b/content/faq/_index.zh-Hans.md @@ -0,0 +1,10 @@ +--- +title: Frequently Asked Questions {translate me} +description: This FAQ has answers to many questions about Organic Maps app, our contributors, and our project {translate me} +extra: + menu_title: F.A.Q. {translate me} +--- + +### This page is replaced with taxonomy "faq" from templates/faq/list.html template + +This file is needed for top_menu.html and bottom_menu.html templates to show F.A.Q. diff --git a/templates/base.html b/templates/base.html index e13a5f06..5c5b73a1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,10 +15,6 @@ {% set resource = taxonomy.name ~ "/_index.md" %} {% else %} {% set resource = taxonomy.name ~ "/_index." ~ lang ~ ".md" %} - {%- set translation_exists = load_data(path=resource, required=false) -%} - {%- if not translation_exists -%} - {% set resource = taxonomy.name ~ "/_index.md" %} {# Fallback to English if no translation available #} - {% endif %} {% endif %} {% set resource = get_section(path=resource) %} {%- set resource_title = resource.title %}