Skip to content

Commit

Permalink
Localize popups
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Feb 6, 2022
1 parent 269647d commit cd1bda9
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 20 deletions.
14 changes: 7 additions & 7 deletions app/application/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
</svg>

<div class="mx-3 flex flex-row relative top-3">
<p id="updateText" class="mr-3">New Authme version available. Starting the update...</p>
<p id="updateText" class="mr-3" data-loc>New Authme version available. Starting the update...</p>
<button type="button" id="updateButton" onclick="updateRestart()" class="hidden mr-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
</svg>
Restart
<span data-loc>Restart</span>
</button>
<button type="button" onclick="releaseNotes()" class="py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" />
</svg>
Release notes
<span data-loc>Release notes</span>
</button>
</div>
</div>
Expand All @@ -94,26 +94,26 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
</svg>

<p class="mx-3 flex flex-row relative top-3">
Enjoying Authme?
<span data-loc>Enjoying Authme?</span>
<button type="button" onclick="rateAuthme()" class="ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
</svg>
Rate on Microsoft Store
<span data-loc>Rate on Microsoft Store</span>
</button>

<button type="button" onclick="starAuthme()" class="mr-2 ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
</svg>
Star on GitHub
<span data-loc>Star on GitHub</span>
</button>

<button type="button" onclick="provideFeedback()" class="py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z" />
</svg>
Provide feedback
<span data-loc>Provide feedback</span>
</button>
</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/application/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ const manualUpdate = () => {
* Display auto update download info
*/
ipc.on("updateInfo", (event, info) => {
document.querySelector("#updateText").textContent = `Downloading update: ${info.download_percent}% - ${info.download_speed}MB/s (${info.download_transferred}MB/${info.download_total}MB)`
document.querySelector("#updateText").textContent = `${lang.popup.downloading_update} ${info.download_percent}% - ${info.download_speed}MB/s (${info.download_transferred}MB/${info.download_total}MB)`
})

/**
Expand All @@ -852,7 +852,7 @@ const updateAvailable = () => {
* Display restart button if download finished
*/
const updateDownloaded = () => {
document.querySelector("#updateText").textContent = "Successfully downloaded update! Please restart the app, Authme will install the updates in the background and restart automatically."
document.querySelector("#updateText").textContent = lang.popup.update_downloaded
document.querySelector("#updateButton").style.display = "block"
document.querySelector("#updateClose").style.display = "block"
}
Expand Down
14 changes: 7 additions & 7 deletions app/settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,18 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
</svg>

<div class="mx-3 flex flex-row relative top-3">
<p id="updateText" class="mr-3">New Authme version available. Starting the update...</p>
<p id="updateText" class="mr-3" data-loc>New Authme version available. Starting the update...</p>
<button type="button" id="updateButton" onclick="updateRestart()" class="hidden mr-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
</svg>
Restart
<span data-loc>Restart</span>
</button>
<button type="button" onclick="releaseNotes()" class="py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z" />
</svg>
Release notes
<span data-loc>Release notes</span>
</button>
</div>
</div>
Expand All @@ -154,26 +154,26 @@ <h5 class="mx-3 flex flex-row m-0 font-bold build-content text-center">You are r
</svg>

<p class="mx-3 flex flex-row relative top-3">
Enjoying Authme?
<span data-loc>Enjoying Authme?</span>
<button type="button" onclick="rateAuthme()" class="ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" />
</svg>
Rate on Microsoft Store
<span data-loc>Rate on Microsoft Store</span>
</button>

<button type="button" onclick="starAuthme()" class="mr-2 ml-3 py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
</svg>
Star on GitHub
<span data-loc>Star on GitHub</span>
</button>

<button type="button" onclick="provideFeedback()" class="py-1 px-3 relative -top-2.5 bg-white hover:bg-transparent text-black border-2 border-white hover:text-white cursor-pointer transition ease-in duration-200 text-center text-base font-bold rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" class="relative top-1" height="20" width="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z" />
</svg>
Provide feedback
<span data-loc>Provide feedback</span>
</button>
</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/settings/src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ const manualUpdate = () => {
* Display auto update download info
*/
ipc.on("updateInfo", (event, info) => {
document.querySelector("#updateText").textContent = `Downloading update: ${info.download_percent}% - ${info.download_speed}MB/s (${info.download_transferred}MB/${info.download_total}MB)`
document.querySelector("#updateText").textContent = `${lang.popup.downloading_update} ${info.download_percent}% - ${info.download_speed}MB/s (${info.download_transferred}MB/${info.download_total}MB)`
})

/**
Expand All @@ -987,7 +987,7 @@ const updateAvailable = () => {
* Display restart button if download finished
*/
const updateDownloaded = () => {
document.querySelector("#updateText").textContent = "Successfully downloaded update! Please restart the app, Authme will install the updates in the background and restart automatically."
document.querySelector("#updateText").textContent = lang.popup.update_downloaded
document.querySelector("#updateButton").style.display = "block"
document.querySelector("#updateClose").style.display = "block"
}
Expand Down
16 changes: 15 additions & 1 deletion languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
"error": "Error occurred while running Authme.",
"integrity": "Failed to check the integrity of the files. \n\nYou or someone messed with the settings file, shutting down for security reasons!",
"support": "Authme is a free, open source software. \n\nIf you like the app, please consider supporting!",
"feedback": "Thank you for providing feedback! \n\nPlease report issues on GitHub or by Email.",
"feedback": "Thank you for providing feedback! \n\nPlease report issues or feature requests on GitHub or by Email.",
"docs": "You can view the Authme Docs in the browser. \n\nClick open to view it in your browser.",
"license": "This software is licensed under GPL-3.0 \n\nCopyright © 2020 Lőrik Levente",
"no_update_available": "No update available: \n\nYou are running the latest version! \n\nYou are currently running:",
Expand Down Expand Up @@ -113,6 +113,13 @@ module.exports = {
},

"application": [
"New Authme version available. Starting the update...",
"Restart",
"Release notes",
"Enjoying Authme?",
"Rate on Microsoft Store",
"Star on GitHub",
"Provide feedback",
"Choose your import file",
"If you don't have an import file containing your 2FA codes please create one!",
"Choose import file",
Expand Down Expand Up @@ -151,6 +158,13 @@ module.exports = {
"Experimental",
"Feedback",
"About",
"New Authme version available. Starting the update...",
"Restart",
"Release notes",
"Enjoying Authme?",
"Rate on Microsoft Store",
"Star on GitHub",
"Provide feedback",
"Settings",
"You can configure the app settings here.",
"Close window",
Expand Down
16 changes: 15 additions & 1 deletion languages/hu.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
"error": "Hiba történt az Authme futtatása közben.",
"integrity": "Nem sikerült a fájlok biztonságának ellenőrzése. \n\nTe vagy valaki más szerkesztette a beállítások fájlt, Authme leállítása biztonsági okokból!",
"support": "Authme egy ingyenes, nyílt forráskódú program. \n\nHa tetszik az alkalmazás kérlek támogass!",
"feedback": "Köszönöm a visszajelzést! \n\nKérlek a hibákat GitHub-on vagy Email-be jelezd.",
"feedback": "Köszönöm a visszajelzést! \n\nKérlek a hibákat vagy az ötleteket a GitHub-on vagy Email-be jelezd.",
"docs": "A dokumentációt a böngészőben tekintheted meg. \n\nKattints a megnyitásra hogy megnyíljon a böngésződben.",
"license": "Ez a szoftver a GPL-3.0 licensz alatt érhető el \n\nCopyright © 2020 Lőrik Levente",
"no_update_available": "Nem található új frissítés: \n\nA legfrisebb verziót futtatod! \n\nJelenlegi verzió:",
Expand Down Expand Up @@ -113,6 +113,13 @@ module.exports = {
},

"application": [
"Új Authme verzió elérhető. Frissítés kezdése...",
"Újraindítás",
"Újdonságok",
"Tetszik az Authme?",
"Értékelés a Microsoft Store-on",
"Csillagozás a GitHub-on",
"Visszajelzés",
"Authme import fájl választása",
"Ha nincs import fájlod hozz létre egyet!",
"Fájl választása",
Expand Down Expand Up @@ -151,6 +158,13 @@ module.exports = {
"Kísérletek",
"Visszajelzés",
"Névjegy",
"Új Authme verzió elérhető. Frissítés kezdése...",
"Újraindítás",
"Újdonságok",
"Tetszik az Authme?",
"Értékelés a Microsoft Store-on",
"Csillagozás a GitHub-on",
"Visszajelzés",
"Beállítások",
"Itt tudod szerkeszteni a beállításokat.",
"Ablak bezárása",
Expand Down

0 comments on commit cd1bda9

Please sign in to comment.