mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/Makefiles] Automatize i18n adding for different locales
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
include apps/helpers.mk
|
||||
include apps/shared/Makefile
|
||||
include apps/home/Makefile
|
||||
include apps/on_boarding/Makefile
|
||||
@@ -60,30 +61,10 @@ i18n_files += $(addprefix apps/language_,$(addsuffix .universal.i18n, $(EPSILON_
|
||||
ifeq ($(EPSILON_GETOPT),1)
|
||||
i18n_files += $(addprefix apps/language_,$(addsuffix _iso6391.universal.i18n, $(EPSILON_I18N)))
|
||||
endif
|
||||
i18n_files += $(addprefix apps/,\
|
||||
shared.de.i18n\
|
||||
shared.en.i18n\
|
||||
shared.es.i18n\
|
||||
shared.fr.i18n\
|
||||
shared.it.i18n\
|
||||
shared.nl.i18n\
|
||||
shared.pt.i18n\
|
||||
shared.universal.i18n\
|
||||
toolbox.de.i18n\
|
||||
toolbox.en.i18n\
|
||||
toolbox.es.i18n\
|
||||
toolbox.fr.i18n\
|
||||
toolbox.it.i18n\
|
||||
toolbox.nl.i18n\
|
||||
toolbox.pt.i18n\
|
||||
variables.de.i18n\
|
||||
variables.en.i18n\
|
||||
variables.es.i18n\
|
||||
variables.fr.i18n\
|
||||
variables.it.i18n\
|
||||
variables.nl.i18n\
|
||||
variables.pt.i18n\
|
||||
)
|
||||
|
||||
i18n_files += $(call i18n_with_universal_for,shared)
|
||||
i18n_files += $(call i18n_without_universal_for,toolbox)
|
||||
i18n_files += $(call i18n_without_universal_for,variables)
|
||||
|
||||
$(eval $(call rule_for, \
|
||||
I18N, \
|
||||
|
||||
@@ -33,15 +33,7 @@ app_calculation_src = $(addprefix apps/calculation/,\
|
||||
app_calculation_src += $(app_calculation_test_src)
|
||||
apps_src += $(app_calculation_src)
|
||||
|
||||
i18n_files += $(addprefix apps/calculation/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,calculation/base)
|
||||
|
||||
tests_src += $(addprefix apps/calculation/test/,\
|
||||
calculation_store.cpp\
|
||||
|
||||
@@ -29,31 +29,8 @@ app_code_src = $(addprefix apps/code/,\
|
||||
app_code_src += $(app_code_test_src)
|
||||
apps_src += $(app_code_src)
|
||||
|
||||
i18n_files += $(addprefix apps/code/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
base.universal.i18n\
|
||||
catalog.de.i18n\
|
||||
catalog.en.i18n\
|
||||
catalog.es.i18n\
|
||||
catalog.fr.i18n\
|
||||
catalog.it.i18n\
|
||||
catalog.nl.i18n\
|
||||
catalog.pt.i18n\
|
||||
catalog.universal.i18n\
|
||||
toolbox.de.i18n\
|
||||
toolbox.en.i18n\
|
||||
toolbox.es.i18n\
|
||||
toolbox.fr.i18n\
|
||||
toolbox.it.i18n\
|
||||
toolbox.nl.i18n\
|
||||
toolbox.pt.i18n\
|
||||
toolbox.universal.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_with_universal_for,code/base)
|
||||
i18n_files += $(call i18n_with_universal_for,code/catalog)
|
||||
i18n_files += $(call i18n_with_universal_for,code/toolbox)
|
||||
|
||||
$(eval $(call depends_on_image,apps/code/app.cpp,apps/code/code_icon.png))
|
||||
|
||||
@@ -33,14 +33,6 @@ app_graph_src = $(addprefix apps/graph/,\
|
||||
|
||||
apps_src += $(app_graph_src)
|
||||
|
||||
i18n_files += $(addprefix apps/graph/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,graph/base)
|
||||
|
||||
$(eval $(call depends_on_image,apps/graph/app.cpp,apps/graph/graph_icon.png))
|
||||
|
||||
19
apps/helpers.mk
Normal file
19
apps/helpers.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
# i18n helpers
|
||||
|
||||
# Should be called as: i18n_for_locale basename locale
|
||||
define i18n_for_locale
|
||||
$(addprefix apps/, $(addprefix $(1), $(addprefix ., $(addsuffix .i18n,$(2)))))
|
||||
endef
|
||||
|
||||
# Should be called as: i18n_without_universal_for basename
|
||||
# Adds the basename.**.i18n for all locales in EPSILON_I18N
|
||||
define i18n_without_universal_for
|
||||
$(foreach LOCALE,$(EPSILON_I18N),$(call i18n_for_locale, $(1), $(LOCALE)))
|
||||
endef
|
||||
|
||||
# Should be called as: i18n_with_universal_for basename
|
||||
# Adds basename.**.i18n for all EPSILON_I18N locales + basename.universal.i18n
|
||||
define i18n_with_universal_for
|
||||
$(call i18n_without_universal_for,$(1))
|
||||
$(call i18n_for_locale,$(1),universal)
|
||||
endef
|
||||
@@ -6,12 +6,4 @@ app_home_src = $(addprefix apps/home/,\
|
||||
|
||||
apps_src += $(app_home_src)
|
||||
|
||||
i18n_files += $(addprefix apps/home/,\
|
||||
base.de.i18n \
|
||||
base.en.i18n \
|
||||
base.es.i18n \
|
||||
base.fr.i18n \
|
||||
base.it.i18n\
|
||||
base.nl.i18n \
|
||||
base.pt.i18n \
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,home/base)
|
||||
|
||||
@@ -9,14 +9,6 @@ app_on_boarding_src = $(addprefix apps/on_boarding/,\
|
||||
|
||||
apps_src += $(app_on_boarding_src)
|
||||
|
||||
i18n_files += $(addprefix apps/on_boarding/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,on_boarding/base)
|
||||
|
||||
$(eval $(call depends_on_image,apps/on_boarding/logo_view.cpp,apps/on_boarding/logo_icon.png))
|
||||
|
||||
@@ -40,16 +40,7 @@ app_probability_src = $(addprefix apps/probability/,\
|
||||
app_probability_src += $(app_probability_test_src)
|
||||
apps_src += $(app_probability_src)
|
||||
|
||||
i18n_files += $(addprefix apps/probability/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
base.universal.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_with_universal_for,probability/base)
|
||||
|
||||
tests_src += $(addprefix apps/probability/test/,\
|
||||
hypergeometric_function.cpp\
|
||||
|
||||
@@ -40,16 +40,7 @@ app_regression_src = $(addprefix apps/regression/,\
|
||||
app_regression_src += $(app_regression_test_src)
|
||||
apps_src += $(app_regression_src)
|
||||
|
||||
i18n_files += $(addprefix apps/regression/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
base.universal.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_with_universal_for,regression/base)
|
||||
|
||||
tests_src += $(addprefix apps/regression/test/,\
|
||||
model.cpp\
|
||||
|
||||
@@ -28,15 +28,7 @@ app_sequence_src = $(addprefix apps/sequence/,\
|
||||
app_sequence_src += $(app_sequence_test_src)
|
||||
apps_src += $(app_sequence_src)
|
||||
|
||||
i18n_files += $(addprefix apps/sequence/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,sequence/base)
|
||||
|
||||
tests_src += $(addprefix apps/sequence/test/,\
|
||||
sequence.cpp\
|
||||
|
||||
@@ -25,14 +25,6 @@ app_settings_src = $(addprefix apps/settings/,\
|
||||
app_settings_src += $(app_settings_test_src)
|
||||
apps_src += $(app_settings_src)
|
||||
|
||||
i18n_files += $(addprefix apps/settings/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,settings/base)
|
||||
|
||||
$(eval $(call depends_on_image,apps/settings/app.cpp,apps/settings/settings_icon.png))
|
||||
|
||||
@@ -18,15 +18,7 @@ app_solver_src = $(addprefix apps/solver/,\
|
||||
app_solver_src += $(app_solver_test_src)
|
||||
apps_src += $(app_solver_src)
|
||||
|
||||
i18n_files += $(addprefix apps/solver/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,solver/base)
|
||||
|
||||
tests_src += $(addprefix apps/solver/test/,\
|
||||
equation_store.cpp \
|
||||
|
||||
@@ -29,15 +29,7 @@ app_statistics_src = $(addprefix apps/statistics/,\
|
||||
app_statistics_src += $(app_statistics_test_src)
|
||||
apps_src += $(app_statistics_src)
|
||||
|
||||
i18n_files += $(addprefix apps/statistics/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_without_universal_for,statistics/base)
|
||||
|
||||
tests_src += $(addprefix apps/statistics/test/,\
|
||||
store.cpp\
|
||||
|
||||
@@ -5,13 +5,4 @@ app_usb_src = $(addprefix apps/usb/,\
|
||||
|
||||
apps_src += $(app_usb_src)
|
||||
|
||||
i18n_files += $(addprefix apps/usb/,\
|
||||
base.de.i18n\
|
||||
base.en.i18n\
|
||||
base.es.i18n\
|
||||
base.fr.i18n\
|
||||
base.it.i18n\
|
||||
base.nl.i18n\
|
||||
base.pt.i18n\
|
||||
base.universal.i18n\
|
||||
)
|
||||
i18n_files += $(call i18n_with_universal_for,usb/base)
|
||||
|
||||
Reference in New Issue
Block a user