Closed Bug 1128854 Opened 10 years ago Closed 6 years ago

[2.2] Built-in languages (English, French) are displayed incorrectly

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: liweijia, Unassigned)

Details

Attachments

(5 files)

Attached file en-US.json
Get 2.2 gaia code base from github.
Make production to modri
Messy code comes up. en-US, es , .....
except zh-CN.
Any idea why this happen? what's the mechanism of 2.2 l10n build?
I find the en-US.json differ from 2.0
Summary: 2.2 Messy translation while build gaia → Messy translation in gaia 2.2
blocking-b2g: --- → 2.2?
Same problem here (ZTE Open C upgraded to 2.2 yesterday with French locale).

Anything I can do to help?
It would help to know how you're building Firefox OS, considering that localizations are not in Gaia's repository, so you should be taking them from somewhere else.

This is not an issue with l10n.js, so moving to Firefox OS general for now.
Component: Gaia::L10n → General
[Tracking Requested - why for this release]:

(In reply to Francesco Lodolo [:flod] from comment #2)
> It would help to know how you're building Firefox OS, considering that
> localizations are not in Gaia's repository, so you should be taking them
> from somewhere else.
> 
> This is not an issue with l10n.js, so moving to Firefox OS general for now.
l10n.js change the way generating locale-obj/xx.json files. Why?
$i $v is used.

Actually, we use the default properties in gaia's repository in each apps/locale/xx.properties.
Messy code comes up.  
Neither set the path to gaia-l10n.
Flags: needinfo?(francesco.lodolo)
The default .properties in gaia are NOT maintained localizations, and they'll be soon removed from the tree.

How to build a proper multilocale build 
https://developer.mozilla.org/en-US/Firefox_OS/Building#Building_multilocale

Gaia 2.2 is currently tracked on https://hg.mozilla.org/gaia-l10n/, but it's almost 2 months behind from the current code. Also: since the branch is not string frozen yet, most locales are not working on it yet.

Having said that, I really have no idea what you're asking. locale-obj/xx.json has always looked like that as far as I can tell. This is a piece of it.json taken from my phone

[
  {
    "$i": "back-button",
    "ariaLabel": "Indietro"
  },
  {
    "$i": "close-button",
    "ariaLabel": "Chiudi"
  },
etc.
Flags: needinfo?(francesco.lodolo)
Attached image English selected
Better to upload some screen shots.   When English is selected, messy translation comes up.
I did as https://developer.mozilla.org/en-US/Firefox_OS/Building#Building_multilocale says

https://hg.mozilla.org/gaia-l10n/ is 2 months behind doesn't means all of translation are messy code.
But English shows up as default if no corresponding locale.
English is the only language that comes directly from the git repository, so it needs to be OK. Looking at the screenshots, I'm not even sure if that's an issue with translation resources or with font/graphics.

So I repeat my first comment: "It would help to know how you're building Firefox OS", or "what are you flashing on the device"?

Take for example the home screen from the phone (mine is running master, but 2.2 should still be the same at this point)

adb pull /system/b2g/webapps/verticalhome.gaiamobile.org/application.zip
unzip -j application.zip 'locales-obj/en-US.json'

Check the attachment to see how it looks. If yours has all the strings, you're having some other issues (again, I'd say fonts or graphics, maybe outdated gecko?).
The same en-US.json

I think some other issue lead to the messy code.

I pull the whole gaia, then run make production.

Can you forward this bug to the right one, if it's the fonts or graphics problem?
Can you clone this repository and report the result of ./chech_versions.py?
https://github.com/Mozilla-TWQA/B2G-flash-tool

I also realized that a font issue would be strange, since when you select Chinese, "English" is displayed correctly.
Summary: Messy translation in gaia 2.2 → [2.2] Built-in languages (English, French) are displayed incorrectly
Build ID               20150203111522
Gaia Revision          2f916cdba7305b51a72482b6bfe860c5b8924f9c
Gaia Date              2015-01-15 21:34:22
Gecko Revision         n/a
Gecko Version          38.0a1
Device Name            msm8610
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.tclxa.20150203.111445
Firmware Date          Tue Feb  3 11:15:10 CST 2015
Bootloader             L1TC00012EA0
This doesn't look right: as far as I can tell Gecko 38 is used on gaia-master (3.0), on 2.2 it should be Gecko 37. Besides that, not sure who could help or where else to move this bug.
I can assure that When I build the whole system images, the flash to the device, it works fine.
When I make install-gaia in gaia repository, the bug occurs.
So, I think Gecko version isn't the root.
I hit this error when I updated Buri to master.

The problem was the old font - you need to update FiraSans font - https://developer.mozilla.org/en-US/Firefox_OS/Phone_guide/Flame/Updating_your_Flame#Font_fix

Marking as INVALID. If the font fix won't help, please, reopen.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Hi Zibi,
   After looking around in Bugzilla, I find some fonts patches caused the problem.
Bug 1040663 and 951593, push some fonts in /system/fonts/hidden. 

When I removing the hidden folder, the translations return normal.
Why this hidden folder cause the messy code?
Status: RESOLVED → REOPENED
Flags: needinfo?(rnowmrch)
Resolution: INVALID → ---
Forwarding ni to Pavel, as I've left the project ;)
Flags: needinfo?(rnowmrch) → needinfo?(pivanov)
Per https://bugzilla.mozilla.org/show_bug.cgi?id=951593#c89

 Jonathan, Can you explain more about this hidden folder, which caused the messy code here?
Status: REOPENED → NEW
Flags: needinfo?(pivanov) → needinfo?(jfkthame)
/system/fonts/hidden is used to provide "preloaded" copies of icon fonts that gaia apps want to use, to improve startup speed compared to loading the fonts from @font-face resources. These fonts should not be exposed to arbitrary content.

In the screenshots, it looks like the lowercase Latin letters are displaying as blank space. My guess is that one of the icon fonts in fonts/hidden is using a ligature technique to access its glyphs, where a string like "my-icon-name" in content is replaced, using an OpenType ligature rule, by a single icon. They probably use lowercase ASCII for these names, but the ASCII letters are just blank glyphs because they were never intended to be rendered in isolation.

So the question is why that font is being used here, when we should be using the standard Fira. I'm not sure which versions are involved here; we did have a name change at one point, replacing "Fira Sans OT" with "Fira Sans", so if you have a mismatch between the fonts installed in Gonk and the CSS in Gaia and/or the font prefs in Gecko, we might fail to find Fira and end up falling back to something more-or-less random. Though I thought that even in this case, the /hidden/ fonts were supposed to remain hidden, so that may indicate a bug?

:mwu, do you know what font versions are involved here, and whether perhaps the Fira rename is part of the issue? If so, a full flash that provides matching fonts, gecko and gaia should fix things; the problem presumably arises when one part of the system is updated but not another.
Flags: needinfo?(jfkthame) → needinfo?(mwu)
Hi Jonathan, 
   My view is, maybe I lost some patches. 
   I check that FiraMono-Bold.ttf in /system/fonts. But, if I remove the /system/fonts/hidden folder, all returns to normal. 
   shared/elements/gaia-icons/fonts/gaia-icons.ttf is pushed, while run make install-gaia.
I find something, My moztt last commit is ce95d372e6d2, which is Apr 13 2014. maybe too old.
And I find the latest commit is in Nov.
Is that the reason?
(In reply to weijia from comment #21)
> I find something, My moztt last commit is ce95d372e6d2, which is Apr 13
> 2014. maybe too old.
> And I find the latest commit is in Nov.
> Is that the reason?

Yes, probably. It sounds like you're on the 2.0 branch of moztt, for some reason. That has the old fonts with the family name "Fira Sans OT", which won't match any of the current Gaia CSS.
Clearing NI, as it looks like the cause is an old moztt.
Flags: needinfo?(mwu)
Removing the 2.2? as this looks like build issues.
blocking-b2g: 2.2? → ---
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 10 years ago6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: