Closed Bug 907146 Opened 11 years ago Closed 11 years ago

Update browser/locales/filter.py for Firefox Metro's search engines (region.properties)

Categories

(Firefox for Metro Graveyard :: Build Config, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: flod, Assigned: Pike)

References

()

Details

Attachments

(1 file)

p12n information for Firefox Metro are now stored inside a separate region.properties file in /browser/metro/chrome/browser.properties
http://hg.mozilla.org/l10n-central/it/rev/f044d6e1f562

When Metro's localization was dropped some changes to filter.py remained (bug 769490). I think the only part missing is to adapt for a different number of search engines between en-US and other locales
If I read correctly how that file works, would it be enough to add this after the first check (if mod not in) and before it exits for everything except browser or spellcheck?

  if mod == "browser/metro" and path == "chrome/region.properties":
    # Firefox Metro: ignore search engines order
    return not (re.match(r"browser\.search\.order\.[1-9]", entity))

Problem is that I don't really understand how this file is used or how to test it.
Flags: needinfo?(l10n)
I'll just take this bug.

I'm rewriting filter.py a good deal here, and replacing False with "ignore", and True with "error". The file just makes a metric ton of s*** more sense that way.

I'm also using conditional expressions freely. Python 2.5 is OK, I hope.
Assignee: nobody → l10n
Status: NEW → ASSIGNED
Attachment #798848 - Flags: review?(gps)
Attachment #798848 - Flags: feedback?(francesco.lodolo)
Flags: needinfo?(l10n)
Component: Infrastructure → Build Config
Product: Mozilla Localizations → Firefox for Metro
Comment on attachment 798848 [details] [diff] [review]
Rewrite filter.py to be easier to grok, and support metro. drop help images

Review of attachment 798848 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me, tried also running some tests against both functions getting the same results.
Attachment #798848 - Flags: feedback?(francesco.lodolo) → feedback+
Comment on attachment 798848 [details] [diff] [review]
Rewrite filter.py to be easier to grok, and support metro. drop help images

Review of attachment 798848 [details] [diff] [review]:
-----------------------------------------------------------------

I have no clue what this code does. Can you find another reviewer who does?
Attachment #798848 - Flags: review?(gps)
I think r=sparky is the next best solution, given that this part of the l10n setup is me, myself and I, really.

Wanna wave that?
Talked this through with gavin over irc, he doesn't require more reviews on this patch.

Thus landed with https://hg.mozilla.org/integration/mozilla-inbound/rev/7dd0ddad0460
https://hg.mozilla.org/mozilla-central/rev/7dd0ddad0460
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: