Closed
Bug 903194
Opened 12 years ago
Closed 11 years ago
Allow collection API endpoints to accept localised `name` and `description`
Categories
(Marketplace Graveyard :: API, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
2013-08-27
People
(Reporter: cvan, Assigned: mat)
References
Details
http://firefox-marketplace-api.readthedocs.org/en/latest/topics/rocketfuel.html#post--api-v1-rocketfuel-collections-
http://firefox-marketplace-api.readthedocs.org/en/latest/topics/rocketfuel.html#patch--api-v1-rocketfuel-collections-(int-id)-
Because we need to localise the `name` and `description` for collections we should be able to POST an object that contains the mapping for each locale, like so:
{
"name": {
"en-US": "Basta the potato",
"fr": "Basta la pomme de terre",
"es": "Basta la patata",
"it": "Basta la patata"
},
"description: {
"en-US": "Basta likes potatoes",
"fr": "Basta ama patate e Le Boulanger",
"es": "Basta gusta las patatas y Le Boulanger",
"it": "Basta ama patate e Le Boulanger"
}
}
Comment 1•12 years ago
|
||
Everything about this bug is awesome!
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Christopher Van Wiemeersch [:cvan] from comment #0)
> "en-US": "Basta likes potatoes",
Correction:
"en-US": "Basta likes potatoes and Le Boulanger",
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → mpillard
Assignee | ||
Updated•11 years ago
|
Priority: -- → P2
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-08-27
Comment 4•11 years ago
|
||
A few followup questions:
- Will the API always return the object or will it sometimes return the string version of those fields?
- What does the API use to determine the default locale for a field?
Assignee | ||
Comment 5•11 years ago
|
||
Currently:
1. The API return the string version, always, even in the response following an edit/create action. (Yes, this is confusing).
2. The default_locale used is en-US (actually settings.LANGUAGE_CODE). Behaviour when no en-US translation is provided is undefined.
Let me know if we need to tweak those points.
Comment 6•11 years ago
|
||
I think we'll need to be able to get the object back from the API. Do you want me to file a followup bug for tweaks?
Assignee | ||
Comment 7•11 years ago
|
||
Yep please, that'd be great. Assign it directly to me, thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•