changeset 2782:615b0a9b8098

Client: correct strings marking for translations * correct strings marking passing to UITableHeader
author Fadi Abbud <fadi.abbud@intevation.de>
date Fri, 22 Mar 2019 16:23:40 +0100
parents a2127495093e
children 2806821cfd63
files client/src/components/ImportStretches.vue client/src/components/importschedule/Importschedule.vue client/src/components/systemconfiguration/PDFTemplates.vue client/src/components/usermanagement/Usermanagement.vue
diffstat 4 files changed, 62 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/ImportStretches.vue	Fri Mar 22 14:35:32 2019 +0100
+++ b/client/src/components/ImportStretches.vue	Fri Mar 22 16:23:40 2019 +0100
@@ -8,11 +8,11 @@
     <div v-if="!edit" class="mb-3">
       <UITableHeader
         :columns="[
-          { id: 'properties.name', title: 'Name', class: 'col-4' },
-          { id: 'properties.date_info', title: 'Date', class: 'col-2' },
+          { id: 'properties.name', title: `${nameLabel}`, class: 'col-4' },
+          { id: 'properties.date_info', title: `${dateLabel}`, class: 'col-2' },
           {
             id: 'properties.source_organization',
-            title: 'Source organization',
+            title: `${sourceorganizationLabel}`,
             class: 'col-3'
           }
         ]"
@@ -325,6 +325,15 @@
     defineStretchesLabel() {
       return this.$gettext("Define Stretches");
     },
+    nameLabel() {
+      return this.$gettext("Name");
+    },
+    dateLabel() {
+      return this.$gettext("Date");
+    },
+    sourceorganizationLabel() {
+      return this.$gettext("Source organization");
+    },
     stretchesInStaging() {
       const result = [];
       for (let stretch of this.stretches) {
--- a/client/src/components/importschedule/Importschedule.vue	Fri Mar 22 14:35:32 2019 +0100
+++ b/client/src/components/importschedule/Importschedule.vue	Fri Mar 22 16:23:40 2019 +0100
@@ -23,11 +23,11 @@
         </div>
         <UITableHeader
           :columns="[
-            { id: 'id', title: 'ID', class: 'col-1' },
-            { id: 'kind', title: 'Type', class: 'col-2' },
-            { id: 'user', title: 'Author', class: 'col-2' },
-            { id: 'config.cron', title: 'Schedule', class: 'col-2' },
-            { id: 'config.send-email', title: 'Email', class: 'col-2' }
+            { id: 'id', title: `${idLabel}`, class: 'col-1' },
+            { id: 'kind', title: `${typeLabel}`, class: 'col-2' },
+            { id: 'user', title: `${authorLabel}`, class: 'col-2' },
+            { id: 'config.cron', title: `${scheduleLabel}`, class: 'col-2' },
+            { id: 'config.send-email', title: `${emailLabel}`, class: 'col-2' }
           ]"
         />
         <UITableBody
@@ -144,6 +144,21 @@
     importScheduleLabel() {
       return this.$gettext("Import Schedule");
     },
+    idLabel() {
+      return this.$gettext("ID");
+    },
+    typeLabel() {
+      return this.$gettext("Type");
+    },
+    authorLabel() {
+      return this.$gettext("Author");
+    },
+    scheduleLabel() {
+      return this.$gettext("Schedule");
+    },
+    emailLabel() {
+      return this.$gettext("Email");
+    },
     spacerStyle() {
       return [
         "spacer ml-3",
--- a/client/src/components/systemconfiguration/PDFTemplates.vue	Fri Mar 22 14:35:32 2019 +0100
+++ b/client/src/components/systemconfiguration/PDFTemplates.vue	Fri Mar 22 16:23:40 2019 +0100
@@ -13,9 +13,9 @@
     <div class="mt-1 border-bottom pb-4">
       <UITableHeader
         :columns="[
-          { id: 'name', title: 'Name', class: 'col-4' },
-          { id: 'time', title: 'Date', class: 'col-4' },
-          { id: 'country', title: 'Country', class: 'col-2' }
+          { id: 'name', title: `${nameLabel}`, class: 'col-4' },
+          { id: 'time', title: `${dateLabel}`, class: 'col-4' },
+          { id: 'country', title: `${countryLabel}`, class: 'col-2' }
         ]"
       />
       <UITableBody
@@ -92,6 +92,17 @@
       uploading: false
     };
   },
+  computed: {
+    nameLabel() {
+      return this.$gettext("Name");
+    },
+    dateLabel() {
+      return this.$gettext("Date");
+    },
+    countryLabel() {
+      return this.$gettext("Country");
+    }
+  },
   methods: {
     downloadTemplate(template) {
       if (template) {
--- a/client/src/components/usermanagement/Usermanagement.vue	Fri Mar 22 14:35:32 2019 +0100
+++ b/client/src/components/usermanagement/Usermanagement.vue	Fri Mar 22 16:23:40 2019 +0100
@@ -7,10 +7,10 @@
           <UIBoxHeader icon="users-cog" :title="usersLabel" />
           <UITableHeader
             :columns="[
-              { id: 'role', title: 'Role', class: 'col-1' },
-              { id: 'user', title: 'Username', class: 'col-3' },
-              { id: 'country', title: 'Country', class: 'col-2' },
-              { id: 'email', title: 'Email', class: 'col-3' }
+              { id: 'role', title: `${roleForColumLabel}`, class: 'col-1' },
+              { id: 'user', title: `${usernameLabel}`, class: 'col-3' },
+              { id: 'country', title: `${countryLabel}`, class: 'col-2' },
+              { id: 'email', title: `${emailLabel}`, class: 'col-3' }
             ]"
           />
           <UITableBody
@@ -175,6 +175,18 @@
     deleteUserLabel() {
       return this.$gettext("Delete user");
     },
+    roleForColumLabel() {
+      return this.$gettext("Role");
+    },
+    usernameLabel() {
+      return this.$gettext("Username");
+    },
+    countryLabel() {
+      return this.$gettext("Country");
+    },
+    emailLabel() {
+      return this.$gettext("Email");
+    },
     pages() {
       return Math.ceil(this.users.length / this.pageSize);
     },