Renamed language from "zh" to "zh-Hans".

Added Ukrainian FAQ index.
Fixed missing FAQ translation errors.

Signed-off-by: S. Kozyr <s.trump@gmail.com>
This commit is contained in:
Sergiy Kozyr 2024-06-10 22:46:58 +03:00
parent c2da37c96d
commit 2ddf7d51a2
Signed by: strump
GPG key ID: C622E5563CAC205D
7 changed files with 21 additions and 2 deletions

View file

@ -509,6 +509,11 @@ language = "Gallego"
language-word = "Idioma"
name = "Nome"
token = "Token"
[languages.pt]
taxonomies = [
{name = "faq", feed = false},
{name = "news", feed = true},
]
[languages.pt.translations]
address = "Endereço"
back = "Voltar às notícias"

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

@ -0,0 +1,10 @@
---
title: Довідка та часті питання
description: Відповіді на поширені запитання стосовно застосунка Organic Maps
extra:
menu_title: Довідка
---
### 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

@ -12,9 +12,13 @@
{%- set resource_title = resource.name %}
{%- elif taxonomy %}{# taxonomy has only 'name' and 'slug' properties #}
{% if lang == 'en' %}
{% set resource = taxonomy.name ~ "/_index.md" %}
{% set resource = taxonomy.name ~ "/_index.md" %}
{% else %}
{% set resource = taxonomy.name ~ "/_index." ~ lang ~ ".md" %}
{% 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 %}