This commit is contained in:
2020-03-06 20:08:50 +00:00
parent 7318a33350
commit 17bf519cb0
79 changed files with 331 additions and 309 deletions

View File

@@ -559,7 +559,7 @@ export default {
},
methods: {
lt: function(ltkey) {
return window.$gz.locale.get(ltkey);
return window.$gz.translation.get(ltkey);
},
enumPickList: function(enumKey) {
return window.$gz.enums.getPickList(enumKey);
@@ -931,7 +931,7 @@ function generateMenu(vm) {
var menuOptions = {
isMain: false,
icon: "filter",
title: window.$gz.locale.get("DataListView"),
title: window.$gz.translation.get("DataListView"),
helpUrl: "form-ay-data-list-view",
formData: {
ayaType: window.$gz.type.FormCustom,
@@ -942,7 +942,7 @@ function generateMenu(vm) {
if (vm.rights.change) {
menuOptions.menuItems.push({
title: window.$gz.locale.get("Save"),
title: window.$gz.translation.get("Save"),
icon: "save",
surface: true,
key: FORM_KEY + ":save",
@@ -951,7 +951,7 @@ function generateMenu(vm) {
}
if (vm.rights.delete) {
menuOptions.menuItems.push({
title: window.$gz.locale.get("Delete"),
title: window.$gz.translation.get("Delete"),
icon: "trash-alt",
surface: true,
key: FORM_KEY + ":delete",
@@ -960,7 +960,7 @@ function generateMenu(vm) {
}
if (vm.rights.change) {
menuOptions.menuItems.push({
title: window.$gz.locale.get("Duplicate"),
title: window.$gz.translation.get("Duplicate"),
icon: "clone",
key: FORM_KEY + ":duplicate",
vm: vm
@@ -979,7 +979,7 @@ function initForm(vm) {
await fetchUILocalizedText(vm);
await populatePickLists(vm);
await populateFieldDefinitions(vm);
await fetchLocalizedFieldNames(vm);
await fetchTranslatedFieldNames(vm);
await setEffectiveListView(vm);
await initDataObject(vm);
await fetchEnums(vm);
@@ -1043,7 +1043,7 @@ function fetchUILocalizedText(vm) {
"Name"
];
return window.$gz.locale.fetch(ltKeysRequired);
return window.$gz.translation.fetch(ltKeysRequired);
}
/////////////////////////////////
@@ -1210,16 +1210,16 @@ function populateFieldDefinitions(vm) {
//////////////////////////////////////////////////////////
//
// Ensures column names are present in locale table
// Ensures column names are present in translation table
//
function fetchLocalizedFieldNames(vm) {
function fetchTranslatedFieldNames(vm) {
var columnKeys = [];
for (var i = 1; i < vm.fieldDefinitions.length; i++) {
var cm = vm.fieldDefinitions[i];
columnKeys.push(cm.ltKey);
}
//Now fetch all the keys and await the response before returning
return window.$gz.locale.fetch(columnKeys).then(() => {
return window.$gz.translation.fetch(columnKeys).then(() => {
return;
});
}
@@ -1462,15 +1462,15 @@ function getDisplayForFilter(
var valueDisplay = "selected value";
switch (uiFieldDataType) {
case 1: //date localize
valueDisplay = window.$gz.locale.utcDateToShortDateAndTimeLocalized(
valueDisplay = window.$gz.translation.utcDateToShortDateAndTimeLocalized(
filterValue
);
break;
case 8: //currency localize
valueDisplay = window.$gz.locale.currencyLocalized(filterValue);
valueDisplay = window.$gz.translation.currencyLocalized(filterValue);
break;
case 7: //decimal localize
valueDisplay = window.$gz.locale.decimalLocalized(filterValue);
valueDisplay = window.$gz.translation.decimalLocalized(filterValue);
break;
case 6: //BOOL localize
//debugger;