localize main app

This commit is contained in:
Trey t
2022-01-23 10:28:38 -06:00
parent 8648a8f834
commit 8ece03abce
12 changed files with 132 additions and 40 deletions

View File

@@ -51,7 +51,7 @@ struct FilterView: View {
.cornerRadius(25)
.padding([.leading, .trailing])
Text("Total: \(self.viewModel.numberOfRatings)")
Text(String(localized: "filter_view_total") + ": \(self.viewModel.numberOfRatings)")
.font(.title2)
if showFilter {
@@ -71,7 +71,7 @@ struct FilterView: View {
showFilter.toggle()
}
}, label: {
Text(showFilter ? "Close Filters" : "Show Filters")
Text(showFilter ? String(localized: "filter_view_hide_filters") : String(localized: "filter_view_show_filters"))
.frame(maxWidth: .infinity)
.frame(height: 44)
.foregroundColor(Color(UIColor.label))
@@ -117,7 +117,7 @@ struct FilterView: View {
ZStack {
Color(UIColor.secondarySystemBackground)
DatePicker(
"Start Date",
String(localized: "filter_view_begin_date"),
selection: $viewModel.entryStartDate,
displayedComponents: [.date]
).onChange(of: viewModel.entryStartDate, perform: { value in
@@ -132,7 +132,7 @@ struct FilterView: View {
ZStack {
Color(UIColor.secondarySystemBackground)
DatePicker(
"End Date",
String(localized: "filter_view_end_date"),
selection: $viewModel.entryEndDate,
displayedComponents: [.date]
).onChange(of: viewModel.entryStartDate, perform: { value in