Skip to content

Commit

Permalink
Move texts to separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
squix78 committed Sep 4, 2024
1 parent 525798c commit fdf05b5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
.vscode/launch.json
.vscode/ipch
*_cpp
data/.DS_Store
.DS_Store
19 changes: 7 additions & 12 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@

#pragma once




// ****************************************************************************
// User settings
// ****************************************************************************
// language settings are in translations/texts_*.h
#include "translations/texts_en.h"
//#include "translations/texts_de.h"

// WiFi
const char *SSID = "yourssid";
const char *WIFI_PWD = "yourpassw0rd";
Expand Down Expand Up @@ -40,18 +47,6 @@ const String DISPLAYED_LOCATION_NAME = "Zurich";
//String OPEN_WEATHER_MAP_LOCATION_ID = "5879400";
//String DISPLAYED_LOCATION_NAME = "Anchorage";

// Supported languages: https://openweathermap.org/current#multi
const String OPEN_WEATHER_MAP_LANGUAGE = "en";

const String WEEKDAYS[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
const String WEEKDAYS_ABBR[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};

const String SUN_MOON_LABEL[] = {"Sun", "Moon"};
const String MOON_PHASES[] = {"New Moon", "Waxing Crescent", "First Quarter", "Waxing Gibbous",
"Full Moon", "Waning Gibbous", "Third quarter", "Waning Crescent"};



// ****************************************************************************
// System settings - do not modify unless you understand what you are doing!
// ****************************************************************************
Expand Down
12 changes: 12 additions & 0 deletions src/translations/texts_de.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

// Supported languages: https://openweathermap.org/current#multi
// Language: german
const String OPEN_WEATHER_MAP_LANGUAGE = "de";

const String WEEKDAYS[] = {"Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"};
const String WEEKDAYS_ABBR[] = {"SO", "MO", "DI", "MI", "DO", "FR", "SA"};

const String SUN_MOON_LABEL[] = {"Sonne", "Mond"};
const String MOON_PHASES[] = {"Neumond", "zunehmender Sichelmond", "zunehmendes Viertel", "zunehmender Mond",
"Vollmond", "abnehmender Mond", "abnehmendes Viertel", "abnehmender Sichelmond"};
11 changes: 11 additions & 0 deletions src/translations/texts_en.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

// Supported languages: https://openweathermap.org/current#multi
const String OPEN_WEATHER_MAP_LANGUAGE = "en";

const String WEEKDAYS[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
const String WEEKDAYS_ABBR[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};

const String SUN_MOON_LABEL[] = {"Sun", "Moon"};
const String MOON_PHASES[] = {"New Moon", "Waxing Crescent", "First Quarter", "Waxing Gibbous",
"Full Moon", "Waning Gibbous", "Third quarter", "Waning Crescent"};

0 comments on commit fdf05b5

Please sign in to comment.