From bf208404d61d27cca849cb00d214634f57948914 Mon Sep 17 00:00:00 2001 From: WilliamAB Date: Fri, 17 Jun 2022 02:22:48 +0300 Subject: [PATCH 1/2] Remove typos from everyoneHates text string --- js/textStrings.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/textStrings.js b/js/textStrings.js index e3de4cf..1bb79ea 100644 --- a/js/textStrings.js +++ b/js/textStrings.js @@ -25,7 +25,7 @@ var textStrings_EN = { "areTheyScared": "(ya gotta catch 'em *being* scared by a square)", // not used "squaresSnubCircles": "SQUARES SNUB CIRCLES", "areTheySnubbed": "(ya gotta catch 'em *while* snubbing a circle)", // not used - "everyoneHates": "EVERYONE HATES EVERYONE!!1!", + "everyoneHates": "EVERYONE HATES EVERYONE!!!!", "almostEveryoneHates": "ALMOST EVERYONE HATES EVERYONE...", "squaresHateCircles": "SQUARES HATE CIRCLES", "circlesHateSquares": "CIRCLES HATE SQUARES", @@ -129,7 +129,7 @@ var textStrings_DE = { "areTheyScared": "(erwische sie, *wenn* sie fl\xFCchten)", "squaresSnubCircles": "QUADRAT: Anschuldigungen von KREISEN l\xE4cherlich.", "areTheySnubbed": "(erwische sie, *w\xE4hrend* sie angreifen)", - "everyoneHates": "ALLE HASSEN JEDEN!!1!", + "everyoneHates": "ALLE HASSEN JEDEN!!!!", "almostEveryoneHates": "FAST JEDER HASST ALLE...", "squaresHateCircles": "QUADRATE HASSEN KREISE", "circlesHateSquares": "KREISE HASSEN QUADRATE", @@ -336,7 +336,7 @@ var textStrings_PT = { "areTheyScared": "pegue-os *sendo assustados* por um quadrado)", // not used "squaresSnubCircles": "QUADR. ESNOBAM CÍRCULOS", "areTheySnubbed": "(pegue *enquanto* esnobam um círculo)", // not used - "everyoneHates": "TODO MUNDO ODEIA TODO MUNDO!!1!", + "everyoneHates": "TODO MUNDO ODEIA TODO MUNDO!!!!", "almostEveryoneHates": "QUASE TODO MUNDO ODEIA TODO MUNDO..", "squaresHateCircles": "QUADRADOS ODEIAM CÍRCULOS", "circlesHateSquares": "CÍRCULOS ODEIAM QUADRADOS", @@ -438,7 +438,7 @@ var textStrings_PT_BR = { //I put that way because portuguese from Brazil (PT_BR "areTheyScared": "(você tem que pegar eles *sendo* assustados por um quadrado)", // not used "squaresSnubCircles": "QUADRADOS AFRONTAM CÍRCULOS", "areTheySnubbed": "(você tem que pegá-los *enquanto* eles afrontam os círculos)", // not used - "everyoneHates": "TODO MUNDO ODEIA TODO MUNDO!!1!", + "everyoneHates": "TODO MUNDO ODEIA TODO MUNDO!!!!", "almostEveryoneHates": "QUASE TODO MUNDO ODEIA TODO MUNDO...", "squaresHateCircles": "QUADRADOS ODEIAM CÍRCULOS", "circlesHateSquares": "CÍRCULOS ODEIAM QUADRADOS", @@ -540,7 +540,7 @@ var textStrings_ES = { "areTheyScared": "(tienes que atraparlos *siendo* asustados por un cuadrado)", // not used "squaresSnubCircles": "CUADRADOS DESPRECIAN A CIRCULOS", "areTheySnubbed": "(ya gotta catch 'em *while* snubbing a circle)", // not used - "everyoneHates": "TODOS SE ODIAN!!1!", + "everyoneHates": "TODOS SE ODIAN!!!!", "almostEveryoneHates": "CASI TODOS SE ODIAN...", "squaresHateCircles": "CUADRADOS ODIAN A CIRCULOS", "circlesHateSquares": "CIRCLES HATE SQUARES", From b312a47ff9986ebbb4d05be6d3e968c264194ad7 Mon Sep 17 00:00:00 2001 From: WilliamAB Date: Sat, 18 Jun 2022 09:27:46 +0300 Subject: [PATCH 2/2] Fix game crashing when trying to access textStrings --- index.html | 3 ++- js/textStrings.js | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c85a443..14c7b88 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,5 @@ - + + diff --git a/js/textStrings.js b/js/textStrings.js index 1bb79ea..b7b59ca 100644 --- a/js/textStrings.js +++ b/js/textStrings.js @@ -617,4 +617,24 @@ var textStrings_ES = { // (quote0004.png) "misatrributed": "(misattributed)", -}; \ No newline at end of file +}; + +const textStrings = (() => { + switch (navigator.language) { + case "en-US": + return textStrings_EN; + case "da": + return textStrings_DA; + case "fa": + return textStrings_FA; + case "pt-pt": + return textStrings_PT; + case "pt-BR": + return textStrings_PT_BR; + case "es": + return textStrings_ES; + default: + return textStrings_EN; + } +} +)(); \ No newline at end of file