Skip to content

Commit 360d4a5

Browse files
Add jp translations (#898)
* add japanese translations * fix language selector error and change banner background image * add brand and base64checkbox translation * fix card title translations
1 parent 59103fc commit 360d4a5

File tree

13 files changed

+45
-21
lines changed

13 files changed

+45
-21
lines changed
File renamed without changes.

public/images/ja.diagram.png

3.6 MB
Loading

src/features/common/components/auth0-cta/auth0-cta.module.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,16 @@
192192
border-radius: .75rem;
193193
background-size: cover;
194194
background-position: 50%;
195-
background-image: url("/images/diagram.png");
196195
background-repeat: no-repeat;
197196

197+
:global(html[lang="en"]) & {
198+
background-image: url("/images/en.diagram.png");
199+
}
200+
201+
:global(html[lang="ja"]) & {
202+
background-image: url("/images/ja.diagram.png");
203+
}
204+
198205
@media #{$breakpoint-dimension-md} {
199206
border-bottom-left-radius: 12rem;
200207
grid-column: span 6;

src/features/common/components/footer/footer.component.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import React, { MouseEvent, useState } from "react";
3+
import React, { MouseEvent, useEffect, useState } from "react";
44
import Select, {
55
SingleValue,
66
OptionsOrGroups,
@@ -51,6 +51,12 @@ export const FooterComponent: React.FC<FooterComponentProps> = ({
5151
const [modalState, setModalState] = useState<ModalStateValues>(
5252
ModalStateValues.CLOSED
5353
);
54+
const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);
55+
56+
useEffect(() => {
57+
setPortalTarget(document.body);
58+
}, []);
59+
5460
const images = getBrandDictionary(languageCode);
5561

5662
const languagePathPrefix: string =
@@ -199,7 +205,7 @@ export const FooterComponent: React.FC<FooterComponentProps> = ({
199205
GroupBase<UiLanguageModel>
200206
>
201207
}
202-
menuPortalTarget={document.body}
208+
menuPortalTarget={portalTarget}
203209
classNamePrefix={"language-select"}
204210
isSearchable={false}
205211
placeholder={currentLanguage.label}

src/features/decoder/components/encoding-format-toggle-swith/encoding-format-toggle-switch.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import styles from "./encoding-format-toggle-switch.module.scss";
33
import { EncodingValues } from "@/features/common/values/encoding.values";
44
import { useDecoderStore } from "@/features/decoder/services/decoder.store";
55
import { getPickersUiDictionary } from "@/features/localization/services/ui-language-dictionary.service";
6-
import { Switch } from "react-aria-components";
76
import clsx from "clsx";
87
import { useEncoderStore } from "@/features/encoder/services/encoder.store";
98
import { dataTestidDictionary } from "@/libs/testing/data-testid.dictionary";
@@ -44,7 +43,7 @@ export const EncodingFormatToggleSwitchComponent: React.FC<
4443
<div className={clsx(styles.base_switch, isEncoding && styles.encoder)}>
4544
<div className={styles.container}>
4645
<div className={styles.label}>
47-
<span className={styles.fullLabel}>Base64URL Encoded?</span>
46+
<span className={styles.fullLabel}>{dictionary.base64checkbox.label}</span>
4847
</div>
4948
<label
5049
className={styles.switch__container}

src/features/decoder/components/jwt-input.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const JwtInputComponent: React.FC<JwtInputComponentProps> = ({
7272
isSelected={autoFocusEnabled}
7373
onChange={(e) => handleCheckboxChange(e)}
7474
>
75-
<span className={styles.checkbox__label}>Enable auto-focus</span>
75+
<span className={styles.checkbox__label}>{dictionary.autoFocusLabel}</span>
7676
</CheckboxComponent>
7777
</div>
7878
<CardComponent

src/features/localization/dictionaries/home/en.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export const enHomeDictionary: HomeDictionaryModel = {
8181
title: "JSON Web Token (JWT)",
8282
compactTitle: "JWT",
8383
successMessage: "Valid JWT",
84+
autoFocusLabel: "Enable auto-focus",
8485
},
8586
decodedHeader: {
8687
title: "Decoded Header",
@@ -170,7 +171,7 @@ export const enHomeDictionary: HomeDictionaryModel = {
170171
},
171172
encodedJwt: {
172173
title: "Encoded JWT",
173-
heading: "JWT Signature"
174+
heading: "JWT Signature",
174175
},
175176
},
176177
};

src/features/localization/dictionaries/home/ja.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const jaHomeDictionary: HomeDictionaryModel = {
8080
title: "JSON Web Token (JWT)",
8181
compactTitle: "JWT",
8282
successMessage: "有効なJWT",
83+
autoFocusLabel: "オートフォーカスを有効にする",
8384
},
8485
decodedHeader: {
8586
title: "デコードされたヘッダー",
@@ -141,18 +142,18 @@ export const jaHomeDictionary: HomeDictionaryModel = {
141142
label: "ヘッダー、ペイロード、署名サンプルジェネレーター",
142143
},
143144
headerEditor: {
144-
title: "ヘッダー:アルゴリズムとトークンタイプ",
145+
title: "アルゴリズムとトークンタイプ",
145146
compactTitle: "ヘッダー",
146147
successMessage: "有効なヘッダー",
147148
},
148149
payloadEditor: {
149-
title: "ペイロード:データ",
150+
title: "データ",
150151
compactTitle: "ペイロード",
151152
successMessage: "有効なペイロード",
152153
},
153154
signatureEditor: {
154155
title: {
155-
secret: "JWTに署名:シークレット",
156+
secret: "シークレット",
156157
privateKey: "JWTに署名:秘密鍵",
157158
},
158159
compactTitle: {

src/features/localization/dictionaries/images/ja.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
import { BrandDictionaryModel } from "../../models/brand-dictionary.model";
22

33
export const jaBrandDictionary: BrandDictionaryModel = {
4-
alertMessage: "SVG copied to clipboard",
5-
tooltip: "Right-click or long-press for logo options",
4+
alertMessage: "SVG がクリップボードにコピーされました",
5+
tooltip: "右クリックまたは長押し (ロゴオプション)",
66
menu: {
77
brand: {
8-
label: "Brand",
8+
label: "ブランド",
99
svg: {
10-
copyLabel: "Copy Logo SVG",
11-
downloadLabel: "Download Logo",
10+
copyLabel: "ロゴ SVG をコピー",
11+
downloadLabel: "ロゴをダウンロード",
1212
},
1313
symbol: {
14-
copyLabel: "Copy Symbol SVG",
15-
downloadLabel: "Download Symbol",
14+
copyLabel: "シンボル SVG をコピー",
15+
downloadLabel: "シンボルをダウンロード",
1616
},
1717
wordmark: {
18-
copyLabel: "Copy Wordmark SVG",
19-
downloadLabel: "Download Wordmark",
18+
copyLabel: "ワードマーク SVG をコピー",
19+
downloadLabel: "ワードマークをダウンロード",
2020
},
2121
},
2222
tools: {
23-
label: "Tools",
23+
label: "ツール",
2424
items: [
2525
{ label: "Passkeys Playground", url: "https://learnpasskeys.io" },
2626
{ label: "WebAuthn Playground", url: "https://webauthn.me" },
2727
{ label: "OIDC Playground", url: "https://openidconnect.net" },
28-
{ label: "SAML Tool", url: "https://samltool.io" },
28+
{ label: "SAMLツール", url: "https://samltool.io" },
2929
],
3030
},
3131
},

src/features/localization/dictionaries/ui/pickers/en.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ export const enPickersUiDictionary: PickersUiDictionaryModel = {
2424
privateKeyFormatPicker: {
2525
label: "Private Key Format",
2626
},
27+
base64checkbox: {
28+
label: "Base64URL Encoded",
29+
},
2730
};

0 commit comments

Comments
 (0)