Closed Bug 821195 Opened 12 years ago Closed 12 years ago

Installing a hosted app that has the name, dev name & url overridden by a default_locale property to locales - wrong name, dev name, and url is listed

Categories

(Firefox OS Graveyard :: Gaia::System, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED INVALID
B2G C3 (12dec-1jan)

People

(Reporter: jsmith, Assigned: julienw)

References

Details

Build - Beta 12/12/2012
Device - Unagi

Steps:

1. Install a hosted app that has a locales and default locale property called out

Expected:

The app install prompt should show the app name, dev name & url from the default_locale specified. Additionally, completing install should show the app name from the default locale.

Actual:

The app name, dev name & url shown in the prompt was not overridden - the typical fields were used. This is wrong - the locales + default locale property overrides this rule.

Example:

{
  "name":"Test App ({subdomain})",
  "description":"This app has been automatically generated by testmanifest.com",
  "version":"1.0",
  "icons":{
    "16":"http://testmanifest.com/icon-16.png",
    "48":"http://testmanifest.com/icon-48.png",
    "128":"http://testmanifest.com/icon-128.png"
  },
  "installs_allowed_from":[
    "*"
  ],
  "developer":{
    "name":"Gregory Koberger",
    "url":"http://gkoberger.net"
  },
  "locales":{
    "es": {
       "name": "Override name",
       "developer": {
         "name": "Override dev name",
         "url": "Override url"
       }
    }
  },
  "default_locale": "es"
}
Blocks: app-install
blocking-basecamp: --- → ?
Triage: BB+, C3, P2 - if the app is not showing what the app dev wants to show, it may cause confusion to users that simply don't understand the other language.
blocking-basecamp: ? → +
Priority: -- → P2
Target Milestone: --- → B2G C3 (12dec-1jan)
Assignee: nobody → felash
Jason, I'm not so sure this is really a bug. Rather, I think this is intended.

From https://developer.mozilla.org/en-US/docs/Apps/Manifest#default_locale :
"The locale tag for the "default" translation of manifest properties. That is, the locale of values not included in the locales map."

If I understand properly, the |default_locale| property defines what is the locale of main values (ie "name", "description", etc that are not in the locales map) in the manifest. This is not the locale that should be applied by default (because I don't understand how this would be useful at all).

So in your example, it should be "en".

Does it make sense to you ? Of course, the MDN should be rewritten because this is not clear enough, but this is the only meaning that makes sense to me.

I'm not sure who could help us here, maybe fabrice ?
Flags: needinfo?(fabrice)
I'll quickly talk to Fabrice on this and get back to you on that bug. I get the feeling there's confusion on docs here probably as you've specified.
Talked with Fabrice with this - yeah our docs are totally not alignment with how this actually works. The behavior is correct here.

1. default_locale is a non-implemented property right now by Gaia or platform. So let's get that out of the thinking here.
2. If locales is specified, if phone locale = locale listed, we use those properties to override the default properties. Otherwise, we use the default properties.

So this isn't valid. I'll adjust my test plan to reflect this. Thanks for the input.
Status: NEW → RESOLVED
blocking-basecamp: + → ---
Closed: 12 years ago
Flags: needinfo?(fabrice)
Resolution: --- → INVALID
Doc updated - https://developer.mozilla.org/en-US/docs/Apps/Manifest#locales. if anything else looks wrong, let me know.
+ adding Lisa as this is relevant to App Review team's code review
(In reply to Jason Smith [:jsmith] from comment #4)

> 1. default_locale is a non-implemented property right now by Gaia or
> platform. So let's get that out of the thinking here.

I'd say that I don't exactly see what this property should do anyway.
You need to log in before you can comment on or make changes to this bug.