Refactoring translator to use "_" instead of "translator._".
This is shorter and pollutes less the code.
This commit is contained in:
parent
1789f36a63
commit
51c3f1d972
34 changed files with 174 additions and 190 deletions
|
@ -17,7 +17,7 @@
|
|||
import btnProfileSubMenuCompanion from "../images/btn-menu-profile-companion.svg";
|
||||
import Woka from "../Woka/Woka.svelte";
|
||||
import Companion from "../Companion/Companion.svelte";
|
||||
import { translator } from "../../Translator/Translator";
|
||||
import { _ } from "../../Translator/Translator";
|
||||
|
||||
function disableMenuStores() {
|
||||
menuVisiblilityStore.set(false);
|
||||
|
@ -63,20 +63,20 @@
|
|||
<div class="submenu">
|
||||
<section>
|
||||
<button type="button" class="nes-btn" on:click|preventDefault={openEditNameScene}>
|
||||
<img src={btnProfileSubMenuIdentity} alt={translator._("menu.profile.edit.name")} />
|
||||
<span class="btn-hover">{translator._("menu.profile.edit.name")}</span>
|
||||
<img src={btnProfileSubMenuIdentity} alt={_("menu.profile.edit.name")} />
|
||||
<span class="btn-hover">{_("menu.profile.edit.name")}</span>
|
||||
</button>
|
||||
<button type="button" class="nes-btn" on:click|preventDefault={openEditSkinScene}>
|
||||
<Woka userId={-1} placeholderSrc="" width="26px" height="26px" />
|
||||
<span class="btn-hover">{translator._("menu.profile.edit.woka")}</span>
|
||||
<span class="btn-hover">{_("menu.profile.edit.woka")}</span>
|
||||
</button>
|
||||
<button type="button" class="nes-btn" on:click|preventDefault={openEditCompanionScene}>
|
||||
<Companion userId={-1} placeholderSrc={btnProfileSubMenuCompanion} width="26px" height="26px" />
|
||||
<span class="btn-hover">{translator._("menu.profile.edit.companion")}</span>
|
||||
<span class="btn-hover">{_("menu.profile.edit.companion")}</span>
|
||||
</button>
|
||||
<button type="button" class="nes-btn" on:click|preventDefault={openEnableCameraScene}>
|
||||
<img src={btnProfileSubMenuCamera} alt={translator._("menu.profile.edit.camera")} />
|
||||
<span class="btn-hover">{translator._("menu.profile.edit.camera")}</span>
|
||||
<img src={btnProfileSubMenuCamera} alt={_("menu.profile.edit.camera")} />
|
||||
<span class="btn-hover">{_("menu.profile.edit.camera")}</span>
|
||||
</button>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -90,12 +90,12 @@
|
|||
</section>
|
||||
<section>
|
||||
<button type="button" class="nes-btn" on:click|preventDefault={logOut}
|
||||
>{translator._("menu.profile.logout")}</button
|
||||
>{_("menu.profile.logout")}</button
|
||||
>
|
||||
</section>
|
||||
{:else}
|
||||
<section>
|
||||
<a type="button" class="nes-btn" href="/login">{translator._("menu.profile.login")}</a>
|
||||
<a type="button" class="nes-btn" href="/login">{_("menu.profile.login")}</a>
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue