@sphinxjs/cli
v0.0.1
Published
Command-line interface for Sphinx. Extracts translatable strings, initialises new locale `.po` files, and updates existing ones.
Readme
@sphinxjs/cli
Command-line interface for Sphinx. Extracts translatable strings, initialises new locale .po files, and updates existing ones.
Install
pnpm add -D @sphinxjs/cliOr install globally:
pnpm add -g @sphinxjs/cliCommands
sphinx extract [srcDir]
Scans srcDir (default: src) for gettext calls and writes po/messages.pot.
sphinx extract
sphinx extract app/srcsphinx init <locale>
Creates po/<locale>.po from po/messages.pot using msginit. Also appends the locale to po/LINGUAS.
sphinx init frsphinx update [locale]
Merges new strings from po/messages.pot into existing .po files using msgmerge. Omit locale to update all locales listed in po/LINGUAS.
sphinx update
sphinx update dePrerequisites
sphinx init and sphinx update require the GNU gettext utilities (msginit, msgmerge) to be available on PATH.
