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
|
@ -4,7 +4,7 @@
|
|||
import firefoxImg from "./images/help-setting-camera-permission-firefox.png";
|
||||
import chromeImg from "./images/help-setting-camera-permission-chrome.png";
|
||||
import { getNavigatorType, isAndroid as isAndroidFct, NavigatorType } from "../../WebRtc/DeviceUtils";
|
||||
import { translator } from "../../Translator/Translator";
|
||||
import { _ } from "../../Translator/Translator";
|
||||
|
||||
let isAndroid = isAndroidFct();
|
||||
let isFirefox = getNavigatorType() === NavigatorType.firefox;
|
||||
|
@ -25,13 +25,13 @@
|
|||
transition:fly={{ y: -900, duration: 500 }}
|
||||
>
|
||||
<section>
|
||||
<h2>{translator._("camera.help.title")}</h2>
|
||||
<p class="err">{translator._("camera.help.permission-denied")}</p>
|
||||
<p>{translator._("camera.help.content")}</p>
|
||||
<h2>{_("camera.help.title")}</h2>
|
||||
<p class="err">{_("camera.help.permission-denied")}</p>
|
||||
<p>{_("camera.help.content")}</p>
|
||||
<p>
|
||||
{#if isFirefox}
|
||||
<p class="err">
|
||||
{translator._("camera.help.firefox-content")}
|
||||
{_("camera.help.firefox-content")}
|
||||
</p>
|
||||
<img src={firefoxImg} alt="" />
|
||||
{:else if isChrome && !isAndroid}
|
||||
|
@ -41,10 +41,10 @@
|
|||
</section>
|
||||
<section>
|
||||
<button class="helpCameraSettingsFormRefresh nes-btn" on:click|preventDefault={refresh}
|
||||
>{translator._("camera.help.refresh")}</button
|
||||
>{_("camera.help.refresh")}</button
|
||||
>
|
||||
<button type="submit" class="helpCameraSettingsFormContinue nes-btn is-primary" on:click|preventDefault={close}
|
||||
>{translator._("camera.help.continue")}</button
|
||||
>{_("camera.help.continue")}</button
|
||||
>
|
||||
</section>
|
||||
</form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue