i18next / i18next-parser

Parse your code to extract translation keys/values and manage your catalog files
MIT License
472 stars 192 forks source link

Error while following the documentation #929

Closed alexis-exaud closed 10 months ago

alexis-exaud commented 10 months ago

Documentation issue

I'm getting this error: Module '"i18next-parser"' has no exported member 'gulp'.

From this code that is literally copy-pasted from the documentation:

import { gulp as i18nextParser } from 'i18next-parser'

gulp.task('i18next', function () {
  gulp
    .src('app/**')
    .pipe(
      new i18nextParser({
        locales: ['en', 'de'],
        output: 'locales/$LOCALE/$NAMESPACE.json',
      })
    )
    .pipe(gulp.dest('./'))
})

Also, in gulp.task() and gulp.src(), gulp is undefined.

Motivation

I can't use the package if the documentation for the setup is wrong and/or lacking key info...

davidarny commented 5 months ago

@alexis-exaud have you found a way to import parsers?