예제 #1
0
    def run(self):
        '''Collect the data from bookmarks.html for all locales

    '''
        locales = [
            loc.strip() for loc in open('mozilla/browser/locales/all-locales')
        ]
        bm = Parser.BookmarksParser()
        res = {}
        for loc in locales:
            try:
                bm.read('l10n/%s/browser/profile/bookmarks.html' % loc)
                res[loc] = bm.getDetails()
            except Exception, e:
                logging.getLogger('locale.%s' % loc).error(
                    'Bookmarks are busted, %s' % e)
예제 #2
0
 def failureTest(self, myResult, failureResult):
     '''signal pass/warn/failure for each locale
 Just signaling errors for now.
 
 '''
     locales = [
         loc.strip() for loc in open('mozilla/browser/locales/all-locales')
     ]
     bm = Parser.BookmarksParser()
     bm.read('mozilla/browser/locales/en-US/profile/bookmarks.html')
     enUSDetails = bm.getDetails()
     for loc in locales:
         if not myResult.has_key(loc):
             if not failureResult.has_key(loc):
                 failureResult[loc] = 2
             else:
                 failureResult[loc] |= 2