ghost-theme-locales

0.0.4 • Public • Published

Ghost Theme Locales (gtl)

CLI tool to create locale json files in Ghost themes.

Table of Contents

Installation

Ensure you have Node.js installed. Then, install GTL globally using npm:

npm install -g ghost-theme-locales

or install locally in your project:

npm install -D ghost-theme-locales

Preparation

Before using this tool prepare your theme files. Use {{t}} in your .hbs files to make the hard coded strings translatable. Know more about {{t}} helper here at Ghost official documentation.

After preparing your theme you can use this tool to generate your language file.

Usage

gtl <command> [options]

Commands

gtl

gtl [option]
Option Description
--version Output the version number
--help Output usage information

gtl create

gtl c [options]

or

gtl create [options]
Option Description Default
-l , --language Language code en
-f , --forceRewrite Force rewrite existing locales file even if it has no new strings false

Developer Setup

  1. Fork this repo
  2. git clone https://github.com/<your-username>/ghost-theme-locales.git path/to/your/workspace
  3. cd path/to/your/workspace
  4. npm install

To run the CLI using your workspace files

  1. npm link
  2. gtl <command> [options] ( you can run anywhere on your system)

Copyright & License

Package Sidebar

Install

npm i ghost-theme-locales

Weekly Downloads

4

Version

0.0.4

License

MIT

Unpacked Size

8.09 kB

Total Files

6

Last publish

Collaborators

  • nk-o