Commit a4f3e0f4 authored by Phu Nguyen's avatar Phu Nguyen

Put menu items into content files where needed

parent 70827bbc
......@@ -10,18 +10,12 @@ languages:
languageName: Asturianu
menu:
main:
- name: Productos
url: /ast/products/
weight: 1
- name: Desendolcu
url: https://develop.kde.org
weight: 2
- name: Andechar
url: https://community.kde.org/Get_Involved
weight: 3
- name: Donar
url: /ast/community/donations
weight: 4
weight: 2
ca:
contentDir: content-trans/ca
......@@ -29,36 +23,24 @@ languages:
languageName: Català
menu:
main:
- name: Productes
url: /ca/products/
weight: 1
- name: Desenvolupament
url: https://develop.kde.org
weight: 2
- name: Col·laboreu-hi
url: https://community.kde.org/Get_Involved
weight: 3
- name: Donatius
url: /ca/community/donations
weight: 4
weight: 2
cs:
contentDir: content-trans/cs
languageCode: cs
menu:
main:
- name: Produkty
url: /cs/products/
weight: 1
- name: Develop
url: https://develop.kde.org
weight: 2
- name: Přidejte se
url: https://community.kde.org/Get_Involved
weight: 3
- name: Přispějte
url: /cs/community/donations
weight: 4
weight: 2
en:
contentDir: content/
......@@ -66,18 +48,12 @@ languages:
languageName: English
menu:
main:
- name: Products
url: /products/
weight: 1
- name: Develop
url: https://develop.kde.org
weight: 2
- name: Get Involved
url: https://community.kde.org/Get_Involved
weight: 3
- name: Donate
url: /community/donations
weight: 4
weight: 1
es:
contentDir: content-trans/es
......@@ -85,18 +61,12 @@ languages:
languageName: Español
menu:
main:
- name: Productos
url: /es/products/
weight: 1
- name: Desarrollo
url: https://develop.kde.org
weight: 2
- name: Implicarse
url: https://community.kde.org/Get_Involved
weight: 3
- name: Hacer una donación
url: /es/community/donations
weight: 4
weight: 2
eu:
contentDir: content-trans/eu
......@@ -104,18 +74,12 @@ languages:
languageName: Euskara
menu:
main:
- name: Produktuak
url: /eu/products/
weight: 1
- name: Garapena
url: https://develop.kde.org
weight: 2
- name: Engaia zaitez
url: https://community.kde.org/Get_Involved
weight: 3
- name: Egin dohaintza
url: /eu/community/donations
weight: 4
weight: 2
fr:
contentDir: content-trans/fr
......@@ -123,18 +87,12 @@ languages:
languageName: Français
menu:
main:
- name: Produits
url: /fr/products/
weight: 1
- name: Develop
url: https://develop.kde.org
weight: 2
- name: Soyez impliqués
url: https://community.kde.org/Get_Involved
weight: 3
- name: Faire un don
url: /fr/community/donations
weight: 4
weight: 2
hu:
contentDir: content-trans/hu
......@@ -142,18 +100,12 @@ languages:
languageName: Magyar
menu:
main:
- name: Termékek
url: /hu/products/
weight: 1
- name: Fejlesztés
url: https://develop.kde.org
weight: 2
- name: Csatlakozás
url: https://community.kde.org/Get_Involved
weight: 3
- name: Támogatás
url: /hu/community/donations
weight: 4
weight: 2
it:
contentDir: content-trans/it
......@@ -161,18 +113,12 @@ languages:
languageName: Italiano
menu:
main:
- name: Prodotti
url: /it/products/
weight: 1
- name: Sviluppo
url: https://develop.kde.org
weight: 2
- name: Partecipa
url: https://community.kde.org/Get_Involved
weight: 3
- name: Fai una donazione
url: /it/community/donations
weight: 4
weight: 2
nl:
contentDir: content-trans/nl
......@@ -180,18 +126,12 @@ languages:
languageName: Nederlands
menu:
main:
- name: Producten
url: /nl/products/
weight: 1
- name: Ontwerpen
url: https://develop.kde.org
weight: 2
- name: Doe mee
url: https://community.kde.org/Get_Involved
weight: 3
- name: Doneren
url: /nl/community/donations
weight: 4
weight: 2
pt:
contentDir: content-trans/pt
......@@ -199,18 +139,12 @@ languages:
languageName: Português
menu:
main:
- name: Produtos
url: /pt/products/
weight: 1
- name: Desenvolvimento
url: https://develop.kde.org
weight: 2
- name: Envolva-se
url: https://community.kde.org/Get_Involved
weight: 3
- name: Doar
url: /pt/community/donations
weight: 4
weight: 2
pt-br:
contentDir: content-trans/pt-br
......@@ -218,18 +152,12 @@ languages:
languageName: Português Brasileiro
menu:
main:
- name: Produtos
url: /pt-br/products/
weight: 1
- name: Desenvolva
url: https://develop.kde.org
weight: 2
- name: Contribua
url: https://community.kde.org/Get_Involved
weight: 3
- name: Faça uma doação
url: /pt-br/community/donations
weight: 4
weight: 2
ru:
contentDir: content-trans/ru
......@@ -237,18 +165,12 @@ languages:
languageName: Русский
menu:
main:
- name: Продукты
url: /ru/products/
weight: 1
- name: Разработка
url: https://develop.kde.org
weight: 2
- name: Как присоединиться
url: https://community.kde.org/Get_Involved
weight: 3
- name: Поддержать
url: /ru/community/donations
weight: 4
weight: 2
sk:
contentDir: content-trans/sk
......@@ -256,18 +178,12 @@ languages:
languageName: Slovenčina
menu:
main:
- name: Produkty
url: /sk/products/
weight: 1
- name: Vývoj
url: https://develop.kde.org
weight: 2
- name: Zapojiť sa
url: https://community.kde.org/Get_Involved
weight: 3
- name: Venovať peniaze
url: /sk/community/donations
weight: 4
weight: 2
sv:
contentDir: content-trans/sv
......@@ -275,18 +191,12 @@ languages:
languageName: Svenska
menu:
main:
- name: Produkter
url: /sv/products/
weight: 1
- name: Utveckla
url: https://develop.kde.org
weight: 2
- name: Börja delta
url: https://community.kde.org/Get_Involved
weight: 3
- name: Ge ett bidrag
url: /sv/community/donations
weight: 4
weight: 2
uk:
contentDir: content-trans/uk
......@@ -294,18 +204,12 @@ languages:
languageName: Українська
menu:
main:
- name: Продукти
url: /uk/products/
weight: 1
- name: Розробка
url: https://develop.kde.org
weight: 2
- name: Приєднатися до команди
url: https://community.kde.org/Get_Involved
weight: 3
- name: Підтримати фінансово
url: /uk/community/donations
weight: 4
weight: 2
markup:
goldmark:
......
......@@ -32,4 +32,8 @@ supporting:
supporting_corp:
title: Supporting Member Programme for corporations
text: Are you part of a business or a corporation interested in sponsoring KDE development? In addition to making great software possible, supporting members also have their logos added to the KDE website and many printed promotional materials.
menu:
main:
weight: 4
name: Donate
---
......@@ -49,6 +49,9 @@ plasma:
view: View Distributions offering Plasma
screenshot: Screenshot of Plasma
text: Plasma is KDE's flagship product, offering the most customizable desktop environment available. The KDE community has the driving goal of making it simple by default, and powerful when needed.
menu:
main:
weight: 1
---
products:
other: Products
develop:
other: Develop
get-involved:
other: 'Get Involved'
Donate:
other: Donate
annc-frameworks-title-pre-5-76:
other: 'Release of KDE Frameworks %ver'
......
......@@ -50,7 +50,7 @@ def webpage_list() -> tp.Dict[str, tp.List[str]]:
}
excluded_keys = ['layout', 'date', 'type', 'publishDate', 'version', 'release', 'qtversion', 'changelog', 'sassFiles', 'link', 'image', 'externi18n', 'draft', 'color', 'sassFile', 'aliases', 'laptop', 'images', 'class', 'logo', 'src', 'libCount', 'customIntro', 'youtube', 'peertube', 'video', 'asBugfix', 'customOutro']
excluded_keys = ['layout', 'date', 'type', 'publishDate', 'version', 'release', 'qtversion', 'changelog', 'sassFiles', 'link', 'image', 'externi18n', 'draft', 'color', 'sassFile', 'aliases', 'laptop', 'images', 'class', 'logo', 'src', 'libCount', 'weight', 'customIntro', 'youtube', 'peertube', 'video', 'asBugfix', 'customOutro']
def import_frontmatter(data, _):
......@@ -455,9 +455,8 @@ def generate_translations(args):
for menu_item in config_content['languages']['en']['menu']['main']:
menu = copy.deepcopy(menu_item)
tr = _(menu['name'])
if menu['url'].startswith('/') and menu['name'] is not tr:
menu['url'] = '/' + lang + menu['url']
menu['name'] = tr
if menu['name'] is not tr:
menu['name'] = tr
config_content['languages'][lang]['menu']['main'].append(menu)
elif lang in config_content['languages']:
del config_content['languages'][lang]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment