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

@@ -3,9 +3,6 @@
"strings" : { "strings" : {
"" : { "" : {
},
"-%@" : {
}, },
"%@" : { "%@" : {
@@ -97,12 +94,6 @@
} }
} }
} }
},
"• %@" : {
},
"↑↓ scroll • click to close" : {
}, },
"+%lld" : { "+%lld" : {
@@ -428,9 +419,6 @@
} }
} }
} }
},
"Cancel" : {
}, },
"channel.menu.disableNotifications" : { "channel.menu.disableNotifications" : {
"localizations" : { "localizations" : {
@@ -729,12 +717,6 @@
} }
} }
} }
},
"click to expand" : {
},
"Comments" : {
}, },
"comments.disabled" : { "comments.disabled" : {
"comment" : "Shown when comments are disabled for a video", "comment" : "Shown when comments are disabled for a video",
@@ -1091,6 +1073,16 @@
} }
} }
}, },
"common.off" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Off"
}
}
}
},
"common.ok" : { "common.ok" : {
"comment" : "OK button", "comment" : "OK button",
"localizations" : { "localizations" : {
@@ -1102,6 +1094,16 @@
} }
} }
}, },
"common.on" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "On"
}
}
}
},
"common.open" : { "common.open" : {
"localizations" : { "localizations" : {
"en" : { "en" : {
@@ -1132,6 +1134,16 @@
} }
} }
}, },
"common.remove" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Remove"
}
}
}
},
"common.reset" : { "common.reset" : {
"localizations" : { "localizations" : {
"en" : { "en" : {
@@ -1827,9 +1839,6 @@
} }
} }
} }
},
"Description" : {
}, },
"discovery.empty.description" : { "discovery.empty.description" : {
"comment" : "Description when no network shares are found", "comment" : "Description when no network shares are found",
@@ -4476,9 +4485,6 @@
} }
} }
} }
},
"Info" : {
}, },
"Initializing player..." : { "Initializing player..." : {
@@ -4636,9 +4642,6 @@
} }
} }
} }
},
"LIVE" : {
}, },
"login.email" : { "login.email" : {
"comment" : "Email field label in login form", "comment" : "Email field label in login form",
@@ -5608,15 +5611,6 @@
} }
} }
} }
},
"Off" : {
},
"OK" : {
},
"On" : {
}, },
"onboarding.cloud.complete.description" : { "onboarding.cloud.complete.description" : {
"comment" : "iCloud sync complete description on onboarding", "comment" : "iCloud sync complete description on onboarding",
@@ -6503,6 +6497,26 @@
} }
} }
}, },
"player.controls.info" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Info"
}
}
}
},
"player.controls.quality" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Quality"
}
}
}
},
"player.controls.subtitles" : { "player.controls.subtitles" : {
"localizations" : { "localizations" : {
"en" : { "en" : {
@@ -6598,6 +6612,26 @@
} }
} }
}, },
"player.description.clickToExpand" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "click to expand"
}
}
}
},
"player.description.scrollToClose" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "↑↓ scroll • click to close"
}
}
}
},
"player.error.button" : { "player.error.button" : {
"comment" : "Error button label on failed video overlay", "comment" : "Error button label on failed video overlay",
"localizations" : { "localizations" : {
@@ -6951,6 +6985,26 @@
} }
} }
}, },
"player.tab.comments" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Comments"
}
}
}
},
"player.tab.info" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Info"
}
}
}
},
"player.tvos.scrubHint" : { "player.tvos.scrubHint" : {
"localizations" : { "localizations" : {
"en" : { "en" : {
@@ -7311,9 +7365,6 @@
} }
} }
} }
},
"Quality" : {
}, },
"queue.action.addToQueue" : { "queue.action.addToQueue" : {
"comment" : "Add to queue action in action sheet", "comment" : "Add to queue action in action sheet",
@@ -7805,9 +7856,6 @@
} }
} }
} }
},
"Remove" : {
}, },
"resume.action.continueAt %@" : { "resume.action.continueAt %@" : {
"comment" : "Continue watching action with timestamp", "comment" : "Continue watching action with timestamp",
@@ -7831,14 +7879,25 @@
} }
} }
}, },
"Search bookmarks" : { "search.bookmarks.placeholder" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Search bookmarks"
}
}
}
}, },
"Search channels" : { "search.channels.placeholder" : {
"localizations" : {
}, "en" : {
"Search history" : { "stringUnit" : {
"state" : "translated",
"value" : "Search channels"
}
}
}
}, },
"search.clearAllRecents" : { "search.clearAllRecents" : {
"comment" : "Button to clear all recent searches, channels, and playlists", "comment" : "Button to clear all recent searches, channels, and playlists",
@@ -8066,6 +8125,16 @@
} }
} }
}, },
"search.history.placeholder" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Search history"
}
}
}
},
"search.noResults.description" : { "search.noResults.description" : {
"comment" : "No search results description", "comment" : "No search results description",
"localizations" : { "localizations" : {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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