Translations keyed by labels instead of English text
tr('pnis.delivery_2_to_6_weeks') instead of tr('Delivery: 2 to 6 weeks'): the
English lives once, in src/i18n/en.js (inlined into the page at build, so no
extra request), and it/pt/fr map the same labels. Changing English wording no
longer renames a key in every dictionary.
- 2,899 labels, made from where each text is used and its first words; short
shared words are common.*
- plurals are one label with {one, other}: trn('label', n)
- static markup: data-i18n="label", data-i18n-aria-label, data-i18n-title
- saves from 1.33 and older stored English text in a few places; tr() still
resolves it
- i18n-check: undefined/unused labels, markup drift, plural shape; i18n-add.js
works on labels and --rename updates src/ too
- the old-branch port tool gives old English-keyed code and dictionaries the
same labels
This commit is contained in:
parent
d0ba85ef8f
commit
e817beed1a
94 changed files with 13681 additions and 10633 deletions
|
|
@ -1,23 +1,23 @@
|
|||
/* ================= GOALS ================= */
|
||||
const GOALS=[
|
||||
{id:'bb',t:tr('Light up your first customers'),d:tr('Open your home city and press “Launch broadband”. Eyeballs are people at home watching cat videos. They pay you every month.'),r:5000,ok:()=>Object.values(S.pops).some(p=>p.bb)},
|
||||
{id:'tr',t:tr('Reach the whole internet'),d:tr('Your eyeballs want everything. Buy IP transit from a Tier 1 or Tier 2 in your city. Transit gives you the full routing table.'),r:5000,ok:()=>S.transit.length>0},
|
||||
{id:'ix',t:tr('Join an Internet Exchange'),d:tr('Get a port at an IX: a big shared switch where networks swap traffic for free instead of paying transit.'),r:7500,ok:()=>Object.keys(S.ixp).length>0},
|
||||
{id:'p5',t:tr('Make 5 peering friends'),d:tr('On the Peering tab, request sessions, or join the route server to peer with every open network at once.'),r:10000,ok:()=>R.sessions>=5},
|
||||
{id:'ln',t:tr('Lay your first fiber'),d:tr('Drag from your pink router to another city. Short hops are cheap. Oceans are not.'),r:10000,ok:()=>S.links.length>0},
|
||||
{id:'bz',t:tr('Sign a business customer'),d:tr('Businesses show up with a $ bubble. You need a POP in their city. Check the Deals tab.'),r:12500,ok:()=>S.biz.some(b=>!b.scripted)},
|
||||
{id:'rd',t:tr('Survive a failure'),d:tr('Things break all the time. Build a second path or a second upstream so traffic reroutes when something dies.'),r:12500,ok:()=>S.stats.survived>0},
|
||||
{id:'ca',t:tr('Host an embedded cache'),d:tr('Big CDNs give you free cache boxes once you send them enough traffic. Free bandwidth, just add power.'),r:12500,ok:()=>S.caches.length>0},
|
||||
{id:'pn',t:tr('Set up a PNI'),d:tr('A private cross-connect to one network in the same data center, for when traffic outgrows the IX.'),r:15000,ok:()=>S.pni.some(pniOn)},
|
||||
{id:'scrub',t:tr('Stand up DDoS defences'),d:tr('Build a scrubbing center from a POP\'s Infra tab. It cleans attacks up to its capacity and lets you sell DDoS protection.'),r:20000,ok:()=>hasScrub()},
|
||||
{id:'c3',t:tr('Go global'),d:tr('Have POPs on 3 continents. Subsea cables cost a fortune, so plan the route.'),r:50000,ok:()=>regionsCount()>=3},
|
||||
{id:'t2',t:tr('Become a Tier 2'),d:tr('5+ POPs, ports on 3+ IXs and 15+ peering sessions.'),r:50000,ok:()=>isTier2()},
|
||||
{id:'tb',t:tr('Serve 1 Tbps'),d:tr('A terabit per second of happy traffic.'),r:75000,ok:()=>R.served>=1000},
|
||||
{id:'df',t:tr('Light your own dark fiber'),d:tr('Lease or dig dark fiber, put a DWDM system on it and light a channel. Cheaper per bit than waves, once it works.'),r:40000,ok:()=>S.links.some(l=>l.kind==='df'&&dfCap(l)>0)},
|
||||
{id:'m2',t:tr('Be in two buildings at once'),d:tr('Add a second site in a metro from the Infra tab, so one power cut no longer takes the whole city dark.'),r:30000,ok:()=>Object.values(S.pops).some(p=>p.site2)},
|
||||
{id:'c5',t:tr('Five continents'),d:tr('POPs in five of the six regions on the map.'),r:100000,ok:()=>regionsCount()>=5},
|
||||
{id:'gi',t:tr('Sign a giant'),d:tr('Land an AI WAN, a multi-site training run or a fiber-pairs deal with a hyperscaler. Customer level 4 and a POP near their campus required.'),r:150000,ok:()=>S.biz.some(b=>BIZ_T[b.type]&&BIZ_T[b.type].mega&&!BIZ_T[b.type].event)},
|
||||
{id:'t10',t:tr('Serve 10 Tbps'),d:tr('Ten terabits per second of happy traffic. The giants will notice.'),r:250000,ok:()=>R.served>=10000},
|
||||
{id:'t1',t:tr('Go transit-free: Tier 1!'),d:tr('Peer with every Tier 1 over PNIs and cancel every transit port. Then nobody charges you to reach the internet.'),r:0,win:true,ok:()=>isTier1()},
|
||||
{id:'bb',t:tr('goals.light_up_your_first_customers'),d:tr('goals.open_your_home_city_and_press'),r:5000,ok:()=>Object.values(S.pops).some(p=>p.bb)},
|
||||
{id:'tr',t:tr('goals.reach_the_whole_internet'),d:tr('goals.your_eyeballs_want_everything_buy_ip'),r:5000,ok:()=>S.transit.length>0},
|
||||
{id:'ix',t:tr('goals.join_an_internet_exchange'),d:tr('goals.get_a_port_at_an_ix'),r:7500,ok:()=>Object.keys(S.ixp).length>0},
|
||||
{id:'p5',t:tr('goals.make_5_peering_friends'),d:tr('goals.on_the_peering_tab_request_sessions'),r:10000,ok:()=>R.sessions>=5},
|
||||
{id:'ln',t:tr('goals.lay_your_first_fiber'),d:tr('goals.drag_from_your_pink_router_to'),r:10000,ok:()=>S.links.length>0},
|
||||
{id:'bz',t:tr('goals.sign_a_business_customer'),d:tr('goals.businesses_show_up_with_a_bubble'),r:12500,ok:()=>S.biz.some(b=>!b.scripted)},
|
||||
{id:'rd',t:tr('goals.survive_a_failure'),d:tr('goals.things_break_all_the_time_build'),r:12500,ok:()=>S.stats.survived>0},
|
||||
{id:'ca',t:tr('goals.host_an_embedded_cache'),d:tr('goals.big_cdns_give_you_free_cache'),r:12500,ok:()=>S.caches.length>0},
|
||||
{id:'pn',t:tr('goals.set_up_a_pni'),d:tr('goals.a_private_cross_connect_to_one'),r:15000,ok:()=>S.pni.some(pniOn)},
|
||||
{id:'scrub',t:tr('goals.stand_up_ddos_defences'),d:tr('goals.build_a_scrubbing_center_from_a'),r:20000,ok:()=>hasScrub()},
|
||||
{id:'c3',t:tr('common.go_global'),d:tr('goals.have_pops_on_3_continents_subsea'),r:50000,ok:()=>regionsCount()>=3},
|
||||
{id:'t2',t:tr('goals.become_a_tier_2'),d:tr('goals.5_pops_ports_on_3_ixs'),r:50000,ok:()=>isTier2()},
|
||||
{id:'tb',t:tr('goals.serve_1_tbps'),d:tr('goals.a_terabit_per_second_of_happy'),r:75000,ok:()=>R.served>=1000},
|
||||
{id:'df',t:tr('goals.light_your_own_dark_fiber'),d:tr('goals.lease_or_dig_dark_fiber_put'),r:40000,ok:()=>S.links.some(l=>l.kind==='df'&&dfCap(l)>0)},
|
||||
{id:'m2',t:tr('goals.be_in_two_buildings_at_once'),d:tr('goals.add_a_second_site_in_a'),r:30000,ok:()=>Object.values(S.pops).some(p=>p.site2)},
|
||||
{id:'c5',t:tr('common.five_continents'),d:tr('goals.pops_in_five_of_the_six'),r:100000,ok:()=>regionsCount()>=5},
|
||||
{id:'gi',t:tr('goals.sign_a_giant'),d:tr('goals.land_an_ai_wan_a_multi'),r:150000,ok:()=>S.biz.some(b=>BIZ_T[b.type]&&BIZ_T[b.type].mega&&!BIZ_T[b.type].event)},
|
||||
{id:'t10',t:tr('goals.serve_10_tbps'),d:tr('goals.ten_terabits_per_second_of_happy'),r:250000,ok:()=>R.served>=10000},
|
||||
{id:'t1',t:tr('common.go_transit_free_tier_1'),d:tr('goals.peer_with_every_tier_1_over'),r:0,win:true,ok:()=>isTier1()},
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue