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

I18n strings that include repeated lists of sentence fragments can be hard to translate

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 5.3.4, PUP 5.4.0
    • None
    • None
    • Not Needed
    • No Action

    Description

      We need to review the PO file and source code of puppet looking for strings where we build up a list of things where we include sentence fragment in the repeated list and determine if this should be change to allow for better translations

      For example the below code includes a sentence fragment "which depends on" which will be hard to translate into Japanese, We should create a list of cases, review them and determine which ones we want to change string in.

      lib/puppet/module_tool/errors/shared.rb

      _("    which depends on '%{name}' (%{version})") % { name: m[:name], version: v(m[:version]) }

            dependency_list = @source[1..-1].map do |m|
              #TRANSLATORS This message repeats as separate lines as a list under the heading "You specified '%{name}' (%{version})\n"
              _("    which depends on '%{name}' (%{version})") % { name: m[:name], version: v(m[:version]) }
            end.join(",\n")
       
            msg_variables = { requested_module: @requested_module, version: v(@requested_version), module_name: @module_name,
                              name: @source.first[:name], dependency_list: dependency_list }
            _(<<-EOM).chomp % msg_variables
      Could not install module '%{requested_module}' (%{version})
        No version of '%{module_name}' will satisfy dependencies
          You specified '%{name}' (%{version})
      %{dependency_list}
          Use `puppet module install --force` to install this module anyway
            EOM
      

      We should look to update the repeated list text to be (and remove the TRANSLATOR comment)

              _("    This depends on '%{name}' (%{version})") % { name: m[:name], version: v(m[:version]) }
      

      Attachments

        Issue Links

          Activity

            People

              eric.delaney Eric Delaney
              eric.delaney Eric Delaney
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support