Project

General

Profile

Bug #19176

Parameters and plurals incorrectly translated in select all hosts related strings

Added by Dominic Cleal over 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internationalization
Target version:
Difficulty:
Triaged:
Bugzilla link:
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

Related to Foreman - Bug #16043: Unable to select all hosts from the GUIClosed2016-08-10

Associated revisions

Revision 514767df (diff)
Added by Amir Fefer over 4 years ago

Fixes #19176 - fix translated strings in select all hosts

Revision 8eb71799 (diff)
Added by Amir Fefer over 4 years ago

Fixes #19176 - fix translated strings in select all hosts

History

#1 Updated by Dominic Cleal over 4 years ago

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

#2 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 209

(to match the cause ticket)

#3 Updated by Ohad Levy over 4 years ago

  • Assignee set to Amir Fefer

#4 Updated by Amir Fefer over 4 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?

#5 Updated by The Foreman Bot over 4 years ago

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

#6 Updated by Dominic Cleal over 4 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.)

#7 Updated by Amir Fefer over 4 years ago

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

Also available in: Atom PDF