Exposing Pontoon's data through an API will enable external consumers to build tools, extensions and reports about translations. In the future, the API will serve as the backend for Pontoon.NEXT's SPA front-end. We chose an iterative approach to exposing the data. We start small with a small number of clear-focused use-cases in mind and expand the scope in subsequent iterations. The API is based on GraphQL (see discussion).
|M1||Projects and Locales||September 2017||✓|
|M2||Translations (Read-Only)||November 2017||bug 1409704|
|M3||Translations (Write)||January 2018|
|M4||User Notifications||March 2018|
Complete, deployed on October 2, 2017.
In the first iteration we'd like to make some data stored in Pontoon openly available for third-parties. The goals is to create an API endpoint supporting queries related to aggregate statistics per locale and per project. The main driver is the use case from bug 1302053:
- Stats for a locale: supported projects, status of each project.
- Stats for a project: supported locales, incomplete locales, complete locales.
|1302053||Expose project status and information through API||RESOLVED||FIXED||P3||Staś Małolepszy :stas|
1 Total; 0 Open (0%); 1 Resolved (100%); 0 Verified (0%);
Main theme: read-only translations and pagination.
- Report translation status of a single page on mozilla.org
- Read-only data required by Pontoon.Next's Translate app
- Establish a good practice for paginating results.
- List all Resources for a Project.
- List all Entities for a Resource.
- List all Translations into a given Locale for an Entity.
- Include status: approved, suggested, fuzzy.
- Allow filtering on status via params?
- List all Translations for an Entity
- List all TranslatedResources for a ProjectLocale
- Include aggregate statistics.
- List all TranslatedResources for a Resource.
- List all TranslatedResources for a Locale.
|1409711||[API] Establish a good practice for paginating results.||NEW||P2|
|1409723||[API] Expose Resources and TranslatedResources||NEW||P2|
|1409724||[API] Expose Entities and Translations||NEW||P2|
3 Total; 3 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Main theme: authenticated mutations.
- Editing translations via Pontoon.Next's Translate app
- Add a translation for an Entity
- "approved" if the permissions are high enough
- "suggested" otherwise
- Approve/reject a suggestion.
Main theme: user notifications.
- List unread notifications for a logged-in user.
Main theme: contributors.
- Query a single contributor (by email? unique key?)
- List recent activity: date, project, action, number of affected strings
- Aggregate counts of: translated, suggested, fuzzy strings across all projects
- List of projects they contribute to
- Aggregate counts of: translated, suggested, fuzzy strings for each project
- List all contributors on Pontoon
- List all contributors for a locale
- List all contributors for a project
- List all contributors for a localization (ProjectLocale)
Main theme: statistics over time.
|Feature Owner||Staś Małolepszy||stas|
|Product Owner||Matjaž Horvat||mathjazz|