Closed
Bug 1408625
Opened 7 years ago
Closed 3 years ago
[API] Query for a project of a particular locale
Categories
(Webtools Graveyard :: Pontoon, defect, P3)
Tracking
(Not tracked)
RESOLVED
MOVED
People
(Reporter: roosan.gm, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171009192146
Steps to reproduce:
Trying to make api call to query a project of a particular locale.
Actual results:
It's not possible to query it right now.
Expected results:
I was expecting detail of a particular project of a particular locale.
Comment 1•7 years ago
|
||
Thanks for the report, Roosan!
Please note that we're still planning the Roadmap of the Pontoon API roll out:
https://wiki.mozilla.org/L10n:Pontoon/API#Roadmap
What data would you like to get from such query? I suspect aggregated stats and a list of Resources to Translate?
https://pontoon.mozilla.org/fr/mozillaorg/
We have this covered in the Milestone 2 which is scheduled for 2017 Q4. I'm CCing stas who leads the API effort, and probaby has ideas how he wants to track the next milestone in Bugzilla.
Reporter | ||
Comment 2•7 years ago
|
||
Hi Matjaz,
The data would be same as querying individual project (irrespective of locale which is possible now) but with this query will get a detail of individual project for a particular locale.
Comment 3•7 years ago
|
||
I asked Roosan to file this bug when he emailed me last week. Thanks again, Roosan!
Right now it's only possible to get _all_ locales for a particular project or _all_ projects for a particular locale. We expose the aggregated statistics for each item on the respective list. We could add a way to query for the same data but for a particular project _and_ a particular locale only.
I see two ways in which this could be accompilshed:
1) Add a new `localization(code, slug)` root-level field which allows to query ProjectLocale objects directly:
{
localization(code: "ne-NP", slug: "firefox") {
missingStrings
}
}
2) Add a `localization(code)` field to the Project shape and a `localization(slug)` field to the Locale shape, similar to the current `localizations` field which returns a list:
{
locale(code: "ne-NP") {
localization(slug: "firefox") {
missingStrings
}
}
}
{
project(slug: "firefox") {
localization(code: "ne-NP") {
missingStrings
}
}
}
My recommendation would be to go with the second approach: extending shapes is more versatile because it allows us to use the feature everywhere where the shape is used. For instance, we could list all locales with data about only some projects:
query mobileLocales {
locales {
name
android: localization(slug: "firefox-for-android") {
missingStrings
}
ios: localization(slug: "firefox-for-ios") {
missingStrings
}
}
}
Blocks: pontoon-api
Updated•7 years ago
|
Summary: As a developer, I should be able to query for a project of a particular locale in Pontoon API. → [API] Query for a project of a particular locale
Reporter | ||
Comment 4•7 years ago
|
||
This bug seems still unconfirmed. Any news ?
Updated•7 years ago
|
Updated•7 years ago
|
Priority: -- → P2
Comment 6•7 years ago
|
||
Hi :stas and :mathjazz,
I could look at this bug in the meantime if you won't mind.
Comment 7•7 years ago
|
||
Sure, go ahead. Note that stas is on a PTO until the end of the week, so it might take some time before he can respond.
Updated•6 years ago
|
Priority: P2 → P3
Comment 8•3 years ago
|
||
*This bug has been moved to GitHub.*
*Please check it out on https://github.com/mozilla/pontoon/issues.*
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → MOVED
Updated•3 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•