Screenshots not localized

Bug #1531577 reported by Michał Sawicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Triaged
Undecided
Unassigned

Bug Description

I've uploaded localized screenshots along with description and such for uber-web.saviq, but the returned screenshots are never localized:

$ curl -H "Accept-Language: pl" https://search.apps.ubuntu.com/api/v1/package/uber-web.saviq | jq '.description, .screenshot_urls'
"Mobilna aplikacja Uber.\r\n\r\nUWAGA:\r\nJeśli podczas zamawiania przejazdu aplikacja poinformuje, że używasz zbyt starej wersji, musisz zgłosić ten problem na <email address hidden>, oni aktywują dostęp do http://m.uber.com/ dla twojego konta."
[
  "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/12/screenshot20151215_121853852.png",
  "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/12/screenshot20151215_121934343.png"
]

$ curl -H "Accept-Language: en" https://search.apps.ubuntu.com/api/v1/package/uber-web.saviq | jq '.description, .screenshot_urls'
"Everyone's private driver\nThe mobile Uber web app.\r\n\r\nNOTE:\r\nIf, when requesting a ride, the app says that it's too old, you need to contact Uber support at <email address hidden> to enable your account for http://m.uber.com/."
[
  "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/12/screenshot20151215_121853852.png",
  "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/12/screenshot20151215_121934343.png"
]

Note description is translated, but screenshots are not. The correct URLs should be:

https://myapps.developer.ubuntu.com/site_media/appmedia/2015/12/screenshot20151215_122700813.png
https://myapps.developer.ubuntu.com/site_media/appmedia/2015/12/screenshot20151215_122705288.png

Revision history for this message
James Tait (jamestait) wrote :
Download full text (5.6 KiB)

The localised screenshot URLs are not in the Index:

```
$ curl -s 'https://search.apps.ubuntu.com/api/v1/search?q=name:uber-web.saviq&fields=translations' | jq .
{
  "_embedded": {
    "clickindex:package": [
      {
        "_links": {
          "self": {
            "href": "https://search.apps.ubuntu.com/api/v1/package/uber-web.saviq"
          }
        },
        "translations": {
          "pl": {
            "keywords": [
              "uber",
              "taxi",
              "taksówka",
              "taksowka",
              "transport"
            ],
            "description": "Mobilna aplikacja Uber.\r\n\r\nUWAGA:\r\nJeśli podczas zamawiania przejazdu aplikacja poinformuje, że używasz zbyt starej wersji, musisz zgłosić ten problem na <email address hidden>, oni aktywują dostęp do http://m.uber.com/ dla twojego konta.",
            "title": "Uber Mobile"
          }
        }
      }
    ]
  },
  "_links": {
    "curies": [
      {
        "href": "https://wiki.ubuntu.com/AppStore/Interfaces/ClickPackageIndex#reltype_{rel}",
        "name": "clickindex",
        "templated": true
      }
    ],
    "self": {
      "href": "https://search.apps.ubuntu.com/api/v1/search?q=name%3Auber-web.saviq&fields=translations&page=1"
    },
    "last": {
      "href": "https://search.apps.ubuntu.com/api/v1/search?q=name%3Auber-web.saviq&fields=translations&page=1"
    },
    "first": {
      "href": "https://search.apps.ubuntu.com/api/v1/search?q=name%3Auber-web.saviq&fields=translations&page=1"
    }
  }
}
```

However, local testing has shown that if localised screenshot URLs are provided in the translations dict when publishing to the index, then they are returned as expected:

```
$ curl 'http://cpi-trusty.lxc:8000/api/v1/search?q=name:ubuntu-hangups.timsueberkrueb&fields=screenshot_urls,translations' -H 'Accept-Language: en' -s | jq .
{
  "_embedded": {
    "clickindex:package": [
      {
        "_links": {
          "self": {
            "href": "http://localhost:8000/api/v1/package/ubuntu-hangups.timsueberkrueb"
          }
        },
        "translations": {
          "pl": {
            "screenshot_urls": [
              "http://localhost/dummy.png",
              "http://localhost/dummy2.png"
            ]
          }
        },
        "screenshot_urls": [
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/08/screenshot-02.png",
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/08/screenshot-03.png",
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/09/screenshot20150906_142917143.png",
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/09/screenshot20150906_143014836.png",
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/09/screenshot20150906_143112530.png",
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/09/screenshot20150906_143201841.png",
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/09/screenshot20150906_143214054.png",
          "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/09/screen...

Read more...

affects: click-package-index → software-center-agent
Changed in software-center-agent:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.