Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
fix(server/i18n): move summaryLocaleData to inner func
Browse files Browse the repository at this point in the history
fix(server/i18n): move summaryLocaleData to inner func
  • Loading branch information
Metnew committed Sep 28, 2017
1 parent 2c9da2f commit 34a5f91
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/server/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ const translations = globSync('locals/*.json')
return acc
}, {})

const summaryLocaleData = {
en: enLocaleData,
ru: ruLocaleData
}

export const defaultLanguage = 'en'
export const supportedLanguages = ['en', 'ru']

export default (lang: string): i18nConfigObject => {
console.log(lang)
export default (lang: string = defaultLanguage): i18nConfigObject => {
const summaryLocaleData = {
en: enLocaleData,
ru: ruLocaleData
}
return {
lang,
localeData: summaryLocaleData[lang],
Expand Down

0 comments on commit 34a5f91

Please sign in to comment.