BuyIt
BuyIt copied to clipboard
As traduções dos erros não estão funcionando
O idioma selecionado no app é armazenado no AsyncStorage para que quando reinicie o app ele não retorne para o default, devido a isso o tratamento de erro do Yup e do Firebase não consegue pegar as traduções corretas, pegam apenas a default en
. Para resolver esse problema, adicionei um i18n.fallback = true
, desse modo caso não encontre a tradução ele irá usar a tradução default ptBR.
Uma ideia para resolver é o erro retornar uma string com o path da tradução e traduzir dentro do input.
English Version
The selected language in app is stored in AsyncStorage to stay in the selected language when change, without this in every app restart, the selected language back to default en
. Because this the errors handler from Yup and Firebase cannot get the correctly translations, it get the default en
. To resolve this problem I added a i18n.fallback=true
, this way if the app not found the translation, it is use the default ptBR.
An idea to resolve is the error return a string with the locale path and translate inside the input.