Skip to content

Releases: OnekiDevs/type-locales

Release v3.2.4

24 Apr 00:14

Choose a tag to compare

accept numbers

Release v3.2.3

24 Apr 00:04

Choose a tag to compare

modify types

Release v3.2.2

23 Apr 21:24

Choose a tag to compare

fix nested keys

Release v3.2.1

23 Apr 19:53

Choose a tag to compare

fix script on arch

Release v3.2.0

13 Jan 19:29

Choose a tag to compare

Features

  • lk New shortest export for localeKeys

Release v3.1.2

13 Jan 19:11

Choose a tag to compare

Fix

  • lk New shortest export for localeKeys

Release v3.1.1

13 Jan 06:28

Choose a tag to compare

Fix

  • log Fix logs

Release v3.1.0

13 Jan 06:08

Choose a tag to compare

Features

  • pnpm Add support to pnpm

v2.0.2

22 Feb 19:39

Choose a tag to compare

  • Fix: build
  • Fix: node version

v2.0

22 Feb 10:42
6c9acfc

Choose a tag to compare

Add Translator util

import keys, { 
    LocalesMap // only with the cli option -m
} from './locales.js'

const translator = Translate('en')
console.log(
    tanslator(keys.say.hello, { 
        to: 'Jonh Doe' 
    })
)

New CLI

Usage: type-locales [path] [options]

Arguments:
  path                   path to translate

Options:
  -V, --version          output the version number
  -o, --output <output>  set output file (default: "./locales")
  -l, --lang <lang>      set lang: ts, js o json (default: "ts")
  -m, --mapping          create a mapping for utils (default: true)
  -i, --indent <number>  set indent (default: "2")
  --semi <semi>          use semi (default: false)
  --no-typing            export without typing
  -q, --quiet            quiet mode (default: false)
  -s, --strict           strict mode, check if the files are complet
                         (default: true)
  -r, --recursive        recursive mode in the folder (default: false)
  -D, --development      development mode, does not generate code for
                         production (default: false)
  -h, --help             display help for command