From b91dcac0402da19aa676eec0168c5b8b660a16d6 Mon Sep 17 00:00:00 2001 From: sallbet Date: Mon, 13 Mar 2023 03:05:46 +0300 Subject: [PATCH] fix typo, refactor and add da language --- i18n/da.po | 1570 +++++++++++++++++ i18n/ssr-da.po | 471 +++++ src/backup.js | 17 +- src/canvasesDesc.js | 12 +- src/components/BanInfo.jsx | 2 +- src/components/MdLink.jsx | 2 +- src/components/Palette.jsx | 2 +- src/components/UIPopUp.jsx | 6 +- src/components/UserAreaContent.jsx | 2 +- src/components/Window.jsx | 6 +- src/components/buttons/ChatButton.jsx | 2 +- src/components/buttons/ExpandMenuButton.jsx | 2 +- .../contextmenus/ChannelDropDown.jsx | 2 +- src/components/embeds/Odysee.jsx | 14 +- src/components/hooks/clickOutside.js | 2 +- src/components/hooks/drag.js | 4 +- src/components/windows/index.js | 2 +- src/controls/PixelPainterControls.js | 32 +- src/core/ChatMessageBuffer.js | 2 +- src/core/ChatProvider.js | 35 +- src/core/Image.js | 4 +- src/core/MailProvider.js | 8 +- src/core/MarkdownParser.js | 10 +- src/core/RpgEvent.js | 6 +- src/core/Tile.js | 4 +- src/core/Void.js | 4 +- src/core/adminfunctions.js | 8 +- src/core/chartSettings.js | 3 +- src/core/config.js | 2 +- src/core/constants.js | 2 +- src/core/draw.js | 10 +- src/core/isAllowed.js | 2 +- src/core/me.js | 4 +- src/core/parsePixelLog.js | 8 +- src/core/passport.js | 2 +- src/core/setPixel.js | 3 +- src/core/tilesBackup.js | 21 +- src/core/tileserver.js | 2 +- src/core/ttag.js | 2 +- src/core/utils.js | 19 +- src/core/voxExport.js | 12 +- src/data/redis/captcha.js | 2 +- src/data/redis/cooldown.js | 2 +- src/data/redis/lua/placePixel.lua | 14 +- src/data/sql/Ban.js | 2 +- src/data/sql/RegUser.js | 4 +- src/globe.js | 3 +- src/routes/adminapi.js | 2 +- src/routes/api/auth/index.js | 4 +- src/routes/api/auth/restore_password.js | 2 +- src/routes/api/auth/verify.js | 4 +- src/routes/api/banme.js | 2 +- src/routes/api/block.js | 6 +- src/routes/api/index.js | 2 +- src/routes/api/startdm.js | 4 +- src/routes/reset_password.js | 4 +- src/server.js | 7 +- src/socket/APISocketServer.js | 2 +- src/socket/MessageBroker.js | 4 +- src/socket/SockEvents.js | 8 +- src/socket/SocketClient.js | 2 +- src/socket/packets/README.md | 2 +- src/socket/packets/server.js | 23 +- src/ssr/PasswordReset.jsx | 2 +- src/store/actions/fetch.js | 6 +- src/store/actions/popup.js | 2 +- src/store/actions/socket.js | 2 +- src/store/middleware/audio.js | 2 +- src/store/middleware/title.js | 2 +- src/store/middleware/titlePopUp.js | 2 +- src/store/reducers/canvas.js | 6 +- src/store/reducers/chatRead.js | 10 +- src/store/reducers/fetching.js | 6 +- src/store/reducers/user.js | 2 +- src/store/reducers/windows.js | 4 +- src/store/selectors/popup.js | 2 +- src/store/store.js | 2 +- src/ui/Chunk.js | 4 +- src/ui/Chunk2D.js | 2 +- src/ui/Chunk3D.js | 18 +- src/ui/ChunkLoader.js | 2 +- src/ui/ChunkLoader2D.js | 22 +- src/ui/PixelNotify.js | 6 +- src/ui/PixelTransferController.js | 4 +- src/ui/Renderer2D.js | 6 +- src/ui/Renderer3D.js | 2 +- src/ui/Sky.js | 4 +- src/ui/loadImage.js | 3 +- src/ui/render2Delements.js | 2 +- src/utils/Counter.js | 3 +- src/utils/ProxyCheck.js | 8 +- src/utils/connectRedis.js | 2 +- src/utils/cron.js | 6 +- src/utils/ip.js | 16 +- src/utils/location.js | 3 +- src/utils/validation.js | 2 +- src/utils/whois.js | 6 +- 97 files changed, 2309 insertions(+), 290 deletions(-) create mode 100644 i18n/da.po create mode 100644 i18n/ssr-da.po diff --git a/i18n/da.po b/i18n/da.po new file mode 100644 index 00000000..0d6d4ae7 --- /dev/null +++ b/i18n/da.po @@ -0,0 +1,1570 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.2.2\n" + +#: src/controls/keypress.js:41 +#, javascript-format +msgid "Switched to ${ canvasName }" +msgstr "Skiftede til ${ canvasName }" + +#: src/controls/keypress.js:64 +msgid "Grid ON" +msgstr "Gitter På" + +#: src/controls/keypress.js:65 +msgid "Grid OFF" +msgstr "Gitter Fra" + +#: src/controls/keypress.js:75 +msgid "Pixel Notify ON" +msgstr "Pixel Notificer På" + +#: src/controls/keypress.js:76 +msgid "Pixel Notify OFF" +msgstr "Pixel Notificer Fra" + +#: src/controls/keypress.js:81 +msgid "Muted Sound" +msgstr "Stummet Lyd" + +#: src/controls/keypress.js:82 +msgid "Unmuted Sound" +msgstr "Ustummet Lyd" + +#: src/components/CoordinatesBox.jsx:28 src/components/GetIID.jsx:51 +#: src/controls/keypress.js:88 +msgid "Copied!" +msgstr "Kopieret!" + +#: src/controls/keypress.js:94 +msgid "Show Hidden Canvases" +msgstr "Vis Gemte Kanvasser" + +#: src/controls/keypress.js:95 +msgid "Hide Hidden Canvases" +msgstr "Skjul Skjulte Kanvasser" + +#: src/ui/PixelTransferController.js:63 +msgid "Error :(" +msgstr "Fejl :(" + +#: src/ui/PixelTransferController.js:64 +msgid "Didn't get an answer from pixelplanet. Maybe try to refresh?" +msgstr "Fik ikke et svar fra pixelplanet. Måske prøv at genindlæse?" + +#: src/ui/PixelTransferController.js:96 +msgid "Invalid Canvas" +msgstr "Ugyldig Kanvas" + +#: src/ui/PixelTransferController.js:97 +msgid "This canvas doesn't exist" +msgstr "Dette Kanvas existerer ikke" + +#: src/ui/PixelTransferController.js:100 src/ui/PixelTransferController.js:104 +#: src/ui/PixelTransferController.js:108 +msgid "Invalid Coordinates" +msgstr "Ugyldige Koordinater" + +#: src/ui/PixelTransferController.js:101 +msgid "x out of bounds" +msgstr "x ud af grænsen" + +#: src/ui/PixelTransferController.js:105 +msgid "y out of bounds" +msgstr "y ud af grænsen" + +#: src/ui/PixelTransferController.js:109 +msgid "z out of bounds" +msgstr "z ud af grænsen" + +#: src/ui/PixelTransferController.js:112 +msgid "Wrong Color" +msgstr "Forkerte Farve" + +#: src/ui/PixelTransferController.js:113 +msgid "Invalid color selected" +msgstr "Ugyldig farve valgt" + +#: src/ui/PixelTransferController.js:116 +msgid "Just for registered Users" +msgstr "Kun for registrerede Brugere" + +#: src/ui/PixelTransferController.js:117 +msgid "You have to be logged in to place on this canvas" +msgstr "Du har brug for at være logget in for at placere på dette kanvas" + +#: src/ui/PixelTransferController.js:120 +msgid "Place more :)" +msgstr "Placer mere :)" + +#: src/ui/PixelTransferController.js:122 +msgid "You can not access this canvas yet. You need to place more pixels" +msgstr "" +"Du kan ikke få adgang til dette kanvas endnu. Du har brug for at placere " +"flere pixels" + +#: src/ui/PixelTransferController.js:125 +msgid "Pixel protected!" +msgstr "Pixel beskyttet!" + +#: src/ui/PixelTransferController.js:132 +msgid "Please prove that you are human" +msgstr "Venligst bevis at du er et menneske" + +#: src/ui/PixelTransferController.js:136 +msgid "No Proxies Allowed :(" +msgstr "Ingen Proxier Tilladt :(" + +#: src/ui/PixelTransferController.js:137 +msgid "You are using a Proxy." +msgstr "Du bruger en Proxy." + +#: src/ui/PixelTransferController.js:140 +msgid "Not allowed" +msgstr "Ikke tilladt" + +#: src/ui/PixelTransferController.js:141 +msgid "Just the Top10 of yesterday can place here" +msgstr "Kun de Top10 fra i går kan placere her" + +#: src/ui/PixelTransferController.js:144 +msgid "You are weird" +msgstr "Du er mærkelig" + +#: src/ui/PixelTransferController.js:146 +msgid "" +"Server got confused by your pixels. Are you playing on multiple devices?" +msgstr "Server blev forvirret af dine pixels. Spiller du på flere enheder?" + +#: src/ui/PixelTransferController.js:149 +msgid "Banned" +msgstr "Bannet" + +#: src/ui/PixelTransferController.js:153 +msgid "Range Banned" +msgstr "Rækkevide Forbudt" + +#: src/ui/PixelTransferController.js:154 +msgid "Your Internet Provider is banned from playing this game" +msgstr "Din Internetudbyder er forbudt for at spille dette spil" + +#: src/ui/PixelTransferController.js:157 +msgid "Timeout" +msgstr "Timeout" + +#: src/ui/PixelTransferController.js:159 +msgid "" +"Didn't get an answer from pixelplanet. Maybe try to refresh if problem " +"persists?" +msgstr "" +"Fik ikke et svar fra pixelplanet. Måske prøv at genindlæse hvis problemet " +"vedvarer?" + +#: src/ui/PixelTransferController.js:162 +msgid "Weird" +msgstr "Underligt" + +#: src/ui/PixelTransferController.js:163 +msgid "Couldn't set Pixel" +msgstr "Kun ikke placere Pixel" + +#: src/ui/PixelTransferController.js:168 +#, javascript-format +msgid "Error ${ retCode }" +msgstr "Fejl ${ retCode }" + +#: src/ui/renderer.js:35 +msgid "Canvas Error" +msgstr "Kanvas Fejl" + +#: src/ui/renderer.js:36 +msgid "Can't render 3D canvas, do you have WebGL2 disabled?" +msgstr "Kan ikke gengive 3D-Kanvas, har du WebGL2 deaktiveret?" + +#: src/components/BanInfo.jsx:136 src/store/actions/index.js:7 +msgid "OK" +msgstr "OK" + +#: src/store/actions/fetch.js:55 +msgid "You made too many requests" +msgstr "Du lavede for mange anmodninger" + +#: src/store/actions/fetch.js:59 +#, javascript-format +msgid "try again after ${ ti }min" +msgstr "prøv igen efter ${ ti }min" + +#: src/store/actions/fetch.js:70 +msgid "Connection error ${ code } :(" +msgstr "Forbindelse fejl ${ code } :(" + +#: src/store/actions/fetch.js:103 src/store/actions/fetch.js:129 +msgid "Could not connect to server, please try again later :(" +msgstr "Kun ikke forbinde til server, prøv venligst igen senere :(" + +#: src/store/actions/fetch.js:151 src/store/actions/fetch.js:170 +#: src/store/actions/fetch.js:189 src/store/actions/fetch.js:208 +#: src/store/actions/fetch.js:227 +msgid "Unknown Error" +msgstr "Ukendt Fejl" + +#: src/store/actions/fetch.js:237 +msgid "Server answered with gibberish :(" +msgstr "Server svarede med volapyk :(" + +#: src/store/middleware/notifications.js:33 +msgid "Your next pixels are ready" +msgstr "Dine næste pixels er klar" + +#: src/store/middleware/notifications.js:37 +msgid "You can now place more on pixelplanet.fun :)" +msgstr "Du kan nu placere mere på pixelplanet.fun :)" + +#: src/store/middleware/notifications.js:54 +msgid "mentioned you" +msgstr "nævnte dig" + +#: src/store/middleware/notifications.js:58 +msgid "You have new messages in chat" +msgstr "Du har nye beskeder i chat" + +#: src/components/Converter.jsx:561 src/components/CoordinatesBox.jsx:31 +#: src/components/ModWatchtools.jsx:371 +msgid "Copy to Clipboard" +msgstr "Kopier til Klipboard" + +#: src/components/OnlineBox.jsx:40 +msgid "Online Users on Canvas" +msgstr "Online Brugere på Kanvas" + +#: src/components/OnlineBox.jsx:47 +msgid "Total Online Users" +msgstr "Online Brugere i alt" + +#: src/components/OnlineBox.jsx:55 +msgid "Pixels placed" +msgstr "Pixels placeret" + +#: src/components/buttons/ChatButton.jsx:88 +msgid "Close Chat" +msgstr "Luk Chat" + +#: src/components/buttons/ChatButton.jsx:88 +msgid "Open Chat" +msgstr "Åben Chat" + +#: src/components/buttons/CanvasSwitchButton.jsx:20 +#: src/components/windows/index.js:19 +msgid "Canvas Selection" +msgstr "Kanvas Udvælgelse" + +#: src/components/buttons/ExpandMenuButton.jsx:22 +msgid "Close Menu" +msgstr "Luk Menu" + +#: src/components/buttons/ExpandMenuButton.jsx:22 +msgid "Open Menu" +msgstr "Åben Menu" + +#: src/components/HistorySelect.jsx:144 +msgid "Loading" +msgstr "Indlæser" + +#: src/components/HistorySelect.jsx:145 +msgid "Select Date above" +msgstr "Vælg Dato Ovenfor" + +#: src/components/Admintools.jsx:103 src/components/ModCanvastools.jsx:222 +#: src/components/ModWatchtools.jsx:118 src/components/Window.jsx:157 +#: src/components/Window.jsx:260 +#: src/components/contextmenus/ChannelContextMenu.jsx:59 +msgid "Close" +msgstr "Luk" + +#: src/components/Window.jsx:173 +msgid "PopUp" +msgstr "PopUp" + +#: src/components/Window.jsx:184 +msgid "Restore" +msgstr "Gendan" + +#: src/components/Window.jsx:221 +msgid "Clone" +msgstr "Klon" + +#: src/components/Window.jsx:229 +msgid "Move" +msgstr "Bevæg" + +#: src/components/Window.jsx:252 +msgid "Maximize" +msgstr "Maximer" + +#: src/components/Window.jsx:268 +msgid "Resize" +msgstr "Ændre størrelse" + +#: src/components/buttons/DownloadButton.jsx:36 +msgid "Make Screenshot" +msgstr "Lav Skærmbillede" + +#: src/components/buttons/LogInButton.jsx:20 src/components/windows/index.js:15 +msgid "User Area" +msgstr "Bruger Område" + +#: src/components/buttons/PalselButton.jsx:30 +msgid "Close Palette" +msgstr "Luk Palet" + +#: src/components/buttons/PalselButton.jsx:30 +msgid "Open Palette" +msgstr "Åben" + +#: src/components/buttons/GlobeButton.jsx:34 +msgid "Globe View" +msgstr "Globus Visning" + +#: src/components/BanInfo.jsx:75 src/components/buttons/HelpButton.jsx:20 +#: src/components/windows/index.js:13 +msgid "Help" +msgstr "Hjælp" + +#: src/components/buttons/SettingsButton.jsx:21 +#: src/components/windows/index.js:14 +msgid "Settings" +msgstr "Indstillinger" + +#: src/components/windows/index.js:16 +msgid "Registration" +msgstr "Registering" + +#: src/components/windows/index.js:17 +msgid "Forgot Password" +msgstr "Glemt Adgangskode" + +#: src/components/windows/index.js:18 +msgid "Chat" +msgstr "Chat" + +#: src/components/windows/index.js:20 +msgid "Canvas Archive" +msgstr "Kanvas Arkiv" + +#: src/components/GlobalCaptcha.jsx:47 +msgid "You took too long, try again." +msgstr "Du tog for lang tid, prøv igen." + +#: src/components/GlobalCaptcha.jsx:50 +msgid "You failed your captcha" +msgstr "Du fejlede captchaen" + +#: src/components/GlobalCaptcha.jsx:53 +msgid "No or invalid captcha text" +msgstr "Ingen eller ugyldig captcha text" + +#: src/components/GlobalCaptcha.jsx:56 +msgid "No captcha id given" +msgstr "Ingen captcha id givet" + +#: src/components/GlobalCaptcha.jsx:59 +msgid "Unknown Captcha Error" +msgstr "Ukendt Captcha fejl" + +#: src/components/BanInfo.jsx:80 src/components/Captcha.jsx:77 +#: src/components/ChangeMail.jsx:72 src/components/ChangeName.jsx:58 +#: src/components/ChangePassword.jsx:79 src/components/DeleteAccount.jsx:55 +#: src/components/GlobalCaptcha.jsx:71 src/components/LogInForm.jsx:70 +#: src/components/windows/ForgotPassword.jsx:73 +#: src/components/windows/Register.jsx:89 +msgid "Error" +msgstr "Fejl" + +#: src/components/ChangeMail.jsx:93 src/components/ChangeName.jsx:70 +#: src/components/ChangePassword.jsx:115 src/components/DeleteAccount.jsx:68 +#: src/components/GlobalCaptcha.jsx:80 +#: src/components/windows/ForgotPassword.jsx:89 +#: src/components/windows/Register.jsx:133 +msgid "Cancel" +msgstr "Annuller" + +#: src/components/GlobalCaptcha.jsx:86 +msgid "Send" +msgstr "Send" + +#: src/components/BanInfo.jsx:66 +msgid "You are banned. You think it is unjustifed? Check out the " +msgstr "Du er bannet. Tror du at det er uretfærdigt? Tjek ud " + +#: src/components/BanInfo.jsx:76 +msgid " on how to appeal." +msgstr " på hvordan man kan appellerer." + +#: src/components/BanInfo.jsx:85 src/components/ModIIDtools.jsx:73 +msgid "Reason" +msgstr "Grund" + +#: src/components/BanInfo.jsx:91 +msgid "By Mod" +msgstr "Fra Mod" + +#: src/components/BanInfo.jsx:97 src/components/ModIIDtools.jsx:84 +msgid "Duration" +msgstr "Varighed" + +#: src/components/BanInfo.jsx:99 +msgid "Your ban expires at " +msgstr "Din ban udløber på " + +#: src/components/BanInfo.jsx:101 +msgid " which is in " +msgstr " som er i " + +#: src/components/BanInfo.jsx:112 +msgid "Unbanned" +msgstr "Ophævet Ban" + +#: src/components/BanInfo.jsx:113 +msgid "Now that you have seen this message, you are no longer banned." +msgstr "Nu når du har set denne besked, er du ikke længere bannet." + +#: src/components/BanInfo.jsx:127 +msgid "Why?" +msgstr "Hvorfor?" + +#: src/components/windows/Help.jsx:42 +msgid "Place color pixels on a large canvas with other players online!" +msgstr "Placer farvede pixels på en stor kanvas med andre spillere online!" + +#: src/components/windows/Help.jsx:43 +msgid "" +"Our main canvas is a huge worldmap, you can place wherever you like, but you " +"will have to wait a specific Cooldown between pixels. You can check out the " +"cooldown and requirements on the Canvas Selection menu (globe button on " +"top). Some canvases have a different cooldown for replacing a user-set " +"pixels than placing on a unset pixel. i.e. 4s/7s means 4s on fresh pixels " +"and 7s on already set pixels." +msgstr "" +"Vores hovedkanvas er et kæmpe verdenskort, man kan placere hvor henne man " +"vil, men du vil have brug for at vente et specifikt Nedkøling i mellem " +"pixels. Du kan tjekke ud Nedkølingen og krav på Kanvas Udvælgelse menuen " +"(globus knap på toppen). Nogle Kanvasser har forskellige nedkølninger for at " +"erstatte en bruger-sat pixels end at placere på et uberørt pixel. D.v.s. " +"4s/7s betyder 4s på friske pixels og 7s på allerede placerede pixels." + +#: src/components/windows/Help.jsx:47 +msgid "" +"Higher zoomlevels take some time to update, the 3D globe gets updated at " +"least once per day." +msgstr "" +"Højere zoomniveauer tager noget tid til at opdatere, 3D kloden bliver " +"opdateret på mindst en gang hver dag." + +#: src/components/windows/Help.jsx:48 +msgid "Have fun!" +msgstr "Hav' det sjovt!" + +#: src/components/windows/Help.jsx:50 +msgid "recommended" +msgstr "anbefalede" + +#: src/components/windows/Help.jsx:51 +msgid "Source on " +msgstr "Kilde på " + +#: src/components/windows/Help.jsx:52 +msgid "Map Data" +msgstr "Kort Data" + +#: src/components/windows/Help.jsx:53 +msgid "" +"The bare map data that we use, together with converted OpenStreetMap tiles " +"for orientation, can be downloaded from mega.nz here: " +msgstr "" +"Det kortdata som vi bruger, sammen med konverterede OpenStreetMap fliser for " +"orientering, kan blive downloadet fra mega.nz her: " + +#: src/components/windows/Help.jsx:55 +msgid "Banned? Detected as Proxy?" +msgstr "Bannet? Detekted som Proxy?" + +#: src/components/windows/Help.jsx:57 +#, javascript-format +msgid "" +"If you got detected as proxy, but you are none, or think that you got " +"wrongfully banned, please go to our ${ guildedLink } or send us an e-mail to " +"${ mailLink } and include the following IID:" +msgstr "" +"Hvis du blev detektet som en proxy, men du ikke er en, eller tror at du blev " +"uretmæssigt bannet, venligst gå til vores ${ guildedLink } eller send os en " +"e-mail til ${ mailLink } og inkluder den følgene IID:" + +#: src/components/windows/Help.jsx:60 src/components/windows/Help.jsx:77 +msgid "Controls" +msgstr "Kontroller" + +#: src/components/windows/Help.jsx:62 +msgid "Click a color in palette to select it" +msgstr "Klik på en farve i paletten for at vælge den" + +#: src/components/windows/Help.jsx:63 +#, javascript-format +msgid "Press ${ bindG } to toggle grid" +msgstr "Tryk ${ bindG } for at til/fra gitter" + +#: src/components/windows/Help.jsx:64 +msgid "Press ${ bindX } to toggle showing of pixel activity" +msgstr "Tryk på ${ bindX } for at til/fra visningen af pixel aktivitet" + +#: src/components/windows/Help.jsx:65 +#, javascript-format +msgid "Press ${ bindH } to toggle historical view" +msgstr "Tryk på ${ bindH } for at til/fra historisk visning" + +#: src/components/windows/Help.jsx:66 +msgid "Press ${ bindR } to copy coordinates" +msgstr "Tryk på ${ bindR } for at kopiere koordinater" + +#: src/components/windows/Help.jsx:67 +#, javascript-format +msgid "Press ${ bindQ } or ${ bindE } to zoom" +msgstr "Tryk på ${ bindQ } eller ${ bindE } for at zoome" + +#: src/components/windows/Help.jsx:68 src/components/windows/Help.jsx:79 +#, javascript-format +msgid "Press ${ bindW }, ${ bindA }, ${ bindS }, ${ bindD } to move" +msgstr "Tryk ${ bindW }, ${ bindA }, ${ bindS }, ${ bindD } for at bevæge sig" + +#: src/components/windows/Help.jsx:69 src/components/windows/Help.jsx:80 +#, javascript-format +msgid "" +"Press ${ bindAUp }, ${ bindALeft }, ${ bindADown }, ${ bindARight } to move" +msgstr "" +"Tryk på ${ bindAUp }, ${ bindALeft }, ${ bindADown }, ${ bindARight } for at " +"bevæge sig" + +#: src/components/windows/Help.jsx:70 +msgid "Drag ${ mouseSymbol } mouse or ${ touchSymbol } pan to move" +msgstr "" +"Træk ${ mouseSymbol } mus eller ${ touchSymbol } panorer for at bevæge sig" + +#: src/components/windows/Help.jsx:71 +#, javascript-format +msgid "Scroll ${ mouseSymbol } mouse wheel or ${ touchSymbol } pinch to zoom" +msgstr "" +"Skrol ${ mouseSymbol } mus hjul eller ${ touchSymbol } knib for at zoome" + +#: src/components/windows/Help.jsx:72 +msgid "Hold left ${ bindShift } for placing while moving mouse" +msgstr "Hold venstre ${ bindShift } for at placere imens man bevæger musen" + +#: src/components/windows/Help.jsx:73 +#, javascript-format +msgid "" +"Hold right ${ bindShift } for placing while moving mouse according to " +"historical view" +msgstr "" +"Hold højre ${ bindShift } for at placere imens man bevæger sin mus ifølge " +"historisk visning" + +#: src/components/windows/Help.jsx:74 src/components/windows/Help.jsx:85 +#, javascript-format +msgid "${ mouseSymbol } Left click or ${ touchSymbol } tap to place a pixel" +msgstr "" +"${ mouseSymbol } Venstre klik eller ${ touchSymbol } tryk for at placere en " +"pixel" + +#: src/components/windows/Help.jsx:75 src/components/windows/Help.jsx:87 +msgid "" +"Click ${ mouseSymbol } middle mouse button or ${ touchSymbol } long-tap to " +"select current hovering color" +msgstr "" +"Tryk ${ mouseSymbol } midterste museknap eller${ touchSymbol } hold inde for " +"at vælge farven af pixellen som du rør" + +#: src/components/windows/Help.jsx:81 +msgid "Press ${ bindE } and ${ bindC } to fly up and down" +msgstr "Tryk ${ bindE } og ${ bindC } for at flyve op og ned" + +#: src/components/windows/Help.jsx:82 +#, javascript-format +msgid "${ mouseSymbol } Hold left mouse button and drag mouse to rotate" +msgstr "${ mouseSymbol } Hold venstre museknap og træk din mus for at rotere" + +#: src/components/windows/Help.jsx:83 +#, javascript-format +msgid "" +"${ mouseSymbol } Scroll mouse wheel or hold ${ mouseSymbol } middle mouse " +"button and drag to zoom" +msgstr "" +"${ mouseSymbol } Skrol musehjulet eller hold ${ mouseSymbol } midterste " +"museknap og træk for at zoome" + +#: src/components/windows/Help.jsx:84 +msgid "${ mouseSymbol } Right click and drag mouse to pan" +msgstr "${ mouseSymbol } Højreklik og træk din mus for at panorere" + +#: src/components/windows/Help.jsx:86 +#, javascript-format +msgid "" +"${ mouseSymbol } Right click or ${ touchSymbol } double-tap to remove a pixel" +msgstr "" +"${ mouseSymbol } Højreklik eller ${ touchSymbol } dobbelt-tryk for at fjerne " +"en pixel" + +#: src/components/windows/Help.jsx:91 +msgid "" +"We thanks those artists very much, they offered their palettes to the public " +"on" +msgstr "" +"Vi takker disse artister meget, de offerede deres paletter til " +"offentligheden på" + +#: src/components/windows/Help.jsx:94 +#, javascript-format +msgid "Credit for the Palette of the Moon goes to ${ starhouseLink }." +msgstr "Kredit for Paletten for månen går til ${ starhouseLink }." + +#: src/components/windows/Help.jsx:97 +msgid "Credit for the Palette of the Top10 canvas goes to ${ vinikLink }." +msgstr "Kredit til paletten for Top10 Kanvasset går til ${ vinikLink }." + +#: src/components/windows/UserArea.jsx:36 +#: src/components/windows/UserArea.jsx:56 +msgid "Profile" +msgstr "Profil" + +#: src/components/windows/UserArea.jsx:59 +msgid "Statistics" +msgstr "Statistikker" + +#: src/components/windows/UserArea.jsx:64 +msgid "Converter" +msgstr "Konverter" + +#: src/components/windows/UserArea.jsx:70 +msgid "Modtools" +msgstr "Modværktøjer" + +#: src/components/windows/UserArea.jsx:71 +msgid "Loading..." +msgstr "Indlæser..." + +#: src/components/windows/UserArea.jsx:78 +msgid "Consider joining us on Guilded:" +msgstr "Overvej at joine os på Guilded:" + +#: src/components/windows/Register.jsx:87 +msgid "Register new account here" +msgstr "Registrer en ny konto her" + +#: src/components/windows/Register.jsx:92 +#: src/components/windows/Register.jsx:98 +msgid "Name" +msgstr "Navn" + +#: src/components/windows/ForgotPassword.jsx:80 +#: src/components/windows/Register.jsx:100 +#: src/components/windows/Register.jsx:106 +msgid "Email" +msgstr "Email" + +#: src/components/ChangeMail.jsx:80 src/components/DeleteAccount.jsx:62 +#: src/components/LogInForm.jsx:84 src/components/windows/Register.jsx:108 +#: src/components/windows/Register.jsx:114 +msgid "Password" +msgstr "Adgangskode" + +#: src/components/windows/Register.jsx:116 +#: src/components/windows/Register.jsx:122 +msgid "Confirm Password" +msgstr "Bekræft Adgangskode" + +#: src/components/windows/Register.jsx:124 +msgid "Captcha" +msgstr "Captcha" + +#: src/components/Admintools.jsx:154 src/components/Admintools.jsx:238 +#: src/components/ModCanvastools.jsx:302 src/components/ModCanvastools.jsx:382 +#: src/components/ModCanvastools.jsx:455 src/components/ModCanvastools.jsx:546 +#: src/components/ModIIDtools.jsx:135 +#: src/components/windows/ForgotPassword.jsx:84 +#: src/components/windows/Register.jsx:127 +msgid "Submit" +msgstr "Indsend" + +#: src/components/windows/Settings.jsx:86 +msgid "Show Grid" +msgstr "Vis Gitter" + +#: src/components/windows/Settings.jsx:91 +msgid "Turn on grid to highlight pixel borders." +msgstr "Tænd for gitter for at fremhæve pixel grænser." + +#: src/components/windows/Settings.jsx:94 +msgid "Show Pixel Activity" +msgstr "Vis Pixel Aktivitet" + +#: src/components/windows/Settings.jsx:99 +msgid "Show circles where pixels are placed." +msgstr "Vis cirkler hvor pixels er placeret." + +#: src/components/windows/Settings.jsx:102 +msgid "Disable Game Sounds" +msgstr "Deaktiver Spil Lyde" + +#: src/components/windows/Settings.jsx:108 +msgid "All sound effects will be disabled." +msgstr "Alle lyde vil blive deaktiveret." + +#: src/components/windows/Settings.jsx:112 +msgid "" +"Your Browser doesn't allow us to use AudioContext to play sounds. Do you " +"have some privacy feature blocking us?" +msgstr "" +"Din Browser tillader os ikke til at bruge AudioContext til at spille lyde. " +"Har du en privat funktion der blokere os?" + +#: src/components/windows/Settings.jsx:118 +msgid "Enable chat notifications" +msgstr "Aktiver chat notificationer" + +#: src/components/windows/Settings.jsx:122 +msgid "Play a sound when new chat messages arrive" +msgstr "Spil en lyd når nye chat beskeder ankommer" + +#: src/components/windows/Settings.jsx:125 +msgid "Auto Zoom In" +msgstr "Auto Zoom in" + +#: src/components/windows/Settings.jsx:130 +msgid "" +"Zoom in instead of placing a pixel when you tap the canvas and your zoom is " +"small." +msgstr "" +"Zoom ind i stedet for at placere en pixel når du trykker på kanvasset og dit " +"zoom er lille." + +#: src/components/windows/Settings.jsx:133 +msgid "Compact Palette" +msgstr "Kompakt Palet" + +#: src/components/windows/Settings.jsx:138 +msgid "Display Palette in a compact form that takes less screen space." +msgstr "Vis Palet i en kompakt form der tager mindre skærm plads." + +#: src/components/windows/Settings.jsx:141 +msgid "Potato Mode" +msgstr "Kartoffeltilstand" + +#: src/components/windows/Settings.jsx:145 +msgid "For when you are playing on a potato." +msgstr "For når du spiller på en kartoffel." + +#: src/components/Converter.jsx:376 src/components/windows/Settings.jsx:148 +msgid "Light Grid" +msgstr "Lys Gitter" + +#: src/components/windows/Settings.jsx:152 +msgid "Show Grid in white instead of black." +msgstr "Vis Gitter i hvid i stedet for sort." + +#: src/components/windows/Settings.jsx:156 +msgid "Historical View" +msgstr "Historisk Visning" + +#: src/components/windows/Settings.jsx:161 +msgid "Check out past versions of the canvas." +msgstr "Tjek tidligere versioner af kanvasset ud." + +#: src/components/windows/Settings.jsx:166 +msgid "Themes" +msgstr "Temaer" + +#: src/components/windows/Settings.jsx:171 +msgid "How pixelplanet should look like." +msgstr "Hvordan pixelplanet burde se ud." + +#: src/components/windows/Settings.jsx:178 +msgid "Select Language" +msgstr "Vælg Sprog" + +#: src/components/windows/CanvasSelect.jsx:29 +msgid "" +"Select the canvas you want to use. Every canvas is unique and has different " +"palettes, cooldown and requirements. Archive of closed canvases can be " +"accessed here:" +msgstr "" +"Vælg det kanvas som du vil gerne bruge. Hvert kanvas er unikt og har " +"forskellige paletter, nedkøling og krav. Arkiv af lukkede kanvasser kan " +"blive tilgået her:" + +#: src/components/windows/CanvasSelect.jsx:37 +msgid "Archive" +msgstr "Arkiv" + +#: src/components/windows/Archive.jsx:16 +msgid "" +"While we tend to not delete canvases, some canvases are started for fun or " +"as a request by users who currently like a meme. Those canvases can get " +"boring after a while and after weeks of no major change and if they really " +"aren't worth being kept active, we decide to remove them." +msgstr "" +"Selvom vi plejer at ikke slette kanvasser, nogle kanvasser er started for " +"sjov, eller som en anmodning fra brugere som i øjeblikket kan lide et meme. " +"De kanvasser kan blive kedelige efter noget tid og after uger med ingen stor " +"forandring og hvis de virkelig ikke are værd at blive holdt aktive, vi " +"beslutter at fjerne dem." + +#: src/components/windows/Archive.jsx:18 +msgid "" +"Here we collect those canvases to archive them in a proper way (which is " +"currently just one)." +msgstr "" +"Her indsamler vi de kanvasser for at arkivere dem i en ordentlig måde (som " +"er i øjeblikket kun en)." + +#: src/components/windows/Archive.jsx:20 +msgid "Political Compass Canvas" +msgstr "Politisk Kompas Kanvas" + +#: src/components/windows/Archive.jsx:27 +msgid "" +"This canvas got requested during a time of political conflicts on the main " +"Earth canvas. It was a 1024x1024 representation of the political compass " +"with a 5s cooldown and 60s stacking. It got launched on May 11th and " +"remained active for months till it got shut down on November 30th." +msgstr "" +"Dette kanvas blev anmodet om i løbet af en tid af politiske konflikter på " +"Jorden kanvasset. Det var et 1024x1024 representation af det politiske " +"kompas med et 5s nedkøling og 60s stabling. Den blev iværksat i Maj 11th og " +"forblev aktiv i måneder indtil det blev lukket ned i November 30th." + +#: src/components/windows/Archive.jsx:28 +msgid "" +"We decided to archive it as a timelapse with lossless encoded webm. Taking a " +"screenshot from the timelapse results in a perfect 1:1 representation of how " +"the canvas was at that time." +msgstr "" +"We besluttede at arkivere det som et tidforskydning med tabsfri kodet webm. " +"Hvis man tager et skærmbillede fra tidsforskydningen resultere i et perfect " +"1:1 repræsentation af hvordan kanvasset var på det tidspunk." + +#: src/components/windows/Chat.jsx:180 +msgid "Start chatting here" +msgstr "Begynd at chatte her" + +#: src/components/windows/Chat.jsx:217 +msgid "Chat here" +msgstr "Chat her" + +#: src/components/windows/Chat.jsx:243 +msgid "You must be logged in to chat" +msgstr "Du skal være logget ind for at chatte" + +#: src/components/windows/Chat.jsx:273 +msgid "Channel settings" +msgstr "Kanal indstillinger" + +#: src/components/windows/ForgotPassword.jsx:58 +msgid "Sent you a mail with instructions to reset your password." +msgstr "" +"Sendte dig en mail med instruktioner om hvordan man nustiller sin " +"adgangskode." + +#: src/components/windows/ForgotPassword.jsx:69 +msgid "Enter your mail address and we will send you a new password:" +msgstr "Indsæt din mailadresse og vi vil sende dig en ny adgangskode:" + +#: src/components/Captcha.jsx:51 src/components/Captcha.jsx:105 +msgid "Could not load captcha" +msgstr "Kun ikke indlæse captchaen" + +#: src/components/Captcha.jsx:69 +msgid "Type the characters from the following image:" +msgstr "Skriv tegnene fra det følgene billede:" + +#: src/components/Captcha.jsx:72 +msgid "Tip: Not case-sensitive; I and l are the same" +msgstr "Tip: Ikke case-sensitiv; I og l er det samme" + +#: src/components/Captcha.jsx:114 +msgid "Load Captcha" +msgstr "Indlæs Captcha" + +#: src/components/Captcha.jsx:119 +msgid "Click to Load Captcha" +msgstr "Klik for at indlæse Captcha" + +#: src/components/Captcha.jsx:124 +msgid "Can't read? Reload:" +msgstr "Kan ikke læse? Genindlæs:" + +#: src/components/Captcha.jsx:128 +msgid "Reload" +msgstr "Genindlæs" + +#: src/components/Captcha.jsx:138 +msgid "Enter Characters" +msgstr "Indtast Tegnene" + +#: src/utils/validation.js:17 +msgid "Email can't be empty." +msgstr "Email må ikke være tom." + +#: src/utils/validation.js:18 +msgid "Email should be at least 5 characters long." +msgstr "Email skal være mindst 5 tegn lang." + +#: src/utils/validation.js:19 +msgid "Email can't be longer than 40 characters." +msgstr "Email kan ikke være længere end 40 tegn." + +#: src/utils/validation.js:20 +msgid "Email should at least contain a dot" +msgstr "Email skal indholde i det mindste én prik" + +#: src/utils/validation.js:22 +msgid "Email should contain a @" +msgstr "Email skal indholde et @" + +#: src/utils/validation.js:29 +msgid "Name can't be empty." +msgstr "Navn kan ikke være tomt." + +#: src/utils/validation.js:30 +msgid "Name must be at least 2 characters long" +msgstr "Navn må være mindst 2 tegn langt" + +#: src/utils/validation.js:31 +msgid "Name must be shorter than 26 characters" +msgstr "Navn må være kortere end 26 tegn" + +#: src/utils/validation.js:38 +msgid "Name contains invalid character like @, /, \\ or #" +msgstr "Navn indeholder ugyldige tegn f.eks. @, /, \\ eller #" + +#: src/utils/validation.js:53 +msgid "No password given." +msgstr "Ingen adgangskode angivet." + +#: src/utils/validation.js:56 +msgid "Password must be at least 6 characters long." +msgstr "Adgangskode må mindst være 6 tegn lang." + +#: src/utils/validation.js:59 +msgid "Password must be shorter than 60 characters." +msgstr "Adgangskode skal være kortere end 60 tegn." + +#: src/components/GetIID.jsx:44 +msgid "Get IID" +msgstr "Få IID" + +#: src/components/GetIID.jsx:53 +msgid "Copy" +msgstr "Kopi" + +#: src/components/LogInArea.jsx:19 +msgid "Login to access more features and stats." +msgstr "Login for at få adgang til flere funktioner og statistikker." + +#: src/components/LogInArea.jsx:21 +msgid "Login with Name or Mail:" +msgstr "Login med Navn eller Mail:" + +#: src/components/LogInArea.jsx:28 +msgid "I forgot my Password." +msgstr "Jeg glemte min Adgangskode." + +#: src/components/LogInArea.jsx:29 +msgid "or login with:" +msgstr "eller login med:" + +#: src/components/LogInArea.jsx:70 +msgid "or register here:" +msgstr "eller register her:" + +#: src/components/LogInArea.jsx:75 +msgid "Register" +msgstr "Register" + +#: src/components/UserAreaContent.jsx:62 +msgid "Todays Placed Pixels" +msgstr "Dagens Placerede Pixels" + +#: src/components/UserAreaContent.jsx:66 +msgid "Daily Rank" +msgstr "Daglig Rang" + +#: src/components/UserAreaContent.jsx:71 +msgid "Placed Pixels" +msgstr "Placerede Pixels" + +#: src/components/UserAreaContent.jsx:75 +msgid "Total Rank" +msgstr "Samlet Rang" + +#: src/components/UserAreaContent.jsx:80 +#, javascript-format +msgid "Your name is: ${ name }" +msgstr "Dit navn er: ${ name }" + +#: src/components/UserAreaContent.jsx:86 +msgid "Log out" +msgstr "Log ud" + +#: src/components/UserAreaContent.jsx:93 +msgid "Change Username" +msgstr "Ændre Brugernavn" + +#: src/components/UserAreaContent.jsx:103 +msgid "Change Mail" +msgstr "Ændre Mail" + +#: src/components/UserAreaContent.jsx:112 +msgid "Change Password" +msgstr "Skift Adgangskode" + +#: src/components/UserAreaContent.jsx:119 +msgid "Delete Account" +msgstr "Slet Konto" + +#: src/components/UserAreaContent.jsx:126 +msgid "Social Settings" +msgstr "Sociale Indstillinger" + +#: src/components/Converter.jsx:190 src/components/ModCanvastools.jsx:226 +msgid "Choose Canvas" +msgstr "Vælg Kanvas" + +#: src/components/Converter.jsx:216 +msgid "Palette Download" +msgstr "Palet Download" + +#: src/components/Converter.jsx:218 +#, javascript-format +msgid "Palette for ${ gimpLink }" +msgstr "Palet for ${ gimpLink }" + +#: src/components/Converter.jsx:236 +msgid "Image Converter" +msgstr "Billede Konverter" + +#: src/components/Converter.jsx:237 +msgid "Convert an image to canvas colors" +msgstr "Konverter et billede til Canvas farver" + +#: src/components/Converter.jsx:256 +msgid "Choose Strategy" +msgstr "Vælg Strategi" + +#: src/components/Converter.jsx:294 +msgid "Serpentine" +msgstr "Serpentin" + +#: src/components/Converter.jsx:296 +msgid "Minimum Color Distance" +msgstr "Minimum Farve Afstand" + +#: src/components/Converter.jsx:323 +msgid "Calculate like GIMP" +msgstr "Beregn som GIMP" + +#: src/components/Converter.jsx:327 +msgid "Choose Color Mode" +msgstr "Vælg Farvetilstand" + +#: src/components/Converter.jsx:356 +msgid "Add Grid (uncheck if you need a 1:1 template)" +msgstr "" +"TIlføj Gitter (fjern markeringen, hvis du har brug for en 1:1 skabelon)" + +#: src/components/Converter.jsx:378 src/components/Converter.jsx:394 +msgid "Offset" +msgstr "Offset" + +#: src/components/Converter.jsx:423 +msgid "Scale Image" +msgstr "Skaler Billede" + +#: src/components/Converter.jsx:434 +msgid "Width" +msgstr "Bredde" + +#: src/components/Converter.jsx:465 +msgid "Height" +msgstr "Højde" + +#: src/components/Converter.jsx:504 +msgid "Keep Ratio" +msgstr "Behold Forhold" + +#: src/components/Converter.jsx:517 +msgid "Anti Aliasing" +msgstr "Anti Aliasing" + +#: src/components/Converter.jsx:531 +msgid "Reset" +msgstr "Nulstil" + +#: src/components/Converter.jsx:549 +msgid "Download Template" +msgstr "Hent Template" + +#: src/components/Rankings.jsx:147 +msgid "Total" +msgstr "I Alt" + +#: src/components/Rankings.jsx:156 +msgid "Today" +msgstr "I Dag" + +#: src/components/Rankings.jsx:165 +msgid "Yesterday" +msgstr "I Går" + +#: src/components/Rankings.jsx:174 +msgid "Countries Today" +msgstr "Lande i Dag" + +#: src/components/Rankings.jsx:183 +msgid "Charts" +msgstr "Diagrammer" + +#: src/components/Rankings.jsx:201 src/components/Rankings.jsx:210 +#: src/components/Rankings.jsx:219 +msgid "User" +msgstr "Bruger" + +#: src/components/Rankings.jsx:226 +msgid "Country" +msgstr "Land" + +#: src/components/Rankings.jsx:286 +msgid "Ranking updates every 5 min. Daily rankings get reset at midnight UTC." +msgstr "" +"Rangerne opdaterer hver 5 min. Daglige rang bliver nulstillet ved midnat UTC." + +#: src/components/ChangeMail.jsx:91 src/components/ChangeName.jsx:68 +#: src/components/ChangePassword.jsx:109 src/components/LanguageSelect.jsx:80 +msgid "Save" +msgstr "Gem" + +#: src/components/CanvasItem.jsx:29 +msgid "Online Users" +msgstr "Online Brugerer" + +#: src/components/CanvasItem.jsx:34 +msgid "Cooldown" +msgstr "Nedkøling" + +#: src/components/CanvasItem.jsx:40 +msgid "Stacking till" +msgstr "Stabler indtil" + +#: src/components/CanvasItem.jsx:42 +msgid "Ranked" +msgstr "Rangeret" + +#: src/components/CanvasItem.jsx:44 +msgid "Yes" +msgstr "Ja" + +#: src/components/CanvasItem.jsx:44 +msgid "No" +msgstr "Nej" + +#: src/components/CanvasItem.jsx:50 +msgid "Requirements" +msgstr "Krav" + +#: src/components/CanvasItem.jsx:53 +msgid "User Account" +msgstr "Bruger Konto" + +#: src/components/CanvasItem.jsx:55 +#, javascript-format +msgid "and ${ canvas.req } Pixels set" +msgstr "og ${ canvas.req } Pixels indstillet" + +#: src/components/CanvasItem.jsx:58 +msgid "Top 10 Daily Ranking" +msgstr "Top 10 Daglig Rangering" + +#: src/components/CanvasItem.jsx:64 +msgid "Dimensions" +msgstr "Dimensioner" + +#: src/core/chartSettings.js:30 +msgid "Top 10 Countries [pxls / day]" +msgstr "Top 10 Lande [pxls / day]" + +#: src/core/chartSettings.js:127 +msgid "Players and Pixels per hour" +msgstr "Spillere og Pixels per time" + +#: src/core/chartSettings.js:221 +msgid "Top 10 Players [pxls / day]" +msgstr "Top 10 Spillere [pxls / day]" + +#: src/core/chartSettings.js:294 +msgid "Countries by Pixels Today" +msgstr "Lande efter Pixels I dag" + +#: src/core/chartSettings.js:352 +msgid "Total Pixels placed per day" +msgstr "Antal Pixels placeret pr. dag" + +#: src/components/LogInForm.jsx:77 +msgid "Name or Email" +msgstr "Navn eller Email" + +#: src/components/LogInForm.jsx:88 +msgid "LogIn" +msgstr "LogIn" + +#: src/components/ChangePassword.jsx:21 +msgid "Passwords do not match." +msgstr "Adgangskoder matcher ikke." + +#: src/components/ChangePassword.jsx:44 +msgid "Changed Password successfully." +msgstr "Ændrede Adgangskoder succesfuldt." + +#: src/components/ChangePassword.jsx:88 +msgid "Old Password" +msgstr "Gamle Adgangskode" + +#: src/components/ChangePassword.jsx:96 +msgid "New Password" +msgstr "Nye Adgangskode" + +#: src/components/ChangePassword.jsx:103 +msgid "Confirm New Password" +msgstr "Bekræft Nye Adgangskode" + +#: src/components/UserMessages.jsx:28 +msgid "" +"Please verify your mail address or your account could get deleted after a " +"few days." +msgstr "" +"Venligst bekræft dine mailaddresse eller din konto kunne blive slettet after " +"nogle par dage." + +#: src/components/UserMessages.jsx:49 +msgid "A new verification mail is getting sent to you." +msgstr "En ny bekræftelsesmail bliver sent til dig." + +#: src/components/UserMessages.jsx:53 +msgid "Click here to request a new verification mail." +msgstr "Klik her for at anmode om et nyt bekræftelsesmail." + +#: src/components/ChangeMail.jsx:59 +msgid "" +"Changed Mail successfully. We sent you a verification mail, " +"please verify your new mail address." +msgstr "" +"Ændrede Mail succesfuldt. Vi sendte dig en bekræftelsesmail, " +"venligst bekræft din nye mail adresse." + +#: src/components/ChangeMail.jsx:87 +msgid "New Mail" +msgstr "Nye Mail" + +#: src/components/ChangeName.jsx:64 +msgid "New Username" +msgstr "Nye Brugernavn" + +#: src/components/DeleteAccount.jsx:66 +msgid "Yes, Delete My Account!" +msgstr "Ja, Slet Min Konto!" + +#: src/components/ModCanvastools.jsx:168 +msgid "Build image on canvas." +msgstr "Byg billede på kanvas." + +#: src/components/ModCanvastools.jsx:171 +msgid "Build image and set it to protected." +msgstr "Byg billede og sæt det til beskyttet." + +#: src/components/ModCanvastools.jsx:174 +msgid "Build image, but reset cooldown to unset-pixel cd." +msgstr "Byg billede, men nulstil nedkøling til ikke-sat pixel cd." + +#: src/components/ModCanvastools.jsx:184 +msgid "Clean spare pixels that are surrounded by unset pixels" +msgstr "Rengør pixels der er omringet af ikke-sat pixels" + +#: src/components/ModCanvastools.jsx:188 +msgid "" +"Clean spare pixels that are surrounded by unset pixels and up to 1 other set " +"pixels" +msgstr "" +"Rengør pixels der er omringet af ikke-sat pixels og op til 1 anden set pixels" + +#: src/components/ModCanvastools.jsx:192 +msgid "" +"Clean spare pixels that are surrounded by a single other color or unset " +"pixels (VERY AGGRESSIVE ON CANVASES THAT ALLOW UNSET PIXELS (where there are " +"two cooldowns)!)" +msgstr "" +"Rengør pixels der or omringet af en eneste anden farve eller ikke-sat pixels " +"(MEGET AGGRESSIV PÅ KANVASSER DER TILLADER IKKE-SAT PIXELS (hvor der er to " +"nedkølinger)" + +#: src/components/ModCanvastools.jsx:203 +msgid "Status: Not running" +msgstr "Status: Ikke oppe" + +#: src/components/ModCanvastools.jsx:245 +msgid "Image Upload" +msgstr "Billede Upload" + +#: src/components/ModCanvastools.jsx:246 +msgid "Upload images to canvas" +msgstr "Upload Billeder til Kanvas" + +#: src/components/ModCanvastools.jsx:248 +msgid "File" +msgstr "Fil" + +#: src/components/ModCanvastools.jsx:269 +msgid "Coordinates in X_Y format:" +msgstr "Koordinater i X_Y format:" + +#: src/components/ModCanvastools.jsx:307 +msgid "Pixel Protection" +msgstr "Pixel Beskyttelse" + +#: src/components/ModCanvastools.jsx:309 +msgid "" +"Set protection of areas (if you need finer grained control, " +"use protect with image upload and alpha layers)" +msgstr "" +"Set beskyttelse af områder (hvis du får brug for mere finkornet " +"kontrol, brug beskyttelse med billedupload og alfalag)" + +#: src/components/ModCanvastools.jsx:330 src/components/ModCanvastools.jsx:403 +#: src/components/ModCanvastools.jsx:486 src/components/ModWatchtools.jsx:174 +msgid "Top-left corner" +msgstr "Øverste-venstre hjørne" + +#: src/components/ModCanvastools.jsx:347 src/components/ModCanvastools.jsx:420 +#: src/components/ModCanvastools.jsx:503 src/components/ModWatchtools.jsx:191 +msgid "Bottom-right corner" +msgstr "Nederste-højre hjørne" + +#: src/components/ModCanvastools.jsx:388 +msgid "Rollback to Date" +msgstr "Rul tilbage til Dato" + +#: src/components/ModCanvastools.jsx:390 +msgid "Rollback an area of the canvas to a set date (00:00 UTC)" +msgstr "Rul tilbage et område af kanvasset til en sæt dato 00:00 UTC)" + +#: src/components/ModCanvastools.jsx:461 +msgid "Canvas Cleaner" +msgstr "Kanvas Rengører" + +#: src/components/ModCanvastools.jsx:463 +msgid "Apply a filter to clean trash in large canvas areas." +msgstr "Påfør et filter til at rense affald i store kanvas områder." + +#: src/components/ModCanvastools.jsx:564 +msgid "Stop Cleaner" +msgstr "Stop Rengører" + +#: src/components/Admintools.jsx:109 +msgid "IP Actions" +msgstr "IP Handlinger" + +#: src/components/Admintools.jsx:111 +msgid "Do stuff with IPs (one IP per line)" +msgstr "Gør ting med IP'er (én IP pr. linje)" + +#: src/components/Admintools.jsx:158 +msgid "Manage Moderators" +msgstr "Administrer Moderatorer" + +#: src/components/Admintools.jsx:160 +msgid "Remove Moderator" +msgstr "Fjern Moderator" + +#: src/components/Admintools.jsx:193 +msgid "There are no mods" +msgstr "Der er ingen nye mods" + +#: src/components/Admintools.jsx:198 +msgid "Assign new Mod" +msgstr "Tildel ny Mod" + +#: src/components/Admintools.jsx:201 +msgid "Enter UserName of new Mod" +msgstr "Indsæt BrugerNavn af ny mod" + +#: src/components/Admintools.jsx:210 +msgid "User Name" +msgstr "Bruger Navn" + +#: src/components/SocialSettings.jsx:35 +msgid "Block DMs" +msgstr "Bloker DM'er" + +#: src/components/SocialSettings.jsx:42 +msgid "Block all Private Messages" +msgstr "Bloker alle Private Beskeder" + +#: src/components/SocialSettings.jsx:44 +msgid "Private" +msgstr "Privat" + +#: src/components/SocialSettings.jsx:51 +msgid "Don't show me in global stats" +msgstr "Vis mig ikke i globale statistikker" + +#: src/components/SocialSettings.jsx:57 +msgid "Unblock Users" +msgstr "Fjern Blokering af Brugere" + +#: src/components/SocialSettings.jsx:82 +msgid "You have no users blocked" +msgstr "Du har ingen brugere blokeret" + +#: src/components/ModIIDtools.jsx:20 +msgid "You must enter a duration" +msgstr "Du skal angive en varighed" + +#: src/components/ModIIDtools.jsx:24 +msgid "You must enter an IID" +msgstr "Du skal angive en IID" + +#: src/components/ModIIDtools.jsx:53 +msgid "IID Actions" +msgstr "IID Handlinger" + +#: src/components/ModIIDtools.jsx:80 +msgid "Enter Reason" +msgstr "Angiv Begrundelse" + +#: src/components/ModIIDtools.jsx:97 +msgid "(0 = infinite)" +msgstr "(0 = uendelig" + +#: src/components/ModWatchtools.jsx:48 +msgid "Interval is invalid" +msgstr "Interval er ugyldigt" + +#: src/components/ModWatchtools.jsx:122 +msgid "Check who placed in an area" +msgstr "Tjek hvem placerede i et område" + +#: src/components/ModWatchtools.jsx:123 +msgid "Canvas" +msgstr "Kanvas" + +#: src/components/ModWatchtools.jsx:142 +msgid "Interval" +msgstr "Interval" + +#: src/components/ModWatchtools.jsx:157 +msgid "IID (optional)" +msgstr "IID (valgfrit)" + +#: src/components/ModWatchtools.jsx:236 +msgid "Get Pixels" +msgstr "Få Pixels" + +#: src/components/ModWatchtools.jsx:267 +msgid "Get Users" +msgstr "Få Brugere" + +#: src/components/contextmenus/UserContextMenu.jsx:49 +msgid "Ping" +msgstr "Ping" + +#: src/components/contextmenus/UserContextMenu.jsx:75 +msgid "DM" +msgstr "DM" + +#: src/components/contextmenus/UserContextMenu.jsx:86 +msgid "Block" +msgstr "Bloker" + +#: src/components/contextmenus/ChannelContextMenu.jsx:46 +msgid "Mute" +msgstr "Gør Stum" + +#: src/components/windows/Help.jsx:15 src/components/windows/Settings.jsx:87 +msgctxt "keybinds" +msgid "G" +msgstr "G" + +#: src/components/windows/Help.jsx:16 src/components/windows/Settings.jsx:95 +msgctxt "keybinds" +msgid "X" +msgstr "X" + +#: src/components/windows/Help.jsx:17 src/components/windows/Settings.jsx:158 +msgctxt "keybinds" +msgid "H" +msgstr "H" + +#: src/components/windows/Help.jsx:18 +msgctxt "keybinds" +msgid "R" +msgstr "R" + +#: src/components/windows/Help.jsx:19 +msgctxt "keybinds" +msgid "Q" +msgstr "Q" + +#: src/components/windows/Help.jsx:20 +msgctxt "keybinds" +msgid "E" +msgstr "E" + +#: src/components/windows/Help.jsx:21 +msgctxt "keybinds" +msgid "W" +msgstr "W" + +#: src/components/windows/Help.jsx:22 +msgctxt "keybinds" +msgid "A" +msgstr "A" + +#: src/components/windows/Help.jsx:23 +msgctxt "keybinds" +msgid "S" +msgstr "S" + +#: src/components/windows/Help.jsx:24 +msgctxt "keybinds" +msgid "D" +msgstr "D" + +#: src/components/windows/Help.jsx:31 +msgctxt "keybinds" +msgid "Shift" +msgstr "Shift" + +#: src/components/windows/Help.jsx:32 +msgctxt "keybinds" +msgid "C" +msgstr "C" + +#: src/components/windows/Settings.jsx:103 +msgctxt "keybinds" +msgid "M" +msgstr "M" diff --git a/i18n/ssr-da.po b/i18n/ssr-da.po new file mode 100644 index 00000000..5c6fbfe2 --- /dev/null +++ b/i18n/ssr-da.po @@ -0,0 +1,471 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 3.2.2\n" + +#: src/core/ChatProvider.js:434 +msgid "You can not send chat messages with proxy" +msgstr "Du kan ikke sende chat beskeder med proxy" + +#: src/core/ChatProvider.js:436 +msgid "Your country is temporary muted from this chat channel" +msgstr "Dit land er midlertidigt gjort stum i denne chat kanal" + +#: src/core/ChatProvider.js:439 +msgid "You are permanently muted, join our guilded to apppeal the mute" +msgstr "" +"Du er permanent gjort stum, Tilslut dig til vores Guilded for at appellere " +"om at du blev gjort stum" + +#: src/core/ChatProvider.js:441 +msgid "You are banned" +msgstr "Du er bannet" + +#: src/core/ChatProvider.js:443 +msgid "Your Internet Provider is banned" +msgstr "Din Internetudbyder er bannet" + +#: src/core/ChatProvider.js:448 +#, javascript-format +msgid "You are muted for another ${ timeMin } minutes" +msgstr "Du er gjort stum for en anden ${ timeMin } minutes" + +#: src/core/ChatProvider.js:450 +msgid "You are muted for another ${ ttl } seconds" +msgstr "Du er gjort stum for en anden ${ ttl } Sekunder" + +#: src/core/ChatProvider.js:467 +#, javascript-format +msgid "You are sending messages too fast, you have to wait ${ waitTime }s :(" +msgstr "Du sender beskeder for hurtigt, du skal vente ${ waitTime }s :(" + +#: src/core/ChatProvider.js:471 +msgid "You don't have access to this channel" +msgstr "Du har ikke tilladelse til at se denne kanal" + +#: src/core/ChatProvider.js:488 +msgid "Your mail has to be verified in order to chat" +msgstr "Din mail skal være bekræftet for at chatte" + +#: src/core/ChatProvider.js:498 +msgid "You can't send a message this long :(" +msgstr "Du kan ikke sende en besked så lang :(" + +#: src/core/ChatProvider.js:502 +msgid "Please use int channel" +msgstr "Venligst brug int kanal" + +#: src/core/ChatProvider.js:510 +msgid "Stop flooding." +msgstr "Lad være med at oversvømme chatten." + +#: src/routes/reset_password.js:39 +msgid "You sent an empty password or invalid data :(" +msgstr "Du sendte en tom adgangskode eller ugyldig data :(" + +#: src/routes/reset_password.js:51 +msgid "This password-reset link isn't valid anymore :(" +msgstr "Dette adgangskode-nulstillings link er ikke længere gyldig :(" + +#: src/routes/reset_password.js:62 +msgid "Your passwords do not match :(" +msgstr "Dine adgangskoder matcher ikke :(" + +#: src/routes/reset_password.js:77 +msgid "User doesn't exist in our database :(" +msgstr "Bruger eksisterer ikke i vores database :(" + +#: src/routes/reset_password.js:89 +msgid "Passowrd successfully changed." +msgstr "Adgangskode blev succesfuldt ændret." + +#: src/routes/reset_password.js:108 +msgid "Invalid url :( Please check your mail again." +msgstr "Ugyldig url :( Venligst tjek din mail igen." + +#: src/ssr/Globe.jsx:32 +msgid "PixelPlanet.Fun 3DGlobe" +msgstr "PixelPlanet.Fun 3DGlobus" + +#: src/ssr/Globe.jsx:33 +msgid "A 3D globe of our whole map" +msgstr "En 3D klode af hele vores kort" + +#: src/ssr/Globe.jsx:46 +msgid "Double click on globe to go back." +msgstr "Dobbeltklik på kloden for at gå tilbage." + +#: src/ssr/Globe.jsx:47 +msgid "Loading..." +msgstr "Indlæser..." + +#: src/ssr/PopUp.jsx:58 +msgid "ppfun" +msgstr "ppfun" + +#: src/ssr/PopUp.jsx:59 +msgid "PixelPlanet.Fun PopUp" +msgstr "PixelPlanet.Fun PopUp" + +#: src/ssr/Main.jsx:67 +msgid "PixelPlanet.Fun" +msgstr "PixelPlanet.Fun" + +#: src/ssr/Main.jsx:68 +msgid "Place color pixels on an map styled canvas with other players online" +msgstr "" +"Placer farvede pixels på et kort-stilet kanvas med andre spillere online" + +#: src/utils/validation.js:17 +msgid "Email can't be empty." +msgstr "Email må ikke være tom." + +#: src/utils/validation.js:18 +msgid "Email should be at least 5 characters long." +msgstr "Email skal være mindst 5 tegn lang." + +#: src/utils/validation.js:19 +msgid "Email can't be longer than 40 characters." +msgstr "Email kan ikke være længere end 40 tegn." + +#: src/utils/validation.js:20 +msgid "Email should at least contain a dot" +msgstr "Email skal indeholde i det mindste én prik" + +#: src/utils/validation.js:22 +msgid "Email should contain a @" +msgstr "Email skal indeholde et @" + +#: src/utils/validation.js:29 +msgid "Name can't be empty." +msgstr "Navn kan ikke være tomt." + +#: src/utils/validation.js:30 +msgid "Name must be at least 2 characters long" +msgstr "Navn skal være mindst 2 tegn langt" + +#: src/utils/validation.js:31 +msgid "Name must be shorter than 26 characters" +msgstr "Navn skal være kortere end 26 tegn" + +#: src/utils/validation.js:38 +msgid "Name contains invalid character like @, /, \\ or #" +msgstr "Navn indeholder ugyldige tegn f.eks. @, /, \\ eller #" + +#: src/utils/validation.js:53 +msgid "No password given." +msgstr "Ingen adgangskode angivet." + +#: src/utils/validation.js:56 +msgid "Password must be at least 6 characters long." +msgstr "Adgangskode skal være mindst 6 tegn lang." + +#: src/utils/validation.js:59 +msgid "Password must be shorter than 60 characters." +msgstr "Adgangskode skal være kortere end 60 tegn." + +#: src/ssr/PasswordReset.jsx:20 src/ssr/PasswordReset.jsx:40 +msgid "PixelPlanet.fun Password Reset" +msgstr "PixelPlanet.fun Adgangskode Nulstilling" + +#: src/ssr/PasswordReset.jsx:21 src/ssr/PasswordReset.jsx:41 +msgid "Reset your password here" +msgstr "Nulstil din adgangskode her" + +#: src/core/MailProvider.js:105 src/ssr/PasswordReset.jsx:28 +#: src/ssr/PasswordReset.jsx:49 +msgid "Reset Password" +msgstr "Nulstil Adgangskode" + +#: src/ssr/PasswordReset.jsx:30 src/ssr/RedirectionPage.jsx:12 +msgid "Click here" +msgstr "Klik her" + +#: src/ssr/PasswordReset.jsx:30 +msgid "to go back to pixelplanet" +msgstr "for at gå tilbage til pixelplanet" + +#: src/ssr/PasswordReset.jsx:50 +#, javascript-format +msgid "Hello ${ name }, you can set your new password here:" +msgstr "Hej ${ name }, du kan skrive din nye adgangskode her:" + +#: src/ssr/PasswordReset.jsx:54 +msgid "New Password" +msgstr "Nye adgangskode" + +#: src/ssr/PasswordReset.jsx:60 +msgid "Confirm New Password" +msgstr "Bekræft Nye Adgangskode" + +#: src/ssr/PasswordReset.jsx:65 +msgid "Submit" +msgstr "Indsend" + +#: src/routes/api/modtools.js:53 +msgid "You are not logged in" +msgstr "Du er ikke logget ind" + +#: src/routes/api/modtools.js:65 +msgid "You are not allowed to access this page" +msgstr "Du er ikke tilladt til at få adgang til denne side" + +#: src/routes/api/modtools.js:207 +msgid "Just admins can do that" +msgstr "Kun administratorer kan gøre det" + +#: src/routes/api/baninfo.js:32 +msgid "You are not banned" +msgstr "Du er ikke bannet" + +#: src/routes/api/auth/change_mail.js:21 src/routes/api/auth/register.js:24 +msgid "This email provider is not allowed" +msgstr "Denne email udbyder er ikke tilladt" + +#: src/routes/api/auth/register.js:31 +msgid "No Captcha given" +msgstr "Ingen Captcha angivet" + +#: src/routes/api/auth/register.js:34 +msgid "E-Mail already in use." +msgstr "E-Mail allerede i brug." + +#: src/routes/api/auth/register.js:36 +msgid "Username already in use." +msgstr "Brugernavn allerede i brug." + +#: src/routes/api/auth/register.js:59 +msgid "You took too long, try again." +msgstr "Du tog for lang tid, prøv igen." + +#: src/routes/api/auth/register.js:62 +msgid "You failed your captcha" +msgstr "Du fejlede din captcha" + +#: src/routes/api/auth/register.js:65 +msgid "Unknown Captcha Error" +msgstr "Ukendt Captcha Fejl" + +#: src/routes/api/auth/register.js:89 +msgid "Failed to create new user :(" +msgstr "Kunne ikke oprette ny bruger :(" + +#: src/routes/api/auth/register.js:105 +msgid "Failed to establish session after register :(" +msgstr "Kunne ikke oprette session efter registrering :(" + +#: src/routes/api/auth/logout.js:11 +msgid "You are not even logged in." +msgstr "Du er engang logget in." + +#: src/routes/api/auth/delete_account.js:55 src/routes/api/auth/logout.js:20 +msgid "Server error when logging out." +msgstr "Server fejl ved log ud." + +#: src/routes/api/auth/change_mail.js:43 +#: src/routes/api/auth/change_passwd.js:34 +#: src/routes/api/auth/delete_account.js:35 +msgid "You are not authenticated." +msgstr "Du er ikke godkendt." + +#: src/routes/api/auth/change_mail.js:52 +#: src/routes/api/auth/change_passwd.js:43 +#: src/routes/api/auth/delete_account.js:45 +msgid "Incorrect password!" +msgstr "Forkerte adgangskode!" + +#: src/routes/api/auth/verify.js:26 src/routes/api/auth/verify.js:35 +msgid "Mail verification" +msgstr "Mail Bekræftelse" + +#: src/routes/api/auth/verify.js:27 +msgid "You are now verified :)" +msgstr "Du er nu bekræftet" + +#: src/routes/api/auth/verify.js:35 +msgid "" +"Your mail verification code is invalid or already expired :(, please request " +"a new one." +msgstr "" +"Din mail bekræftelseskode er ugyldig eller allerede udløbet :(, venligst " +"anmod om en ny en." + +#: src/ssr/RedirectionPage.jsx:19 +msgid "PixelPlanet.fun Accounts" +msgstr "PixelPlanet.fun Kontoer" + +#: src/ssr/RedirectionPage.jsx:29 +msgid "You will be automatically redirected after 15s" +msgstr "Du vil blive automatisk omdirigeret efter 15s" + +#: src/ssr/RedirectionPage.jsx:30 +#, javascript-format +msgid "Or ${ clickHere } to go back to pixelplanet" +msgstr "Eller ${ clickHere } for at gå tilbage til pixelplanet" + +#: src/canvasesDesc.js:19 +msgid "Earth" +msgstr "Jorden" + +#: src/canvasesDesc.js:20 +msgid "Moon" +msgstr "Måne" + +#: src/canvasesDesc.js:21 +msgid "3D Canvas" +msgstr "3D Kanvas" + +#: src/canvasesDesc.js:22 +msgid "Coronavirus" +msgstr "Koronavirus" + +#: src/canvasesDesc.js:23 +msgid "PixelZone" +msgstr "PixelZone" + +#: src/canvasesDesc.js:24 +msgid "PixelCanvas" +msgstr "PixelKanvas" + +#: src/canvasesDesc.js:25 +msgid "1bit" +msgstr "1bit" + +#: src/canvasesDesc.js:26 +msgid "Top10" +msgstr "Top10" + +#: src/canvasesDesc.js:29 +msgid "Our main canvas, a huge map of the world. Place everywhere you like" +msgstr "Vores hovedkanvas, et kæmpe verdenskort. Placer hvor end du vil" + +#: src/canvasesDesc.js:30 +msgid "" +"Moon canvas. Safe space for art. No flags or large text (unless part of art) " +"or art larger than 1.5k x 1.5k pixels." +msgstr "" +"Måne kanvas. Sikkert sted for kunst. Ingen flager eller stor text (undtagen " +"hvis del af kunst) eller større end 1,5k x 1,5k pixels." + +#: src/canvasesDesc.js:31 +msgid "Place Voxels on a 3D canvas with others" +msgstr "Placer Voxels på et 3D kanvas med andre" + +#: src/canvasesDesc.js:32 +msgid "Special canvas to spread awareness of SARS-CoV2" +msgstr "Specielt kanvas for at sprede viden om SARS-CoV2" + +#: src/canvasesDesc.js:33 +msgid "Mirror of PixelZone" +msgstr "Spejl af PixelZone" + +#: src/canvasesDesc.js:34 +msgid "Mirror of PixelCanvas" +msgstr "Spejl af Pixelcanvas" + +#: src/canvasesDesc.js:35 +msgid "Black and White canvas" +msgstr "Sort og hvid kanvas" + +#: src/canvasesDesc.js:36 +msgid "" +"A canvas for the most active players from the the previous day. Daily " +"ranking updates at 00:00 UTC." +msgstr "" +"Et kanvas for de mest aktive spillere fra den tidligere dag. Daglig " +"rangering opdaterer kl. 00:00 UTC." + +#: src/core/MailProvider.js:66 +#, javascript-format +msgid "Welcome ${ name } to PixelPlanet, plese verify your mail" +msgstr "Velkommen ${ name } til PixelPlanet, venligst bekræft din mail" + +#: src/core/MailProvider.js:67 +msgid "Hello ${ name }" +msgstr "Hej ${ name }" + +#: src/core/MailProvider.js:68 +msgid "" +"welcome to our little community of pixelplacers, to use your account, you " +"have to verify your mail. You can do that here: " +msgstr "" +"velkommen til vores lille samfund of pixelplacere, for at bruge din konto, " +"har du brug for at bekræfte din mail. Du kan gøre det her: " + +#: src/core/MailProvider.js:68 +msgid "Click to Verify" +msgstr "Klik for at Bekræfte" + +#: src/core/MailProvider.js:68 src/core/MailProvider.js:105 +msgid "Or by copying following url:" +msgstr "Eller ved at kopiere følgende url:" + +#: src/core/MailProvider.js:69 +msgid "" +"Have fun and don't hesitate to contact us if you encouter any problems :)" +msgstr "" +"Hav' det sjovt og tøv ikke med at kontakte os hvis du støder på nogle " +"problemer :)" + +#: src/core/MailProvider.js:70 src/core/MailProvider.js:107 +msgid "Thanks" +msgstr "Tak" + +#: src/core/MailProvider.js:87 +#, javascript-format +msgid "" +"We already sent you a verification mail, you can request another one in " +"${ minLeft } minutes." +msgstr "" +"Vi har allerede sendt dig en bekræftelsesmail, du kan anmode om endnu en om " +"${ minLeft } minutter." + +#: src/core/MailProvider.js:103 +msgid "You forgot your password for PixelPlanet? Get a new one here" +msgstr "Glemt din adgangskode for PixelPlanet? Få en ny en her" + +#: src/core/MailProvider.js:104 +msgid "Hello" +msgstr "Hello" + +#: src/core/MailProvider.js:105 +msgid "" +"You requested to get a new password. You can change your password within the " +"next 30min here: " +msgstr "" +"Du anmodet om en ny adgangskode. Du kan ændre din adgangskode inden for de " +"næste 30min her: " + +#: src/core/MailProvider.js:106 +#, javascript-format +msgid "" +"If you did not request this mail, please just ignore it (the ip that " +"requested this mail was ${ ip })." +msgstr "" +"Hvis du ikke anmodet om denne mail, venligst bare ignorerer den (ip'en der " +"anmodet om denne mail var ${ ip })." + +#: src/core/MailProvider.js:114 +msgid "Mail is not configured on the server" +msgstr "Mail er ikke konfigureret på serveren" + +#: src/core/MailProvider.js:122 +msgid "" +"We already sent you a mail with instructions. Please wait before requesting " +"another mail." +msgstr "" +"Vi har allerede sendt dig en mail med instruktioner. Venligst vent før du " +"anmoder om en ny mail." + +#: src/core/MailProvider.js:130 +msgid "Couldn't find this mail in our database" +msgstr "Kunne ikke finde denne mail i vores database" diff --git a/src/backup.js b/src/backup.js index 24083e29..eae7a7e4 100644 --- a/src/backup.js +++ b/src/backup.js @@ -18,9 +18,9 @@ import { createClient } from 'redis'; import { - updateBackupRedis, createPngBackup, - incrementialBackupRedis, + incrementalBackupRedis, + updateBackupRedis, } from './core/tilesBackup'; import canvases from './core/canvases'; @@ -122,8 +122,7 @@ function getDateFolder() { if (month < 10) month = `0${month}`; if (day < 10) day = `0${day}`; const dayDir = `${date.getUTCFullYear()}/${month}/${day}`; - const backupDir = `${dir}/${dayDir}`; - return backupDir; + return `${dir}/${dayDir}`; } async function dailyBackup() { @@ -139,25 +138,25 @@ async function dailyBackup() { await createPngBackup(backupRedis, canvases, backupDir); } catch (e) { fs.rmSync(backupDir, { recursive: true }); - console.log('Error occured during daily backup', e); + console.log('Error occurred during daily backup', e); } console.log('Daily full backup done'); } -async function incrementialBackup() { +async function incrementalBackup() { const backupDir = getDateFolder(); if (!fs.existsSync(backupDir)) { fs.mkdirSync(backupDir, { recursive: true }); } try { - await incrementialBackupRedis( + await incrementalBackupRedis( canvasRedis, backupRedis, canvases, backupDir, ); } catch (e) { - console.log('Error occured during incremential backup', e); + console.log('Error occurred during incremental backup', e); } } @@ -166,7 +165,7 @@ async function trigger() { if (!fs.existsSync(backupDir)) { await dailyBackup(); } else { - await incrementialBackup(); + await incrementalBackup(); } if (CMD) { runCmd(CMD); diff --git a/src/canvasesDesc.js b/src/canvasesDesc.js index 2c2500ce..37397e01 100644 --- a/src/canvasesDesc.js +++ b/src/canvasesDesc.js @@ -39,21 +39,21 @@ function getCanvases(t) { * no edit below here needed when adding/removing canvas */ - const localicedCanvases = {}; + const localizedCanvases = {}; const canvasKeys = Object.keys(canvases); for (let i = 0; i < canvasKeys.length; i += 1) { const key = canvasKeys[i]; - localicedCanvases[key] = { ...canvases[key] }; - localicedCanvases[key].desc = canvasDesc[key] + localizedCanvases[key] = { ...canvases[key] }; + localizedCanvases[key].desc = canvasDesc[key] || canvases[key].desc || `Canvas ${key}`; - localicedCanvases[key].title = canvasTitles[key] + localizedCanvases[key].title = canvasTitles[key] || canvases[key].title || `Canvas ${key}`; } - return localicedCanvases; + return localizedCanvases; } const lCanvases = {}; @@ -64,7 +64,7 @@ const lCanvases = {}; }); })(); -export function getLocalicedCanvases(lang) { +export function getLocalizedCanvases(lang) { return lCanvases[lang] || lCanvases.default; } diff --git a/src/components/BanInfo.jsx b/src/components/BanInfo.jsx index 5679b84e..d7e93934 100644 --- a/src/components/BanInfo.jsx +++ b/src/components/BanInfo.jsx @@ -63,7 +63,7 @@ const BanInfo = ({ close }) => { return (

- {t`You are banned. You think it is unjustifed? Check out the `} + {t`You are banned. You think it is unjustified? Check out the `} { const desc = getLinkDesc(href); - // treat pixelplanet links seperately + // treat pixelplanet links separately if (desc === window.location.hostname && href.includes('/#')) { const coords = href.substring(href.indexOf('/#') + 1); if (isPopUp() && window.opener && !window.opener.closed) { diff --git a/src/components/Palette.jsx b/src/components/Palette.jsx index 098bc84e..50751fa3 100644 --- a/src/components/Palette.jsx +++ b/src/components/Palette.jsx @@ -40,7 +40,7 @@ function getStylesByWindowSize( paletteCols = 5; flexDirection = 'row'; } else { - // ordinary palette (one or two colums) + // ordinary palette (one or two columns) spanSize = 24; paletteCols = (windowHeight < 801) ? 2 : 1; flexDirection = 'column'; diff --git a/src/components/UIPopUp.jsx b/src/components/UIPopUp.jsx index f3d21dfa..a8500f31 100644 --- a/src/components/UIPopUp.jsx +++ b/src/components/UIPopUp.jsx @@ -5,7 +5,7 @@ import React, { useMemo } from 'react'; import { useSelector, useDispatch } from 'react-redux'; -import { selectWindowType, selectWIndowArgs } from '../store/selectors/popup'; +import { selectWindowType, selectWindowArgs } from '../store/selectors/popup'; import { setWindowArgs, setWindowTitle, @@ -16,7 +16,7 @@ import COMPONENTS from './windows'; const UIPopUp = () => { const windowType = useSelector(selectWindowType); - const args = useSelector(selectWIndowArgs); + const args = useSelector(selectWindowArgs); const [Content] = COMPONENTS[windowType]; @@ -27,7 +27,7 @@ const UIPopUp = () => { setArgs: (newArgs) => dispatch(setWindowArgs(newArgs)), setTitle: (title) => dispatch(setWindowTitle(title)), // eslint-disable-next-line max-len - changeType: (newType, newTitel, newArgs) => dispatch(changeWindowType(newType, newTitel, newArgs)), + changeType: (newType, newTitle, newArgs) => dispatch(changeWindowType(newType, newTitle, newArgs)), }), [args]); return ( diff --git a/src/components/UserAreaContent.jsx b/src/components/UserAreaContent.jsx index 59f675f7..63f4cad2 100644 --- a/src/components/UserAreaContent.jsx +++ b/src/components/UserAreaContent.jsx @@ -59,7 +59,7 @@ const UserAreaContent = () => {

{ const resizeRef = useRef(); const selectWindowById = useMemo(() => makeSelectWindowById(id), []); - const selectWIndowPosById = useMemo(() => makeSelectWindowPosById(id), []); + const selectWindowPosById = useMemo(() => makeSelectWindowPosById(id), []); const selectWindowArgs = useMemo(() => makeSelectWindowArgs(id), []); const win = useSelector(selectWindowById); - const position = useSelector(selectWIndowPosById); + const position = useSelector(selectWindowPosById); const showWindows = useSelector(selectShowWindows); const args = useSelector(selectWindowArgs); @@ -54,7 +54,7 @@ const Window = ({ id }) => { setArgs: (newArgs) => dispatch(setWindowArgs(id, newArgs)), setTitle: (title) => dispatch(setWindowTitle(id, title)), // eslint-disable-next-line max-len - changeType: (newType, newTitel, newArgs) => dispatch(changeWindowType(id, newType, newTitel, newArgs)), + changeType: (newType, newTitle, newArgs) => dispatch(changeWindowType(id, newType, newTitle, newArgs)), }), [id, args]); const { diff --git a/src/components/buttons/ChatButton.jsx b/src/components/buttons/ChatButton.jsx index 7f7cf7e1..533c7e03 100644 --- a/src/components/buttons/ChatButton.jsx +++ b/src/components/buttons/ChatButton.jsx @@ -15,7 +15,7 @@ import { } from '../../store/actions/windows'; /* - * return [ chatOpen, chatHiden ] + * return [ chatOpen, chatHidden ] * chatOpen: if any chat window or modal is open * chatHidden: if any chat windows are hidden */ diff --git a/src/components/buttons/ExpandMenuButton.jsx b/src/components/buttons/ExpandMenuButton.jsx index d31631c6..eaf7f211 100644 --- a/src/components/buttons/ExpandMenuButton.jsx +++ b/src/components/buttons/ExpandMenuButton.jsx @@ -1,5 +1,5 @@ /* - * espand menu / show other menu buttons + * expand menu / show other menu buttons * */ diff --git a/src/components/contextmenus/ChannelDropDown.jsx b/src/components/contextmenus/ChannelDropDown.jsx index cfc686a7..6a9ee5ea 100644 --- a/src/components/contextmenus/ChannelDropDown.jsx +++ b/src/components/contextmenus/ChannelDropDown.jsx @@ -73,7 +73,7 @@ const ChannelDropDown = ({ } // latest lastTs first sortChansNew.sort((c1, c2) => { - // determins if default channels get sorted too + // determines if default channels get sorted too if (c1[3] === 0 || c2[3] === 0) return 0; if (c1[4] > c2[4]) return -1; if (c2[4] > c1[4]) return 1; diff --git a/src/components/embeds/Odysee.jsx b/src/components/embeds/Odysee.jsx index 2202fde6..ef32eb8e 100644 --- a/src/components/embeds/Odysee.jsx +++ b/src/components/embeds/Odysee.jsx @@ -1,6 +1,6 @@ /* * Odysee oembed API does not allow CORS request, - * therefor we can't use it right now. + * therefore we can't use it right now. * Still keeping this here in case that the policy changes in the future */ import React from 'react'; @@ -18,7 +18,7 @@ function stripCol(str) { const urlStr = '/@'; const Odysee = ({ url }) => { - let oid = null; + let oid; let posA = url.indexOf(urlStr); if (posA !== -1) { oid = url.substring(url.indexOf('/', posA + urlStr.length) + 1); @@ -60,10 +60,7 @@ export default [ return false; } posA = urlPart.indexOf('/', posA + urlStr.length); - if (posA === -1 || posA + 2 >= urlPart.length) { - return false; - } - return true; + return !(posA === -1 || posA + 2 >= urlPart.length); } // https://odysee.com/why-we-were-wrong-about-ukraine:6bd300b38bf1b30fa56e53c191b0652682c2ae6f posA = urlPart.indexOf('//'); @@ -71,10 +68,7 @@ export default [ posA = 0; } posA = urlPart.indexOf('/', posA + 2); - if (posA === -1 || posA + 2 >= urlPart.length) { - return false; - } - return true; + return !(posA === -1 || posA + 2 >= urlPart.length); }, (url) => { let urlPart = stripQuery(url); diff --git a/src/components/hooks/clickOutside.js b/src/components/hooks/clickOutside.js index 9288a1b1..35c46845 100644 --- a/src/components/hooks/clickOutside.js +++ b/src/components/hooks/clickOutside.js @@ -10,7 +10,7 @@ import { useEffect, useLayoutEffect, useCallback } from 'react'; * Keeps listening to outside clicks or window resize * as long as active is true * @param insideRefs references to elements that are considered inside - * @param calback function that gets fired on click outside + * @param callback function that gets fired on click outside * @param active boolean if we should listen or not */ export function useConditionalClickOutside(insideRefs, active, callback) { diff --git a/src/components/hooks/drag.js b/src/components/hooks/drag.js index 59454421..2147fc77 100644 --- a/src/components/hooks/drag.js +++ b/src/components/hooks/drag.js @@ -1,5 +1,5 @@ /* - * mouse draging + * mouse dragging */ /* eslint-disable consistent-return */ @@ -9,7 +9,7 @@ import { useEffect, useCallback } from 'react'; /* * @param elRef element reference from useRef * @param startHandler function called on start of drag - * @param diffHandler functio that is called with dragged distance + * @param diffHandler function that is called with dragged distance */ function useDrag(elRef, startHandler, diffHandler) { const startDrag = useCallback((event) => { diff --git a/src/components/windows/index.js b/src/components/windows/index.js index 20977ac5..0ef0c04d 100644 --- a/src/components/windows/index.js +++ b/src/components/windows/index.js @@ -23,6 +23,6 @@ export default { /* * NOTE: - * set windows that should be accessable via popup / url + * set windows that should be accessible via popup / url * also in ./popUpAvailable.js */ diff --git a/src/controls/PixelPainterControls.js b/src/controls/PixelPainterControls.js index 2175e1fc..5a39b06a 100644 --- a/src/controls/PixelPainterControls.js +++ b/src/controls/PixelPainterControls.js @@ -27,7 +27,7 @@ import { getOffsetOfPixel, } from '../core/utils'; -class PixelPlainterControls { +class PixelPainterControls { constructor(renderer, viewport, curStore) { this.store = curStore; this.renderer = renderer; @@ -67,7 +67,7 @@ class PixelPlainterControls { * 2: right shift */ this.holdPainting = 0; - // if we are waiting before placeing pixel via holdPainting again + // if we are waiting before placing pixel via holdPainting again this.coolDownDelta = false; document.addEventListener('keydown', this.onKeyDown, false); @@ -149,7 +149,7 @@ class PixelPlainterControls { this.viewport, [clientX, clientY], ); - PixelPlainterControls.placePixel( + PixelPainterControls.placePixel( store, this.renderer, cell, @@ -268,13 +268,13 @@ class PixelPlainterControls { clearTimeout(this.onViewFinishChangeTimeOut); this.clickTapStartTime = Date.now(); - this.clickTapStartCoords = PixelPlainterControls.getTouchCenter(event); + this.clickTapStartCoords = PixelPainterControls.getTouchCenter(event); const state = this.store.getState(); this.clickTapStartView = state.canvas.view; if (event.touches.length > 1) { this.tapStartScale = state.canvas.scale; - this.tapStartDist = PixelPlainterControls.getMultiTouchDistance(event); + this.tapStartDist = PixelPainterControls.getMultiTouchDistance(event); this.isMultiTab = true; this.clearTabTimeout(); } else { @@ -282,7 +282,7 @@ class PixelPlainterControls { this.isMultiTab = false; this.tapTimeout = setTimeout(() => { // check for longer tap to select taped color - PixelPlainterControls.selectColor( + PixelPainterControls.selectColor( this.store, this.viewport, this.renderer, @@ -314,7 +314,7 @@ class PixelPlainterControls { viewport, [pageX, pageY], ); - PixelPlainterControls.placePixel( + PixelPainterControls.placePixel( store, this.renderer, cell, @@ -334,7 +334,7 @@ class PixelPlainterControls { const multiTouch = (event.touches.length > 1); - const [clientX, clientY] = PixelPlainterControls.getTouchCenter(event); + const [clientX, clientY] = PixelPainterControls.getTouchCenter(event); const { store } = this; const state = store.getState(); if (this.isMultiTab !== multiTouch) { @@ -342,7 +342,7 @@ class PixelPlainterControls { this.isMultiTab = multiTouch; this.clickTapStartCoords = [clientX, clientY]; this.clickTapStartView = state.canvas.view; - this.tapStartDist = PixelPlainterControls.getMultiTouchDistance(event); + this.tapStartDist = PixelPainterControls.getMultiTouchDistance(event); this.tapStartScale = state.canvas.scale; } else { // pan @@ -413,7 +413,7 @@ class PixelPlainterControls { const state = store.getState(); if (isClicking) { if (Date.now() < this.clickTapStartTime + 100) { - // 100ms treshold till starting to pan + // 100ms threshold till starting to pan return; } const { clickTapStartView, clickTapStartCoords } = this; @@ -454,7 +454,7 @@ class PixelPlainterControls { switch (this.holdPainting) { case 1: { /* left shift: from selected color */ - PixelPlainterControls.placePixel( + PixelPainterControls.placePixel( store, this.renderer, screenCoor, @@ -466,7 +466,7 @@ class PixelPlainterControls { const colorIndex = this.renderer .getColorIndexOfPixel(x, y, true); if (colorIndex !== null) { - PixelPlainterControls.placePixel( + PixelPainterControls.placePixel( store, this.renderer, screenCoor, @@ -510,7 +510,7 @@ class PixelPlainterControls { } event.preventDefault(); - PixelPlainterControls.selectColor( + PixelPainterControls.selectColor( this.store, this.viewport, this.renderer, @@ -590,7 +590,7 @@ class PixelPlainterControls { if (event.location === KeyboardEvent.DOM_KEY_LOCATION_LEFT) { // left shift this.holdPainting = 1; - PixelPlainterControls.placePixel(store, this.renderer, hover); + PixelPainterControls.placePixel(store, this.renderer, hover); return; } if (event.location === KeyboardEvent.DOM_KEY_LOCATION_RIGHT) { @@ -599,7 +599,7 @@ class PixelPlainterControls { const colorIndex = this.renderer .getColorIndexOfPixel(...hover, true); if (colorIndex !== null) { - PixelPlainterControls.placePixel( + PixelPainterControls.placePixel( store, this.renderer, hover, @@ -615,4 +615,4 @@ class PixelPlainterControls { } } -export default PixelPlainterControls; +export default PixelPainterControls; diff --git a/src/core/ChatMessageBuffer.js b/src/core/ChatMessageBuffer.js index 5356eb58..94b3f37e 100644 --- a/src/core/ChatMessageBuffer.js +++ b/src/core/ChatMessageBuffer.js @@ -1,6 +1,6 @@ /* * Buffer for chatMessages for the server - * it just buffers the msot recent 200 messages for each channel + * it just buffers the most recent 200 messages for each channel * */ import Sequelize from 'sequelize'; diff --git a/src/core/ChatProvider.js b/src/core/ChatProvider.js index 81d5f495..129c775d 100644 --- a/src/core/ChatProvider.js +++ b/src/core/ChatProvider.js @@ -241,11 +241,8 @@ export class ChatProvider { return true; } const { lang } = user; - if (this.langChannels[lang] - && this.langChannels[lang].id === cid) { - return true; - } - return false; + return !!(this.langChannels[lang] + && this.langChannels[lang].id === cid); } checkIfDm(user, cid) { @@ -308,7 +305,7 @@ export class ChatProvider { return 'No legit country defined'; } if (!ret) { - return `Cuntry ${cc} is already muted`; + return `Country ${cc} is already muted`; } if (ret) { this.broadcastChatMessage( @@ -331,7 +328,7 @@ export class ChatProvider { return 'No legit country defined'; } if (!ret) { - return `Cuntry ${cc} is not muted`; + return `Country ${cc} is not muted`; } this.broadcastChatMessage( 'info', @@ -379,7 +376,7 @@ export class ChatProvider { } default: - return `Couln't parse command ${cmd}`; + return `Couldn't parse command ${cmd}`; } } @@ -436,7 +433,7 @@ export class ChatProvider { return t`Your country is temporary muted from this chat channel`; } if (allowed === 101) { // eslint-disable-next-line max-len - return t`You are permanently muted, join our guilded to apppeal the mute`; + return t`You are permanently muted, join our guilded to appeal the mute`; } if (allowed === 2) { return t`You are banned`; } if (allowed === 3) { @@ -474,14 +471,14 @@ export class ChatProvider { let displayCountry = country; if (user.userlvl !== 0) { displayCountry = 'zz'; - /* - * meme names disabled for now - * TODO think about activating it again after fixing accounts and - * mute evasions - * - } else if (name.endsWith('berg') || name.endsWith('stein')) { - displayCountry = 'il'; - / */ + /* + * meme names disabled for now + * TODO think about activating it again after fixing accounts and + * mute evasions + * + } else if (name.endsWith('berg') || name.endsWith('stein')) { + displayCountry = 'il'; + / */ } else if (user.id === 2927) { /* * hard coded flag for Manchukuo_1940 @@ -495,8 +492,8 @@ export class ChatProvider { } for (let i = 0; i < this.substitutes.length; i += 1) { - const subsitute = this.substitutes[i]; - message = message.replace(subsitute.regexp, subsitute.replace); + const substitute = this.substitutes[i]; + message = message.replace(substitute.regexp, substitute.replace); } if (message.length > 200) { diff --git a/src/core/Image.js b/src/core/Image.js index f646c174..a79a691d 100644 --- a/src/core/Image.js +++ b/src/core/Image.js @@ -16,7 +16,7 @@ import Palette from './Palette'; /* - * Load iamge from ABGR buffer onto canvas + * Load image from ABGR buffer onto canvas * (be aware that tis function does no validation of arguments) * @param canvasId numerical ID of canvas * @param x X coordinate on canvas @@ -103,7 +103,7 @@ export async function imageABGR2Canvas( /* - * Load iamgemask from ABGR buffer and execute function for each black pixel + * Load imagemask from ABGR buffer and execute function for each black pixel * (be aware that tis function does no validation of arguments) * @param canvasId numerical ID of canvas * @param x X coordinate on canvas diff --git a/src/core/MailProvider.js b/src/core/MailProvider.js index 9d85ab26..01322edd 100644 --- a/src/core/MailProvider.js +++ b/src/core/MailProvider.js @@ -63,10 +63,10 @@ export class MailProvider { const { t } = getTTag(lang); logger.info(`Sending verification mail to ${to} / ${name}`); const verifyUrl = `${host}/api/auth/verify?token=${code}&email=${encodeURIComponent(to)}`; - const subject = t`Welcome ${name} to PixelPlanet, plese verify your mail`; + const subject = t`Welcome ${name} to PixelPlanet, please verify your mail`; const html = `${t`Hello ${name}`},
${t`welcome to our little community of pixelplacers, to use your account, you have to verify your mail. You can do that here: `} ${t`Click to Verify`}. ${t`Or by copying following url:`}
${verifyUrl}\n
- ${t`Have fun and don't hesitate to contact us if you encouter any problems :)`}
+ ${t`Have fun and don't hesitate to contact us if you encounter any problems :)`}
${t`Thanks`}

`; this.sendMail(to, subject, html); @@ -132,7 +132,7 @@ export class MailProvider { /* * not sure if this is needed yet - * does it matter if spaming password reset mails or verifications mails? + * does it matter if spamming password reset mails or verifications mails? * if(!reguser.verified) { logger.info(`Password reset mail for ${to} requested by ${ip} - mail not verified`); @@ -169,7 +169,7 @@ export class MailProvider { /* * we do not use this right now static cleanUsers() { - // delete users that requier verification for more than 4 days + // delete users that require verification for more than 4 days RegUser.destroy({ where: { verificationReqAt: { diff --git a/src/core/MarkdownParser.js b/src/core/MarkdownParser.js index 6e6f0e28..be90564f 100644 --- a/src/core/MarkdownParser.js +++ b/src/core/MarkdownParser.js @@ -3,8 +3,8 @@ * * We do not support all markdown, but do additionally parse extra * stuff like pixelplanet coords and usernames and bare links. - * This code is written in preparation for a possible imporementation in - * WebAssambly, so it's all in a big loop + * This code is written in preparation for a possible implementation in + * WebAssembly, so it's all in a big loop */ import MString from './MString'; @@ -142,7 +142,7 @@ function parseMParagraph(text, opts, breakChar) { /* * parse Code Block * start is first character after the initializing ``` - * we just parse till the ending occures + * we just parse till the ending occurs */ function parseCodeBlock(text) { text.skipSpaces(false); @@ -183,7 +183,7 @@ function parseQuote(text, opts) { * parses Section (contains paragraphs, lists, etc. but no headings or quotes) * @param text MString * @param headingLevel the number of heading headingLevels we are in - * @param indent ndentation that should be considered (when inside list) + * @param indent indentation that should be considered (when inside list) * returns when encountering heading of <= headingLevel (iter is at # position) * or heading-cancel with three spaces (iter is past newlines) * or ident is smaller than given @@ -264,7 +264,7 @@ function parseMSection( curIndent + 1, ); childMdArray = ['-', childMdArray]; - // lists are encapsuled + // lists are encapsulated const capsule = (isUnorderedList) ? 'ul' : 'ol'; if (!mdArray.length || mdArray[mdArray.length - 1][0] !== capsule) { mdArray.push([capsule, [childMdArray]]); diff --git a/src/core/RpgEvent.js b/src/core/RpgEvent.js index dd62443e..8f3e229d 100644 --- a/src/core/RpgEvent.js +++ b/src/core/RpgEvent.js @@ -167,7 +167,7 @@ class RpgEvent { // make sure that its the center of a 3x3 area const i = Math.floor(Math.random() * (canvasSize / TILE_SIZE - 2)) + 1; const j = Math.floor(Math.random() * (canvasSize / TILE_SIZE - 2)) + 1; - // backup it and schedul next event in 1h + // backup it and schedule next event in 1h await setNextEvent(EVENT_GAP_MIN, i, j); const timestamp = await nextEvent(); const x = i * TILE_SIZE - canvasSize / 2; @@ -194,7 +194,7 @@ class RpgEvent { async runEventLoop() { /* * if we aren't the main shard, we just wait and regularly check, - * re-intilializing if we become it + * re-initializing if we become it */ if (!socketEvents.amIImportant()) { this.iAmNotImportant = true; @@ -281,7 +281,7 @@ class RpgEvent { } setTimeout(this.runEventLoop, 1000); } else if (eventMinutes > STEPS[4]) { - // 1min till Event: blinking solid cross red small fase + // 1min till Event: blinking solid cross red small faze if (eventState !== 9 && eventState !== 10) { this.eventState = 9; RpgEvent.broadcastChatMessage( diff --git a/src/core/Tile.js b/src/core/Tile.js index 34de45b5..a2d7f42c 100644 --- a/src/core/Tile.js +++ b/src/core/Tile.js @@ -1,5 +1,5 @@ /* - * basic functions for creating zommed tiles + * basic functions for creating zoomed tiles * Used by tilewriter worker thread, so dont import too much. * * */ @@ -492,7 +492,7 @@ async function createEmptyTile( /* * created 4096x4096 texture of default canvas - * @param canvasId numberical Id of canvas + * @param canvasId numerical Id of canvas * @param canvas canvas data * @param canvasTileFolder root folder where to save texture * diff --git a/src/core/Void.js b/src/core/Void.js index 2f6128c0..1e885aed 100644 --- a/src/core/Void.js +++ b/src/core/Void.js @@ -29,7 +29,7 @@ class Void { // Uint8Array to log pixels in area area; userArea; - // current numberical data + // current numerical data curRadius; curAngle; curAngleDelta; @@ -129,7 +129,7 @@ class Void { while (true) { this.curAngle += this.curAngleDelta; if (this.curAngle > 2 * Math.PI) { - // it does skip some pixel, but thats ok + // it does skip some pixel, but that's ok this.curRadius += 1; if (this.curRadius > TARGET_RADIUS) { this.cancel(); diff --git a/src/core/adminfunctions.js b/src/core/adminfunctions.js index 5333bbe4..f8723036 100644 --- a/src/core/adminfunctions.js +++ b/src/core/adminfunctions.js @@ -48,7 +48,7 @@ import rollbackCanvasArea from './rollback'; /* * Execute IP based actions (banning, whitelist, etc.) * @param action what to do with the ip - * @param ip already sanizized ip + * @param ip already sanitized ip * @return text of success */ export async function executeIPAction(action, ips, logger = null) { @@ -79,7 +79,7 @@ export async function executeIPAction(action, ips, logger = null) { /* * Execute IID based actions * @param action what to do with the iid - * @param iid already sanizized iid + * @param iid already sanitized iid * @return text of success */ export async function executeIIDAction( @@ -265,7 +265,7 @@ export async function executeImageAction( } /* - * retgister responses on socket for Watch Actions + * register responses on socket for Watch Actions */ socketEvents.onReq('watch', (action, ...args) => { if (action === 'getIIDSummary') { @@ -466,7 +466,7 @@ export async function executeProtAction( const width = u - x + 1; const height = v - y + 1; if (width * height > 10000000) { - return [403, 'Can not set protection to more than 10m pixels at onec']; + return [403, 'Can not set protection to more than 10m pixels at once']; } const protect = action === 'protect'; const pxlCount = await protectCanvasArea( diff --git a/src/core/chartSettings.js b/src/core/chartSettings.js index da4a8b64..52b35867 100644 --- a/src/core/chartSettings.js +++ b/src/core/chartSettings.js @@ -296,8 +296,7 @@ export function getCPieOpts(isDarkMode) { }, }; if (isDarkMode) { - const sColor = '#e6e6e6'; - options.plugins.title.color = sColor; + options.plugins.title.color = '#e6e6e6'; } return options; } diff --git a/src/core/config.js b/src/core/config.js index 01590b27..ef371bed 100644 --- a/src/core/config.js +++ b/src/core/config.js @@ -51,7 +51,7 @@ export const HOURLY_EVENT = parseInt(process.env.HOURLY_EVENT, 10) || false; // Accounts export const APISOCKET_KEY = process.env.APISOCKET_KEY || null; -// Comma seperated list of user ids of Admins +// Comma separated list of user ids of Admins export const ADMIN_IDS = (process.env.ADMIN_IDS) ? process.env.ADMIN_IDS.split(',').map((z) => parseInt(z, 10)) : []; diff --git a/src/core/constants.js b/src/core/constants.js index d5dbba68..975781e6 100644 --- a/src/core/constants.js +++ b/src/core/constants.js @@ -2,7 +2,7 @@ */ // canvas size (width and height) MUST be 256 * 4^n to be able to stick -// to established tiling convetions. +// to established tiling conventions. // (basically by sticking to that, we keep ourself many options open for the future) // see OSM tiling: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames export const MAX_SCALE = 40; // 52 in log2 diff --git a/src/core/draw.js b/src/core/draw.js index 9e1e1e7b..71d7bbe4 100644 --- a/src/core/draw.js +++ b/src/core/draw.js @@ -43,13 +43,13 @@ setInterval(() => { /** * - * By Offset is prefered on server side + * By Offset is preferred on server side * This gets used by websocket pixel placing requests * @param user user that can be registered, but doesn't have to * @param canvasId * @param i Chunk coordinates * @param j - * @param pixels Array of indiviual pixels within the chunk, with: + * @param pixels Array of individual pixels within the chunk, with: * [[offset, color], [offset2, color2],...] * Offset is the offset of the pixel within the chunk * @return Promise @@ -74,7 +74,7 @@ export default async function drawByOffsets( if (curReqIPs.has(ip)) { // already setting a pixel somewhere logger.warn( - `Got simultanious requests from ${user.ip}`, + `Got simultaneous requests from ${user.ip}`, ); throw new Error(13); } @@ -95,12 +95,12 @@ export default async function drawByOffsets( */ if (i >= canvasSize / tileSize) { // x out of bounds - // (we don't have to check for <0 becaue it is received as uint) + // (we don't have to check for <0 because it is received as uint) throw new Error(2); } if (j >= canvasSize / tileSize) { // y out of bounds - // (we don't have to check for <0 becaue it is received as uint) + // (we don't have to check for <0 because it is received as uint) throw new Error(3); } diff --git a/src/core/isAllowed.js b/src/core/isAllowed.js index 3b162d47..2a54218d 100644 --- a/src/core/isAllowed.js +++ b/src/core/isAllowed.js @@ -194,7 +194,7 @@ export default function checkIfAllowed(ip, disableCache = false) { * check if email is disposable * @param email * @return Promise - * null: some error occured + * null: some error occurred * false: legit provider * true: disposable */ diff --git a/src/core/me.js b/src/core/me.js index 5a5b1ef1..10aeae4c 100644 --- a/src/core/me.js +++ b/src/core/me.js @@ -4,7 +4,7 @@ * various api endpoints. * */ -import { getLocalicedCanvases } from '../canvasesDesc'; +import { getLocalizedCanvases } from '../canvasesDesc'; import { USE_MAILER } from './config'; import chatProvider from './ChatProvider'; @@ -25,7 +25,7 @@ export default async function getMe(user, lang = 'default') { } delete userdata.mailVerified; - userdata.canvases = getLocalicedCanvases(lang); + userdata.canvases = getLocalizedCanvases(lang); userdata.channels = { ...chatProvider.getDefaultChannels(lang), ...userdata.channels, diff --git a/src/core/parsePixelLog.js b/src/core/parsePixelLog.js index e8f61bc9..8798dc27 100644 --- a/src/core/parsePixelLog.js +++ b/src/core/parsePixelLog.js @@ -173,7 +173,7 @@ export async function getIIDPixels( /* * Get summary of users placing in area of current day * @param canvasId id of canvas - * @param xUL, yUL, xBR, yBR area of canvs + * @param xUL, yUL, xBR, yBR area of canvas * @param time timestamp of when to start * @param iid Limit on one user (optional) * @return array of parsed pixel log lines @@ -266,9 +266,9 @@ export async function getSummaryFromArea( } else { let { pcheck } = ipInfo; if (pcheck) { - const seperator = pcheck.indexOf(','); - if (seperator !== -1) { - pcheck = pcheck.slice(0, seperator); + const separator = pcheck.indexOf(','); + if (separator !== -1) { + pcheck = pcheck.slice(0, separator); } } row.push( diff --git a/src/core/passport.js b/src/core/passport.js index 10159878..b0479d97 100644 --- a/src/core/passport.js +++ b/src/core/passport.js @@ -40,7 +40,7 @@ passport.use(new JsonStrategy({ usernameProp: 'nameoremail', passwordProp: 'password', }, async (nameoremail, password, done) => { - // Decide if email or name by the occurance of @ + // Decide if email or name by the occurrence of @ // this is why we don't allow @ in usernames // NOTE: could allow @ in the future by making an OR query, // but i guess nobody really cares. diff --git a/src/core/setPixel.js b/src/core/setPixel.js index 636a581a..b505fead 100644 --- a/src/core/setPixel.js +++ b/src/core/setPixel.js @@ -13,8 +13,9 @@ import canvases from './canvases'; /** * - * By Offset is prefered on server side + * By Offset is preferred on server side * @param canvasId + * @param color Pixel color * @param i Chunk coordinates * @param j * @param offset Offset of pixel withing chunk diff --git a/src/core/tilesBackup.js b/src/core/tilesBackup.js index c7496f1c..9f88aafe 100644 --- a/src/core/tilesBackup.js +++ b/src/core/tilesBackup.js @@ -17,7 +17,7 @@ import { TILE_SIZE } from './constants'; * Copy canvases from one redis instance to another * @param canvasRedis redis from where to get the data * @param backupRedis redis where to write the data to - * @param canvases Object with all canvas informations + * @param canvases Object with all canvas information */ export async function updateBackupRedis(canvasRedis, backupRedis, canvases) { const ids = Object.keys(canvases); @@ -25,7 +25,7 @@ export async function updateBackupRedis(canvasRedis, backupRedis, canvases) { const id = ids[i]; const canvas = canvases[id]; if (canvas.v || canvas.hid) { - // ignore 3D and hiddedn canvases + // ignore 3D and hidden canvases continue; } const chunksXY = (canvas.size / TILE_SIZE); @@ -70,12 +70,12 @@ export async function updateBackupRedis(canvasRedis, backupRedis, canvases) { /* - * Create incremential PNG tile backup between two redis canvases + * Create incremental PNG tile backup between two redis canvases * @param canvasRedis redis from where to get the data * @param backupRedis redis where to write the data to - * @param canvases Object with all canvas informations + * @param canvases Object with all canvas information */ -export async function incrementialBackupRedis( +export async function incrementalBackupRedis( canvasRedis, backupRedis, canvases, @@ -108,7 +108,7 @@ export async function incrementialBackupRedis( const palette = new Palette(canvas.colors); const chunksXY = (canvas.size / TILE_SIZE); - console.log('Creating Incremential Backup...'); + console.log('Creating Incremental Backup...'); const startTime = Date.now(); let amount = 0; for (let x = 0; x < chunksXY; x++) { @@ -198,7 +198,7 @@ export async function incrementialBackupRedis( } catch (error) { console.error( // eslint-disable-next-line max-len - new Error(`Could not populate incremential backup data of chunk ${key}: ${error.message}`), + new Error(`Could not populate incremental backup data of chunk ${key}: ${error.message}`), ); continue; } @@ -223,15 +223,14 @@ export async function incrementialBackupRedis( } catch (error) { console.error( // eslint-disable-next-line max-len - new Error(`Could not save incremential backup of chunk ${key}: ${error.message}`), + new Error(`Could not save incremental backup of chunk ${key}: ${error.message}`), ); - continue; } } } const time = Date.now() - startTime; console.log( - `Finished Incremential backup of ${amount} chunks in ${time}ms.`, + `Finished Incremental backup of ${amount} chunks in ${time}ms.`, ); } } @@ -273,7 +272,7 @@ function buffer2RGB(palette, chunkBuffer) { /* * Backup all tiles as PNG files into folder * @param redisClient RedisClient - * @param canvases Object with the informations to all canvases + * @param canvases Object with the information to all canvases * @param backupDir directory where to save png tiles */ export async function createPngBackup( diff --git a/src/core/tileserver.js b/src/core/tileserver.js index 9d69191f..bea2e4c0 100644 --- a/src/core/tileserver.js +++ b/src/core/tileserver.js @@ -120,7 +120,7 @@ class CanvasUpdater { } /* - * register changed chunk, queue corespongind tile to reload + * register changed chunk, queue corresponding tile to reload * @param chunk Chunk coordinates */ registerChunkChange(chunk) { diff --git a/src/core/ttag.js b/src/core/ttag.js index 315fa84c..d522eca8 100644 --- a/src/core/ttag.js +++ b/src/core/ttag.js @@ -33,7 +33,7 @@ export function getTTag(lang) { /* * express middleware for getting language * It checks the lang cookie, and if not present, - * the Accept-Lanuage header + * the Accept-Language header */ export function expressTTag(req, res, next) { const cookies = cookie.parse(req.headers.cookie || ''); diff --git a/src/core/utils.js b/src/core/utils.js index 2e9a660e..e925c27b 100644 --- a/src/core/utils.js +++ b/src/core/utils.js @@ -63,7 +63,7 @@ export function getToday() { } // z is assumed to be height here -// in ui and rendeer, y is height +// in ui and renderer, y is height export function getChunkOfPixel( canvasSize, x, @@ -95,10 +95,9 @@ export function getTileOfPixel( pixel, canvasSize = null, ) { - const target = pixel.map( + return pixel.map( (x) => Math.floor((x + canvasSize / 2) / TILE_SIZE * tileScale), ); - return target; } export function getMaxTiledZoom(canvasSize) { @@ -131,7 +130,7 @@ export function getCanvasBoundaries(canvasSize) { } // z is assumed to be height here -// in ui and rendeer, y is height +// in ui and renderer, y is height export function getOffsetOfPixel( canvasSize, x, @@ -167,7 +166,7 @@ export function getIdFromObject(obj, ident) { } // z is returned as height here -// in ui and rendeer, y is height +// in ui and renderer, y is height export function getPixelFromChunkOffset( i, j, @@ -575,7 +574,7 @@ export function combineTables(a, b) { } /* - * conbine two similar objects + * combine two similar objects */ export function combineObjects(a, b) { if (!b) { @@ -621,14 +620,10 @@ export function getDateKeyOfTs(ts) { */ export function parentExists() { try { - if (!window.opener + return !(!window.opener || window.opener.closed || !window.opener.location - || window.opener.location.origin !== window.location.origin - ) { - return false; - } - return true; + || window.opener.location.origin !== window.location.origin); } catch { return false; } diff --git a/src/core/voxExport.js b/src/core/voxExport.js index fb57b9a3..55416f8c 100644 --- a/src/core/voxExport.js +++ b/src/core/voxExport.js @@ -1,10 +1,10 @@ /* * .vox file exporter for 3D canvas * .vox is the Magica Voxel file format that is also compatible with - * other vodel editors like Goxel. + * other voxel editors like Goxel. * A object in a .vox file can have a max dimension of 128x128 and 256 height * As of the latest release with 0.99.5 4/5/2020 this limit is now 256x256x256, - * however, lets keep with the old restreints for support of other software. + * however, lets keep with the old restraints for support of other software. * In .vox, 0,0 is the corner of the model and coordinates are unsigned int, * the z dimension is the height, contrarian to pixelplanet with y. * @@ -15,7 +15,7 @@ /* * THIS IS JUST THE START, I WONT CONTINUE IT ANYTIME SOON SO ITS ALREADY - * COMMITED AS A REFERENCE AND IDEA + * COMMITTED AS A REFERENCE AND IDEA * The idea is to export a 128x128 area around the focal point of where the user * is currently looking at as .vox. The file should just have one model. */ @@ -101,12 +101,12 @@ async function exportVox( // Main Chunk // 4 bytes MAIN // 4 bytes size (0) - // 4 bythes size children chnks + // 4 bytes size children chunks const mainChildrenChunkSize = sizeChunkLength + xyziChunkLength + rgbaChunkLength; const mainChunkLength = 4 + 4 + 4 + mainChildrenChunkSize; // 4 bytes 'VOX ' - // 4 bythes version number + // 4 bytes version number const fileLength = 4 + 4 + mainChunkLength; const voxFile = new ArrayBuffer(fileLength); @@ -164,7 +164,7 @@ async function exportVox( return voxFile; // can then be saved from the UI with react-file-downloader - // aka js-file-doanloader + // aka js-file-downloader } export default exportVox; diff --git a/src/data/redis/captcha.js b/src/data/redis/captcha.js index b2abb54f..4677357a 100644 --- a/src/data/redis/captcha.js +++ b/src/data/redis/captcha.js @@ -159,7 +159,7 @@ export async function needCaptcha(ip) { * force ip to get captcha * @param ip * @return true if we triggered captcha - * false if user would have gotton one anyway + * false if user would have gotten one anyway */ export async function forceCaptcha(ip) { if (CAPTCHA_TIME < 0) { diff --git a/src/data/redis/cooldown.js b/src/data/redis/cooldown.js index 7df65ba1..74dc06e5 100644 --- a/src/data/redis/cooldown.js +++ b/src/data/redis/cooldown.js @@ -22,7 +22,7 @@ const PREFIX = 'cd'; * @param ip ip of request * @param id userId * @param ranked boolean if increasing rank - * @param clrIgnore, bcd, pcd, cds incormations about canvas + * @param clrIgnore, bcd, pcd, cds information about canvas * @param i, j chunk coordinates * @param pxls Array with offsets of pixels * @return see lua/placePixel.lua diff --git a/src/data/redis/lua/placePixel.lua b/src/data/redis/lua/placePixel.lua index 43b16a85..ba18f9b2 100644 --- a/src/data/redis/lua/placePixel.lua +++ b/src/data/redis/lua/placePixel.lua @@ -1,9 +1,9 @@ -- Checking requirements for placing pixels, calculating cooldown --- of user and incrementing pixel counts wthin redis itself. +-- of user and incrementing pixel counts within redis itself. -- Does not set pixels directly. Pixels are set in batches -- in RedisCanvas.js --- Keys: --- isAlloweed: 'isal:ip' (proxycheck, blacklist, whitelist) +-- Keys: +-- isAllowed: 'isal:ip' (proxycheck, blacklist, whitelist) -- isHuman 'human:ip' captcha needed when expired, -- 'nope' if no captcha should be checked -- ipCD: 'cd:canvasId:ip:ip' @@ -17,16 +17,16 @@ -- prevTop: sorted set of yesterdays top 10 -- Args: -- clrIgnore: integer number of what colors are considered unset --- bcd: number baseColldown (fixed to cdFactor and 0 if admin) +-- bcd: number baseCooldown (fixed to cdFactor and 0 if admin) -- pcd: number set pixel cooldown (fixed to cdFactor and 0 if admin) -- cds: max cooldown of canvas -- userId: '0' if not logged in -- cc country code -- req: requirements of canvas -- 'nope', unsigned integer or 'top' --- off1, chonk offset of first pixel --- off2, chonk offset of second pixel --- ..., infinie pixels possible +-- off1, chunk offset of first pixel +-- off2, chunk offset of second pixel +-- ..., infinite pixels possible -- Returns: -- { -- 1: pixel return status code (check ui/placePixel.js) diff --git a/src/data/sql/Ban.js b/src/data/sql/Ban.js index 98969bf9..9adb20bd 100644 --- a/src/data/sql/Ban.js +++ b/src/data/sql/Ban.js @@ -18,7 +18,7 @@ const Ban = sequelize.define('Ban', { }, /* - * wpiration time, + * expiration time, * NULL if infinite */ expires: { diff --git a/src/data/sql/RegUser.js b/src/data/sql/RegUser.js index 1f125c4e..d213fa3b 100644 --- a/src/data/sql/RegUser.js +++ b/src/data/sql/RegUser.js @@ -38,7 +38,7 @@ const RegUser = sequelize.define('User', { defaultValue: false, }, - // null if external oauth authentification + // null if external oauth authentication password: { type: DataTypes.CHAR(60), allowNull: true, @@ -193,7 +193,7 @@ export async function getNamesToIds(ids) { /* * take array of {id: useId, ...} object and resolve - * user informations + * user information */ export async function populateRanking(rawRanks) { if (!rawRanks.length) { diff --git a/src/globe.js b/src/globe.js index 2abbdd53..c81e52f8 100644 --- a/src/globe.js +++ b/src/globe.js @@ -143,8 +143,7 @@ document.addEventListener('DOMContentLoaded', () => { width = window.innerWidth; height = window.innerHeight; renderer.setSize(width, height); - const aspect = width / height; - camera.aspect = aspect; + camera.aspect = width / height; camera.updateProjectionMatrix(); if (controls) controls.handleResize(); } diff --git a/src/routes/adminapi.js b/src/routes/adminapi.js index 90c62435..c332183a 100644 --- a/src/routes/adminapi.js +++ b/src/routes/adminapi.js @@ -85,7 +85,7 @@ router.post('/checklogin', async (req, res) => { if (!compareToHash(password, reguser.password)) { logger.info( - `ADMINAPI: User ${reguser.name} / ${reguser.id} entered wronng password`, + `ADMINAPI: User ${reguser.name} / ${reguser.id} entered wrong password`, ); res.json({ success: false, diff --git a/src/routes/api/auth/index.js b/src/routes/api/auth/index.js index ac17e559..ae56e72e 100644 --- a/src/routes/api/auth/index.js +++ b/src/routes/api/auth/index.js @@ -63,9 +63,9 @@ router.get('/reddit/return', passport.authenticate('reddit', { // eslint-disable-next-line no-unused-vars router.use((err, req, res, next) => { const host = getHostFromRequest(req); - logger.info(`Authentification error: ${err.message}`); + logger.info(`Authentication error: ${err.message}`); const index = getHtml( - 'OAuth Authentification', + 'OAuth Authentication', err.message, host, req.lang, ); res.status(400).send(index); diff --git a/src/routes/api/auth/restore_password.js b/src/routes/api/auth/restore_password.js index 7f1e5cab..598fea3a 100644 --- a/src/routes/api/auth/restore_password.js +++ b/src/routes/api/auth/restore_password.js @@ -1,5 +1,5 @@ /* - * request passowrd reset mail + * request password reset mail */ diff --git a/src/routes/api/auth/verify.js b/src/routes/api/auth/verify.js index 4c7a0032..abf30fc1 100644 --- a/src/routes/api/auth/verify.js +++ b/src/routes/api/auth/verify.js @@ -18,8 +18,8 @@ export default async (req, res) => { if (!error) { const name = await MailProvider.verify(email, token); if (name) { - // notify websoecket to reconnect user - // thats a bit counter productive because it directly links to the websocket + // notify websocket to reconnect user + // that's a bit counter productive because it directly links to the websocket socketEvents.reloadUser(name); // --- const index = getHtml( diff --git a/src/routes/api/banme.js b/src/routes/api/banme.js index 12f51b69..56a7c201 100644 --- a/src/routes/api/banme.js +++ b/src/routes/api/banme.js @@ -1,5 +1,5 @@ /* - * report that user shouldbe banned + * report that user should be banned */ import logger from '../../core/logger'; diff --git a/src/routes/api/block.js b/src/routes/api/block.js index e359fe17..7161fcdf 100644 --- a/src/routes/api/block.js +++ b/src/routes/api/block.js @@ -63,7 +63,7 @@ async function block(req, res) { userId = targetUser.id; userName = targetUser.name; - let ret = null; + let ret; if (blocking) { ret = await UserBlock.findOrCreate({ where: { @@ -85,8 +85,8 @@ async function block(req, res) { /* * delete possible dm channel */ - let dmu1id = null; - let dmu2id = null; + let dmu1id; + let dmu2id; if (user.id > userId) { dmu1id = userId; dmu2id = user.id; diff --git a/src/routes/api/index.js b/src/routes/api/index.js index faf9f5d6..cdd1c45f 100644 --- a/src/routes/api/index.js +++ b/src/routes/api/index.js @@ -60,7 +60,7 @@ router.use(session); /* * passport authenticate - * and deserlialize + * and deserialize * (makes that sql request to map req.user.regUser) * After this point it is assumes that user.regUser is set if user.id is too */ diff --git a/src/routes/api/startdm.js b/src/routes/api/startdm.js index d31d141f..4f234b85 100644 --- a/src/routes/api/startdm.js +++ b/src/routes/api/startdm.js @@ -78,8 +78,8 @@ async function startDm(req, res) { /* * start DM session */ - let dmu1id = null; - let dmu2id = null; + let dmu1id; + let dmu2id; if (user.id > userId) { dmu1id = userId; dmu2id = user.id; diff --git a/src/routes/reset_password.js b/src/routes/reset_password.js index eecbf61a..0185bced 100644 --- a/src/routes/reset_password.js +++ b/src/routes/reset_password.js @@ -81,12 +81,12 @@ router.post('/', async (req, res) => { } await reguser.update({ password: pass }); - logger.info(`Changed password of ${email} via passowrd reset form`); + logger.info(`Changed password of ${email} via password reset form`); const html = getPasswordResetHtml( null, null, lang, - t`Passowrd successfully changed.`, + t`Password successfully changed.`, ); res.status(200).send(html); }); diff --git a/src/server.js b/src/server.js index a8248db4..e804bf5a 100644 --- a/src/server.js +++ b/src/server.js @@ -58,8 +58,9 @@ server.on('upgrade', wsupgrade); /* * use gzip compression for following calls -/* level from -1 (default, 6) to 0 (no) from 1 (fastest) to 9 (best) - * Set custon filter to make sure that .bmp files get compressed + * level from -1 (default, 6) to 0 (no) from 1 (fastest) to 9 (best) + * + * Set custom filter to make sure that .bmp files get compressed */ app.use(compression({ level: 3, @@ -99,7 +100,7 @@ sequelize.sync({ alter: { drop: false } }) // catch errors of server server.on('error', (e) => { logger.error( - `HTTP Server Error ${e.code} occured, trying again in 5s...`, + `HTTP Server Error ${e.code} occurred, trying again in 5s...`, ); setTimeout(() => { server.close(); diff --git a/src/socket/APISocketServer.js b/src/socket/APISocketServer.js index 352b9540..83ef3ce6 100644 --- a/src/socket/APISocketServer.js +++ b/src/socket/APISocketServer.js @@ -222,7 +222,7 @@ class APISocketServer { } else if (even === 'online') { ws.subOnline = true; } else { - logger.info(`APISocket wanted to sub to unexisting ${even}`); + logger.info(`APISocket wanted to sub to nonexistent ${even}`); } logger.info(`APISocket client subscribed to ${even}`); return; diff --git a/src/socket/MessageBroker.js b/src/socket/MessageBroker.js index f9ce3010..4ea0edff 100644 --- a/src/socket/MessageBroker.js +++ b/src/socket/MessageBroker.js @@ -141,7 +141,7 @@ class MessageBroker extends SocketEvents { (buffer) => this.onShardBinaryMessage(buffer, message), true, ); - // immediately give new shards informations + // immediately give new shards information this.publisher.publish(BROADCAST_CHAN, this.thisShard); return; } @@ -285,7 +285,7 @@ class MessageBroker extends SocketEvents { } } catch (err) { // eslint-disable-next-line max-len - console.error(`CLUSTER: Error on binery message of shard ${shard}: ${err.message}`); + console.error(`CLUSTER: Error on binary message of shard ${shard}: ${err.message}`); } } diff --git a/src/socket/SockEvents.js b/src/socket/SockEvents.js index 3ce7b19d..644c7e72 100644 --- a/src/socket/SockEvents.js +++ b/src/socket/SockEvents.js @@ -51,7 +51,7 @@ class SocketEvents extends EventEmitter { /* * requests that expect a response * req(type, args) can be awaited - * it will return a response from whatever listenes on onReq(type, cb(args)) + * it will return a response from whatever listens on onReq(type, cb(args)) * Keep the arguments serializable for shard support */ req(type, ...args) { @@ -104,7 +104,7 @@ class SocketEvents extends EventEmitter { /* * chunk updates from event, image upload, etc. - * everything thats not a pixelUpdate and changes chunks + * everything that's not a pixelUpdate and changes chunks * @param canvasId * @param chunk [i,j] chunk coordinates */ @@ -152,8 +152,8 @@ class SocketEvents extends EventEmitter { * broadcast chat message to all users in channel * @param name chatname * @param message Message to send - * @param sendapi If chat message should get boradcasted to api websockets - * (usefull if the api is supposed to not answer to its own messages) + * @param sendapi If chat message should get broadcasted to api websockets + * (useful if the api is supposed to not answer to its own messages) */ broadcastChatMessage( name, diff --git a/src/socket/SocketClient.js b/src/socket/SocketClient.js index a1c21d8c..42659d6a 100644 --- a/src/socket/SocketClient.js +++ b/src/socket/SocketClient.js @@ -240,7 +240,7 @@ class SocketClient { } } catch (err) { console.log( - `An error occured while parsing websocket message ${message}`, + `An error occurred while parsing websocket message ${message}`, err, ); } diff --git a/src/socket/packets/README.md b/src/socket/packets/README.md index f4b627e5..4425343c 100644 --- a/src/socket/packets/README.md +++ b/src/socket/packets/README.md @@ -1,4 +1,4 @@ # Binary Websocket Packages Note that the node Server receives and sends in [Buffer](https://nodejs.org/api/buffer.html), while the client receives [DataViews](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) and sends ArrayBuffers. -Therefor the server can't share the same code with the client for hydrate / dehydrate and it's split in two files. +Therefore, the server can't share the same code with the client for hydrate / dehydrate, and it's split in two files. diff --git a/src/socket/packets/server.js b/src/socket/packets/server.js index 0e691745..12315e46 100644 --- a/src/socket/packets/server.js +++ b/src/socket/packets/server.js @@ -2,14 +2,14 @@ * server package hydration */ import { - CHANGE_ME_OP, - ONLINE_COUNTER_OP, - PIXEL_UPDATE_OP, - PIXEL_UPDATE_MB_OP, - COOLDOWN_OP, - PIXEL_RETURN_OP, - CHUNK_UPDATE_MB_OP, CAPTCHA_RETURN_OP, + CHANGE_ME_OP, + CHUNK_UPDATE_MB_OP, + COOLDOWN_OP, + ONLINE_COUNTER_OP, + PIXEL_RETURN_OP, + PIXEL_UPDATE_MB_OP, + PIXEL_UPDATE_OP, } from './op'; /* @@ -20,8 +20,7 @@ import { * @return canvasId */ export function hydrateRegCanvas(data) { - const canvasId = data[1]; - return canvasId; + return data[1]; } /* @@ -47,16 +46,14 @@ export function hydrateOnlineCounter(data) { * @return chunkId */ export function hydrateRegChunk(data) { - const i = data[1] << 8 | data[2]; - return i; + return data[1] << 8 | data[2]; } /* * @return chunkId */ export function hydrateDeRegChunk(data) { - const i = data[1] << 8 | data[2]; - return i; + return data[1] << 8 | data[2]; } /* diff --git a/src/ssr/PasswordReset.jsx b/src/ssr/PasswordReset.jsx index 41dba2bb..fbdd788d 100644 --- a/src/ssr/PasswordReset.jsx +++ b/src/ssr/PasswordReset.jsx @@ -9,7 +9,7 @@ import { getTTag } from '../core/ttag'; export default function getPasswordResetHtml(name, code, lang, message = null) { const { t } = getTTag(lang); - let html = ''; + let html; if (message) { html = ` diff --git a/src/store/actions/fetch.js b/src/store/actions/fetch.js index fff4df3d..4fd046fa 100644 --- a/src/store/actions/fetch.js +++ b/src/store/actions/fetch.js @@ -25,7 +25,7 @@ export const shardOrigin = shardHost && `${window.location.protocol}//${shardHost}`; /* - * Adds customizeable timeout to fetch + * Adds customizable timeout to fetch * defaults to 8s */ async function fetchWithTimeout(url, options = {}) { @@ -152,7 +152,7 @@ export async function requestBlock(userId, block) { } /* - * set / unset provile as private + * set / unset profile as private * @param priv * @return error string or null if successful */ @@ -210,7 +210,7 @@ export async function requestBlockDm(block) { /* * leaving Chat Channel (i.e. DM channel) - * @param channelId 8nteger id of channel + * @param channelId integer id of channel * @return error string or null if successful */ export async function requestLeaveChan(channelId) { diff --git a/src/store/actions/popup.js b/src/store/actions/popup.js index 582fe7ed..03e477b0 100644 --- a/src/store/actions/popup.js +++ b/src/store/actions/popup.js @@ -1,5 +1,5 @@ /* - * Actions taht are used only within popup + * Actions that are used only within popup */ export function setWindowArgs(args) { diff --git a/src/store/actions/socket.js b/src/store/actions/socket.js index 0dd5d08e..a4170b09 100644 --- a/src/store/actions/socket.js +++ b/src/store/actions/socket.js @@ -23,7 +23,7 @@ export function receiveChatMessage( return (dispatch, getState) => { channel = Number(channel); const state = getState(); - let isRead = false; + let isRead; if (state.windows) { isRead = state.windows.windows.some( (win) => win.windowType === 'CHAT' && !win.hidden, diff --git a/src/store/middleware/audio.js b/src/store/middleware/audio.js index 3093b108..21598e99 100644 --- a/src/store/middleware/audio.js +++ b/src/store/middleware/audio.js @@ -1,5 +1,5 @@ /* - * play sounds using the HTML5 AudoContext + * play sounds using the HTML5 AudioContext */ diff --git a/src/store/middleware/title.js b/src/store/middleware/title.js index 706d4d63..109a8544 100644 --- a/src/store/middleware/title.js +++ b/src/store/middleware/title.js @@ -1,5 +1,5 @@ /** - * set URL in adress bar, theme-color and title + * set URL in address bar, theme-color and title */ import { diff --git a/src/store/middleware/titlePopUp.js b/src/store/middleware/titlePopUp.js index b7934210..008345f4 100644 --- a/src/store/middleware/titlePopUp.js +++ b/src/store/middleware/titlePopUp.js @@ -1,5 +1,5 @@ /* - * set URL and querys in pupup window + * set URL and queries in popup window */ import { buildPopUpUrl } from '../../components/windows/popUpAvailable'; diff --git a/src/store/reducers/canvas.js b/src/store/reducers/canvas.js index b0670db6..60cea03f 100644 --- a/src/store/reducers/canvas.js +++ b/src/store/reducers/canvas.js @@ -33,7 +33,7 @@ export type CanvasState = { historicalDate: string, historicalTime: string, hover: Array, - // object with all canvas informations from all canvases like colors and size + // object with all canvas information from all canvases like colors and size canvases: Object, // last canvas view, scale, selectedColor and viewscale // just used to get back to the previous coordinates when switching @@ -46,7 +46,7 @@ export type CanvasState = { /* * parse url hash and sets view to coordinates - * @param canvases Object with all canvas informations + * @param canvases Object with all canvas information * @return view, viewscale and scale for state */ function getViewFromURL(canvases) { @@ -331,7 +331,7 @@ export default function canvasReducer( scale, isHistoricalView, historicalCanvasSize, - // rember view, scale and viewscale + // remember view, scale and viewscale prevCanvasCoords: { ...state.prevCanvasCoords, [prevCanvasId]: { diff --git a/src/store/reducers/chatRead.js b/src/store/reducers/chatRead.js index 2ee92ea7..79198db0 100644 --- a/src/store/reducers/chatRead.js +++ b/src/store/reducers/chatRead.js @@ -3,7 +3,7 @@ * */ -const TIME_DIFF_THREASHOLD = 15000; +const TIME_DIFF_THRESHOLD = 15000; const initialState = { // channels that are muted @@ -81,8 +81,8 @@ export default function chatRead( const readTs = isRead ? { ...state.readTs, - // 15s treshold for desync - [cid]: Date.now() + TIME_DIFF_THREASHOLD, + // 15s threshold for desync + [cid]: Date.now() + TIME_DIFF_THRESHOLD, } : state.readTs; const unread = isRead ? state.unread @@ -107,7 +107,7 @@ export default function chatRead( ...state, readTs: { ...state.readTs, - [cid]: Date.now() + TIME_DIFF_THREASHOLD, + [cid]: Date.now() + TIME_DIFF_THRESHOLD, }, unread: { ...state.unread, @@ -122,7 +122,7 @@ export default function chatRead( ...state, readTs: { ...state.readTs, - [cid]: Date.now() + TIME_DIFF_THREASHOLD, + [cid]: Date.now() + TIME_DIFF_THRESHOLD, }, unread: { ...state.unread, diff --git a/src/store/reducers/fetching.js b/src/store/reducers/fetching.js index 195205df..2048a32d 100644 --- a/src/store/reducers/fetching.js +++ b/src/store/reducers/fetching.js @@ -7,7 +7,7 @@ const initialState = { fetchingChunks: 0, fetchingChat: false, fetchingPixel: false, - fetchinApi: false, + fetchingApi: false, }; export default function fetching( @@ -24,10 +24,10 @@ export default function fetching( } case 'SET_API_FETCHING': { - const { fetching: fetchinApi } = action; + const { fetching: fetchingApi } = action; return { ...state, - fetchinApi, + fetchingApi, }; } diff --git a/src/store/reducers/user.js b/src/store/reducers/user.js index a9eb6bb0..257fb370 100644 --- a/src/store/reducers/user.js +++ b/src/store/reducers/user.js @@ -9,7 +9,7 @@ const initialState = { mailreg: false, // blocking all Dms blockDm: false, - // privile is private + // profile is private priv: false, // if user is using touchscreen isOnMobile: false, diff --git a/src/store/reducers/windows.js b/src/store/reducers/windows.js index 41bf9530..9abe0e2e 100644 --- a/src/store/reducers/windows.js +++ b/src/store/reducers/windows.js @@ -69,7 +69,7 @@ function clampPos(prefXPos, prefYPos, width, height) { } /* - * correct window positions according to screensize + * correct window positions according to screen size * to make sure that none if off-screen */ function correctPositions(state) { @@ -189,7 +189,7 @@ export default function windows( switch (action.type) { case 'OPEN_WIN': { /* - * prefered xPos, yPos, height adn width + * preferred xPos, yPos, height adn width * can be given in action (but doesn't have to) */ const { diff --git a/src/store/selectors/popup.js b/src/store/selectors/popup.js index 72718a64..0211576b 100644 --- a/src/store/selectors/popup.js +++ b/src/store/selectors/popup.js @@ -4,4 +4,4 @@ export const selectWindowType = (state) => state.popup.windowType; -export const selectWIndowArgs = (state) => state.popup.args; +export const selectWindowArgs = (state) => state.popup.args; diff --git a/src/store/store.js b/src/store/store.js index dc661866..53fceedf 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -61,7 +61,7 @@ const store = createStore( ); /* - * persistStore of redix-persist is called in client.js + * persistStore of redux-persist is called in client.js */ export default store; diff --git a/src/ui/Chunk.js b/src/ui/Chunk.js index 4faacf91..ad86206b 100644 --- a/src/ui/Chunk.js +++ b/src/ui/Chunk.js @@ -8,10 +8,10 @@ class Chunk { // if chunk receives updates via websocket recUpdates = false; // timestamp of last touch, - // mustbe regularly updated for GC, + // must be regularly updated for GC, // either by touch() or by setting directly timestamp; - // coordiantes + // coordinates z; i; j; diff --git a/src/ui/Chunk2D.js b/src/ui/Chunk2D.js index 9481e77e..8b573375 100644 --- a/src/ui/Chunk2D.js +++ b/src/ui/Chunk2D.js @@ -5,7 +5,7 @@ import Chunk from './Chunk'; class Chunk2D extends Chunk { // HTMLCanvasElement of chunk image; - // boolean if chunk loeaded (request done) + // boolean if chunk loaded (request done) ready; // boolean if chunk is empty isEmpty; diff --git a/src/ui/Chunk3D.js b/src/ui/Chunk3D.js index 141756f4..f5896cb4 100644 --- a/src/ui/Chunk3D.js +++ b/src/ui/Chunk3D.js @@ -116,7 +116,7 @@ class Chunk3D extends Chunk { } /* - // Test Sin encironment creation for load tests + // Test Sin environment creation for load tests async generateSin() { let cnt = 0; this.buffer = new Uint8Array(THREE_TILE_SIZE * THREE_TILE_SIZE * THREE_CANVAS_HEIGHT); @@ -156,13 +156,13 @@ class Chunk3D extends Chunk { let faceCnt = 0; for (let z = THREE_TILE_SIZE - 1; z >= 0; --z) { for (let x = THREE_TILE_SIZE - 1; x >= 0; --x) { - let heighestPixel = 0; + let highestPixel = 0; const startOffset = x + z * THREE_TILE_SIZE; let u = startOffset; for (let y = 0; y < THREE_CANVAS_HEIGHT; ++y) { if (buffer[u] !== 0) { - // heighest pixel fo x,z in heightmap - heighestPixel = y; + // highest pixel fo x,z in heightmap + highestPixel = y; // number of faces to render if (x === 0 || buffer[u - 1] === 0) { @@ -191,11 +191,11 @@ class Chunk3D extends Chunk { } u += rowVolume; } - heightMap[startOffset] = heighestPixel; - if (heighestPixel > totalHeight) { + heightMap[startOffset] = highestPixel; + if (highestPixel > totalHeight) { // last total pixel - totalHeight = heighestPixel; - lastPixel = Chunk3D.getOffsetOfVoxel(x, heighestPixel, z); + totalHeight = highestPixel; + lastPixel = Chunk3D.getOffsetOfVoxel(x, highestPixel, z); } } } @@ -281,7 +281,7 @@ class Chunk3D extends Chunk { const colors = new Uint8Array(faceCnt * 4 * 3); const indices = new Uint32Array(faceCnt * 6); const { rgb } = this.palette; - // just render faces that do not have an adjescent voxel + // just render faces that do not have an adjacent voxel for (let z = 0; z < THREE_TILE_SIZE; ++z) { for (let x = 0; x < THREE_TILE_SIZE; ++x) { const startOffset = x + z * THREE_TILE_SIZE; diff --git a/src/ui/ChunkLoader.js b/src/ui/ChunkLoader.js index dc08d00a..53ee3a88 100644 --- a/src/ui/ChunkLoader.js +++ b/src/ui/ChunkLoader.js @@ -56,7 +56,7 @@ class ChunkLoader { cset(key, chunk) { /* - * chunks are not neccessarily fully loaded here, + * chunks are not necessarily fully loaded here, * but they are in bcRecChunk */ this.#chunks.set(key, chunk); diff --git a/src/ui/ChunkLoader2D.js b/src/ui/ChunkLoader2D.js index 08e8abc0..a3c48f94 100644 --- a/src/ui/ChunkLoader2D.js +++ b/src/ui/ChunkLoader2D.js @@ -71,8 +71,8 @@ class ChunkLoader2D extends ChunkLoader { /* * Get color of pixel in current historical view - * (has to account for canvs size changes in the past - * @param x, y world coordiantes of pixel + * (has to account for canvas size changes in the past + * @param x, y world coordinates of pixel * @return ColorIndex or null if chunks not loaded or historical view not set */ getHistoricalIndexOfPixel( @@ -91,13 +91,13 @@ class ChunkLoader2D extends ChunkLoader { if (historicalTime && historicalTime !== '0000') { // eslint-disable-next-line max-len - const incrementialChunkKey = `${historicalDate}${historicalTime}:${cx}:${cy}`; - const incrementialChunk = this.cget(incrementialChunkKey); - if (incrementialChunk) { - const incrementialColor = incrementialChunk.getColorIndex(px, false); - incrementialChunk.timestamp = curTime; - if (incrementialColor !== null) { - return incrementialColor; + const incrementalChunkKey = `${historicalDate}${historicalTime}:${cx}:${cy}`; + const incrementalChunk = this.cget(incrementalChunkKey); + if (incrementalChunk) { + const incrementalColor = incrementalChunk.getColorIndex(px, false); + incrementalChunk.timestamp = curTime; + if (incrementalColor !== null) { + return incrementalColor; } } } @@ -146,7 +146,7 @@ class ChunkLoader2D extends ChunkLoader { } } catch (error) { // eslint-disable-next-line no-console - console.warn(`Error occured while preloading for ${zoom}:${cx}:${cy}`, + console.warn(`Error occurred while preloading for ${zoom}:${cx}:${cy}`, error); return null; } @@ -234,7 +234,7 @@ class ChunkLoader2D extends ChunkLoader { // eslint-disable-next-line max-len let url = `${window.ssv.backupurl}/${historicalDate.slice(0, 4)}/${historicalDate.slice(4, 6)}/${historicalDate.slice(6)}/`; if (historicalTime) { - // incremential tiles + // incremental tiles url += `${canvasId}/${historicalTime}/${cx}/${cy}.png`; } else { // full tiles diff --git a/src/ui/PixelNotify.js b/src/ui/PixelNotify.js index 62da521a..0673ebb4 100644 --- a/src/ui/PixelNotify.js +++ b/src/ui/PixelNotify.js @@ -66,8 +66,8 @@ class PixelNotify { while (index > 0) { index--; const [setTime, x, y] = this.pixelList[index]; - const timePasseded = curTime - setTime; - if (timePasseded > PixelNotify.NOTIFICATION_TIME) { + const timePassed = curTime - setTime; + if (timePassed > PixelNotify.NOTIFICATION_TIME) { this.pixelList.pop(); continue; } @@ -75,7 +75,7 @@ class PixelNotify { .map((z) => z + this.scale / 2); // eslint-disable-next-line max-len - const notRadius = timePasseded / PixelNotify.NOTIFICATION_TIME * this.notificationRadius; + const notRadius = timePassed / PixelNotify.NOTIFICATION_TIME * this.notificationRadius; const circleScale = notRadius / 100; viewportCtx.save(); viewportCtx.scale(circleScale, circleScale); diff --git a/src/ui/PixelTransferController.js b/src/ui/PixelTransferController.js index 78fb44cd..6bd65677 100644 --- a/src/ui/PixelTransferController.js +++ b/src/ui/PixelTransferController.js @@ -1,5 +1,5 @@ /* - * Control in- and outcomming pixels, + * Control incoming and outgoing pixels, * do client prediction, send to draw on renderer */ import { t } from 'ttag'; @@ -132,7 +132,7 @@ class PixelTransferController { store.dispatch(notify(t`Pixel protected!`)); break; case 9: - // pixestack used up + // pixelstack used up break; case 10: errorTitle = 'Captcha'; diff --git a/src/ui/Renderer2D.js b/src/ui/Renderer2D.js index 17e3d243..8ab37ec7 100644 --- a/src/ui/Renderer2D.js +++ b/src/ui/Renderer2D.js @@ -415,7 +415,7 @@ class Renderer2D extends Renderer { // keep in mind that everything we got here gets executed 60 times per second - // avoiding unneccessary stuff is important + // avoiding unnecessary stuff is important renderMain( state, ) { @@ -631,7 +631,7 @@ class Renderer2D extends Renderer { } else { context.fillRect(x, y, TILE_SIZE, TILE_SIZE); } - // incremential chunks + // incremental chunks if (historicalTime === '0000') continue; chunk = this.chunkLoader .getHistoricalChunk(cx, cy, true, historicalDate, historicalTime); @@ -666,7 +666,7 @@ class Renderer2D extends Renderer { // keep in mind that everything we got here gets executed 60 times per second - // avoiding unneccessary stuff is important + // avoiding unnecessary stuff is important renderHistorical( state, ) { diff --git a/src/ui/Renderer3D.js b/src/ui/Renderer3D.js index ff79b486..de2c38fb 100644 --- a/src/ui/Renderer3D.js +++ b/src/ui/Renderer3D.js @@ -495,7 +495,7 @@ class Renderer3D extends Renderer { switch (multitap) { case 1: { - // singel tap + // single tap // Place Voxel if (this.rollOverMesh.position.y < 0) { return; diff --git a/src/ui/Sky.js b/src/ui/Sky.js index 6ecaa319..19a8bde9 100644 --- a/src/ui/Sky.js +++ b/src/ui/Sky.js @@ -79,7 +79,7 @@ Sky.SkyShader = { // wavelength of used primaries, according to preetham const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 ); - // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function: + // this pre-calculation replaces older TotalRayleigh(vec3 lambda) function: // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn)) const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 ); @@ -122,7 +122,7 @@ Sky.SkyShader = { float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) ); - // extinction (absorbtion + out scattering) + // extinction (absorption + out scattering) // rayleigh coefficients vBetaR = totalRayleigh * rayleighCoefficient; diff --git a/src/ui/loadImage.js b/src/ui/loadImage.js index b55cd4b9..145d066d 100644 --- a/src/ui/loadImage.js +++ b/src/ui/loadImage.js @@ -50,8 +50,7 @@ class LoadingTiles { return; } this.tiles[canvasId] = null; - const img = await loadImage(`./loading${canvasId}.png`); - this.tiles[canvasId] = img; + this.tiles[canvasId] = await loadImage(`./loading${canvasId}.png`); } } diff --git a/src/ui/render2Delements.js b/src/ui/render2Delements.js index 1de0b98c..79c9a059 100644 --- a/src/ui/render2Delements.js +++ b/src/ui/render2Delements.js @@ -1,5 +1,5 @@ /* - * placeholder that shows underneach cursor + * placeholder that shows underneath cursor * */ diff --git a/src/utils/Counter.js b/src/utils/Counter.js index 5eabc0a3..eae6433d 100644 --- a/src/utils/Counter.js +++ b/src/utils/Counter.js @@ -10,8 +10,7 @@ export default class Counter { } get(item) { - const count = this.map.get(item) || 0; - return count; + return this.map.get(item) || 0; } add(item) { diff --git a/src/utils/ProxyCheck.js b/src/utils/ProxyCheck.js index 79e70631..296ee248 100644 --- a/src/utils/ProxyCheck.js +++ b/src/utils/ProxyCheck.js @@ -11,13 +11,13 @@ import { HourlyCron } from './cron'; const HYSTERESIS = 60; /* - * class to serve proxyckec.io key + * class to serve proxycheck.io key * One paid account is allowed to have one additional free account, * which is good for fallback, if something goes wrong */ class PcKeyProvider { /* - * @param pcKeys comma seperated list of keys + * @param pcKeys comma separated list of keys */ constructor(pcKeys, logger) { const keys = (pcKeys) @@ -86,7 +86,7 @@ class PcKeyProvider { } /* - * get usage data of array of keys and put them into available / diabledKeys + * get usage data of array of keys and put them into available / disabledKeys * @param keys Array of key strings */ async getKeysUsage(keys) { @@ -346,7 +346,7 @@ class ProxyCheck { try { res = await this.reqProxyCheck(values); } catch (err) { - this.logger.error(`Eroor: ${err.message}`); + this.logger.error(`Error: ${err.message}`); } for (let i = 0; i < tasks.length; i += 1) { const task = tasks[i]; diff --git a/src/utils/connectRedis.js b/src/utils/connectRedis.js index b0dc43a7..2a391b79 100644 --- a/src/utils/connectRedis.js +++ b/src/utils/connectRedis.js @@ -11,7 +11,7 @@ * as well, there is no chance for this to be merged upstream * * Links: - * express-session readmy with Session Store Implementation section: + * express-session readme with Session Store Implementation section: * https://github.com/expressjs/session#readme * */ diff --git a/src/utils/cron.js b/src/utils/cron.js index 2b9b8ace..e7f24cf0 100644 --- a/src/utils/cron.js +++ b/src/utils/cron.js @@ -60,13 +60,11 @@ function initializeDailyCron() { const lastRun = now.getTime() - now.getUTCHours() * HOUR - (now.getUTCMinutes() * 60 + now.getUTCSeconds()) * 1000; - const cron = new Cron(24, lastRun); - return cron; + return new Cron(24, lastRun); } function initializeHourlyCron() { - const cron = new Cron(1); - return cron; + return new Cron(1); } export const DailyCron = initializeDailyCron(); diff --git a/src/utils/ip.js b/src/utils/ip.js index 0bb9abc0..a00f965a 100644 --- a/src/utils/ip.js +++ b/src/utils/ip.js @@ -1,6 +1,6 @@ /** * - * basic functions to get data fromheaders and parse IPs + * basic functions to get data from headers and parse IPs */ import { USE_XREALIP } from '../core/config'; @@ -23,11 +23,10 @@ function ip4ToNum(ipString) { )) { return null; } - const ipNum = (ipArr[0] << 24) + return (ipArr[0] << 24) + (ipArr[1] << 16) + (ipArr[2] << 8) + ipArr[3]; - return ipNum; } /* @@ -106,7 +105,7 @@ export function isIPv6(ip) { /* * Set last digits of IPv6 to zero, - * needed because IPv6 assignes subnets to customers, we don't want to + * needed because IPv6 assigns subnets to customers, we don't want to * mess with individual ips * @param ip ip as string (v4 or v6) * @return ip as string, and if v6, the last digits set to 0 @@ -114,15 +113,16 @@ export function isIPv6(ip) { export function getIPv6Subnet(ip) { if (isIPv6(ip)) { // eslint-disable-next-line max-len - const ipv6sub = `${ip.split(':').slice(0, 4).join(':')}:0000:0000:0000:0000`; - return ipv6sub; + return `${ip.split(':') + .slice(0, 4) + .join(':')}:0000:0000:0000:0000`; } return ip; } /* * Get numerical start and end of range - * @param range sring of range in the format 'xxx.xxx.xxx.xxx - xxx.xxx.xxx.xxx' + * @param range string of range in the format 'xxx.xxx.xxx.xxx - xxx.xxx.xxx.xxx' * @return [start, end] with numerical IPs (32bit integer) */ function ip4RangeStrToRangeNum(range) { @@ -161,7 +161,7 @@ function ip4RangeNumToCIDR([start, end]) { /* * Get Array of CIDRs for an IPv4 range - * @param range sring of range in the format 'xxx.xxx.xxx.xxx - xxx.xxx.xxx.xxx' + * @param range string of range in the format 'xxx.xxx.xxx.xxx - xxx.xxx.xxx.xxx' * @return Array of CIDR strings */ export function ip4RangeToCIDR(range) { diff --git a/src/utils/location.js b/src/utils/location.js index 3e22a381..d0ed671a 100644 --- a/src/utils/location.js +++ b/src/utils/location.js @@ -3,7 +3,7 @@ */ /* - * gets prefered language out of localisation string + * gets preferred language out of localisation string * @param location string (like from accept-language header) * @return language code */ @@ -45,6 +45,7 @@ const lang2CC = { sr: 'rs', be: 'by', kk: 'kz', + da: 'dk', }; export function langCodeToCC(lang) { return lang2CC[lang] || lang; diff --git a/src/utils/validation.js b/src/utils/validation.js index bdff9d99..e9d80168 100644 --- a/src/utils/validation.js +++ b/src/utils/validation.js @@ -94,7 +94,7 @@ export function validateCoorRange(ulcoor, brcoor, canvasSize) { } else if (Number.isNaN(v)) { error = 'y of bottom-right corner is not a valid number'; } else if (u < x || v < y) { - error = 'Corner coordinates are alligned wrong'; + error = 'Corner coordinates are aligned wrong'; } if (error !== null) { return error; diff --git a/src/utils/whois.js b/src/utils/whois.js index bf0e6208..c1ed9d25 100644 --- a/src/utils/whois.js +++ b/src/utils/whois.js @@ -170,7 +170,7 @@ function singleWhoisQuery( } /* - * check if whois result is refering us to + * check if whois result is referring us to * a different whois server */ const referralKeys = [ @@ -219,8 +219,8 @@ export default async function whoisIp( queryPrefix = '+ n'; } else if (useHost === 'whois.ripe.net') { /* - * flag to not return personal informations, otherwise - * RIPE is gonne rate limit and ban + * flag to not return personal information, otherwise + * RIPE is gonna rate limit and ban */ queryPrefix = '-r'; }