Translate license

Fix #232
This commit is contained in:
Alexandre Vicenzi 2021-02-04 22:33:17 +01:00
parent 23ac7c30a4
commit 6b6dab83d4
2 changed files with 9 additions and 2 deletions

View file

@ -55,10 +55,11 @@ MENUITEMS = (
)
CC_LICENSE = {
"name": "Creative Commons Attribution-ShareAlike",
"name": "Creative Commons Attribution-ShareAlike 4.0 International License",
"version": "4.0",
"slug": "by-sa",
"icon": True,
"language": "en_US",
}
COPYRIGHT_YEAR = datetime.now().year

View file

@ -1,5 +1,11 @@
<p>
&copy; {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }} - This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/">{{ CC_LICENSE['name'] }} {{ CC_LICENSE['version'] }} International License</a>
{% set cc_slug = CC_LICENSE['slug'] %}
{% set cc_name = CC_LICENSE['name'] %}
{% set cc_version = CC_LICENSE['version'] %}
{% set cc_lang = CC_LICENSE['language'] or "en_US" %}
{% set cc_url = "http://creativecommons.org/licenses/{}/{}/deed.{}".format(cc_slug, cc_version, cc_lang) %}
&copy; {{ COPYRIGHT_YEAR }} {{ COPYRIGHT_NAME }} - {{ _('This work is licensed under a %(cc)s',
cc='<a rel="license" href="{}" target="_blank">{}</a>'.format(cc_url, cc_name)|safe) }}
</p>
{% include "partial/flex.html" %}
<p>