-
-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force localization string extraction
Our translatable string extractor is currently broken. As such, only the strings inside Text() or NSLocalizedString() are currently being extracted for localization. (See #1183 (comment) for more details) This commit makes sure to use Text() and NSLocalizedString() Note: I did not check the entire codebase for non-extractable strings. It's possible that there are more.
- Loading branch information
1 parent
83453c4
commit c907070
Showing
6 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ struct BlockedUsers: View { | |
|
||
var body: some View { | ||
if showBlockingUnsupportedPlaceholder { | ||
ContentUnavailableShimView("Blocking unsupported", systemImage: "iphone.homebutton.slash", description: Text("Your server does not support blocking (XEP-0191).")) | ||
ContentUnavailableShimView(NSLocalizedString("Blocking unsupported", comment: ""), systemImage: "iphone.homebutton.slash", description: Text("Your server does not support blocking (XEP-0191).")) | ||
} else { | ||
List { | ||
ForEach(blockedJids, id: \.self) { blockedJid in | ||
|
@@ -42,7 +42,7 @@ struct BlockedUsers: View { | |
} | ||
} | ||
.listStyle(.plain) | ||
.navigationTitle("Blocked Users") | ||
.navigationTitle(Text("Blocked Users")) | ||
.animation(.default, value: blockedJids) | ||
.onAppear { | ||
if !(xmppAccount.accountState.rawValue >= xmppState.stateBound.rawValue && xmppAccount.connectionProperties.accountDiscoDone) { | ||
|
@@ -84,13 +84,13 @@ struct BlockedUsers: View { | |
}) | ||
} | ||
} | ||
.alert("Enter the jid that you want to block", isPresented: $showAddingToBlocklistForm, actions: { | ||
.alert(NSLocalizedString("Enter the jid that you want to block", comment: ""), isPresented: $showAddingToBlocklistForm, actions: { | ||
TextField("[email protected]/resource", text: $jidToBlock) | ||
.textInputAutocapitalization(.never) | ||
.keyboardType(.emailAddress) | ||
.autocorrectionDisabled() | ||
|
||
Button("Block", role: .destructive) { | ||
Button(NSLocalizedString("Block", comment: ""), role: .destructive) { | ||
guard (jidToBlock.range(of: BlockedUsers.jidPattern, options: .regularExpression) != nil) else { | ||
showInvalidJidAlert = true | ||
return | ||
|
@@ -101,7 +101,7 @@ struct BlockedUsers: View { | |
MLXMPPManager.sharedInstance().block(true, fullJid: jidToBlock, onAccount: self.xmppAccount.accountID) | ||
} | ||
|
||
Button("Cancel", role: .cancel, action: {}) | ||
Button(NSLocalizedString("Cancel", comment: ""), role: .cancel, action: {}) | ||
} | ||
) | ||
// If .onDisappear is applied to the alert or any of its subviews, its perform action won't | ||
|
@@ -112,7 +112,7 @@ struct BlockedUsers: View { | |
jidToBlock = "" | ||
} | ||
} | ||
.alert("Input is not a valid jid", isPresented: $showInvalidJidAlert, actions: {}) | ||
.alert(NSLocalizedString("Input is not a valid jid", comment: ""), isPresented: $showInvalidJidAlert, actions: {}) | ||
.addLoadingOverlay(overlay) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters