From dcb02d0482b4622966fdc1c4613aecaa61eef932 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Fri, 22 Jul 2005 20:11:37 +0000 Subject: [PATCH] Bug 299286 - Move reporter locale files from en-US.jar to reporter.jar, r=gandalf a=shaver --- browser/locales/Makefile.in | 3 - client.mk | 1 - config/config.mk | 2 + config/rules.mk | 2 - extensions/inspector/resources/Makefile.in | 7 +- .../inspector/resources/locale/Makefile.in | 6 ++ .../inspector/resources/locale/contents.rdf | 3 +- extensions/reporter/Makefile.in | 69 +++++++++++++++++-- extensions/reporter/locales/Makefile.in | 12 ++++ extensions/reporter/locales/jar.mn | 19 +++-- 10 files changed, 99 insertions(+), 25 deletions(-) diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in index e0ceab2f82f..fb4eece2a8d 100644 --- a/browser/locales/Makefile.in +++ b/browser/locales/Makefile.in @@ -120,9 +120,6 @@ install:: $(addsuffix .src,$(SEARCH_PLUGIN_PREFIX)) $(foreach base,$(SEARCH_PLUG libs-%: @$(MAKE) -C ../../toolkit/locales libs-$* @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref -ifneq (,$(filter reporter,$(MOZ_EXTENSIONS))) - @$(MAKE) -C ../../extensions/reporter/locales libs AB_CD=$* XPI_NAME=locale-$* -endif ifdef MOZ_USE_OFFICIAL_BRANDING @$(MAKE) -C ../../other-licenses/branding/firefox/locales AB_CD=$* XPI_NAME=locale-$* endif diff --git a/client.mk b/client.mk index 942c5d3be63..73897ef038e 100644 --- a/client.mk +++ b/client.mk @@ -148,7 +148,6 @@ LOCALES_browser := \ $(LOCALES_toolkit) \ browser \ other-licenses/branding/firefox \ - extensions/reporter \ $(NULL) BOOTSTRAP_browser := mozilla/browser/config/mozconfig diff --git a/config/config.mk b/config/config.mk index 8785aa0ad82..d0f0807e081 100644 --- a/config/config.mk +++ b/config/config.mk @@ -46,6 +46,8 @@ # Define an include-at-most-once flag INCLUDED_CONFIG_MK = 1 +EXIT_ON_ERROR = set -e; # Shell loops continue past errors without this. + ifndef topsrcdir topsrcdir = $(DEPTH) endif diff --git a/config/rules.mk b/config/rules.mk index e4f838a79ef..9a56e50f107 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -320,8 +320,6 @@ ifdef MOZ_UPDATE_XTERM UPDATE_TITLE = sed -e "s!Y!$@ in $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$$d!" $(MOZILLA_DIR)/config/xterm.str; endif -EXIT_ON_ERROR := set -e; # Shell loops continue past errors without this. - ifdef DIRS LOOP_OVER_DIRS = \ @$(EXIT_ON_ERROR) \ diff --git a/extensions/inspector/resources/Makefile.in b/extensions/inspector/resources/Makefile.in index 7e0b4bbd345..ec49f2fbd99 100644 --- a/extensions/inspector/resources/Makefile.in +++ b/extensions/inspector/resources/Makefile.in @@ -54,7 +54,8 @@ SUBMAKEFILES += locale/Makefile include $(topsrcdir)/config/rules.mk -libs:: +libs realchrome:: locale/Makefile + @$(EXIT_ON_ERROR) \ for locale in $(ALL_LOCALES); do \ - $(MAKE) -C locale AB_CD=$$locale; \ - done \ + $(MAKE) -C locale AB_CD=$$locale; \ + done diff --git a/extensions/inspector/resources/locale/Makefile.in b/extensions/inspector/resources/locale/Makefile.in index 9dafd8dd8be..dadb54ef309 100644 --- a/extensions/inspector/resources/locale/Makefile.in +++ b/extensions/inspector/resources/locale/Makefile.in @@ -55,3 +55,9 @@ DEFINES += -DAB_CD=$(AB_CD) # Let jar.mn do its happy-dance include $(topsrcdir)/config/rules.mk + +ifneq (en-US,$(AB_CD)) +libs realchrome:: + @echo "Comparing $(AB_CD) to en-US" + @$(PERL) $(topsrcdir)/toolkit/locales/compare-locales.pl $(srcdir)/en-US $(srcdir)/$(AB_CD) +endif diff --git a/extensions/inspector/resources/locale/contents.rdf b/extensions/inspector/resources/locale/contents.rdf index 3c15b9803d2..b45280a6eed 100644 --- a/extensions/inspector/resources/locale/contents.rdf +++ b/extensions/inspector/resources/locale/contents.rdf @@ -1,6 +1,7 @@ + + #filter substitution - diff --git a/extensions/reporter/Makefile.in b/extensions/reporter/Makefile.in index 1b3dc007dc2..0f1bf90c6e9 100644 --- a/extensions/reporter/Makefile.in +++ b/extensions/reporter/Makefile.in @@ -44,17 +44,53 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = \ - locales \ - $(NULL) - ifdef MOZ_XUL_APP XPI_NAME = reporter USE_EXTENSION_MANIFEST = 1 NO_JAR_AUTO_REG = 1 INSTALL_EXTENSION_ID = reporter@mozilla.org +XPI_PKGNAME = reporter-$(MOZ_APP_VERSION) endif +ALL_LOCALES = \ + en-US \ + ar \ + bg \ + ca \ + cs \ + el \ + en-GB \ + es-AR \ + es-ES \ + eu \ + fi \ + fr \ + ga-IE \ + gu-IN \ + he \ + hu \ + hy-AM \ + it \ + ja \ + ja-JP-mac \ + ko \ + mk \ + mn \ + nb-NO \ + nl \ + nn-NO \ + pa-IN \ + pl \ + pt-BR \ + ro \ + ru \ + sl \ + sv-SE \ + tr \ + zh-CN \ + zh-TW \ + $(NULL) + DIST_FILES = install.rdf # We should really pull FIREFOX_VERSION and THUNDERBIRD_VERSION from @@ -69,4 +105,29 @@ XULAPP_DEFINES = \ PREF_JS_EXPORTS = $(srcdir)/resources/content/prefs/reporter.js +include $(topsrcdir)/config/config.mk + +SUBMAKEFILES += locales/Makefile + +# We need the locale-loop to happen before rules.mk, but we still want the +# default all:: target. Hack it here. + +SUPPRESS_DEFAULT_RULES = 1 + +all:: + $(MAKE) export + $(MAKE) libs + +# Do depend as well +alldep:: + $(MAKE) export + $(MAKE) depend + $(MAKE) libs + +libs realchrome:: locales/Makefile + @$(EXIT_ON_ERROR) \ + for locale in $(ALL_LOCALES); do \ + $(MAKE) -C locales AB_CD=$$locale; \ + done + include $(topsrcdir)/config/rules.mk diff --git a/extensions/reporter/locales/Makefile.in b/extensions/reporter/locales/Makefile.in index 5e2cfbf997d..d3b11a6d3ed 100644 --- a/extensions/reporter/locales/Makefile.in +++ b/extensions/reporter/locales/Makefile.in @@ -42,6 +42,18 @@ relativesrcdir = extensions/reporter/locales include $(DEPTH)/config/autoconf.mk +ifdef MOZ_XUL_APP +XPI_NAME = reporter +USE_EXTENSION_MANIFEST = 1 +NO_JAR_AUTO_REG = 1 +endif + DEFINES += -DAB_CD=$(AB_CD) include $(topsrcdir)/config/rules.mk + +ifneq (en-US,$(AB_CD)) +libs realchrome:: + @echo "Comparing $(AB_CD) to en-US" + @$(PERL) $(topsrcdir)/toolkit/locales/compare-locales.pl $(srcdir)/en-US $(srcdir)/$(AB_CD) +endif diff --git a/extensions/reporter/locales/jar.mn b/extensions/reporter/locales/jar.mn index 85becf78c7e..2711e470608 100644 --- a/extensions/reporter/locales/jar.mn +++ b/extensions/reporter/locales/jar.mn @@ -1,15 +1,12 @@ #filter substitution -@AB_CD@.jar: -#ifndef MOZ_XUL_APP +reporter.jar: * locale/@AB_CD@/reporter/contents.rdf (generic/chrome/contents.rdf) -#else % locale reporter @AB_CD@ %locale/@AB_CD@/reporter/ -#endif - locale/@AB_CD@/reporter/reportWizard.dtd (%chrome/reportWizard.dtd) - locale/@AB_CD@/reporter/about.dtd (%chrome/about.dtd) - locale/@AB_CD@/reporter/reporterOverlay.dtd (%chrome/reporterOverlay.dtd) - locale/@AB_CD@/reporter/reportResults.dtd (%chrome/reportResults.dtd) - locale/@AB_CD@/reporter/reporter.dtd (%chrome/reporter.dtd) - locale/@AB_CD@/reporter/reportWizard.properties (%chrome/reportWizard.properties) - locale/@AB_CD@/reporter/reporterOverlay.properties (%chrome/reporterOverlay.properties) + locale/@AB_CD@/reporter/reportWizard.dtd (@AB_CD@/chrome/reportWizard.dtd) + locale/@AB_CD@/reporter/about.dtd (@AB_CD@/chrome/about.dtd) + locale/@AB_CD@/reporter/reporterOverlay.dtd (@AB_CD@/chrome/reporterOverlay.dtd) + locale/@AB_CD@/reporter/reportResults.dtd (@AB_CD@/chrome/reportResults.dtd) + locale/@AB_CD@/reporter/reporter.dtd (@AB_CD@/chrome/reporter.dtd) + locale/@AB_CD@/reporter/reportWizard.properties (@AB_CD@/chrome/reportWizard.properties) + locale/@AB_CD@/reporter/reporterOverlay.properties (@AB_CD@/chrome/reporterOverlay.properties)