Commit a018ba51 authored by Korko's avatar Korko
Browse files

Rework translation system

parent 4086c89b
Pipeline #232587 passed with stage
in 1 minute and 57 seconds
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "47a0b2439cdc12e8dddeec7a29479d11",
"content-hash": "49333656f1481a17236b225a165833bc",
"packages": [
{
"name": "anhskohbo/no-captcha",
......@@ -1480,9 +1480,9 @@
"authors": [
{
"name": "Marc Qualie",
"role": "Developer",
"email": "marc@marcqualie.com",
"homepage": "http://marcqualie.com",
"role": "Developer"
"homepage": "http://marcqualie.com"
}
],
"description": "A simple library for working with StatsD in PHP.",
......@@ -4691,6 +4691,61 @@
],
"time": "2016-01-20T08:20:44+00:00"
},
{
"name": "martinlindhe/laravel-vue-i18n-generator",
"version": "0.1.46",
"source": {
"type": "git",
"url": "https://github.com/martinlindhe/laravel-vue-i18n-generator.git",
"reference": "ddc52890f0204dff64d25e30c3473332904c6138"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/martinlindhe/laravel-vue-i18n-generator/zipball/ddc52890f0204dff64d25e30c3473332904c6138",
"reference": "ddc52890f0204dff64d25e30c3473332904c6138",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
"illuminate/console": "~5.1.0|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0|~7.0",
"illuminate/support": "~5.1.0|~5.2.0|~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0|~7.0",
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "~4.7"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"MartinLindhe\\VueInternationalizationGenerator\\GeneratorProvider"
]
}
},
"autoload": {
"psr-4": {
"MartinLindhe\\VueInternationalizationGenerator\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Martin Lindhe",
"email": "martin@ubique.se"
}
],
"description": "Generates a vue-i18n compatible include file from your Laravel translations.",
"homepage": "http://github.com/martinlindhe/laravel-vue-i18n-generator",
"keywords": [
"laravel",
"vue-i18n"
],
"time": "2020-03-10T18:55:52+00:00"
},
{
"name": "matt-allan/laravel-code-style",
"version": "0.6.0",
......@@ -4759,7 +4814,7 @@
"psr-2"
],
"support": {
"source": "https://github.com/Korko/laravel-code-style/tree/0.6.0"
"source": "https://github.com/Korko/laravel-code-style/tree/master"
},
"time": "2020-03-04T14:05:18+00:00"
},
......
<?php
return [
/*
|--------------------------------------------------------------------------
| Laravel translations path
|--------------------------------------------------------------------------
|
| The default path where the translations are stored by Laravel.
| Note: the path will be prepended to point to the App directory.
|
*/
'langPath' => '/resources/lang',
/*
|--------------------------------------------------------------------------
| Laravel translation files
|--------------------------------------------------------------------------
|
| You can choose which translation files to be generated.
| Note: leave this empty for all the translation files to be generated.
|
*/
'langFiles' => [
'common',
'form',
'organizer',
'dearsanta'
],
/*
|--------------------------------------------------------------------------
| Excluded files & folders
|--------------------------------------------------------------------------
|
| Exclude translation files, generic files or folders you don't need.
|
*/
'excludes' => [
/*
'validation',
'example.file',
'example-folder',
*/
],
/*
|--------------------------------------------------------------------------
| Output file
|--------------------------------------------------------------------------
|
| The javascript path where I will place the generated file.
| Note: the path will be prepended to point to the App directory.
|
*/
'jsPath' => '/resources/js/langs/',
'jsFile' => '/resources/js/vue-i18n-locales.generated.js',
/*
|--------------------------------------------------------------------------
| i18n library
|--------------------------------------------------------------------------
|
| Specify the library you use for localization.
| Options are vue-i18n or vuex-i18n.
|
*/
'i18nLib' => 'vue-i18n',
/*
|--------------------------------------------------------------------------
| Output messages
|--------------------------------------------------------------------------
|
| Specify if the library should show "written to" messages
| after generating json files.
|
*/
'showOutputMessages' => false,
/*
|--------------------------------------------------------------------------
| Escape character
|--------------------------------------------------------------------------
|
| Allows to escape translations strings that should not be treated as a
| variable
|
*/
'escape_char' => '!',
];
......@@ -6687,12 +6687,6 @@
"is-buffer": "^1.1.5"
}
},
"lang.js": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/lang.js/-/lang.js-1.1.14.tgz",
"integrity": "sha512-HsNKw3b7tYHwDQux3lQtbLGAntwJ5fl8Pl1BPXTKu+gdpaZsK9d787yFmLi6/LSXeNSgPO1CjZDKkrrPsERbSw==",
"dev": true
},
"laravel-localization-loader": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/laravel-localization-loader/-/laravel-localization-loader-1.0.5.tgz",
......@@ -14179,6 +14173,11 @@
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
"dev": true
},
"vue-i18n": {
"version": "8.16.0",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.16.0.tgz",
"integrity": "sha512-cp9JOsx4ETzlCsnD22FE8ZhAmD8kcyNLRKV0DPsS7bBNTCdIlOKuyTGonWKYcGCUtNMtwemDWRBevRm8eevBVg=="
},
"vue-loader": {
"version": "15.7.2",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.7.2.tgz",
......
......@@ -27,7 +27,6 @@
"jquery-ui": "^1.12.1",
"jquery.actual": "github:dreamerslab/jquery.actual#master",
"jquery.scrollto": "^2.1.2",
"lang.js": "^1.1.14",
"laravel-localization-loader": "^1.0.5",
"laravel-mix": "^4.1.4",
"laravel-mix-modernizr": "^1.0.1",
......@@ -53,5 +52,7 @@
"vuelidate": "^0.7.5",
"vuex": "^3.1.2"
},
"dependencies": {}
"dependencies": {
"vue-i18n": "^8.16.0"
}
}
......@@ -14215,8 +14215,9 @@ fieldset > div.form-group {
line-height: 34px;
}
#form-options label > input {
margin-left: 10px;
.input-inline-group {
position: relative;
display: inline-block;
}
.table-bordered.heavy-borders,
......
......@@ -9,36 +9,22 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol */ "./node_modules/core-js/modules/es.symbol.js");
/* harmony import */ var core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.filter */ "./node_modules/core-js/modules/es.array.filter.js");
/* harmony import */ var core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.find */ "./node_modules/core-js/modules/es.array.find.js");
/* harmony import */ var core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.for-each */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.map */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.sort */ "./node_modules/core-js/modules/es.array.sort.js");
/* harmony import */ var core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_es_date_to_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.date.to-string */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var core_js_modules_es_object_define_properties__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.define-properties */ "./node_modules/core-js/modules/es.object.define-properties.js");
/* harmony import */ var core_js_modules_es_object_define_properties__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_properties__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var core_js_modules_es_object_define_property__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.object.define-property */ "./node_modules/core-js/modules/es.object.define-property.js");
/* harmony import */ var core_js_modules_es_object_define_property__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_define_property__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.object.keys */ "./node_modules/core-js/modules/es.object.keys.js");
/* harmony import */ var core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var core_js_modules_es_object_values__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.values */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
/* harmony import */ var _form_vue__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./form.vue */ "./resources/js/components/form.vue");
/* harmony import */ var core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.find */ "./node_modules/core-js/modules/es.array.find.js");
/* harmony import */ var core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.for-each */ "./node_modules/core-js/modules/es.array.for-each.js");
/* harmony import */ var core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_for_each__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.array.map */ "./node_modules/core-js/modules/es.array.map.js");
/* harmony import */ var core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.sort */ "./node_modules/core-js/modules/es.array.sort.js");
/* harmony import */ var core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_sort__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_date_to_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.date.to-string */ "./node_modules/core-js/modules/es.date.to-string.js");
/* harmony import */ var core_js_modules_es_date_to_string__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_date_to_string__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var core_js_modules_es_object_values__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.values */ "./node_modules/core-js/modules/es.object.values.js");
/* harmony import */ var core_js_modules_es_object_values__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
/* harmony import */ var core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
/* harmony import */ var _form_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./form.vue */ "./resources/js/components/form.vue");
......@@ -48,23 +34,9 @@ __webpack_require__.r(__webpack_exports__);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/* harmony default export */ __webpack_exports__["default"] = ({
extends: _form_vue__WEBPACK_IMPORTED_MODULE_15__["default"],
computed: _objectSpread({
extends: _form_vue__WEBPACK_IMPORTED_MODULE_8__["default"],
computed: {
emails: function emails() {
return Object.values(this.data.emails).sort(function (email1, email2) {
return new Date(email1.created_at) > new Date(email2.created_at) ? -1 : 1;
......@@ -78,7 +50,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
return email.delivery_status === 'created';
});
}
}, Object(vuex__WEBPACK_IMPORTED_MODULE_14__["mapState"])(['lang'])),
},
created: function created() {
var _this = this;
......@@ -143,7 +115,7 @@ var render = function() {
_c("fieldset", [
_c("div", { staticClass: "form-group" }, [
_c("label", { attrs: { for: "mailContent" } }, [
_vm._v("Contenu du mail")
_vm._v(_vm._s(_vm.$t("dearsanta.content.label")))
]),
_vm._v(" "),
_c("textarea", {
......@@ -152,7 +124,7 @@ var render = function() {
id: "mailContent",
name: "content",
required: "",
placeholder: "Cher Papa Noël..."
placeholder: _vm.$t("dearsanta.content.placeholder")
}
})
])
......@@ -166,7 +138,7 @@ var render = function() {
_c("th", { attrs: { scope: "col" } }, [
_vm._v(
"\n " +
_vm._s(_vm.lang.get("dearsanta.list.date")) +
_vm._s(_vm.$t("dearsanta.list.date")) +
"\n "
)
]),
......@@ -174,7 +146,7 @@ var render = function() {
_c("th", { attrs: { scope: "col" } }, [
_vm._v(
"\n " +
_vm._s(_vm.lang.get("dearsanta.list.body")) +
_vm._s(_vm.$t("dearsanta.list.body")) +
"\n "
)
]),
......@@ -182,7 +154,7 @@ var render = function() {
_c("th", { attrs: { scope: "col" } }, [
_vm._v(
"\n " +
_vm._s(_vm.lang.get("dearsanta.list.status")) +
_vm._s(_vm.$t("dearsanta.list.status")) +
"\n "
)
])
......@@ -207,7 +179,7 @@ var render = function() {
_c("td", { attrs: { colspan: "3" } }, [
_vm._v(
"\n " +
_vm._s(_vm.lang.get("dearsanta.list.empty")) +
_vm._s(_vm.$t("dearsanta.list.empty")) +
"\n "
)
])
......@@ -308,13 +280,24 @@ __webpack_require__.r(__webpack_exports__);
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.common.js");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _components_dearSantaForm_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/dearSantaForm.vue */ "./resources/js/components/dearSantaForm.vue");
/* harmony import */ var _mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mixins/vueFetcher.js */ "./resources/js/mixins/vueFetcher.js");
/* harmony import */ var vue_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-i18n */ "./node_modules/vue-i18n/dist/vue-i18n.esm.js");
/* harmony import */ var _vue_i18n_locales_generated_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vue-i18n-locales.generated.js */ "./resources/js/vue-i18n-locales.generated.js");
/* harmony import */ var _components_dearSantaForm_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/dearSantaForm.vue */ "./resources/js/components/dearSantaForm.vue");
/* harmony import */ var _mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mixins/vueFetcher.js */ "./resources/js/mixins/vueFetcher.js");
vue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vue_i18n__WEBPACK_IMPORTED_MODULE_1__["default"]);
var lang = document.documentElement.lang.substr(0, 2);
var i18n = new vue_i18n__WEBPACK_IMPORTED_MODULE_1__["default"]({
locale: lang,
messages: _vue_i18n_locales_generated_js__WEBPACK_IMPORTED_MODULE_2__["default"]
});
window.app = new vue__WEBPACK_IMPORTED_MODULE_0___default.a({
mixins: [Object(_mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_2__["VueFetcher"])(_components_dearSantaForm_vue__WEBPACK_IMPORTED_MODULE_1__["default"])]
mixins: [Object(_mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_4__["VueFetcher"])(_components_dearSantaForm_vue__WEBPACK_IMPORTED_MODULE_3__["default"])],
i18n: i18n
});
/***/ }),
......
......@@ -280,7 +280,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
return participant.delivery_status === 'created';
});
}
}, Object(vuex__WEBPACK_IMPORTED_MODULE_12__["mapState"])(['csrf', 'key', 'lang'])),
}, Object(vuex__WEBPACK_IMPORTED_MODULE_12__["mapState"])(['csrf', 'key'])),
created: function created() {
var _this = this;
......@@ -653,7 +653,7 @@ var render = function() {
_c("th", { attrs: { scope: "col" } }, [
_vm._v(
"\n " +
_vm._s(_vm.lang.get("organizer.list.name")) +
_vm._s(_vm.$t("organizer.list.name")) +
"\n "
)
]),
......@@ -661,7 +661,7 @@ var render = function() {
_c("th", { attrs: { scope: "col" } }, [
_vm._v(
"\n " +
_vm._s(_vm.lang.get("organizer.list.email")) +
_vm._s(_vm.$t("organizer.list.email")) +
"\n "
)
]),
......@@ -669,7 +669,7 @@ var render = function() {
_c("th", { attrs: { scope: "col" } }, [
_vm._v(
"\n " +
_vm._s(_vm.lang.get("organizer.list.status")) +
_vm._s(_vm.$t("organizer.list.status")) +
"\n "
)
])
......@@ -888,13 +888,24 @@ __webpack_require__.r(__webpack_exports__);
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.common.js");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _components_organizerForm_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/organizerForm.vue */ "./resources/js/components/organizerForm.vue");
/* harmony import */ var _mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mixins/vueFetcher.js */ "./resources/js/mixins/vueFetcher.js");
/* harmony import */ var vue_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-i18n */ "./node_modules/vue-i18n/dist/vue-i18n.esm.js");
/* harmony import */ var _vue_i18n_locales_generated_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./vue-i18n-locales.generated.js */ "./resources/js/vue-i18n-locales.generated.js");
/* harmony import */ var _components_organizerForm_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/organizerForm.vue */ "./resources/js/components/organizerForm.vue");
/* harmony import */ var _mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mixins/vueFetcher.js */ "./resources/js/mixins/vueFetcher.js");
vue__WEBPACK_IMPORTED_MODULE_0___default.a.use(vue_i18n__WEBPACK_IMPORTED_MODULE_1__["default"]);
var lang = document.documentElement.lang.substr(0, 2);
var i18n = new vue_i18n__WEBPACK_IMPORTED_MODULE_1__["default"]({
locale: lang,
messages: _vue_i18n_locales_generated_js__WEBPACK_IMPORTED_MODULE_2__["default"]
});
window.app = new vue__WEBPACK_IMPORTED_MODULE_0___default.a({
mixins: [Object(_mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_2__["VueFetcher"])(_components_organizerForm_vue__WEBPACK_IMPORTED_MODULE_1__["default"])]
mixins: [Object(_mixins_vueFetcher_js__WEBPACK_IMPORTED_MODULE_4__["VueFetcher"])(_components_organizerForm_vue__WEBPACK_IMPORTED_MODULE_3__["default"])],
i18n: i18n
});
/***/ }),
......
This diff is collapsed.
This diff is collapsed.
......@@ -41,7 +41,7 @@
});
return errors;
},
...mapState(['csrf', 'key', 'lang'])
...mapState(['csrf', 'key'])
},
watch: {
sending() {
......@@ -117,9 +117,9 @@
</div>
<button type="submit" class="btn btn-primary btn-lg">
<span v-if="sent"><span class="fas fa-check-circle" /> {{ button_sent || lang.get('form.sent') }}</span>
<span v-else-if="sending"><span class="fas fa-spinner" /> {{ button_sending || lang.get('form.sending') }}</span>
<span v-else>{{ button_send || lang.get('form.send') }}</span>
<span v-if="sent"><span class="fas fa-check-circle" /> {{ button_sent || $t('common.form.sent') }}</span>
<span v-else-if="sending"><span class="fas fa-spinner" /> {{ button_sending || $t('common.form.sending') }}</span>
<span v-else>{{ button_send || $t('common.form.send') }}</span>
</button>
</fieldset>
</form>
......
......@@ -3,7 +3,6 @@
import Modal from './modal.vue';
export default {
components: { Modal },
computed: mapState(['lang']),
methods: {
emitSubmit: function() {
this.$emit('import', $('#uploadCsv input[type=file]')[0].files[0]);
......@@ -19,7 +18,7 @@
<template>
<modal @close="$emit('close')">
<template #header>
<h3>{{ lang.get('form.csv.title') }}</h3>
<h3>{{ $t('form.csv.title') }}</h3>
</template>
<template #body>
......@@ -27,7 +26,7 @@
<span class="fas fa-question-cirle" />
<span
v-html="
lang.get('form.csv.help', {
$t('form.csv.help', {
excel:
'<a href=\'https://support.office.com/fr-fr/article/Importer-ou-exporter-des-fichiers-texte-txt-ou-csv-5250ac4c-663c-47ce-937b-339e391393ba\' class=\'alert-link\'>',
calc:
......@@ -38,19 +37,19 @@
/>
</div>
{{ lang.get('form.csv.format') }}
{{ $t('form.csv.format') }}
<table class="table table-bordered heavy-borders">
<tbody>
<tr>
<td>{{ lang.get('form.csv.column1') }}</td>
<td>{{ lang.get('form.csv.column2') }}</td>
<td>{{ lang.get('form.csv.column3') }}</td>
<td>{{ $t('form.csv.column1') }}</td>
<td>{{ $t('form.csv.column2') }}</td>
<td>{{ $t('form.csv.column3') }}</td>
</tr>
</tbody>
</table>
<div class="alert alert-danger" role="alert">
{{ lang.get('form.csv.warning') }}
{{ $t('form.csv.warning') }}
</div>
<form id="uploadCsv" @submit.prevent="emitSubmit" @reset="emitCancel">
......@@ -62,12 +61,12 @@
<!-- Duplicate emitCancel onclick and onreset on the form for browser not handler form attribute on buttons -->
<button type="reset" form="uploadCsv" class="btn btn-warning" @click="emitCancel">
<span class="fas fa-stop-circle" />
{{ lang.get('form.csv.cancel') }}
{{ $t('form.csv.cancel') }}
</button>
<!-- Duplicate emitSubmit onclick and onsubmit on the form for browser not handler form attribute on buttons -->
<button type="submit" form="uploadCsv" class="btn btn-primary" @click="emitSubmit">
<span class="fas fa-upload" />
{{ lang.get('form.csv.import') }}
{{ $t('form.csv.import') }}
</button>
</template>
</modal>
......
......@@ -16,8 +16,7 @@
},
checkUpdates() {
return !!Object.values(this.data.emails).find(email => email.delivery_status === 'created');
},
...mapState(['lang'])
}
},
created() {
setInterval(() => {
......@@ -57,12 +56,12 @@
<ajax-form :action="`/dearsanta/${data.santa.id}/send`" @success="success">
<fieldset>
<div class="form-group">
<label for="mailContent">Contenu du mail</label>
<label for="mailContent">{{ $t('dearsanta.content.label') }}</label>
<textarea
id="mailContent"
name="content"
required
placeholder="Cher Papa Noël..."
:placeholder="$t('dearsanta.content.placeholder')"
class="form-control"
/>
</div>
......@@ -72,13 +71,13 @@
<thead>
<tr class="table-active">
<th scope="col">
{{ lang.get('dearsanta.list.date') }}
{{ $t('dearsanta.list.date') }}
</th>
<th scope="col">
{{ lang.get('dearsanta.list.body') }}
{{ $t('dearsanta.list.body') }}
</th>
<th scope="col">
{{ lang.get('dearsanta.list.status') }}
{{ $t('dearsanta.list.status') }}
</th>