mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[build] Update the i18n processing to fit the out-of-tree build
This commit is contained in:
committed by
LeaNumworks
parent
4f1d74f44b
commit
4f2c7a3763
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,7 +1,3 @@
|
||||
# No i18n headers
|
||||
apps/i18n.h
|
||||
apps/i18n.cpp
|
||||
|
||||
# Quiz output
|
||||
quiz/src/symbols.c
|
||||
|
||||
|
||||
@@ -43,6 +43,12 @@ epsilon_app_names = '$(foreach i,${EPSILON_APPS},"$(i)", )'
|
||||
$(call object_for,apps/apps_container_storage.cpp apps/main.cpp): CXXFLAGS += $(snapshot_includes) -DAPPS_CONTAINER_APPS_DECLARATION="$(apps_declaration)" -DAPPS_CONTAINER_SNAPSHOT_DECLARATIONS="$(snapshots_declaration)" -DAPPS_CONTAINER_SNAPSHOT_CONSTRUCTORS="$(snapshots_construction)" -DAPPS_CONTAINER_SNAPSHOT_LIST="$(snapshots_list)" -DAPPS_CONTAINER_SNAPSHOT_COUNT=$(snapshots_count) -DEPSILON_APPS_NAMES=$(epsilon_app_names)
|
||||
|
||||
|
||||
|
||||
# I18n file generation
|
||||
|
||||
# The header is refered to as <apps/i18n.h> so make sure it's findable this way
|
||||
SFLAGS += -I$(OUTPUT_DIRECTORY)
|
||||
|
||||
i18n_files += $(addprefix apps/language_,$(addsuffix .universal.i18n, $(EPSILON_I18N)))
|
||||
i18n_files += $(addprefix apps/,\
|
||||
shared.de.i18n\
|
||||
@@ -63,14 +69,23 @@ i18n_files += $(addprefix apps/,\
|
||||
variables.pt.i18n\
|
||||
)
|
||||
|
||||
apps/i18n.h: apps/i18n.cpp
|
||||
apps/i18n.cpp: $(i18n_files)
|
||||
@echo "I18N $@"
|
||||
$(Q) $(PYTHON) apps/i18n.py --header $(subst .cpp,.h,$@) --implementation $@ --locales $(EPSILON_I18N) --files $^
|
||||
$(eval $(call rule_for, \
|
||||
I18N, \
|
||||
apps/i18n.cpp, \
|
||||
$(i18n_files), \
|
||||
$$(PYTHON) apps/i18n.py --header $$(subst .cpp,.h,$$@) --implementation $$@ --locales $$(EPSILON_I18N) --files $$^ \
|
||||
))
|
||||
|
||||
#$(app_objs): apps/i18n.h
|
||||
# Make sure apps/i18n.o is built
|
||||
# The extension added to app_src doesn't really matter since it'll be processed
|
||||
# by the object_for function.
|
||||
app_src += apps/i18n.py
|
||||
|
||||
products += apps/i18n.h apps/i18n.cpp
|
||||
$(OUTPUT_DIRECTORY)/apps/i18n.h: $(OUTPUT_DIRECTORY)/apps/i18n.cpp
|
||||
|
||||
$(call object_for,$(app_src)): $(OUTPUT_DIRECTORY)/apps/i18n.h
|
||||
|
||||
# Handle PNG files
|
||||
|
||||
$(eval $(call depends_on_image,apps/title_bar_view.cpp,apps/exam_icon.png))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "app.h"
|
||||
#include "../apps_container.h"
|
||||
#include "calculation_icon.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <poincare/symbol.h>
|
||||
|
||||
using namespace Poincare;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "app.h"
|
||||
#include "../apps_container.h"
|
||||
#include "code_icon.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "helpers.h"
|
||||
|
||||
namespace Code {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "menu_controller.h"
|
||||
#include "app.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "../apps_container.h"
|
||||
#include <assert.h>
|
||||
#include <escher/metric.h>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define CODE_SCRIPT_PARAMETER_CONTROLLER_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "script_store.h"
|
||||
|
||||
namespace Code {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "empty_battery_window.h"
|
||||
#include "global_preferences.h"
|
||||
#include "i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
extern "C" {
|
||||
#include <assert.h>
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "exam_pop_up_controller.h"
|
||||
#include "apps_container.h"
|
||||
#include "i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "global_preferences.h"
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef APPS_GLOBAL_PREFERENCES_H
|
||||
#define APPS_GLOBAL_PREFERENCES_H
|
||||
|
||||
#include "i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
class GlobalPreferences {
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "app.h"
|
||||
#include "../apps_container.h"
|
||||
#include "graph_icon.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
using namespace Poincare;
|
||||
using namespace Shared;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "banner_view.h"
|
||||
#include "../../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Graph {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "root_graph_controller.h"
|
||||
#include "graph_view.h"
|
||||
#include "banner_view.h"
|
||||
#include "../../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Graph {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "curve_parameter_controller.h"
|
||||
#include "graph_controller.h"
|
||||
#include "../../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "storage_list_controller.h"
|
||||
#include "../app.h"
|
||||
#include "../../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
#include <escher/metric.h>
|
||||
#include <apps/apps_container.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "pop_up_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "../apps_container.h"
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "app.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "../apps_container.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -116,7 +116,7 @@ def print_header(data, path, locales):
|
||||
def print_implementation(data, path, locales):
|
||||
f = open(path, 'w')
|
||||
f.write("#include \"i18n.h\"\n")
|
||||
f.write("#include \"global_preferences.h\"\n")
|
||||
f.write("#include <apps/global_preferences.h>\n")
|
||||
f.write("#include <assert.h>\n\n");
|
||||
f.write("namespace I18n {\n\n")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define ON_BOARDING_POP_UP_CONTROLLER_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "../shared/message_view.h"
|
||||
#include "../shared/ok_view.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "app.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "probability_icon.h"
|
||||
#include <new>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "calculation_cell.h"
|
||||
#include "responder_image_cell.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
|
||||
namespace Probability {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <escher.h>
|
||||
#include "../../constant.h"
|
||||
#include "../../shared/curve_view_range.h"
|
||||
#include "../../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Probability {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app.h"
|
||||
#include "regression_icon.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "store.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Regression {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define REGRESSION_MODEL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <poincare/context.h>
|
||||
#include <poincare/expression.h>
|
||||
#include <poincare/layout.h>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "store.h"
|
||||
#include <escher.h>
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Regression {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app.h"
|
||||
#include "settings_icon.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Settings {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "main_controller.h"
|
||||
#include "../global_preferences.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Poincare;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "expression_field_delegate_app.h"
|
||||
#include <escher.h>
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "../apps_container.h"
|
||||
|
||||
using namespace Poincare;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "expression_model_store.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "function_app.h"
|
||||
#include "list_parameter_controller.h"
|
||||
#include "expression_model_list_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "interactive_curve_view_range.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "language_controller.h"
|
||||
#include "../global_preferences.h"
|
||||
#include "../apps_container.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define SHARED_LANGUAGE_CONTROLLER_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <escher.h>
|
||||
#include "function.h"
|
||||
#include "function_store.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "scrollable_exact_approximate_expressions_view.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
using namespace Poincare;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "storage_expression_model_store.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "function_title_cell.h"
|
||||
#include "storage_list_parameter_controller.h"
|
||||
#include "storage_expression_model_list_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "storage_function_store.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "values_parameter_controller.h"
|
||||
#include "storage_values_function_parameter_controller.h"
|
||||
#include "interval_parameter_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "storage_function.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "double_pair_store.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <poincare/context.h>
|
||||
#include <escher.h>
|
||||
#include "input_event_handler_delegate_app.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
class AppsContainer;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "values_parameter_controller.h"
|
||||
#include "values_function_parameter_controller.h"
|
||||
#include "interval_parameter_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "function.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <escher.h>
|
||||
#include "interactive_curve_view_range.h"
|
||||
#include "curve_view.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "lock_view.h"
|
||||
#include "i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
class ShiftAlphaLockView : public View {
|
||||
public:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "app.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include "solver_icon.h"
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "../constant.h"
|
||||
#include <assert.h>
|
||||
#include <poincare/layout_helper.h>
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
using namespace Poincare;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "interval_controller.h"
|
||||
#include "app.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "equation_store.h"
|
||||
#include "equation_list_view.h"
|
||||
#include "equation_models_parameter_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Solver {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <escher.h>
|
||||
#include "equation_store.h"
|
||||
#include "../shared/scrollable_exact_approximate_expressions_cell.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Solver {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "app.h"
|
||||
#include "stat_icon.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "../shared/banner_view.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Statistics {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <escher.h>
|
||||
#include "../shared/banner_view.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace Statistics {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "multiple_data_view_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Shared;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <escher.h>
|
||||
#include "battery_view.h"
|
||||
#include "shift_alpha_lock_view.h"
|
||||
#include "i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
class TitleBarView : public View {
|
||||
public:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "usb_connected_controller.h"
|
||||
#include "../i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
namespace USB {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <escher.h>
|
||||
#include "shared/global_context.h"
|
||||
#include "variable_box_empty_controller.h"
|
||||
#include "i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
|
||||
class VariableBoxController : public NestedMenuController {
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "variable_box_empty_controller.h"
|
||||
#include <poincare/layout_helper.h>
|
||||
#include "graph/storage_cartesian_function_store.h"
|
||||
#include "i18n.h"
|
||||
#include <apps/i18n.h>
|
||||
#include <assert.h>
|
||||
|
||||
using namespace Poincare;
|
||||
|
||||
Reference in New Issue
Block a user