Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8131

Calls to Puppet::Util.benchmark should include a 'in %{seconds} seconds' in there message

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.3.4
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide
      • Refactor calls to Puppet::Util.benchmark to pass in a complete message string
      • include "in % {seconds}

        seconds" in the string

      • have benchmark() format the string and and set the number of seconds take msg % " { seconds: seconds }
      • ensure tests and CI continue to pass
      Show
      Refactor calls to Puppet::Util.benchmark to pass in a complete message string include "in % {seconds} seconds" in the string have benchmark() format the string and and set the number of seconds take msg % " { seconds: seconds } ensure tests and CI continue to pass
    • Sub-team:
    • Team:
      Platform Core
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      No Action

      Description

      The Puppet::Util.benchmark method adds to the message (msg) passed into the method. We should instead find all usages of the method and append the 'in %

      {seconds}

      to the string passed in so that it can be included in the original translation message rather than appended separately. (like it as below)

      object.send(level, msg + (_(" in %0.2f seconds") % seconds))

      Making this change will cause the test tests/i18n/check_puppet_run_messages.rb to fail until translation is completed and the translation string in the test is updated (as needed).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                melissa Melissa Stone
                Reporter:
                eric.delaney Eric Delaney
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support