forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge upstream tag 'v24.11.7' into development
- Loading branch information
Showing
69 changed files
with
2,922 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include <TaskSchedulerDeclarations.h> | ||
#include <WString.h> | ||
#include <list> | ||
|
||
struct LanguageInfo_t { | ||
String code; | ||
String name; | ||
String filename; | ||
}; | ||
|
||
class I18nClass { | ||
public: | ||
I18nClass(); | ||
void init(Scheduler& scheduler); | ||
std::list<LanguageInfo_t> getAvailableLanguages(); | ||
String getFilenameByLocale(const String& locale) const; | ||
void readDisplayStrings( | ||
const String& locale, | ||
String& date_format, | ||
String& offline, | ||
String& power_w, String& power_kw, | ||
String& yield_today_wh, String& yield_today_kwh, | ||
String& yield_total_kwh, String& yield_total_mwh); | ||
|
||
private: | ||
void readLangPacks(); | ||
void readConfig(String file); | ||
|
||
std::list<LanguageInfo_t> _availLanguages; | ||
}; | ||
|
||
extern I18nClass I18n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include <ESPAsyncWebServer.h> | ||
#include <TaskSchedulerDeclarations.h> | ||
|
||
class WebApiFileClass { | ||
public: | ||
void init(AsyncWebServer& server, Scheduler& scheduler); | ||
|
||
private: | ||
void onFileGet(AsyncWebServerRequest* request); | ||
void onFileDelete(AsyncWebServerRequest* request); | ||
void onFileDeleteAll(AsyncWebServerRequest* request); | ||
void onFileListGet(AsyncWebServerRequest* request); | ||
void onFileUploadFinish(AsyncWebServerRequest* request); | ||
void onFileUpload(AsyncWebServerRequest* request, String filename, size_t index, uint8_t* data, size_t len, bool final); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include <ESPAsyncWebServer.h> | ||
#include <TaskSchedulerDeclarations.h> | ||
|
||
class WebApiI18nClass { | ||
public: | ||
void init(AsyncWebServer& server, Scheduler& scheduler); | ||
|
||
private: | ||
void onI18nLanguages(AsyncWebServerRequest* request); | ||
void onI18nLanguage(AsyncWebServerRequest* request); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Language Packs | ||
|
||
This folder contains language packs for OpenDTU which can be uploaded to the | ||
device using the "Config Management" function. | ||
Select "Language Pack" in the restore section, select a `.json` file containing | ||
your language and press "Restore". Afterwards all language selection drop down | ||
menues contain the new language. | ||
|
||
Create a pull to request to share your own language pack (or corrections) with the community. |
Oops, something went wrong.