dojo-elm-i18n

0.0.6 • Public • Published

Generates "typed" Elm code for a dojo message file.

For every dojo message, it generates an Elm function with the appropriate number of arguments.

Install

npm install -g dojo-elm-i18n

Usage

dojo-elm-i18n -h

Example :

dojo-elm-i18n -m "AppMessages" src/js/foo/bar/nls/messages.js > src/elm/AppMessages.elm

And in Elm code :

import AppMessages exposing (..)

-- under "root", no args
div 
    []
    [ text <| messages.myKey ]

-- nested msg with 2 args
div 
    []
    [ text <| messages.myObj.myKey arg1 arg2 ]

Dependents (0)

Package Sidebar

Install

npm i dojo-elm-i18n

Weekly Downloads

10

Version

0.0.6

License

none

Last publish

Collaborators

  • vankeisb