Page MenuHomePhabricator

Improve a bunch of translation strings
AbandonedPublic

Authored by joshuaspence on Nov 12 2015, 10:16 AM.
Tags
None
Referenced Files
F14047717: D14474.id34995.diff
Thu, Nov 14, 4:58 AM
F14044591: D14474.id34995.diff
Tue, Nov 12, 6:20 PM
F14044314: D14474.id.diff
Tue, Nov 12, 3:40 PM
F14043934: D14474.diff
Tue, Nov 12, 2:04 PM
F14043675: D14474.diff
Tue, Nov 12, 12:04 PM
F14027864: D14474.diff
Fri, Nov 8, 10:01 AM
F14016569: D14474.id35005.diff
Mon, Nov 4, 10:07 AM
F14016568: D14474.id34995.diff
Mon, Nov 4, 10:07 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

Self-explanatory.

Test Plan

Eyeball it.

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8805
Build 10270: Run Core Tests
Build 10269: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Improve a bunch of translation strings.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

Probable catches inline?

src/applications/config/view/PhabricatorSetupIssueView.php
296

phutil_count() / %s?

393–394

phutil_count / %s?

This revision is now accepted and ready to land.Nov 12 2015, 6:34 PM
src/applications/config/view/PhabricatorSetupIssueView.php
296

I started doing this but reverted it because the number isn't actually used:

'You can update these %s value(s) here:' => array(
     'You can update this value here:',
     'You can update these values here:',
   ),

Although maybe it would be better to pass in an instance of PhutilNumber in case some translation wants to display 'You can update %s these values here:'?

Yeah, some language may translate more naturally with the actual number.

OK sure.

Also, there were a bunch of strings that I couldn't change because I have no idea what this method does:

final public static function formatStatusCount(
  $count,
  $limit_string = '%s',
  $base_string = '%d') {
  if ($count == self::MAX_STATUS_ITEMS) {
    $count_str = pht($limit_string, ($count - 1).'+');
  } else {
    $count_str = pht($base_string, $count);
  }
  return $count_str;
}

I think we have to split those out, it's just doing this (except in a junky, untranslatable way):

if ($count > 99) {
  return pht('You have 99+ notifications.');
} else {
  return pht('You have %s notification(s).', new PhutilNumber($count));
}

Couldn't we just build that into PhutilNumber with some setDisplayLimit method?

In theory, but I'd guess some languages may want to represent "99+" in a different way than by adding "+" to the end of the number, and I think notification counts are the only place where we do that.

In theory, but I'd guess some languages may want to represent "99+" in a different way than by adding "+" to the end of the number, and I think notification counts are the only place where we do that.

Right, so you just render it as pht('%d+', $real_count)?

joshuaspence edited edge metadata.

Change a bunch of other stuff... need to eyeball this more thoroughly later...

Not actively working on this.