From e81261e63c3e441e87e8210fe92cefa0ae422cdc Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 9 Jan 2020 10:58:37 +0100
Subject: [PATCH] Make all the buttons translatable

So we can easily change them and don't have to depend on datatables.
---
 packages/data-table-view/src/i18n/de/translation.json | 3 +++
 packages/data-table-view/src/i18n/en/translation.json | 3 +++
 packages/data-table-view/src/vpu-data-table-view.js   | 6 +++---
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/packages/data-table-view/src/i18n/de/translation.json b/packages/data-table-view/src/i18n/de/translation.json
index 7a73a41b..ecf2fb3f 100644
--- a/packages/data-table-view/src/i18n/de/translation.json
+++ b/packages/data-table-view/src/i18n/de/translation.json
@@ -1,2 +1,5 @@
 {
+    "print": "Drucken",
+    "export-excel": "Excel Export",
+    "export-csv": "CSV Export"
 }
\ No newline at end of file
diff --git a/packages/data-table-view/src/i18n/en/translation.json b/packages/data-table-view/src/i18n/en/translation.json
index 7a73a41b..54c3c973 100644
--- a/packages/data-table-view/src/i18n/en/translation.json
+++ b/packages/data-table-view/src/i18n/en/translation.json
@@ -1,2 +1,5 @@
 {
+    "print": "Print",
+    "export-excel": "Excel Export",
+    "export-csv": "CSV Export"
 }
\ No newline at end of file
diff --git a/packages/data-table-view/src/vpu-data-table-view.js b/packages/data-table-view/src/vpu-data-table-view.js
index 6d96cdb9..037f1334 100644
--- a/packages/data-table-view/src/vpu-data-table-view.js
+++ b/packages/data-table-view/src/vpu-data-table-view.js
@@ -98,21 +98,21 @@ class DataTableView extends LitElement {
             buttons: [
                 {
                     extend: 'csvHtml5',
-                    text: 'CSV',
+                    text: i18n.t('export-csv'),
                     title: this.exportName,
                     filename: this.exportName,
                     className: 'button is-small',
                 },
                 {
                     extend: 'excelHtml5',
-                    text: 'XSLX',
+                    text: i18n.t('export-excel'),
                     title: this.exportName,
                     filename: this.exportName,
                     className: 'button is-small',
                 },
                 {
                     extend: 'print',
-                    //text: 'Drucken',
+                    text: i18n.t('print'),
                     title: this.exportName,
                     className: 'button is-small',
                 },
-- 
GitLab