Skip to content

Commit

Permalink
Fix strings and translations JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus authored and Markus committed Nov 11, 2023
1 parent f63210e commit 0cedbc5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion custom_components/unifi_voucher/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _update_extra_state_attributes(self) -> None:
"quota": voucher.get("quota"),
"used": voucher.get("used"),
"duration": str(voucher.get("duration")),
"status": voucher.get("status"),
"status": voucher.get("status").lower(),
"create_time": voucher.get("create_time"),
}
if voucher.get("start_time") is not None:
Expand Down
7 changes: 5 additions & 2 deletions custom_components/unifi_voucher/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@
"status": {
"name": "Status",
"state": {
"true": "Verbunden",
"false": "Getrennt"
"used": "Used once",
"used_multiple": "Used multiple times",
"expired": "Expired",
"valid_one": "Valid once",
"valid_multi": "Valid multiple times"
}
},
"last_pull": {
Expand Down
10 changes: 5 additions & 5 deletions custom_components/unifi_voucher/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@
"status": {
"name": "Status",
"state": {
"USED": "Einmal benutzt",
"USED_MULTIPLE": "Mehrmals benutzt",
"EXPIRED": "Abgelaufen",
"VALID_ONE": "Einmal gültig",
"VALID_MULTI": "Mehrmals gültig"
"used": "Einmal benutzt",
"used_multiple": "Mehrmals benutzt",
"expired": "Abgelaufen",
"valid_one": "Einmal gültig",
"valid_multi": "Mehrmals gültig"
}
},
"last_pull": {
Expand Down
10 changes: 5 additions & 5 deletions custom_components/unifi_voucher/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@
"status": {
"name": "Status",
"state": {
"USED": "Used once",
"USED_MULTIPLE": "Used multiple times",
"EXPIRED": "Expired",
"VALID_ONE": "Valid once",
"VALID_MULTI": "Valid multiple times"
"used": "Used once",
"used_multiple": "Used multiple times",
"expired": "Expired",
"valid_one": "Valid once",
"valid_multi": "Valid multiple times"
}
},
"last_pull": {
Expand Down

0 comments on commit 0cedbc5

Please sign in to comment.