0.0.36 • Published 7 months ago

ramilang v0.0.36

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Ramilang

Command-line interface (CLI) tool to handle and validate translations in RamiCustomerPortal.

Features

  • Detect Duplicate Keys: Finds duplicate keys within the translation files.
  • Validate Key Compatibility: Ensures that the keys in different translation files match.
  • Find Missing and Empty Keys: Detects any missing or empty keys.
  • Sort Translation Keys: Option to sort keys in the translation files.
  • Check Unused Keys: Detects keys that are not being used in the codebase (ts and tsx files).
  • Detect Usage of Invalid Keys: Detects usage of keys that does not exist (ts and tsx files).
  • Custom Ignore List: Ability to ignore certain keys from the unused keys check. Useful for keys that are used in a non-standard way, making static analysis hard.
  • Visual Edit Mode: Edit the translations from your browser.

Usage from customer portal turborepo root

Run checks, ignoring unused entries present in .keyignore

pnpm translations

Run checks, ignoring unused entries present in .keyignore and sort keys alphabetically

pnpm translations:sort

Visual edit mode

pnpm translations:edit

Manual usage with pnpm

Running latest version from npm

pnpx ramilang@latest --en-file ./shared/translations/en.json --sv-file ./shared/translations/sv.json

with an ignore list

pnpx ramilang@latest --en-file ./shared/translations/en.json --sv-file ./shared/translations/sv.json --ignore-file ./shared/translations/.keyignore

with alphabetical sorting on keys

pnpx ramilang@latest --sort --en-file ./shared/translations/en.json --sv-file ./shared/translations/sv.json

Arguments

  • --en-file: Path to English translation file.
  • --sv-file: Path to Swedish translation file.
  • --root-dir: Root directory to search from (default is current directory).
  • --ignore-file: Path to file with line separated translation keys to exclude from unused check.
  • --sort: Sort keys alphabetically in translation files.
  • -i: Interactive mode, or edit mode.
0.0.36

7 months ago

0.0.33

8 months ago

0.0.34

8 months ago

0.0.35

8 months ago

0.0.32

8 months ago

0.0.31

8 months ago

0.0.30

8 months ago

0.0.29

8 months ago

0.0.28

8 months ago

0.0.27

8 months ago

0.0.26

8 months ago

0.0.25

9 months ago

0.0.24

9 months ago

0.0.23

9 months ago

0.0.22

9 months ago

0.0.21

9 months ago

0.0.20

9 months ago

0.0.19

9 months ago

0.0.18

9 months ago

0.0.17

9 months ago

0.0.16

9 months ago

0.0.15

9 months ago

0.0.14

9 months ago

0.0.13

9 months ago

0.0.12

9 months ago