diff --git a/ayanova/devdocs/test protocol.txt b/ayanova/devdocs/test protocol.txt index 5c387703..3b8a2d51 100644 --- a/ayanova/devdocs/test protocol.txt +++ b/ayanova/devdocs/test protocol.txt @@ -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. - 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 - 404 WORKS ON ALL DEVICES DISPLAYS PROPERLY @@ -43,7 +43,7 @@ EDGE desktop =-=-=-=-=- OLD STUFF =-=-=-=- - does it update automatically -- No localization bugs +- No translation bugs - Login as different translation users and confirm no ?? showing - Menu - surfaces properly given size changes @@ -64,7 +64,7 @@ EDGE desktop - Navigate via menu then press back goes back to last form properly? - About then back to form or main inventory home etc - Widget form - - Localization showing properly on form + - translation showing properly on form - Numeric inputs show numeric keyboard on mobile - Calendar selects date and time or is that still fucky on some platforms? - Rights work properly diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 1e10b837..af2f958a 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -100,7 +100,7 @@ todo: TIME ZONE MISMATCH MESSAGE - 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 - 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) - 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 - 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 - - 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? - 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 -todo: LOCALIZATION form - - Dedicated area for localization adjustments - - Going to be a central form for all localization not form by form +todo: translation form + - Dedicated area for translation adjustments + - 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. @@ -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 - 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 - 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 - 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. - 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? @@ -381,10 +381,10 @@ FIXES REQUIRED (WTF? Is this still valid stuff ????????????????????????????????? - Error and validation properly implemented - broken rule display - 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 - 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 - 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 @@ -423,7 +423,7 @@ FIXES REQUIRED (WTF? Is this still valid stuff ????????????????????????????????? - 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) - 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 -Localized input and parsing and validation - - Going to need to handle localized numeric entry formats +translated input and parsing and validation + - Going to need to handle translated numeric entry formats - 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? - Make a widget component / form to view/list/enter/edit - 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 - Stage 2.5 TESTING diff --git a/ayanova/src/App.vue b/ayanova/src/App.vue index 90ac85da..50a9f0ee 100644 --- a/ayanova/src/App.vue +++ b/ayanova/src/App.vue @@ -2,7 +2,7 @@ - + max) { - //get the localized rule text + //get the translated rule text // "ErrorFieldLengthExceeded": "{0} can not exceed {1} characters.", var err = window.$gz.translation.get("ErrorFieldLengthExceeded"); var fieldName = getControlLabel(ctrl); diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 2c0c4d4a..333033ab 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -16,7 +16,7 @@ function addNavItem(title, icon, route, navItems, key) { export default function initialize() { var promise = new Promise(function(resolve) { 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 .fetch(window.$gz.translation.coreKeys) .then(function initializeNavPanel() { @@ -110,9 +110,9 @@ export default function initialize() { }); //Moved these two into user settings - // //USER LOCALE + // //USER TRANSLATE // sub.push({ - // title: window.$gz.translation.get("Locale"), + // title: window.$gz.translation.get("Translation"), // icon: "language", // route: "/home-translation", // key: key++ @@ -560,7 +560,7 @@ export default function initialize() { sub.push({ title: window.$gz.translation.get("Translation"), icon: "language", - route: "/adm-localized-text", + route: "/adm-translation", key: key++ }); @@ -735,7 +735,7 @@ export default function initialize() { } }) .then(() => { - //CACHE LOCALE SETTINGS + //CACHE TRANSLATION SETTINGS window.$gz.api .get("UserOptions/" + window.$gz.store.state.userId) .then(res => { diff --git a/ayanova/src/api/translation.js b/ayanova/src/api/translation.js index fc6be3c5..7d53da63 100644 --- a/ayanova/src/api/translation.js +++ b/ayanova/src/api/translation.js @@ -9,7 +9,7 @@ export default { return window.$gz.store.state.translationText[key]; }, 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 //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", "MemoList", "UserSettings", - "Locale", "SetLoginPassword", "NotifySubscriptionList", "UserPreferences", @@ -408,12 +407,11 @@ export default { }, //////////////////////////////////////////////////////// // 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 // setVuetifyDefaultLanguageElements(vm) { 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"); + } }; diff --git a/ayanova/src/router.js b/ayanova/src/router.js index 84b2ebe3..edb5c3a9 100644 --- a/ayanova/src/router.js +++ b/ayanova/src/router.js @@ -291,10 +291,10 @@ export default new Router({ }, { - path: "/adm-localized-text", - name: "adm-localized-text", + path: "/adm-translation", + name: "adm-translation", component: () => - import(/* webpackChunkName: "adm" */ "./views/adm-localized-text.vue") + import(/* webpackChunkName: "adm" */ "./views/adm-translation.vue") }, { diff --git a/ayanova/src/store.js b/ayanova/src/store.js index b66f20ee..de169033 100644 --- a/ayanova/src/store.js +++ b/ayanova/src/store.js @@ -21,7 +21,7 @@ export default new Vuex.Store({ userType: 0, homePage: undefined, 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: { languageOverride: "en-US", timeZoneOverride: "America/New_York", diff --git a/ayanova/src/views/adm-localized-text.vue b/ayanova/src/views/adm-translation.vue similarity index 100% rename from ayanova/src/views/adm-localized-text.vue rename to ayanova/src/views/adm-translation.vue diff --git a/ayanova/src/views/ay-about.vue b/ayanova/src/views/ay-about.vue index 6e459df9..2db5e460 100644 --- a/ayanova/src/views/ay-about.vue +++ b/ayanova/src/views/ay-about.vue @@ -246,7 +246,7 @@ function initForm(vm) { return new Promise(function(resolve, reject) { (async function() { try { - await fetchUILocalizedText(vm); + await fetchTranslatedText(vm); await getServerInfo(vm); await getBrowserInfo(vm); } 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 = [ "HelpAboutAyaNova", "ClientApp", diff --git a/ayanova/src/views/ay-customize.vue b/ayanova/src/views/ay-customize.vue index 27398b86..cb429dc1 100644 --- a/ayanova/src/views/ay-customize.vue +++ b/ayanova/src/views/ay-customize.vue @@ -322,7 +322,7 @@ function generateMenu(vm) { menuOptions.menuItems.push({ title: window.$gz.translation.get("Translation"), icon: "language", - data: "adm-localized-text", + data: "adm-translation", key: "app:nav" }); @@ -336,7 +336,7 @@ function initForm(vm) { return new Promise(function(resolve, reject) { (async function() { try { - await fetchUILocalizedText(vm); + await fetchTranslatedText(vm); await populatePickLists(vm); await ensureTemplateIsInStore(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 = [ "FormFieldEntryRequired", "FormFieldVisible", diff --git a/ayanova/src/views/ay-data-list-view.vue b/ayanova/src/views/ay-data-list-view.vue index ea2acb32..9beea153 100644 --- a/ayanova/src/views/ay-data-list-view.vue +++ b/ayanova/src/views/ay-data-list-view.vue @@ -976,7 +976,7 @@ function initForm(vm) { return new Promise(function(resolve, reject) { (async function() { try { - await fetchUILocalizedText(vm); + await fetchTranslatedText(vm); await populatePickLists(vm); await populateFieldDefinitions(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 = [ "DataListView", "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) { //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 // function getDisplayForFilter( @@ -1461,23 +1461,23 @@ function getDisplayForFilter( var valueDisplay = "selected value"; switch (uiFieldDataType) { - case 1: //date localize + case 1: //date translate valueDisplay = window.$gz.translation.utcDateToShortDateAndTimeLocalized( filterValue ); break; - case 8: //currency localize + case 8: //currency translate valueDisplay = window.$gz.translation.currencyLocalized(filterValue); break; - case 7: //decimal localize + case 7: //decimal translate valueDisplay = window.$gz.translation.decimalLocalized(filterValue); break; - case 6: //BOOL localize + case 6: //BOOL translate //debugger; var ltKey = filterValue ? "True" : "False"; valueDisplay = vm.lt(ltKey); break; - case 10: //ENUM localize + case 10: //ENUM translate valueDisplay = window.$gz.enums.get(enumType, filterValue); break; default: diff --git a/ayanova/src/views/home-password.vue b/ayanova/src/views/home-password.vue index 7713875e..bf15aad0 100644 --- a/ayanova/src/views/home-password.vue +++ b/ayanova/src/views/home-password.vue @@ -291,7 +291,7 @@ function initForm(vm) { return new Promise(function(resolve, reject) { (async function() { try { - await fetchUILocalizedText(vm); + await fetchTranslatedText(vm); } catch (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([ "UserLogin", "OldPassword", diff --git a/ayanova/src/views/home-translation.vue b/ayanova/src/views/home-translation.vue index 685e30c4..7babdae0 100644 --- a/ayanova/src/views/home-translation.vue +++ b/ayanova/src/views/home-translation.vue @@ -13,8 +13,8 @@ export default { window.$gz.eventBus.$emit("menu-change", { isMain: true, icon: "language", - title: window.$gz.translation.get("Locale"), - helpUrl: "form-home-locale" + title: window.$gz.translation.get("Translation"), + helpUrl: "form-home-translation" }); } }; diff --git a/ayanova/src/views/home-user-settings.vue b/ayanova/src/views/home-user-settings.vue index 9fa78824..290019f3 100644 --- a/ayanova/src/views/home-user-settings.vue +++ b/ayanova/src/views/home-user-settings.vue @@ -393,7 +393,7 @@ function initForm(vm) { return new Promise(function(resolve, reject) { (async function() { try { - await fetchUILocalizedText(vm); + await fetchTranslatedText(vm); // await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY); // await populatePickLists(vm); } 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([ "CurrencyCode", "LanguageCode", diff --git a/ayanova/src/views/notfound.vue b/ayanova/src/views/notfound.vue index e8623ff5..4c3d2f92 100644 --- a/ayanova/src/views/notfound.vue +++ b/ayanova/src/views/notfound.vue @@ -33,16 +33,16 @@ export default { ) { this.msg = '404 - NOT FOUND: "' + badPath + '"'; } else { - var notFoundLocalized = window.$gz.translation.get("ErrorAPI2010"); + var notFoundTranslated = window.$gz.translation.get("ErrorAPI2010"); //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 window.$gz.store.commit("logItem", this.msg); //set the title of the window window.$gz.eventBus.$emit("menu-change", { isMain: true, icon: "fa-dragon", - title: "404 - " + notFoundLocalized + title: "404 - " + notFoundTranslated }); } } diff --git a/ayanova/src/views/widget.vue b/ayanova/src/views/widget.vue index 7461301d..5b5f3756 100644 --- a/ayanova/src/views/widget.vue +++ b/ayanova/src/views/widget.vue @@ -652,7 +652,7 @@ function initForm(vm) { return new Promise(function(resolve, reject) { (async function() { try { - await fetchUILocalizedText(vm); + await fetchTranslatedText(vm); await window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY); await populatePickLists(vm); } 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([ "Widget", "WidgetName",