    * @return {string} Language code from locale
   ###
   getLangcode = (locale) ->
-    matched = locale.match(/^(\w*)-?(\w*)-?(\w*)/i)
+    _matched = locale.match(/^(\w*)-?(\w*)-?(\w*)/i)
     # In case of 3 and more matched parts assume that we're dealing with language, wich exists
     # in few forms (like Latin and Cyrillic Serbian (`sr-Latn-CS` and `sr-Cyrl-CS`)
     # For such languages we should output few first parts (`sr-Latn` and `sr-Cyrl`),
     # for other — only first part
-    if matched[3] then matched[1] + '-' + matched[2] else matched[1]
+    if _matched[3] then _matched[1] + '-' + _matched[2] else _matched[1]
 
   # Load and invoke content of l10n files
   # @note In native `xgettext` you can set as many domains as you wish per locale. Usually domains

           * @return {object} Contains all page's properties, including it's sub pages
          ###
          env.addGlobal 'getPage', (obj, path, subName = 'sub') ->
            subbedPath = _.clone(path)
            i = 1
            position = 1
            while i < path.length
              position = if (i > 1) then position + 2 else position
              subbedPath.splice(position, 0, subName)
              i++
            result = _.get(obj, subbedPath)
            if result then result else grunt.log.error('[getPage] can\'t find requested `' + subbedPath + '` inside specified object')

          ###*
           * Expose `moment.js` to Nunjucks' for parsing, validation, manipulation, and displaying dates

   * @return {string} Renamed path
  ###
  humanReadableUrl = (pagepath) ->
    _exclude  = taskConfig.humanReadableUrls.exclude

    _ext      = path.extname(pagepath)
    _basename = path.basename(pagepath, _ext)

    if !_exclude.test(_basename)
      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.
