code: def validate_po_files(configuration, locale_dir, root_dir=None, report_empty=False, check_all=False):
      
      found_problems = False
  
      # List of .po files that are the product of a merge (see generate.py).
      merged_files = configuration.generate_merge.keys()
  
      for dirpath, __, filenames in os.walk(root_dir if root_dir else locale_dir):
          for name in filenames:
              __, ext = os.path.splitext(name)
              filename = os.path.join(dirpath, name)
  
              # Validate only .po files that are not product of a merge (see generate.py) unless check_all is true.
              # If django-partial.po has a problem, then django.po will also, so don't report it.
              if ext.lower() == '.po' and (check_all or os.path.basename(filename) not in merged_files):
  
                  # First validate the format of this file
                  if msgfmt_check_po_file(locale_dir, filename):
                      found_problems = True
  
                  # Check that the translated strings are valid, and optionally
                  # check for empty translations. But don't check English.
                  if "/locale/en/" not in filename:
                      problems = check_messages(filename, report_empty)
                      if problems:
                          report_problems(filename, problems)
                          found_problems = True
  
                      dup_filename = filename.replace('.po', '.dup')
                      has_duplicates = os.path.exists(dup_filename)
                      if has_duplicates:
                          log.warning(" Duplicates found in %s, details in .dup file", dup_filename)
                          found_problems = True
  
                      if not (problems or has_duplicates):
                          log.info(" No problems found in %s", filename)
  
      return found_problems
docs: Validate all of the po files found in the root directory that are not product of a merge.
  
      Returns a boolean indicating whether or not problems were found.