1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Fix some edge strings; particularly revision editing

Summary:
These didn't get translated quite right:

  - We need to use `$total_count` because some languages have different words for 1, 2-3, and 4+ things (for example). So the strings might translate as:
    - alincoln added a reviewer-one ...
    - alincoln added reviewers-few ...
    - alincoln added reviewers-many ...
  - That is, while English has only "reviewer" and "reviewers", other languages have more plural forms, and "reviewer", "reviewers-few" and "reviewers-many" may be completely different words.
  - In English, because we know we always have 2+ in this branch and the only special word is for 1, we can just drop this.
  - Anyway, the %4$s stuff is counting assuming that $total_count is included in the string, so these were a off by one.
  - See also D11160.

There a probably a couple more of these, but they should be easy enough to hunt down as they crop up.

Test Plan: Saw nice strings instead of empty strings, or invalid strings (after D11160).

Reviewers: joshuaspence, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D11162
This commit is contained in:
epriestley 2015-01-02 13:48:08 -08:00
parent 61e26cd242
commit 7cbaad5cd1
2 changed files with 8 additions and 3 deletions

View file

@ -46,8 +46,9 @@ final class DifferentialRevisionHasReviewerEdgeType
$rem_edges) {
return pht(
'%s edited reviewer(s), added %s: %s; removed %s: %s.',
'%s edited %s reviewer(s), added %s: %s; removed %s: %s.',
$actor,
$total_count,
$add_count,
$add_edges,
$rem_count,
@ -92,8 +93,9 @@ final class DifferentialRevisionHasReviewerEdgeType
$rem_edges) {
return pht(
'%s edited reviewer(s) for %s, added %s: %s; removed %s: %s.',
'%s edited %s reviewer(s) for %s, added %s: %s; removed %s: %s.',
$actor,
$total_count,
$object,
$add_count,
$add_edges,

View file

@ -359,9 +359,12 @@ abstract class PhabricatorBaseEnglishTranslation
),
),
'%s edited reviewer(s), added %s: %s; removed %s: %s.' =>
'%s edited %s reviewer(s), added %s: %s; removed %s: %s.' =>
'%s edited reviewers, added: %4$s; removed: %6$s.',
'%s edited %s reviewer(s) for %s, added %s: %s; removed %s: %s.' =>
'%s edited reviewers for %3$s, added: %5$s; removed: %7$s.',
'%s added %s reviewer(s): %s.' => array(
array(
'%s added a reviewer: %3$s.',