- updated SendReq
- If Server Down the login msg error corrected.
This commit is contained in:
18
src/globalroutines/util.js
Normal file
18
src/globalroutines/util.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import { UserStore } from "../store/Modules";
|
||||
import messages from "../statics/i18n";
|
||||
|
||||
function translate(params) {
|
||||
let msg = params.split('.')
|
||||
let lang = UserStore.state.lang
|
||||
|
||||
let stringa = messages[lang]
|
||||
|
||||
let ris = stringa
|
||||
msg.forEach(param => {
|
||||
ris = ris[param]
|
||||
})
|
||||
|
||||
return ris
|
||||
}
|
||||
|
||||
export default translate
|
||||
Reference in New Issue
Block a user