국제화 가능한 문자열을 I18n의 상수로 변경

This commit is contained in:
Yu Sung
2025-12-19 12:29:28 +09:00
parent 8bcbd3aca0
commit f51fe327e9

View File

@@ -33,7 +33,7 @@ final class ContentListViewModel: ObservableObject {
}
@Published var scrollToTop = false
@Published var selectedCategory: String = "전체"
@Published var selectedCategory: String = I18n.Category.all
var userId = 0
var page = 1
@@ -78,13 +78,13 @@ final class ContentListViewModel: ObservableObject {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
}
self.isShowPopup = true
}
} catch {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
self.isShowPopup = true
}
@@ -114,21 +114,21 @@ final class ContentListViewModel: ObservableObject {
categoryList.removeAll()
if !data.isEmpty {
categoryList.append(GetCategoryListResponse(categoryId: 0, category: "전체"))
categoryList.append(GetCategoryListResponse(categoryId: 0, category: I18n.Category.all))
categoryList.append(contentsOf: data)
}
} else {
if let message = decoded.message {
self.errorMessage = message
} else {
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
}
self.isShowPopup = true
}
} catch {
print(error)
self.errorMessage = "다시 시도해 주세요.\n계속 같은 문제가 발생할 경우 고객센터로 문의 주시기 바랍니다."
self.errorMessage = I18n.Common.commonError
self.isShowPopup = true
}
}