feat(i18n): 마이페이지 하드코딩 문구를 I18n 키로 통일한다
This commit is contained in:
@@ -25,7 +25,7 @@ struct CanChargeView: View {
|
||||
var body: some View {
|
||||
BaseView(isLoading: $storeManager.isLoading) {
|
||||
VStack(spacing: 13.3) {
|
||||
DetailNavigationBar(title: "충전하기")
|
||||
DetailNavigationBar(title: I18n.MyPage.Can.chargeTitle)
|
||||
|
||||
if UserDefaults.bool(forKey: .auth) {
|
||||
CanChargeTabView(currentTab: $currentTab)
|
||||
@@ -121,16 +121,7 @@ struct CanPgItemView: View {
|
||||
|
||||
// MARK: - Localize "캔" unit inside arbitrary text based on current app language
|
||||
fileprivate func localizeCanWord(in text: String) -> String {
|
||||
let unit: String
|
||||
switch LanguageHeaderProvider.current {
|
||||
case "ko":
|
||||
unit = "캔"
|
||||
case "ja":
|
||||
unit = "can"
|
||||
default:
|
||||
unit = "cans"
|
||||
}
|
||||
return text.replacingOccurrences(of: "캔", with: unit)
|
||||
text.replacingOccurrences(of: I18n.MyPage.Can.koreanUnitToken, with: I18n.MyPage.Can.localizedUnit)
|
||||
}
|
||||
|
||||
struct CanChargeTabView: View {
|
||||
|
||||
Reference in New Issue
Block a user