This commit is contained in:
Flatlogic Bot 2025-08-23 15:32:59 +00:00
parent 15dd0bbb01
commit 0b89b5a010
10 changed files with 28 additions and 9 deletions

5
.gitignore vendored
View File

@ -1,3 +1,8 @@
node_modules/ node_modules/
*/node_modules/ */node_modules/
*/build/ */build/
**/node_modules/
**/build/
.DS_Store
.env

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{}

View File

@ -25,6 +25,11 @@ const nextConfig = {
hostname: '**', hostname: '**',
}, },
], ],
i18n: {
locales: ['pt', 'en', 'fr', 'es', 'de'],
defaultLocale: 'pt',
},
}, },
}; };

View File

@ -161,10 +161,10 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
<div className='space-y-2'> <div className='space-y-2'>
<h2 className='text-xl font-semibold text-pavitra-900'> <h2 className='text-xl font-semibold text-pavitra-900'>
Something went wrong Algo deu errado
</h2> </h2>
<p className='text-pavitra-800'> <p className='text-pavitra-800'>
We&apos;re sorry, but we encountered an unexpected error. Desculpe, mas ocorreu um erro inesperado.
</p> </p>
</div> </div>

View File

@ -9,6 +9,8 @@ import Select, {
type LanguageOption = { label: string; value: string }; type LanguageOption = { label: string; value: string };
const LANGS: LanguageOption[] = [ const LANGS: LanguageOption[] = [
{ value: 'pt', label: '🇧🇷 PT' },
{ value: 'en', label: '🇬🇧 EN' }, { value: 'en', label: '🇬🇧 EN' },
{ value: 'fr', label: '🇫🇷 FR' }, { value: 'fr', label: '🇫🇷 FR' },
{ value: 'es', label: '🇪🇸 ES' }, { value: 'es', label: '🇪🇸 ES' },

View File

@ -77,7 +77,7 @@ export const SmartWidget = ({ widget, userId, admin, roleId }) => {
) )
) : ( ) : (
<div className='text-center text-red-400'> <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>
)} )}
</div> </div>

View File

@ -8,7 +8,7 @@ i18n
.use(LanguageDetector) .use(LanguageDetector)
.use(initReactI18next) .use(initReactI18next)
.init({ .init({
fallbackLng: 'en', fallbackLng: 'pt',
detection: { detection: {
order: ['localStorage', 'navigator'], order: ['localStorage', 'navigator'],
lookupLocalStorage: 'app_lang_33581', lookupLocalStorage: 'app_lang_33581',

View File

@ -95,7 +95,7 @@ export const authSlice = createSlice({
builder.addCase(loginUser.rejected, (state, action) => { builder.addCase(loginUser.rejected, (state, action) => {
state.errorMessage = state.errorMessage =
String(action.payload) || 'Something went wrong. Try again'; state.errorMessage = String(action.payload) || 'Algo deu errado. Tente novamente.';
state.isFetching = false; state.isFetching = false;
}); });
builder.addCase(findMe.pending, () => { builder.addCase(findMe.pending, () => {

7
next-i18next.config.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
i18n: {
locales: ['pt', 'en', 'fr', 'es', 'de'],
defaultLocale: 'pt'
},
reloadOnPrerender: process.env.NODE_ENV === 'development'
};