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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Labels:
      None
    • Sprint:
      Basel 86
    • Story Points:
      5

      Description

      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 Robert Kowalski 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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: