Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
choykarl committed Mar 23, 2024
1 parent 8b9c82e commit 2937538
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Easydict/NewApp/LanguagePreference/I18nHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class I18nHelper: NSObject {
}

var localizeCode: String {
UserDefaults.standard.string(forKey: kEZLanguagePreferenceLocalKey) ?? LanguageState.LanguageType
UserDefaults.standard.string(forKey: languagePreferenceLocalKey) ?? LanguageState.LanguageType
.simplifiedChinese.rawValue
}

Expand Down
4 changes: 2 additions & 2 deletions Easydict/NewApp/LanguagePreference/LanguageState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI

// MARK: - LanguageState

let kEZLanguagePreferenceLocalKey = "kEZLanguagePreferenceLocalKey"
let languagePreferenceLocalKey = "LanguagePreferenceLocalKey"

// MARK: - LanguageState

Expand All @@ -31,7 +31,7 @@ class LanguageState: ObservableObject {
}
}

@AppStorage(kEZLanguagePreferenceLocalKey) var language: LanguageType = (.init(
@AppStorage(languagePreferenceLocalKey) var language: LanguageType = (.init(
rawValue: Locale.current.identifier
) ?? .simplifiedChinese) {
didSet {
Expand Down
2 changes: 1 addition & 1 deletion Easydict/NewApp/LanguagePreference/LocalizedBundle.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// EZLocalizedBundle.swift
// LocalizedBundle.swift
// Easydict
//
// Created by choykarl on 2024/3/23.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// LanguagePreference.m
// NSBundle+LanguagePreference.m
// Easydict
//
// Created by choykarl on 2024/3/23.
Expand Down

0 comments on commit 2937538

Please sign in to comment.