This commit is contained in:
2020-03-06 20:26:42 +00:00
parent 1eaf564851
commit 1d874d8d1f
20 changed files with 70 additions and 72 deletions

View File

@@ -22,7 +22,7 @@ Test protocol for latest build:
- RESULTS: I would say leave all in as they each will display somethign useful on different platforms. - RESULTS: I would say leave all in as they each will display somethign useful on different platforms.
- TIME INPUT UTC HONOURED? Date time input fucked: - TIME INPUT UTC HONOURED? Date time input fucked:
- Selected 420 in the widget edit form but it shows as 11:20 on the main list, localization time issue - Selected 420 in the widget edit form but it shows as 11:20 on the main list, translation time issue
- Retest on desktop, probably a general date time conversion bug - Retest on desktop, probably a general date time conversion bug
- 404 WORKS ON ALL DEVICES DISPLAYS PROPERLY - 404 WORKS ON ALL DEVICES DISPLAYS PROPERLY
@@ -43,7 +43,7 @@ EDGE desktop
=-=-=-=-=- OLD STUFF =-=-=-=- =-=-=-=-=- OLD STUFF =-=-=-=-
- does it update automatically - does it update automatically
- No localization bugs - No translation bugs
- Login as different translation users and confirm no ?? showing - Login as different translation users and confirm no ?? showing
- Menu - Menu
- surfaces properly given size changes - surfaces properly given size changes
@@ -64,7 +64,7 @@ EDGE desktop
- Navigate via menu then press back goes back to last form properly? - Navigate via menu then press back goes back to last form properly?
- About then back to form or main inventory home etc - About then back to form or main inventory home etc
- Widget form - Widget form
- Localization showing properly on form - translation showing properly on form
- Numeric inputs show numeric keyboard on mobile - Numeric inputs show numeric keyboard on mobile
- Calendar selects date and time or is that still fucky on some platforms? - Calendar selects date and time or is that still fucky on some platforms?
- Rights work properly - Rights work properly

View File

@@ -100,7 +100,7 @@ todo: TIME ZONE MISMATCH MESSAGE
- This way user knows it's happened and does it on purpose when appropriate - This way user knows it's happened and does it on purpose when appropriate
- Or user can ignore it and just keep working in their chosen time zone but will be aware it's an issue - Or user can ignore it and just keep working in their chosen time zone but will be aware it's an issue
- It may need a logout and back in unless it can just set the local setting which I guess it can, be aware of that anyway - It may need a logout and back in unless it can just set the local setting which I guess it can, be aware of that anyway
- Time zone mismatch message sb localized and far shorter - Time zone mismatch message sb translated and far shorter
todo: Workorder/quote/pm templates (MENU ITEM) todo: Workorder/quote/pm templates (MENU ITEM)
- Put the link to access them into their own type, i.e. Workorder templates are accessed from either the grid listing workorders or inside an individual or perhaps BEST IDEA in the NEW menu where you pick a template !!!!! - Put the link to access them into their own type, i.e. Workorder templates are accessed from either the grid listing workorders or inside an individual or perhaps BEST IDEA in the NEW menu where you pick a template !!!!!
@@ -143,7 +143,7 @@ todo: REPORT LIST
- One idea I just had is maybe the last report used for that form is surfaced on the context menu in addition to the regular reporting option - One idea I just had is maybe the last report used for that form is surfaced on the context menu in addition to the regular reporting option
- If take last report used then it directly opens a preview - If take last report used then it directly opens a preview
- If take generic Report option then it opens to another form for choosing the report and whether to print or not etc - If take generic Report option then it opens to another form for choosing the report and whether to print or not etc
- SB localized in form as "Report" not "Print" because it's going to be likely that people will want to work with pdf (email, download) instead or just the view of it, print is maybe not a common option. - SB translated in form as "Report" not "Print" because it's going to be likely that people will want to work with pdf (email, download) instead or just the view of it, print is maybe not a common option.
todo: WIDGET EDIT FORM SAVE AND NEW BUTTON LIKE V7? todo: WIDGET EDIT FORM SAVE AND NEW BUTTON LIKE V7?
- NO, just keeping this until I get here in case I think I need it again, don't need it. - NO, just keeping this until I get here in case I think I need it again, don't need it.
@@ -267,9 +267,9 @@ todo: INVESTIGATE - Dark mode / theming (dark with a half moon icon)
#translation stuff #translation stuff
todo: LOCALIZATION form todo: translation form
- Dedicated area for localization adjustments - Dedicated area for translation adjustments
- Going to be a central form for all localization not form by form - Going to be a central form for all translation not form by form
- Review the spec doc and the cases regarding this as there are some little touches that were requested and make sense related to search and replace and other things. - Review the spec doc and the cases regarding this as there are some little touches that were requested and make sense related to search and replace and other things.
@@ -348,7 +348,7 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
- API get code is incorrectly dealing with expired bearer cert, a 401 is returned and it tries to parse the result as if it succeeded when it really should trigger a login process - API get code is incorrectly dealing with expired bearer cert, a 401 is returned and it tries to parse the result as if it succeeded when it really should trigger a login process
- Time zone offset mismatch warning needs expansion, it should only prompt a few times (maybe or find a way to deal with this) and it should offer to change it at the server automatically - Time zone offset mismatch warning needs expansion, it should only prompt a few times (maybe or find a way to deal with this) and it should offer to change it at the server automatically
- Localize time zone mismatch warning - Translate time zone mismatch warning (PROBABLY NOT NOW)
- Don't like popup messages, would rather see a notification icon and be part of that unless it's super critical - Don't like popup messages, would rather see a notification icon and be part of that unless it's super critical
- Implement a toaster or some similar notification - Implement a toaster or some similar notification
@@ -367,7 +367,7 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
- Don't want to solve any problems that should have been solved with this form later as I will inevitably be full on copy and pasting once I get it down and so it needs to be as solid as possible First - Don't want to solve any problems that should have been solved with this form later as I will inevitably be full on copy and pasting once I get it down and so it needs to be as solid as possible First
- TEST SMALL and LARGE device layout regularly, don't get too far ahead of the testing - TEST SMALL and LARGE device layout regularly, don't get too far ahead of the testing
- Every type of entry field fully localized properly including numeric, date, time, tags etc - Every type of entry field fully translated properly including numeric, date, time, tags etc
- Client: initialize after login sets translation formats for everything. - Client: initialize after login sets translation formats for everything.
- Best to do this useroptions stuff after a form is in place that I can play with at the client and experiment to see what is possible - Best to do this useroptions stuff after a form is in place that I can play with at the client and experiment to see what is possible
- How much flexibility do we have to set things like numeric / currency input / display format? - How much flexibility do we have to set things like numeric / currency input / display format?
@@ -381,10 +381,10 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
- Error and validation properly implemented - Error and validation properly implemented
- broken rule display - broken rule display
- Error reporting overall properly implemented - Error reporting overall properly implemented
- ensure error messages that come back from API that start with LT: will be localized correctly before display / logging (may need string interpolation too for some in future, consider that) - ensure error messages that come back from API that start with LT: will be translated correctly before display / logging (may need string interpolation too for some in future, consider that)
- Validation / validation rules - Validation / validation rules
- Vee validate and vuedelate both work tightly with vuetify and v-form - Vee validate and vuedelate both work tightly with vuetify and v-form
- Vee-validate can be localized - Vee-validate can be translated
- https://baianat.github.io/vee-validate/guide/rules.html#after - https://baianat.github.io/vee-validate/guide/rules.html#after
- Dirty check and warning if navigate away. - Dirty check and warning if navigate away.
- Dirty form check and prevent route leave: https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards - Dirty form check and prevent route leave: https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards
@@ -423,7 +423,7 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
- Override browser datetime with these settings instead (see below) - Override browser datetime with these settings instead (see below)
- One single date format string? Or one for time, one for date and one for date/time? (see v7) - One single date format string? Or one for time, one for date and one for date/time? (see v7)
- Take from day.js (https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#list-of-all-available-formats) - Take from day.js (https://github.com/iamkun/dayjs/blob/master/docs/en/API-reference.md#list-of-all-available-formats)
- Do not allow anything other than numeric display, i.e. no January or Saturday so we avoid localization issues - Do not allow anything other than numeric display, i.e. no January or Saturday so we avoid translation issues
...... ......
@@ -455,8 +455,8 @@ FIXES REQUIRED (WTF? Is this still valid stuff ?????????????????????????????????
TESTING TODO TESTING TODO
Localized input and parsing and validation translated input and parsing and validation
- Going to need to handle localized numeric entry formats - Going to need to handle translated numeric entry formats
- Deal with this once form is in good shape and worth testing with different translations - Deal with this once form is in good shape and worth testing with different translations
----------------- -----------------
@@ -482,7 +482,7 @@ ABOUT form - add the user settings such as timezone offset, translation formatt
- Look into: should each component do it's own ajax calls? - Look into: should each component do it's own ajax calls?
- Make a widget component / form to view/list/enter/edit - Make a widget component / form to view/list/enter/edit
- Graph / Readonly UI component - Graph / Readonly UI component
- Widget: List, search, edit, localized WIDGET UI components - Widget: List, search, edit, translated WIDGET UI components
- Post up another build with the entry form and re-round of testing - Post up another build with the entry form and re-round of testing
- Stage 2.5 TESTING - Stage 2.5 TESTING

View File

@@ -2,7 +2,7 @@
<v-app> <v-app>
<gznotify ref="gznotify"></gznotify> <gznotify ref="gznotify"></gznotify>
<gzconfirm ref="gzconfirm"></gzconfirm> <gzconfirm ref="gzconfirm"></gzconfirm>
<!-- Width of nav drawer set to allow widest localized text menu item to show which is spanish client service requests item --> <!-- Width of nav drawer set to allow widest translated text menu item to show which is spanish client service requests item -->
<v-navigation-drawer <v-navigation-drawer
v-if="isAuthenticated" v-if="isAuthenticated"
v-model="drawer" v-model="drawer"

View File

@@ -12,7 +12,7 @@ export default {
AyaNova7Import: 10, AyaNova7Import: 10,
TrialSeeder: 11, TrialSeeder: 11,
Metrics: 12, Metrics: 12,
Locale: 13, Translation: 13,
UserOptions: 14, UserOptions: 14,
DEPRECATED_REUSELATER_15: 15, DEPRECATED_REUSELATER_15: 15,
DEPRECATED_REUSELATER_16: 16, DEPRECATED_REUSELATER_16: 16,

View File

@@ -6,7 +6,7 @@
*/ */
var rights = JSON.parse( var rights = JSON.parse(
'{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":131071},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Locale":{"Change":16386,"ReadFullRecord":131071},"DataListView":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}' '{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":131071},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Translation":{"Change":16386,"ReadFullRecord":131071},"DataListView":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}'
//'{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":131071},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Locale":{"Change":16386,"ReadFullRecord":131071},"DataListFilter":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}' //'{"User":{"Change":2,"ReadFullRecord":1},"UserOptions":{"Change":2,"ReadFullRecord":1},"Widget":{"Change":34,"ReadFullRecord":17},"ServerState":{"Change":16384,"ReadFullRecord":131071},"License":{"Change":16386,"ReadFullRecord":8193},"LogFile":{"Change":0,"ReadFullRecord":24576},"JobOperations":{"Change":16384,"ReadFullRecord":8195},"AyaNova7Import":{"Change":16384,"ReadFullRecord":0},"Metrics":{"Change":0,"ReadFullRecord":24576},"Translation":{"Change":16386,"ReadFullRecord":131071},"DataListFilter":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}'
); );
export default rights; export default rights;

View File

@@ -5,8 +5,8 @@ var lastMessageHash = 0;
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
// //
// Localize, Log and optionally display errors // translate, Log and optionally display errors
// return localized message in case caller needs it // return translated message in case caller needs it
function dealWithError(msg, vm) { function dealWithError(msg, vm) {
//Check if this is the same message again as last time to avoid //Check if this is the same message again as last time to avoid
//repetitive loops of useless messages //repetitive loops of useless messages
@@ -16,10 +16,10 @@ function dealWithError(msg, vm) {
} }
lastMessageHash = newHash; lastMessageHash = newHash;
//localize as necessary //translate as necessary
msg = window.$gz.translation.translateString(msg); msg = window.$gz.translation.translateString(msg);
//In some cases the error may not be localizable, if this is not a debug run then it should show without the ?? that localizing puts in keys not found //In some cases the error may not be translatable, if this is not a debug run then it should show without the ?? that translating puts in keys not found
//so it's not as weird looking to the user //so it's not as weird looking to the user
if (!devModeShowErrors && msg.includes("??")) { if (!devModeShowErrors && msg.includes("??")) {
msg = msg.replace("??", ""); msg = msg.replace("??", "");
@@ -103,11 +103,11 @@ export default {
dealWithError(msg); dealWithError(msg);
}, },
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Localize, log and return error // translate, log and return error
// //
handleFormError(err, vm) { handleFormError(err, vm) {
//called inside forms when things go unexpectedly wrong //called inside forms when things go unexpectedly wrong
//returns the localized message in case the form wants to display it as well //returns the translated message in case the form wants to display it as well
if (err instanceof Error && err.message) { if (err instanceof Error && err.message) {
dealWithError(err.message, vm); dealWithError(err.message, vm);
} else { } else {

View File

@@ -191,7 +191,7 @@ export default {
} }
if (value.length > max) { if (value.length > max) {
//get the localized rule text //get the translated rule text
// "ErrorFieldLengthExceeded": "{0} can not exceed {1} characters.", // "ErrorFieldLengthExceeded": "{0} can not exceed {1} characters.",
var err = window.$gz.translation.get("ErrorFieldLengthExceeded"); var err = window.$gz.translation.get("ErrorFieldLengthExceeded");
var fieldName = getControlLabel(ctrl); var fieldName = getControlLabel(ctrl);

View File

@@ -16,7 +16,7 @@ function addNavItem(title, icon, route, navItems, key) {
export default function initialize() { export default function initialize() {
var promise = new Promise(function(resolve) { var promise = new Promise(function(resolve) {
if (window.$gz.store.state.authenticated) { if (window.$gz.store.state.authenticated) {
//Fetch the core localized text keys that will always be required by user //Fetch the core translated text keys that will always be required by user
window.$gz.translation window.$gz.translation
.fetch(window.$gz.translation.coreKeys) .fetch(window.$gz.translation.coreKeys)
.then(function initializeNavPanel() { .then(function initializeNavPanel() {
@@ -110,9 +110,9 @@ export default function initialize() {
}); });
//Moved these two into user settings //Moved these two into user settings
// //USER LOCALE // //USER TRANSLATE
// sub.push({ // sub.push({
// title: window.$gz.translation.get("Locale"), // title: window.$gz.translation.get("Translation"),
// icon: "language", // icon: "language",
// route: "/home-translation", // route: "/home-translation",
// key: key++ // key: key++
@@ -560,7 +560,7 @@ export default function initialize() {
sub.push({ sub.push({
title: window.$gz.translation.get("Translation"), title: window.$gz.translation.get("Translation"),
icon: "language", icon: "language",
route: "/adm-localized-text", route: "/adm-translation",
key: key++ key: key++
}); });
@@ -735,7 +735,7 @@ export default function initialize() {
} }
}) })
.then(() => { .then(() => {
//CACHE LOCALE SETTINGS //CACHE TRANSLATION SETTINGS
window.$gz.api window.$gz.api
.get("UserOptions/" + window.$gz.store.state.userId) .get("UserOptions/" + window.$gz.store.state.userId)
.then(res => { .then(res => {

View File

@@ -9,7 +9,7 @@ export default {
return window.$gz.store.state.translationText[key]; return window.$gz.store.state.translationText[key];
}, },
fetch(keys) { fetch(keys) {
return new Promise(function fetchLocaleKeysFromServer(resolve) { return new Promise(function fetchTranslationKeysFromServer(resolve) {
// //
//step 1: build an array of keys that we don't have already //step 1: build an array of keys that we don't have already
//Note: this will ensure only unique keys go into the store so it's safe to call this with dupes as can happen //Note: this will ensure only unique keys go into the store so it's safe to call this with dupes as can happen
@@ -55,7 +55,6 @@ export default {
"Schedule", "Schedule",
"MemoList", "MemoList",
"UserSettings", "UserSettings",
"Locale",
"SetLoginPassword", "SetLoginPassword",
"NotifySubscriptionList", "NotifySubscriptionList",
"UserPreferences", "UserPreferences",
@@ -408,12 +407,11 @@ export default {
}, },
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
// dynamically set the vuetify language elements from // dynamically set the vuetify language elements from
// users localized text (am/pm etc) // users translated text
// Keeping vuetify using en locale and just adjusting on top of that // Keeping vuetify using en locale and just adjusting on top of that
// //
setVuetifyDefaultLanguageElements(vm) { setVuetifyDefaultLanguageElements(vm) {
vm.$vuetify.lang.locales.en.close = this.get("OK"); vm.$vuetify.lang.locales.en.close = this.get("OK");
// vm.$vuetify.lang.locales.en.timePicker.am = this.get("AM");
// vm.$vuetify.lang.locales.en.timePicker.pm = this.get("PM");
} }
}; };

View File

@@ -291,10 +291,10 @@ export default new Router({
}, },
{ {
path: "/adm-localized-text", path: "/adm-translation",
name: "adm-localized-text", name: "adm-translation",
component: () => component: () =>
import(/* webpackChunkName: "adm" */ "./views/adm-localized-text.vue") import(/* webpackChunkName: "adm" */ "./views/adm-translation.vue")
}, },
{ {

View File

@@ -21,7 +21,7 @@ export default new Vuex.Store({
userType: 0, userType: 0,
homePage: undefined, homePage: undefined,
translationText: {}, translationText: {},
enums: {}, //all enum values with localized text to match stored as key e.g. enums:={AuthorizationRoles:{0:"no role",1:"Limited role"},UserTypes:{0:"Technician",1:"Client user"}} enums: {}, //all enum values with translated text to match stored as key e.g. enums:={AuthorizationRoles:{0:"no role",1:"Limited role"},UserTypes:{0:"Technician",1:"Client user"}}
locale: { locale: {
languageOverride: "en-US", languageOverride: "en-US",
timeZoneOverride: "America/New_York", timeZoneOverride: "America/New_York",

View File

@@ -246,7 +246,7 @@ function initForm(vm) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
(async function() { (async function() {
try { try {
await fetchUILocalizedText(vm); await fetchTranslatedText(vm);
await getServerInfo(vm); await getServerInfo(vm);
await getBrowserInfo(vm); await getBrowserInfo(vm);
} catch (err) { } catch (err) {
@@ -259,9 +259,9 @@ function initForm(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Ensures UI localized text is available // Ensures UI translated text is available
// //
function fetchUILocalizedText(vm) { function fetchTranslatedText(vm) {
var ltKeysRequired = [ var ltKeysRequired = [
"HelpAboutAyaNova", "HelpAboutAyaNova",
"ClientApp", "ClientApp",

View File

@@ -322,7 +322,7 @@ function generateMenu(vm) {
menuOptions.menuItems.push({ menuOptions.menuItems.push({
title: window.$gz.translation.get("Translation"), title: window.$gz.translation.get("Translation"),
icon: "language", icon: "language",
data: "adm-localized-text", data: "adm-translation",
key: "app:nav" key: "app:nav"
}); });
@@ -336,7 +336,7 @@ function initForm(vm) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
(async function() { (async function() {
try { try {
await fetchUILocalizedText(vm); await fetchTranslatedText(vm);
await populatePickLists(vm); await populatePickLists(vm);
await ensureTemplateIsInStore(vm); await ensureTemplateIsInStore(vm);
await initDataObject(vm); await initDataObject(vm);
@@ -350,9 +350,9 @@ function initForm(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Ensures UI localized text is available // Ensures UI translated text is available
// //
function fetchUILocalizedText(vm) { function fetchTranslatedText(vm) {
var ltKeysRequired = [ var ltKeysRequired = [
"FormFieldEntryRequired", "FormFieldEntryRequired",
"FormFieldVisible", "FormFieldVisible",

View File

@@ -976,7 +976,7 @@ function initForm(vm) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
(async function() { (async function() {
try { try {
await fetchUILocalizedText(vm); await fetchTranslatedText(vm);
await populatePickLists(vm); await populatePickLists(vm);
await populateFieldDefinitions(vm); await populateFieldDefinitions(vm);
await fetchTranslatedFieldNames(vm); await fetchTranslatedFieldNames(vm);
@@ -993,9 +993,9 @@ function initForm(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Ensures UI localized text is available // Ensures UI translated text is available
// //
function fetchUILocalizedText(vm) { function fetchTranslatedText(vm) {
var ltKeysRequired = [ var ltKeysRequired = [
"DataListView", "DataListView",
"GridFilterName", "GridFilterName",
@@ -1386,7 +1386,7 @@ function initDataObject(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Ensures localized enum lists are available pre-cached // Ensures translated enum lists are available pre-cached
// //
function fetchEnums(vm) { function fetchEnums(vm) {
//build an array of all enums then execute method //build an array of all enums then execute method
@@ -1418,7 +1418,7 @@ function updateEditedListView(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Convert filter properties to localized / displayable // Convert filter properties to translated / displayable
// used when making new filter and loading existing // used when making new filter and loading existing
// //
function getDisplayForFilter( function getDisplayForFilter(
@@ -1461,23 +1461,23 @@ function getDisplayForFilter(
var valueDisplay = "selected value"; var valueDisplay = "selected value";
switch (uiFieldDataType) { switch (uiFieldDataType) {
case 1: //date localize case 1: //date translate
valueDisplay = window.$gz.translation.utcDateToShortDateAndTimeLocalized( valueDisplay = window.$gz.translation.utcDateToShortDateAndTimeLocalized(
filterValue filterValue
); );
break; break;
case 8: //currency localize case 8: //currency translate
valueDisplay = window.$gz.translation.currencyLocalized(filterValue); valueDisplay = window.$gz.translation.currencyLocalized(filterValue);
break; break;
case 7: //decimal localize case 7: //decimal translate
valueDisplay = window.$gz.translation.decimalLocalized(filterValue); valueDisplay = window.$gz.translation.decimalLocalized(filterValue);
break; break;
case 6: //BOOL localize case 6: //BOOL translate
//debugger; //debugger;
var ltKey = filterValue ? "True" : "False"; var ltKey = filterValue ? "True" : "False";
valueDisplay = vm.lt(ltKey); valueDisplay = vm.lt(ltKey);
break; break;
case 10: //ENUM localize case 10: //ENUM translate
valueDisplay = window.$gz.enums.get(enumType, filterValue); valueDisplay = window.$gz.enums.get(enumType, filterValue);
break; break;
default: default:

View File

@@ -291,7 +291,7 @@ function initForm(vm) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
(async function() { (async function() {
try { try {
await fetchUILocalizedText(vm); await fetchTranslatedText(vm);
} catch (err) { } catch (err) {
reject(err); reject(err);
} }
@@ -302,9 +302,9 @@ function initForm(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Ensures UI localized text is available // Ensures UI translated text is available
// //
function fetchUILocalizedText(vm) { function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([ return window.$gz.translation.fetch([
"UserLogin", "UserLogin",
"OldPassword", "OldPassword",

View File

@@ -13,8 +13,8 @@ export default {
window.$gz.eventBus.$emit("menu-change", { window.$gz.eventBus.$emit("menu-change", {
isMain: true, isMain: true,
icon: "language", icon: "language",
title: window.$gz.translation.get("Locale"), title: window.$gz.translation.get("Translation"),
helpUrl: "form-home-locale" helpUrl: "form-home-translation"
}); });
} }
}; };

View File

@@ -393,7 +393,7 @@ function initForm(vm) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
(async function() { (async function() {
try { try {
await fetchUILocalizedText(vm); await fetchTranslatedText(vm);
// await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY); // await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
// await populatePickLists(vm); // await populatePickLists(vm);
} catch (err) { } catch (err) {
@@ -406,9 +406,9 @@ function initForm(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Ensures UI localized text is available // Ensures UI translated text is available
// //
function fetchUILocalizedText(vm) { function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([ return window.$gz.translation.fetch([
"CurrencyCode", "CurrencyCode",
"LanguageCode", "LanguageCode",

View File

@@ -33,16 +33,16 @@ export default {
) { ) {
this.msg = '404 - NOT FOUND: "' + badPath + '"'; this.msg = '404 - NOT FOUND: "' + badPath + '"';
} else { } else {
var notFoundLocalized = window.$gz.translation.get("ErrorAPI2010"); var notFoundTranslated = window.$gz.translation.get("ErrorAPI2010");
//format the message //format the message
this.msg = "404 - " + notFoundLocalized + ': "' + badPath + '"'; this.msg = "404 - " + notFoundTranslated + ': "' + badPath + '"';
//log it in case we need to see it in tech support //log it in case we need to see it in tech support
window.$gz.store.commit("logItem", this.msg); window.$gz.store.commit("logItem", this.msg);
//set the title of the window //set the title of the window
window.$gz.eventBus.$emit("menu-change", { window.$gz.eventBus.$emit("menu-change", {
isMain: true, isMain: true,
icon: "fa-dragon", icon: "fa-dragon",
title: "404 - " + notFoundLocalized title: "404 - " + notFoundTranslated
}); });
} }
} }

View File

@@ -652,7 +652,7 @@ function initForm(vm) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
(async function() { (async function() {
try { try {
await fetchUILocalizedText(vm); await fetchTranslatedText(vm);
await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY); await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY);
await populatePickLists(vm); await populatePickLists(vm);
} catch (err) { } catch (err) {
@@ -665,9 +665,9 @@ function initForm(vm) {
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// //
// Ensures UI localized text is available // Ensures UI translated text is available
// //
function fetchUILocalizedText(vm) { function fetchTranslatedText(vm) {
return window.$gz.translation.fetch([ return window.$gz.translation.fetch([
"Widget", "Widget",
"WidgetName", "WidgetName",