Mercurial > gemma
changeset 2284:9f327f197ddd
client: translation: mark some strings for translations
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Fri, 15 Feb 2019 13:00:50 +0100 |
parents | 1169f18a0f11 |
children | 19ea2c3893e7 |
files | client/src/components/Pdftool.vue client/src/components/systemconfiguration/PDFTemplates.vue |
diffstat | 2 files changed, 15 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue Fri Feb 15 12:32:22 2019 +0100 +++ b/client/src/components/Pdftool.vue Fri Feb 15 13:00:50 2019 +0100 @@ -142,7 +142,7 @@ offset: { x: 2, y: 2 }, width: 60, fontSize: 8, - text: "Generated by {user}, {date}" + text: this.$gettext("Generated by") + " " + "{user}, {date}" }, { type: "northarrow", @@ -193,7 +193,7 @@ .catch(e => { const { status, data } = e.response; displayError({ - title: "Backend Error", + title: this.$gettext("Backend Error"), message: `${status}: ${data.message || data}` }); }); @@ -860,7 +860,7 @@ .catch(e => { const { status, data } = e.response; displayError({ - title: "Backend Error", + title: this.$gettext("Backend Error"), message: `${status}: ${data.message || data}` }); });
--- a/client/src/components/systemconfiguration/PDFTemplates.vue Fri Feb 15 12:32:22 2019 +0100 +++ b/client/src/components/systemconfiguration/PDFTemplates.vue Fri Feb 15 13:00:50 2019 +0100 @@ -14,8 +14,8 @@ <table class="table table-sm"> <thead> <tr> - <th>Name</th> - <th>Date</th> + <th><translate>Name</translate></th> + <th><translate>Date</translate></th> <th></th> </tr> </thead> @@ -127,8 +127,10 @@ template = JSON.parse(event.target.result); } catch (e) { displayError({ - title: "Format Error", - message: "Uploaded file does not contain valid json data." + title: this.$gettext("Format Error"), + message: this.$gettext( + "Uploaded file does not contain valid json data." + ) }); } if (template.name) { @@ -152,7 +154,7 @@ .catch(e => { const { status, data } = e.response; displayError({ - title: "Backend Error", + title: this.$gettext("Backend Error"), message: `${status}: ${data.message || data}` }); }) @@ -161,8 +163,10 @@ }); } else { displayError({ - title: "Format Error", - message: "The provided template has no name property." + title: this.$gettext("Format Error"), + message: this.$gettext( + "The provided template has no name property." + ) }); } }; @@ -182,7 +186,7 @@ .catch(e => { const { status, data } = e.response; displayError({ - title: "Backend Error", + title: this.$gettext("Backend Error"), message: `${status}: ${data.message || data}` }); });