Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Websites
Kate Website
Commits
255bdcac
Commit
255bdcac
authored
Apr 06, 2021
by
Phu Nguyen
Browse files
Make better use of title and description
parent
b8a9cbaf
Changes
4
Hide whitespace changes
Inline
Side-by-side
config.yaml
View file @
255bdcac
...
...
@@ -338,7 +338,9 @@ languages:
parent
:
menu
url
:
/themes/
weight
:
120
title
:
Kate | Get an Edge in Editing
params
:
description
:
'
Kate
is
a
modern
text
editor
built
on
the
KDE
Frameworks
and
Qt.'
title
:
Kate
weight
:
1
en-gb
:
languageCode
:
en-gb
...
...
content/_index.en.md
View file @
255bdcac
---
title
:
Kate
description
:
"
Get
an
Edge
in
Editing"
title
:
'
Kate
-
Get
an
Edge
in
Editing'
name
:
Kate
subtitle
:
"
Get
an
Edge
in
Editing"
menu
:
main
:
name
:
Kate
weight
:
1
---
layouts/index.html
View file @
255bdcac
{{ define "main" }}
<main
id=
"home"
>
<section
class=
"text-center py-4 mt-0 header-plasma20"
style=
"background: linear-gradient(-30deg, #00d2ff 0%, #3a47d5 100%);; color: white"
>
<h1>
{{ .
Titl
e }}
</h1>
<h2>
{{ .
Description
}}
</h2>
<h1>
{{ .
Params.nam
e }}
</h1>
<h2>
{{ .
Params.subtitle
}}
</h2>
<p>
{{ i18n "available" }}
</p>
<a
href=
"{{ "
/
get-it
"
|
relLangURL
}}"
hreflang=
"{{ .Site.LanguagePrefix }}"
class=
"learn-more button noblefir my-2 mx-3"
>
{{ i18n "get-it" }}
</a>
<div
class=
"laptop-with-overlay d-block my-3 mx-auto w-100"
style=
"max-width: 1000px"
>
...
...
translations.py
View file @
255bdcac
...
...
@@ -331,6 +331,16 @@ def extract(args):
except
:
pass
entry
=
polib
.
POEntry
(
msgid
=
config
[
'languages'
][
'en'
][
'params'
][
'description'
],
msgstr
=
u
''
,
occurrences
=
[(
'config.yaml'
,
'0'
)]
)
try
:
pot
.
append
(
entry
)
except
:
pass
pot
.
save
(
pot_file
)
...
...
@@ -423,6 +433,8 @@ def generate_translations(args):
config_content
[
'languages'
][
translations
][
'menu'
]
=
dict
()
config_content
[
'languages'
][
translations
][
'menu'
][
'main'
]
=
list
()
config_content
[
'languages'
][
translations
][
'languageCode'
]
=
translations
config_content
[
'languages'
][
translations
][
'params'
]
=
dict
()
config_content
[
'languages'
][
translations
][
'params'
][
'description'
]
=
_
(
config_content
[
'languages'
][
'en'
][
'params'
][
'description'
])
config_content
[
'languages'
][
translations
][
'title'
]
=
_
(
config_content
[
'languages'
][
'en'
][
'title'
])
config_content
[
'languages'
][
translations
][
'weight'
]
=
2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment