•  
      request #11176 Use babel-plugin-react-gettext-parser to extract gettext from Vue
    Infos
    #11176
    Joris MASSON (jmasson)
    2018-06-25 12:38
    2018-02-21 16:58
    11510
    Details
    Use babel-plugin-react-gettext-parser to extract gettext from Vue
    Using our "make generate-po" script has too many constraints with Vue files. We can't have multi-line class attributes and are forced to trick the program to accept our files by adding unnecessary parentheses. It also breaks on template strings.

    A first solution is to use babel-plugin-react-gettext-parser. It works fine for .vue (through vue-loader) and .js files, and since it targets JSX, it should have no problem parsing ES2018.
    Other
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Empty
    Closed
    2018-06-25
    Attachments
    Empty
    References
    Referenced by request #11176

    Follow-ups

    User avatar
    Joris MASSON (jmasson)2018-06-25 12:38
    We won't be going through that path after all.
    We have chosen another way of doing things: we will use <translate> tags in Vue template and are working with easygettext project to extract translations from <script> tags.
    Having translations in the template is the "normal" use case and has much more value.

    • Status changed from Under review to Closed
    • Close date set to 2018-06-25