Project

General

Profile

Actions

Bug #19176

closed

Parameters and plurals incorrectly translated in select all hosts related strings

Added by Dominic Cleal about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

#16043 has a number of bad string extractions for translation, in violation of Translating.

  1. A few instances where a variable is interpolated before being passed to _(), e.g. _("Reminder: <strong> All #{hosts.size} hosts are selected </strong>")
  2. Many instances where the source string uses plural language, but the n_() plural method isn't used, e.g. the line above or __("Select all<b> %s </b> hosts")
  3. Trailing whitespace in translated strings, e.g. __("All <b> %d </b> hosts are selected. "). If significant, it should be added after translation.

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #16043: Unable to select all hosts from the GUIClosedAmir Fefer08/10/2016Actions
Actions #1

Updated by Dominic Cleal about 7 years ago

  • Related to Bug #16043: Unable to select all hosts from the GUI added
Actions #2

Updated by Dominic Cleal about 7 years ago

  • translation missing: en.field_release set to 209

(to match the cause ticket)

Actions #3

Updated by Ohad Levy about 7 years ago

  • Assignee set to Amir Fefer
Actions #4

Updated by Amir Fefer about 7 years ago

I don't quite sure if plural method suits in this case,
those sentences should be always in plural, because it about multiple host selection, right?

Actions #5

Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4457 added
Actions #6

Updated by Dominic Cleal about 7 years ago

Amir Fefer wrote:

those sentences should be always in plural, because it about multiple host selection, right?

If they're always multiple then they absolutely should be using plural translation functions. Plural forms are more complex than simply one or many. (And in any case, "multiple" may still be one host.)

Actions #7

Updated by Amir Fefer almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF