Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Application] View internalization with MessageSource #34

Open
binchoo opened this issue Nov 24, 2022 · 2 comments
Open

[Application] View internalization with MessageSource #34

binchoo opened this issue Nov 24, 2022 · 2 comments
Assignees

Comments

@binchoo
Copy link
Owner

binchoo commented Nov 24, 2022

As-is:
View classes contain Inline strings. This will explode the complexity of the management of the strings used in a view.

To-be:
Substitute inline strings inside the view classes to i18n constants managed by a MessageSource bean.

@binchoo binchoo self-assigned this Nov 24, 2022
@binchoo binchoo added this to the release 1.1.4 (View i18n) milestone Nov 24, 2022
@binchoo
Copy link
Owner Author

binchoo commented Nov 30, 2022

국제화 문자열 상수

이 문서는 여행 비서 페이몬!의 각 도메인에서 참조할 문자열 상수를 정의한다.

형식

  • 도메인 무관할 경우 형식.상세내용

  • 도메인에 연관할 경우 형식.도메인.(상세내용)

  • 오류 도메인에 속할 경우 형식.Error.도메인.(상세내용)

  • 도메인 := Hoyopass | DeleteHoyopass | Uid | DeleteUid | DailyCheck | Redeem | RedeemLog | TravelerStatus

  • 형식 := Btn | Label | Desc | Format | Thumb | Other | UserDialog | SystemDialog

통행증 영역

HoyopassListView

상수 ko-KR 비고
Btn.DailyCheck "출석체크" 출석체크 버튼 라벨
UserDialog.DailyCheck "이 통행증 계정으로 출석체크 대신해줘" 출석 체크 요청 후 말풍선
Btn.DeleteHoyopass "제거하기" 통행증 제거하기 버튼 라벨
UserDialog.DeleteHoyopass "이 통행증 지워줬으면 해" 통행증 제거하기 요청 후 말풍선
Format.Hoyopass.Ltuid "통행증 번호: %s" 통행증 번호 형식
{통행증 번호}    
Format.Uid.RegionUid "UID: %s %s" UID 번호 형식
{서버} {UID}    
Format.Uid.LevelName "Lv.%d %s" 캐릭터 정보 형식
{레벨} {이름}    
Thumb.Aether "aether_ic_front" 아이테르 섬네일
Thumb.Lumine "lumine_ic_front" 루미네 섬네일

국제화 문자열 상수

이 문서는 여행 비서 페이몬!의 각 도메인에서 참조할 문자열 상수를 정의한다.

통행증 영역

HoyopassListView

상수 ko-KR 비고
Btn.DailyCheck "출석체크" 출석체크 버튼 라벨
UserDialog.DailyCheck "이 통행증 계정으로 출석체크 대신해줘" 출석 체크 요청 후 말풍선
Btn.DeleteHoyopass "제거하기" 통행증 제거하기 버튼 라벨
UserDialog.DeleteHoyopass "이 통행증 지워줬으면 해" 통행증 제거하기 요청 후 말풍선
Format.Hoyopass.Ltuid "통행증 번호: %s" 통행증 번호 형식
{통행증 번호}
Format.Uid.RegionUid "UID: %s %s" UID 번호 형식
{서버} {UID}
Format.Uid.LevelName "Lv.%d %s" 캐릭터 정보 형식
{레벨} {이름}
Thumb.Aether "aether_ic_front" 아이테르 섬네일
Thumb.Lumine "lumine_ic_front" 루미네 섬네일

UidListView

상수 ko-KR 비고
Thumb.Aether "aether_banner" 아이테르 등록 시 배너
Thumb.Lumine "lumine_banner" 루미네 등록 시 배너
Format.Uid.RegionUid "%s %s" 캐릭터 정보 형식
{서버} {UID}
Format.Uid.LevelName "Lv.%d %s" 캐릭터 정보 형식
{레벨} {캐릭터명}
Btn.DeleteUid "얘는 빼줘" UID 제거 요청 버튼 라벨
UserDialog.DeleteUid "%s의 %s⋯ %s는 이미 여행을 다녀왔어" UID 제거 요청 후 말풍선
{서버} {캐릭터명} {그 그녀}
SystemDialog.DeleteUid "이제 %s명의 여행자들을 관리할게~%n버튼이 있는 여행자는 지우는 게 가능해!" UID 개수 및 제거 안내 말풍선

일일출석 영역

DailyCheckListView

상수 ko-KR 비고
Other.HoyolabDailyCheckUrl "https://act.hoyolab.com/ys/event/signin-sea-v3/index.html?act_id=e202102251931481&lang=ko-kr" 호요랩 일일출석 사이트 링크
Thumb.DailyCheck.Fail "dailycheck_fail" 일일출석 실패 시 섬네일
Thumb.DailyCheck.Duplicate "dailycheck_duplicate" 일일출석 중복 시 섬네일
Thumb.DailyCheck.Complete "dailycheck_complete" 일일출석 성공 시 섬네일
Label.DailyCheck.Fail "실패.." 일일출석 중복 시 타이틀
Label.DailyCheck.Duplicate "중복" 일일출석 실패 시 타이틀
Label.DailyCheck.Success "성공!" 일일출석 성공 시 타이틀
Desc.DailyCheck.Fail "아잇.. 왜 오류가 난거야" 일일출석 실패 시 묘사
Desc.DailyCheck.Duplicate "이미 출석 했었네...?" 일일출석 중복 시 묘사
Desc.DailyCheck.Success "페이몬이 대신 출첵해줬어!" 일일출석 성공 시 묘사
Format.DailyCheck.Timestamp "M월 d일 H시 m분" 일일출석 타임스탬프 형식
Btn.DailyCheck.Retry "호요랩 출석 요청" 일일출석 실패 시 재요청 버튼 라벨

리딤 영역

RedeemListView

상수 ko-KR 비고
Thumb.Redeem.Fail "redeem_fail" 리딤 실패 시 섬네일
Thumb.Redeem.Success "redeem_complete" 리딤 성공 시 섬네일
Thumb.Aether "aether_ic_front" 아이테르 섬네일
Thumb.Lumine "lumine_ic_front" 루미네 섬네일
Format.Uid.RegionLevelName "%s Lv.%d %s" 캐릭터 정보 출력 형식
{서버} {레벨} {캐릭터명}
Format.Uid.Uid "UID: %s" UID 번호 형식
{UID}
Format.Redeem.Timestamp "M월 d일" 리딤 타임스탬프 형식
Label.Redeem.Success “[성공]" 리딤 성공 라벨
Label.Redeem.Fail “[실패]" 리딤 실패 라벨
Format.Redeem.Info "%s%n%s 사유:%s" 리딤 성패 및 사유 형식
{성패 라벨} {리딤코드} {사유}

RedeemListTextView

상수 ko-KR 비고
Format.RedeemLog.Timestamp "yyyy/MM/dd HH:mm:SS" 리딤 로그 타임스탬프 형식
Label.RedeemLog.Legend "날짜 시간
Other.LineDelimeter "\n_______________\n" 리딤 로그 줄 구분자
Label.Success "성공" 리딤 성공 라벨
Label.Fail "실패" 리딤 실패 라벨

여행자 영역

TravelerStatusView

상수 ko-KR 비고
Thumb.Resin "resin_ic" 레진 섬네일
Thumb.Serentea "serentea_ic" 선계 주전자 섬네일
Thumb.Aether "aether_ic_front" 아이테르 섬네일
Thumb.Lumine "lumine_ic_front" 루미네 섬네일
Label.Resin "레진" 레진 라벨
Label.ResinRecovery "레진회복" 레진회복 라벨
Label.SerenteaCoin "선계보화" 선계보화 라벨
Label.Expediting "탐사중" 탐사중 라벨
Format.TravelerStatus.ResinRecovery.Timestamp "%dh %dm %ds" 레진 회복 시간 형식
{시간} {분} {초}
Desc.TravelerStatus.Hurry "들어가야 돼!(✪Ω✪)ノ" 급박한 묘사
Desc.TravelerStatus.Exhausted "오늘 여행은 괜찮았어?" 안부 묘사
Desc.TravelerStatus.Neutral "여행자의 상태를 보고왔어~" 평범한 묘사

오류 템플릿 & 오류 바인딩

표를 정리해 놓고 보니까, 문자열 상수 의존이 views 패키지에서 출발되도록 조정해야 할 듯.

⇒ 오류 바인더들을 views.error.binders 패키지로 이동시킬 것.

DefaultErrorExplain

상수 ko-KR 비고
Desc.Error.Unkown "알 수 없는 오류가 발생했습니다." HoyopassExceptionBinder

ErrorContextBinders

상수 ko-KR 비고
Format.Error.Hoyopass.Ltuid "ltuid: %s" UserExceptionBinder
Format.Error.Hoyopass.Title "%s\n ltuid: %s" HoyopassExceptionBinder
Desc.Error.Hoyopass.Duplication "이미 등록된 통행증 정보입니다." DuplicationException
Desc.Error.Hoyopass.Many "통행증은 %d개까지 보유 가능합니다." ManyHoyopassException
Desc.Error.Hoyopass.No "현재 통행증을 갖고 있지 않습니다." NoHoyopassException
Desc.Error.Uid.Immortal "지울 수 없는 UID입니다. 통행증은 최소 하나의 UID를 지녀야합니다." ImmortalUidException
Desc.Error.Traveler.Inactive "여행자를 확인할 수 없습니다. 호요랩 활성 여부를 확인하세요." InactiveStateException
Desc.Error.DailyCheck.No "일일 출석을 수행한 이력이 없습니다." NoUserDailyCheckException
Desc.Error.Redeem.No "리딤이 수행된 이력이 없습니다." NoUserRedeemException
Desc.Error.Crypto "옳지 않은 방법으로 만들어진 QR 코드 같습니다." CryptoException

@binchoo
Copy link
Owner Author

binchoo commented Feb 28, 2023

pending

@binchoo binchoo removed this from the release 1.1.4 (View i18n) milestone Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant