            * @example <a href="{{ localeDir() }}/blog/">blog link</a>
           ###
           env.addGlobal 'localeDir', (locale = currentLocale) ->
-            localeDir = resolveLocaleDir(locale)
+            localeDir = getLocaleDir(locale)
             if localeDir then '/' + localeDir else ''
 
           ###*

  Task = ->
    # Define targets, with unique options and files, for each locale
    locales.forEach (currentLocale) =>
      localeDir = resolveLocaleDir(currentLocale)

      @[currentLocale] = {}


  localesDir = grunt.config('path.source.locales')


  # Output or not locale's dir name based on whether it's base locale or not.
  getLocaleDir = (locale) ->
    urlify(if locale == baseLocale then '' else locale)


  # Load and invoke content of l10n files
