From 96e9b5f86d6ebfa1d1906d5f639ed3835c77cda9 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 1 Jul 2021 17:44:44 +0200
Subject: [PATCH] data-table-view: i18next-scanner support

---
 .../data-table-view/i18next-scanner.config.js    | 16 ++++++++++++++++
 .../data-table-view/src/i18n/de/translation.json |  2 +-
 .../data-table-view/src/i18n/en/translation.json |  2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)
 create mode 100644 packages/data-table-view/i18next-scanner.config.js

diff --git a/packages/data-table-view/i18next-scanner.config.js b/packages/data-table-view/i18next-scanner.config.js
new file mode 100644
index 00000000..aeb8fdb6
--- /dev/null
+++ b/packages/data-table-view/i18next-scanner.config.js
@@ -0,0 +1,16 @@
+module.exports = {
+    input: [
+        'src/*.js',
+    ],
+    output: './',
+    options: {
+        debug: false,
+        removeUnusedKeys: true,
+        func: {list: ['i18n.t', '_i18n.t']},
+        lngs: ['en','de'],
+        resource: {
+            loadPath: 'src/i18n/{{lng}}/{{ns}}.json',
+            savePath: 'src/i18n/{{lng}}/{{ns}}.json'
+        },
+    },
+}
diff --git a/packages/data-table-view/src/i18n/de/translation.json b/packages/data-table-view/src/i18n/de/translation.json
index d1776ebc..ed90a81b 100644
--- a/packages/data-table-view/src/i18n/de/translation.json
+++ b/packages/data-table-view/src/i18n/de/translation.json
@@ -3,4 +3,4 @@
   "export-excel": "Excel Export",
   "export-csv": "CSV Export",
   "column-search-placeholder": "Nach {{fieldName}} suchen"
-}
\ 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 33ea4a20..0c0acdb3 100644
--- a/packages/data-table-view/src/i18n/en/translation.json
+++ b/packages/data-table-view/src/i18n/en/translation.json
@@ -3,4 +3,4 @@
   "export-excel": "Excel Export",
   "export-csv": "CSV Export",
   "column-search-placeholder": "Search for {{fieldName}}"
-}
\ No newline at end of file
+}
-- 
GitLab