Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,094 changes: 934 additions & 160 deletions ios/escape/escape/Localizable.xcstrings

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct MissionSection: View {
.font(.caption)
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
Button("Retry") {
Button(String(localized: "common.retry", table: "Localizable")) {
loadCurrentMission()
}
.buttonStyle(.bordered)
Expand Down
4 changes: 2 additions & 2 deletions ios/escape/escape/Views/Components/Home/StatsComponents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct StatsView: View {
.font(.caption)
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
Button("Retry") {
Button(String(localized: "common.retry", table: "Localizable")) {
loadRecentMissions()
}
.buttonStyle(.bordered)
Expand Down Expand Up @@ -534,7 +534,7 @@ struct MissionHistoryRow: View {
var body: some View {
HStack {
VStack(alignment: .leading, spacing: 4) {
Text("Mission Completed")
Text("home.stats.mission_completed", tableName: "Localizable")
.font(.subheadline)
.fontWeight(.medium)

Expand Down
20 changes: 10 additions & 10 deletions ios/escape/escape/Views/Components/Map/CompleteView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ struct CompleteView: View {
.font(.system(size: 80))
.foregroundColor(.green)

Text("Mission Complete!")
Text("mission.complete.title", tableName: "Localizable")
.font(.title)
.fontWeight(.bold)

Text("You've reached the shelter safely")
Text("mission.complete.subtitle", tableName: "Localizable")
.font(.subheadline)
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
Expand All @@ -37,7 +37,7 @@ struct CompleteView: View {

// Shelter Information Card
VStack(alignment: .leading, spacing: 16) {
Text("Shelter Information")
Text("mission.complete.shelter_info", tableName: "Localizable")
.font(.headline)
.fontWeight(.semibold)

Expand Down Expand Up @@ -109,7 +109,7 @@ struct CompleteView: View {
// Mission Stats (if available)
if let mission = missionStateService.currentMission {
VStack(alignment: .leading, spacing: 16) {
Text("Mission Summary")
Text("mission.complete.mission_summary", tableName: "Localizable")
.font(.headline)
.fontWeight(.semibold)

Expand All @@ -118,7 +118,7 @@ struct CompleteView: View {
HStack {
Image(systemName: disasterType.emergencyIcon)
.foregroundColor(disasterType.color)
Text("Disaster Type")
Text("mission.complete.disaster_type", tableName: "Localizable")
.foregroundColor(.secondary)
Spacer()
Text(disasterType.localizedName)
Expand All @@ -131,7 +131,7 @@ struct CompleteView: View {
HStack {
Image(systemName: "figure.walk")
.foregroundColor(.orange)
Text("Steps")
Text("mission.complete.steps", tableName: "Localizable")
.foregroundColor(.secondary)
Spacer()
Text("\(steps)")
Expand All @@ -143,7 +143,7 @@ struct CompleteView: View {
HStack {
Image(systemName: "map")
.foregroundColor(.blue)
Text("Distance")
Text("mission.complete.distance", tableName: "Localizable")
.foregroundColor(.secondary)
Spacer()
Text(String(format: "%.2f km", distance / 1000))
Expand All @@ -155,7 +155,7 @@ struct CompleteView: View {
HStack {
Image(systemName: "star.fill")
.foregroundColor(.yellow)
Text("Points Earned")
Text("mission.complete.points_earned", tableName: "Localizable")
.foregroundColor(.secondary)
Spacer()
Text("\(points)")
Expand All @@ -177,7 +177,7 @@ struct CompleteView: View {
Button(action: {
dismiss()
}) {
Text("Return to Map")
Text("mission.complete.return_to_map", tableName: "Localizable")
.font(.headline)
.foregroundColor(.white)
.frame(maxWidth: .infinity)
Expand All @@ -190,7 +190,7 @@ struct CompleteView: View {
// TODO: Share or save mission report
print("Share mission report")
}) {
Text("Share Results")
Text("mission.complete.share_results", tableName: "Localizable")
.font(.headline)
.foregroundColor(.blue)
.frame(maxWidth: .infinity)
Expand Down
4 changes: 2 additions & 2 deletions ios/escape/escape/Views/Components/Rating/RatingCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct RatingCard: View {
StarRatingView.compact(rating: Double(ratingWithUser.rating.rating))

if ratingWithUser.rating.wasEdited {
Text("(edited)")
Text("common.edited", tableName: "Localizable")
.font(.caption2)
.foregroundColor(.secondary)
}
Expand Down Expand Up @@ -128,7 +128,7 @@ struct RatingCardSkeleton: View {
struct RatingEmptyState: View {
let message: String

init(message: String = "No reviews yet. Be the first to review this shelter!") {
init(message: String = String(localized: "rating.no_reviews_be_first", table: "Localizable")) {
self.message = message
}

Expand Down
12 changes: 6 additions & 6 deletions ios/escape/escape/Views/Components/Rating/RatingFormView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ struct RatingFormView: View {
var body: some View {
VStack(alignment: .leading, spacing: 20) {
// Section header
Text(isEditing ? "Edit Your Rating" : "Rate This Shelter")
Text(isEditing ? String(localized: "rating.edit_your_rating", table: "Localizable") : String(localized: "rating.rate_this_shelter", table: "Localizable"))
.font(.headline)

// Star rating picker
VStack(alignment: .leading, spacing: 8) {
Text("Rating")
Text("rating.rating_label", tableName: "Localizable")
.font(.subheadline)
.foregroundColor(.secondary)

Expand All @@ -43,15 +43,15 @@ struct RatingFormView: View {
)

if viewModel.formState.rating == 0 {
Text("Tap a star to rate")
Text("rating.tap_star_to_rate", tableName: "Localizable")
.font(.caption)
.foregroundColor(.secondary)
}
}

// Review text field
VStack(alignment: .leading, spacing: 8) {
Text("Review (Optional)")
Text("rating.review_optional", tableName: "Localizable")
.font(.subheadline)
.foregroundColor(.secondary)

Expand Down Expand Up @@ -79,7 +79,7 @@ struct RatingFormView: View {
}

if viewModel.formState.isReviewTooLong {
Text("Review must be 500 characters or less")
Text("rating.review_too_long", tableName: "Localizable")
.font(.caption)
.foregroundColor(.red)
}
Expand Down Expand Up @@ -121,7 +121,7 @@ struct RatingFormView: View {
.progressViewStyle(CircularProgressViewStyle(tint: .red))
}

Text("Delete Rating")
Text("rating.delete_rating", tableName: "Localizable")
.fontWeight(.semibold)
}
.frame(maxWidth: .infinity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct RatingSummaryCard: View {
private func fullView(summary: ShelterRatingSummary) -> some View {
VStack(alignment: .leading, spacing: 12) {
HStack {
Text("Ratings & Reviews")
Text("rating.ratings_and_reviews", tableName: "Localizable")
.font(.headline)
Spacer()
}
Expand All @@ -79,7 +79,7 @@ struct RatingSummaryCard: View {
.font(.title2)
.fontWeight(.semibold)

Text(summary.totalRatings == 1 ? "Review" : "Reviews")
Text(summary.totalRatings == 1 ? String(localized: "rating.review_singular", table: "Localizable") : String(localized: "rating.review_plural", table: "Localizable"))
.font(.caption)
.foregroundColor(.secondary)
}
Expand All @@ -101,7 +101,7 @@ struct RatingSummaryCard: View {

StarRatingView.compact(rating: summary.averageRating)

Text("(\(summary.totalRatings) \(summary.totalRatings == 1 ? "review" : "reviews"))")
Text("(\(summary.totalRatings) \(summary.totalRatings == 1 ? String(localized: "rating.review_lowercase_singular", table: "Localizable") : String(localized: "rating.review_lowercase_plural", table: "Localizable")))")
.font(.subheadline)
.foregroundColor(.secondary)
}
Expand All @@ -114,11 +114,11 @@ struct RatingSummaryCard: View {
.font(.title2)
.foregroundColor(.secondary)

Text("No reviews yet")
Text("rating.no_reviews_yet", tableName: "Localizable")
.font(.subheadline)
.foregroundColor(.secondary)

Text("Be the first to review this shelter")
Text("rating.be_first_to_review", tableName: "Localizable")
.font(.caption)
.foregroundColor(.secondary)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct ShelterReviewsView: View {
}
.padding()
}
.navigationTitle("Reviews")
.navigationTitle(String(localized: "rating.review_plural", table: "Localizable"))
.navigationBarTitleDisplayMode(.inline)
.sheet(isPresented: $showEditSheet) {
EditRatingSheet(viewModel: viewModel)
Expand Down Expand Up @@ -71,7 +71,7 @@ struct ShelterReviewsView: View {
if viewModel.hasExistingRating {
// Show user's existing rating with edit option
VStack(alignment: .leading, spacing: 12) {
Text("Your Rating")
Text("rating.your_rating", tableName: "Localizable")
.font(.headline)

if let userRating = viewModel.userRating {
Expand Down Expand Up @@ -103,7 +103,7 @@ struct ShelterReviewsView: View {
viewModel.startEditingRating()
showEditSheet = true
}) {
Text("Edit Your Rating")
Text("rating.edit_your_rating", tableName: "Localizable")
.font(.subheadline)
.fontWeight(.medium)
}
Expand Down Expand Up @@ -139,7 +139,7 @@ struct ShelterReviewsView: View {
@ViewBuilder
private var allReviewsSection: some View {
VStack(alignment: .leading, spacing: 16) {
Text("All Reviews")
Text("rating.all_reviews", tableName: "Localizable")
.font(.headline)

if viewModel.isLoadingRatings {
Expand Down Expand Up @@ -183,11 +183,11 @@ struct EditRatingSheet: View {
RatingFormView(viewModel: viewModel, isEditing: true)
.padding()
}
.navigationTitle("Edit Rating")
.navigationTitle(String(localized: "rating.edit_rating", table: "Localizable"))
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Cancel") {
Button(String(localized: "common.cancel", table: "Localizable")) {
dismiss()
}
}
Expand Down
20 changes: 10 additions & 10 deletions ios/escape/escape/Views/Components/Shared/ActivityHeatmapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct ActivityHeatmapView: View {

var body: some View {
VStack(alignment: .leading, spacing: 12) {
Text("Activity in the last 30 days")
Text("activity.title", tableName: "Localizable")
.font(.headline)
.foregroundColor(.primary)

Expand Down Expand Up @@ -57,18 +57,18 @@ struct ActivityHeatmapView: View {

// Color legend
HStack(spacing: 4) {
Text("Less")
Text("activity.legend.less", tableName: "Localizable")
.font(.caption2)
.foregroundColor(.secondary)

ForEach(0..<5) { index in
ForEach(0 ..< 5) { index in
Rectangle()
.fill(getColor(for: index, max: 4))
.frame(width: 12, height: 12)
.cornerRadius(2)
}

Text("More")
Text("activity.legend.more", tableName: "Localizable")
.font(.caption2)
.foregroundColor(.secondary)
}
Expand All @@ -82,7 +82,7 @@ struct ActivityHeatmapView: View {

private var weekdayLabels: some View {
LazyVGrid(columns: columns, spacing: 4) {
ForEach(["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], id: \.self) { day in
ForEach([String(localized: "weekday.mon", table: "Localizable"), String(localized: "weekday.tue", table: "Localizable"), String(localized: "weekday.wed", table: "Localizable"), String(localized: "weekday.thu", table: "Localizable"), String(localized: "weekday.fri", table: "Localizable"), String(localized: "weekday.sat", table: "Localizable"), String(localized: "weekday.sun", table: "Localizable")], id: \.self) { day in
Text(day)
.font(.caption2)
.foregroundColor(.secondary)
Expand All @@ -93,7 +93,7 @@ struct ActivityHeatmapView: View {

// MARK: - Day Cell View

private func dayCellView(for date: Date, index: Int) -> some View {
private func dayCellView(for date: Date, index _: Int) -> some View {
let dateString = formatDate(date)
let points = dailyPoints[dateString] ?? 0
let color = getColorForPoints(points)
Expand Down Expand Up @@ -143,7 +143,7 @@ struct ActivityHeatmapView: View {

// MARK: - Helper Methods

private func handleDayTap(date: String, points: Int, frame: CGRect) {
private func handleDayTap(date: String, points _: Int, frame: CGRect) {
selectedDate = date
tooltipFrame = frame

Expand Down Expand Up @@ -187,7 +187,7 @@ struct ActivityHeatmapView: View {
let calendar = Calendar.current
let today = calendar.startOfDay(for: Date())

return (0..<30).reversed().compactMap { daysAgo in
return (0 ..< 30).reversed().compactMap { daysAgo in
calendar.date(byAdding: .day, value: -daysAgo, to: today)
}
}
Expand Down Expand Up @@ -253,7 +253,7 @@ extension Color {
.sRGB,
red: Double(r) / 255,
green: Double(g) / 255,
blue: Double(b) / 255,
blue: Double(b) / 255,
opacity: Double(a) / 255
)
}
Expand All @@ -270,7 +270,7 @@ extension Color {
"2025-10-25": 100,
"2025-11-01": 220,
"2025-11-05": 160,
"2025-11-08": 190
"2025-11-08": 190,
]

return ActivityHeatmapView(dailyPoints: sampleData)
Expand Down
Loading