diff --git a/b2g/app/Makefile.in b/b2g/app/Makefile.in index 5a62154e65b5..12068016e5bb 100644 --- a/b2g/app/Makefile.in +++ b/b2g/app/Makefile.in @@ -29,22 +29,27 @@ endif AB_CD = $(MOZ_UI_LOCALE) -AB := $(firstword $(subst -, ,$(AB_CD))) +ifeq (zh-TW,$(AB_CD)) +LPROJ_ROOT := $(subst -,_,$(AB_CD)) +else +LPROJ_ROOT := $(firstword $(subst -, ,$(AB_CD))) +endif +LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj clean clobber repackage:: rm -rf $(DIST)/$(APP_NAME).app libs-preqs = \ $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/MacOS) \ - $(call mkdir_deps,$(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj) \ + $(call mkdir_deps,$(DIST)/$(APP_NAME).app/$(LPROJ)) \ $(NULL) .PHONY: repackage tools repackage:: $(libs-preqs) rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(DIST)/$(APP_NAME).app --exclude English.lproj - rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj + rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(DIST)/$(APP_NAME).app/$(LPROJ) sed -e 's/%MOZ_APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MOZ_APP_NAME%/$(MOZ_APP_NAME)/' -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' -e 's/%APP_BINARY%/$(APP_BINARY)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(DIST)/$(APP_NAME).app/Contents/Info.plist - sed -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/Contents/Resources/$(AB).lproj/InfoPlist.strings + sed -e 's/%APP_VERSION%/$(APP_VERSION)/' -e 's/%APP_NAME%/$(APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(DIST)/$(APP_NAME).app/$(LPROJ)/InfoPlist.strings rsync -a --exclude 'mangle' --exclude 'shlibsign' --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/Resources rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(DIST)/$(APP_NAME).app/Contents/MacOS ifdef LIBXUL_SDK diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index d1c6ebafb23b..a4f2b048b0c7 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -79,7 +79,12 @@ endif AB_CD = $(MOZ_UI_LOCALE) -AB := $(firstword $(subst -, ,$(AB_CD))) +ifeq (zh-TW,$(AB_CD)) +LPROJ_ROOT := $(subst -,_,$(AB_CD)) +else +LPROJ_ROOT := $(firstword $(subst -, ,$(AB_CD))) +endif +LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj clean clobber repackage:: $(RM) -r $(dist_dest) @@ -89,11 +94,11 @@ MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_A .PHONY: repackage tools repackage:: $(PROGRAM) $(MKDIR) -p $(dist_dest)/Contents/MacOS - $(MKDIR) -p $(dist_dest)/Contents/Resources/$(AB).lproj + $(MKDIR) -p $(dist_dest)/$(LPROJ) rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents $(dist_dest) --exclude English.lproj - rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/Contents/Resources/$(AB).lproj + rsync -a --exclude '*.in' $(srcdir)/macbuild/Contents/Resources/English.lproj/ $(dist_dest)/$(LPROJ) sed -e 's/%APP_VERSION%/$(MOZ_APP_VERSION)/' -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' -e 's/%MOZ_MACBUNDLE_ID%/$(MOZ_MACBUNDLE_ID)/' -e 's/%MAC_BUNDLE_VERSION%/$(MAC_BUNDLE_VERSION)/' $(srcdir)/macbuild/Contents/Info.plist.in > $(dist_dest)/Contents/Info.plist - sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/Contents/Resources/$(AB).lproj/InfoPlist.strings + sed -e 's/%MAC_APP_NAME%/$(MAC_APP_NAME)/' $(srcdir)/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in | iconv -f UTF-8 -t UTF-16 > $(dist_dest)/$(LPROJ)/InfoPlist.strings rsync -a --exclude-from='$(srcdir)/macbuild/Contents/MacOS-files.in' $(DIST)/bin/ $(dist_dest)/Contents/Resources rsync -a --include-from='$(srcdir)/macbuild/Contents/MacOS-files.in' --exclude '*' $(DIST)/bin/ $(dist_dest)/Contents/MacOS $(RM) $(dist_dest)/Contents/MacOS/$(PROGRAM) diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in index 2a7a4a34dba7..04496e676c14 100644 --- a/browser/installer/Makefile.in +++ b/browser/installer/Makefile.in @@ -126,8 +126,13 @@ RESPATH = $(BINPATH) endif DEFINES += -DRESPATH=$(RESPATH) -AB = $(firstword $(subst -, ,$(AB_CD))) -DEFINES += -DAB=$(AB) +LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD))) +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) +ifeq (zh-TW,$(AB_CD)) +LPROJ_ROOT := $(subst -,_,$(AB_CD)) +endif +endif +DEFINES += -DLPROJ_ROOT=$(LPROJ_ROOT) DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION) ifdef MOZ_NATIVE_ICU diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 306b14895442..48e5d17b7485 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -38,7 +38,7 @@ @APPNAME@/Contents/PkgInfo @RESPATH@/firefox.icns @RESPATH@/document.icns -@RESPATH@/@AB@.lproj/* +@RESPATH@/@LPROJ_ROOT@.lproj/* #endif [@AB_CD@] diff --git a/toolkit/locales/l10n.mk b/toolkit/locales/l10n.mk index 0c84430dd47a..9203fb710b51 100644 --- a/toolkit/locales/l10n.mk +++ b/toolkit/locales/l10n.mk @@ -32,7 +32,12 @@ run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); f # This makefile uses variable overrides from the libs-% target to # build non-default locales to non-default dist/ locations. Be aware! -AB = $(firstword $(subst -, ,$(AB_CD))) +LPROJ_ROOT = $(firstword $(subst -, ,$(AB_CD))) +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) +ifeq (zh-TW,$(AB_CD)) +LPROJ_ROOT := $(subst -,_,$(AB_CD)) +endif +endif # These are defaulted to be compatible with the files the wget-en-US target # pulls. You may override them if you provide your own files. You _must_ @@ -116,8 +121,8 @@ endif $(if $(filter omni,$(MOZ_PACKAGER_FORMAT)),$(if $(NON_OMNIJAR_FILES),--non-resource $(NON_OMNIJAR_FILES))) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -ifneq (en,$(AB)) - mv $(STAGEDIST)/en.lproj $(STAGEDIST)/$(AB).lproj +ifneq (en,$(LPROJ_ROOT)) + mv $(STAGEDIST)/en.lproj $(STAGEDIST)/$(LPROJ_ROOT).lproj endif ifdef MOZ_CRASHREPORTER # On Mac OS X, the crashreporter.ini file needs to be moved from under the @@ -138,9 +143,9 @@ ifdef MAKE_COMPLETE_MAR PACKAGE_BASE_DIR='$(_ABS_DIST)/l10n-stage' endif # packaging done, undo l10n stuff -ifneq (en,$(AB)) +ifneq (en,$(LPROJ_ROOT)) ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) - mv $(STAGEDIST)/$(AB).lproj $(STAGEDIST)/en.lproj + mv $(STAGEDIST)/$(LPROJ_ROOT).lproj $(STAGEDIST)/en.lproj endif endif $(NSINSTALL) -D $(DIST)/$(PKG_PATH)