Merge pull request #365 from emesan22/master

[feature] Japanese translation
This commit is contained in:
MathieuG-P
2023-12-02 01:22:07 +01:00
committed by GitHub
10 changed files with 1075 additions and 52 deletions
@@ -54,6 +54,7 @@ import { VolumeDownIcon } from "./icons/volume-down-icon.component";
import { GermanIcon } from "./flags/german-icon.component";
import { RussianIcon } from "./flags/russian-icon.component";
import { ChineseIcon } from "./flags/chinese-icon.component";
import { JapanIcon } from "./flags/japan-icon.component";
import { MSModelType } from "shared/models/models/model-saber.model";
import { ModelTypeAvatarIcon } from "./icons/model-type-avatar-icon.component";
import { ModelTypeSaberIcon } from "./icons/model-type-saber-icon.component";
@@ -64,7 +65,7 @@ import { EyeCrossIcon } from "./icons/eye-cross-icon.component";
import { ShortcutIcon } from "./icons/shortcut-icon.component";
import { BackupRestoreIcon } from "./icons/backup-restore-icon.component";
export type BsmIconType = BsvMapCharacteristic | MSModelType | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag");
export type BsmIconType = BsvMapCharacteristic | MSModelType | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "ja-JP-flag");
export const BsmIcon = memo(({ className, icon, style }: { className?: string; icon: BsmIconType; style?: CSSProperties }) => {
// TODO : Very ugly very messy, need to find a better way to do this
@@ -121,6 +122,9 @@ export const BsmIcon = memo(({ className, icon, style }: { className?: string; i
if (icon === "zh-CN-flag") {
return <ChineseIcon className={className} style={style} />;
}
if (icon === "ja-JP-flag") {
return <JapanIcon className={className} style={style} />;
}
if (icon === "task") {
return <TaskIcon className={className} style={style} />;
}
@@ -0,0 +1,22 @@
import { CSSProperties } from "react";
export function JapanIcon(props: { className?: string; style?: CSSProperties }) {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="71px" height="48px" viewBox="0 0 71 48" version="1.1" className={props.className} style={props.style}>
<defs />
<g id="Flags" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd" transform="translate(-239,-805)">
<g transform="translate(70,70)" fillRule="nonzero" id="Russian">
<g transform="translate(169,735)">
<g id="Bolivia-9">
<path d="M 0.5 7 L 0.5 41 L 70.5 41 L 70.5 7 C 70.5 3.3 67.5 0.4 63.9 0.4 L 7.2 0.4 C 5.4 0.4 3.7 1.1 2.5 2.3 C 1.2 3.5 0.5 5.2 0.5 7 Z" id="Shape" fill="#ffffff" /> <polygon id="Shape" fill="#fff" points="0.5,33.0 70.5,33.0 70.5,15.0 0.5,15.0" />
<path d="M 0.5 40.8 C 0.5 44.4 3.5 47.4 7.2 47.4 L 63.9 47.4 C 67.5 47.4 70.5 44.4 70.5 40.8 L 70.5 31.8 L 0.5 31.8 L 0.5 40.8 Z" id="Shape" fill="#ffffff" />
<circle cx="35.5" cy="24" r="15" fill="#ec5565" />
</g>
</g>
</g>
</g>
</svg>
);
}
export default JapanIcon;
@@ -3,7 +3,7 @@ export const defaultConfiguration: { [key in DefaultConfigKey]: any } = {
"second-color": "#ff4444",
theme: "os",
language: window.navigator.language.length <= 2 ? `${window.navigator.language}-${window.navigator.language.toLocaleUpperCase()}` : window.navigator.language,
supported_languages: ["en-US", "en-EN", "fr-FR", "es-ES", "de-DE", "ru-RU","zh-CN"],
supported_languages: ["en-US", "en-EN", "fr-FR", "es-ES", "de-DE", "ru-RU", "zh-CN", "ja-JP"],
default_mods: ["SongCore", "WhyIsThereNoLeaderboard", "BeatSaverDownloader", "BeatSaverVoting", "PlaylistManager"],
"default-shared-folders": [
window.electron.path.join("Beat Saber_Data", "CustomLevels"),