Commit 29d56da3 authored by Phu Nguyen's avatar Phu Nguyen
Browse files

Improve i18n

- Remove a part of a shortcode that is incompatible with translation script
- "Translate" menu links
- Fix Git hash link
parent 1f640e36
......@@ -1582,6 +1582,7 @@ params:
impressum: https://kate-editor.org/impressum/
logo: /images/kate.svg
readingTime: true
repoName: kate-editor-org
rss: false
selfHosted: true
showPatrons: false
......
......@@ -4,6 +4,15 @@ author: Christoph Cullmann
date: 2010-07-09T14:40:05+00:00
sassFiles:
- /sass/get-it.scss
discoverData:
kate:
title: Install Kate
subtitle: via Discover
alt: Install Kate via Discover or other AppStream application stores
kwrite:
title: Install KWrite
subtitle: via Discover
alt: Install KWrite via Discover or other AppStream application stores
---
{{< get-it src="/wp-content/uploads/2010/07/Tux.svg_-254x300.png" >}}
......@@ -12,13 +21,7 @@ sassFiles:
+ Install [Kate](https://apps.kde.org/en/kate) or [KWrite](https://apps.kde.org/en/kwrite) from [your distribution](https://kde.org/distributions/)
{{< get-it-button-discover
button-kate-title="Install Kate" button-kate-subtitle="via Discover" button-kate-alt="Install Kate via Discover or other AppStream application stores"
button-kwrite-title="Install KWrite" button-kwrite-subtitle="via Discover" button-kwrite-alt="Install KWrite via Discover or other AppStream application stores"
>}}
{{< get-it-button-discover >}}
These buttons only works with [Discover](https://apps.kde.org/en/discover) and other AppStream application stores, such as [GNOME Software](https://wiki.gnome.org/Apps/Software). You can also use your distribution's package manager, such as [Muon](https://apps.kde.org/en/muon) or [Synaptic](https://wiki.debian.org/Synaptic).
......
......@@ -60,6 +60,6 @@ kate-konsole:
posts:
other: "News"
view-all-posts:
other: "View all posts"
other: "View all news"
available:
other: "Available for Linux, Windows and macOS"
......@@ -68,32 +68,34 @@
max-width: 590px;
}
</style>
{{ with .Page.Params.discoverData }}
<div class="get-it-buttons-container">
<a href="appstream://org.kde.kate.desktop" alt="{{ .Get "button-kate-alt" }}" class="get-it-button-link">
<a href="appstream://org.kde.kate.desktop" alt="{{ .kate.alt }}" class="get-it-button-link">
<div class="get-it-button-discover">
<img src="/images/plasmadiscover.png" class="get-it-button-discover-icon"/>
<div class="get-it-button-discover-text-container">
<div>
<div class="get-it-button-discover-text-title">
{{ .Get "button-kate-title" }}
{{ .kate.title }}
</div>
<div class="get-it-button-discover-title-subtitle">
{{ .Get "button-kate-subtitle" }}
{{ .kate.subtitle }}
</div>
</div>
</div>
</div>
</a>
<a href="appstream://org.kde.kwrite.desktop" alt="{{ .Get "button-kwrite-alt" }}" class="get-it-button-link">
<a href="appstream://org.kde.kwrite.desktop" alt="{{ .kwrite.alt }}" class="get-it-button-link">
<div class="get-it-button-discover">
<img src="/images/plasmadiscover.png" class="get-it-button-discover-icon"/>
<div class="get-it-button-discover-text-container">
<div>
<div class="get-it-button-discover-text-title">
{{ .Get "button-kwrite-title" }}
{{ .kwrite.title }}
</div>
<div class="get-it-button-discover-title-subtitle">
{{ .Get "button-kwrite-subtitle" }}
{{ .kwrite.subtitle }}
</div>
</div>
</div>
......@@ -103,4 +105,5 @@
<div class="get-it-button-info">
{{ .Inner | markdownify }}
</div>
{{ end }}
<!-- kate: syntax Mustache/Handlebars (HTML); indent-width 2; -->
......@@ -412,7 +412,10 @@ def generate_translations(args):
for menu_item in config_content['languages']['en']['menu']['main']:
menu = copy.deepcopy(menu_item)
menu['name'] = _(menu['name'])
tr = _(menu['name'])
if menu['url'].startswith('/') and menu['name'] is not tr:
menu['url'] = '/' + translations + menu['url']
menu['name'] = tr
config_content['languages'][translations]['menu']['main'].append(menu)
elif translations in config_content['languages']:
del config_content['languages'][translations]
......
Supports Markdown
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