掲示板
Cannot override some tranlations
7年前 に David Knol によって更新されました。
Cannot override some tranlations
Junior Member 投稿: 29 参加年月日: 15/06/19 最新の投稿
Hi,
I would like to override some Liferay's modules tranlations. I am fallowing: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/overriding-a-modules-language-keys
It works but not for all strings. First of all I would like to override some string in journal-lang module (com.liferay.journal.lang), but this module doesn't have servlet context name. How can I override these strings?
I'm also trying to override some core strings (from portal-impl) but some of them remains untranslated. For example "Add Field" (add-field) from defining new form view. Any possible solutions?
I would like to override some Liferay's modules tranlations. I am fallowing: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/overriding-a-modules-language-keys
It works but not for all strings. First of all I would like to override some string in journal-lang module (com.liferay.journal.lang), but this module doesn't have servlet context name. How can I override these strings?
I'm also trying to override some core strings (from portal-impl) but some of them remains untranslated. For example "Add Field" (add-field) from defining new form view. Any possible solutions?
7年前 に Pavel Savinov によって更新されました。
RE: Cannot override some tranlations
Junior Member 投稿: 54 参加年月日: 15/05/29 最新の投稿
Hey David,
In order to override journal-web strings(or any other module that uses *-lang component) you should create a component as mentioned in Knowledge Base, but using bundle.symbolic.name of the exact bundle you want to override, in case of journal it could be com.liferay.journal.web or com.liferay.journal.service, etc..
In order to override journal-web strings(or any other module that uses *-lang component) you should create a component as mentioned in Knowledge Base, but using bundle.symbolic.name of the exact bundle you want to override, in case of journal it could be com.liferay.journal.web or com.liferay.journal.service, etc..
7年前 に David Knol によって更新されました。
RE: Cannot override some tranlations
Junior Member 投稿: 29 参加年月日: 15/06/19 最新の投稿
Thank you! That's the case.
Still, I have problem with some string, which I can't override. For example:
- "Add Field" (add-field) from creating new form webpage (string in portal-impl).
- name of Notifications portlet in Liferay menu
- 'Receive notifications when someone' items (e.g. receive-a-notification-when-someone-adds-a-new-blog-entry-in-a-blog-you-are-subscribed-to) from 'blogs-web' module.
Any idea why it's not working?
Still, I have problem with some string, which I can't override. For example:
- "Add Field" (add-field) from creating new form webpage (string in portal-impl).
- name of Notifications portlet in Liferay menu
- 'Receive notifications when someone' items (e.g. receive-a-notification-when-someone-adds-a-new-blog-entry-in-a-blog-you-are-subscribed-to) from 'blogs-web' module.
Any idea why it's not working?
7年前 に David Knol によって更新されました。
RE: Cannot override some tranlations
Junior Member 投稿: 29 参加年月日: 15/06/19 最新の投稿
Problem with notification configuration is even bigger than I thought. All entries are stored are represented by UserNotificationDefinition object. Their description is get in jsp page via getDescription() method:
All my overriden translations of that entries from different modules are ignored and default ones are returned. How can I fix that?
public String getDescription(Locale locale) {
ResourceBundle resourceBundle = ResourceBundleUtil.getBundle(
"content.Language", locale, getClass());
String description = ResourceBundleUtil.getString(
resourceBundle, _description);
if (description != null) {
return description;
}
return _description;
}
All my overriden translations of that entries from different modules are ignored and default ones are returned. How can I fix that?
7年前 に David Knol によって更新されました。
RE: Cannot override some tranlations
Junior Member 投稿: 29 参加年月日: 15/06/19 最新の投稿
Another question. How can I override translations from 'com.liferay.plugins.admin.web' module? There's no servlet.context.name. Thanks in advance!