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)

defect

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" } }
Everything about this bug is awesome!
(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: nobody → mpillard
Priority: -- → P2
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-08-27
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?
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.
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?
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.