Skip to content

Commit

Permalink
Localize the strings in the GagueType app enum
Browse files Browse the repository at this point in the history
  • Loading branch information
literally-anything committed Jul 2, 2024
1 parent d32bd63 commit adbc065
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Sources/App/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,8 @@ Home Assistant is free and open source home automation software with a focus on
"widgets.open_page.not_configured" = "No Pages Available";
"widgets.open_page.title" = "Open Page";
"widgets.gauge.parameters.gauge_type" = "Gauge Type";
"widgets.gauge.parameters.gauge_type.normal" = "Normal";
"widgets.gauge.parameters.gauge_type.capacity" = "Capacity";
"widgets.gauge.parameters.server" = "Server";
"widgets.gauge.parameters.value_template" = "Value Template (0-1)";
"widgets.gauge.parameters.value_label_template" = "Value Label Template";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ enum GaugeTypeAppEnum: String, Codable, Sendable, AppEnum {
case normal
case capacity

static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "GaugeType")
static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "widgets.gauge.parameters.gauge_type")
static var caseDisplayRepresentations: [GaugeTypeAppEnum: DisplayRepresentation] = [
.normal: DisplayRepresentation(title: "Normal"),
.capacity: DisplayRepresentation(title: "Capactity"),
.normal: DisplayRepresentation(title: "widgets.gauge.parameters.gauge_type.normal"),
.capacity: DisplayRepresentation(title: "widgets.gauge.parameters.gauge_type.capacity"),
]
}
6 changes: 6 additions & 0 deletions Sources/Shared/Resources/Swiftgen/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2918,6 +2918,12 @@ public enum L10n {
public static var valueLabelTemplate: String { return L10n.tr("Localizable", "widgets.gauge.parameters.value_label_template") }
/// Value Template (0-1)
public static var valueTemplate: String { return L10n.tr("Localizable", "widgets.gauge.parameters.value_template") }
public enum GaugeType {
/// Capacity
public static var capacity: String { return L10n.tr("Localizable", "widgets.gauge.parameters.gauge_type.capacity") }
/// Normal
public static var normal: String { return L10n.tr("Localizable", "widgets.gauge.parameters.gauge_type.normal") }
}
}
}
public enum OpenPage {
Expand Down

0 comments on commit adbc065

Please sign in to comment.