Skip to content

Commit

Permalink
Merge pull request #5 from litecoin-foundation/bugfix/v0.3.2
Browse files Browse the repository at this point in the history
🐞[Bugfix] Added the hash to meet lookup
  • Loading branch information
kcw-grunt authored Apr 19, 2023
2 parents 5ebdb23 + c6c1672 commit 21547f0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ var currentLanguage = window.location.hash;
if (window.location.hash) {
//Using switch statement reduces the time from O(n) to O(1)
switch (currentLanguage) {
case "en":
case "#en":
document.querySelector(".selected").innerText = "English";
textAboutMenu.textContent = language.en.textAboutMenu;
textTeamMenu.textContent = language.en.textTeamMenu;
Expand Down Expand Up @@ -554,7 +554,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.en.textRepositories;
textFooterSubheadline = language.en.textFooterSubheadline;
break;
case "id":
case "#id":
document.querySelector(".selected").innerText = "Bahasa Indonesia";
textAboutMenu.textContent = language.id.textAboutMenu;
textTeamMenu.textContent = language.id.textTeamMenu;
Expand Down Expand Up @@ -600,7 +600,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.id.textRepositories;
textFooterSubheadline = language.id.textFooterSubheadline;
break;
case "es":
case "#es":
document.querySelector(".selected").innerText = "Español";
textAboutMenu.textContent = language.es.textAboutMenu;
textTeamMenu.textContent = language.es.textTeamMenu;
Expand Down Expand Up @@ -646,7 +646,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.es.textRepositories;
textFooterSubheadline = language.es.textFooterSubheadline;
break;
case "de":
case "#de":
document.querySelector(".selected").innerText = "Deutsch";
textAboutMenu.textContent = language.de.textAboutMenu;
textTeamMenu.textContent = language.de.textTeamMenu;
Expand Down Expand Up @@ -692,7 +692,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.de.textRepositories;
textFooterSubheadline = language.de.textFooterSubheadline;
break;
case "pt":
case "#pt":
document.querySelector(".selected").innerText = "Portuguese";
textAboutMenu.textContent = language.pt.textAboutMenu;
textTeamMenu.textContent = language.pt.textTeamMenu;
Expand Down Expand Up @@ -738,7 +738,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.pt.textRepositories;
textFooterSubheadline = language.pt.textFooterSubheadline;
break;
case "ko":
case "#ko":
document.querySelector(".selected").innerText = "한국인";
textAboutMenu.textContent = language.ko.textAboutMenu;
textTeamMenu.textContent = language.ko.textTeamMenu;
Expand Down Expand Up @@ -784,7 +784,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.ko.textRepositories;
textFooterSubheadline = language.ko.textFooterSubheadline;
break;
case "uk":
case "#uk":
document.querySelector(".selected").innerText = "українська";
textAboutMenu.textContent = language.uk.textAboutMenu;
textTeamMenu.textContent = language.uk.textTeamMenu;
Expand Down Expand Up @@ -830,7 +830,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.uk.textRepositories;
textFooterSubheadline = language.uk.textFooterSubheadline;
break;
case "ru":
case "#ru":
document.querySelector(".selected").innerText = "Русский";
textAboutMenu.textContent = language.ru.textAboutMenu;
textTeamMenu.textContent = language.ru.textTeamMenu;
Expand Down Expand Up @@ -876,7 +876,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.ru.textRepositories;
textFooterSubheadline = language.ru.textFooterSubheadline;
break;
case "fr":
case "#fr":
document.querySelector(".selected").innerText = "Français";
textAboutMenu.textContent = language.fr.textAboutMenu;
textTeamMenu.textContent = language.fr.textTeamMenu;
Expand Down Expand Up @@ -922,7 +922,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.fr.textRepositories;
textFooterSubheadline = language.fr.textFooterSubheadline;
break;
case "zhCN":
case "#zhCN":
document.querySelector(".selected").innerText = "中国人";
textAboutMenu.textContent = language.zhCN.textAboutMenu;
textTeamMenu.textContent = language.zhCN.textTeamMenu;
Expand Down Expand Up @@ -968,7 +968,7 @@ var currentLanguage = window.location.hash;
textRepositories.textContent = language.zhCN.textRepositories;
textFooterSubheadline = language.zhCN.textFooterSubheadline;
break;
case "tr":
case "#tr":
document.querySelector(".selected").innerText = "Türkçe";
textAboutMenu.textContent = language.tr.textAboutMenu;
textTeamMenu.textContent = language.tr.textTeamMenu;
Expand Down

0 comments on commit 21547f0

Please sign in to comment.