From cbcd2136cd80395eff898738747c52c4b301fd56 Mon Sep 17 00:00:00 2001 From: Dixsie Wolmers Date: Thu, 30 Jan 2020 20:58:37 -0600 Subject: Set up initial language translation - Add i18n internationalization plugin - Create json files for group 0 English and Spanish - Uses $t method to set up initial translations on login page - Meta title is translated using i18n in App.vue and PageTitle.Vue Signed-off-by: Dixsie Wolmers Change-Id: Ifce9f5e54d96f8b2a13239ad6178892f99fc4537 --- src/views/Login/Login.vue | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) (limited to 'src/views/Login') diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 35af76f2..d4fde8cb 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -13,17 +13,24 @@

OpenBMC

- @@ -83,15 +88,22 @@ export default { mixins: [VuelidateMixin], data() { return { - errorMsg: { - title: 'Invalid username or password.', - action: 'Please try again.' - }, userInfo: { username: null, password: null }, - disableSubmitButton: false + disableSubmitButton: false, + languages: [ + { value: null, text: this.$t('login.languages.select') }, + { + value: 'en', + text: this.$t('login.languages.english') + }, + { + value: 'es', + text: this.$t('login.languages.spanish') + } + ] }; }, computed: { -- cgit v1.2.3