Skip to content

Commit

Permalink
Add german language file
Browse files Browse the repository at this point in the history
  • Loading branch information
dkliemsch committed Feb 24, 2021
1 parent a20cfd4 commit 0c7f714
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 11 deletions.
32 changes: 23 additions & 9 deletions client/dist/autotranslateField.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({

/***/ "./client/src/lang/de.json":
/*!*********************************!*\
!*** ./client/src/lang/de.json ***!
\*********************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"field":{"translateCta":"Übersetze von {sourceLocale} auf {targetLocale}"},"modal":{"translateCta":"Jetzt übersetzen","headline":"Übersetze von {sourceLocale} auf {targetLocale}","sourceValueLabel":"Inhalt {locale}"},"google":{"pricingHint":"<strong>{charCount}</strong> Zeichen werden mit Google Cloud Translation übersetzt, Kosten Informationen finden Sie <a href=\\"https://cloud.google.com/translate/pricing#cloud-translation---basic\\" target=\\"_blank\\">in deren Dokumention</a>."}}');

/***/ }),

/***/ "./client/src/lang/en.json":
/*!*********************************!*\
!*** ./client/src/lang/en.json ***!
Expand Down Expand Up @@ -1852,29 +1863,32 @@ module.exports = {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.common.dev.js");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.common.dev.js");
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var src_App_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! src/App.vue */ "./client/src/js/App.vue");
/* harmony import */ var vue_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-i18n */ "./node_modules/vue-i18n/dist/vue-i18n.esm.js");
/* harmony import */ var vue_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-i18n */ "./node_modules/vue-i18n/dist/vue-i18n.esm.js");
/* harmony import */ var _lang_en_json__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lang/en.json */ "./client/src/lang/en.json");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./client/src/js/util.js");
/* harmony import */ var _lang_de_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lang/de.json */ "./client/src/lang/de.json");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./client/src/js/util.js");







var render = function render(el) {
vue__WEBPACK_IMPORTED_MODULE_3___default().use(vue_i18n__WEBPACK_IMPORTED_MODULE_4__.default);
vue__WEBPACK_IMPORTED_MODULE_4___default().use(vue_i18n__WEBPACK_IMPORTED_MODULE_5__.default);
var payload = JSON.parse(el.dataset.payload);
var i18n = new vue_i18n__WEBPACK_IMPORTED_MODULE_4__.default({
var i18n = new vue_i18n__WEBPACK_IMPORTED_MODULE_5__.default({
locale: payload.cmsLocale,
fallbackLocale: 'en',
messages: {
en: _lang_en_json__WEBPACK_IMPORTED_MODULE_1__
en: _lang_en_json__WEBPACK_IMPORTED_MODULE_1__,
de: _lang_de_json__WEBPACK_IMPORTED_MODULE_2__
}
});
new (vue__WEBPACK_IMPORTED_MODULE_3___default())({
new (vue__WEBPACK_IMPORTED_MODULE_4___default())({
i18n: i18n,
render: function render(h) {
return h(src_App_vue__WEBPACK_IMPORTED_MODULE_0__.default, {
Expand All @@ -1886,7 +1900,7 @@ var render = function render(el) {
}).$mount("#".concat(el.id));
};

(0,_util__WEBPACK_IMPORTED_MODULE_2__.default)('.level51-autotranslateFieldPlaceholder', function (el) {
(0,_util__WEBPACK_IMPORTED_MODULE_3__.default)('.level51-autotranslateFieldPlaceholder', function (el) {
setTimeout(function () {
render(el);
}, 1);
Expand Down
2 changes: 1 addition & 1 deletion client/dist/autotranslateField.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/src/js/autotranslateField.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Vue from 'vue';
import AjaxSelectField from 'src/App.vue';
import VueI18n from 'vue-i18n';
import en from '../lang/en.json';
import de from '../lang/de.json';
import watchElement from './util';

const render = (el) => {
Expand All @@ -12,7 +13,7 @@ const render = (el) => {
const i18n = new VueI18n({
locale: payload.cmsLocale,
fallbackLocale: 'en',
messages: { en }
messages: { en, de }
});

new Vue({
Expand Down
13 changes: 13 additions & 0 deletions client/src/lang/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"field": {
"translateCta": "Übersetze von {sourceLocale} auf {targetLocale}"
},
"modal": {
"translateCta": "Jetzt übersetzen",
"headline": "Übersetze von {sourceLocale} auf {targetLocale}",
"sourceValueLabel": "Inhalt {locale}"
},
"google": {
"pricingHint": "<strong>{charCount}</strong> Zeichen werden mit Google Cloud Translation übersetzt, Kosten Informationen finden Sie <a href=\"https://cloud.google.com/translate/pricing#cloud-translation---basic\" target=\"_blank\">in deren Dokumention</a>."
}
}

0 comments on commit 0c7f714

Please sign in to comment.