From 2ddfcfaff0dafe1571663d081e897b1a72ea25e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mark=20M=C3=BCller?= <markmueller86@gmail.com>
Date: Sat, 30 Nov 2019 12:22:45 +0000
Subject: [PATCH] translation: Japanese and minor layout fixes

---
 data/keyboards/de.yaml      | 18 +++++++++---------
 data/keyboards/jp+kana.yaml |  5 ++---
 data/langs/ja-JP.txt        |  8 ++++++++
 src/resources.rs            |  1 +
 4 files changed, 20 insertions(+), 12 deletions(-)
 create mode 100644 data/langs/ja-JP.txt

diff --git a/data/keyboards/de.yaml b/data/keyboards/de.yaml
index 4693e95e..2021f7d2 100644
--- a/data/keyboards/de.yaml
+++ b/data/keyboards/de.yaml
@@ -1,5 +1,4 @@
-# German layout by Mark Müller
-# Version 2019111700
+# Maintained by: Mark Müller <markmueller86@gmail.com>
 ---
 bounds: { x: 0, y: 1, width: 360, height: 208 }
 
@@ -25,22 +24,22 @@ views:
         - "Q W E R T Z U I O P"
         - "A S D F G H J K L"
         - "Shift_L   Y X C V B N M  BackSpace"
-        - "show_numbers show_dechars preferences         space        ! ? Return"
+        - "show_numbers show_eschars preferences         space        ! ? Return"
     numbers:
         - "1 2 3 4 5 6 7 8 9 0"
         - "@ # € % & - _ + ( )"
         - "show_symbols   , \" ' : = < >  BackSpace"
-        - "show_letters show_dechars preferences         space        , . Return"
+        - "show_letters show_eschars preferences         space        , . Return"
     symbols:
         - "~ ` ´ | · √ µ ÷ × ¶"
         - "© ® £ $ ¥ ^ ° * { }"
         - "show_numbers   \\ / § π τ [ ]  BackSpace"
-        - "show_letters show_dechars preferences         space        , . Return"
-    dechars:
+        - "show_letters show_eschars preferences         space        , . Return"
+    eschars:
         - "ä è é ö ü Ä È É Ö Ü"
         - "à â ê î ô À Â È Î Ô"
         - "show_numbers  « » ç Ç æ œ ß  BackSpace"
-        - "show_letters show_dechars preferences         space        „ “ Return"
+        - "show_letters show_eschars preferences         space        „ “ Return"
 
 buttons:
     Shift_L:
@@ -73,15 +72,16 @@ buttons:
             set_view: "symbols"
         outline: "altline"
         label: "*/="
-    show_dechars:
+    show_eschars:
         action:
             locking:
-                lock_view: "dechars"
+                lock_view: "eschars"
                 unlock_view: "base"
         outline: "altline"
         label: "äÄ"
     space:
         outline: "spaceline"
+        label: " "
         text: " "
     Return:
         outline: "altline"
diff --git a/data/keyboards/jp+kana.yaml b/data/keyboards/jp+kana.yaml
index e0f35cbd..b20d2bf9 100644
--- a/data/keyboards/jp+kana.yaml
+++ b/data/keyboards/jp+kana.yaml
@@ -1,5 +1,4 @@
-# Japanese Kana layout by Mark Müller
-# Version 2019111800
+# Maintained by: Mark Müller <markmueller86@gmail.com>
 ---
 bounds: { x: 0, y: 1, width: 360, height: 208 }
 
@@ -221,7 +220,7 @@ buttons:
         action: "show_prefs"
         outline: "special"
         icon: "keyboard-mode-symbolic"
-    # space button with unicode keysym for ideographic space
+    # space button using text tag for ideographic space
     space:
         outline: "default-wide"
         label: "␣"
diff --git a/data/langs/ja-JP.txt b/data/langs/ja-JP.txt
new file mode 100644
index 00000000..840b1a23
--- /dev/null
+++ b/data/langs/ja-JP.txt
@@ -0,0 +1,8 @@
+us 英語 (US)
+de ドイツ語
+el ギリシャ語
+es スペイン語
+it イタリア語
+jp+kana 日本語 (かな)
+nb ノルウェー語
+
diff --git a/src/resources.rs b/src/resources.rs
index cfc56b5a..feee081f 100644
--- a/src/resources.rs
+++ b/src/resources.rs
@@ -42,6 +42,7 @@ const LAYOUT_NAMES: &[(*const str, *const str)] = &[
     ("de-DE", include_str!("../data/langs/de-DE.txt")),
     ("en-US", include_str!("../data/langs/en-US.txt")),
     ("es-ES", include_str!("../data/langs/es-ES.txt")),
+    ("ja-JP", include_str!("../data/langs/ja-JP.txt")),
     ("pl-PL", include_str!("../data/langs/pl-PL.txt")),
 ];
 
-- 
GitLab