 ###
 
 module.exports = (grunt) ->
+  # ======
+  # Config
+  # ======
+
   taskConfig =
     autoescape          : false
     data:

      pagepath = pagepath.replace(_basename + _ext, _basename + '/index' + _ext)
    pagepath

  # Output or not locale's dir name based on whether it's base locale or not.
  getLocaleDir = (locale) ->
    _baseUrl = _.find(taskConfig.i18n.locales, { locale: locale }).url
    _url = if _baseUrl then _baseUrl else locale

    # for other — only first part
    if _matched[3] then _matched[1] + '-' + _matched[2] else _matched[1]

  # ===============
  # Load l10n files
  # ===============
  # @note In native `xgettext` you can set as many domains as you wish per locale. Usually domains
  #       represented in form of separate l10n files per singe locale. However, `node-gettext` using domains
  #       for holding locales and switching between them. To workaround that issue, following code will
