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