콘텐츠 상세 구매 버튼 텍스트 다국어 처리

This commit is contained in:
Yu Sung
2025-12-19 16:11:43 +09:00
parent bea50b0085
commit c80246adbf
2 changed files with 12 additions and 2 deletions

View File

@@ -134,8 +134,11 @@ struct ContentDetailView: View {
} else { } else {
ContentDetailPurchaseButton( ContentDetailPurchaseButton(
price: audioContent.price, price: audioContent.price,
title: audioContent.purchaseOption == .RENT_ONLY ? " 대여하기" : title: " " + (
audioContent.purchaseOption == .BUY_ONLY ? " 소장하기" : " 구매하기", audioContent.purchaseOption == .RENT_ONLY ? I18n.Purchase.rent :
audioContent.purchaseOption == .BUY_ONLY ? I18n.Purchase.buy :
I18n.Purchase.purchase
),
backgroundColor: audioContent.purchaseOption == .RENT_ONLY ? Color(hex: "548f7d") : backgroundColor: audioContent.purchaseOption == .RENT_ONLY ? Color(hex: "548f7d") :
audioContent.purchaseOption == .BUY_ONLY ? Color(hex: "59548f") : audioContent.purchaseOption == .BUY_ONLY ? Color(hex: "59548f") :
Color.button Color.button

View File

@@ -251,6 +251,13 @@ enum I18n {
pick(ko: "\(count)", en: "Total \(count) episodes", ja: "\(count)") pick(ko: "\(count)", en: "Total \(count) episodes", ja: "\(count)")
} }
} }
// /
enum Purchase {
static var rent: String { pick(ko: "대여하기", en: "Rent", ja: "レンタルする") }
static var buy: String { pick(ko: "소장하기", en: "Buy", ja: "購入する") }
static var purchase: String { pick(ko: "구매하기", en: "Purchase", ja: "購入する") }
}
} }
// MARK: - // MARK: -