Comment 6 for bug 1359153

Revision history for this message
James Henstridge (jamesh) wrote :

So I've dug a bit further into this problem. I've confirmed that the untranslated strings are coming from the API rather than embedded in the scope, so it isn't a simple matter of adding some gettext() calls and rerunning "make pot".

The department list is determined by a call to the youtube.guideCategories.list endpoint:

https://developers.google.com/youtube/v3/docs/guideCategories/list

This endpoint takes hl (human language) and regionCode parameters that the scope is filling in from the locale and location data respectively. I notice that even when I use hl=es_ES, some of the guide categories are returned in English (including "Best of YouTube").

The category list for the surfacing page of each department (including the top level "Best of YouTube" one) are formed by a call to the youtube.channels.list endpoint:

https://developers.google.com/youtube/v3/docs/channels/list

The id from the guideCategories output is passed as the categoryId parameter to this API. There doesn't seem to be any parameters to set language or region here, so the results all seem to come back in English.

Also, it looks like the guide returns identical category IDs for all languages, so it can't use that to determine the language to show for results.

I'll do a bit more poking around, but I don't see an obvious documented way to pass in the desired language here.