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

Concatenated strings causing breakages with Japanese group 2

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 5.3.3
    • Fix Version/s: PUP 5.3.4, PUP 5.4.0
    • Component/s: None
    • Labels:
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      No Action

      Description

      There are some concatenated strings in Puppet that are resulting in mistranslations because the translator doesn't have the full context of what the complete sentence is supposed to be, and cannot change the sentence order,

       [centos@ericdelaney lib]$ find . -type f -print | xargs grep '+= _'
      ./puppet/graph/simple_graph.rb:      message += _("Cycle graph written to %{filename}.") % { filename: filename }
      ./puppet/graph/simple_graph.rb:      message += _("Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz")
      ./puppet/parameter/value_collection.rb:      str += _("Valid values are %{value_list}. ") % { value_list: values.join(", ") } unless values.empty?
      ./puppet/parameter/value_collection.rb:      str += _("Valid values match %{pattern}.") % { pattern: regexes.join(", ") } unless regexes.empty?
      ./puppet/pops/lookup/lookup_adapter.rb:        msg += _(". A '%{config}' file should be used instead") % { config: HieraConfig::CONFIG_FILE_NAME } if mp.nil?
      ./puppet/pops/lookup/lookup_adapter.rb:        msg += _(". A '%{config}' file should be used instead") % { config: HieraConfig::CONFIG_FILE_NAME } if ep.nil?
      [centos@ericdelaney lib]$
      

      [centos@ericdelaney puppet]$ find lib -type f -print | xargs grep '_(' | grep '+'
      lib/puppet/face/epp.rb:        raise Puppet::Error, _("One or more file(s) specified did not exist:\n") + missing_files.map { |f| "   #{f}" }.join("\n")
      lib/puppet/face/epp.rb:          raise Puppet::Error, _("One or more file(s) specified did not exist:\n") + missing_files.collect { |f| "   #{f}" }.join("\n")
      lib/puppet/face/help.rb:          summary = face.deprecated? ? face.summary + _(" (Deprecated)") : face.summary
      lib/puppet/face/module/build.rb:      _("Module built: ") + return_value.expand_path.to_s
      lib/puppet/face/module/list.rb:        str << '  ' + colorize(:red, _('invalid'))
      lib/puppet/face/module/list.rb:          str << '  ' + colorize(:red, _('invalid'))
      lib/puppet/face/parser.rb:        raise Puppet::Error, _("One or more file(s) specified did not exist:\n%{files}") % { files: missing_files.collect {|f| " " * 3 + f + "\n"} }
      lib/puppet/face/parser.rb:          dumps + _("One or more file(s) specified did not exist:\n") + missing_files.collect { |f| "   #{f}" }.join("\n")
      lib/puppet/functions/slice.rb:      raise ArgumentError, _("slice(): block must define one parameter, or ") +
      lib/puppet/functions/slice.rb:        _("the same number of parameters as the given size of the slice (%{slice_size}). Block has %{serving_size}; ") % { slice_size: slice_size, serving_size: serving_size }+
      lib/puppet/graph/simple_graph.rb:      message += _("Cycle graph written to %{filename}.") % { filename: filename }
      lib/puppet/graph/simple_graph.rb:      message += _("Try the '--graph' option and opening the resulting '.dot' file in OmniGraffle or GraphViz")
      lib/puppet/module_tool/errors/shared.rb:      trace += @source[1..-1].map { |m| _("which depends on '%{name}' (%{version})") % { name: m[:name], version: v(m[:version]) } }
      lib/puppet/network/http/error.rb:      super(_("Not Acceptable: ") + message, CODE, issue_kind)
      lib/puppet/network/http/error.rb:      super(_("Not Found: ") + message, CODE, issue_kind)
      lib/puppet/network/http/error.rb:      super(_("Not Authorized: ") + message, CODE, issue_kind)
      lib/puppet/network/http/error.rb:      super(_("Bad Request: ") + message, CODE, issue_kind)
      lib/puppet/network/http/error.rb:      super(_("Method Not Allowed: ") + message, CODE, issue_kind)
      lib/puppet/network/http/error.rb:      super(_("Unsupported Media Type: ") + message, CODE, issue_kind)
      lib/puppet/network/http/error.rb:      super(_("Server Error: ") + original_error.message, CODE, issue_kind)
      lib/puppet/parameter/value_collection.rb:      str += _("Valid values are %{value_list}. ") % { value_list: values.join(", ") } unless values.empty?
      lib/puppet/parameter/value_collection.rb:      str += _("Valid values match %{pattern}.") % { pattern: regexes.join(", ") } unless regexes.empty?
      lib/puppet/pops/lookup/lookup_adapter.rb:        msg += _(". A '%{config}' file should be used instead") % { config: HieraConfig::CONFIG_FILE_NAME } if mp.nil?
      lib/puppet/pops/lookup/lookup_adapter.rb:            _("Defining environment_data_provider='%{provider_name}' in environment.conf is deprecated") % { provider_name: provider_name }, env_path + 'environment.conf')
      lib/puppet/pops/lookup/lookup_adapter.rb:              _("The environment_data_provider='%{provider_name}' setting is ignored since '%{config_path}' version >= 5") % { provider_name: provider_name, config_path: config_path }, env_path + 'environment.conf')
      lib/puppet/pops/lookup/lookup_adapter.rb:        msg += _(". A '%{config}' file should be used instead") % { config: HieraConfig::CONFIG_FILE_NAME } if ep.nil?
      lib/puppet/pops/model/ast_transformer.rb:    raise _("Not a valid expression in a collection query: ")+o.class.name
      lib/puppet/util/plist.rb:          Puppet.warning(_("Cannot read file %{file_path}; Puppet is skipping it.\n") % { file_path: file_path } + _("Details: %{detail}") % { detail: detail })
      lib/puppet/util/reference.rb:    "\n\n----------------\n\n*" + _("This page autogenerated on ") + "#{Time.now}*\n"
      lib/puppet/util/reference.rb:    text << _("\n\n**This page is autogenerated; any changes will get overwritten** *(last generated on ") + "#{Time.now.to_s})*\n\n"
      

      /puppet/syntax_checkers/base64.rb
            if (cleaned_text.bytes.to_a.size * 8) % 6 != 0
              msg2 = _("padding is not correct")
            else
              msg2 = _("contains letters outside strict base 64 range (or whitespace)")
            end
            msg = _("Base64 syntax checker: Cannot parse invalid Base64 string - %{msg2}") % { msg2: msg2 }
      

      [centos@ericdelaney puppet]$ find lib -type f -print | xargs grep '_(' | grep '<<'
      lib/puppet/face/module/uninstall.rb:      Puppet.notice _("Preparing to uninstall '%{name}'") % { name: name } << (options[:version] ? " (#{colorize(:cyan, options[:version].sub(/^(?=\d)/, 'v'))})" : '') << " ..."
      lib/puppet/face/module/list.rb:        str << '  ' + colorize(:red, _('invalid'))
      lib/puppet/face/module/list.rb:          str << '  ' + colorize(:red, _('invalid'))
      lib/puppet/forge/errors.rb:      message = _(<<-EOS).chomp % { uri: @uri, response: @response }
      lib/puppet/forge/errors.rb:      message << _("\n  The message we received said '%{message}'") % { message: @message } if @message
      lib/puppet/module_tool/errors/installer.rb:      message << _("Could not install module '%{module_name}' (%{version})") % { module_name: @module_name, version: @requested_version }
      lib/puppet/module_tool/errors/installer.rb:      message << _("  Module '%{module_name}' (%{version}) is already installed") % { module_name: @module_name, version: @installed_version }
      lib/puppet/module_tool/errors/installer.rb:      message << _("    Installed module has had changes made locally") unless @local_changes.empty?
      lib/puppet/module_tool/errors/installer.rb:      message << _("    Use `puppet module upgrade` to install a different version")
      lib/puppet/module_tool/errors/installer.rb:      message << _("    Use `puppet module install --force` to re-install only this module")
      lib/puppet/module_tool/errors/installer.rb:      message << _("Could not install '%{requested_package}'") % { requested_package: @requested_package }
      lib/puppet/module_tool/errors/installer.rb:      message << _("  No releases are available from %{source}") % { source: @source }
      lib/puppet/module_tool/errors/installer.rb:      message << _("    Does '%{requested_package}' have at least one published release?") % { requested_package: @requested_package }
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not %{action} module '%{module_name}' (%{version})") % { action: @action, module_name: @requested_name, version: vstring }
      lib/puppet/module_tool/errors/shared.rb:      message << _("  No version of '%{module_name}' can satisfy all dependencies") % { module_name: @requested_name }
      lib/puppet/module_tool/errors/shared.rb:      message << _("    Use `puppet module %{action} --ignore-dependencies` to %{action} only this module") % { action: @action }
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not %{action} '%{module_name}' (%{version})") % { action: @action, module_name: @module_name, version: vstring }
      lib/puppet/module_tool/errors/shared.rb:        message << _("  No releases are available from %{source}") % { source: @source }
      lib/puppet/module_tool/errors/shared.rb:        message << _("    Does '%{module_name}' have at least one published release?") % { module_name: @module_name }
      lib/puppet/module_tool/errors/shared.rb:        message << _("  No releases matching '%{version}' are available from %{source}") % { version: @requested_version, source: @source }
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: @requested_version }
      lib/puppet/module_tool/errors/shared.rb:        message << _("  Dependency '%{name}' (%{version}) would overwrite %{dir}") % { name: @dependency[:name], version: v(@dependency[:version]), dir: @directory }
      lib/puppet/module_tool/errors/shared.rb:        message << _("  Installation would overwrite %{dir}") % { dir: @directory }
      lib/puppet/module_tool/errors/shared.rb:        message << _("    Currently, '%{name}' (%{version}) is installed to that directory") % { name: @metadata["name"], version: v(@metadata["version"]) }
      lib/puppet/module_tool/errors/shared.rb:        message << _("    Use `puppet module install --ignore-dependencies` to install only this module")
      lib/puppet/module_tool/errors/shared.rb:        message << _("    Use `puppet module install --force` to install this module anyway")
      lib/puppet/module_tool/errors/shared.rb:      trace << _("You specified '%{name}' (%{version})") % { name: @source.first[:name], version: v(@requested_version) }
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not install module '%{module_name}' (%{version})") % { module_name: @requested_module, version: v(@requested_version) }
      lib/puppet/module_tool/errors/shared.rb:      message << _("  No version of '%{module_name}' will satisfy dependencies") % { module_name: @module_name }
      lib/puppet/module_tool/errors/shared.rb:      message << _("    Use `puppet module install --force` to install this module anyway")
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not %{action} module '%{module_name}'") % { action: @action, module_name: @module_name }
      lib/puppet/module_tool/errors/shared.rb:      message << _("  Module '%{module_name}' is not installed") % { module_name: @module_name }
      lib/puppet/module_tool/errors/shared.rb:      message << _("    Use `puppet module install` to install this module") if @action == :upgrade
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not %{action} module '%{module_name}'") % { action: @action, module_name: @module_name }
      lib/puppet/module_tool/errors/shared.rb:      message << _("  Module '%{module_name}' appears multiple places in the module path") % { module_name: @module_name }
      lib/puppet/module_tool/errors/shared.rb:      message << _("    Use the `--modulepath` option to limit the search to specific directories")
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not %{action} module '%{module_name}' (%{version})") % { action: @action, module_name: @module_name, version: vstring }
      lib/puppet/module_tool/errors/shared.rb:      message << _("  Installed module has had changes made locally")
      lib/puppet/module_tool/errors/shared.rb:      message << _("    Use `puppet module %{action} --ignore-changes` to %{action} this module anyway") % { action: @action }
      lib/puppet/module_tool/errors/shared.rb:      message << _("Could not %{action} module '%{module_name}'") % { action: @action, module_name: @name }
      lib/puppet/module_tool/errors/shared.rb:      message << _("  Failure trying to parse metadata")
      lib/puppet/module_tool/errors/shared.rb:      message << _("    Original message was: %{message}") % { message: @error.message }
      lib/puppet/module_tool/errors/uninstaller.rb:      message << _("Could not uninstall module '%{module_name}' (%{version})") % { module_name: @module_name, version: v(@version) }
      lib/puppet/module_tool/errors/uninstaller.rb:      message << _("  No installed version of '%{module_name}' matches (%{version})") % { module_name: @module_name, version: v(@version) }
      lib/puppet/module_tool/errors/uninstaller.rb:        message << _("Could not uninstall module '%{module_name}' (v%{requested_version})") % { module_name: @module_name, requested_version: @requested_version }
      lib/puppet/module_tool/errors/uninstaller.rb:        message << _("Could not uninstall module '%{module_name}'") % { module_name: @module_name }
      lib/puppet/module_tool/errors/uninstaller.rb:      message << _("  Other installed modules have dependencies on '%{module_name}' (%{version})") % { module_name: @module_name, version: v(@installed_version) }
      lib/puppet/module_tool/errors/uninstaller.rb:      message << _("    Use `puppet module uninstall --force` to uninstall this module anyway")
      lib/puppet/module_tool/errors/upgrader.rb:      message << _("Could not upgrade module '%{module_name}' (%{version})") % { module_name: @module_name, version: vstring }
      lib/puppet/module_tool/errors/upgrader.rb:        message << _("  The installed version is already the latest version matching %{version}") % { version: vstring }
      lib/puppet/module_tool/errors/upgrader.rb:        message << _("  There are %{count} newer versions") % { count: @newer_versions.length }
      lib/puppet/module_tool/errors/upgrader.rb:        message << _("    No combination of dependency upgrades would satisfy all dependencies")
      lib/puppet/module_tool/errors/upgrader.rb:          message << _("    Dependencies will not be automatically upgraded across major versions")
      lib/puppet/module_tool/errors/upgrader.rb:          message << _("    Upgrading one or more of these modules may permit the upgrade to succeed:")
      lib/puppet/module_tool/errors/upgrader.rb:      message << _("    Use `puppet module upgrade --force` to upgrade only this module")
      lib/puppet/module_tool/errors/upgrader.rb:      message << _("Could not %{action} module '%{module_name}' (%{version})") % { action: @action, module_name: @module_name, version: vstring }
      lib/puppet/module_tool/errors/upgrader.rb:      message << _("  Downgrading is not allowed.")
      lib/puppet/node/environment.rb:      errors << _("The 'disable_per_environment_manifest' setting is true, and the '%{env_name}' environment has an environment.conf manifest that conflicts with the 'default_manifest' setting.") % { env_name: name }
      lib/puppet/parser/resource.rb:      msg << _(' by %{source}') % { source: current.source.to_s } unless current.source.to_s == ''
      lib/puppet/parser/resource.rb:      msg << _('; cannot redefine')
      lib/puppet/provider/package/nim.rb:        errmsg << _("with version '%{version}' ") % { version: version }
      lib/puppet/reference/providers.rb:            details << _("  - Missing files %{files}\n") % { files: values.join(", ") }
      lib/puppet/reference/providers.rb:                details << _("  - Setting %{name} (currently %{value}) not in list %{facts}\n") % { name: name, value: Puppet.settings.value(name).inspect, facts: facts.join(", ") }
      lib/puppet/reference/providers.rb:                details << _("  - Fact %{name} (currently %{value}) not in list %{facts}\n") % { name: name, value: Facter.value(name).inspect, facts: facts.join(", ") }
      lib/puppet/reference/providers.rb:            details << _("  - Got %{values} true tests that should have been false\n") % { values: values }
      lib/puppet/reference/providers.rb:            details << _("  - Got %{values} false tests that should have been true\n") % { values: values }
      lib/puppet/reference/providers.rb:            details << _("  - Missing features %{values}\n") % { values: values.collect { |f| f.to_s }.join(",") }
      lib/puppet/util/log.rb:    annotated_string << _("Backtrace:") << "\n" << caller[0..10].join("\n")
      lib/puppet/util/logging.rb:        arr << _('Wrapped exception:')
      lib/puppet/util/logging.rb:      arr << _("Wrapped exception:")
      lib/puppet/util/reference.rb:    text << _("\n\n**This page is autogenerated; any changes will get overwritten** *(last generated on ") + "#{Time.now.to_s})*\n\n"
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  eric.delaney Eric Delaney
                  Reporter:
                  larissa Larissa Lane
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support