diff options
author | Bjorn Bringert <bringert@android.com> | 2011-01-19 20:04:13 +0000 |
---|---|---|
committer | Bjorn Bringert <bringert@android.com> | 2011-01-19 20:04:13 +0000 |
commit | 534c607748f4a008974cf0e9c030d378c3177e4b (patch) | |
tree | 64a6853314e9b35f7056b10cc65bac400a063cf2 /tools/get_search_engines.py | |
parent | 4c1c0feb85129e9c6cd7daee0071dd90151a0eb9 (diff) | |
download | packages_apps_Browser-534c607748f4a008974cf0e9c030d378c3177e4b.zip packages_apps_Browser-534c607748f4a008974cf0e9c030d378c3177e4b.tar.gz packages_apps_Browser-534c607748f4a008974cf0e9c030d378c3177e4b.tar.bz2 |
Update Google search engine data
Bug: 3369333
Change-Id: I1caff40ca2419375e2aaf5588d9d3a710cb8c56a
Diffstat (limited to 'tools/get_search_engines.py')
-rwxr-xr-x | tools/get_search_engines.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/get_search_engines.py b/tools/get_search_engines.py index cd73423..bd6e5f8 100755 --- a/tools/get_search_engines.py +++ b/tools/get_search_engines.py @@ -39,16 +39,15 @@ locales = ["cs-CZ", "da-DK", "de-AT", "de-CH", "de-DE", "el-GR", "en-AU", google_data = ["google", "Google", "google.com", "http://www.google.com/favicon.ico", - "http://www.google.com/m?hl={language}&ie={inputEncoding}&source=android-browser&q={searchTerms}", + "http://www.google.com/search?hl={language}&ie={inputEncoding}&source=android-browser&q={searchTerms}", "UTF-8", - "http://www.google.com/complete/search?hl={language}&json=true&q={searchTerms}"] + "http://www.google.com/complete/search?hl={language}&client=android&q={searchTerms}"] class SearchEngineManager(object): """Manages list of search engines and creates locale specific lists. The main method useful for the caller is generateListForLocale(), which - creates a locale specific search_engines.xml file suitable for use by the - Android WebSearchProvider implementation. + creates a locale specific donottranslate-search_engines.xml file. """ def __init__(self): @@ -195,7 +194,7 @@ class SearchEngineManager(object): self.writeEngineList(os.path.join(self.resdir, 'values'), "default") def generateListForLocale(self, locale): - """Creates a new locale specific search_engines.xml file. + """Creates a new locale specific donottranslate-search_engines.xml file. The new file contains search engines specific to that country. If required this function updates all_search_engines.xml file with any new search @@ -237,7 +236,7 @@ class SearchEngineManager(object): text.append(' </string-array>\n'); self.generateXmlFromTemplate(os.path.join(sys.path[0], 'search_engines.template.xml'), - os.path.join(dir_path, 'search_engines.xml'), + os.path.join(dir_path, 'donottranslate-search_engines.xml'), text) def generateXmlFromTemplate(self, template_path, out_path, text): @@ -265,4 +264,3 @@ if __name__ == "__main__": for locale in locales: manager.generateListForLocale(locale) manager.writeAllEngines() - |