Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/lock-overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
MHA committed Jul 7, 2021
2 parents d04c0c0 + dd9e046 commit 0836caf
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ A button card with integrated slider for `light, switch, fan, cover, input_boole
- [Climate](#climate)
- [Lock](#lock)
- [In a grid](#grid)
- [Group support](#groups)
- [Known issues](#known-issues)
- [Languages](#languages)
- [Credits](#credits)
Expand Down Expand Up @@ -701,6 +702,12 @@ columns: 4
</tr>
</table>

## Groups
Mixed `group` entities are not supported, if you want to control multiple
- lights use [Light group](https://www.home-assistant.io/integrations/light.group/)
- covers use [Cover group](https://www.home-assistant.io/integrations/cover.group/)
- media players use [Media player group](https://www.home-assistant.io/integrations/media_player.group/)

## Known issues
When you discover any bugs please open an [issue](https://github.com/mattieha/slider-button-card/issues).

Expand All @@ -709,11 +716,13 @@ When you discover any bugs please open an [issue](https://github.com/mattieha/sl
This card supports translations. Please, help to add more translations and improve existing ones. Here's a list of supported languages:

- English
- German
- Hebrew
- Nederlands (Dutch)
- Polish (polski)
- Portuguese
- Russian
- Korean
- [_Your language?_][add-translation]

## Credits
Expand Down
62 changes: 62 additions & 0 deletions src/localize/languages/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"common": {
"version": "v",
"invalid_configuration": "Ungültige Konfiguration",
"show_warning": "Zeige Warnung",
"show_error": "Zeige Fehler"
},
"tabs": {
"general": {
"title": "Allgemein",
"entity": "Entiät (vorgeschrieben)",
"name": "Name (optional)",
"show_name": "Namen zeigen?",
"show_state": "Zustand zeigen?",
"compact": "Kompakt?"
},
"icon": {
"title": "Icon",
"icon": "Icon (optional)",
"show_icon": "Icon zeigen?",
"use_state_color": "Zustandsfarbe verwenden?",
"tap_action": "Tap action"
},
"slider": {
"title": "Schieberegler",
"direction": "Richtung",
"background": "Hintergrund",
"use_brightness": "Helligkeit benutzen?",
"show_track": "Spur anzeigen?",
"toggle_on_click": "Als Schalter benutzen (schieben deaktivieren)",
"force_square": "Quadrat erzwingen?"
},
"action_button": {
"title": "Action-Knopf",
"mode": "Modus",
"icon": "Icon",
"show_button": "Knopf zeigen?",
"show_spinner": "Spinner anzeigen?",
"tap_action": "Tap action"
}
},
"state": {
"off": "Aus",
"on": "An"
},
"direction": {
"left-right": "Links nach Rechts",
"top-bottom": "Oben nach Unten",
"bottom-top": "Unten nach Oben"
},
"background": {
"striped": "gestreift",
"gradient": "Farbverlauf",
"solid": "Einfarbig",
"triangle": "Dreieck",
"custom": "benuzerdefiniert"
},
"mode": {
"toggle": "Umschalter",
"custom": "benuzerdefiniert"
}
}
63 changes: 63 additions & 0 deletions src/localize/languages/ko.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"common": {
"version": "v",
"invalid_configuration": "유효하지 않은 설정입니다",
"show_warning": "경고 표시",
"show_error": "에러 표시"
},
"tabs": {
"general": {
"title": "일반",
"entity": "구성 요소 (필수)",
"name": "이름 (옵션)",
"show_name": "이름 표시",
"show_state": "상태 표시",
"compact": "슬림 모드"
},
"icon": {
"title": "아이콘",
"icon": "아이콘 (옵션)",
"show_icon": "아이콘 표시",
"use_state_color": "상태 색상 사용",
"tap_action": "탭 액션"
},
"slider": {
"title": "슬라이더",
"direction": "방향 지정",
"background": "배경",
"use_brightness": "밝기 사용",
"show_track": "범위 표시",
"toggle_on_click": "토글 버튼으로 동작(슬라이더 비활성화)",
"force_square": "정사각형 모양으로 고정"
},
"action_button": {
"title": "액션 버튼",
"mode": "모드",
"icon": "아이콘",
"show_button": "버튼 표시",
"show_spinner": "로딩 스피너 표시",
"tap_action": "탭 액셥"
}
},
"state": {
"off": "꺼짐",
"on": "켜짐"
},
"direction": {
"left-right": "왼쪽에서 오른쪽",
"top-bottom": "위에서 아래",
"bottom-top": "아래에서 위"
},
"background": {
"striped": "줄무늬",
"gradient": "그레디언트",
"solid": "단색",
"triangle": "삼각형",
"custom": "커스텀"
},
"mode": {
"toggle": "토글 모드",
"custom": "커스텀 모드"
}
}

5 changes: 5 additions & 0 deletions src/localize/localize.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import * as en from './languages/en.json';
import * as de from './languages/de.json';
import * as he from './languages/he.json';
import * as nl from './languages/nl.json';
import * as pl from './languages/pl.json';
import * as pt from './languages/pt.json';
import * as ru from './languages/ru.json';
import * as ko from './languages/ko.json';



// eslint-disable-next-line @typescript-eslint/no-explicit-any
const languages: any = {
en: en,
de: de,
he: he,
nl: nl,
pl: pl,
pt: pt,
ru: ru,
ko: ko,
};

export function localize(string: string, search = '', replace = ''): string {
Expand Down

0 comments on commit 0836caf

Please sign in to comment.