diff --git a/_includes/languagescript.js b/_includes/languagescript.js index 0292cf4..9cf426f 100644 --- a/_includes/languagescript.js +++ b/_includes/languagescript.js @@ -127,4 +127,9 @@ $scope.changeLang = function (field) { $scope.lang = "ja" } lang = $scope.lang + if ('URLSearchParams' in window) { + var searchParams = new URLSearchParams(window.location.search); + searchParams.set('lang', lang); + window.location.search = searchParams.toString(); + } } diff --git a/compatibility.html b/compatibility.html index bccfde0..50e0c15 100644 --- a/compatibility.html +++ b/compatibility.html @@ -9,6 +9,7 @@ return decodeURIComponent(name[1]); } angular.module('Vita3K', []).controller("angularController", async function ($scope, $filter, $http) { + {% include languagescript.js %} $scope.views = [] $scope.views['Unknown'] = [] $scope.views['Crashes'] = [] @@ -22,7 +23,6 @@ $scope.views['Ingame -'] = [] $scope.views['Ingame +'] = [] - {% include languagescript.js %} $scope.changeView = function (field) { $scope.data = $scope.views[field]; @@ -120,8 +120,18 @@ res.list.forEach((e) => { // Unknown already has all games, no need to add it twice - if(e.status != 'Unknown') + if (e.status != 'Unknown') { + switch (e.status) { + case 'Nothing': e.translatedStatus = $scope.texts[5]; break; + case 'Bootable': e.translatedStatus = $scope.texts[6]; break; + case 'Intro': e.translatedStatus = $scope.texts[7]; break; + case 'Menu': e.translatedStatus = $scope.texts[8]; break; + case 'Ingame -': e.translatedStatus = $scope.texts[9]; break; + case 'Ingame +': e.translatedStatus = $scope.texts[10]; break; + case 'Playable': e.translatedStatus = $scope.texts[4]; break; + } $scope.views[e.status].push(e); + } }); }); @@ -248,7 +258,7 @@

{{texts[26]}}

{{entry.titleId}} {{entry.name}} - {{entry.status}} + {{entry.translatedStatus}}