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
6 changes: 6 additions & 0 deletions ios/HackerNews.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
Expand Down Expand Up @@ -747,6 +748,7 @@
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -782,6 +784,7 @@
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"$(PROJECT_DIR)/Frameworks/Reaper.xcframework\"";
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 3.10;
OTHER_LDFLAGS = "-fprofile-instr-generate";
OTHER_SWIFT_FLAGS = "-profile-generate -profile-coverage-mapping";
Expand Down Expand Up @@ -826,6 +829,7 @@
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"$(PROJECT_DIR)/Frameworks/Reaper.xcframework\"";
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 3.10;
PRODUCT_BUNDLE_IDENTIFIER = com.emergetools.hackernews;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1030,6 +1034,7 @@
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -1064,6 +1069,7 @@
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"$(PROJECT_DIR)/Frameworks/Reaper.xcframework\"";
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MARKETING_VERSION = 3.10;
PRODUCT_BUNDLE_IDENTIFIER = com.emergetools.hackernews;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion ios/HackerNews/Auth/LoginRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct LoginRow: View {
}

func loginText() -> String {
return loggedIn ? "Logout" : "Login"
return loggedIn ? String(localized: "auth.button.logout") : String(localized: "auth.button.login")
}

func glowColor() -> Color {
Expand Down
12 changes: 6 additions & 6 deletions ios/HackerNews/Auth/LoginScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct LoginScreen: View {
Spacer()
.frame(maxHeight: 16)

TextField("Username", text: $loginState.username)
TextField(String(localized: "auth.field.username"), text: $loginState.username)
.textInputAutocapitalization(.none)
.padding()
.background(Color.background)
Expand All @@ -49,7 +49,7 @@ struct LoginScreen: View {
.stroke(Color.background.opacity(0.5), lineWidth: 1)
)

SecureField("Password", text: $loginState.password)
SecureField(String(localized: "auth.field.password"), text: $loginState.password)
.padding()
.background(Color.background)
.clipShape(RoundedRectangle(cornerRadius: 12))
Expand All @@ -59,16 +59,16 @@ struct LoginScreen: View {
)

if loginState.showError {
Text("Invalid username or password")
Text("auth.error.invalidCredentials")
.foregroundColor(.red)
.font(.ibmPlexMono(.regular, size: 14))
}


HStack(spacing: 0) {
Text("By signing in, you agree to the ")
Text("auth.agreement.prefix")
.font(.ibmPlexSans(.regular, size: 12))
Text("Hacker News Guidelines")
Text("auth.agreement.guidelines")
.font(.ibmPlexSans(.regular, size: 12))
.foregroundColor(.blue)
.underline()
Expand Down Expand Up @@ -97,7 +97,7 @@ struct LoginScreen: View {
}
},
label: {
Text("Submit")
Text("auth.button.submit")
.font(.ibmPlexMono(.bold, size: 16))
.frame(maxWidth: .infinity)
.frame(height: 40)
Expand Down
4 changes: 2 additions & 2 deletions ios/HackerNews/Bookmarks/BookmarksScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct BookmarksScreen: View {
Group {
if model.bookmarks.isEmpty {
ZStack {
Text("Long-press a story to bookmark it.")
Text("bookmarks.emptyState")
.font(.ibmPlexSans(.medium, size: 18))
}
} else {
Expand Down Expand Up @@ -47,7 +47,7 @@ struct BookmarksScreen: View {
.background(.ultraThinMaterial)
.containerShape(.rect(cornerRadius: 24, style: .continuous))

Text("Bookmarks")
Text("bookmarks.title")
.font(.ibmPlexMono(.bold, size: 24))
.padding(.horizontal, 16)
}
Expand Down
4 changes: 2 additions & 2 deletions ios/HackerNews/Comments/CommentComposer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ struct CommentComposer: View {
HStack(alignment: .center) {
Image(systemName: "message.fill")
.font(.system(size: 12))
Text("Add a comment")
Text("comments.composer.title")
.font(.ibmPlexSans(.medium, size: 12))
}
TextField(
"Words of wisdom",
String(localized: "comments.composer.placeholder"),
text: $state.text
)
.textFieldStyle(.roundedBorder)
Expand Down
4 changes: 2 additions & 2 deletions ios/HackerNews/Comments/CommentRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ struct CommentRow: View {
.clipShape(Capsule())

Menu {
Button("Report Comment") {
Button(String(localized: "comments.action.report")) {
flagComment(state)
}
Button(state.hidden ? "Show" : "Collapse") {
Button(state.hidden ? String(localized: "comments.action.show") : String(localized: "comments.action.collapse")) {
toggleComment()
}
} label: {
Expand Down
2 changes: 1 addition & 1 deletion ios/HackerNews/Comments/CommentsHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct CommentsHeader: View {
.clipShape(Capsule())

Menu {
Button("Report Post", action: flagPost)
Button(String(localized: "post.action.report"), action: flagPost)
} label: {
Image(systemName: "ellipsis")
.font(.system(size: 12))
Expand Down
2 changes: 1 addition & 1 deletion ios/HackerNews/Feed/FeedScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private struct FeedListView: View {
model.toggleBookmark(content)
} label: {
Label(
content.bookmarked ? "Remove Bookmark" : "Bookmark",
content.bookmarked ? String(localized: "bookmarks.action.remove") : String(localized: "bookmarks.action.bookmark"),
systemImage: content.bookmarked ? "book.fill" : "book"
)
}
Expand Down
Loading
Loading