Commit 21613407 authored by ZeMKI's avatar ZeMKI
Browse files

solved problem with translations

* temporary solution for upgrading to tailwind 3
* a better long-term solution still need to be developed
parent 311bde02
......@@ -28,8 +28,9 @@ public/mix-manifest.json
.idea/
/resources/lang/
composer.lock
public/vendor/livewire/manifest.json
public/vendor/livewire/livewire.js.map
ray.php
de : Um eine neue Studie zu erstellen, sollten Sie einige allgemeine Informationen angeben, ein Sortierschema nach Wunsch auswählen und evtl. zusätzliche Fragen einrichten. Um zwischen diesen Optionen zu navigieren, verwenden Sie bitte die drei entsprechenden Tabs. en : To create a new study, you should provide some general information, choose a sorting scheme you wish to use and can add additional questions for your interviewees. To navigate between these options please use the three tabs provided below. da : No translation.
\ No newline at end of file
......@@ -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": "94fd291ca65a38ea1035216964222ef6",
"content-hash": "17fe3fec5f84d4e664f4911f2745bee9",
"packages": [
{
"name": "alessandrobelli/lingua",
......@@ -1287,16 +1287,16 @@
},
{
"name": "laravel/framework",
"version": "v8.83.0",
"version": "v8.83.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "29bc8779103909ebc428478b339ee6fa8703e193"
"reference": "bddba117f8bce2f3c9875ca1ca375a96350d0f4d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/29bc8779103909ebc428478b339ee6fa8703e193",
"reference": "29bc8779103909ebc428478b339ee6fa8703e193",
"url": "https://api.github.com/repos/laravel/framework/zipball/bddba117f8bce2f3c9875ca1ca375a96350d0f4d",
"reference": "bddba117f8bce2f3c9875ca1ca375a96350d0f4d",
"shasum": ""
},
"require": {
......@@ -1456,20 +1456,20 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
"time": "2022-02-08T15:44:51+00:00"
"time": "2022-02-15T15:05:20+00:00"
},
{
"name": "laravel/serializable-closure",
"version": "v1.1.0",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/serializable-closure.git",
"reference": "65c9faf50d567b65d81764a44526545689e3fe63"
"reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/65c9faf50d567b65d81764a44526545689e3fe63",
"reference": "65c9faf50d567b65d81764a44526545689e3fe63",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/9e4b005daa20b0c161f3845040046dc9ddc1d74e",
"reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e",
"shasum": ""
},
"require": {
......@@ -1515,20 +1515,20 @@
"issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure"
},
"time": "2022-02-01T16:29:39+00:00"
"time": "2022-02-11T19:23:53+00:00"
},
{
"name": "laravel/telescope",
"version": "v4.7.2",
"version": "v4.7.3",
"source": {
"type": "git",
"url": "https://github.com/laravel/telescope.git",
"reference": "2baeb9313ce3cfd213b23b52dbaf61615a44f907"
"reference": "f91e7d068d3754575388b990332d0aad8d7ac7d1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/telescope/zipball/2baeb9313ce3cfd213b23b52dbaf61615a44f907",
"reference": "2baeb9313ce3cfd213b23b52dbaf61615a44f907",
"url": "https://api.github.com/repos/laravel/telescope/zipball/f91e7d068d3754575388b990332d0aad8d7ac7d1",
"reference": "f91e7d068d3754575388b990332d0aad8d7ac7d1",
"shasum": ""
},
"require": {
......@@ -1539,6 +1539,7 @@
},
"require-dev": {
"ext-gd": "*",
"guzzlehttp/guzzle": "^6.0|^7.0",
"orchestra/testbench": "^6.0|^7.0"
},
"type": "library",
......@@ -1580,9 +1581,9 @@
],
"support": {
"issues": "https://github.com/laravel/telescope/issues",
"source": "https://github.com/laravel/telescope/tree/v4.7.2"
"source": "https://github.com/laravel/telescope/tree/v4.7.3"
},
"time": "2022-02-04T07:19:09+00:00"
"time": "2022-02-14T17:29:12+00:00"
},
{
"name": "laravel/tinker",
......@@ -1654,16 +1655,16 @@
},
{
"name": "laravel/ui",
"version": "v3.4.3",
"version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/laravel/ui.git",
"reference": "64a0f43492c00780b2261c56cd7007a4f370d95b"
"reference": "1596de849ecafc0bcc891389da939012b67f9d5c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/ui/zipball/64a0f43492c00780b2261c56cd7007a4f370d95b",
"reference": "64a0f43492c00780b2261c56cd7007a4f370d95b",
"url": "https://api.github.com/repos/laravel/ui/zipball/1596de849ecafc0bcc891389da939012b67f9d5c",
"reference": "1596de849ecafc0bcc891389da939012b67f9d5c",
"shasum": ""
},
"require": {
......@@ -1709,9 +1710,9 @@
"ui"
],
"support": {
"source": "https://github.com/laravel/ui/tree/v3.4.3"
"source": "https://github.com/laravel/ui/tree/v3.4.4"
},
"time": "2022-02-08T14:19:32+00:00"
"time": "2022-02-10T22:38:33+00:00"
},
{
"name": "league/commonmark",
......@@ -2051,16 +2052,16 @@
},
{
"name": "livewire/livewire",
"version": "v2.10.3",
"version": "v2.10.4",
"source": {
"type": "git",
"url": "https://github.com/livewire/livewire.git",
"reference": "f7150a3d0386c1d41f51b73a161e3d3e24db5812"
"reference": "2d68c61a8edf338534fdd8e2b2750dca2e741439"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/livewire/livewire/zipball/f7150a3d0386c1d41f51b73a161e3d3e24db5812",
"reference": "f7150a3d0386c1d41f51b73a161e3d3e24db5812",
"url": "https://api.github.com/repos/livewire/livewire/zipball/2d68c61a8edf338534fdd8e2b2750dca2e741439",
"reference": "2d68c61a8edf338534fdd8e2b2750dca2e741439",
"shasum": ""
},
"require": {
......@@ -2112,7 +2113,7 @@
"description": "A front-end framework for Laravel.",
"support": {
"issues": "https://github.com/livewire/livewire/issues",
"source": "https://github.com/livewire/livewire/tree/v2.10.3"
"source": "https://github.com/livewire/livewire/tree/v2.10.4"
},
"funding": [
{
......@@ -2120,7 +2121,7 @@
"type": "github"
}
],
"time": "2022-02-14T16:44:21+00:00"
"time": "2022-02-18T22:35:27+00:00"
},
{
"name": "maatwebsite/excel",
......@@ -2539,16 +2540,16 @@
},
{
"name": "nesbot/carbon",
"version": "2.56.0",
"version": "2.57.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
"reference": "626ec8cbb724cd3c3400c3ed8f730545b744e3f4"
"reference": "4a54375c21eea4811dbd1149fe6b246517554e78"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/626ec8cbb724cd3c3400c3ed8f730545b744e3f4",
"reference": "626ec8cbb724cd3c3400c3ed8f730545b744e3f4",
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a54375c21eea4811dbd1149fe6b246517554e78",
"reference": "4a54375c21eea4811dbd1149fe6b246517554e78",
"shasum": ""
},
"require": {
......@@ -2631,7 +2632,7 @@
"type": "tidelift"
}
],
"time": "2022-01-21T17:08:38+00:00"
"time": "2022-02-13T18:13:33+00:00"
},
{
"name": "nette/schema",
......@@ -3054,16 +3055,16 @@
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.21.0",
"version": "1.22.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "1a359d2ccbb89c05f5dffb32711a95f4afc67964"
"reference": "3a9e29b4f386a08a151a33578e80ef1747037a48"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/1a359d2ccbb89c05f5dffb32711a95f4afc67964",
"reference": "1a359d2ccbb89c05f5dffb32711a95f4afc67964",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/3a9e29b4f386a08a151a33578e80ef1747037a48",
"reference": "3a9e29b4f386a08a151a33578e80ef1747037a48",
"shasum": ""
},
"require": {
......@@ -3094,7 +3095,7 @@
"dompdf/dompdf": "^1.0",
"friendsofphp/php-cs-fixer": "^3.2",
"jpgraph/jpgraph": "^4.0",
"mpdf/mpdf": "^8.0",
"mpdf/mpdf": "8.0.17",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan-phpunit": "^1.0",
......@@ -3152,9 +3153,9 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.21.0"
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.22.0"
},
"time": "2022-01-06T11:10:08+00:00"
"time": "2022-02-18T12:57:07+00:00"
},
{
"name": "phpoption/phpoption",
......@@ -4052,16 +4053,16 @@
},
{
"name": "spatie/laravel-ray",
"version": "1.29.2",
"version": "1.29.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-ray.git",
"reference": "6465e1fe7faefdd66aede0952033863181548551"
"reference": "440cda76812a7770e6684d19683444c608e135e4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-ray/zipball/6465e1fe7faefdd66aede0952033863181548551",
"reference": "6465e1fe7faefdd66aede0952033863181548551",
"url": "https://api.github.com/repos/spatie/laravel-ray/zipball/440cda76812a7770e6684d19683444c608e135e4",
"reference": "440cda76812a7770e6684d19683444c608e135e4",
"shasum": ""
},
"require": {
......@@ -4120,7 +4121,7 @@
],
"support": {
"issues": "https://github.com/spatie/laravel-ray/issues",
"source": "https://github.com/spatie/laravel-ray/tree/1.29.2"
"source": "https://github.com/spatie/laravel-ray/tree/1.29.3"
},
"funding": [
{
......@@ -4132,7 +4133,7 @@
"type": "other"
}
],
"time": "2022-02-13T15:39:44+00:00"
"time": "2022-02-15T14:52:59+00:00"
},
{
"name": "spatie/laravel-webhook-server",
......@@ -8624,16 +8625,16 @@
},
{
"name": "phar-io/version",
"version": "3.1.1",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
"reference": "15a90844ad40f127afd244c0cad228de2a80052a"
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/15a90844ad40f127afd244c0cad228de2a80052a",
"reference": "15a90844ad40f127afd244c0cad228de2a80052a",
"url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": ""
},
"require": {
......@@ -8669,9 +8670,9 @@
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.1.1"
"source": "https://github.com/phar-io/version/tree/3.2.1"
},
"time": "2022-02-07T21:56:48+00:00"
"time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpdocumentor/reflection-common",
......@@ -8902,16 +8903,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.10",
"version": "9.2.11",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "d5850aaf931743067f4bfc1ae4cbd06468400687"
"reference": "665a1ac0a763c51afc30d6d130dac0813092b17f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687",
"reference": "d5850aaf931743067f4bfc1ae4cbd06468400687",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f",
"reference": "665a1ac0a763c51afc30d6d130dac0813092b17f",
"shasum": ""
},
"require": {
......@@ -8967,7 +8968,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11"
},
"funding": [
{
......@@ -8975,7 +8976,7 @@
"type": "github"
}
],
"time": "2021-12-05T09:12:13+00:00"
"time": "2022-02-18T12:46:09+00:00"
},
{
"name": "phpunit/php-file-iterator",
......@@ -9220,16 +9221,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.13",
"version": "9.5.14",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "597cb647654ede35e43b137926dfdfef0fb11743"
"reference": "1883687169c017d6ae37c58883ca3994cfc34189"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/597cb647654ede35e43b137926dfdfef0fb11743",
"reference": "597cb647654ede35e43b137926dfdfef0fb11743",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189",
"reference": "1883687169c017d6ae37c58883ca3994cfc34189",
"shasum": ""
},
"require": {
......@@ -9307,7 +9308,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.13"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14"
},
"funding": [
{
......@@ -9319,7 +9320,7 @@
"type": "github"
}
],
"time": "2022-01-24T07:33:35+00:00"
"time": "2022-02-18T12:54:07+00:00"
},
{
"name": "psr/cache",
......
This diff is collapsed.
This diff is collapsed.
{"/livewire.js":"/livewire.js?id=a3766c6f9aadee9b7977"}
\ No newline at end of file
{"/livewire.js":"/livewire.js?id=940557fc56b15ccb9a2d"}
\ No newline at end of file
......@@ -25,8 +25,15 @@ if (process.env.MIX_ENV_MODE === "production") {
window.Vue.config.silent = false;
}
Vue.prototype.trans = key =>
_.isUndefined(window.trans[key]) ? key : window.trans[key];
Vue.prototype.trans = (key) => {
console.log(_.isUndefined(window.trans[key]));
if (_.isUndefined(window.trans[key])) {
return key;
} else {
if (window.trans[key] === "") return key;
return window.trans[key];
}
};
/**
* Next, we will create a fresh Vue application instance and attach it to
......@@ -42,17 +49,18 @@ Vue.mixin({
data() {
return {
productionUrl:
process.env.MIX_ENV_MODE === "production" ? "/mesort" : ""
process.env.MIX_ENV_MODE === "production" ? "/mesort" : "",
};
},
computed: {
url: function() {
url: function () {
return document.URL.split("/").pop();
}
},
},
methods: {
checkPassword() {
this.registration.password_length = this.registration.password.length;
this.registration.password_length =
this.registration.password.length;
const special_chars = /[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/;
if (this.registration.password_length > 5) {
this.registration.contains_six_characters = true;
......@@ -78,7 +86,7 @@ Vue.mixin({
this.registration.valid_password = false;
}
},
copyObject: function(obj) {
copyObject: function (obj) {
let objCopy = obj.slice();
for (let i = 0; i < objCopy.length; i++) {
let tempObj = Object.assign({}, objCopy[i]);
......@@ -87,7 +95,7 @@ Vue.mixin({
return objCopy;
},
getCookie: function(cname) {
getCookie: function (cname) {
let name = cname + "=";
let ca = document.cookie.split(";");
for (let i = 0; i < ca.length; i++) {
......@@ -101,16 +109,16 @@ Vue.mixin({
}
return "";
},
setCookie: function(cname, cvalue, exdays) {
setCookie: function (cname, cvalue, exdays) {
let d = new Date();
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
let expires = "expires=" + d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
},
deleteCookie: function(name) {
deleteCookie: function (name) {
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;";
},
confirmdelete: function(id, name) {
confirmdelete: function (id, name) {
let self = this;
this.$buefy.dialog.confirm({
title: self.trans("Confirm Delete"),
......@@ -121,24 +129,24 @@ Vue.mixin({
cancelText: self.trans("Cancel"),
confirmText: self.trans("Delete"),
type: "is-danger",
onConfirm: () => this.deletestudy(id)
onConfirm: () => this.deletestudy(id),
});
},
deletestudy: function(id) {
deletestudy: function (id) {
this.loading = true;
this.message = "";
let self = this;
axios
.delete("studies/" + id, { data: id })
.then(response => {
setTimeout(function() {
.then((response) => {
setTimeout(function () {
self.loading = false;
self.$buefy.snackbar.open(self.trans("Study deleted"));
window.location.href = "../mesort";
}, 500);
})
.catch(function(error) {
.catch(function (error) {
self.loading = false;
self.$buefy.snackbar.open(
self.trans(
......@@ -147,10 +155,10 @@ Vue.mixin({
);
});
},
goto: function(url) {
goto: function (url) {
window.location.href = url;
}
}
},
},
});
window.app = new Vue({
......@@ -161,24 +169,25 @@ window.app = new Vue({
ArrowLeft,
Caret,
homeicon,
Read
Read,
},
store,
computed: {
...mapState({
interviewpagenames: state => state.newinterview.pagenames,
interviewpage: state => state.newinterview.page,
buttonnames: state => state.newinterview.buttonnames,
sorting: state => state.newinterview.sorting,
sortingtotal: state => state.newinterview.sortingtotal,
presortQuestions: state => state.newinterview.presortQuestions,
postsortQuestions: state => state.newinterview.postsortQuestions,
sortingType: state => state.newinterview.sortingType,
toggleCards: state => state.newinterview.toggleCards,
selectedToken: state => state.newinterview.selectedToken,
qsortSizeIndex: state => state.newinterview.qsortSizeIndex,
qsortDistanceIndex: state => state.newinterview.qsortDistanceIndex
})
interviewpagenames: (state) => state.newinterview.pagenames,
interviewpage: (state) => state.newinterview.page,
buttonnames: (state) => state.newinterview.buttonnames,
sorting: (state) => state.newinterview.sorting,
sortingtotal: (state) => state.newinterview.sortingtotal,
presortQuestions: (state) => state.newinterview.presortQuestions,
postsortQuestions: (state) => state.newinterview.postsortQuestions,
sortingType: (state) => state.newinterview.sortingType,
toggleCards: (state) => state.newinterview.toggleCards,
selectedToken: (state) => state.newinterview.selectedToken,
qsortSizeIndex: (state) => state.newinterview.qsortSizeIndex,
qsortDistanceIndex: (state) =>
state.newinterview.qsortDistanceIndex,
}),
},
data: {
newstudy: {},
......@@ -187,12 +196,12 @@ window.app = new Vue({
showmodal: false,
edituser: 0,
study: 0,
activeTab: 0
activeTab: 0,
},
interview: {
interviewed: "",
study: "",
url: ""
url: "",
},
registration: {
password: null,
......@@ -201,16 +210,16 @@ window.app = new Vue({
contains_number: false,
contains_letters: false,
contains_special_character: false,
valid_password: false
}
valid_password: false,
},
},
events: {
showmodalparent: function() {
showmodalparent: function () {
console.log("show modal parent");
}
},
},
methods: {
confirmLeaveProject: function(userToDetach, study) {
confirmLeaveProject: function (userToDetach, study) {
let confirmDelete = this.$buefy.dialog.confirm({
title: this.trans("Confirm Leave"),
message: this.trans(
......@@ -220,10 +229,10 @@ window.app = new Vue({
confirmText: this.trans("YES remove me"),
hasIcon: true,
type: "is-danger",
onConfirm: () => this.detachUser(userToDetach, study)
onConfirm: () => this.detachUser(userToDetach, study),
});
},
detachUser: function(userToDetach, study) {
detachUser: function (userToDetach, study) {
let self = this;
window.axios
.post(
......@@ -233,17 +242,17 @@ window.app = new Vue({
userToDetach.id,
{
email: userToDetach.email,
study: study
study: study,
}
)
.then(response => {
.then((response) => {
self.$buefy.snackbar.open(response.data.message);
setTimeout(function() {
setTimeout(function () {
window.location.reload();
}, 1000);
})
.catch(function(error) {
.catch(function (error) {