Local message can't be loaded correctly in inherited screen

Hi ,

We found that local messge can’t be loaded correctly in inherited screen. we make a simlpe project for reproducing this issue.

The test screen extended sec$User.browse screen. expected screen is following:

image

all buttons caption should be Chinese,but the we got the following screen:
image

Some button’s caption is not correct.
extendsScreen.zip (80.5 KB)

Hi Ray,

I confirm that standard localization approach doesn’t work if the screen is extended.
The only solution for CUBA 7.0 is to add the required messages right to the message pack of the screen, in your case it is com/company/extendsscreen/web/test/messages.properties:

actions.Reset=重置
actions.ResetAll=重置所有
actions.ResetOptionAll=所有
actions.ResetOptionSelected=选中的
additional=更多
any=任何
caption=用户
changePassw=修改密码
changePasswAtLogon=重置密码
changePasswordAtLogonCompleted=应用到 %s 用户
copy=复制
copySettings=复制设置
print=打印
resetPasswordCompleted=已为%s个用户计划重置密码
resetRememberMe=重置'记住我'
resetRememberMeCompleted=重置'记住我'标记完成
resetRememberMeQuestion=重置所有用户的口令吗?
resetRememberMeTitle=重置所有用户的'记住我'标识吗?

image

For CUBA 7.1 you could also define the original message pack in the extended screen descriptor:

<window xmlns="http://schemas.haulmont.com/cuba/window.xsd" class="com.company.extendsscreen.web.test.ExtUserBrowser"
        messagesPack="com.haulmont.cuba.gui.app.security.user.browse"
        xmlns:ext="http://schemas.haulmont.com/cuba/window-ext.xsd"
        extends="com/haulmont/cuba/gui/app/security/user/browse/user-browse.xml">

But in this case you have to use full format to address messages in the own message pack, e.g.

<button caption="msg://com.company.extendsscreen.web.test/testButtonCaption"/>
1 Like

Hi Konstantin,

Tanks.