tasks/swigtemplates.js
function handleI18nFiles(files) {
      options.locales.forEach(function(locale) {
        grunt.registerTask('swigtemplatesSubtask-' + locale, function() {
          var done = this.async();
          var translatorFactory = options.translateFunction(locale);
          Q.when(translatorFactory, function(translator) { doTranslations(files, locale, translator) }).done(done);
        });
        grunt.task.run('swigtemplatesSubtask-' + locale);
      });
    }
function handleI18nFiles(files) {
      options.locales.forEach(function(locale) {
        grunt.registerTask('swigtemplatesSubtask-' + locale, function() {
          var done = this.async();
          var translatorFactory = options.translateFunction(locale);
          Q.when(translatorFactory, function(translator) { doTranslations(files, locale, translator) }).done(done);
        });
        grunt.task.run('swigtemplatesSubtask-' + locale);
      });
    }
Handle i18n files