[feat] solution/frontend: 구글 버튼을 로그인 관문에도 · 문구 한글화
"구글 로그인 버튼이 없다" 는 지적이 맞았다. 버튼을 LoginPage·SignupPage 에만 붙여 뒀는데,
이 앱에서 사장님이 실제로 로그인 화면을 만나는 자리는 **에디터 진입 관문**(EditorSignInGate →
SignInForm)이다. 정작 거기엔 없었다.
- features/auth/SignInForm: 구글 버튼 추가. 관문·로그인 화면이 같은 폼을 쓰므로 한 곳만 고치면 된다
- lib/googleIdentity: 스크립트를 ?hl=ko 로 받는다. renderButton 의 locale 옵션은 안 먹었다 —
'ko'·'ko_KR' 둘 다 'Continue with Google' 이 그대로 나왔다(실측)
- 버튼 문구는 signin_with('Google 계정으로 로그인'). 가입 화면만 signup_with 로 둔다.
문구 자체는 고를 수 없다 — 구글 브랜드 가이드라 GIS 가 주는 번역을 그대로 쓴다
브라우저 확인(localhost:80): 로그인 화면에 'Google 계정으로 로그인' 한글 노출.
tsc·eslint·vite build 통과.
This commit is contained in:
1 parent
d376677b86
commit
128596fc74
4 files changed
+45
-5
No files matched your search
@@ -11,7 +11,7 @@ import {GOOGLE_CLIENT_ID, isGoogleLoginEnabled, loadGoogleIdentity} from '@/lib/
|
||||
*/
|
||||
export function GoogleSignInButton({
|
||||
onCredential,
|
||||
text = 'continue_with',
|
||||
text = 'signin_with',
|
||||
}: {
|
||||
onCredential: (credential: string) => void;
|
||||
text?: 'continue_with' | 'signin_with' | 'signup_with';
|
||||
@@ -46,7 +46,9 @@ export function GoogleSignInButton({
|
||||
size: 'large',
|
||||
shape: 'rectangular',
|
||||
text,
|
||||
locale: 'ko',
|
||||
// ★ 'ko' 로는 영문('Continue with Google')이 그대로 나왔다. 지역까지 줘야 한국어다.
|
||||
// 문구는 우리가 못 정한다 — 구글 브랜드 가이드라 GIS 가 주는 번역을 그대로 쓴다.
|
||||
locale: 'ko_KR',
|
||||
logo_alignment: 'center',
|
||||
// GIS 는 숫자 px 만 받는다(최대 400). 컨테이너 폭이 잡히기 전이면 최소값으로 그린다.
|
||||
width: holder.current.offsetWidth || 320,
|
||||
|
||||
Reference in new issue
Block a user