Login page not using i18n

Hi,

I’ve followed this guide to enable Spanish translations of CUBA components. However, I’m facing a problem where the login screen would not be translated to Spanish.

In the app-web module I have the following tree:

src/com/haulmont/cuba/gui/messages.properties
...
loginWindow.okButton = Submit2
...
src/com/haulmont/cuba/gui/messages_es.properties
...
loginWindow.okButton = Enviar
...
src/com/haulmont/cuba/web/messages.properties
@include = com.haulmont.cuba.gui
...
src/com/haulmont/cuba/web/messages_es.properties
@include = com.haulmont.cuba.gui
...
src/es/company/project/web-app.properties
...
cuba.mainMessagePack = +com.haulmont.cuba.web es.company.project.web
...
src/es/company/project/web/messages.properties
...
loginWindow.okButton = Enviar2
...

With this configuration the login page shown is:
imagen

However, if I comment the line from src/es/company/project/web/messages.properties:

src/es/company/project/web/messages.properties
...
#loginWindow.okButton = Enviar2
...

The login page shown instead is:
imagen

In either case, the menu is correctly translated after logging in:
imagen

Does anyone have any clue about why it’s not picking translations for the login page?

Regards,
Bernat.

EDIT: I noticed there is no locale select at the login screen, this might be related.

Hello @Bernat

It is hard to understand what is wrong without a sample. I suggest that there are wrong @include usages in your project.

I’ve prepared my own project that includes Spanish translation. Hope it’ll help you.

login-form-localization.zip (113.6 KB)

spanish_login_form

Regards,
Daniil.

1 Like

Thanks @tsarev, I will check the project you shared and compare its configuration with ours.