Page MenuHomePhabricator

Improve a bunch of translation strings
AbandonedPublic

Authored by joshuaspence on Nov 12 2015, 10:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 22, 11:19 AM
Unknown Object (File)
Sat, Mar 16, 7:16 AM
Unknown Object (File)
Fri, Mar 1, 12:03 AM
Unknown Object (File)
Feb 23 2024, 7:51 PM
Unknown Object (File)
Feb 22 2024, 2:44 PM
Unknown Object (File)
Feb 21 2024, 6:02 AM
Unknown Object (File)
Feb 3 2024, 7:14 AM
Unknown Object (File)
Feb 3 2024, 7:13 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 8815
Build 10282: Run Core Tests
Build 10281: 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?

394–395

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.