Play Framework i18n Messages Hunter

Here's a little bash script to help you out hunting the different translatable labels your Play application has:

The script will search all Java, HTML and JavaScript files for the following candidates:
  • @Messages("")
  • Messages.get("")
  • @Required(message="")
AFAIK this are all possible combinations for a Play application. But wait, if you're using the jquery-i18n-properties jQuery plugin the script will also detect all i18n.prop("') entries in your JavaScript files.

The final result should be something like:

Searching for translatable strings
Matching found translatable strings with the different languages
Sorting matches
Translation missing in en
Translation missing in es
Translation missing in en
Translation missing in es
Looking for duplicated translations in file play/conf/messages.en
Looking for duplicated translations in file play/conf/

Finally, the script will also output the number of duplicated translations.

No hay comentarios:

Publicar un comentario