bug 1402401, don't break builds on broken locales, r?stas
We added a return error value for compare-locales so that it
can be used in automated checks more easily. For builds, though,
ignore that return value.
Also, mach doesn't like utf-8 encoded output, so let's print
unicode.
MozReview-Commit-ID: L4lzqhBE0By
--- a/third_party/python/compare-locales/compare_locales/commands.py
+++ b/third_party/python/compare-locales/compare_locales/commands.py
@@ -147,17 +147,17 @@ data in a json useful for Exhibit
except (OSError, IOError), exc:
print "FAIL: " + str(exc)
self.parser.exit(2)
if unified:
observers = [unified_observer]
rv = 0
for observer in observers:
- print observer.serialize(type=data).encode('utf-8', 'replace')
+ print observer.serialize(type=data)
# summary is a dict of lang-summary dicts
# find out if any of our results has errors, return 1 if so
if rv > 0:
continue # we already have errors
for loc, summary in observer.summary.items():
if summary.get('errors', 0) > 0:
rv = 1
# no need to check further summaries, but
--- a/toolkit/locales/l10n.mk
+++ b/toolkit/locales/l10n.mk
@@ -200,17 +200,17 @@ merge-%:
# from l10n-central.
ifdef NIGHTLY_BUILD
@if ! test -d $(L10NBASEDIR)/$(AB_CD) ; then \
$(NSINSTALL) -D $(L10NBASEDIR) ; \
$(L10N_CO) ; \
fi
endif
$(RM) -rf $(REAL_LOCALE_MERGEDIR)
- $(MOZILLA_DIR)/mach compare-locales --merge $(BASE_MERGE) $(srcdir)/l10n.toml $(L10NBASEDIR) $*
+ -$(MOZILLA_DIR)/mach compare-locales --merge $(BASE_MERGE) $(srcdir)/l10n.toml $(L10NBASEDIR) $*
langpack-%: LANGPACK_FILE=$(ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
langpack-%: AB_CD=$*
langpack-%: XPI_NAME=locale-$*
langpack-%: IS_LANGUAGE_REPACK=1
langpack-%: IS_LANGPACK=1
langpack-%: libs-%
@echo 'Making langpack $(LANGPACK_FILE)'