Skip to content

Commit

Permalink
v5.12.0e - Add HTML local language header
Browse files Browse the repository at this point in the history
5.12.0e
 * Add HTML language header in local language (arendst#2123)
  • Loading branch information
arendst committed Mar 10, 2018
1 parent 3490588 commit 882286a
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 6 deletions.
1 change: 1 addition & 0 deletions sonoff/_releasenotes.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* 5.12.0e
* Add a second TLS fingerprint to allow switching keys in TLS mode (#2033, #2102)
* Add HTML language header in local language (#2123)
*
* 5.12.0d
* Add support for optional MQTT drivers to be selected in user_config.h (#1992)
Expand Down
11 changes: 7 additions & 4 deletions sonoff/language/cz-CZ.h → sonoff/language/cs-CZ.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
cz-CZ.h - localization for Czech with fonetick - Czech for Sonoff-Tasmota
cz-CZ.h - localization for Czech with diacritics - Czech for Sonoff-Tasmota
Copyright (C) 2018 Theo Arends (translated by vs)
Expand All @@ -17,8 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _LANGUAGE_CZ_CZ_H_
#define _LANGUAGE_CZ_CZ_H_
#ifndef _LANGUAGE_CS_CZ_H_
#define _LANGUAGE_CS_CZ_H_

/*************************** ATTENTION *******************************\
*
Expand All @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "cs"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down Expand Up @@ -455,4 +458,4 @@
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi

#endif // _LANGUAGE_CZ_CZ_H_
#endif // _LANGUAGE_CS_CZ_H_
3 changes: 3 additions & 0 deletions sonoff/language/de-DE.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "de"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "."
#define D_MONTH_DAY_SEPARATOR "."
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/en-GB.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "en"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/es-AR.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "es"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/fr-FR.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "fr"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/hu-HU.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "hu"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "."
#define D_MONTH_DAY_SEPARATOR "."
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/it-IT.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "it"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/nl-NL.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "nl"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/pl-PL.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "pl"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/pt-PT.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "pt"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/ru-RU.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "ru"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/zh-CN.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "zh"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
3 changes: 3 additions & 0 deletions sonoff/language/zh-TW.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)

// HTML (ISO 639-1) Language Code
#define D_HTML_LANGUAGE "zh"

// "2017-03-07T11:08:02" - ISO8601:2004
#define D_YEAR_MONTH_SEPARATOR "-"
#define D_MONTH_DAY_SEPARATOR "-"
Expand Down
2 changes: 1 addition & 1 deletion sonoff/user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
\*********************************************************************************************/

// -- Localization --------------------------------
//#define MY_LANGUAGE cz-CZ // Czech without fonetick in Czech
//#define MY_LANGUAGE cs-CZ // Czech in Czech
//#define MY_LANGUAGE de-DE // German in Germany
//#define MY_LANGUAGE en-GB // English in Great Britain. Enabled by Default
//#define MY_LANGUAGE es-AR // Spanish in Argentina
Expand Down
2 changes: 1 addition & 1 deletion sonoff/webserver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define STR(x) STR_HELPER(x)

const char HTTP_HEAD[] PROGMEM =
"<!DOCTYPE html><html lang=\"en\" class=\"\">"
"<!DOCTYPE html><html lang=\"" D_HTML_LANGUAGE "\" class=\"\">"
"<head>"
"<meta charset='utf-8'>"
"<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,user-scalable=no\"/>"
Expand Down

0 comments on commit 882286a

Please sign in to comment.