Forums de discussion

Unused messages in Language.properties file

thumbnail
Hitoshi Ozawa, modifié il y a 13 années.

Unused messages in Language.properties file

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
I'm finding some unused messages in Language.properties file. I tried grepping the source and the Tomcat bundle but some messages keys have no corresponding file.

I've found some jsp files with incorrect message keys but I just can't find where some messages are actually used.

I'm beginning to think there are many used messages in Language.properties file and it's just getting bloated by it. More translators will probably become more interested if these messages are deleted so there is less number of messages to translate.
thumbnail
Amos Fong, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 2047 Date d'inscription: 07/10/08 Publications récentes
I have a feeling there are quite a lot of unused keys as well...

Perhaps we can add something to ant build-lang or format-source to also check for any unused keys and delete them.
thumbnail
Hitoshi Ozawa, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
It is also possible to gather all instances of references in codes which doesn't have matching keys in the properties file? I'm finding some mismatched references to keys which is preventing the messages to be translated.
thumbnail
Hitoshi Ozawa, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Just as a note, please do the dangling messages in source code before finding and deleting unused messages.
thumbnail
Corné Aussems, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 1313 Date d'inscription: 03/10/06 Publications récentes
please note that plugin developers possibly use the un-used keys in their software.
maybe we could introduce a (deprecated) syntax
thumbnail
Hitoshi Ozawa, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Corné Aussems:
please note that plugin developers possibly use the un-used keys in their software.
maybe we could introduce a (deprecated) syntax


That's why I thought it would be better to just leave the plugin properties in plugin's own property file instead of the global Liferay's global Language.properties. It's very difficult to verify correctness and maintain especially when on replaces or upgrade a "standard" portlet that have some changes with the current.
thumbnail
Julio Camarero, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 1668 Date d'inscription: 15/07/08 Publications récentes
Hi Hitoshi,

I totally agree with you, that plugin-specific keys should be only in those plugins. The problem is that with our current translation system, most translators only translate the portal file and therefore people in liferay moved some keys to this file.

Once we have a web translation tool that allows us to centralize all the keys in one place, we could move specific keys to their respective plugins. I think this is one of the most important benefits we would have with a web translation tool.

cheers!
thumbnail
Hitoshi Ozawa, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Hi Julio,

I don't mind people using the web translation system, but unless Liferay clean up the current messages beforehand, you're going to have a mess.
thumbnail
Julio Camarero, modifié il y a 13 années.

RE: Unused messages in Language.properties file

Liferay Legend Publications: 1668 Date d'inscription: 15/07/08 Publications récentes
Hi Hitoshi,

you are right. I think that once we have a web system with all the translations aggregated we should start moving plugin-specific language keys to their respective language files and cleaning the global Language.properties.

I like the idea to deprecate for one version and remove them definitively for the next one.

cheers!