Fix locale resolving bug, english messages (#612)
Remove vue-i18n reference to other messages (too confusing). Signed-off-by: Yannick Schaus <github@schaus.net>pull/615/head
parent
32eaac362c
commit
fd40175c7c
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"analyzer.title": "Analyze",
|
||||
"analyzer.back": "@:dialogs.back",
|
||||
"analyzer.save": "@:dialogs.save",
|
||||
"analyzer.back": "Back",
|
||||
"analyzer.save": "Save",
|
||||
"analyzer.controls": "Controls",
|
||||
"analyzer.series": "Series",
|
||||
"analyzer.series.table.header.label": "Label",
|
||||
|
@ -13,7 +13,7 @@
|
|||
"analyzer.series.table.type.bar": "Bar",
|
||||
"analyzer.series.table.type.line": "Line",
|
||||
"analyzer.series.table.type.area": "Area",
|
||||
"analyzer.series.table.type.geatmap": "Heatmap",
|
||||
"analyzer.series.table.type.heatmap": "Heatmap",
|
||||
"analyzer.series.table.na": "N/A",
|
||||
"analyzer.coords": "Coords",
|
||||
"analyzer.coords.period": "Period",
|
||||
|
@ -44,7 +44,7 @@
|
|||
"analyzer.ranges.range.type.piecewise": "Piecewise",
|
||||
"analyzer.ranges.valueAxes": "Value Axes",
|
||||
"analyzer.ranges.valueAxes.table.header.label": "Label",
|
||||
"analyzer.ranges.valueAxes.table.header.min": "Max",
|
||||
"analyzer.ranges.valueAxes.table.header.min": "Min",
|
||||
"analyzer.ranges.valueAxes.table.header.max": "Max",
|
||||
"analyzer.ranges.valueAxes.table.header.scale": "Scale",
|
||||
"analyzer.ranges.valueAxes.table.header.split": "Split",
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"home.equipment.tab": "Equipment",
|
||||
"home.properties.title": "Properties",
|
||||
"home.properties.tab": "Properties",
|
||||
"home.cards.close": "@:dialogs.close",
|
||||
"home.cards.close": "Close",
|
||||
"home.cards.analyze": "Analyze",
|
||||
"home.cards.analyzeAll": "Analyze All",
|
||||
"home.otherApps": "Other Apps",
|
||||
|
@ -37,7 +37,7 @@
|
|||
"sidebar.helpAbout": "Help & About",
|
||||
"sidebar.unlockAdmin": "Unlock Administration",
|
||||
"sidebar.tip.signIn": "Sign in as an administrator to access settings",
|
||||
"page.navbar.back": "@:dialogs.back",
|
||||
"page.navbar.back": "Back",
|
||||
"page.navbar.edit": "Edit",
|
||||
"admin.notTranslatedYet": "The administration area is not translated yet."
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Temperature": "Températures",
|
||||
"Temperature": "Temperatures",
|
||||
"Light": "Light",
|
||||
"ColorTemperature": "Color Temperatures",
|
||||
"Humidity": "Humidity",
|
||||
|
|
|
@ -360,13 +360,16 @@ export default {
|
|||
// store the REST API services present on the system
|
||||
this.$store.commit('setRootResource', { rootResponse })
|
||||
this.updateLocale()
|
||||
}).then(() => {
|
||||
return rootResponse
|
||||
}).then((rootResponse) => {
|
||||
let locale = this.$store.state.locale
|
||||
if (!locale) return
|
||||
let dayjsLocale = dayjsLocales.find((l) => l.key === locale.replace('_', '-').toLowerCase())
|
||||
if (!dayjsLocale) dayjsLocale = dayjsLocales.find((l) => l.key === locale.split('_')[0].toLowerCase())
|
||||
if (!dayjsLocale) return
|
||||
let dayjsLocalePromise = (dayjsLocale) ? import('dayjs/locale/' + dayjsLocale.key + '.js').then(() => Promise.resolve(dayjsLocale)) : Promise.resolve(null)
|
||||
let dayjsLocalePromise = Promise.resolve(null)
|
||||
// try to resolve the dayjs file to load if it exists
|
||||
if (locale) {
|
||||
let dayjsLocale = dayjsLocales.find((l) => l.key === locale.replace('_', '-').toLowerCase())
|
||||
if (!dayjsLocale) dayjsLocale = dayjsLocales.find((l) => l.key === locale.split('_')[0].toLowerCase())
|
||||
dayjsLocalePromise = (dayjsLocale) ? import('dayjs/locale/' + dayjsLocale.key + '.js').then(() => Promise.resolve(dayjsLocale)) : Promise.resolve(null)
|
||||
}
|
||||
// load the pages & widgets, only if the 'ui' endpoint exists (or empty arrays otherwise)
|
||||
return Promise.all([
|
||||
...this.$store.getters.apiEndpoint('ui')
|
||||
|
|
Loading…
Reference in New Issue