Uploaded image for project: 'Magnolia CLI'
  1. Magnolia CLI
  2. NPMCLI-91

Move CLI "texts" into a common resource bundle file (i18n)

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 2.1.0
    • None
    • None
    • Basel 86
    • 5

      Issue

      At the moment, all texts addressed to CLI users are widespread among command-js-files.
      I propose to move these texts into one resource bundle file (most probably a json file).

      Motivation

      docs maintenance

      tbh - my first motivation was rather selfish and documentation centric. With such a common resource bundle file - i could read it and use with a Confluence macro. This would in the long run reduce the amount of work of maintenance of the (CLI) documentation.

      18n

      I do not expect that we will create translations for other languages in the near future - however - it doesn't hurt to make it 18n ready now - but it may hurt in future.

      Ease of linguistic review

      During the NOW development we have seen that it is impossible for a linguist to make a UI text review, if the texts are hardcoded and widespread among code files. But to have the texts in one single (json) file makes it very easy for a non developer to review the text and to polish them. (Guys as Martin or Julie could do such a text review.)

      etc.

      I already had a quick SKYPE call with robertkowalski whether this is feasible and common practice in the CLI / NPM world too - which he confirmed.
      Robert also has mentioned, that at the moment many files are touched anyway. So - i18n-ization could be done additionally while fixing / improving other things. (Just make sure to have separate commits.)

      Keys

      If the ticket will be tackled - we would have to find a suitable naming convention for good keys.
      I could propose here some ideas - if desired - since i already was thinking about a bit.
      However - other guys have a lot of experience in this topic too.
      Basically i would expect something like
      $commandName.$topic, e.g. create-page.sucess-next-step-tip

        Acceptance criteria

              rkowalski Robert Kowalski
              cmeier Christoph Meier
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD