Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-8512

I18n for dashboard-metrics plugin in Cockpit (ee)

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.9.0, 7.9.0-alpha1
    • None
    • cockpit
    • None

      1. in HTML files all verbal texts are replaced with meaningful tokens which are piped to the angular translate filter
        <p>{{ 'EXAMPLE_TOKEN' | translate }}</p>
        
      2. in JS files all verbal texts are replaced with meaningful tokens - the instant method of the $translate provider is applied to the tokens
        $translate.instant('EXAMPLE_TOKEN');
        
      3. all tokens are stored in src/main/resources-plugin/cockpit/locales/en.json
      4. use a meaningful prefix like "PLGN_MTRCS_..." for the tokens to make clear that they belong together
      5. do not split up coherent sentences in multiple tokens if the sentences contain one or more variables. Neither in the HTML nor JS files. Use the following way instead to handle such situations:
        <p>{{ 'BATCHES_PROGRESS_FAILED' | translate:'{jobs: selection.failedJobs}' }}</p>
        
        $translate.instant('SERVICES_RESOURCE', {status: errorResponse.status})
        
        {
          ...
          "BATCHES_PROGRESS_FAILED" : "Failed {{jobs}}",
          ...
          "SERVICES_RESOURCE": "Received {{status}} from server.",
          ...
        }
        
      6. punctuation signs should be stored in the translation file also
      7. no further configurations are necessary (e. g. Gruntfile, etc.)

        This is the controller panel for Smart Panels app

              michael.schoettes Michael Schoettes
              tassilo.weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: