[CVW-047] 코인 디테일 화면 국제화 적용(한글, 영어, 달러, 원화)#61
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR applies internationalization to the coin detail screen by updating UI texts based on language and currency settings and refines the price decimal display logic. Key changes include:
- Updating view models and UI components to use new render objects (e.g. TickerInfoRO) and localized column titles.
- Integrating exchange rate retrieval and formatting into ticker, orderbook, and coin trade computations.
- Adjusting dependency injections and test cases to support the new I18N and exchange rate features.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Projects/Features/CoinDetail/Testing/Testing.swift | Removal of an unused test file. |
| Projects/Features/CoinDetail/Testing/FakeExchangeRateRepository.swift | Addition of a fake repository for exchange rates. |
| Projects/Features/CoinDetail/Project.swift | Updating dependencies to include the I18N module. |
| Projects/Features/CoinDetail/Feature/Sources/Views/TickerChangeInfoView.swift | Changing the binding type to the new TickerInfoRO. |
| Projects/Features/CoinDetail/Feature/Sources/Views/RecentTradeTableView.swift | Updating header texts to use dynamic localized values. |
| Projects/Features/CoinDetail/Feature/Sources/Views/CoinDetailPageView.swift | Integrating localized column titles and binding changes in the view. |
| Projects/Features/CoinDetail/Feature/Sources/Model/TickerInfoRO.swift, OrderbookTableColumnTitleRO.swift, CoinTradeTableColumnTitleRO.swift, ExchangeRateInfo.swift | Introducing new render objects to support internationalization and precise price formatting. |
| Projects/Features/CoinDetail/Feature/Sources/CoinDetailPageViewModel.swift | Major changes for internationalization, async exchange rate fetching, and updated actions/reduce logic. |
| Projects/Features/CoinDetail/Feature/Sources/CoinDetailPageBuilder.swift | Adding I18NManager dependency to the view model construction. |
| DI and Domain files | Updating dependency injector and use case interfaces to support exchange rate functionality. |
Comments suppressed due to low confidence (2)
Projects/Features/CoinDetail/Feature/Sources/CoinDetailPageViewModel.swift:441
- [nitpick] The property name 'priceChagePercentInfo' appears to be misspelled; consider renaming it to 'priceChangePercentInfo' for clarity.
var priceChagePercentInfo: PriceChangePercentRO?
Projects/Features/CoinDetail/Feature/Sources/CoinDetailPageViewModel.swift:420
- [nitpick] Consider caching the DateFormatter instance instead of reinitializing it in 'createCoinTradeRO', as DateFormatter creation can be expensive when the function is called frequently.
let dateFormatter = DateFormatter()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경된 점
코인 디테일 화면 국제화 적용(한글, 영어, 달러, 원화)
코인 디테일 화면에 국제화 표현을 적용했습니다.
메인화면과 같이 설정에 따라 동적으로 언어 및 화폐가 변경됩니다.
가격 소수점 표현 방식 수정
코인 가격을 원화로 환산할 때,
예: USDT 가격 × 환율 결과가 3213.12312312원처럼 지나치게 많은 소수점 자릿수를 포함하는 경우가 발생합니다.
단순히 고정된 소수점 자리수를 적용할 경우 다음과 같은 문제가 있습니다:
이에 따라 최소 자리수(min)와 최대 자리수(max)를 설정하고,
최소 자리수부터 시작해 유의미한 숫자가 나타날 때까지 자리수를 늘려가며 표현하는 방식을 선택했습니다.
예: 최소 표현2, 최대 표현 자리수가 4인 경우
1 = 1.00
0.1 = 0.10
0.01 = 0.01
0.001 = 0.001
0.0001 = 0.0001
0.00001 = 0.0000
현재 최소 소수점 자릿수는 2자리 최대 소수점 자리수는 8자리로 설정했습니다.
설정 사유