cleanup strings

This commit is contained in:
ivan grachev 2024-03-25 19:05:13 +03:00
parent 9fb3e58161
commit 1e0daf76b6
10 changed files with 20 additions and 17 deletions

View File

@ -74,12 +74,12 @@ class AccountsListViewController: UIViewController, DataStateContainer {
if forWalletSelection {
if selectAccountAction?.initiallyConnectedProviders.isEmpty ?? true {
navigationItem.title = Strings.selectAccount.capitalized
navigationItem.title = Strings.selectAccount
} else {
navigationItem.title = Strings.switchAccount.capitalized
navigationItem.title = Strings.switchAccount
}
} else {
navigationItem.title = Strings.wallets.capitalized
navigationItem.title = Strings.wallets
}
navigationController?.navigationBar.prefersLargeTitles = true

View File

@ -35,7 +35,7 @@ class EditAccountsViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
okButton.setTitle(Strings.ok, for: .normal)
navigationItem.title = Strings.editAccounts.capitalized
navigationItem.title = Strings.editAccounts
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always
navigationItem.leftBarButtonItem = UIBarButtonItem(title: Strings.cancel, style: .plain, target: self, action: #selector(dismissAnimated))

View File

@ -61,7 +61,7 @@ class ApproveTransactionViewController: UIViewController {
cancelButton.setTitle(Strings.cancel, for: .normal)
priceService.update()
navigationItem.title = Strings.sendTransaction.capitalized
navigationItem.title = Strings.sendTransaction
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always
navigationItem.rightBarButtonItem = UIBarButtonItem(image: Images.preferences, style: .plain, target: self, action: #selector(editTransactionButtonTapped))
@ -116,7 +116,7 @@ class ApproveTransactionViewController: UIViewController {
var cellModels: [CellModel] = [
.textWithImage(text: peerMeta?.name ?? Strings.unknownWebsite, extraText: nil, imageURL: peerMeta?.iconURLString, image: nil),
.textWithImage(text: account.croppedAddress, extraText: balance, imageURL: nil, image: account.image),
.textWithImage(text: chain.name.lowercased(), extraText: nil, imageURL: nil, image: Images.network)
.textWithImage(text: chain.name, extraText: nil, imageURL: nil, image: Images.network)
]
let price = priceService.forNetwork(chain)

View File

@ -48,7 +48,7 @@ class ApproveViewController: UIViewController {
super.viewDidLoad()
okButton.setTitle(Strings.ok, for: .normal)
cancelButton.setTitle(Strings.cancel, for: .normal)
navigationItem.title = approveTitle.capitalized
navigationItem.title = approveTitle
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always
isModalInPresentation = true

View File

@ -35,7 +35,7 @@ class ImportViewController: UIViewController {
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always
navigationItem.title = Strings.importWallet.capitalized
navigationItem.title = Strings.importWallet
navigationItem.leftBarButtonItem = UIBarButtonItem(title: Strings.cancel, style: .plain, target: self, action: #selector(dismissAnimated))
okButton.configurationUpdateHandler = { [weak self] button in

View File

@ -70,11 +70,11 @@ class PasswordViewController: UIViewController {
self.mode = mode
switch mode {
case .create:
navigationItem.title = Strings.createPassword.capitalized
navigationItem.title = Strings.createPassword
case .repeatAfterCreate:
navigationItem.title = Strings.repeatPassword.capitalized
navigationItem.title = Strings.repeatPassword
case .enter:
navigationItem.title = Strings.enterPassword.capitalized
navigationItem.title = Strings.enterPassword
}
}

View File

@ -152,12 +152,12 @@ class AccountsListViewController: NSViewController {
let canSelectAccount = selectAccountAction != nil && !wallets.isEmpty
if canSelectAccount {
if selectAccountAction?.initiallyConnectedProviders.isEmpty ?? true {
titleLabel.stringValue = Strings.selectAccount.replacingOccurrences(of: " ", with: "\n").capitalized
titleLabel.stringValue = Strings.selectAccount.replacingOccurrences(of: " ", with: "\n")
} else {
titleLabel.stringValue = Strings.switchAccount.replacingOccurrences(of: " ", with: "\n").capitalized
titleLabel.stringValue = Strings.switchAccount.replacingOccurrences(of: " ", with: "\n")
}
} else {
titleLabel.stringValue = Strings.wallets.capitalized
titleLabel.stringValue = Strings.wallets
}
addButton.isHidden = wallets.isEmpty

View File

@ -42,7 +42,7 @@ struct Transaction {
}
func description(chain: EthereumNetwork, price: Double?) -> String {
var result = ["🌐 " + chain.name.lowercased()]
var result = ["🌐 " + chain.name]
if let value = valueWithSymbol(chain: chain, price: price, withLabel: false) {
result.append(value)
}

View File

@ -105,6 +105,9 @@ struct Strings {
static let connect = "connect"
static let paste = "paste"
static let getStarted = "get started"
// MARK: - Helpers
static let isVisionPro = loc("isVisionPro") == "isVisionPro"
private static func loc(_ string: String.LocalizationValue) -> String {

View File

@ -19,7 +19,7 @@ struct NetworksListView: View {
VStack {
list()
}
.navigationBarTitle(Strings.selectNetwork.capitalized, displayMode: .large)
.navigationBarTitle(Strings.selectNetwork, displayMode: .large)
.navigationBarItems(leading: Button(action: {
completion(selectedNetwork)
presentationMode.wrappedValue.dismiss() }) {
@ -57,7 +57,7 @@ struct NetworksListView: View {
Section(header: title.map { Text($0) }) {
ForEach(networks, id: \.self) { network in
HStack {
Text(network.name.lowercased())
Text(network.name)
Spacer()
if selectedNetwork?.chainId == network.chainId {
Image.checkmark.foregroundStyle(.tint)