-
Notifications
You must be signed in to change notification settings - Fork 308
UI for displaying verified country for ~users #4005
Conversation
Capped to two in 31056d4: |
The options aren't great here, because of the way the sprite image is built: since not all flags are the same form factor (I'm looking at you, Nepal), it's hard to put styles on individual flags. I want to keep them on the banner for now since they're part of the basic metadata about a participant. I think they're good enough for now. |
It'd be helpful for |
Hmm ... the small flags from www.flag-sprites.com are a little too small ... |
Alright, tightened up a bit, will probably look gross for Nepal though ... |
31056d4
to
aebaeb3
Compare
Actually, not too bad. |
Or a simple checkmark? "Verified!" |
#!/usr/bin/env python2
from __future__ import absolute_import, division, print_function, unicode_literals
from gratipay import wireup
env = wireup.env()
db = wireup.db(env)
# copy/pasted from flags.scss
have = set("""\
AD AE AF AG AI AL AM AN AO AR AS AT AU AW AZ BA BB BD BE BF BG BH BI BJ BM BN BO BR BS BT BW BY BZ
CA CD CF CG CH CI CK CL CM CN CO CR CU CV CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FM FO
FR GA GB GD GE GG GH GI GL GM GN GP GQ GR GT GU GW GY HK HN HR HT HU ID IE IL IM IN IQ IR IS IT JE
JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MG MH MK ML
MM MN MO MQ MR MS MT MU MV MW MX MY MZ NA NC NE NG NI NL NO NP NR NZ OM PA PE PF PG PH PK PL PR PS
PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SI SK SL SM SN SO SR ST SV SY SZ TC TD TG TH TJ TL TM
TN TO TR TT TV TW TZ UA UG US UY UZ VA VC VE VG VI VN VU WS YE ZA ZM ZW""".split())
want = {c.code2: c.name for c in db.all('select * from countries')}
missing = set(want) - have
extra = have - set(want)
print()
print("Missing flags:")
for code2 in sorted(missing):
print(" ", code2, want[code2])
print()
print("Extra flags:")
for code2 in sorted(extra):
print(" ", code2)
print() |
#4005 (comment) addressed in 7a9378e. |
The last big thing here is figuring out how we're going to do country names and i18n. It's an exponential problem: we want all countries translated into all languages. And it kinda depends on the phrasing we use: "Verified in the Netherlands," or just "The Netherlands"? Tweaking the wording just a little bit would ripple out into 250 countries x however many languages. |
We can reduce the surface area somewhat by focusing on particular countries. This gets me thinking ahead to #2449: when we start verifying identity programmatically, we're going to have to scope our efforts to just a few countries at first, expanding from there. At some point I put together a list of the countries already represented on Gratipay ... now where is that ... |
|
TTO isn't on there, I note ... |
Hmmm ... https://github.com/onomojo/i18n-country-translations? |
That's a nice place to start. However, I think we'll have to let go of a construction such as "verified in the Netherlands" and go with something like "verified in: Netherlands." |
Nevermind ... Babel already gives us this!
The old identities form uses it. |
Oh yeeeeeeeaaaaaaahhhhh! |
Still not showing up in Sphinx, though, hmm ...
So we can find people with an identity during development, to test their pages
36262a3
to
2e43a48
Compare
|
Alright, scrapping this one for parts ... |
Part of #3994. Land #3976 first.
Punchlist
is_verified
filterPushing Back Upstream
is_verified
before slicing: add schema and Python for [un]verifying identities #4001 (comment)