Confirmed users
1,276
edits
(→Milestone 4: link to Pontoon Tools wiki page) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
==Description== | ==Description== | ||
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 | 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 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 [http://graphql.org/ GraphQL] (see [https://wiki.mozilla.org/index.php?title=L10n:Pontoon/API&oldid=1181890#Technology discussion]). | ||
==Overview== | ==Overview== | ||
| Line 7: | Line 7: | ||
! style="text-align: center;" | Milestone | ! style="text-align: center;" | Milestone | ||
! style="text-align: center;" | Theme | ! style="text-align: center;" | Theme | ||
! style="text-align: center;" | Status | ! style="text-align: center;" | Status | ||
|- | |- | ||
| M1 | | M1 | ||
| Projects and Locales | | Projects and Locales | ||
| ✓ | | ✓ | ||
|- | |- | ||
| M2 | | M2 | ||
| | | User Notifications | ||
| | | | ||
|- | |- | ||
| M3 | | M3 | ||
| | | Contributors | ||
| | | | ||
|- | |- | ||
| M4 | | M4 | ||
| | | Translation Memory | ||
| | | | ||
|- | |- | ||
| M5 | | M5 | ||
| | | Translations | ||
| | | | ||
|- | |- | ||
| Line 67: | Line 55: | ||
===Milestone 2=== | ===Milestone 2=== | ||
Main theme: user notifications. | |||
Use-cases: | |||
* [[L10n:Pontoon-Tools|Michal's Pontoon Tools extension]] | |||
Queries: | |||
* List unread notifications for a logged-in user. | |||
===Milestone 3=== | |||
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, unreviewed, fuzzy strings across all projects | |||
** List of projects they contribute to | |||
*** Aggregate counts of: translated, unreviewed, 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) | |||
* One common use case from the past: [https://docs.google.com/spreadsheets/d/1-QWPJovsag4eYghkK2MMo30wa7QzOOMQkZdIjXnfZGQ/edit#gid=532595279 Number of user groups per locale]. | |||
* Statistics over time. [https://public.etherpad-mozilla.org/p/pontoon.api.historic.source.string.data Early rumblings and a use case]. | |||
===Milestone 4=== | |||
Main theme: translation memory. | |||
Use-cases: | |||
* Input parameters: source string, locale, minimum Levenshtein ratio, maximum number of results. | |||
Queries: | |||
* | |||
===Milestone 5=== | |||
Main theme: read-only translations and pagination. | Main theme: read-only translations and pagination. | ||
| Line 81: | Line 110: | ||
* List all Entities for a Resource. | * List all Entities for a Resource. | ||
* List all Translations into a given Locale for an Entity. | * List all Translations into a given Locale for an Entity. | ||
** Include status: approved, | ** Include status: approved, unreviewed, fuzzy. | ||
** Allow filtering on status via params? | ** Allow filtering on status via params? | ||
** List all Translations for an Entity | ** List all Translations for an Entity | ||
| Line 95: | Line 124: | ||
"include_fields": "id, summary, status, resolution, priority, assigned_to" | "include_fields": "id, summary, status, resolution, priority, assigned_to" | ||
}</bugzilla> | }</bugzilla> | ||
Use-cases: | Use-cases: | ||
| Line 108: | Line 133: | ||
* Add a translation for an Entity | * Add a translation for an Entity | ||
** "approved" if the permissions are high enough | ** "approved" if the permissions are high enough | ||
** " | ** "unreviewed" otherwise | ||
* Approve/reject a suggestion. | * Approve/reject a suggestion. | ||
==Ideas== | ==Ideas== | ||
A list of ideas to consider for future milestones. | A list of ideas to consider for future milestones. | ||
==Contact== | ==Contact== | ||