Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed a few typos/word errors

...

messageUtils.pl is a simple perl script which that can be helpful in managing messages.properties files.  It provides two basic features:

  • Searches for unused message codes within a project/module/etc.
  • Compares messages.properties files from different locales for missing message codes

...

Disclaimer: This script has only been used on a single module to date , and is not foolproof.  The script writes all its changes to a separate output file, and I recommend reviewing the outputs before replacing any existing .properties files. Also, make sure to read the limitations of the script as documented below.

...

Code Block
messageUtils.pl -s [MESSAGE_FILE] [TARGET_DIRECTORY] [OUTPUT_FILE]

The script with will load in all the message codes in the message file and search for references to each code in all files in the target directory (and subdirectories, excluding existing .properties files).  The output file will contain all the message codes in the message file, except that all codes that weren't found in the target directory will be moved to the end of the file, after a comment line "NOT FOUND".  The user can then manually triage this list and remove the unused codes.

...