mirror of https://github.com/hykilpikonna/AquaDX
[+] More i18n
parent
ed955150df
commit
b77da0f143
|
@ -82,6 +82,33 @@ export const EN_REF_HOME = {
|
|||
'home.join-discord-description': 'Join our Discord server to chat with other players and get help.',
|
||||
'home.setup': 'Setup Connection',
|
||||
'home.setup-description': 'If you own a cab or arcade setup, begin setting up the connection.',
|
||||
'home.linkcard.cards': "Your Cards",
|
||||
'home.linkcard.description': "Here are the cards you have linked to your account",
|
||||
'home.linkcard.account-card': "Account Card",
|
||||
'home.linkcard.registered': "Registered",
|
||||
'home.linkcard.lastused': "Last used",
|
||||
'home.linkcard.enter-info': "Please enter the following information",
|
||||
'home.linkcard.access-code': "The 20-digit access code on the back of your card. (If it doesn't work, please try scanning your card in game and enter the access code shown on screen)",
|
||||
'home.linkcard.enter-sn1': "Download the NFC Tools app on your phone",
|
||||
'home.linkcard.enter-sn2': "and scan your card. Then, enter the Serial Number.",
|
||||
'home.linkcard.link': "Link",
|
||||
'home.linkcard.data-conflict': "Data Conflict",
|
||||
'home.linkcard.name': "Name",
|
||||
'home.linkcard.rating': "Rating",
|
||||
'home.linkcard.last-login': "Last Login",
|
||||
'home.linkcard.linked-own': "This card is already linked to your account",
|
||||
'home.linkcard.linked-another': "This card is already linked to another account",
|
||||
'home.linkcard.notfound': "Card not found",
|
||||
'home.linkcard.unlink': "Unlink Card",
|
||||
'home.linkcard.unlink-notice': "Are you sure you want to unlink this card?",
|
||||
'home.setup.welcome': "Welcome! If you own an arcade cabinet or game setup, please follow the instructions below to set up the connection with AquaDX.",
|
||||
'home.setup.blockquote': "We assume that you already have the required files and can run the game (e.g. ROM and segatools) that come with the cabinet or game setup. If not, please contact the seller of your device for the required files, as we will not provide them for copyright reasons.",
|
||||
'home.setup.get': "Get started",
|
||||
'home.setup.edit': "Please edit your segatools.ini file and modify the following lines",
|
||||
'home.setup.test': "Then, after you restart the game, you should be able to connect to AquaDX. Please verify that the network tests are all GOOD in the test menu.",
|
||||
'home.setup.ask': "If you have any questions, please ask in our",
|
||||
'home.setup.support': "server",
|
||||
'home.setup.keychip-tips': "This is your unique keychip, do not share it with anyone",
|
||||
}
|
||||
|
||||
export const EN_REF_SETTINGS = {
|
||||
|
@ -101,6 +128,16 @@ export const EN_REF_SETTINGS = {
|
|||
'settings.fields.waccaInfiniteWp.desc': 'Set WP to 999999',
|
||||
'settings.fields.waccaAlwaysVip.name': 'Wacca: Always VIP',
|
||||
'settings.fields.waccaAlwaysVip.desc': 'Set VIP expiration date to 2077-01-01',
|
||||
'settings.profile.picture': 'Profile Picture',
|
||||
'settings.profile.upload-new': 'Upload New',
|
||||
'settings.profile.save': 'Save',
|
||||
'settings.profile.name': 'Display Name',
|
||||
'settings.profile.username': 'Username',
|
||||
'settings.profile.password': 'Password',
|
||||
'settings.profile.location': 'Location',
|
||||
'settings.profile.bio': 'Bio',
|
||||
'settings.profile.unset': 'Unset',
|
||||
'settings.profile.unchanged': 'Unchanged',
|
||||
}
|
||||
|
||||
export const EN_REF = { ...EN_REF_USER, ...EN_REF_Welcome, ...EN_REF_GENERAL,
|
||||
|
|
|
@ -89,8 +89,35 @@ const zhHome: typeof EN_REF_HOME = {
|
|||
'home.link-cards-description':'绑定游戏数据卡 (Amusement IC 或 Aime 卡) 后才可以访问游戏存档哦',
|
||||
'home.join-discord': '加入 Discord',
|
||||
'home.join-discord-description': '加入我们的 Discord 群,与其他玩家聊天、获取帮助',
|
||||
'home.setup': '连接私服',
|
||||
'home.setup': '连接到 AquaDX',
|
||||
'home.setup-description': '如果您有街机框体或者手台,点击这里设置服务器的连接',
|
||||
'home.linkcard.cards': "已绑卡片",
|
||||
'home.linkcard.description': "这些是您绑定到帐户的卡",
|
||||
'home.linkcard.account-card': "账户卡",
|
||||
'home.linkcard.registered': "注册于",
|
||||
'home.linkcard.lastused': "上次使用",
|
||||
'home.linkcard.enter-info': "请输入以下信息",
|
||||
'home.linkcard.access-code': "卡背面的20位卡号 (如果没有, 请尝试在游戏中扫描您的卡, 并输入屏幕上显示的卡号)",
|
||||
'home.linkcard.enter-sn1': "在您的手机",
|
||||
'home.linkcard.enter-sn2': "上下载 NFC Tools 并扫描您的卡。然后输入显示的 SN 号。",
|
||||
'home.linkcard.link': "绑定",
|
||||
'home.linkcard.data-conflict': "卡号冲突",
|
||||
'home.linkcard.name': "名称",
|
||||
'home.linkcard.rating': "Rating",
|
||||
'home.linkcard.last-login': "上次登录",
|
||||
'home.linkcard.linked-own': "此卡已链接到您的帐户",
|
||||
'home.linkcard.linked-another': "此卡已链接到其他用户",
|
||||
'home.linkcard.notfound': "找不到卡",
|
||||
'home.linkcard.unlink': "取消链接",
|
||||
'home.linkcard.unlink-notice': "你确定要取消此卡的链接吗?",
|
||||
'home.setup.welcome': "欢迎! 如果您有街机框体或者手台, 请按照以下说明设置以连接到 AquaDX.",
|
||||
'home.setup.blockquote': "我们假设您已经拥有所需的文件, 并且可以启动机台或手台附带的游戏 (例如 ROM 和 segatools )。如果没有, 请联系您设备的卖家以获取所需的文件, 因为出于版权原因, 我们不会提供这些文件。",
|
||||
'home.setup.get': "开始",
|
||||
'home.setup.edit': "请打开您的 segatools.ini 文件并修改以下行",
|
||||
'home.setup.test': "在您重新启动游戏后, 应该能够连接到 AquaDX。可以验证测试菜单中的网络测试测试连接是否全部良好。",
|
||||
'home.setup.ask': "如果您有任何问题, 请加入我们的",
|
||||
'home.setup.support': "以获取支持",
|
||||
'home.setup.keychip-tips': "这是你的狗号, 不要与任何人分享",
|
||||
}
|
||||
|
||||
const zhSettings: typeof EN_REF_SETTINGS = {
|
||||
|
@ -109,6 +136,16 @@ const zhSettings: typeof EN_REF_SETTINGS = {
|
|||
'settings.fields.waccaInfiniteWp.desc': '将 WP 设置为 999999',
|
||||
'settings.fields.waccaAlwaysVip.name': 'Wacca: 永久会员',
|
||||
'settings.fields.waccaAlwaysVip.desc': '将 VIP 到期时间设置为 2077-01-01',
|
||||
'settings.profile.picture': '头像',
|
||||
'settings.profile.upload-new': '上传',
|
||||
'settings.profile.save': '保存',
|
||||
'settings.profile.name': '昵称',
|
||||
'settings.profile.username': '用户名',
|
||||
'settings.profile.password': '密码',
|
||||
'settings.profile.location': '位置',
|
||||
'settings.profile.bio': '简介',
|
||||
'settings.profile.unset': '未设置',
|
||||
'settings.profile.unchanged': '未更改',
|
||||
}
|
||||
|
||||
export const ZH = { ...zhUser, ...zhWelcome, ...zhGeneral,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
import moment from "moment"
|
||||
import Icon from "@iconify/svelte";
|
||||
import StatusOverlays from "../../components/StatusOverlays.svelte";
|
||||
import { t } from "../../libs/i18n";
|
||||
|
||||
// State
|
||||
let state: 'ready' | 'linking-AC' | 'linking-SN' | 'loading' = "loading"
|
||||
|
@ -55,7 +56,7 @@
|
|||
|
||||
// Check if this card is already linked in the account
|
||||
if (me?.cards?.some(c => formatLUID(c.luid, c.isGhost).toLowerCase() === id.toLowerCase())) {
|
||||
setError("This card is already linked to your account", type)
|
||||
setError(t('home.linkcard.linked-own'), type)
|
||||
state = "ready"
|
||||
return
|
||||
}
|
||||
|
@ -63,7 +64,7 @@
|
|||
// First, lookup the card summary
|
||||
const card = (await CARD.summary(id).catch(e => {
|
||||
// If card is not found, create a card and link it
|
||||
if (e.message === "Card not found") {
|
||||
if (e.message === t('home.linkcard.notfound')) {
|
||||
doLink(id, "")
|
||||
return
|
||||
}
|
||||
|
@ -76,7 +77,7 @@
|
|||
|
||||
// Check if it's already linked
|
||||
if (card.card.linked) {
|
||||
setError("This card is already linked to another account", type)
|
||||
setError(t('home.linkcard.linked-another'), type)
|
||||
state = "ready"
|
||||
return
|
||||
}
|
||||
|
@ -143,8 +144,8 @@
|
|||
|
||||
async function unlink(card: Card) {
|
||||
showConfirm = {
|
||||
title: "Unlink Card",
|
||||
message: "Are you sure you want to unlink this card?",
|
||||
title: t('home.linkcard.unlink'),
|
||||
message: t('home.linkcard.unlink-notice'),
|
||||
confirm: async () => {
|
||||
await CARD.unlink(card.luid)
|
||||
await updateMe()
|
||||
|
@ -211,16 +212,16 @@
|
|||
</script>
|
||||
|
||||
<div class="link-card">
|
||||
<h2>Your Cards</h2>
|
||||
<p>Here are the cards you have linked to your account:</p>
|
||||
<h2>{t('home.linkcard.cards')}</h2>
|
||||
<p>{t('home.linkcard.description')}:</p>
|
||||
|
||||
{#if me}
|
||||
<div class="existing-cards" transition:slide>
|
||||
{#each me.cards as card (card.luid)}
|
||||
<div class:ghost={card.isGhost} class='existing card' transition:fade|global>
|
||||
<span class="type">{card.isGhost ? "Account Card" : cardType(card.luid)}</span>
|
||||
<span class="register">Registered: {moment(card.registerTime).format("YYYY MMM DD")}</span>
|
||||
<span class="last">Last used: {moment(card.accessTime).format("YYYY MMM DD")}</span>
|
||||
<span class="type">{card.isGhost ? "{t('home.linkcard.account-card')}" : cardType(card.luid)}</span>
|
||||
<span class="register">{t('home.linkcard.registered')}: {moment(card.registerTime).format("YYYY MMM DD")}</span>
|
||||
<span class="last">{t('home.linkcard.lastused')}: {moment(card.accessTime).format("YYYY MMM DD")}</span>
|
||||
<div/>
|
||||
<span class="id">{formatLUID(card.luid, card.isGhost)}</span>
|
||||
{#if !card.isGhost}
|
||||
|
@ -231,12 +232,11 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
<h2>Link Card</h2>
|
||||
<p>Please enter the following information:</p>
|
||||
<h2>{t('home.link-card')}</h2>
|
||||
<p>{t('home.linkcard.enter-info')}:</p>
|
||||
{#if !inputSN}
|
||||
<div out:slide={{ duration: 250 }}>
|
||||
<p>The 20-digit access code on the back of your card.
|
||||
(If it doesn't work, please try scanning your card in game and enter the access code shown on screen)</p>
|
||||
<p>{t('home.linkcard.access-code')}</p>
|
||||
<label>
|
||||
<!-- DO NOT change the order of bind:value and on:input. Their order determines the order of reactivity -->
|
||||
<input placeholder="e.g. 5200 1234 5678 9012 3456"
|
||||
|
@ -249,7 +249,7 @@
|
|||
on:input={inputACChange}
|
||||
class:error={inputAC && (!inputACRegex.test(inputAC) || errorAC)}>
|
||||
{#if inputAC.length > 0}
|
||||
<button transition:slide={{axis: 'x'}} on:click={() => {link('AC');inputAC=''}}>Link</button>
|
||||
<button transition:slide={{axis: 'x'}} on:click={() => {link('AC');inputAC=''}}>{t('home.linkcard.link')}</button>
|
||||
{/if}
|
||||
</label>
|
||||
{#if errorAC}
|
||||
|
@ -260,10 +260,10 @@
|
|||
|
||||
{#if !inputAC}
|
||||
<div out:slide={{ duration: 250 }}>
|
||||
<p>Download the NFC Tools app on your phone
|
||||
<p>{t('home.linkcard.enter-sn1')}
|
||||
(<a href="https://play.google.com/store/apps/details?id=com.wakdev.wdnfc">Android</a> /
|
||||
<a href="https://apps.apple.com/us/app/nfc-tools/id1252962749">Apple</a>) and scan your card.
|
||||
Then, enter the Serial Number.
|
||||
<a href="https://apps.apple.com/us/app/nfc-tools/id1252962749">Apple</a>)
|
||||
{t('home.linkcard.enter-sn2')}
|
||||
</p>
|
||||
<label>
|
||||
<input placeholder="e.g. 01:2E:1A:2B:3C:4D:5E:6F"
|
||||
|
@ -276,7 +276,7 @@
|
|||
on:input={inputSNChange}
|
||||
class:error={inputSN && (!inputSNRegex.test(inputSN) || errorSN)}>
|
||||
{#if inputSN.length > 0}
|
||||
<button transition:slide={{axis: 'x'}} on:click={() => {link('SN'); inputSN = ''}}>Link</button>
|
||||
<button transition:slide={{axis: 'x'}} on:click={() => {link('SN'); inputSN = ''}}>{t('home.linkcard.link')}</button>
|
||||
{/if}
|
||||
</label>
|
||||
{#if errorSN}
|
||||
|
@ -288,28 +288,27 @@
|
|||
{#if conflictOld && conflictNew && me}
|
||||
<div class="overlay" transition:fade>
|
||||
<div>
|
||||
<h2>Data Conflict</h2>
|
||||
<p>The card contains data for {conflictGame}, which is already present on your account.
|
||||
Please choose the data you would like to keep</p>
|
||||
<h2>{t('home.linkcard.data-conflict')}</h2>
|
||||
<p></p>
|
||||
<div class="conflict-cards">
|
||||
<div class="old card clickable" on:click={() => linkConflictContinue('old')}
|
||||
role="button" tabindex="0" on:keydown={e => e.key === "Enter" && linkConflictContinue('old')}>
|
||||
<span class="type">Account Card</span>
|
||||
<span>Name: {conflictOld.name}</span>
|
||||
<span>Rating: {conflictOld.rating}</span>
|
||||
<span>Last Login: {moment(conflictOld.lastLogin).format("YYYY MMM DD")}</span>
|
||||
<span class="type">{t('home.linkcard.account-card')}</span>
|
||||
<span>{t('home.linkcard.name')}: {conflictOld.name}</span>
|
||||
<span>{t('home.linkcard.rating')}: {conflictOld.rating}</span>
|
||||
<span>{t('home.linkcard.last-login')}: {moment(conflictOld.lastLogin).format("YYYY MMM DD")}</span>
|
||||
<span class="id">{formatLUID(me.ghostCard.luid, true)}</span>
|
||||
</div>
|
||||
<div class="new card clickable" on:click={() => linkConflictContinue('new')}
|
||||
role="button" tabindex="0" on:keydown={e => e.key === "Enter" && linkConflictContinue('new')}>
|
||||
<span class="type">{cardType(conflictCardID)}</span>
|
||||
<span>Name: {conflictNew.name}</span>
|
||||
<span>Rating: {conflictNew.rating}</span>
|
||||
<span>Last Login: {moment(conflictNew.lastLogin).format("YYYY MMM DD")}</span>
|
||||
<span>{t('home.linkcard.name')}: {conflictNew.name}</span>
|
||||
<span>{t('home.linkcard.rating')}: {conflictNew.rating}</span>
|
||||
<span>{t('home.linkcard.last-login')}: {moment(conflictNew.lastLogin).format("YYYY MMM DD")}</span>
|
||||
<span class="id">{conflictCardID}</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="error" on:click={linkConflictCancel}>Cancel</button>
|
||||
<button class="error" on:click={linkConflictCancel}>{t('action.cancel')}</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
import type { AquaNetUser } from "../../libs/generalTypes";
|
||||
import { codeToHtml } from 'shiki'
|
||||
import { AQUA_CONNECTION, DISCORD_INVITE, FADE_IN, FADE_OUT } from "../../libs/config";
|
||||
import { t } from "../../libs/i18n";
|
||||
|
||||
let user: AquaNetUser
|
||||
let keychip: string;
|
||||
|
@ -29,7 +30,7 @@ default=${AQUA_CONNECTION}
|
|||
|
||||
[keychip]
|
||||
enable=1
|
||||
; This is your unique keychip, do not share it with anyone
|
||||
; ${t('home.setup.keychip-tips')}
|
||||
id=${keychip.slice(0, 4)}-${keychip.slice(4)}1337`.trim(), {
|
||||
lang: 'ini',
|
||||
theme: 'rose-pine',
|
||||
|
@ -41,27 +42,24 @@ id=${keychip.slice(0, 4)}-${keychip.slice(4)}1337`.trim(), {
|
|||
</script>
|
||||
|
||||
<div class="setup-instructions">
|
||||
<h2>Setup Connection</h2>
|
||||
<h2>{t('home.setup')}</h2>
|
||||
<p>
|
||||
Welcome! If you own an arcade cabinet or game setup,
|
||||
please follow the instructions below to set up the connection with AquaDX.
|
||||
{t('home.setup.welcome')}
|
||||
</p>
|
||||
<blockquote>
|
||||
We assume that you already have the required files and can run the game (e.g. ROM and segatools)
|
||||
that come with the cabinet or game setup.
|
||||
If not, please contact the seller of your device for the required files, as we will not provide them for copyright reasons.
|
||||
{t('home.setup.blockquote')}
|
||||
</blockquote>
|
||||
|
||||
{#if user}
|
||||
<div transition:slide>
|
||||
{#if !keychip && !keychipCode}
|
||||
<div class="no-margin" out:fade={FADE_OUT}>
|
||||
<button class="emp" on:click={getStarted}>Get started</button>
|
||||
<button class="emp" on:click={getStarted}>{t('home.setup.get')}</button>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="no-margin" in:fade={FADE_IN}>
|
||||
<p>
|
||||
Please edit your segatools.ini file and modify the following lines:
|
||||
{t('home.setup.edit')}:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
|
@ -69,10 +67,10 @@ id=${keychip.slice(0, 4)}-${keychip.slice(4)}1337`.trim(), {
|
|||
</div>
|
||||
|
||||
<p>
|
||||
Then, after you restart the game, you should be able to connect to AquaDX. Please verify that the network tests are all GOOD in the test menu.
|
||||
{t('home.setup.test')}
|
||||
</p>
|
||||
<p>
|
||||
If you have any questions, please ask in our <a href={DISCORD_INVITE}>Discord server</a>.
|
||||
{t('home.setup.ask')} <a href={DISCORD_INVITE}>Discord</a> {t('home.setup.support')}.
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -19,11 +19,11 @@
|
|||
const tabs = [ 'profile', 'game' ]
|
||||
|
||||
const profileFields = [
|
||||
[ 'displayName', "Display Name" ],
|
||||
[ 'username', "Username" ],
|
||||
[ 'password', "Password" ],
|
||||
[ 'profileLocation', "Location" ],
|
||||
[ 'profileBio', "Bio" ],
|
||||
[ 'displayName', t('settings.profile.name') ],
|
||||
[ 'username', t('settings.profile.username') ],
|
||||
[ 'password', t('settings.profile.password') ],
|
||||
[ 'profileLocation', t('settings.profile.location') ],
|
||||
[ 'profileBio', t('settings.profile.bio') ],
|
||||
]
|
||||
|
||||
let gameFields: GameOption[] = []
|
||||
|
@ -90,7 +90,7 @@
|
|||
<!-- Tab 0: Profile settings -->
|
||||
<div out:fade={FADE_OUT} in:fade={FADE_IN} class="fields">
|
||||
<div class="field">
|
||||
<label for="profile-upload">Profile Picture</label>
|
||||
<label for="profile-upload">{t('settings.profile.picture')}</label>
|
||||
<div>
|
||||
{#if me && me.profilePicture}
|
||||
<div on:click={() => pfpField.click()} on:keydown={e => e.key === 'Enter' && pfpField.click()}
|
||||
|
@ -99,7 +99,7 @@
|
|||
</div>
|
||||
{:else}
|
||||
<button on:click={() => pfpField.click()}>
|
||||
Upload New
|
||||
{t('settings.profile.upload-new')}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
@ -113,13 +113,13 @@
|
|||
<div>
|
||||
<input id={field} type="text" use:passwordAction={field === 'password'}
|
||||
bind:value={values[i]} on:input={() => changed = [...changed, field]}
|
||||
placeholder={field === 'password' ? 'Unchanged' : 'Unset'}/>
|
||||
placeholder={field === 'password' ? t('settings.profile.unchanged') : t('settings.profile.unset')}/>
|
||||
{#if changed.includes(field) && values[i]}
|
||||
<button transition:slide={{axis: 'x'}} on:click={() => submit(field, values[i])}>
|
||||
{#if submitting === field}
|
||||
<Icon icon="line-md:loading-twotone-loop" />
|
||||
{:else}
|
||||
Save
|
||||
{t('settings.profile.save')}
|
||||
{/if}
|
||||
</button>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in New Issue