This commit is contained in:
@@ -12,7 +12,7 @@ export default {
|
||||
AyaNova7Import: 10,
|
||||
TrialSeeder: 11,
|
||||
Metrics: 12,
|
||||
Locale: 13,
|
||||
Translation: 13,
|
||||
UserOptions: 14,
|
||||
DEPRECATED_REUSELATER_15: 15,
|
||||
DEPRECATED_REUSELATER_16: 16,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
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},"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},"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},"DataListFilter":{"Change":2,"ReadFullRecord":131071},"DataListTemplate":{"Change":2,"ReadFullRecord":131071},"FormCustom":{"Change":2,"ReadFullRecord":131071}}'
|
||||
);
|
||||
export default rights;
|
||||
|
||||
@@ -5,8 +5,8 @@ var lastMessageHash = 0;
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
//
|
||||
// Localize, Log and optionally display errors
|
||||
// return localized message in case caller needs it
|
||||
// translate, Log and optionally display errors
|
||||
// return translated message in case caller needs it
|
||||
function dealWithError(msg, vm) {
|
||||
//Check if this is the same message again as last time to avoid
|
||||
//repetitive loops of useless messages
|
||||
@@ -16,10 +16,10 @@ function dealWithError(msg, vm) {
|
||||
}
|
||||
lastMessageHash = newHash;
|
||||
|
||||
//localize as necessary
|
||||
//translate as necessary
|
||||
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
|
||||
if (!devModeShowErrors && msg.includes("??")) {
|
||||
msg = msg.replace("??", "");
|
||||
@@ -103,11 +103,11 @@ export default {
|
||||
dealWithError(msg);
|
||||
},
|
||||
/////////////////////////////////////////////////
|
||||
// Localize, log and return error
|
||||
// translate, log and return error
|
||||
//
|
||||
handleFormError(err, vm) {
|
||||
//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) {
|
||||
dealWithError(err.message, vm);
|
||||
} else {
|
||||
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
}
|
||||
|
||||
if (value.length > 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);
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user