From e1db0debdee4ccdff858f108a875964107b59926 Mon Sep 17 00:00:00 2001
From: CaTasTrOOf <benoit@besnard.biz>
Date: Fri, 4 Feb 2022 17:25:23 +0100
Subject: [PATCH] Add job to check I18N files

---
 .gitignore                             | 4 ----
 .gitlab-ci.yml                         | 7 +++++++
 components/navigation/menu/Sidebar.vue | 5 ++++-
 i18n/locales/es.json                   | 1 -
 nuxt.config.js                         | 6 ++++++
 package.json                           | 2 +-
 6 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index 60cde32..3fea6ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -89,7 +89,3 @@ sw.*
 
 # Vim swap files
 *.swp
-
-# Script generated files
-*.missing
-keysUsed
\ No newline at end of file
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 415dd58..cb4df10 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,12 @@
 image: node:16
 
+check-i18n-job:
+  stage: test
+  script:
+    - ./utils/findMissingI18nKeys.sh
+  only:
+    - merge_requests
+
 build-job:
   stage: build
   script:
diff --git a/components/navigation/menu/Sidebar.vue b/components/navigation/menu/Sidebar.vue
index 41f3737..15c6043 100644
--- a/components/navigation/menu/Sidebar.vue
+++ b/components/navigation/menu/Sidebar.vue
@@ -5,7 +5,10 @@
 				<img :src="$icon(512)" alt="Accueil" class="logo" />
 				<div>
 					<h1 class="h3">
-						Wotwizard <small><span class="small">v0.21</span></small>
+						Wotwizard
+						<small
+							><span class="small">v{{ $config.clientVersion }}</span></small
+						>
 					</h1>
 					<small class="text-muted">{{ $t("slogan") }}</small>
 				</div>
diff --git a/i18n/locales/es.json b/i18n/locales/es.json
index 6dd446b..d912558 100644
--- a/i18n/locales/es.json
+++ b/i18n/locales/es.json
@@ -100,7 +100,6 @@
 		"datelimpertestatut": "Pérdida de Membresía",
 		"datemanquecertifs": "Falta de certificaciones",
 		"desc": "Individuo cuya afiliación está en curso y que ha recibido las 5 certificaciones necesarias que le permitan respetar la regla de distanciamiento. Lo que le permite ser co-creador de la moneda a través de su Dividendo Universal",
-		"dispo": "Disponible",
 		"dispocertif": "Disponible para certificar",
 		"distance": {
 			"desc": "% de miembros referidos accesibles en 5 saltos o menos en la web de confianza. Para convertirse en miembro, debe recopilar al menos 5 certificaciones que le permitan llegar al 80% de los miembros de referencia en 5 saltos como máximo.",
diff --git a/nuxt.config.js b/nuxt.config.js
index ee308c5..db4170b 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -1,5 +1,6 @@
 import i18n from "./i18n"
 import webpack from "webpack"
+import pkg from "./package.json"
 
 export default {
 	// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
@@ -8,6 +9,11 @@ export default {
 	// Target: https://go.nuxtjs.dev/config-target
 	target: "static",
 
+	// Application version from package.json
+	publicRuntimeConfig: {
+		clientVersion: pkg.version
+	},
+
 	// Global page headers: https://go.nuxtjs.dev/config-head
 	head: {
 		title: "wotwizard-ui",
diff --git a/package.json b/package.json
index 63e0b61..5a12353 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
 	"name": "wotwizard-ui",
-	"version": "1.0.0",
+	"version": "0.21.0",
 	"private": true,
 	"scripts": {
 		"dev": "nuxt",
-- 
GitLab