From cb7e61114cecebdb4567fb493276d439a41e25cc Mon Sep 17 00:00:00 2001
From: Jen Fong-Adwent
Date: Mon, 25 Feb 2013 11:07:14 -0500
Subject: [PATCH] reduced trans blocks to smaller sections (bug 843670)
---
.../ecosystem/build_app_generator.html | 11 +-
.../ecosystem/build_apps_offline.html | 1 +
.../templates/ecosystem/build_manifests.html | 26 +-
.../templates/ecosystem/build_quick.html | 75 ++---
.../ecosystem/build_web_developers.html | 1 +
.../ecosystem/design_fundamentals.html | 20 +-
.../templates/ecosystem/publish_hosted.html | 19 +-
.../templates/ecosystem/publish_packaged.html | 265 +++++++++++-------
.../templates/ecosystem/publish_review.html | 58 ++--
9 files changed, 280 insertions(+), 196 deletions(-)
diff --git a/mkt/ecosystem/templates/ecosystem/build_app_generator.html b/mkt/ecosystem/templates/ecosystem/build_app_generator.html
index d755623852..8b5c96fb05 100644
--- a/mkt/ecosystem/templates/ecosystem/build_app_generator.html
+++ b/mkt/ecosystem/templates/ecosystem/build_app_generator.html
@@ -59,7 +59,7 @@
{{ _('What you get:') }}
- {{ _('A minimal and well-formed HTML structure') }}
- - {{ _('Prebuilt
manifest.webapp
') }}
+ - {{ _('Prebuilt') }}
manifest.webapp
-
{%- trans %}
JavaScript libraries for interacting with the Marketplace
@@ -100,9 +100,11 @@
{% endtrans -%}
{{ _('npm install -g volo') }}
+ {# L10n: Do not localize text in
#}
{{ _('Now you can just use the create
command:') }}
{{ _('volo create myproject mozilla/mortar-app-stub') }}
+ {# L10n: Do not localize text in
#}
{%- trans %}
When future templates are available, you can use the same
create
command with different template URLs.
@@ -110,6 +112,7 @@
{{ _('What Now?') }}
+ {# L10n: Do not localize text in
#}
{%- trans %}
All your HTML, CSS, and JavaScript are under the www
directory, so start coding! You'll see a bunch of stuff in there,
@@ -117,6 +120,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans url_require='http://requirejs.org',
url_zepto='http://zeptojs.com',
url_payments='//developer.mozilla.org/docs/Apps/In-app_payments',
@@ -135,6 +139,7 @@
{{ _("Below that, you'll see the line:") }}
{{ _('define(function(require) {') }}
+ {# L10n: Do not localize text in
#}
{%- trans url='http://requirejs.org/docs/api.html' %}
That defines the main module for your app, and you should start
coding within the function. You can use require
to
@@ -144,6 +149,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans %}
Note: By default, modules are loaded from
www/js/lib
. If you want to load something from
@@ -153,6 +159,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans %}
You can edit CSS in www/css/app.css
. Typically you
should @import
additional CSS files at the top of
@@ -175,6 +182,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans %}
All of these must be run at the root of your project. There are a
few other commands and you can view the full list by simply typing
@@ -182,6 +190,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans %}
Note: volo itself only has a few built-in
commands. The app template provides the serve
,
diff --git a/mkt/ecosystem/templates/ecosystem/build_apps_offline.html b/mkt/ecosystem/templates/ecosystem/build_apps_offline.html
index afd70a3a77..45693ff9a5 100644
--- a/mkt/ecosystem/templates/ecosystem/build_apps_offline.html
+++ b/mkt/ecosystem/templates/ecosystem/build_apps_offline.html
@@ -75,6 +75,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans url='//developer.mozilla.org/docs/DOM/window.navigator.onLine' %}
The simplest way to do this is to check, and listen for changes to,
the window.navigator.onLine
diff --git a/mkt/ecosystem/templates/ecosystem/build_manifests.html b/mkt/ecosystem/templates/ecosystem/build_manifests.html
index e48c3c5b09..c0c0eef539 100644
--- a/mkt/ecosystem/templates/ecosystem/build_manifests.html
+++ b/mkt/ecosystem/templates/ecosystem/build_manifests.html
@@ -52,25 +52,19 @@
{% endtrans -%}
-
-
{{ _('http://example.com') }}
+ 'http://example.com
-
- {%- trans %}
-
http://example.com:8080
(different port)
- {% endtrans -%}
+ http://example.com:8080
{{ _('(different port)') }}
-
- {%- trans %}
-
https://example.com
(different protocol)
- {% endtrans -%}
+ https://example.com
{{ _('(different protocol)') }}
-
-
{{ _('http://www.example.com') }}
+ http://www.example.com
-
- {%- trans %}
-
http://myapp.example.com
(subdomain)
- {% endtrans -%}
+ http://myapp.example.com
{{ _('(subdomain)') }}
@@ -78,10 +72,10 @@
{{ _('The following URLs are the same origin:') }}
-
-
{{ _('http://Example.com:80') }}
+ http://Example.com:80
-
-
{{ _('http://example.com') }}
+ http://example.com
@@ -91,10 +85,10 @@
{{ _('The following URLs are the same origin:') }}
-
-
{{ _('http://example.com/drawingApp') }}
+ http://example.com/drawingApp
-
-
{{ _('http://example.com/notesApp') }}
+ http://example.com/notesApp
@@ -154,6 +148,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans url='//developer.mozilla.org/docs/Apps/Adding_a_subdomain' %}
We recommend that you use a separate subdomain for each of your
apps. For example, spreadsheet.mycoolapps.com
for
@@ -208,6 +203,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans %}
Why does my Web server have to use the proper HTTP
Content-Type
header when serving my app manifest?
diff --git a/mkt/ecosystem/templates/ecosystem/build_quick.html b/mkt/ecosystem/templates/ecosystem/build_quick.html
index 59feec6c64..1bf4400b3d 100644
--- a/mkt/ecosystem/templates/ecosystem/build_quick.html
+++ b/mkt/ecosystem/templates/ecosystem/build_quick.html
@@ -67,12 +67,12 @@
installed from, and much more (Only the name and description are
required). The simple manifest included within the app template
looks like:
-
-
- {{ manifest_sample }}
-
-
{% endtrans -%}
+
+
+ {{ manifest_sample }}
+
+
{{ youtube('dgAUgHQOm8M') }}
@@ -92,12 +92,12 @@
OS can be installed on a variety of devices which use different
screen resolutions. CSS media queries
provide a means to adapt layout to device:
-
-
- {{ css_sample }}
-
-
{% endtrans -%}
+
+
+ {{ css_sample }}
+
+
{%- trans url='http://twitter.github.com/bootstrap' %}
@@ -118,14 +118,15 @@
to jQuery) and a utility to install your app on the Firefox OS
Simulator. This quick start guide fits you with mortar's most
basic layout template:
-
-
- {{ html_sample }}
-
-
{% endtrans -%}
+
+
+ {{ html_sample }}
+
+
+ {# L10n: Do not localize text in
#}
{%- trans %}
Feel free to modify the structure set forth by mortar — the
snippet above should get you going. Note that all JavaScript code
@@ -142,24 +143,28 @@
A list of device support and status is available on the
WebAPI page. Of course JavaScript
feature detection is still the best practice:
-
-
- {{ feature_sample }}
-
-
-
+ {% endtrans -%}
+
+
+ {{ feature_sample }}
+
+
+
+ {# L10n: Do not localize text in
#}
+ {%- trans %}
In this very basic app template we'll modify the display style
of a DIV
based on changes in the device's battery
state:
-
-
- {{ battery_sample }}
-
-
-
- {% endtrans -%}
+ {% endtrans -%}
+
+
+ {{ battery_sample }}
+
+
+
+ {# L10n: Do not localize text in
#}
{%- trans url='https://developer.mozilla.org/en-US/docs/DOM/window.navigator.battery' %}
In the code sample above, once you confirm that the
Battery API is supported, you can add event
@@ -175,19 +180,21 @@
{{ _('WebRT APIs (Permissions-based APIs)') }}
+ {# L10n: Do not localize text in
#}
{%- trans url='https://wiki.mozilla.org/WebAPI' %}
There are a number of WebAPIs which are available but require
permissions for that specific feature to be enabled. Apps may
register permission requests within the
manifest.webapp
file:
-
-
- {{ webrt_sample }}
-
-
{% endtrans -%}
+
+
+ {{ webrt_sample }}
+
+
+ {# L10n: Do not localize text in
#}
{%- trans %}
Once you've installed your app on Firefox OS Simulator, open the
Settings
app, select App Permissions
,
@@ -196,7 +203,7 @@
within the Firefox OS Simulator.
{% endtrans -%}
- {{ _('Tools & Testing') }}
+ {{ _('Tools & Testing') }}
{%- trans %}
Testing is incredibly important when supporting mobile devices.
diff --git a/mkt/ecosystem/templates/ecosystem/build_web_developers.html b/mkt/ecosystem/templates/ecosystem/build_web_developers.html
index acd8af78b1..3fd6ea9e3d 100644
--- a/mkt/ecosystem/templates/ecosystem/build_web_developers.html
+++ b/mkt/ecosystem/templates/ecosystem/build_web_developers.html
@@ -31,6 +31,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans url='//developer.mozilla.org/docs/Apps/Apps_JavaScript_API' %}
Serve the app manifest in a file with a file extension of
.webapp
. Set the Content-Type
header to
diff --git a/mkt/ecosystem/templates/ecosystem/design_fundamentals.html b/mkt/ecosystem/templates/ecosystem/design_fundamentals.html
index e0167595ec..81548a0474 100644
--- a/mkt/ecosystem/templates/ecosystem/design_fundamentals.html
+++ b/mkt/ecosystem/templates/ecosystem/design_fundamentals.html
@@ -91,16 +91,20 @@
People often spend only a minute or two deciding whether to
continue or abandon an app. Some of the factors you may want
to consider include:
-
- -
+ {% endtrans -%}
+
+ -
+ {%- trans %}
provide a quick introduction to your app (and provide an
easy way to end it anytime)
-
- - instant access to features and suggestions
- - minimize initial user input
- - express the most important information in a concise way
-
- {% endtrans -%}
+ {% endtrans -%}
+
+ - {{ _('instant access to features and suggestions') }}
+ - {{ _('minimize initial user input') }}
+ -
+ {{ _('express the most important information in a concise way') }}
+
+
{{ _('Present action choices if possible') }}
diff --git a/mkt/ecosystem/templates/ecosystem/publish_hosted.html b/mkt/ecosystem/templates/ecosystem/publish_hosted.html
index 76f7ab7ee5..94afd24786 100644
--- a/mkt/ecosystem/templates/ecosystem/publish_hosted.html
+++ b/mkt/ecosystem/templates/ecosystem/publish_hosted.html
@@ -18,17 +18,21 @@
{%- trans %}
Once you have finished your app, you need to do the following:
-
- -
+ {% endtrans -%}
+
+ -
+ {%- trans %}
Deploy the app — Arrange for web hosting and get the app
up and running on the web server.
-
- -
+ {% endtrans -%}
+
+ -
+ {%- trans %}
Publish the app — Make the app available for end users
to install.
-
-
- {% endtrans -%}
+ {% endtrans -%}
+
+
{{ _('Deploying the app') }}
@@ -39,6 +43,7 @@
{{ _('GitHub') }}
+ {# L10n: Do not localize text in
#}
{%- trans url_github='http://pages.github.com',
url_mdn='//developer.mozilla.org/docs/Apps/Manifest#Serving_from_GitHub' %}
If the Web app is purely static (HTML/CSS/JavaScript, but no
diff --git a/mkt/ecosystem/templates/ecosystem/publish_packaged.html b/mkt/ecosystem/templates/ecosystem/publish_packaged.html
index 87c81a3da6..ae4382f451 100644
--- a/mkt/ecosystem/templates/ecosystem/publish_packaged.html
+++ b/mkt/ecosystem/templates/ecosystem/publish_packaged.html
@@ -16,6 +16,7 @@
{{ _('Packaged Apps') }}
+ {# L10n: Do not localize text in
#}
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest' %}
A packaged app is an Open Web App that has all of
its resources (HTML, CSS, JavaScript, app manifest, and so on)
@@ -46,123 +47,154 @@
{{ _('Types of packaged apps') }}
- {%- trans url_csp='//developer.mozilla.org/docs/Security/CSP/Introducing_Content_Security_Policy',
- url_security='https://wiki.mozilla.org/Apps/Security',
- url_default_csp='https://wiki.mozilla.org/Apps/Security#Default_CSP_policy',
- url_bug='https://bugzilla.mozilla.org/show_bug.cgi?id=768029' %}
- There are three types of packaged apps:
-
- - Privileged app
- -
+ {{ _('There are three types of packaged apps:') }}
+
+ - {{ _('Privileged app') }}
+ -
+ {%- trans %}
A privileged app has been approved by the Firefox OS
Marketplace using a special process. It is meant to provide
more safety for users when an app wants access to certain
sensitive APIs on a device. It is equivalent to a native
app on a platform like iOS or Android. A privileged app
has the following characteristics:
-
- - Certified app
- -
- A certified app is intended for a critical system function like
- the default dialer or the system settings app on a smartphone.
- This type of app would be used for critical functions on a
- Firefox OS phone. It is not intended for third party apps, so
- most app developers can disregard this type of app. A certified
- app is a packaged app that is similar to a privileged app,
- except that all device permissions are implicit, meaning they
- do not require explicit user approval. A certified app must be
- approved for a device by the OEM or carrier in order to have
- this implicit approval to use critical APIs. The following is
- the CSP for a certified app, which is slightly different from
- the CSP for a privileged app:
-
- "default-src *; script-src 'self'; object-src 'none'; style-src 'self'"
-
- This has the effect of slightly looser rules for inline CSP for
- privileged apps when compared to certified apps. If you want
- more of the reasoning behind this, see
+ Security for more information.
+ {% endtrans -%}
+
+
+
+ {{ _('Certified app') }}
+
+ {%- trans %}
+ A certified app is intended for a critical system function
+ like the default dialer or the system settings app on a
+ smartphone. This type of app would be used for critical
+ functions on a Firefox OS phone. It is not intended for third
+ party apps, so most app developers can disregard this type of
+ app. A certified app is a packaged app that is similar to a
+ privileged app, except that all device permissions are
+ implicit, meaning they do not require explicit user approval.
+ A certified app must be approved for a device by the OEM or
+ carrier in order to have this implicit approval to use
+ critical APIs. The following is the CSP for a certified app,
+ which is slightly different from the CSP for a privileged
+ app:
+ {% endtrans -%}
+
+ "default-src *; script-src 'self'; object-src 'none'; style-src 'self'"
+
+ {%- trans url_default_csp='https://wiki.mozilla.org/Apps/Security#Default_CSP_policy',
+ url_bug='https://bugzilla.mozilla.org/show_bug.cgi?id=768029' %}
+ This has the effect of slightly looser rules for inline CSP
+ for privileged apps when compared to certified apps. If you
+ want more of the reasoning behind this, see
Default CSP policy and
Bug 768029.
- Plain packaged app
-
+ {% endtrans -%}
+ {{ _('Plain packaged app') }}
+
+ {%- trans %}
You can also make a regular app that is simply packaged in a
zip file. The Marketplace signs it, but does not perform the
- special authentication process used for privileged or certified
- apps. This plain packaged app cannot use certain sensitive Web
- APIs. It is not subject to the CSPs described for privileged
- and certified apps.
-
-
- {% endtrans -%}
+ special authentication process used for privileged or
+ certified apps. This plain packaged app cannot use certain
+ sensitive Web APIs. It is not subject to the CSPs described
+ for privileged and certified apps.
+ {% endtrans -%}
+
+
{{ _('Differences from hosted apps') }}
- {%- trans url='//developer.mozilla.org/docs/Security/CSP/Introducing_Content_Security_Policy' %}
+ {%- trans %}
Packaged apps have the same capabilites as normal website-style
Open Web Apps ("hosted" apps), but packaged apps have a
few differences:
-
- -
+ {% endtrans -%}
+
- {% endtrans -%}
+ {% endtrans -%}
+
+
{%- trans %}
@@ -172,6 +204,7 @@
{{ _('Using sensitive Web APIs') }}
+ {# L10n: Do not localize text in
#}
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest' %}
There are Web APIs that could be used maliciously, so access to
them must be controlled. For every sensitive API you want your
@@ -190,6 +223,7 @@
{{ _('Packaged apps and the Firefox Marketplace') }}
+ {# L10n: Do not localize text in
#}
{%- trans %}
The Firefox Marketplace handles packaged apps differently from
hosted apps. When you submit your packaged app, its zip file is
@@ -233,6 +267,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans %}
Get your server's IP address and use it in place of
<server-ip>
in the examples
@@ -245,6 +280,7 @@
{{ _('Steps') }}
-
+ {# L10n: Do not localize text in
#}
{%- trans %}
Have your packaged app's zip file available and give it the
name package.zip
. This file contains all the app's
@@ -252,6 +288,7 @@
{% endtrans -%}
-
+ {# L10n: Do not localize text in
#}
{%- trans url='#mini-manifest-fields' %}
Create a file called package.manifest
and give it
the contents below. This is a mini-manifest used for packaged app
@@ -263,6 +300,7 @@
{% endtrans -%}
-
+ {# L10n: Do not localize text in
#}
{%- trans %}
Create a file named install.html
with the following
contents. This contains the JavaScript that calls the packaged
@@ -272,6 +310,7 @@
{% endtrans -%}
-
+ {# L10n: Do not localize text in
#}
{%- trans %}
Copy package.zip
, package.manifest
, and
install.html
into the Web server's document root
@@ -279,6 +318,7 @@
{% endtrans -%}
-
+ {# L10n: Do not localize text in
#}
{%- trans %}
Use the browser on the phone to open
http://<server-ip>/install.html
@@ -288,6 +328,7 @@
+ {# L10n: Do not localize text in
#}
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest#type' %}
Note: If you want to test certified app APIs
(described above), turn on "developer mode" on the device you want
@@ -304,6 +345,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans url='//developer.mozilla.org/docs/Apps/Manifest' %}
When the Firefox OS Marketplace generates a mini-manifest for your
app, it pulls information from your app's manifest for some of the
@@ -321,41 +363,50 @@
Here is information on the mini-manifest that relates to using it
locally for your own testing:
{% endtrans -%}
- {%- trans %}
-
- name
- -
+
+ name
+ -
+ {%- trans %}
(required) The app's name. Maximum length is 128 characters.
-
- package_path
- -
+ {% endtrans -%}
+
+ package_path
+ -
+ {%- trans %}
(required) A full URL where the app's zip file can be found.
-
- version
- - The version of the app.
- size
- -
+ {% endtrans -%}
+
+ version
+ - {{ _('The version of the app.') }}
+ size
+ -
+ {%- trans %}
The size of the app's zip file in bytes. This is not necessary
for local testing, but provide it to get a progressbar during
installation.
-
- release_notes
- -
+ {% endtrans -%}
+
+ release_notes
+ -
+ {%- trans %}
Information about this release of the app. On the Marketplace
this information comes from a Web page that is part of the
submission process.
-
- developer
- -
- Information about the developer, contains the
name
- and url
fields.
-
- locales
- - Localization information.
- icons
- - Icons for use by the app.
-
- {% endtrans -%}
+ {% endtrans -%}
+
+ developer
+ -
+ {# L10n: Do not localize text in
#}
+ {%- trans %}
+ Information about the developer, contains the
+ name
and url
fields.
+ {% endtrans -%}
+
+ locales
+ - {{ _('Localization information.') }}
+ icons
+ - {{ _('Icons for use by the app.') }}
+
{{ _('Updating packaged apps') }}
diff --git a/mkt/ecosystem/templates/ecosystem/publish_review.html b/mkt/ecosystem/templates/ecosystem/publish_review.html
index 6b635a4502..24e22a122c 100644
--- a/mkt/ecosystem/templates/ecosystem/publish_review.html
+++ b/mkt/ecosystem/templates/ecosystem/publish_review.html
@@ -91,6 +91,7 @@
{% endtrans -%}
+ {# L10n: Do not localize text in
#}
{%- trans %}
The app manifest must be served a Content-Type
header of application/x-web-app-manifest+json
.
@@ -243,22 +244,26 @@
{% endtrans -%}
- {%- trans url='https://github.com/mozilla-b2g/gaia/issues/2557' %}
+ {%- trans %}
The app must implement its own method of navigation and not rely
on browser chrome or a hardware back button, which will not be
present on every device.
-
- -
- For example, if the reviewer navigates somewhere within the
- app and isn't able to navigate back. It does not mean an app
- must implement a button bar common to native apps.
-
- -
- Note: a Gaia "wrapper" for legacy web content is in
- progress: {{ url }}
-
-
{% endtrans -%}
+
+ -
+ {%- trans %}
+ For example, if the reviewer navigates somewhere within the
+ app and isn't able to navigate back. It does not mean an
+ app must implement a button bar common to native apps.
+ {% endtrans -%}
+
+ -
+ {%- trans url='https://github.com/mozilla-b2g/gaia/issues/2557' %}
+ Note: a Gaia "wrapper" for legacy web content is
+ in progress: {{ url }}
+ {% endtrans -%}
+
+
{%- trans %}
@@ -280,28 +285,33 @@
from the app review team to communicate what's going on and get
the problem resolved. Specific examples of situations where
blocklisting is warranted include:
-
- - Phishing
- - Spamming
- -
+ {% endtrans -%}
+
+ - {{ _('Phishing') }}
+ - {{ _('Spamming') }}
+ -
+ {%- trans %}
Changing content from Puppy Pictures v1.0 to Hardcore Porn
v1.0 (without updating the content rating, when this
feature is implemented)
-
- -
+ {% endtrans -%}
+
+ -
+ {%- trans %}
Severe misbehavior of app for a large percentage of users
— degrading phone performance, causing reboots,
causing user data loss, etc. where users can't tell that
it's because of the app and where it isn't solved by
rebooting the device.
-
- -
+ {% endtrans -%}
+
+ -
+ {%- trans %}
An app being used for attacks on the network, such as a
distributed denial of service (DDOS)
-
- - (insert movie plot risk here)
-
- {% endtrans -%}
+ {% endtrans -%}
+
+