зеркало из https://github.com/mozilla/bedrock.git
Bug 1088752: Add Shape of the Web app to serve JSON.
Shape of the Web is a standalone site that pulls data from JSON files. In order to make the l10n easier initially, we’re going to host the JSON files on Bedrock to take advantage of the existing l10n process. Also adds a middleware to handle adding CORS headers to the locale redirects when loading the JSON.
This commit is contained in:
Родитель
305192aae8
Коммит
fb8102491c
|
@ -4,6 +4,7 @@
|
|||
|
||||
import datetime
|
||||
from email.utils import formatdate
|
||||
import re
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
|
@ -45,3 +46,17 @@ class MozorgRequestTimingMiddleware(GraphiteRequestTimingMiddleware):
|
|||
else:
|
||||
f = super(MozorgRequestTimingMiddleware, self)
|
||||
f.process_view(request, view, view_args, view_kwargs)
|
||||
|
||||
|
||||
class CrossOriginResourceSharingMiddleware(object):
|
||||
|
||||
def process_response(self, request, response):
|
||||
"""
|
||||
If the URL pattern for the request matches one of those
|
||||
in the CORS_URLS setting, apply the matching
|
||||
Access-Control-Allow-Origin header to the response.
|
||||
"""
|
||||
for pattern, origin in settings.CORS_URLS.items():
|
||||
if re.search(pattern, request.path):
|
||||
response['Access-Control-Allow-Origin'] = origin
|
||||
return response
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
from bedrock.mozorg.middleware import CrossOriginResourceSharingMiddleware
|
||||
from bedrock.mozorg.tests import TestCase
|
||||
|
||||
|
||||
class TestCrossOriginResourceSharingMiddleware(TestCase):
|
||||
def setUp(self):
|
||||
self.middleware = CrossOriginResourceSharingMiddleware()
|
||||
self.request = HttpRequest()
|
||||
self.response = HttpResponse()
|
||||
|
||||
def test_match(self):
|
||||
self.request.path = '/foo/bar/baz/'
|
||||
|
||||
cors_urls = {r'^/foo/bar': '*'}
|
||||
with self.settings(CORS_URLS=cors_urls):
|
||||
self.middleware.process_response(self.request, self.response)
|
||||
self.assertEqual(self.response['Access-Control-Allow-Origin'], '*')
|
||||
|
||||
def test_middle_match(self):
|
||||
# Ensure that matches in the middle of the URL work.
|
||||
self.request.path = '/foo/bar/baz/'
|
||||
|
||||
cors_urls = {r'/bar': '*'}
|
||||
with self.settings(CORS_URLS=cors_urls):
|
||||
self.middleware.process_response(self.request, self.response)
|
||||
self.assertEqual(self.response['Access-Control-Allow-Origin'], '*')
|
||||
|
||||
def test_no_match(self):
|
||||
self.request.path = '/foo/bar/baz/'
|
||||
|
||||
cors_urls = {r'^/biff/bak': '*'}
|
||||
with self.settings(CORS_URLS=cors_urls):
|
||||
self.middleware.process_response(self.request, self.response)
|
||||
self.assertFalse('Access-Control-Allow-Origin' in self.response)
|
|
@ -1057,6 +1057,7 @@ MIDDLEWARE_CLASSES = (
|
|||
'dnt.middleware.DoNotTrackMiddleware',
|
||||
'lib.l10n_utils.middleware.FixLangFileTranslationsMiddleware',
|
||||
'bedrock.mozorg.middleware.ConditionalAuthMiddleware',
|
||||
'bedrock.mozorg.middleware.CrossOriginResourceSharingMiddleware',
|
||||
))
|
||||
|
||||
AUTHENTICATED_URL_PREFIXES = ('/admin/', '/rna/')
|
||||
|
@ -1106,6 +1107,7 @@ INSTALLED_APPS = get_apps(exclude=(
|
|||
'%s.events' % PROJECT_MODULE,
|
||||
'%s.releasenotes' % PROJECT_MODULE,
|
||||
'%s.thunderbird' % PROJECT_MODULE,
|
||||
'%s.shapeoftheweb' % PROJECT_MODULE,
|
||||
|
||||
# libs
|
||||
'django_extensions',
|
||||
|
@ -1416,6 +1418,10 @@ RNA = {
|
|||
MOFO_SECURITY_ADVISORIES_PATH = path('mofo_security_advisories')
|
||||
MOFO_SECURITY_ADVISORIES_REPO = 'https://github.com/mozilla/foundation-security-advisories.git'
|
||||
|
||||
CORS_URLS = {
|
||||
r'^/([a-zA-Z-]+/)?shapeoftheweb': '*',
|
||||
}
|
||||
|
||||
LOGGING = {
|
||||
'root': {
|
||||
'level': 'WARNING',
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,745 @@
|
|||
{# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. -#}
|
||||
{
|
||||
"topics": {
|
||||
"access": {
|
||||
"name": "Access",
|
||||
"tagline": "Everyone is able to participate",
|
||||
"issues": {
|
||||
"available": {
|
||||
"name": "Availability",
|
||||
"title": "Who's online?",
|
||||
"narrative": "Internet usage is spreading like wildfire, and that’s a good thing. The more people connected to the network, the more powerful that network can be. This process will only accelerate as the price for access gets lower and lower, and as Web-enabled devices proliferate, spawning more affordable options.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "About Firefox OS",
|
||||
"url": "https://www.mozilla.org/en-US/firefox/os/"
|
||||
},
|
||||
{
|
||||
"copy": "Expanding Mobile Web",
|
||||
"url": "https://blog.mozilla.org/blog/category/firefox-os/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Why Mobile matters",
|
||||
"url": "https://www.youtube.com/watch?v=TMP45DupbhI&list=PLFlAJDI87Jg2vk3THSt8RBoD7vLG2tnwH"
|
||||
}
|
||||
]
|
||||
},
|
||||
"affordable": {
|
||||
"name": "Affordability",
|
||||
"title": "The price of admission.",
|
||||
"narrative": "If you imagine everyone with online access as a point of light on a globe, some parts would glow intensely, while others would be dark. In many developing countries, a month of broadband access costs almost a month’s paycheck, making it a luxury beyond reach.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "About Firefox OS",
|
||||
"url": "https://www.mozilla.org/en-US/firefox/os/"
|
||||
},
|
||||
{
|
||||
"copy": "Expanding access",
|
||||
"url": "http://time.com/2857448/mozilla-25-smartphone-firefox/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Why Mobile matters",
|
||||
"url": "https://www.youtube.com/watch?v=TMP45DupbhI&list=PLFlAJDI87Jg2vk3THSt8RBoD7vLG2tnwH"
|
||||
}
|
||||
]
|
||||
},
|
||||
"localization": {
|
||||
"name": "Localization",
|
||||
"title": "Content chases money, and money speaks English.",
|
||||
"narrative": "Although only a 25% of Internet users are English-speaking, 55% of websites are in English. Why? Internet content creators target the largest markets possible. Right now those markets are North America and partly Western Europe, where English is the dominant language.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Local developers",
|
||||
"url": "https://www.mozilla.org/en-US/firefox/os/#mission"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Localize your videos",
|
||||
"url": "http://amara.org/en/"
|
||||
},
|
||||
{
|
||||
"copy": "Contribute",
|
||||
"url": "https://www.mozilla.org/en-US/contribute/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"accessible": {
|
||||
"name": "Accessibility",
|
||||
"title": "The Web can’t see the blind.",
|
||||
"narrative": "You’re probably reading these words on a screen. But if you can’t see, you’re hearing them spoken aloud by screen-reading software, which works on any Web page built with HTML. The problem is, when sites are built using non-HTML proprietary platforms, such as mobile apps, blind users — who make up 8.5% of the world’s population — miss out.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Firefox accessibility",
|
||||
"url": "https://support.mozilla.org/en-US/kb/accessibility-features-firefox-make-firefox-and-we"
|
||||
},
|
||||
{
|
||||
"copy": "Accessibility resources",
|
||||
"url": "http://www.accessfirefox.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Learn more",
|
||||
"url": "http://webaim.org/intro/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"infrastructure": {
|
||||
"name": "Infrastructure",
|
||||
"title": "Is the wired network here to stay?",
|
||||
"narrative": "Today, the fastest Internet connections come from network operators — the guys who pipe broadband access, and also phone service, directly into our homes and offices over physical wires. But long-distance calling and other services are now moving to the Internet, and software companies are capturing that revenue from the network operators, leaving them with less resources and incentive for building new pipelines. The risk is to see Internet companies build their own wired networks and bias them toward their content.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Firefox accessibility",
|
||||
"url": "https://support.mozilla.org/en-US/kb/accessibility-features-firefox-make-firefox-and-we"
|
||||
},
|
||||
{
|
||||
"copy": "Accessibility resources",
|
||||
"url": "http://www.accessfirefox.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Learn more",
|
||||
"url": "http://webaim.org/intro/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"control": {
|
||||
"name": "Control",
|
||||
"tagline": "Power is in the hands of individuals",
|
||||
"issues": {
|
||||
"contentCreation": {
|
||||
"name": "Content creation",
|
||||
"title": "You published it, but is it still yours?",
|
||||
"narrative": "The Internet opened up the floodgates for all forms of creativity, giving the Web its multi-faceted, organic character. Social networks and blogging platforms let us speak our minds without learning code or configuring servers. But this creative outpouring is threatened: Some platforms maintain copyright over our content, and some can censor us, damming the flow of expression. And when we switch services, we often have to leave our creations behind.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "About Webmaker",
|
||||
"url": "https://webmaker.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Learn more",
|
||||
"url": "http://webaim.org/intro/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"identityControl": {
|
||||
"name": "Identity control",
|
||||
"title": "Who owns your digital passport?",
|
||||
"narrative": "Too many passwords! Email providers and social networks are aware of how painful this can be, and are only too happy to also act as identity providers, letting you access multiple sites using a single name-and-password combo. But if we hand our digital passports over to a single company, we’re at their mercy if they get breached, or go out of business.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Firefox accessibility",
|
||||
"url": "https://support.mozilla.org/en-US/kb/accessibility-features-firefox-make-firefox-and-we"
|
||||
},
|
||||
{
|
||||
"copy": "Accessibility resources",
|
||||
"url": "http://www.accessfirefox.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Learn more",
|
||||
"url": "http://webaim.org/intro/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"publicTrust": {
|
||||
"name": "Public trust",
|
||||
"title": "The giant seems too big to fight.",
|
||||
"narrative": "Snowden revealed just how freely our personal information is shared between companies and the U.S. government. This dealt a double blow: it shattered public trust, and it told us the power was beyond our control, that there was no use trying to fight it. The second blow was the fiercest. If apathy sets in, the Internet could someday be permanently at odds with individual rights and the potential for good.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Most Trusted Company",
|
||||
"url": "https://blog.mozilla.org/blog/2013/01/28/privacy-day-2013/"
|
||||
},
|
||||
{
|
||||
"copy": "About Polaris",
|
||||
"url": "https://blog.mozilla.org/privacy/2014/11/10/introducing-polaris-privacy-initiative-to-accelerate-user-focused-privacy-online/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch \"The Web We Want\"",
|
||||
"url": "https://www.youtube.com/watch?v=Xm5i5kbIXzc"
|
||||
},
|
||||
{
|
||||
"copy": "Privacy Best Practices",
|
||||
"url": "https://support.mozilla.org/kb/how-stay-safe-web#w_follow-best-practices-to-protect-your-information"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dataTracking": {
|
||||
"name": "Data tracking",
|
||||
"title": "The product is you.",
|
||||
"narrative": "All of our moves on the Web are tracked, as if by the paparazzi. It’s the price we pay for free information and services. But we don’t want to be the last ones to know that our privacy has been violated. And we certainly don’t want drugstores to be the ones announcing pregnancies. As tracking techniques grow in sophistication, capturing finer details, we’re completely left out of the process.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Understanding tracking",
|
||||
"url": "https://www.youtube.com/watch?v=PvqGy9wz_wA"
|
||||
},
|
||||
{
|
||||
"copy": "\"Do Not Track\" policy",
|
||||
"url": "http://donottrack.us/"
|
||||
},
|
||||
{
|
||||
"copy": "Search without tracking",
|
||||
"url": "https://duckduckgo.com/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Lightbeam for Firefox",
|
||||
"url": "https://www.mozilla.org/en-US/lightbeam/"
|
||||
},
|
||||
{
|
||||
"copy": "Disconnect on your browser",
|
||||
"url": "https://disconnect.me/disconnect#"
|
||||
},
|
||||
{
|
||||
"copy": "Install Interest Dashboard",
|
||||
"url": "https://addons.mozilla.org/firefox/addon/firefox-interest-dashboard"
|
||||
},
|
||||
{
|
||||
"copy": "Personal data",
|
||||
"url": "http://projects.aljazeera.com/2014/terms-of-service/#1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"surveillance": {
|
||||
"name": "Surveillance",
|
||||
"title": "Big Brother really is watching you.",
|
||||
"narrative": "In Orwell’s 1984, the government monitors citizens day and night. That might seem like a paranoid scenario, but part of this nightmare is actually happening: when government agencies want our data, and Internet companies are motivated to collect and sell it, who is left to advocate for users?",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "About \"Stop Watching Us\"",
|
||||
"url": "https://optin.stopwatching.us/"
|
||||
},
|
||||
{
|
||||
"copy": "About \"EFF Tor Challenge\"",
|
||||
"url": "https://www.eff.org/torchallenge/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Christopher Soghoian video",
|
||||
"url": "http://www.ted.com/talks/christopher_soghoian_government_surveillance_this_is_just_the_beginning"
|
||||
},
|
||||
{
|
||||
"copy": "Watch \"Citizenfour\"",
|
||||
"url": "https://citizenfourfilm.com/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"userAgreements": {
|
||||
"name": "User Agreements",
|
||||
"title": "Signing in the dark.",
|
||||
"narrative": "User agreements are getting progressively longer and more complex, leaving many of us with a fuzzy notion of what they actually say. But by not fully understanding these documents, we’re not really in control of our online lives. What have we agreed to? Often, we’re handing over copyright ownership, saying yes to censorship and signing up for spam.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/privacy/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Install TOS",
|
||||
"url": "https://tosdr.org/"
|
||||
},
|
||||
{
|
||||
"copy": "Watch Film",
|
||||
"url": "http://vimeo.com/93664881"
|
||||
}
|
||||
]
|
||||
},
|
||||
"openSource": {
|
||||
"name": "Open Source",
|
||||
"title": "Can you look under the hood?",
|
||||
"narrative": "The Web, when it’s built on HTML, is fully transparent: to see how something works, just look at the code. HTML, which is free and open source software, is also built and evaluated in a fully public setting. But proprietary software, which is built behind closed doors, is gaining prominence, especially in the arena of mobile apps.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "The best open source tools",
|
||||
"url": "http://www.thesimpledollar.com/30-essential-pieces-of-free-and-open-software-for-windows/"
|
||||
},
|
||||
{
|
||||
"copy": "Watch \"Open Source in LEGO\"",
|
||||
"url": "http://www.youtube.com/watch?v=a8fHgx9mE5U"
|
||||
}
|
||||
]
|
||||
},
|
||||
"openDataStandards": {
|
||||
"name": "Open Data Standards",
|
||||
"title": "We’re locking up our data, throwing away the key.",
|
||||
"narrative": "The Internet relies on open standards: Servers, browsers and content all speak the same language. But there is a trend, mostly in the mobile apps market, towards using closed standards, and this prevents data from being moved from one service to another, even with the consent of the owner. The upshot? We lose control over our own data, which gets locked away under closed, proprietary systems.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"dataRegulation": {
|
||||
"name": "Data Regulation",
|
||||
"title": "The world’s data is not in good hands.",
|
||||
"narrative": "Most of the world's data is stored in the U.S., which has some of the most relaxed data-privacy regulations on the planet. This means less scrutiny over how the world’s data is collected, how it is used and who can access it, with more potential for abuse.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"lobbyPower": {
|
||||
"name": "Lobby Power",
|
||||
"title": "Meet the U.S. Silicon Government.",
|
||||
"narrative": "The Internet industry has incredibly deep pockets for lobbying. In 2013, Internet companies spent $141million on lobbying in the U.S. alone, with Google spending the most, recently surpassing even Lockheed-Martin. This is cause for concern: with a government so deeply influenced by these companies, U.S. consumer protection laws won’t likely receive as much support.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"censorship": {
|
||||
"name": "Censorship",
|
||||
"title": "Too big to silence.",
|
||||
"narrative": "The Web is a living, breathing ecosystem, sustained by billions of contributors all over the planet. It can’t be stopped, though some repressive governments have successfully restricted access. 2014 has seen an unwelcome increase of censorship in Turkey and Ukraine. Still, due to the sheer size and distributed nature of the Web, citizens of censored countries have still found ways for their voices to be heard.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"safety": {
|
||||
"name": "Safety",
|
||||
"tagline": "Our security and privacy are protected",
|
||||
"issues": {
|
||||
"cyberThreats": {
|
||||
"name": "Cyber-Threats",
|
||||
"title": "New threats, new vulnerabilities.",
|
||||
"narrative": "Do the bad guys ever sleep? They’re launching more and more attacks, and they’re getting sneakier, mixing up identity theft, spoofing and viruses. Some of this can be spotted a mile away (that isn’t your aunt Sally emailing you with a strange-looking link) while much of it is more insidious. Stay vigilant; what’s at stake is the trust that holds the Web together.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"cyberBullying": {
|
||||
"name": "Cyber Bullying",
|
||||
"title": "Virtual torment, real-life damage",
|
||||
"narrative": "The Web represents the widest range of human behavior, from the civil to the obnoxious, and that’s OK. But the Web also facilitates insults, physical threats, stalking and sexual harassment, and that’s not OK: such behavior can be as damaging as physical injury. On social networking sites, which are becoming central to our lives and identities, such activities can be particularly harmful.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"networkDecentralization": {
|
||||
"name": "Network Decentralisation",
|
||||
"title": "Choke Points for Surveillance.",
|
||||
"narrative": "Like our central nervous systems, the Internet was built to support many paths, so if one path got blocked, information could find another. But while some countries have a robust set of networks connecting to the global Internet, others have only a handful. With fewer, more obvious control points, such networks are more vulnerable, and enable more censorship and surveillance.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"cloudSecurity": {
|
||||
"name": "Cloud Security",
|
||||
"title": "Don’t put all your nude pictures in one basket.",
|
||||
"narrative": "Celebrities got a rude awakening in September 2014 when their iCloud accounts were hacked, and their personal photos were broadcast over Twitter. The rest of us might want to think twice about what we store in the cloud. Services like Apple’s iCloud, Google Drive and Dropbox make attractive targets for hackers, housing data from millions of users.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"fairness": {
|
||||
"name": "Fairness",
|
||||
"tagline": "A level playing field for all",
|
||||
"issues": {
|
||||
"netNeutrality": {
|
||||
"name": "Net neutrality",
|
||||
"title": "No slow lane on the highway of innovation.",
|
||||
"narrative": "Intentionally slow Internet connections? Charging extra for the fastest speeds? That’s highway robbery. Net neutrality is the simple idea that network operators — companies like Comcast, AT&T and Verizon — must treat all data equally. Attacks on net neutrality threaten to tilt the playing field that’s been level since the Internet began, making it harder for startups to compete with the status quo. ",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "The Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"zeroRating": {
|
||||
"name": "Zero Rating",
|
||||
"title": "“The internet”, brought to you by...",
|
||||
"narrative": "Imagine a Web where all sites are curated by a single company. It would feel more like a single department store than an open, global marketplace. This is “zero rating” at work: Companies like Facebook and Google are striking deals with network operators to offer limited free browsing on mobiles devices or in hot spots, while charging for access to additional sites. True, free access is better than no access. But for many, the sponsored view would be their only view.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"platformNeutrality": {
|
||||
"name": "Platform neutrality",
|
||||
"title": "Your apps, everywhere.",
|
||||
"narrative": "The Web is designed to be platform-neutral, which allows us to access any Web page on virtually any browser. Unfortunately, proprietary platforms are gaining traction. iTunes or Google Play, for example, require code that’s specific to each platform. So if we switch platforms, we have to buy everything all over again.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"concentrationOfPower": {
|
||||
"name": "Concentration of power",
|
||||
"title": "Digital empires are on the rise.",
|
||||
"narrative": "The Internet is the world’s largest shared resource. But it’s being controlled by a decreasing number of companies, and those in control are increasing in power. This is a dangerous scenario: Some companies as rich as governments, and have more direct contact with people than most governments. But unlike governments, which are held accountable to their citizens, companies are accountable only to shareholders.",
|
||||
"mozActionCopy": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus maximus imperdiet sem et dapibus. Duis quam ante, vestibulum in lectus.",
|
||||
"yourActionCopy": "Donec quis magna eleifend turpis pharetra pulvinar sit amet ut velit. Mauris velit eros, consectetur id ex sed, malesuada tincidunt.",
|
||||
"mozActionLink": [
|
||||
{
|
||||
"copy": "Mozilla Manifesto",
|
||||
"url": "https://www.mozilla.org/en-US/about/manifesto/"
|
||||
},
|
||||
{
|
||||
"copy": "Read \"The Open Standard\"",
|
||||
"url": "https://openstandard.mozilla.org/"
|
||||
}
|
||||
],
|
||||
"yourActionLink": [
|
||||
{
|
||||
"copy": "Watch video",
|
||||
"url": "http://www.youtube.com/watch?v=VbWkhMKS6mg"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"mobile": {
|
||||
"name": "Mobile"
|
||||
},
|
||||
"networkOperators": {
|
||||
"name": "Network Operators"
|
||||
},
|
||||
"government": {
|
||||
"name": "Government"
|
||||
},
|
||||
"internetCompanies": {
|
||||
"name": "Internet Companies"
|
||||
},
|
||||
"google": {
|
||||
"name": "Google"
|
||||
},
|
||||
"facebook": {
|
||||
"name": "Facebook"
|
||||
},
|
||||
"apple": {
|
||||
"name": "Apple"
|
||||
},
|
||||
"privacy": {
|
||||
"name": "Privacy"
|
||||
},
|
||||
"netNeutrality": {
|
||||
"name": "Net Neutrality"
|
||||
},
|
||||
"userRights": {
|
||||
"name": "User Rights"
|
||||
},
|
||||
"emergingEconomies": {
|
||||
"name": "Emerging Economies"
|
||||
},
|
||||
"regulation": {
|
||||
"name": "Regulation"
|
||||
},
|
||||
"privateInternet": {
|
||||
"name": "Private Internet"
|
||||
},
|
||||
"openness": {
|
||||
"name": "Openness"
|
||||
},
|
||||
"userData": {
|
||||
"name": "User Data"
|
||||
}
|
||||
},
|
||||
"modals": {
|
||||
"about": {
|
||||
"title": "About",
|
||||
"copy": [
|
||||
"The Web is a living ecosystem that exists in a delicate balance and we all have a role to play in shaping - and ensuring - its future.",
|
||||
"At Mozilla, we believe that the more you know about the Web, the easier it is for you to make more informed choices and be a more empowered digital citizen.",
|
||||
"That's why we created this site: to show you where the Web stands today, the issues that impact it and what you can do to get involved."
|
||||
]
|
||||
},
|
||||
"email": {
|
||||
"title": "Keep Me Informed",
|
||||
"copy": "Add your email to receive updates about the state of the internet project and other related initiatives from Mozilla.",
|
||||
"label": "Enter Your Email",
|
||||
"terms": "I'm okay with Mozilla handling my info as explained in this Privacy Policy",
|
||||
"submitButton": "Submit"
|
||||
},
|
||||
"legend": {
|
||||
"title": "Legend",
|
||||
"description": "Explore the most important issues on the web today and what shape they're in.",
|
||||
"copy": [
|
||||
[
|
||||
{
|
||||
"text": "an individual issue",
|
||||
"class": "legend-symbol--blackdot"
|
||||
},
|
||||
{
|
||||
"text": "a connection between issues",
|
||||
"class": "legend-symbol--line"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"text": "an issue trending positively",
|
||||
"class": "legend-symbol--greendot"
|
||||
},
|
||||
{
|
||||
"text": "a stable issue",
|
||||
"class": "legend-symbol--yellowdot"
|
||||
},
|
||||
{
|
||||
"text": "an issue trending negatively",
|
||||
"class": "legend-symbol--reddot"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"text": "all issues and their connections",
|
||||
"class": "icon-explore-dark"
|
||||
},
|
||||
{
|
||||
"text": "four requirements for a healthy Web",
|
||||
"class": "icon-topic-dark"
|
||||
},
|
||||
{
|
||||
"text": "the individual issues as a list",
|
||||
"class": "icon-issues-dark"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"share": {
|
||||
"title": "#shapeoftheweb",
|
||||
"shareButton": "Share",
|
||||
"learnMore": "Learn More",
|
||||
"aboutIssue": " about this issue",
|
||||
"email": "Email"
|
||||
}
|
||||
},
|
||||
"misc": {
|
||||
"siteTitle": "Shape of the Web",
|
||||
"siteHeader": "Shape of the Web",
|
||||
"sourceLabel": "Source:",
|
||||
"tagsLabel": "Tags:",
|
||||
"mozDoingLabel": "What Mozilla Is Doing",
|
||||
"yourDoingLabel": "What You Can Do",
|
||||
"modeNames": {
|
||||
"ecosystem": "Ecosystem",
|
||||
"vitals": "Vitals",
|
||||
"checklist": "Checklist"
|
||||
},
|
||||
"navLabels": {
|
||||
"access": "Access",
|
||||
"control": "Control",
|
||||
"safety": "Safety",
|
||||
"fairness": "Fairness"
|
||||
},
|
||||
"intro": {
|
||||
"internet": "( THE INTERNET )",
|
||||
"message": "The world's most powerful tool is the most fragile."
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
from bedrock.shapeoftheweb import views
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^(?P<filename>(?:main|country-data|infographics)\.json)$', views.localized_json,
|
||||
name='shapeoftheweb.localized_json'),
|
||||
)
|
|
@ -0,0 +1,13 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
from django.views.decorators.cache import cache_control
|
||||
|
||||
from lib import l10n_utils
|
||||
|
||||
|
||||
@cache_control(public=True, max_age=60 * 15)
|
||||
def localized_json(request, filename):
|
||||
"""Render a JSON file with localized strings."""
|
||||
return l10n_utils.render(request, 'shapeoftheweb/{0}'.format(filename),
|
||||
content_type='application/json; charset=utf8')
|
|
@ -34,6 +34,7 @@ urlpatterns = patterns(
|
|||
(r'^styleguide/', include('bedrock.styleguide.urls')),
|
||||
(r'^tabzilla/', include('bedrock.tabzilla.urls')),
|
||||
(r'^security/', include('bedrock.security.urls')),
|
||||
(r'^shapeoftheweb/', include('bedrock.shapeoftheweb.urls')),
|
||||
(r'', include('bedrock.firefox.urls')),
|
||||
(r'', include('bedrock.thunderbird.urls')),
|
||||
(r'', include('bedrock.mozorg.urls')),
|
||||
|
|
|
@ -867,3 +867,6 @@ RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/independent(/?.*)$ /b/$1firefox/inde
|
|||
# bug 1093985, 1105664, remove this once the Firefox Hello product page is ready
|
||||
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/hello(/?.*)$ https://support.mozilla.org/kb/respond-firefox-hello-invitation-guest-mode [L,R=temp]
|
||||
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/([3-9]\d\.\d(?:a1|a2|beta|\.\d)?)/hello/start/?$ https://support.mozilla.org/kb/firefox-hello-make-and-receive-calls-guest-mode [L,R=temp]
|
||||
|
||||
# bug 1088752
|
||||
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?shapeoftheweb(/?.*)$ /b/$1shapeoftheweb$2 [PT]
|
||||
|
|
Загрузка…
Ссылка в новой задаче