Bug 1300198 - Move list.txt over to JSON once bug 1276739 is in and port |Bug 1309304 - Move search python files to a central location| and |Bug 1328713 - add regionOverrides to search/list.json| to SeaMonkey. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Fri, 17 Apr 2020 16:26:33 +0100
changeset 29632 ee142fe1995803d75620bf95cfd7923be11c3e02
parent 29631 ba49bdd5e52c79c9e7d6f94c66ee8d442d25431d
child 29633 cc85a33a585d67b3fe202c7d94086f1988ed96ac
push id17465
push userfrgrahl@gmx.net
push dateThu, 21 May 2020 13:02:07 +0000
treeherdercomm-central@44171a2e26b1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg
bugs1300198, 1276739, 1309304, 1328713
Bug 1300198 - Move list.txt over to JSON once bug 1276739 is in and port |Bug 1309304 - Move search python files to a central location| and |Bug 1328713 - add regionOverrides to search/list.json| to SeaMonkey. r=frg
suite/locales/Makefile.in
suite/locales/en-US/searchplugins/list.txt
suite/locales/jar.mn
suite/locales/search/list.json
--- a/suite/locales/Makefile.in
+++ b/suite/locales/Makefile.in
@@ -47,44 +47,42 @@ MOZ_SFX_PACKAGE=$(topsrcdir)/comm/other-
 NON_OMNIJAR_FILES = \
 	defaults/messenger/mailViews.dat \
 	defaults/profile/panels.rdf \
 	defaults/profile/mimeTypes.rdf \
 	defaults/profile/chrome/userChrome-example.css \
 	defaults/profile/chrome/userContent-example.css \
 	$(NULL)
 
-SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,searchplugins/list.txt))
-SEARCHPLUGINS_FILENAMES = $(subst :hidden,,$(SEARCHPLUGINS_NAMES))
+SEARCHPLUGINS_FILENAMES := $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD)))
 SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD)
 SEARCHPLUGINS_TARGET := libs searchplugins
 SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_FILENAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin))))
 # Some locale-specific search plugins may have preprocessor directives, but the
 # default en-US ones do not.
 SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings
 PP_TARGETS += SEARCHPLUGINS
 
-list-txt = $(SEARCHPLUGINS_PATH)/list.txt
-GARBAGE += $(list-txt)
+list-json = $(SEARCHPLUGINS_PATH)/list.json
+GARBAGE += $(list-json)
 
 libs:: searchplugins
 
 # Required for l10n.mk - defines a list of app sub dirs that should
 # be included in langpack xpis.
 # Currently not set in SeaMonkey.
 DIST_SUBDIRS = $(DIST_SUBDIR)
 
 include $(topsrcdir)/config/rules.mk
 
 include $(topsrcdir)/toolkit/locales/l10n.mk
 
-$(list-txt): $(call mkdir_deps,$(SEARCHPLUGINS_PATH)) $(if $(IS_LANGUAGE_REPACK),FORCE)
-	$(RM) $(list-txt)
-	$(foreach plugin,$(SEARCHPLUGINS_NAMES),printf '$(plugin)\n' >> $(list-txt);)
-searchplugins:: $(list-txt)
+$(list-json): $(call mkdir_deps,$(SEARCHPLUGINS_PATH)) $(if $(IS_LANGUAGE_REPACK),FORCE)
+	$(call py_action,generate_searchjson,$(srcdir)/search/list.json $(AB_CD) $(list-json))
+searchplugins:: $(list-json)
 
 $(DIST)/branding:
 	$(NSINSTALL) -D $@
 
 PROFILE_CHROME = userChrome-example.css userContent-example.css
 
 NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
 
deleted file mode 100644
--- a/suite/locales/en-US/searchplugins/list.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-duckduckgo
-google
-wikipedia
-yahoo
--- a/suite/locales/jar.mn
+++ b/suite/locales/jar.mn
@@ -194,18 +194,18 @@
   locale/@AB_CD@/communicator/profile/profileSelection.dtd                  (%chrome/common/profile/profileSelection.dtd)
   locale/@AB_CD@/communicator/profile/profileSelection.properties           (%chrome/common/profile/profileSelection.properties)
   locale/@AB_CD@/communicator/safeMode.dtd                                  (%chrome/common/safeMode.dtd)
   locale/@AB_CD@/communicator/search/engineManager.dtd                      (%chrome/common/search/engineManager.dtd)
   locale/@AB_CD@/communicator/search/engineManager.properties               (%chrome/common/search/engineManager.properties)
   locale/@AB_CD@/communicator/search/search.properties                      (%chrome/common/search/search.properties)
   locale/@AB_CD@/communicator/search/searchbar.dtd                          (%chrome/common/search/searchbar.dtd)
   locale/@AB_CD@/communicator/search/search-panel.dtd                       (%chrome/common/search/search-panel.dtd)
-  locale/@AB_CD@/communicator/searchplugins/list.txt                        (.deps/generated_@AB_CD@/list.txt)
   locale/@AB_CD@/communicator/searchplugins/                                (.deps/generated_@AB_CD@/*.xml)
+  locale/@AB_CD@/communicator/searchplugins/list.json                       (.deps/generated_@AB_CD@/list.json)
   locale/@AB_CD@/communicator/sidebar/customize.dtd                         (%chrome/common/sidebar/customize.dtd)
   locale/@AB_CD@/communicator/sidebar/preview.dtd                           (%chrome/common/sidebar/preview.dtd)
   locale/@AB_CD@/communicator/sidebar/sidebar.properties                    (%chrome/common/sidebar/sidebar.properties)
   locale/@AB_CD@/communicator/sidebar/sidebarOverlay.dtd                    (%chrome/common/sidebar/sidebarOverlay.dtd)
   locale/@AB_CD@/communicator-region/region.properties                      (%chrome/common/region.properties)
   locale/@AB_CD@/messenger/AccountManager.dtd                               (%chrome/mailnews/pref/AccountManager.dtd)
   locale/@AB_CD@/messenger/AccountWizard.dtd                                (%chrome/mailnews/pref/AccountWizard.dtd)
   locale/@AB_CD@/messenger/addressbook/abAddressBookNameDialog.dtd          (%chrome/mailnews/addressbook/abAddressBookNameDialog.dtd)
new file mode 100644
--- /dev/null
+++ b/suite/locales/search/list.json
@@ -0,0 +1,171 @@
+{
+  "default": {
+    "visibleDefaultEngines": [
+      "duckduckgo", "google", "wikipedia", "yahoo"
+    ]
+  },
+  "regionOverrides": {},
+  "locales": {
+    "en-US": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo", "google", "wikipedia", "yahoo"
+        ]
+      }
+    },
+    "cs": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google", "seznam-cz", "duckduckgo-cz", "heureka-cz", "mapy-cz", "wikipedia-cz"
+        ]
+      }
+    },
+    "de": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo", "google", "wikipedia-de", "yahoo"
+        ]
+      }
+    },
+    "en-GB": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo", "google", "wikipedia", "yahoo-en-GB"
+        ]
+      }
+    },
+    "es-AR": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo", "google", "yahoo", "wikipedia"
+        ]
+      }
+    },
+    "es-ES": {
+      "default": {
+        "visibleDefaultEngines": [
+          "drae", "duckduckgo", "google", "wikipedia-es", "yahoo"
+        ]
+      }
+    },
+    "fi": {
+      "default": {
+        "visibleDefaultEngines": [
+          "bookplus-fi", "duckduckgo", "huuto-fi", "google", "wikipedia-fi", "yahoo-fi"
+        ]
+      }
+    },
+    "fr": {
+      "default": {
+        "visibleDefaultEngines": [
+          "cnrtl-tlfi-fr", "duckduckgo", "google", "wikipedia-fr", "yahoo-france"
+        ]
+      }
+    },
+    "hu": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo", "google", "sztaki-en-hu", "vatera", "wikipedia-hu"
+        ]
+      }
+    },
+    "it": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google", "hoepli", "wikipedia-it", "yahoo-it", "duckduckgo"
+        ]
+      }
+    },
+    "ja-JP-mac": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google-jp", "yahoo-jp", "amazon-jp", "wikipedia-ja", "duckduckgo"
+        ]
+      }
+    },
+    "ja": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google-jp", "yahoo-jp", "amazon-jp", "wikipedia-ja", "duckduckgo"
+        ]
+      }
+    },
+    "ka": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google", "duckduckgo", "wikipedia-ka"
+        ]
+      }
+    },
+    "nb-NO": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo", "google", "wikipedia-NO", "yahoo"
+        ]
+      }
+    },
+    "nl": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google", "duckduckgo", "bolcom-nl", "wikipedia-nl", "marktplaats-nl", "yahoo"
+        ]
+      }
+    },
+    "pl": {
+      "default": {
+        "visibleDefaultEngines": [
+          "allegro-pl", "ddg-pl", "google", "pwn-pl", "startpage-pl", "wikipedia-pl", "wolnelektury-pl"
+        ]
+      }
+    },
+    "pt-BR": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google", "duckduckgo"
+        ]
+      }
+    },
+    "pt-PT": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo", "google", "sapo", "priberam", "wikipedia-ptpt"
+        ]
+      }
+    },
+    "ru": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo-ru", "google", "wikipedia-ru"
+        ]
+      }
+    },
+    "sk": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google", "azet-sk", "atlas-sk", "slovnik-sk", "zoznam-sk", "wikipedia-sk", "duckduckgo"
+        ]
+      }
+    },
+    "sv-SE": {
+      "default": {
+        "visibleDefaultEngines": [
+          "duckduckgo-sv-se", "google", "prisjakt-sv-SE", "tyda-sv-SE", "wikipedia-sv-SE", "yahoo-sv-SE"
+        ]
+      }
+    },
+    "zh-CN": {
+      "default": {
+        "visibleDefaultEngines": [
+          "google", "duckduckgo", "wikipedia", "yahoo"
+        ]
+      }
+    },
+    "zh-TW": {
+      "default": {
+        "visibleDefaultEngines": [
+          "yahoo-zh-TW", "google", "duckduckgo", "yahoo-bid-zh-TW", "chunghwapost-zh-TW", "wikipedia-zh-TW"
+        ]
+      }
+    }
+  }
+}