Skip to content

Use config provider

Pre-release
Pre-release
Compare
Choose a tag to compare
@thetutlage thetutlage released this 20 Oct 05:45
· 37 commits to develop since this release

The config/i18n.ts file must be upgraded as follows

import app from '@adonisjs/core/services/app'
import {
  defineConfig,
+ formatters,
+ loaders
} from '@adonisjs/i18n'

export default defineConfig({
  defaultLocale: 'en',
- formatter: 'icu',
+ formatter: formatters.icu(),
  loaders: [
-   {
-     driver: 'fs',
-     location: app.languageFilesPath(),
-   }
+   loaders.fs({
+     location: app.languageFilesPath(),
+   }),
  ],
})

Commits

  • refactor: export formatters and loaders from the main entrypoint 34b92c8
  • style: format source code ff059b8
  • test: improve coverage 6543eec
  • refactor: internals 34da2bc
  • refactor: use config providers for resolving config 377daaa
  • chore: update dependencies 8628f89

Full Changelog: v2.0.0-4...v2.0.0-5