1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-15 19:21:49 +00:00

Correct translation style

This commit is contained in:
Jasper Meggitt 2020-05-31 14:21:16 -07:00
parent ebebb0a188
commit 643ebb6067
2 changed files with 43 additions and 43 deletions

View File

@ -30,17 +30,17 @@ export class ModsState extends TextualGameState {
return ` return `
<span class="devHint"> <span class="devHint">
${T.mods.dev_hint.replace( ${T.mods.devHint.replace(
"<modding_docs>", "<moddingDocs>",
`<span class='moddingDocsLink'>${T.mods.modding_docs}</span>` `<span class='moddingDocsLink'>${T.mods.moddingDocs}</span>`
)} )}
</span> </span>
<strong class="category_label">${T.mods.installed_mods}</strong> <strong class="category_label">${T.mods.installedMods}</strong>
<div class="installedMods"></div> <div class="installedMods"></div>
<strong class="category_label">${T.mods.mods_browser}</strong> <strong class="category_label">${T.mods.modsBrowser}</strong>
<div class="modGallery"></div> <div class="modGallery"></div>
`; `;
} }
@ -65,7 +65,7 @@ export class ModsState extends TextualGameState {
const mods = this.app.modManager.getMods(); const mods = this.app.modManager.getMods();
if (mods.length === 0) { if (mods.length === 0) {
this.installedModsElement.innerHTML = T.mods.no_mods_found; this.installedModsElement.innerHTML = T.mods.noModsFound;
return; return;
} }
@ -78,7 +78,7 @@ export class ModsState extends TextualGameState {
const uninstallButton = document.createElement("button"); const uninstallButton = document.createElement("button");
uninstallButton.classList.add("styledButton", "uninstallMod"); uninstallButton.classList.add("styledButton", "uninstallMod");
uninstallButton.innerText = T.mods.uninstall_mod; uninstallButton.innerText = T.mods.uninstallMod;
elem.appendChild(uninstallButton); elem.appendChild(uninstallButton);
this.trackClicks(uninstallButton, () => this.uninstallMod(mod)); this.trackClicks(uninstallButton, () => this.uninstallMod(mod));
} }
@ -97,7 +97,7 @@ export class ModsState extends TextualGameState {
.then(mods => this.rerenderModsGallery(mods)) .then(mods => this.rerenderModsGallery(mods))
.catch(err => { .catch(err => {
globalWarn(this, "Failed to fetch mod gallery:", err); globalWarn(this, "Failed to fetch mod gallery:", err);
this.modGalleryElement.innerHTML = T.mods.mod_gallery_fail + " " + err; this.modGalleryElement.innerHTML = T.mods.modGalleryFail + " " + err;
}); });
} }
@ -138,7 +138,7 @@ export class ModsState extends TextualGameState {
if (mod.is_game_changing) { if (mod.is_game_changing) {
const hint = document.createElement("span"); const hint = document.createElement("span");
hint.classList.add("gameChangingHint"); hint.classList.add("gameChangingHint");
hint.innerText = T.mods.gamechanging_hint; hint.innerText = T.mods.gamechangingHint;
elem.appendChild(hint); elem.appendChild(hint);
} }
@ -154,7 +154,7 @@ export class ModsState extends TextualGameState {
removeAllChildren(this.modGalleryElement); removeAllChildren(this.modGalleryElement);
if (mods.length === 0) { if (mods.length === 0) {
this.modGalleryElement.innerHTML = T.mods.no_mods_found; this.modGalleryElement.innerHTML = T.mods.noModsFound;
return; return;
} }
@ -167,19 +167,19 @@ export class ModsState extends TextualGameState {
const installCount = document.createElement("span"); const installCount = document.createElement("span");
installCount.classList.add("installCount"); installCount.classList.add("installCount");
installCount.innerText = T.mods.install_count.replace("<installs>", "" + mod.install_count); installCount.innerText = T.mods.installCount.replace("<installs>", "" + mod.install_count);
elem.appendChild(installCount); elem.appendChild(installCount);
if (this.app.modManager.getModByName(mod.name)) { if (this.app.modManager.getModByName(mod.name)) {
const installedText = document.createElement("span"); const installedText = document.createElement("span");
installedText.innerText = T.mods.mod_installed; installedText.innerText = T.mods.modInstalled;
installedText.classList.add("installedText"); installedText.classList.add("installedText");
elem.appendChild(installedText); elem.appendChild(installedText);
elem.classList.add("installed"); elem.classList.add("installed");
} else { } else {
const installButton = document.createElement("button"); const installButton = document.createElement("button");
installButton.classList.add("styledButton", "installMod"); installButton.classList.add("styledButton", "installMod");
installButton.innerText = T.mods.install_mod; installButton.innerText = T.mods.installMod;
elem.appendChild(installButton); elem.appendChild(installButton);
this.trackClicks(installButton, () => this.tryInstallMod(mod)); this.trackClicks(installButton, () => this.tryInstallMod(mod));
} }
@ -198,8 +198,8 @@ export class ModsState extends TextualGameState {
closeLoading(); closeLoading();
const { restart } = this.dialogs.showInfo( const { restart } = this.dialogs.showInfo(
T.mods.mod_uninstalled_dialog.title, T.mods.modUninstalledDialog.title,
T.mods.mod_uninstalled_dialog.desc, T.mods.modUninstalledDialog.desc,
this.app.platformWrapper.getSupportsRestart() ? ["ok:good", "restart:misc"] : ["ok:good"] this.app.platformWrapper.getSupportsRestart() ? ["ok:good", "restart:misc"] : ["ok:good"]
); );
if (restart) { if (restart) {
@ -222,15 +222,15 @@ export class ModsState extends TextualGameState {
*/ */
tryInstallMod(mod) { tryInstallMod(mod) {
const { install } = this.dialogs.showWarning( const { install } = this.dialogs.showWarning(
T.mods.mod_warning.title, T.mods.modWarning.title,
` `
${T.mods.mod_warning.desc} ${T.mods.modWarning.desc}
<ul> <ul>
<li>${T.mods.mod_warning.point_0}</li> <li>${T.mods.modWarning.point0}</li>
<li>${T.mods.mod_warning.point_1}</li> <li>${T.mods.modWarning.point1}</li>
<li>${T.mods.mod_warning.point_2}</li> <li>${T.mods.modWarning.point2}</li>
<li>${T.mods.mod_warning.point_3}</li> <li>${T.mods.modWarning.point3}</li>
${mod.is_game_changing ? `<li>${T.mods.mod_warning.disclaimer_gamechanging}</li>` : ""} ${mod.is_game_changing ? `<li>${T.mods.modWarning.disclaimerGamechanging}</li>` : ""}
</ul> </ul>
`, `,
// @ts-ignore // @ts-ignore
@ -268,8 +268,8 @@ export class ModsState extends TextualGameState {
closeLoading(); closeLoading();
const { restart } = this.dialogs.showInfo( const { restart } = this.dialogs.showInfo(
T.mods.mod_installed_dialog.title, T.mods.modInstalledDialog.title,
T.mods.mod_installed_dialog.desc, T.mods.modInstalledDialog.desc,
this.app.platformWrapper.getSupportsRestart() this.app.platformWrapper.getSupportsRestart()
? ["ok:good", "restart:misc"] ? ["ok:good", "restart:misc"]
: ["ok:good"] : ["ok:good"]

View File

@ -59,41 +59,41 @@ mods:
title: Mods title: Mods
# Links to developer information # Links to developer information
dev_hint: Interested in creating mods? Check out <modding_docs>! devHint: Interested in creating mods? Check out <moddingDocs>!
modding_docs: Mod Documentation moddingDocs: Mod Documentation
installed_mods: Installed Mods installedMods: Installed Mods
install_count: <installs> mods installed installCount: <installs> mods installed
mods_browser: Popular Mods modsBrowser: Popular Mods
website: Visit Website website: Visit Website
no_mods_found: No mods found noModsFound: No mods found
mod_gallery_fail: >- modGalleryFail: >-
Failed to fetch mod gallery: Failed to fetch mod gallery:
install_mod: Install installMod: Install
uninstall_mod: Remove uninstallMod: Remove
mod_installed: Installed modInstalled: Installed
gamechanging_hint: This mod is gamechanging and thus cannot be removed once added to a game save! gamechangingHint: This mod is gamechanging and thus cannot be removed once added to a game save!
mod_warning: modWarning:
title: Modded Warning title: Modded Warning
desc: >- desc: >-
Please note the following when installing mods: Please note the following when installing mods:
point_0: Mods are not created by the developer. point0: Mods are not created by the developer.
point_1: They may crash and corrupt your games. point1: They may crash and corrupt your games.
point_2: Mods are not created by the developer, and the developer (tobspr) is not responsible for any damage caused by mods. point2: Mods are not created by the developer, and the developer (tobspr) is not responsible for any damage caused by mods.
point_3: Mods have full access to the game, including other game save files. point3: Mods have full access to the game, including other game save files.
disclaimer_gamechanging: Gamechanging mods cannot be removed once added to a game save. disclaimerGamechanging: Gamechanging mods cannot be removed once added to a game save.
mod_installed_dialog: modInstalledDialog:
title: Mod Installed title: Mod Installed
desc: The mod has succssfully been installed and will be loaded after a restart. desc: The mod has succssfully been installed and will be loaded after a restart.
mod_uninstalled_dialog: modUninstalledDialog:
title: Mod Removed title: Mod Removed
desc: The mod has successfully beeen removed and will get unloaded after a restart. desc: The mod has successfully beeen removed and will get unloaded after a restart.