Foros de discusión

Unused messages in Language.properties file

thumbnail
Hitoshi Ozawa, modificado hace 13 años.

Unused messages in Language.properties file

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
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, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
Just as a note, please do the dangling messages in source code before finding and deleting unused messages.
thumbnail
Corné Aussems, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 1313 Fecha de incorporación: 3/10/06 Mensajes recientes
please note that plugin developers possibly use the un-used keys in their software.
maybe we could introduce a (deprecated) syntax
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 1668 Fecha de incorporación: 15/07/08 Mensajes recientes
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, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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, modificado hace 13 años.

RE: Unused messages in Language.properties file

Liferay Legend Mensajes: 1668 Fecha de incorporación: 15/07/08 Mensajes recientes
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!