1
0
forked from me/IronOS

Generate per-language translation sources (#806)

This generates dedicates Translation.cpp files for translation language
and derives all language-specific data from them.

The Makefile is extended to also take care of generating these source
files.
This allows reuse of nearly all object files between builds of different
languages for the same model and regenerating the translation sources if
necessary.
This speeds up the release builds and the normal write-compile-cycle
considerably.
It also eliminates miscompilations when manually building different
languages.
This commit is contained in:
Thomas Weißschuh
2021-02-02 09:44:34 +01:00
committed by GitHub
parent 5e372310cd
commit 15e51f9faa
36 changed files with 108 additions and 266 deletions

View File

@@ -10,7 +10,6 @@
#include "FreeRTOS.h"
#include "cmsis_os.h"
#include "unit.h"
#ifdef __cplusplus
extern "C" {

View File

@@ -9,9 +9,8 @@
#ifndef SETTINGS_H_
#define SETTINGS_H_
#include "unit.h"
#include <stdint.h>
#define SETTINGSVERSION (0x24)
#define SETTINGSVERSION (0x25)
/*Change this if you change the struct below to prevent people getting \
out of sync*/
@@ -37,9 +36,7 @@ typedef struct {
// down screen until its <50C
uint8_t detailedIDLE : 1; // Detailed idle screen
uint8_t detailedSoldering : 1; // Detailed soldering screens
#ifdef ENABLED_FAHRENHEIT_SUPPORT
uint8_t temperatureInF : 1; // Should the temp be in F or C (true is F)
#endif
uint8_t descriptionScrollSpeed : 1; // Description scroll speed
uint8_t lockingMode : 2; // Store the locking mode
uint8_t KeepAwakePulse; // Keep Awake pulse power in 0.1 watts (10 = 1Watt)

View File

@@ -8,9 +8,9 @@
#ifndef TRANSLATION_H_
#define TRANSLATION_H_
#include "stdint.h"
#include "unit.h"
extern const uint8_t USER_FONT_12[];
extern const uint8_t USER_FONT_6x8[];
extern const bool HasFahrenheit;
extern const char *SettingsShortNames[29][2];
extern const char *SettingsDescriptions[29];
@@ -70,9 +70,7 @@ extern const char *SymbolMinus;
extern const char *SymbolSpace;
extern const char *SymbolDot;
extern const char *SymbolDegC;
#ifdef ENABLED_FAHRENHEIT_SUPPORT
extern const char *SymbolDegF;
#endif
extern const char *SymbolMinutes;
extern const char *SymbolSeconds;
extern const char *SymbolWatts;