Foren
I18n bug for Resource Actions
Sandeep Nair, geändert vor 13 Jahren.
I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Hi,
I have created some additional resource actions for one of my custom portlets and added the corresponding action keys in Language.properties. Still it is not picking up the same. i18n works correctly for any other property that i add.
Like if i add for a action named MANAGE in Language.properties as under
action.MANAGE=Manage
It still is showing me action.Manage
Is it a bug?
Its working fine in 5.2.3. It just has problem with resource action related keys in Liferay 6
Regards,
Sandeep
I have created some additional resource actions for one of my custom portlets and added the corresponding action keys in Language.properties. Still it is not picking up the same. i18n works correctly for any other property that i add.
Like if i add for a action named MANAGE in Language.properties as under
action.MANAGE=Manage
It still is showing me action.Manage
Is it a bug?
Its working fine in 5.2.3. It just has problem with resource action related keys in Liferay 6
Regards,
Sandeep
Sandeep Nair, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
I have raised an issue in JIRA for the same
http://issues.liferay.com/browse/LPS-12842
Regards,
Sandeep
http://issues.liferay.com/browse/LPS-12842
Regards,
Sandeep
Hitoshi Ozawa, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Can you attach your portlet.xml and resource file bundle file?
Sandeep Nair, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Thanks
I have attached the same
I have attached the same
Hitoshi Ozawa, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Even though the attached file differs from the description you've provided in this forum, I have to agree with your finding.
Sandeep Nair, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
yeah i tried not to use actual data
Hitoshi Ozawa, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
I'm being to wonder is this is more of just an ordinary bug rather than I18N bug because you're really just using the default property rather than country specific property.
Sandeep Nair, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Yeah but the same thing works in 5.2.3 so it should be 6.0 bug
Prakash Khanchandani, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Expert Beiträge: 329 Beitrittsdatum: 10.02.11 Neueste BeiträgeSandeep Nair:
Yeah but the same thing works in 5.2.3 so it should be 6.0 bug
I read the conversation on this issue.
But could not figure out how to solve this.
If you can provide some steps or ideas it would be helpful.
I m trying this with a custom portlet I built and also have tried the code samples from Liferay in Action book - the Product-Admin Portlet and by deploying this portlet, I am getting the same action.ADD_PRODUCT message instead of just "Add Product".
Any help would be much appreciated
Thanks
Hitoshi Ozawa, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
If you are creating a new portlet and want to internationalize a message in that, please take a look at the Portlet list source code and settings:
https://www.liferay.com/community/forums/-/message_boards/message/7785917
If you just want to overwrite the current message, you'll have to create a hook
https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-language-properties-file
https://www.liferay.com/community/forums/-/message_boards/message/7785917
If you just want to overwrite the current message, you'll have to create a hook
https://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/overriding-a-language-properties-file
Sandeep Nair, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Hi Prakash,
Have confirmed with Liferay and they have confirmed its a bug. To make it work in your portlet.properties of your custom portlet add this
language.bundle=content.Language
Redeploy the portlet and it should work for you.
Regards,
Sandeep
Have confirmed with Liferay and they have confirmed its a bug. To make it work in your portlet.properties of your custom portlet add this
language.bundle=content.Language
Redeploy the portlet and it should work for you.
Regards,
Sandeep
Prakash Khanchandani, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Expert Beiträge: 329 Beitrittsdatum: 10.02.11 Neueste Beiträge
Thanks for the reply Hitoshi and Sandeep.
But still it is not working as you suggested.
Here are the steps I followed in case it will help (these are the only steps to follow I suppose)
1) I have defined the permission in resource-actions/default.xml as <action-key>MANAGE_PRODUCT<action-key>.
2) I created the key in my content/Language.properties as action.MANAGE_PRODUCT=Manage Product
3) I created the key language.bundle=content.Language in my portlet.properties as suggested.
4) I also stopped the server, re-deployed and restarted the server.
But when I go to Portal --> Roles --> My Custom Role --> Define Permissions; it still shows the same key action.MANAGE_PRODUCT instead of just Manage Product.
5) I also created the liferay-hook.xml in this same portlet with the following code (not a best practice):
and also tried with a slash (/) before content (just in the hope that it works)
But still no luck.
Enviornment: Liferay & plugins SDK - 6.0.5, Tomcat 6.0.26, Eclipse Helios, Liferay IDE 1.1
Do I need to do something other than the above, something I am missing?
Thank you once again.
But still it is not working as you suggested.
Here are the steps I followed in case it will help (these are the only steps to follow I suppose)
1) I have defined the permission in resource-actions/default.xml as <action-key>MANAGE_PRODUCT<action-key>.
2) I created the key in my content/Language.properties as action.MANAGE_PRODUCT=Manage Product
3) I created the key language.bundle=content.Language in my portlet.properties as suggested.
4) I also stopped the server, re-deployed and restarted the server.
But when I go to Portal --> Roles --> My Custom Role --> Define Permissions; it still shows the same key action.MANAGE_PRODUCT instead of just Manage Product.
5) I also created the liferay-hook.xml in this same portlet with the following code (not a best practice):
<hook>
<language-properties>content/Language.properties</language-properties>
</hook>
and also tried with a slash (/) before content (just in the hope that it works)
<hook>
<language-properties>/content/Language.properties</language-properties>
</hook>
But still no luck.
Enviornment: Liferay & plugins SDK - 6.0.5, Tomcat 6.0.26, Eclipse Helios, Liferay IDE 1.1
Do I need to do something other than the above, something I am missing?
Thank you once again.
Sandeep Nair, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Hmm. It should work with property being mentioned in portlet.properties. It had for me. But then i also recall that sometimes even if you modify portlet.properties the change doesnot reflected. so you may want to delete the portlet from temp and work, delete the portlet from webapp and then redeploy portlet. hopefully it should work.
Regards,
Sandeep
Regards,
Sandeep
Prakash Khanchandani, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Expert Beiträge: 329 Beitrittsdatum: 10.02.11 Neueste Beiträge
Thanks Sandeep,
I stopped the server, removed the portlet from work/catalina/localhost folder and also from webapps.
Redeployed and thats it.. the elusive value of the key finally made its appearance ...
It worked
Regards,
Prakash
I stopped the server, removed the portlet from work/catalina/localhost folder and also from webapps.
Redeployed and thats it.. the elusive value of the key finally made its appearance ...
It worked
Regards,
Prakash
Sandeep Nair, geändert vor 13 Jahren.
RE: I18n bug for Resource Actions
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Glad that worked for you