feat(i18n): 마이페이지 하드코딩 문구를 I18n 키로 통일한다

This commit is contained in:
Yu Sung
2026-03-31 23:04:33 +09:00
parent 25fccbaa07
commit b53614836f
21 changed files with 483 additions and 176 deletions

View File

@@ -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 {