Closed Bug 1022889 Opened 11 years ago Closed 10 years ago

Introduce BTO pretranslation blacklist

Categories

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

x86
All
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(2 files)

It is currently impossible to prevent BTO from pretranslating an app. It seems that for cases like bug 1013207 it would be useful.
Assignee: nobody → gandalf
Priority: -- → P2
Attached file pull request (deleted) —
Status: NEW → ASSIGNED
Attached patch bug1022889.diff (deleted) — Splinter Review
This patch adds PRETRANSLATION_BLACKLIST which works similar to INLINE_WHITELIST.
Attachment #8440953 - Flags: review?(stas)
Blocks: 998094
Comment on attachment 8440953 [details] [diff] [review] bug1022889.diff Review of attachment 8440953 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: build/webapp-optimize.js @@ +611,5 @@ > + let appName = webapp.sourceDirectoryName; > + let fileName = file.leafName; > + if (!PRETRANSLATION_BLACKLIST[appName] || > + (PRETRANSLATION_BLACKLIST[appName].indexOf('*') === -1 && > + PRETRANSLATION_BLACKLIST[appName].indexOf(fileName) === -1)) { Just for better readability, I might suggest defining a function isBlacklistedFromPretranslation(appName, fileName) which you'd call here. But if you feel it won't improve the code by much, ignore this comment.
Attachment #8440953 - Flags: review?(stas) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I disagree with this fix. We have a explicit goal to remove app-specific part of build script code and information out of ./gaia/build/. If Yuren was the reviewer of this patch he would have told you that. I recommend we back this out and move the black list into somewhere like apps/keyboard/metadata.json. There isn't any tests in this bug to ensure future changes will not break this feature.
Component: Gaia::L10n → Gaia::Build
Flags: needinfo?(yurenju.mozilla)
Flags: needinfo?(gandalf)
Flags: needinfo?(stas)
offline discissed with Tim, since we still have another three black/white list, we should file another follow up bug to migrate all black/white list to metadata.json I'll file the bug so keeping needinfo? to me
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #5) > I disagree with this fix. We have a explicit goal to remove app-specific > part of build script code and information out of ./gaia/build/. If Yuren was > the reviewer of this patch he would have told you that. I recommend we back > this out and move the black list into somewhere like > apps/keyboard/metadata.json. You're right. I feel bad about not f? Yuren here. Will do better job next time! > There isn't any tests in this bug to ensure future changes will not break > this feature. Neither are for other blacklists. Or for pretranslation in general for the matter. I just followed what other blacklists in webapp-optimize do, but I like the solution described here better.
Flags: needinfo?(gandalf)
follow up bug 1027988 is filed
Flags: needinfo?(yurenju.mozilla)
Clearing the ni request on me. To echo Gandalf's words: apologies for not including Yuren on this bug. It won't happen again!
Flags: needinfo?(stas)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: