Skip to content

Commit fdf05b5

Browse files
committed
Move texts to separate files
1 parent 525798c commit fdf05b5

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
.vscode/launch.json
55
.vscode/ipch
66
*_cpp
7+
data/.DS_Store
8+
.DS_Store

src/settings.h

+7-12
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33

44
#pragma once
55

6+
7+
8+
69
// ****************************************************************************
710
// User settings
811
// ****************************************************************************
12+
// language settings are in translations/texts_*.h
13+
#include "translations/texts_en.h"
14+
//#include "translations/texts_de.h"
15+
916
// WiFi
1017
const char *SSID = "yourssid";
1118
const char *WIFI_PWD = "yourpassw0rd";
@@ -40,18 +47,6 @@ const String DISPLAYED_LOCATION_NAME = "Zurich";
4047
//String OPEN_WEATHER_MAP_LOCATION_ID = "5879400";
4148
//String DISPLAYED_LOCATION_NAME = "Anchorage";
4249

43-
// Supported languages: https://openweathermap.org/current#multi
44-
const String OPEN_WEATHER_MAP_LANGUAGE = "en";
45-
46-
const String WEEKDAYS[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
47-
const String WEEKDAYS_ABBR[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
48-
49-
const String SUN_MOON_LABEL[] = {"Sun", "Moon"};
50-
const String MOON_PHASES[] = {"New Moon", "Waxing Crescent", "First Quarter", "Waxing Gibbous",
51-
"Full Moon", "Waning Gibbous", "Third quarter", "Waning Crescent"};
52-
53-
54-
5550
// ****************************************************************************
5651
// System settings - do not modify unless you understand what you are doing!
5752
// ****************************************************************************

src/translations/texts_de.h

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#pragma once
2+
3+
// Supported languages: https://openweathermap.org/current#multi
4+
// Language: german
5+
const String OPEN_WEATHER_MAP_LANGUAGE = "de";
6+
7+
const String WEEKDAYS[] = {"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"};
8+
const String WEEKDAYS_ABBR[] = {"SO", "MO", "DI", "MI", "DO", "FR", "SA"};
9+
10+
const String SUN_MOON_LABEL[] = {"Sonne", "Mond"};
11+
const String MOON_PHASES[] = {"Neumond", "zunehmender Sichelmond", "zunehmendes Viertel", "zunehmender Mond",
12+
"Vollmond", "abnehmender Mond", "abnehmendes Viertel", "abnehmender Sichelmond"};

src/translations/texts_en.h

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#pragma once
2+
3+
// Supported languages: https://openweathermap.org/current#multi
4+
const String OPEN_WEATHER_MAP_LANGUAGE = "en";
5+
6+
const String WEEKDAYS[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
7+
const String WEEKDAYS_ABBR[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
8+
9+
const String SUN_MOON_LABEL[] = {"Sun", "Moon"};
10+
const String MOON_PHASES[] = {"New Moon", "Waxing Crescent", "First Quarter", "Waxing Gibbous",
11+
"Full Moon", "Waning Gibbous", "Third quarter", "Waning Crescent"};

0 commit comments

Comments
 (0)