Fix es translation problems

This commit is contained in:
Paulo Gustavo Veiga 2022-02-05 14:10:37 -08:00
parent 29f3dac8b6
commit a9edf899b7
8 changed files with 40 additions and 30 deletions

View File

@ -3,12 +3,12 @@
"defaultMessage": "¡Este espacio de edición muestra algunas de las capacidades del editor de mapas mentales!" "defaultMessage": "¡Este espacio de edición muestra algunas de las capacidades del editor de mapas mentales!"
}, },
"editor.try-welcome-description": { "editor.try-welcome-description": {
"defaultMessage": "Regístrese para comenzar a crear, compartir y publicar una cantidad ilimitada de mapas mentales de forma gratuita." "defaultMessage": "Registrate para comenzar a crear, compartir y publicar una cantidad ilimitada de mapas mentales de forma gratuita."
}, },
"login.signup": { "login.signup": {
"defaultMessage": "Inscribirse" "defaultMessage": "Crear cuenta"
}, },
"action.share": { "action.share": {
"defaultMessage": "Cuota" "defaultMessage": "Compartir"
} }
} }

View File

@ -2,7 +2,7 @@
"action.share": [ "action.share": [
{ {
"type": 0, "type": 0,
"value": "Cuota" "value": "Compartir"
} }
], ],
"editor.try-welcome": [ "editor.try-welcome": [
@ -14,13 +14,13 @@
"editor.try-welcome-description": [ "editor.try-welcome-description": [
{ {
"type": 0, "type": 0,
"value": "Regístrese para comenzar a crear, compartir y publicar una cantidad ilimitada de mapas mentales de forma gratuita." "value": "Registrate para comenzar a crear, compartir y publicar una cantidad ilimitada de mapas mentales de forma gratuita."
} }
], ],
"login.signup": [ "login.signup": [
{ {
"type": 0, "type": 0,
"value": "Inscribirse" "value": "Crear cuenta"
} }
] ]
} }

View File

@ -11,6 +11,11 @@ import {
DesignerOptionsBuilder, DesignerOptionsBuilder,
Designer Designer
} from '@wisemapping/mindplot'; } from '@wisemapping/mindplot';
import FR from './compiled-lang/fr.json';
import ES from './compiled-lang/es.json';
import EN from './compiled-lang/en.json';
import DE from './compiled-lang/de.json';
declare global { declare global {
var memoryPersistence: boolean; var memoryPersistence: boolean;
@ -43,15 +48,15 @@ export type EditorPropsType = {
function loadLocaleData(locale: string) { function loadLocaleData(locale: string) {
switch (locale) { switch (locale) {
case 'fr': case 'fr':
return import('./compiled-lang/fr.json'); return FR;
case 'en': case 'en':
return import('./compiled-lang/en.json'); return EN;
case 'es': case 'es':
return import('./compiled-lang/es.json'); return ES;
case 'de': case 'de':
return import('./compiled-lang/de.json'); return DE;
default: default:
return import('./compiled-lang/en.json') return EN;
} }
} }
@ -71,8 +76,7 @@ const initMindplot = () => {
}); });
} else { } else {
persistence = new LocalStorageManager( persistence = new LocalStorageManager(
`/c/restful/maps/{id}/${global.historyId ? `${global.historyId}/` : ''}document/xml${ `/c/restful/maps/{id}/${global.historyId ? `${global.historyId}/` : ''}document/xml${!global.isAuth ? '-pub' : ''
!global.isAuth ? '-pub' : ''
}`, }`,
true true
); );

View File

@ -28,7 +28,7 @@ module.exports = {
exclude: '/node_modules/' exclude: '/node_modules/'
}, },
{ {
test: /\.(png|jpe?g|gif|svg)$/, test: /\.(png|jpe?g|gif|svg|json)$/,
type: 'asset/inline', type: 'asset/inline',
}, },
{ {

View File

@ -283,7 +283,7 @@
"defaultMessage": "Iniciar sesión" "defaultMessage": "Iniciar sesión"
}, },
"login.signup": { "login.signup": {
"defaultMessage": "Inscribirse" "defaultMessage": "Crear cuenta"
}, },
"login.title": { "login.title": {
"defaultMessage": "Bienvenido" "defaultMessage": "Bienvenido"
@ -370,7 +370,7 @@
"defaultMessage": "Cambia la contraseña" "defaultMessage": "Cambia la contraseña"
}, },
"menu.signout": { "menu.signout": {
"defaultMessage": "Desconectar" "defaultMessage": "Cerrar sesión"
}, },
"publish.button": { "publish.button": {
"defaultMessage": "Aceptar" "defaultMessage": "Aceptar"

View File

@ -57,16 +57,17 @@ const App = (): ReactElement => {
component={LoginPage} component={LoginPage}
/> />
<Route <Route
path="/c/registration"> path="/c/registration"
component={RegistationPage} component={RegistationPage}
</Route> />
<Route <Route
path="/c/registration-success" path="/c/registration-success"
component={RegistrationSuccessPage} component={RegistrationSuccessPage}
/> />
<Route <Route
path="/c/forgot-password" path="/c/forgot-password"
component={ForgotPasswordPage} /> component={ForgotPasswordPage}
/>
<Route <Route
path="/c/forgot-password-success" path="/c/forgot-password-success"
component={ForgotPasswordSuccessPage} component={ForgotPasswordSuccessPage}

View File

@ -578,7 +578,7 @@
"login.signup": [ "login.signup": [
{ {
"type": 0, "type": 0,
"value": "Inscribirse" "value": "Crear cuenta"
} }
], ],
"login.title": [ "login.title": [

View File

@ -157,8 +157,13 @@ const RegistrationForm = () => {
}; };
const RegistationPage = (): React.ReactElement => { const RegistationPage = (): React.ReactElement => {
const intl = useIntl();
useEffect(() => { useEffect(() => {
document.title = 'Registration | WiseMapping'; document.title = intl.formatMessage({
id: 'registration.title',
defaultMessage: 'Registration | WiseMapping',
});
}); });
return ( return (