Page MenuHomePhabricator

Make notification counts properly translatable
ClosedPublic

Authored by epriestley on Dec 2 2015, 7:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 3:07 AM
Unknown Object (File)
Wed, Apr 24, 3:17 AM
Unknown Object (File)
Wed, Apr 24, 3:16 AM
Unknown Object (File)
Wed, Apr 24, 3:16 AM
Unknown Object (File)
Thu, Apr 11, 7:39 AM
Unknown Object (File)
Wed, Apr 10, 9:24 AM
Unknown Object (File)
Mon, Apr 8, 10:31 PM
Unknown Object (File)
Sun, Mar 31, 4:43 AM
Subscribers

Details

Summary

Ref T9132. When I've touched PhabricatorApplication I keep hitting this bad pht() junk.

The warning is correct, these strings are not extactable and can not be translated.

Fix it so they can be extracted and translated.

Broadly, in all cases we want to render one of these:

95 Things (for fewer than some limit)
99+ Things (when we hit the limit)

Test Plan

Looked at homepage status counts, moused over them, saw reasonable strings. Grepped for removed method.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make notification counts properly translatable.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

@joshuaspence, I think we bumped into this somewhere else but I don't recall where. Might already have been fully resolved, or could have been in a dream.

chad edited edge metadata.
This revision is now accepted and ready to land.Dec 2 2015, 7:39 PM

How about adding a setLimit method to PhutilNumber instead?

Ah, right. I might have responded elsewhere, but my concerns are:

  • We only have this one use case.
  • I don't know that "add a + on the end" is the right rule for every language (for example, maybe "99+" in Spanish localizes better as "99~" or "¡99!").
  • The best localization of "99+" might depend on the rest of the sentence?

Basically, tiny known upside and big unknown possible downsides.

The best localization of "99+" might depend on the rest of the sentence?

Yeah, that would complicate it.

This revision was automatically updated to reflect the committed changes.