Skip to content

Commit

Permalink
Merge pull request #415 from ZIMkaRU/feature/remove-lng-schema-param-…
Browse files Browse the repository at this point in the history
…check-and-add-en-fallback-lng

Remove language schema param check and add en fallback lng
  • Loading branch information
ezewer authored Nov 28, 2024
2 parents d2b991b + fe5032a commit 99d5f4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
18 changes: 1 addition & 17 deletions workers/loc.api/helpers/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,7 @@ const dateFormat = {
'YYYY-MM-DD'
]
}
const language = {
type: 'string',
enum: [
'en',
'en-US',
'ru',
'zh-CN',
'zh-TW',
'tr',
'tr-TR',
'es',
'es-EM',
'pt',
'pt-PT',
'pt-BR'
]
}
const language = { type: 'string' }

const paramsSchemaForPayInvoiceList = {
...paramsSchemaForApi,
Expand Down
6 changes: 3 additions & 3 deletions workers/loc.api/i18next/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ module.exports = (params) => {
const configs = merge(
{
fallbackLng: {
es: ['es-EM'],
pt: ['pt-BR'],
zh: ['zh-CN'],
es: ['es-EM', 'en'],
pt: ['pt-BR', 'en'],
zh: ['zh-CN', 'en'],
default: ['en']
},
ns: Object.values(TRANSLATION_NAMESPACES),
Expand Down

0 comments on commit 99d5f4b

Please sign in to comment.