Skip to content

Commit

Permalink
Filters localization fix
Browse files Browse the repository at this point in the history
  • Loading branch information
XITRIX committed Nov 22, 2024
1 parent 0f82fe5 commit c5ce6d6
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 7 deletions.
60 changes: 58 additions & 2 deletions iTorrent/Core/Assets/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -2804,7 +2804,63 @@
}
}
},
"list.empty.subtitle" : {
"list.empty.filter.subtitle" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Try to disable this filter or select another one"
}
},
"es" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Try to disable this filter or select another one"
}
},
"ru" : {
"stringUnit" : {
"state" : "translated",
"value" : "Попробуйте выключить текущий фильтр или выбрать другой"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Try to disable this filter or select another one"
}
}
}
},
"list.empty.filter.title-%@" : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "No torrents for filter “%1$@”"
}
},
"es" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "No torrents for filter “%1$@”"
}
},
"ru" : {
"stringUnit" : {
"state" : "translated",
"value" : "Нет торрентов для фильтра «%@»"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "No torrents for filter “%1$@”"
}
}
}
},
"list.empty.nodata.subtitle" : {
"localizations" : {
"en" : {
"stringUnit" : {
Expand Down Expand Up @@ -2832,7 +2888,7 @@
}
}
},
"list.empty.title" : {
"list.empty.nodata.title" : {
"localizations" : {
"en" : {
"stringUnit" : {
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Screens/Rss/Search/RssSearchViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RssSearchViewController<VM: RssSearchViewModel>: BaseCollectionViewControl
contentUnavailableConfiguration = config
case .badSearch(let search):
var configuration = UIContentUnavailableConfiguration.search()
configuration.text = %"noContent.search.\(search)" //"No Results for “\(search)”"
configuration.text = %"noContent.search.\(search)"
contentUnavailableConfiguration = configuration
case .badFilter:
contentUnavailableConfiguration = UIContentUnavailableConfiguration.empty()
Expand Down
8 changes: 4 additions & 4 deletions iTorrent/Screens/TorrentList/TorrentListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,16 @@ private extension TorrentListViewController {
case .noData:
var config = UIContentUnavailableConfiguration.empty()
config.image = .init(systemName: "fireworks")
config.text = %"list.empty.title"
config.secondaryText = %"list.empty.subtitle"
config.text = %"list.empty.nodata.title"
config.secondaryText = %"list.empty.nodata.subtitle"
contentUnavailableConfiguration = config
case .badSearch:
contentUnavailableConfiguration = UIContentUnavailableConfiguration.search()
case .badFilter(let filter):
var configuration = UIContentUnavailableConfiguration.empty()
configuration.image = .init(systemName: "line.3.horizontal.decrease")
configuration.text = "No torrents for filter\(filter.name)"
configuration.secondaryText = "Try to disable this filter or select another one"
configuration.text = %"list.empty.filter.title-\(filter.name)"
configuration.secondaryText = %"list.empty.filter.subtitle"
contentUnavailableConfiguration = configuration
case nil:
contentUnavailableConfiguration = nil
Expand Down

0 comments on commit c5ce6d6

Please sign in to comment.