Migrate localization keys to dotted format

Remove 32 non-dotted keys (16 unused format specifiers, 16 word keys)
and replace with properly namespaced dotted keys following the existing
convention (common.*, player.*, search.*).
This commit is contained in:
Arkadiusz Fal
2026-02-20 20:29:55 +01:00
parent 4f5781bc20
commit ac0df38191
8 changed files with 132 additions and 63 deletions

View File

@@ -88,7 +88,7 @@ struct BookmarksListView: View {
VStack(spacing: 0) {
// tvOS: Inline search field and action button for better focus navigation
HStack(spacing: 24) {
TextField("Search bookmarks", text: $searchText)
TextField("search.bookmarks.placeholder", text: $searchText)
.textFieldStyle(.plain)
Button {

View File

@@ -85,7 +85,7 @@ struct HistoryListView: View {
VStack(spacing: 0) {
// tvOS: Inline search field and action button for better focus navigation
HStack(spacing: 24) {
TextField("Search history", text: $searchText)
TextField("search.history.placeholder", text: $searchText)
.textFieldStyle(.plain)
Button {

View File

@@ -739,7 +739,7 @@ private struct TVHomeItemRow: View {
.buttonStyle(TVCompactButtonStyle())
.alert(String(localized: "home.removeConfirmation.title"), isPresented: $showingDeleteConfirmation) {
Button(String(localized: "common.cancel"), role: .cancel) { }
Button("Remove", role: .destructive) {
Button("common.remove", role: .destructive) {
onDelete?()
}
}

View File

@@ -41,9 +41,9 @@ struct TVDetailsPanel: View {
// Tab picker (hidden when description scroll is locked)
if !isDescriptionScrollLocked {
Picker("", selection: $selectedTab) {
Text("Info").tag(TVDetailsTab.info)
Text("player.tab.info").tag(TVDetailsTab.info)
if video?.supportsComments == true {
Text("Comments").tag(TVDetailsTab.comments)
Text("player.tab.comments").tag(TVDetailsTab.comments)
}
}
.pickerStyle(.segmented)
@@ -258,7 +258,7 @@ struct TVDetailsPanel: View {
// Live indicator
if video?.isLive == true {
Label("LIVE", systemImage: "dot.radiowaves.left.and.right")
Label("player.live", systemImage: "dot.radiowaves.left.and.right")
.foregroundStyle(.red)
}
}
@@ -379,14 +379,14 @@ struct TVScrollableDescription: View {
private var descriptionContent: some View {
VStack(alignment: .leading, spacing: 12) {
HStack {
Text("Description")
Text("player.description")
.font(.headline)
.foregroundStyle(.white.opacity(0.7))
Spacer()
if isFocused {
Text(isScrollLocked ? "↑↓ scroll • click to close" : "click to expand")
Text(isScrollLocked ? "player.description.scrollToClose" : "player.description.clickToExpand")
.font(.callout)
.foregroundStyle(.white.opacity(0.5))
}

View File

@@ -219,7 +219,7 @@ struct TVPlayerControlsView: View {
VStack(spacing: 6) {
Image(systemName: "slider.horizontal.3")
.font(.system(size: 28))
Text("Quality")
Text("player.controls.quality")
.font(.caption)
}
}
@@ -261,7 +261,7 @@ struct TVPlayerControlsView: View {
VStack(spacing: 6) {
Image(systemName: "info.circle")
.font(.system(size: 28))
Text("Info")
Text("player.controls.info")
.font(.caption)
}
}

View File

@@ -75,10 +75,10 @@ struct TVSettingsTextField: View {
} else {
TextField(title, text: $editText)
}
Button("OK") {
Button("common.ok") {
text = editText
}
Button("Cancel", role: .cancel) { }
Button("common.cancel", role: .cancel) { }
}
}
}
@@ -136,7 +136,7 @@ struct TVSettingsToggle: View {
HStack {
Text(title)
Spacer()
Text(isOn ? "On" : "Off")
Text(isOn ? "common.on" : "common.off")
.foregroundStyle(.secondary)
}
}

View File

@@ -215,7 +215,7 @@ struct ManageChannelsView: View {
VStack(spacing: 0) {
// tvOS: Inline search field and action button for better focus navigation
HStack(spacing: 24) {
TextField("Search channels", text: $searchText)
TextField("search.channels.placeholder", text: $searchText)
.textFieldStyle(.plain)
Button {