Explicit is better than implicit. Missing FAQ translation should raise an error. Added translation placeholders {translate me}

Signed-off-by: S. Kozyr <s.trump@gmail.com>
This commit is contained in:
Sergiy Kozyr 2024-06-11 09:57:07 +03:00
parent 2ddf7d51a2
commit b78179959e
Signed by: strump
GPG key ID: C622E5563CAC205D
8 changed files with 70 additions and 4 deletions

10
content/faq/_index.de.md Normal file
View file

@ -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.

10
content/faq/_index.fr.md Normal file
View file

@ -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.

10
content/faq/_index.pl.md Normal file
View file

@ -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.

View file

@ -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.

10
content/faq/_index.pt.md Normal file
View file

@ -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.

10
content/faq/_index.tr.md Normal file
View file

@ -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.

View file

@ -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.

View file

@ -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 %}