Closed Bug 1124098 Opened 9 years ago Closed 9 years ago

Hide the Get More Languages link in devices other than phones

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

defect
Not set
normal

Tracking

(b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S5 (6feb)
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: stas, Assigned: stas)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
arthurcc
: review+
arthurcc
: feedback+
Details | Review
In bug 1115798 we're introducing a Get More Languages link in the Settings' Language panel as part of the UI implementation for language packages.

Since device types are a buildtime option, in their initial form langpacks won't contain translation strings for all devices.  In 2.2 we'll only have langpacks for phones.  Consequently we need a way to hide the Get More Languages link on other device types.
One solution would be to extend the logic in https://github.com/stasm/gaia/blob/332f20c80ce79e91a05d0e7f9d6014c35b61e57b/build/webapp-optimize.js#L489-L500 to also remove other element types than <link>s.

A less invasive alternative would be to use device-specific CSS to show and hide the link.

Arthur, do you have a preference?
Flags: needinfo?(arthur.chen)
device-specific CSS sounds a good option! Settings app uses templates so it would required extra effort in addition to the change of optimizeDeviceTypeCSS if we want data-device-type to be supported in a template.
Flags: needinfo?(arthur.chen)
Blocks: 1107346
Attached file Pull request
Hey Arthur, would you mind taking a look?
Assignee: nobody → stas
Status: NEW → ASSIGNED
Attachment #8553651 - Flags: review?(arthur.chen)
Comment on attachment 8553651 [details] [review]
Pull request

We have to hide the <li> or there is an empty space left.
Attachment #8553651 - Flags: review?(arthur.chen) → feedback+
Comment on attachment 8553651 [details] [review]
Pull request

I updated the PR to account for the blank space in <li>.
Attachment #8553651 - Flags: review?(arthur.chen)
Comment on attachment 8553651 [details] [review]
Pull request

r=me, thanks!

And I was wondering when will the marketplace app start to handle "marketplace-langpacks" activities? Is there any bug tracking it? If it will not be landed any soon, it would be better to hide the menu item or it feels like broken.
Attachment #8553651 - Flags: review?(arthur.chen) → review+
Master: https://github.com/mozilla-b2g/gaia/commit/060ca176afb5479291f2a87e422e8f04fedfbf12
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(In reply to Arthur Chen [:arthurcc] from comment #6)

> And I was wondering when will the marketplace app start to handle
> "marketplace-langpacks" activities? Is there any bug tracking it? If it will
> not be landed any soon, it would be better to hide the menu item or it feels
> like broken.

Good point. I think the Marketplace team is close to finishing the implementation but I'm not sure when it'll be available in production. I'll ask and if needed, file a new bug to hide the link for a little while.
Comment on attachment 8553651 [details] [review]
Pull request

[Approval Request Comment]

[Bug caused by] (feature/regressing bug #):  bug 1115798

[User impact] if declined:  the "Get More Languages" link will be visible on all devices, while langpacks are only going to be offered to phones initially.

[Testing completed]: on the device

[Risk to taking this patch] (and alternatives if risky):  low

[String changes made]: n/a
Attachment #8553651 - Flags: approval-gaia-v2.2?(bbajaj)
Attachment #8553651 - Flags: approval-gaia-v2.2?(bbajaj) → approval-gaia-v2.2+
AFAICT, this depends on Bug 1115798, which isn't on v2.2?
Flags: needinfo?(stas)
Target Milestone: --- → 2.2 S5 (6feb)
Yes, I must have forgotten to request the approval for bug 1115798.  Thanks, Ryan.
Flags: needinfo?(stas)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: