1.0
This commit is contained in:
parent
15dd0bbb01
commit
0b89b5a010
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
||||
node_modules/
|
||||
*/node_modules/
|
||||
*/build/
|
||||
|
||||
**/node_modules/
|
||||
**/build/
|
||||
.DS_Store
|
||||
.env
|
||||
File diff suppressed because one or more lines are too long
1
frontend/json/runtimeError.json
Normal file
1
frontend/json/runtimeError.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
@ -25,6 +25,11 @@ const nextConfig = {
|
||||
hostname: '**',
|
||||
},
|
||||
],
|
||||
i18n: {
|
||||
locales: ['pt', 'en', 'fr', 'es', 'de'],
|
||||
defaultLocale: 'pt',
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -161,10 +161,10 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
||||
|
||||
<div className='space-y-2'>
|
||||
<h2 className='text-xl font-semibold text-pavitra-900'>
|
||||
Something went wrong
|
||||
Algo deu errado
|
||||
</h2>
|
||||
<p className='text-pavitra-800'>
|
||||
We're sorry, but we encountered an unexpected error.
|
||||
Desculpe, mas ocorreu um erro inesperado.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@ -9,6 +9,8 @@ import Select, {
|
||||
type LanguageOption = { label: string; value: string };
|
||||
|
||||
const LANGS: LanguageOption[] = [
|
||||
{ value: 'pt', label: '🇧🇷 PT' },
|
||||
|
||||
{ value: 'en', label: '🇬🇧 EN' },
|
||||
{ value: 'fr', label: '🇫🇷 FR' },
|
||||
{ value: 'es', label: '🇪🇸 ES' },
|
||||
|
||||
@ -77,7 +77,7 @@ export const SmartWidget = ({ widget, userId, admin, roleId }) => {
|
||||
)
|
||||
) : (
|
||||
<div className='text-center text-red-400'>
|
||||
Something went wrong, please try again or use a different query.
|
||||
Algo deu errado, tente novamente ou use uma consulta diferente.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -8,7 +8,7 @@ i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
fallbackLng: 'en',
|
||||
fallbackLng: 'pt',
|
||||
detection: {
|
||||
order: ['localStorage', 'navigator'],
|
||||
lookupLocalStorage: 'app_lang_33581',
|
||||
|
||||
@ -95,7 +95,7 @@ export const authSlice = createSlice({
|
||||
|
||||
builder.addCase(loginUser.rejected, (state, action) => {
|
||||
state.errorMessage =
|
||||
String(action.payload) || 'Something went wrong. Try again';
|
||||
state.errorMessage = String(action.payload) || 'Algo deu errado. Tente novamente.';
|
||||
state.isFetching = false;
|
||||
});
|
||||
builder.addCase(findMe.pending, () => {
|
||||
|
||||
7
next-i18next.config.js
Normal file
7
next-i18next.config.js
Normal file
@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
i18n: {
|
||||
locales: ['pt', 'en', 'fr', 'es', 'de'],
|
||||
defaultLocale: 'pt'
|
||||
},
|
||||
reloadOnPrerender: process.env.NODE_ENV === 'development'
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user