docs: def _get_po_paths(locales=[]):
      """Returns paths to all relevant po files in the current project."""
      basedirs = [os.path.join('conf', 'locale'), 'locale']
      if os.environ.get('DJANGO_SETTINGS_MODULE'):
          from django.conf import settings
          basedirs.extend(settings.LOCALE_PATHS)
  
      # Gather existing directories.
      basedirs = set(map(os.path.abspath, filter(os.path.isdir, basedirs)))
  
      if not basedirs:
          raise CommandError("This script should be run from the Django SVN tree or your project or app tree, or with the settings module specified.")
  
      po_paths = []
      for basedir in basedirs:
          for locale in locales:
              basedir_locale = os.path.join(basedir, locale, 'LC_MESSAGES')
              for dirpath, dirnames, filenames in os.walk(basedir_locale):
                  for f in filenames:
                      if f.endswith('.po'):
                          po_paths.append(os.path.join(dirpath, f))
      return po_paths