Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
Allow localized builds
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbowes committed Jan 30, 2017
1 parent 328e4cb commit 9da471c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
6 changes: 4 additions & 2 deletions development/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ AMO_API_SECRET ?= 28934y23i4h32i4j23nk4j3244
JWT ?= $(shell jwtgen --api-key $(AMO_API_KEY) --api-secret $(AMO_API_SECRET))

LINGUAS ?= en-US
locales = $(notdir $(wildcard $(addprefix source/locale_common/,$(addsuffix *,$(LINGUAS)))))

# In GNU make 4.2+, you can portably read files with the $(file ...) function
# In older version, I'll just use the cat command (which may not available on some OSes)
Expand All @@ -28,8 +29,9 @@ is_needed_version ::= $(filter $(needed_version),$(firstword $(sort $(MAKE_VERSI
ID ::= $(subst id=,,$(filter id=%,$(if $(is_needed_version),$(file < config.properties),$(shell cat config.properties))))
VERSION ::= $(subst version=,,$(filter version=%,$(if $(is_needed_version),$(file < config.properties),$(shell cat config.properties))))

out_xpi = builds/user-agent-switcher-$(VERSION).xpi
signed_xpi = $(subst .xpi,-signed.xpi,$(out_xpi))
out_prefix = $(if $(findstring $(firstword $(sort 2 $(words $(locales)))),2),-localized,)
out_xpi = builds/user-agent-switcher-$(VERSION)$(out_prefix).xpi
signed_xpi = $(subst .xpi,.1-signed.1-signed.xpi,$(out_xpi))

adjust_path = $(subst source,chrome,$(subst _common,,$(1)))
chrome_files = $(wildcard $(addprefix source/content_common/useragentswitcher/,*.* */*.* options/dialogs/*.*) \
Expand Down
32 changes: 31 additions & 1 deletion development/chrome.manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
content useragentswitcher jar:chrome/useragentswitcher.jar!/content/useragentswitcher/
locale useragentswitcher en-US jar:chrome/useragentswitcher.jar!/locale/en-US/useragentswitcher/

locale useragentswitcher be-BY jar:chrome/useragentswitcher.jar!/locale/be-BY/useragentswitcher/
locale useragentswitcher cs-CZ jar:chrome/useragentswitcher.jar!/locale/cs-CZ/useragentswitcher/
locale useragentswitcher da-DK jar:chrome/useragentswitcher.jar!/locale/da-DK/useragentswitcher/
locale useragentswitcher de-DE jar:chrome/useragentswitcher.jar!/locale/de-DE/useragentswitcher/
locale useragentswitcher en-US jar:chrome/useragentswitcher.jar!/locale/en-US/useragentswitcher/
locale useragentswitcher es-AR jar:chrome/useragentswitcher.jar!/locale/es-AR/useragentswitcher/
locale useragentswitcher es-ES jar:chrome/useragentswitcher.jar!/locale/es-ES/useragentswitcher/
locale useragentswitcher eu-ES jar:chrome/useragentswitcher.jar!/locale/eu-ES/useragentswitcher/
locale useragentswitcher fi-FI jar:chrome/useragentswitcher.jar!/locale/fi-FI/useragentswitcher/
locale useragentswitcher fr-FR jar:chrome/useragentswitcher.jar!/locale/fr-FR/useragentswitcher/
locale useragentswitcher fy-NL jar:chrome/useragentswitcher.jar!/locale/fy-NL/useragentswitcher/
locale useragentswitcher he-IL jar:chrome/useragentswitcher.jar!/locale/he-IL/useragentswitcher/
locale useragentswitcher hu-HU jar:chrome/useragentswitcher.jar!/locale/hu-HU/useragentswitcher/
locale useragentswitcher it-IT jar:chrome/useragentswitcher.jar!/locale/it-IT/useragentswitcher/
locale useragentswitcher ja-JP jar:chrome/useragentswitcher.jar!/locale/ja-JP/useragentswitcher/
locale useragentswitcher ko-KR jar:chrome/useragentswitcher.jar!/locale/ko-KR/useragentswitcher/
locale useragentswitcher lt-LT jar:chrome/useragentswitcher.jar!/locale/lt-LT/useragentswitcher/
locale useragentswitcher mk-MK jar:chrome/useragentswitcher.jar!/locale/mk-MK/useragentswitcher/
locale useragentswitcher nl-NL jar:chrome/useragentswitcher.jar!/locale/nl-NL/useragentswitcher/
locale useragentswitcher pl-PL jar:chrome/useragentswitcher.jar!/locale/pl-PL/useragentswitcher/
locale useragentswitcher pt-BR jar:chrome/useragentswitcher.jar!/locale/pt-BR/useragentswitcher/
locale useragentswitcher pt-PT jar:chrome/useragentswitcher.jar!/locale/pt-PT/useragentswitcher/
locale useragentswitcher ro-RO jar:chrome/useragentswitcher.jar!/locale/ro-RO/useragentswitcher/
locale useragentswitcher ru-RU jar:chrome/useragentswitcher.jar!/locale/ru-RU/useragentswitcher/
locale useragentswitcher sk-SK jar:chrome/useragentswitcher.jar!/locale/sk-SK/useragentswitcher/
locale useragentswitcher tr-TR jar:chrome/useragentswitcher.jar!/locale/tr-TR/useragentswitcher/
locale useragentswitcher uk-UA jar:chrome/useragentswitcher.jar!/locale/uk-UA/useragentswitcher/
locale useragentswitcher zh-CN jar:chrome/useragentswitcher.jar!/locale/zh-CN/useragentswitcher/
locale useragentswitcher zh-TW jar:chrome/useragentswitcher.jar!/locale/zh-TW/useragentswitcher/

overlay chrome://browser/content/browser.xul chrome://useragentswitcher/content/useragentswitcher.xul
overlay chrome://navigator/content/navigator.xul chrome://useragentswitcher/content/useragentswitcher.xul
skin useragentswitcher classic/1.0 jar:chrome/useragentswitcher.jar!/skin/classic/useragentswitcher/
Expand Down

0 comments on commit 9da471c

Please sign in to comment.