Repository navigation
Localize the phone app and push notifications, and guard against hardcoded text - #464
Merged
Merged
Conversation
…phone The agents frame carries the core's explicit interface language, and a push payload names the agent's state and place instead of a Korean body. The service worker keeps the page's two state words in its own cache and composes the notification in the language the phone shows; the manifest drops its static Korean description.
The phone resolves the core's explicit choice from the agents frame (its own browser language before the first one), and every sentence it shows comes from the catalogs. Failures and refusals stay a key plus values in the store so a shown line follows a language change; the page tells the service worker the words a notification needs.
An ESLint rule flags English JSX text and read attributes, another flags Korean, Chinese and Japanese characters in any product string, and a test keeps both from quietly going silent. The two device-label fallbacks the audit found read the catalog now, and the localization guide describes the phone, the push payload and the guard.
The e2e size budget main added holds the phone spec to its baseline: the language-follow and words-cache checks moved into the empty-list test.
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.
Closes #339 (마지막 PR: 웹 셸 #415, 데스크톱 호스트 #421은 머지됨)
Summary
폰 화면과 푸시 알림을 네 언어 catalog로 옮기고, 제품 문구가 catalog 밖에 새로 생기면
pnpm lint가 잡도록 했다. 동작, 레이아웃, 상태 모델은 그대로다.폰은 snapshot이 없어서 daemon이 core의 명시적 선택을
agentsframe의interface_language로 알려 주고, 선택이 없으면(그리고 첫 frame 전의 연결 화면은) 폰의 브라우저 언어를 쓴다.푸시 문장은 이제 daemon이 만들지 않는다. payload는 에이전트 제목, 장소, 상태(
needs_you/done)만 싣고, 서비스 워커가 페이지가 맡겨 둔 상태 단어(Cache API)와 장소를 합쳐서 알림을 그린다. 앱이 닫혀 있어도 맞는 언어로 나온다.캡션: 같은 폰의 목록과 대화 상세를 네 언어로 본 것(데스크톱 Settings에서 고른 core 언어를 폰이 따라간다). 에이전트 제목, 요청 줄, 대화 본문은 사용자 데이터라 번역되지 않는다.
Review
<Mac>와 연결-><Mac>에 연결,pane->페인,설정 > Mobile->설정 > 모바일,답장...->답장…. 영어 locale의 폰은 이전에 한국어였고 이제 catalog 영어다. 되돌리려면 catalog ko/en 값만 고치면 된다.manifest.webmanifest의 한국어description을 지웠다. 정적 파일이라 언어를 따라갈 수 없고, 설치 화면은 name을 쓴다.i18next/no-literal-string은 JSX 텍스트와 사람이 읽는 속성의 문장을,no-restricted-syntax는 제품 코드의 모든 문자열에서 한글·한자·가나를 잡는다. 허용 목록(키캡 이름, 제품 이름, 기호, 단위, 예시 경로)은web/eslint.config.js에 이유와 함께 있고 인라인 disable은 쓰지 않는다..tshelper가 반환하는 영어 문장은 이 가드가 보지 못한다(리뷰 몫,docs/LOCALIZATION.md에 적었다).hided/src/mobile/push.rs,web/public/m/sw.js- payload가body대신state/place를 싣는다. 단어를 한 번도 저장하지 못한 구독(이 변경 전에 만든 것)은 단어 없이 장소만 보인다. 영어를 지어내지 않는다.web/src/i18n/translator.tsx,client.tsx- 두 페이지가 공유하는 번역기를 셸 store 없이 분리했다. 폰 번들은 아직StartSheet가 끌어오는 공유 모듈(layer.ts,terminals.ts등)로 셸 store에 닿는다. 이전부터 그랬고 이 PR은 건드리지 않았다.hided/src/mobile/start.rs), 사람 전달 알림의 영어 문장(push_delivery, 지금은 장소 자리에 그대로 실린다), 셸의status_label·reason. core가 코드를 보내게 바꿀지 결정이 필요하다(Localize the web shell's remaining screens in four languages #415, #421과 같은 질문).Evidence
hidedmobile Rust 테스트 47건과 clippy/fmt(위 변경 기준),node --check sw.js,check-no-workstation-identity.sh.mobile.spec3건과interface-language.spec2건 통과 - 폰이 데스크톱 Settings에서 고른 core 언어(ko, 시스템으로 복귀)를 따라가고, 만료된 코드 안내가 ko 폰에서 한국어로 나오고, 푸시 payload에body가 없고state/place가 있으며, 서비스 워커의hide-phone-words캐시에 두 단어가 저장된다.guard.test.ts가 샘플 소스로 검증한다(영어 JSX 텍스트·속성, 세 문자 체계의 CJK, 허용 목록, 카탈로그 제외).startTargets.ts,search.ts, 이제 catalog)뿐이다. 남은 영어는 단축키 registry의title(검색 키이자commandTitle이 대체하는 영어 원본), 진단 문구, 에이전트 kind 이름이다. 린트는web/src전체에서 0건이다.vm시뮬레이션으로 확인했다.Verification record
base 523f89b(#421 머지), 커밋 3개(daemon·서비스 워커, 폰 페이지, 가드와 문서).
eslint-plugin-i18next를 web devDependency로 추가했다. 폰의 한국어 문구 목록은 위 Review에 있다. 이 PR이 #339의 마지막이다: #386(기반), #415(웹 셸), #421(데스크톱 호스트).