Skip to content

Commit

Permalink
Update locales
Browse files Browse the repository at this point in the history
  • Loading branch information
mantou132 committed Nov 27, 2023
1 parent 6052318 commit bd5b7c4
Show file tree
Hide file tree
Showing 41 changed files with 460 additions and 427 deletions.
2 changes: 1 addition & 1 deletion packages/webapp/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class AppRootElement extends GemElement {
<dy-modal
.header=${i18n.get('settings.title')}
.disableDefaultOKBtn=${true}
.cancelText=${i18n.get('close')}
.cancelText=${i18n.get('global.close')}
.open=${!!configure.settingsState}
@close=${toggleSettingsState}
>
Expand Down
2 changes: 2 additions & 0 deletions packages/webapp/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export const isTauriWinApp = navigator.appName === 'nesbox-windows';
export const isApp = window.__TAURI__ || mediaQuery.isPWA || isMtApp;
export const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);

export const canonicalOrigin = 'https://nesbox.xianqiao.wang';
export const corsOrigin = 'https://files.xianqiao.wang';
export const githubUrl = 'https://github.com/mantou132/nesbox';
export const githubIssue = `${githubUrl}/issues`;
export const githubRelease = `${githubUrl}/releases`;
Expand Down
28 changes: 14 additions & 14 deletions packages/webapp/src/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ScGameKind, ScGameSeries } from 'src/generated/graphql';
export const gameKindList: { value: ScGameKind | ''; label: LocaleKey }[] = [
{
value: '',
label: 'noLimit',
label: 'global.noLimit',
},
{
value: ScGameKind.Act,
Expand Down Expand Up @@ -45,55 +45,55 @@ export const gameKindMap = convertToMap<ElementOf<typeof gameKindList>, LocaleKe
export const gameSeriesList: { value: ScGameSeries | ''; label: LocaleKey }[] = [
{
value: '',
label: 'noLimit',
label: 'global.noLimit',
},
{
value: ScGameSeries.Mario,
label: 'gameSeriesMario',
label: 'enum.gameSeries.mario',
},
{
value: ScGameSeries.Contra,
label: 'gameSeriesContra',
label: 'enum.gameSeries.contra',
},
{
value: ScGameSeries.DoubleDragon,
label: 'gameSeriesDoubleDragon',
label: 'enum.gameSeries.doubleDragon',
},
{
value: ScGameSeries.MegaMan,
label: 'gameSeriesMegaMan',
label: 'enum.gameSeries.megaMan',
},
{
value: ScGameSeries.Nekketsu,
label: 'gameSeriesNekketsu',
label: 'enum.gameSeries.nekketsu',
},
{
value: ScGameSeries.NinjaGaiden,
label: 'gameSeriesNinjaGaiden',
label: 'enum.gameSeries.ninjaGaiden',
},
{
value: ScGameSeries.StreetFighter,
label: 'gameSeriesStreetFighter',
label: 'enum.gameSeries.streetFighter',
},
{
value: ScGameSeries.Kof,
label: 'gameSeriesKof',
label: 'enum.gameSeries.kof',
},
{
value: ScGameSeries.Tank,
label: 'gameSeriesTank',
label: 'enum.gameSeries.tank',
},
{
value: ScGameSeries.Tmnt,
label: 'gameSeriesTmnt',
label: 'enum.gameSeries.tmnt',
},
{
value: ScGameSeries.AdventureIsland,
label: 'gameSeriesAdventureIsland',
label: 'enum.gameSeries.adventureIsland',
},
{
value: ScGameSeries.SanGokuShi,
label: 'gameSeriesSanGokuShi',
label: 'enum.gameSeries.sanGokuShi',
},
];
export const gameSeriesMap = convertToMap<ElementOf<typeof gameSeriesList>, LocaleKey>(
Expand Down
22 changes: 0 additions & 22 deletions packages/webapp/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,6 @@
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="preload" href="/fonts/regular.css" as="style" onload="this.onload=null;this.rel='stylesheet'" />
<link rel="preload" href="/fonts/medium.css" as="style" onload="this.onload=null;this.rel='stylesheet'" />
<script>
// hack @mantou/gem
window.globalThis = window.globalThis || {
queueMicrotask: function (callback) {
Promise.resolve().then(callback);
},
};
window.globalThis.EventTarget = Image;
if (!Element.prototype.toggleAttribute) {
Element.prototype.toggleAttribute = function (name, force) {
if (force !== void 0) force = !!force;
if (this.hasAttribute(name)) {
if (force) return true;
this.removeAttribute(name);
return false;
}
if (force === false) return false;
this.setAttribute(name, '');
return true;
};
}
</script>
<script async type="module" src="./index.ts"></script>
</head>
<body>
Expand Down
148 changes: 76 additions & 72 deletions packages/webapp/src/locales/en/basic.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"addFriend": "Add Friend",
"addGame": "Publish Game",
"allGame": "All Game",
"bgCopyright": "Copyright",
"close": "Close",
"code.0": "The current network is unstable",
"code.400": "Parameter error",
"code.401": "User information cannot be verified, try to log in again",
Expand All @@ -15,16 +10,25 @@
"code.500": "Server error, please try again later",
"code.501": "Unimplemented",
"code.504": "The request timeout, please try again later",
"deleteFriend": "Delete Friend",
"deleteFriendConfirm": "Do you delete your friends?",
"enterRoomMsg": "$1 enter the room",
"enum.gameKind.act": "Action",
"enum.gameKind.ftg": "Fighting",
"enum.gameKind.other": "Other",
"enum.gameKind.rpg": "RPG",
"enum.gameKind.spg": "Sports",
"enum.gameKind.stg": "Shooting",
"enum.gameKind.strategy": "Strategy",
"enum.gameSeries.adventureIsland": "Adventure Island",
"enum.gameSeries.contra": "Contra",
"enum.gameSeries.doubleDragon": "Double Dragon",
"enum.gameSeries.kof": "King of Fighters",
"enum.gameSeries.mario": "Mario",
"enum.gameSeries.megaMan": "Mega Man",
"enum.gameSeries.nekketsu": "Nekketsu",
"enum.gameSeries.ninjaGaiden": "Ninja Gaiden",
"enum.gameSeries.sanGokuShi": "San Goku Shi",
"enum.gameSeries.streetFighter": "Street Fighter",
"enum.gameSeries.tank": "Tank",
"enum.gameSeries.tmnt": "TMNT",
"enum.theme.default": "Default",
"enum.theme.punk": "Punk",
"enum.theme.retro": "Retro",
Expand All @@ -34,66 +38,71 @@
"enum.videoRefreshRate.sync": "Synchronous Display",
"enum.videoRender.pixelated": "Pixelated",
"enum.videoRender.smooth": "Smooth",
"feedback": "Feedback",
"gameKind": "Kind",
"gameMaxPlayer": "Max Player",
"gameName": "Game Name",
"gamePlayer": "$1 Player",
"gameSeries": "Series",
"gameSeriesAdventureIsland": "Adventure Island",
"gameSeriesContra": "Contra",
"gameSeriesDoubleDragon": "Double Dragon",
"gameSeriesKof": "King of Fighters",
"gameSeriesMario": "Mario",
"gameSeriesMegaMan": "Mega Man",
"gameSeriesNekketsu": "Nekketsu",
"gameSeriesNinjaGaiden": "Ninja Gaiden",
"gameSeriesSanGokuShi": "San Goku Shi",
"gameSeriesStreetFighter": "Street Fighter",
"gameSeriesTank": "Tank",
"gameSeriesTmnt": "TMNT",
"goLogin": "Existing Account",
"goRegister": "No Account",
"help": "Help",
"inviteFriend": "Invite",
"inviteValidFriend": "Invite Friend",
"keySettingJoypad1": "Joypad 1 - Keyboard Mapping",
"keySettingJoypad2": "Joypad 2 - Keyboard Mapping",
"kickOutRole": "Remove",
"leaveRoom": "Leave Room",
"leaveRoomMsg": "$1 leave the room",
"license": "License",
"lobbyUserCount": "Current $1 in Lobby",
"login": "Login",
"logoutAccount": "Logout \"$1\"",
"newGame": "New Game",
"newpassword": "New Password",
"noLimit": "No Limit",
"notDataTitle": "No Data",
"notFoundDetail": "The page you visited was not found,$1<Click> to return to the homepage",
"notPlaying": "Rest",
"official": "Official site",
"oldpassword": "Old Password",
"global.close": "Close",
"global.noData": "No Data",
"global.noLimit": "No Limit",
"global.slogan": "NESBox",
"global.sloganDesc": "I recall when I was young OH\nI will play and always having fun\nWith the neighbour next to me\nAnd we'll play until the setting sun\nTry to be The best among the others\nIn a game call the \"Spider battle\"\n......",
"global.title": "NESBox",
"global.unknown": "Unknown",
"menu.account.login": "Login",
"menu.account.logout": "Logout \"$1\"",
"menu.game.add": "Publish Game",
"menu.game.loadState": "Load State",
"menu.game.openCheat": "Cheat Settings",
"menu.game.openCombo": "Combo",
"menu.game.openRam": "RAM Viewer",
"menu.game.screenshot": "Screenshot",
"menu.game.share": "Share",
"menu.game.shareDesc": "Let's play $1 together",
"menu.game.stateSave": "Save State",
"menu.link.feedback": "Feedback",
"menu.link.official": "Official site",
"page.emulator.title": "Emulator",
"page.favorites.title": "Favorites",
"page.friend.add": "Add Friend",
"page.friend.delete": "Delete Friend",
"page.friend.deleteConfirm": "Do you delete your friends?",
"page.friend.invite": "Invite",
"page.friend.inviteValid": "Invite Friend",
"page.friend.notPlaying": "Rest",
"page.friend.playing": "Playing《$1》",
"page.friend.sendToMeInvite": "$1 invite",
"page.game.addComment": "Add Comment",
"page.game.commentTitle": "Comment",
"page.game.dislikeGame": "$1 dislike",
"page.game.emptyComment": "None Comment",
"page.game.kind": "Kind",
"page.game.lastPlay": "Played $1",
"page.game.likeGame": "$1 like",
"page.game.maxPlayer": "Max Player",
"page.game.name": "Game Name",
"page.game.player": "$1 Player",
"page.game.selfComment": "Me",
"page.game.series": "Series",
"page.game.start": "Playing",
"page.game.title": "Game",
"page.game.totalPlay": "Total $1",
"page.game.update": "Update Game",
"page.games.all": "All Game",
"page.games.new": "New Game",
"page.games.recent": "Recent Game",
"page.games.title": "Games",
"page.login.goLogin": "Existing Account",
"page.login.goRegister": "No Account",
"page.login.register": "Register",
"page.login.title": "Login",
"page.notFound.detail": "The page you visited was not found,$1<Click> to return to the homepage",
"page.notFound.title": "No Found",
"page.privacy.title": "Privacy Policy",
"page.register.title": "Register",
"page.room.emptyRole": "None",
"page.room.enterRoomMsg": "$1 enter the room",
"page.room.kickOutRole": "Remove",
"page.room.leaveRoomMsg": "$1 leave the room",
"page.room.stateSelectTitle": "Choose the state you want to go back to",
"page.room.systemName": "System",
"page.room.title": "Playing",
"page.rooms.currentUser": "Current $1 in Lobby",
"page.rooms.title": "Rooms",
"placeholder.adLink": "Sponsored links(optional)",
"placeholder.adText": "Promotion text(optional)",
Expand All @@ -103,16 +112,11 @@
"placeholder.search": "$1 Search game or friends",
"placeholder.searchPlaying": "$1 Change game or invite friends",
"placeholder.username": "Please enter username",
"playing": "Playing《$1》",
"register": "Register",
"renewpassword": "Repeat Password",
"reset": "Reset",
"roomEmptyRole": "None",
"search": "Search",
"selectGame": "Change Game",
"sendToMeInvite": "$1 invite",
"settings.account.newpassword": "New Password",
"settings.account.nickname": "Nickname",
"settings.account.oldpassword": "Old Password",
"settings.account.password": "Change Password",
"settings.account.renewpassword": "Repeat Password",
"settings.account.title": "Account",
"settings.cheat.add": "Add",
"settings.cheat.code": "Code",
Expand All @@ -122,19 +126,17 @@
"settings.cheat.title": "Cheat Settings ($1)",
"settings.combo.code": "Combo Code",
"settings.combo.title": "Combo ($1)",
"settings.keybinding.joypad1": "Joypad 1 - Keyboard Mapping",
"settings.keybinding.joypad2": "Joypad 2 - Keyboard Mapping",
"settings.keybinding.reset": "Reset",
"settings.keybinding.title": "Joypad",
"settings.license": "License",
"settings.shortcut.global": "Global",
"settings.shortcut.inGame": "In Game",
"settings.shortcut.openCheat": "Cheat Settings",
"settings.shortcut.openCombo": "Combo",
"settings.shortcut.openHelp": "Help",
"settings.shortcut.openRam": "RAM Viewer",
"settings.shortcut.readMsg": "Read Message",
"settings.shortcut.screenshot": "Screenshot",
"settings.shortcut.search": "Search",
"settings.shortcut.settings": "Settings",
"settings.shortcut.stateLoad": "Load State",
"settings.shortcut.stateSave": "Save State",
"settings.shortcut.title": "Shortcut",
"settings.shortcut.voiceInput": "Voice Input",
"settings.sound.gameVolume": "Game",
Expand All @@ -154,12 +156,6 @@
"settings.video.render": "Render Mode",
"settings.video.title": "Video",
"settings.video.transport": "Transport",
"share": "Share",
"shareDesc": "Let's play $1 together",
"slogan": "NESBox",
"sloganDesc": "I recall when I was young OH\nI will play and always having fun\nWith the neighbour next to me\nAnd we'll play until the setting sun\nTry to be The best among the others\nIn a game call the \"Spider battle\"\n......",
"startGame": "Playing",
"system": "System",
"tip.cheat.exist": "Code already exists",
"tip.cheat.formatErr": "Code format error",
"tip.friend.applySuccess": "Already sent a friend request to \"$1\"",
Expand All @@ -174,9 +170,17 @@
"tip.room.crowded": "Room crowded",
"tip.room.deleted": "The room has been deleted by the host",
"tip.settings.keybindingExist": "This key has duplicate binding",
"tip.settings.onlyHost": "The change option is only effective for the host",
"tip.settings.passwordChanged": "Password has been updated",
"tip.settings.renewPasswordNotMatch": "Non-match new password",
"title": "NESBox",
"unknown": "Unknown"
"tooltip.docs.help": "Help",
"tooltip.game.cancelFavorite": "Cancel favorite",
"tooltip.game.change": "Change game",
"tooltip.game.favorite": "Favorite",
"tooltip.game.startRecord": "Start recording",
"tooltip.game.stopRecord": "Stop recording",
"tooltip.login.imgCopyright": "Copyright",
"tooltip.room.leave": "Leave room",
"tooltip.room.startVoice": "Turn on voice",
"tooltip.room.stopVoice": "Turn off voice",
"tooltip.settings.onlyHost": "The change option is only effective for the host"
}
Loading

0 comments on commit bd5b7c4

Please sign in to comment.