Localize the license's url

This commit is contained in:
Rodolphe Bréard 2023-08-11 19:12:55 +02:00
parent bf05d8ffb1
commit 6c585ac011
3 changed files with 6 additions and 4 deletions

View file

@ -19,6 +19,8 @@
"name": "Sub-Address KEy (SAKE) app",
"version": "Version: {version}",
"license": "License: {mit} or {apache}",
"license_mit_url": "https://en.wikipedia.org/wiki/MIT_License",
"license_apache_url": "https://en.wikipedia.org/wiki/Apache_License",
"repository": "Repository: {url}",
"close": "@:invariants.controls.close"
},

View file

@ -19,6 +19,8 @@
"name": "Sub-Address KEy (SAKE) app",
"version": "Version : {version}",
"license": "Licence : {mit} ou {apache}",
"license_mit_url": "https://fr.wikipedia.org/wiki/Licence_MIT",
"license_apache_url": "https://fr.wikipedia.org/wiki/Licence_Apache",
"repository": "Dépôt : {url}",
"close": "@:invariants.controls.close"
},

View file

@ -5,8 +5,6 @@ import LayoutComponent from '../components/LayoutComponent.vue';
import ExternalLinkComponent from '../components/ExternalLinkComponent.vue';
const router = useRouter();
const mitLicenseUrl = 'https://spdx.org/licenses/MIT.html';
const apacheLicenseUrl = 'https://spdx.org/licenses/Apache-2.0.html';
const repoUrl = 'https://github.com/breard-r/sake-app';
const toMainView = () => {
@ -24,10 +22,10 @@ const toMainView = () => {
</i18n-t>
<i18n-t scope="global" keypath="about.license" tag="p">
<template v-slot:mit>
<ExternalLinkComponent :url="mitLicenseUrl" name="MIT" />
<ExternalLinkComponent :url="$t('about.license_mit_url')" name="MIT" />
</template>
<template v-slot:apache>
<ExternalLinkComponent :url="apacheLicenseUrl" name="Apache 2.0" />
<ExternalLinkComponent :url="$t('about.license_apache_url')" name="Apache 2.0" />
</template>
</i18n-t>
<i18n-t scope="global" keypath="about.repository" tag="p">