Skip to content

Commit 36c892b

Browse files
committed
Import page localization
1 parent 41f3353 commit 36c892b

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

app/import/index.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
2727
<div class="mx-auto rounded-2xl bg-gray-700 w-3/5 text-center mt-40">
2828
<img src="../../img/header.png" class="h-16 w-16 relative top-5" />
2929
<h2>Import</h2>
30-
<h4>You can create your import file from QR codes and Google Authenticator QR codes.</h4>
30+
<h4 data-loc>You can create your import file from QR codes and Google Authenticator QR codes.</h4>
3131
<button class="buttoni mb-6" onclick="hide()">
3232
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
3333
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
3434
</svg>
35-
Close window
35+
<span data-loc>Close window</span>
3636
</button>
3737
</div>
3838

@@ -43,29 +43,29 @@ <h4>You can create your import file from QR codes and Google Authenticator QR co
4343
<h2 class="pt-5">Import</h2>
4444
<h3>QR code</h3>
4545
<details class="details mb-8">
46-
<summary class="summary">Instructions</summary>
46+
<summary data-loc class="summary">Instructions</summary>
4747
<h4>
48-
Just screenshot the QR code(s) you want to import, save them on your computer, and choose the image(s) you saved.
48+
<span data-loc> Just screenshot the QR code(s) you want to import, save them on your computer, and choose the image(s) you saved.</span>
4949
<br />
5050
<br />
51-
If you need more steps or help:
51+
<span data-loc>If you need more steps or help:</span>
5252
<br />
53-
<a class="link" href="#qrLink" onclick="qrLink()">Detailed steps</a>
53+
<a data-loc class="link" href="#qrLink" onclick="qrLink()">Detailed steps</a>
5454
</h4>
5555
</details>
5656
<div class="flex flex-row justify-center gap-3 flex-wrap">
5757
<button class="buttoni mb-8" onclick="qrImport()">
5858
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
5959
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z" />
6060
</svg>
61-
Choose image(s)
61+
<span data-loc>Choose image(s)</span>
6262
</button>
6363
<button class="buttoni mb-8" onclick="qrCamera()">
6464
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
6565
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" />
6666
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z" />
6767
</svg>
68-
Use webcam
68+
<span data-loc>Use webcam</span>
6969
</button>
7070
<button class="buttoni mb-8 screenCapture hidden" onclick="qrScreen()">
7171
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
@@ -87,29 +87,29 @@ <h4>
8787
<h2 class="pt-5">Advanced import</h2>
8888
<h3>Google Authenticator QR code</h3>
8989
<details class="details mb-8">
90-
<summary class="summary">Instructions</summary>
90+
<summary data-loc class="summary">Instructions</summary>
9191
<h4>
92-
Tap on the three dots on the top right corner of the screen and export your accounts, take a picture of the export QR code(s), and choose the image(s) you saved and transferred to your computer.
92+
<span data-loc>Tap on the three dots on the top right corner of the screen and export your accounts, take a picture of the export QR code(s), and choose the image(s) you saved and transferred to your computer.</span>
9393
<br />
9494
<br />
95-
If you need more steps or help:
95+
<span data-loc>If you need more steps or help:</span>
9696
<br />
97-
<a class="link" href="#gaLink" onclick="gaLink()">Detailed steps</a>
97+
<a data-loc class="link" href="#gaLink" onclick="gaLink()">Detailed steps</a>
9898
</h4>
9999
</details>
100100
<div class="flex flex-row justify-center gap-3 flex-wrap">
101101
<button class="buttoni mb-8" onclick="gaImport()">
102102
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
103103
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z" />
104104
</svg>
105-
Choose image(s)
105+
<span data-loc>Choose image(s)</span>
106106
</button>
107107
<button class="buttoni mb-8" onclick="gaCamera()">
108108
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
109109
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" />
110110
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z" />
111111
</svg>
112-
Use webcam
112+
<span data-loc>Use webcam</span>
113113
</button>
114114
</div>
115115
<video id="gaVideo" class="hidden mx-auto" autoplay></video>

app/import/src/js/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { app, dialog, shell, desktopCapturer, BrowserWindow } = require("@electron/remote")
2-
const { qrcodeConverter, time } = require("@levminer/lib")
2+
const { qrcodeConverter, time, localization } = require("@levminer/lib")
33
const logger = require("@levminer/lib/logger/renderer")
44
const QrcodeDecoder = require("qrcode-decoder").default
55
const { ipcRenderer: ipc } = require("electron")
@@ -18,6 +18,11 @@ window.onerror = (error) => {
1818
*/
1919
logger.getWindow("import")
2020

21+
/**
22+
* Localization
23+
*/
24+
localization.localize("import")
25+
2126
/**
2227
* Check if running in development
2328
*/

0 commit comments

Comments
 (0)