Last active
March 3, 2022 16:07
-
-
Save r3-yamauchi/f28335f2e7ef268c338cc5ffedb37163 to your computer and use it in GitHub Desktop.
aws-amplify-react の withAuthenticator HOC を日本語化する
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
import Amplify from 'aws-amplify'; | |
import aws_exports from './aws-exports'; | |
import { withAuthenticator } from 'aws-amplify-react'; | |
import { I18n } from 'aws-amplify'; | |
Amplify.configure(aws_exports); | |
const dict = { | |
'ja': { | |
'User does not exist.': "ユーザー名またはパスワードが正しくありません", | |
'Incorrect username or password.': "ユーザー名またはパスワードが正しくありません", | |
'Password did not conform with policy: Password not long enough': "パスワードが短すぎます", | |
'Invalid session for the user, session is expired.': "セッションが無効です", | |
'Password attempts exceeded': "パスワードを一定回数以上間違えたため、アカウントを無効にしました", | |
'Account recovery requires verified contact information': "アカウントを復旧するには連絡先の確認が必要です", | |
'Back to Sign In': "サインイン画面へ戻る", | |
'Change Password': "パスワード変更", | |
'Change': "変更", | |
'Code': "確認コード", | |
'Confirm a Code': "コードを確認する", | |
'Confirm Sign In': "確認", | |
'Confirm Sign Up': "サインアップ", | |
'Confirm': "確認", | |
'Email': "メールアドレス", | |
'Forgot Password': "パスワードをお忘れの場合", | |
'Loading...': "ロード中...", | |
'New Password': "新しいパスワード", | |
'No MFA': "MFAなし", | |
'Password': "パスワード", | |
'Phone Number': "電話番号", | |
'Pick a File': "ファイルを選択する", | |
'Resend a Code': "確認コードを再送する", | |
'Resend Code': "確認コードを再送する", | |
'Select MFA Type': "MFAタイプの選択", | |
'Select your preferred MFA Type': "MFAタイプを選択してください", | |
'Sign In Account': "サインイン", | |
'Sign In': "サインイン", | |
'Sign Out': "サインアウト", | |
'Sign Up Account': "サインアップ", | |
'Sign Up': "サインアップ", | |
'Skip': "スキップする", | |
'Submit': "保存", | |
'Username': "ユーザー名", | |
'Verify Contact': "確認", | |
'Verify': "確認する" | |
} | |
}; | |
I18n.putVocabularies(dict); | |
I18n.setLanguage('ja'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment