Marketplace/LangPacks: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Use stdin to pass data to curling (need 0.3.12))
(added banner)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Marketplace_banner}}
== Overview ==
Language packs are translations for Gaia. Rather than ship and update all the localisations in each phone version, language packs allow updates to the localisation as they become available.
These will be used in FxOS 2.2.
== Marketplace design notes ==
* Was agreed should not be just bolted onto the webapp model since many parts of it different eg:
** No review step
** No developer pages
== Examples ==
* An example language pack: https://bugzilla.mozilla.org/attachment.cgi?id=8544837
* Example of installing: https://bug1107346.bugzilla.mozilla.org/attachment.cgi?id=8537621
== How to upload langpacks on Marketplace ==
== How to upload langpacks on Marketplace ==
 
You'll need a Marketplace account and the appropriate permissions.
=== Overview ===


* Create an account on https://marketplace.firefox.com/developers/ and accept the terms and conditions: https://marketplace.firefox.com/developers/terms
* Create an account on https://marketplace.firefox.com/developers/ and accept the terms and conditions: https://marketplace.firefox.com/developers/terms
Line 43: Line 57:


Note: the ''version'' field in your manifest needs to be different.
Note: the ''version'' field in your manifest needs to be different.
== Bugs ==
Tracking bug: {{Bugzilla|1105530}}.
<bugzilla>
{ "blocks": ["1105530"], "status": ["UNCONFIRMED", "ASSIGNED", "NEW", "REOPENED"] }
</bugzilla>

Latest revision as of 02:23, 1 April 2016

Stop (medium size).png
The Marketplace has been placed into maintenance mode. It is no longer under active development. You can read complete details here.

Overview

Language packs are translations for Gaia. Rather than ship and update all the localisations in each phone version, language packs allow updates to the localisation as they become available.

These will be used in FxOS 2.2.

Marketplace design notes

  • Was agreed should not be just bolted onto the webapp model since many parts of it different eg:
    • No review step
    • No developer pages

Examples

How to upload langpacks on Marketplace

You'll need a Marketplace account and the appropriate permissions.

API Example using curling

Setup

$ pip install curling
$ echo '{"marketplace.firefox.com": {"key": "<replace-by-your-api-key>", "secret": "<replace-by-your-api-secret>"}}' > ~/.curling

Validate a langpack

$ DATA=$( base64 -w 0 "/tmp/langpack.zip" )
$ curling -X POST -d '@-' https://marketplace.firefox.com/api/v2/apps/validation/ <<CURL_DATA
{"upload": {"type": "application/zip", "name": "langpack.zip", "data": "$DATA"}}
CURL_DATA

Check the validation result

$ curling https://marketplace.firefox.com/api/v2/apps/validation/<paste-validation-id-from-previous-line-here>/

Create a langpack from the validation result (once validation result says valid=true and processed=true)

$ curling -X POST -d '{"upload": "<paste-validation-id-from-previous-line-here>"}' https://marketplace.firefox.com/api/v2/langpacks/

Activate the langpack

Note: langpack uuid is different from the validation id, even though both are 32-chars hexadecimal strings.

$ curling -X PATCH -d '{"active": true}' https://marketplace.firefox.com/api/v2/langpacks/<paste-langpack-uuid-from-previous-line-here>/

Double-check that the langpack is now active

$ curling https://marketplace.firefox.com/api/v2/langpacks/<paste-langpack-uuid-from-previous-line-here>/

Updating an existing langpack

Validate a langpack like above, then:

$ curling -X PUT -d '{"upload": "<paste-validation-id-from-previous-line-here>"}' https://marketplace.firefox.com/api/v2/langpacks/<paste-langpack-uuid-here>/

Note: the version field in your manifest needs to be different.


Bugs

Tracking bug: 1105530.

Bugzilla query error

Array ( [type] => error [message] => http-bad-status [params] => Array ( [0] => 429 [1] => Unknown Error ) ) 1