Bug 1431260 - Switch multilocale.json to multilocale.txt in the build system. r=gps

MozReview-Commit-ID: 6S4VaAvDako

--HG--
extra : rebase_source : 29cc2e3416413363a40e77c10a95db7736497948
This commit is contained in:
Zibi Braniecki 2018-02-13 23:42:14 -08:00
Родитель 5849ff1145
Коммит dba8ca857b
8 изменённых файлов: 23 добавлений и 21 удалений

Просмотреть файл

@ -145,6 +145,8 @@ res/table-remove-column.gif
res/table-remove-row-active.gif
res/table-remove-row-hover.gif
res/table-remove-row.gif
res/multilocale.txt
update.locale
# Aurora branding
browser/chrome/browser/content/branding/icon64.png
browser/chrome/devtools/content/framework/dev-edition-promo/dev-edition-logo.png

Просмотреть файл

@ -86,7 +86,7 @@ endif
@$(MAKE) -C ../../devtools/shim/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
@$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
@$(MAKE) multilocale.json-$* AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
chrome-%: AB_CD=$*

Просмотреть файл

@ -46,5 +46,7 @@ res/table-remove-column.gif
res/table-remove-row-active.gif
res/table-remove-row-hover.gif
res/table-remove-row.gif
res/multilocale.txt
modules/commonjs/index.js
chrome/toolkit/content/global/XPCNativeWrapper.js
update.locale

Просмотреть файл

@ -44,7 +44,7 @@ libs-%:
$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
@$(MAKE) -C $(DEPTH)/mobile/locales libs-$*
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
@$(MAKE) multilocale.json-$* AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
ifeq ($(OS_TARGET),Android)
@$(MAKE) -C $(DEPTH)/mobile/android/base/locales AB_CD=$* XPI_NAME=locale-$*
endif

Просмотреть файл

@ -4,7 +4,6 @@
from __future__ import print_function, unicode_literals
import json
import sys
@ -12,9 +11,8 @@ def main(output, *locales):
locales = list(locales)
if "en-US" not in locales:
locales.append("en-US")
json.dump({
"locales": locales
}, output)
print(",".join(locales), file=output)
if __name__ == '__main__':

Просмотреть файл

@ -16,12 +16,12 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
JAR_MANIFESTS += ['jar.mn']
GENERATED_FILES = [
'multilocale.json',
'multilocale.txt',
]
multilocale = GENERATED_FILES['multilocale.json']
multilocale = GENERATED_FILES['multilocale.txt']
multilocale.script = 'gen_multilocale.py'
FINAL_TARGET_FILES.res += [
'!multilocale.json',
'!multilocale.txt',
]
if CONFIG['MOZ_CRASHREPORTER']:

Просмотреть файл

@ -24,7 +24,7 @@ NON_CHROME = set([
'extensions/langpack-*@*',
'distribution/extensions/langpack-*@*',
'chrome/**/searchplugins/*.xml',
'**/multilocale.json'
'**/multilocale.txt'
])

Просмотреть файл

@ -32,7 +32,7 @@ export USE_ELF_HACK ELF_HACK_FLAGS
# Override the value of OMNIJAR_NAME from config.status with the value
# set earlier in this file.
stage-package: multilocale.json locale-manifest.in $(MOZ_PKG_MANIFEST) $(MOZ_PKG_MANIFEST_DEPS)
stage-package: multilocale.txt locale-manifest.in $(MOZ_PKG_MANIFEST) $(MOZ_PKG_MANIFEST_DEPS)
OMNIJAR_NAME=$(OMNIJAR_NAME) \
NO_PKG_FILES="$(NO_PKG_FILES)" \
$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/packager.py $(DEFINES) $(ACDEFINES) \
@ -204,23 +204,23 @@ BASE_PATH:=@RESPATH@
MULTILOCALE_DIR = $(DIST)/$(RESPATH)/res
endif
# This version of the target uses MOZ_CHROME_MULTILOCALE to build multilocale.json
# This version of the target uses MOZ_CHROME_MULTILOCALE to build multilocale.txt
# and places it in dist/bin/res - it should be used when packaging a build.
multilocale.json: LOCALES?=$(MOZ_CHROME_MULTILOCALE)
multilocale.json:
$(call py_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.json' $(MDDEPDIR)/multilocale.json.pp $(ALL_LOCALES))
multilocale.txt: LOCALES?=$(MOZ_CHROME_MULTILOCALE)
multilocale.txt:
$(call py_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.txt' $(MDDEPDIR)/multilocale.txt.pp $(ALL_LOCALES))
# This version of the target uses AB_CD to build multilocale.json and places it
# This version of the target uses AB_CD to build multilocale.txt and places it
# in the $(XPI_NAME)/res dir - it should be used when repackaging a build.
multilocale.json-%: LOCALES?=$(AB_CD)
multilocale.json-%: MULTILOCALE_DIR=$(DIST)/xpi-stage/$(XPI_NAME)/res
multilocale.json-%:
$(call py_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.json' $(MDDEPDIR)/multilocale.json.pp $(ALL_LOCALES))
multilocale.txt-%: LOCALES?=$(AB_CD)
multilocale.txt-%: MULTILOCALE_DIR=$(DIST)/xpi-stage/$(XPI_NAME)/res
multilocale.txt-%:
$(call py_action,file_generate,$(MOZILLA_DIR)/toolkit/locales/gen_multilocale.py main '$(MULTILOCALE_DIR)/multilocale.txt' $(MDDEPDIR)/multilocale.txt.pp $(ALL_LOCALES))
locale-manifest.in: LOCALES?=$(MOZ_CHROME_MULTILOCALE)
locale-manifest.in: $(GLOBAL_DEPS) FORCE
printf '\n[multilocale]\n' > $@
printf '$(BASE_PATH)/res/multilocale.json\n' >> $@
printf '$(BASE_PATH)/res/multilocale.txt\n' >> $@
for LOCALE in $(ALL_LOCALES) ;\
do \
for ENTRY in $(MOZ_CHROME_LOCALE_ENTRIES) ;\