Closed Bug 1216896 Opened 9 years ago Closed 9 years ago

The layout name "Emoji" is not localizable

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timdream, Assigned: timdream)

References

Details

Attachments

(2 files)

I don't think we *could* localize layout names anymore since we have been showing their names in their native script for a long time. The needed stuff is either broken or not used anymore.

Still, that makes the label "Emoji" a big exception. Sure, you could say it's neither English nor Japanese but a special word transcends culture. Or that's entire bulls**t and we should not ship Emoji layout unless we could localize that label.

:pike, could you make a call here? Do you know who should make the call?

If we decide to localize the label, we would need to rebuilt the l10n infra to extra English strings (it will not be simply an extraction from the static manifest but some thing more complex, since the entries are generated dynamically in build or runtime now), and the UI handling code in Keyboard app/Settings app/System app would need to be changed too.
Flags: needinfo?(l10n)
For the lack of a better idea, I just quickly glanced over the links on https://de.wikipedia.org/wiki/Emoji to other languages, and it seems that Emoji is at least transcribed for languages with non-Latin script.

I'd argue that we should localize it, but at the end, this is a product decision.

For how to do that, I'd lobby for runtime code that extracts the names from a normal ....en-US.properties. That way, language packs can provide this string, too.
Flags: needinfo?(l10n)
I have a creative solution: let's change the label it to 3 Emoji smiley faces? After all, smiley faces are the native script of the Emoji layout.

Tori, what do you think?
Flags: needinfo?(tchen)
(In reply to Tim Guan-tin Chien [:timdream] (please needinfo) from comment #2)
> I have a creative solution: let's change the label it to 3 Emoji smiley
> faces? After all, smiley faces are the native script of the Emoji layout.

When I saw this bug last night, I thought the same thing.
From UX and visual side we both prefer to localize the name of "Emoji" since there are already translated words in most languages.
(Personally I like the idea of 3 Emoji faces, but it's hard for me to tell if it a global symbol in each country.)
Flags: needinfo?(tchen)
Comment on attachment 8679865 [details] [review]
[gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master

As previously discussed, to ease the burden of recreating l10n infra just to extract and localize this one layout name, we are consider the "Emoji" layout name as a special case and deal that within each app instead.

For the Keyboard app the build script will insert an nameL10nId into layouts.json, which LayoutItems and LayoutItemsView will respond too (and properly put it into the HTML and have it picked up by mozL10n)

For System and Settings, as we are not breaking the spec of InputManifest, the l10nId is hardcoded in the shared InputAppList and insert into the InputManifest when the app is certified and the id of the layout is "emoji".

System show the label in two places -- IMESwitcher and IMEMenu -- both don't rely on localization handled in InputLayouts so I change the code there as such.

Settings respond to localized event in it's KeyboardContext model, so I patched it accordingly.

This patch needs to be landed in master before 30th or otherwise it will be late-l10n. Or we could land the strings first in another bug.

Fred, could you help on the Settings app part?
Alberto, need you help on input mgmt part again.
Reza, I would need your help again on the Keyboard app part.

Thank you all!
Attachment #8679865 - Flags: review?(rakhavan)
Attachment #8679865 - Flags: review?(gasolin)
Attachment #8679865 - Flags: review?(apastor)
Comment on attachment 8679865 [details] [review]
[gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master

Left a nit comment, otherwise looks good.
Attachment #8679865 - Flags: review?(rakhavan) → review+
Comment on attachment 8679865 [details] [review]
[gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master

looks good for settings part, thanks!
Attachment #8679865 - Flags: review?(gasolin) → review+
Comment on attachment 8679865 [details] [review]
[gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master

Sorry for the delay, too many blockers these days. Not too familiar with this code, but it looks good to me. r=me fixing the comment I left + adding unit tests for all these changes. Please, flag me again when done.
Attachment #8679865 - Flags: review?(apastor)
This is not late-l10n because I don't think we should get this into v2.5 anymore.
Keywords: late-l10n
Comment on attachment 8679865 [details] [review]
[gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master

I've removed mozL10n.get() calls. I originally use it because the Layout model are Observables that observe exactly the localization changes. It doesn't make sense to make them Observables since they don't really change. Time to remove it Fred?

It is unclear to me what to add unit test for. They are many code changes indeed, but all of them (after changes done to Settings too) are only about flowing nameL10nId to the layout name label container dataset.l10nId. There isn't assertions on textContent either so I don't think there should be more unit tests just to assert dataset.l10nId.

(But I added some for the Keyboard app part none the less).
Attachment #8679865 - Flags: review?(apastor)
Attachment #8679865 - Flags: feedback?(gasolin)
Comment on attachment 8679865 [details] [review]
[gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master

Still one mozL10n.get to be removed, but r=me when that gets fixed.

Thanks!
Attachment #8679865 - Flags: review?(apastor) → review+
master: https://github.com/mozilla-b2g/gaia/commit/f22b39ccd71bf8933e7ca04ce08bec1d024ef98e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 8679865 [details] [review]
[gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master

Please remove Observables if it not useful here
Attachment #8679865 - Flags: feedback?(gasolin)
(In reply to Fred Lin [:gasolin] from comment #15)
> Comment on attachment 8679865 [details] [review]
> [gaia] timdream:keyboard-emoji-l10n > mozilla-b2g:master
> 
> Please remove Observables if it not useful here

I am sorry, Layout#enabled is still something need to be observed, so there is no need to remove inheritance of Observables here.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: