From aab76220c76af92de163a27537c0e9c63a930de6 Mon Sep 17 00:00:00 2001 From: j2blake Date: Tue, 15 Jan 2013 15:37:53 -0500 Subject: [PATCH] NIHVIVO-4011 Create a utility scanner that will look for I18n problems in templates and properties files. --- utilities/i18nChecker/i18nChecker.rb | 143 ++++++++++++ .../i18nChecker/properties_file_checker.rb | 220 ++++++++++++++++++ .../i18nChecker/template_file_checker.rb | 176 ++++++++++++++ 3 files changed, 539 insertions(+) create mode 100644 utilities/i18nChecker/i18nChecker.rb create mode 100644 utilities/i18nChecker/properties_file_checker.rb create mode 100644 utilities/i18nChecker/template_file_checker.rb diff --git a/utilities/i18nChecker/i18nChecker.rb b/utilities/i18nChecker/i18nChecker.rb new file mode 100644 index 00000000..39b14c4a --- /dev/null +++ b/utilities/i18nChecker/i18nChecker.rb @@ -0,0 +1,143 @@ +=begin +-------------------------------------------------------------------------------- + +A utility routine that scans I18n-related properties files and Freemarker +templates for obvious issues. + +Properties files: + Warn if a specialized file has no default version. + Warn about duplicate keys, keys with empty values. + Warn about file reference values with no corresponding file + Warn about keys that do not appear in the default version. + If the "complete" flag is set, + Warn if the default version is not found. + Warn about missing keys, compared to the default version. + +Freemarker templates: + Warn about visible text that contains other than blank space or Freemarker expressions. + Visible text is: + Anything that is not inside a tag and not between