renamed lt function to t as it's no longer localized text and t is shorter, also renamed parameter ltKey to tKey for similar reasons
This commit is contained in:
@@ -47,9 +47,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.translation.get(ltKey);
|
||||
},
|
||||
translation() {
|
||||
return window.$gz.translation;
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="templateHasVisibleCustomFields()">
|
||||
<span class="v-label v-label--active theme--light">
|
||||
{{ lt("ObjectCustomFieldCustomGrid") }}
|
||||
{{ t("ObjectCustomFieldCustomGrid") }}
|
||||
</span>
|
||||
<div>
|
||||
<v-row align-center justify-left row wrap>
|
||||
@@ -20,11 +20,11 @@
|
||||
<gz-date-time-picker
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
></gz-date-time-picker>
|
||||
</div>
|
||||
@@ -34,11 +34,11 @@
|
||||
<gz-date-picker
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
></gz-date-picker>
|
||||
</div>
|
||||
@@ -47,11 +47,11 @@
|
||||
<gz-time-picker
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
></gz-time-picker>
|
||||
</div>
|
||||
@@ -60,11 +60,11 @@
|
||||
<v-textarea
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
auto-grow
|
||||
clearable
|
||||
@@ -75,11 +75,11 @@
|
||||
<v-text-field
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
clearable
|
||||
:counter="10"
|
||||
@@ -92,11 +92,11 @@
|
||||
<v-checkbox
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
></v-checkbox>
|
||||
</div>
|
||||
@@ -105,11 +105,11 @@
|
||||
<gz-decimal
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
></gz-decimal>
|
||||
</div>
|
||||
@@ -118,11 +118,11 @@
|
||||
<gz-currency
|
||||
v-model="_self[item.dataKey]"
|
||||
:readonly="readOnly"
|
||||
:label="lt(item.fld)"
|
||||
:label="t(item.fld)"
|
||||
:ref="item.fld"
|
||||
:error-messages="form().serverErrors(parentVM, item.fld)"
|
||||
:rules="[
|
||||
form().customFieldsCheck(parentVM, item, _self, lt(item.fld))
|
||||
form().customFieldsCheck(parentVM, item, _self, t(item.fld))
|
||||
]"
|
||||
></gz-currency>
|
||||
</div>
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
lt: function(ltkey) {
|
||||
t: function(ltkey) {
|
||||
return window.$gz.translation.get(ltkey);
|
||||
},
|
||||
form() {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<v-date-picker :locale="defaultLocale" v-model="dateOnly">
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text color="primary" @click="dlgdate = false">{{
|
||||
lt("OK")
|
||||
t("OK")
|
||||
}}</v-btn>
|
||||
</v-date-picker>
|
||||
</v-dialog>
|
||||
@@ -60,8 +60,8 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.translation.get(ltKey);
|
||||
t(tKey) {
|
||||
return window.$gz.translation.get(tKey);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text color="primary" @click="dlgdate = false">{{
|
||||
lt("OK")
|
||||
t("OK")
|
||||
}}</v-btn>
|
||||
</v-date-picker>
|
||||
</v-dialog>
|
||||
@@ -58,7 +58,7 @@
|
||||
>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text color="primary" @click="dlgtime = false">{{
|
||||
lt("OK")
|
||||
t("OK")
|
||||
}}</v-btn>
|
||||
</v-time-picker>
|
||||
</v-dialog>
|
||||
@@ -101,8 +101,8 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.translation.get(ltKey);
|
||||
t(tKey) {
|
||||
return window.$gz.translation.get(tKey);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -47,9 +47,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.translation.get(ltKey);
|
||||
},
|
||||
translation() {
|
||||
return window.$gz.translation;
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:items="selectLists.listViews"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
:label="lt('DataListView')"
|
||||
:label="t('DataListView')"
|
||||
@input="listViewChanged"
|
||||
>
|
||||
</v-select>
|
||||
@@ -36,7 +36,7 @@
|
||||
class="headline ml-3 accent--text"
|
||||
v-if="!loading && records.length < 1"
|
||||
>
|
||||
{{ lt("NoData") }}
|
||||
{{ t("NoData") }}
|
||||
</div>
|
||||
<!-- WIDE TABLE VIEW -->
|
||||
<template v-if="$vuetify.breakpoint.smAndUp">
|
||||
@@ -54,11 +54,11 @@
|
||||
showCurrentPage: true,
|
||||
showFirstLastPage: true,
|
||||
itemsPerPageOptions: rowsPerPageItems,
|
||||
itemsPerPageText: lt('RowsPerPage'),
|
||||
pageText: lt('PageOfPageText')
|
||||
itemsPerPageText: t('RowsPerPage'),
|
||||
pageText: t('PageOfPageText')
|
||||
}"
|
||||
:loading-text="lt('Loading')"
|
||||
:no-data-text="lt('NoData')"
|
||||
:loading-text="t('Loading')"
|
||||
:no-data-text="t('NoData')"
|
||||
class="elevation-1"
|
||||
>
|
||||
<template v-slot:body="{ items }">
|
||||
@@ -171,14 +171,14 @@
|
||||
showCurrentPage: true,
|
||||
showFirstLastPage: true,
|
||||
itemsPerPageOptions: rowsPerPageItems,
|
||||
itemsPerPageText: lt('RowsPerPage'),
|
||||
pageText: lt('PageOfPageText')
|
||||
itemsPerPageText: t('RowsPerPage'),
|
||||
pageText: t('PageOfPageText')
|
||||
}"
|
||||
:loading-text="lt('Loading')"
|
||||
:loading-text="t('Loading')"
|
||||
class="elevation-1"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<!-- Mimic the full width data table select all toggle :no-data-text="lt('NoData')"-->
|
||||
<!-- Mimic the full width data table select all toggle :no-data-text="t('NoData')"-->
|
||||
<div
|
||||
id="divSelectAll"
|
||||
@click="props.toggleSelectAll(!props.everyItem)"
|
||||
@@ -489,8 +489,8 @@ export default {
|
||||
//i is the actual AyaNova index of vm record so we have all we need to open vm object
|
||||
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
|
||||
},
|
||||
lt(ltKey) {
|
||||
return window.$gz.translation.get(ltKey);
|
||||
t(tKey) {
|
||||
return window.$gz.translation.get(tKey);
|
||||
},
|
||||
getDataFromApi() {
|
||||
var vm = this;
|
||||
@@ -856,7 +856,7 @@ function loadFormSettings(vm) {
|
||||
//add UNSAVED FILTER if -1
|
||||
|
||||
vm.selectLists.listViews.unshift({
|
||||
name: vm.lt("FilterUnsaved"),
|
||||
name: vm.t("FilterUnsaved"),
|
||||
id: -1
|
||||
});
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
item-disabled="!active"
|
||||
:error-messages="errors"
|
||||
:loading="fetching"
|
||||
:placeholder="lt('Search')"
|
||||
:placeholder="t('Search')"
|
||||
:search-input.sync="searchEntry"
|
||||
:filter="customFilter"
|
||||
hide-no-data
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt: function(ltkey) {
|
||||
t: function(ltkey) {
|
||||
return window.$gz.translation.get(ltkey);
|
||||
},
|
||||
hasError: function() {
|
||||
@@ -283,7 +283,7 @@ export default {
|
||||
if (val.includes(" ")) {
|
||||
queryTerms = val.split(" ");
|
||||
if (queryTerms.length > 2) {
|
||||
vm.errors.push(vm.lt("ErrorPickListQueryInvalid"));
|
||||
vm.errors.push(vm.t("ErrorPickListQueryInvalid"));
|
||||
return;
|
||||
}
|
||||
isATwoTermQuery = true;
|
||||
@@ -318,7 +318,7 @@ export default {
|
||||
window.$gz._.startsWith(queryTerms[0], "..") &&
|
||||
window.$gz._.startsWith(queryTerms[1], "..")
|
||||
) {
|
||||
vm.errors.push(vm.lt("ErrorPickListQueryInvalid"));
|
||||
vm.errors.push(vm.t("ErrorPickListQueryInvalid"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ export default {
|
||||
!window.$gz._.startsWith(queryTerms[0], "..") &&
|
||||
!window.$gz._.startsWith(queryTerms[1], "..")
|
||||
) {
|
||||
vm.errors.push(vm.lt("ErrorPickListQueryInvalid"));
|
||||
vm.errors.push(vm.t("ErrorPickListQueryInvalid"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<span class="v-label v-label--active theme--light">
|
||||
{{ lt("Tags") }}
|
||||
{{ t("Tags") }}
|
||||
</span>
|
||||
<v-autocomplete
|
||||
v-bind:value="value"
|
||||
v-on:input="$emit('input', $event)"
|
||||
:items="sourcetags"
|
||||
:loading="tagSearchUnderway"
|
||||
:placeholder="lt('TypeToSearchOrAdd')"
|
||||
:no-data-text="lt('NoData')"
|
||||
:placeholder="t('TypeToSearchOrAdd')"
|
||||
:no-data-text="t('NoData')"
|
||||
:search-input.sync="tagSearchEntry"
|
||||
hide-selected
|
||||
multiple
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
lt: function(ltkey) {
|
||||
t: function(ltkey) {
|
||||
return window.$gz.translation.get(ltkey);
|
||||
},
|
||||
addTag() {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn text color="primary" @click="dlgtime = false">{{
|
||||
lt("OK")
|
||||
t("OK")
|
||||
}}</v-btn>
|
||||
</v-time-picker>
|
||||
</v-dialog>
|
||||
@@ -65,8 +65,8 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
lt(ltKey) {
|
||||
return window.$gz.translation.get(ltKey);
|
||||
t(tKey) {
|
||||
return window.$gz.translation.get(tKey);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user