felixzapata / gulp-i18n-pug

Gulp plugin to compile Pug templates with internationalization support based on JS/JSON/YAML files
MIT License
28 stars 4 forks source link

localeExtension options is getting ignored #4

Closed fschucht closed 7 years ago

fschucht commented 7 years ago

When using gulp-pug-i18n the localeExtension options is getting ignored and the html files are always created in the schema of filename.locale.html.

This is my task code:

const PATHS = {
  dist: 'dist',
  templates: 'src/templates/*.pug'
}

gulp.task('translate-templates', () => {
  const options = {
    i18n: {
      dest: PATHS.dist,
      locales: `${PATHS.dist}/translations/*.json`,
      localeExtension: false
    }
  }
  return gulp.src(PATHS.templates)
    .pipe(pugI18n(options))
    .pipe(gulp.dest(PATHS.dist))
})
felixzapata commented 7 years ago

Hi @fschucht it is works. The problem is I made a mistake with the name of the plugin in the other issue and I was not using my plugin.