Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
Binary file added public/images/ja.diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,16 @@
border-radius: .75rem;
background-size: cover;
background-position: 50%;
background-image: url("/images/diagram.png");
background-repeat: no-repeat;

:global(html[lang="en"]) & {
background-image: url("/images/en.diagram.png");
}

:global(html[lang="ja"]) & {
background-image: url("/images/ja.diagram.png");
}

@media #{$breakpoint-dimension-md} {
border-bottom-left-radius: 12rem;
grid-column: span 6;
Expand Down
10 changes: 8 additions & 2 deletions src/features/common/components/footer/footer.component.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import React, { MouseEvent, useState } from "react";
import React, { MouseEvent, useEffect, useState } from "react";
import Select, {
SingleValue,
OptionsOrGroups,
Expand Down Expand Up @@ -51,6 +51,12 @@ export const FooterComponent: React.FC<FooterComponentProps> = ({
const [modalState, setModalState] = useState<ModalStateValues>(
ModalStateValues.CLOSED
);
const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);

useEffect(() => {
setPortalTarget(document.body);
}, []);

const images = getBrandDictionary(languageCode);

const languagePathPrefix: string =
Expand Down Expand Up @@ -199,7 +205,7 @@ export const FooterComponent: React.FC<FooterComponentProps> = ({
GroupBase<UiLanguageModel>
>
}
menuPortalTarget={document.body}
menuPortalTarget={portalTarget}
classNamePrefix={"language-select"}
isSearchable={false}
placeholder={currentLanguage.label}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import styles from "./encoding-format-toggle-switch.module.scss";
import { EncodingValues } from "@/features/common/values/encoding.values";
import { useDecoderStore } from "@/features/decoder/services/decoder.store";
import { getPickersUiDictionary } from "@/features/localization/services/ui-language-dictionary.service";
import { Switch } from "react-aria-components";
import clsx from "clsx";
import { useEncoderStore } from "@/features/encoder/services/encoder.store";

Expand Down Expand Up @@ -43,7 +42,7 @@ export const EncodingFormatToggleSwitchComponent: React.FC<
<div className={clsx(styles.base_switch, isEncoding && styles.encoder)}>
<div className={styles.container}>
<div className={styles.label}>
<span className={styles.fullLabel}>Base64URL Encoded?</span>
<span className={styles.fullLabel}>{dictionary.base64checkbox.label}</span>
</div>
<label className={styles.switch__container}>
<input
Expand Down
2 changes: 1 addition & 1 deletion src/features/decoder/components/jwt-input.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const JwtInputComponent: React.FC<JwtInputComponentProps> = ({
isSelected={autoFocusEnabled}
onChange={(e) => handleCheckboxChange(e)}
>
<span className={styles.checkbox__label}>Enable auto-focus</span>
<span className={styles.checkbox__label}>{dictionary.autoFocusLabel}</span>
</CheckboxComponent>
</div>
<CardComponent
Expand Down
3 changes: 2 additions & 1 deletion src/features/localization/dictionaries/home/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const enHomeDictionary: HomeDictionaryModel = {
title: "JSON Web Token (JWT)",
compactTitle: "JWT",
successMessage: "Valid JWT",
autoFocusLabel: "Enable auto-focus",
},
decodedHeader: {
title: "Decoded Header",
Expand Down Expand Up @@ -170,7 +171,7 @@ export const enHomeDictionary: HomeDictionaryModel = {
},
encodedJwt: {
title: "Encoded JWT",
heading: "JWT Signature"
heading: "JWT Signature",
},
},
};
7 changes: 4 additions & 3 deletions src/features/localization/dictionaries/home/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const jaHomeDictionary: HomeDictionaryModel = {
title: "JSON Web Token (JWT)",
compactTitle: "JWT",
successMessage: "有効なJWT",
autoFocusLabel: "オートフォーカスを有効にする",
},
decodedHeader: {
title: "デコードされたヘッダー",
Expand Down Expand Up @@ -141,18 +142,18 @@ export const jaHomeDictionary: HomeDictionaryModel = {
label: "ヘッダー、ペイロード、署名サンプルジェネレーター",
},
headerEditor: {
title: "ヘッダー:アルゴリズムとトークンタイプ",
title: "アルゴリズムとトークンタイプ",
compactTitle: "ヘッダー",
successMessage: "有効なヘッダー",
},
payloadEditor: {
title: "ペイロード:データ",
title: "データ",
compactTitle: "ペイロード",
successMessage: "有効なペイロード",
},
signatureEditor: {
title: {
secret: "JWTに署名:シークレット",
secret: "シークレット",
privateKey: "JWTに署名:秘密鍵",
},
compactTitle: {
Expand Down
22 changes: 11 additions & 11 deletions src/features/localization/dictionaries/images/ja.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
import { BrandDictionaryModel } from "../../models/brand-dictionary.model";

export const jaBrandDictionary: BrandDictionaryModel = {
alertMessage: "SVG copied to clipboard",
tooltip: "Right-click or long-press for logo options",
alertMessage: "SVG がクリップボードにコピーされました",
tooltip: "右クリックまたは長押し (ロゴオプション)",
menu: {
brand: {
label: "Brand",
label: "ブランド",
svg: {
copyLabel: "Copy Logo SVG",
downloadLabel: "Download Logo",
copyLabel: "ロゴ SVG をコピー",
downloadLabel: "ロゴをダウンロード",
},
symbol: {
copyLabel: "Copy Symbol SVG",
downloadLabel: "Download Symbol",
copyLabel: "シンボル SVG をコピー",
downloadLabel: "シンボルをダウンロード",
},
wordmark: {
copyLabel: "Copy Wordmark SVG",
downloadLabel: "Download Wordmark",
copyLabel: "ワードマーク SVG をコピー",
downloadLabel: "ワードマークをダウンロード",
},
},
tools: {
label: "Tools",
label: "ツール",
items: [
{ label: "Passkeys Playground", url: "https://learnpasskeys.io" },
{ label: "WebAuthn Playground", url: "https://webauthn.me" },
{ label: "OIDC Playground", url: "https://openidconnect.net" },
{ label: "SAML Tool", url: "https://samltool.io" },
{ label: "SAMLツール", url: "https://samltool.io" },
],
},
},
Expand Down
3 changes: 3 additions & 0 deletions src/features/localization/dictionaries/ui/pickers/en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ export const enPickersUiDictionary: PickersUiDictionaryModel = {
privateKeyFormatPicker: {
label: "Private Key Format",
},
base64checkbox: {
label: "Base64URL Encoded",
},
};
3 changes: 3 additions & 0 deletions src/features/localization/dictionaries/ui/pickers/ja.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ export const jaPickersUiDictionary: PickersUiDictionaryModel = {
privateKeyFormatPicker: {
label: "秘密鍵の形式",
},
base64checkbox: {
label: "Base64URLエンコード",
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface DecoderDictionaryModel {
title: string;
compactTitle: string;
successMessage: string;
autoFocusLabel: string;
};
exampleGenerator: {
label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ export interface PickersUiDictionaryModel {
privateKeyFormatPicker: {
label: string;
};
base64checkbox: {
label: string;
};
}