From 74ed61169c3e1bbd001961d47358aae9e3997ed9 Mon Sep 17 00:00:00 2001 From: om Date: Fri, 26 Aug 2022 11:46:39 +0200 Subject: [PATCH] Add english text for dialogs This still needs a UI to switch languages --- chatapp.svg | 164 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 156 insertions(+), 8 deletions(-) diff --git a/chatapp.svg b/chatapp.svg index f6c7ec1..8b8ae2b 100644 --- a/chatapp.svg +++ b/chatapp.svg @@ -54,6 +54,8 @@ const typing_speed = 50; var conversation_count = 0; var current_dialog = null; +var current_language = "da"; +var current_dialog_fn = null; /// SVG 1.1 doesn't do proper text splitting into several lines. /// we need to do it ourselves. @@ -281,26 +283,28 @@ function start_chat(who) { switch(who) { case 'Ven': - dialog_ven(); + current_dialog_fn = dialog_ven; break; case 'Mor': - dialog_mor(); + current_dialog_fn = dialog_mor; break; case 'Kæreste': - dialog_kaereste(); + current_dialog_fn = dialog_kaereste; break; case 'Politiven': - dialog_politi(); + current_dialog_fn = dialog_politi; break; case 'ChatSupport': - dialog_support(); + current_dialog_fn = dialog_support; break; case 'Nabopige': - dialog_nabopige(); + current_dialog_fn = dialog_nabopige; break; default: alert(`kontakten ${who} er ikke implementeret endnu`); + return; } + current_dialog_fn(); } function Dialog() { @@ -430,6 +434,14 @@ document.addEventListener( ) async function dialog_ven() { + if(current_language == "da") { + await dialog_ven_da(); + } else { + await dialog_ven_en(); + } +} + +async function dialog_ven_da() { let d = new Dialog(); current_dialog = d; await d.me("hej"); @@ -445,10 +457,37 @@ async function dialog_ven() { await d.you('Men det giver ikke meget mening'); await d.me('Alle vores beskeder skal scannes på grund af børn på nettet? Det lyder dumt!', true); await d.you('Her kan du læse mere om det:'); - await d.you('https://chatcontrol.eu'); + await d.you('https://chatcontrol.dk'); + } + +async function dialog_ven_en() { + let d = new Dialog(); + current_dialog = d; + await d.me("hi"); + await d.you("hi, what's up?"); + await d.you('Have you heard about the new EU law "ChatControl"?'); + await d.me("No, I haven't"); + await d.me("What is it about?"); + await d.you('The EU commission plans to read all chat messages in the EU'); + await d.me('Yeah? But we encrypt all of our chats? Tough luck!'); + await d.you('That has been taken into account. The eavesdropping will happen before the encryption step on your phone!'); + await d.me('That sounds stupid. Why do they want to do that?'); + await d.you('They claim that this is for protecting children on the internet'); + await d.you("But that doesn't make any sense."); + await d.me('All of our messages will be scanned because of children on the internet? That sounds really stupid!', true); + await d.you('Here you can read more about it:'); + await d.you('https://chatcontrol.dk'); } async function dialog_mor() { + if(current_language="da") { + await dialog_mor_da(); + } else { + await dialog_mor_en(); + } +} + +async function dialog_mor_da() { let d = new Dialog(); current_dialog = d; await d.you("Jeg har fundet nogle gamle familiebilleder fra vores ferie 10 år siden"); @@ -456,7 +495,23 @@ async function dialog_mor() { await d.you("(naked stick figure image here)"); } +async function dialog_mor_en() { + let d = new Dialog(); + current_dialog = d; + await d.you("I have found some old family photos from our holiday from 10 years ago"); + await d.you("This is you playing on the beach"); + await d.you("(naked stick figure image here)"); +} + async function dialog_kaereste() { + if(current_language="da") { + await dialog_kaereste_da(); + } else { + await dialog_kaereste_en(); + } +} + +async function dialog_kaereste_da() { let d = new Dialog(); current_dialog = d; await d.me('hej smukkeste'); @@ -468,12 +523,37 @@ async function dialog_kaereste() { await d.me('Jeg tror at vi skal være forsigtige, fordi der er en overvågning af vores beskeder'); await d.you('What the fuck??? Hvem overvågner os?????'); await d.me('Det kan være at udbyderen gør det, fordi de har lov til det'); - await d.me('Men i fremtiden vil det faktisk blive forpligtende at scanne beskeder i EU\'en'); + await d.me("Men i fremtiden vil det faktisk blive forpligtende at scanne beskeder i EU'en"); await d.me('Og hvis der er beskeder som "ligner" børneborno får politiet en kopi af dem'); await d.you('Jeg vil hellere ikke at politiet får mine nøgenbilleder. Det er min krop og jeg vil selv bestemme over det!'); } +async function dialog_kaereste_en() { + let d = new Dialog(); + current_dialog = d; + await d.me('Hi beautiful'); + await d.you('hi, I just thought about you'); + await d.you("and that's why I have taken a sexy picture"); + await d.you('#kaereste_foto'); + await d.me('Thanks! I missed that!', true); + await d.me('you still look so young.'); + await d.me('I think we have to be careful, because our messages are being read'); + await d.you('What the fuck??? Who is watching us?????'); + await d.me('It can be that the chat provider does this, because they are allowed to search for illegal material'); + await d.me('But in the future it will also become mandatory to scan chat messages in the EU'); + await d.me('And if a message looks like child pornography then the police will get a copy of it'); + await d.you("I don't want to share my nudes with the police. This is my body and I decide who I share it with!"); +} + async function dialog_politi() { + if(current_language="da") { + await dialog_politi_da(); + } else { + await dialog_politi_en(); + } +} + +async function dialog_politi_da() { let d = new Dialog(); current_dialog = d; await d.me('Hej, jeg har et spørgsmål'); @@ -486,7 +566,28 @@ async function dialog_politi() { await d.you('Men så har vi den totale overvågning og ikke længere en fri samfund.'); } +async function dialog_politi_en() { + let d = new Dialog(); + current_dialog = d; + await d.me('Hi, I have a question'); + await d.me('Have you heard about ChatControl and what do you think about it?'); + await d.you('I know about it. It is actually a really bad idea'); + await d.you('The problem is that there are many false positive hits that need to be analysed manually'); + await d.you("And I do not want to read through people's private messages. These are confidential conversations"); + await d.you("I don't like that my collegues can potentially see what I write to by partner, just because I could potentially do something illegal while chatting"); + await d.you("Just think about how absurd the idea is: Why don't we wiretap all phones? There will be some crimes that we will detect!"); + await d.you('But then we have total surveillance and no longer a free society.'); +} + async function dialog_support() { + if(current_language="da") { + await dialog_support_da(); + } else { + await dialog_support_en(); + } +} + +async function dialog_support_da() { let d = new Dialog(); current_dialog = d; await d.you('Velkommen til supporten af ChatWorld. Hvad kan jeg hjælpe dig med?'); @@ -502,7 +603,31 @@ async function dialog_support() { await d.you('Beklager at jeg kan ikke tilbyde noget bedre. Men jeg håber at du forstår situationen'); } +async function dialog_support_en() { + let d = new Dialog(); + current_dialog = d; + await d.you('Welcome to the ChatWorld support. How can I help you?'); + await d.me('I suspect that the chat program is scanning my end-to-end encrypted messages. Am I right?'); + await d.you('Yes, that is a feature that our boss wanted to have'); + await d.you('Some people have abused the chat service to share child pornography and that gives bad publicity. The boss has therefore chosen to scan all end-to-end encrypted messages'); + await d.you("Child pornography is a really bad thing. But I don't think it is sensible to scan all messages."); + await d.you('and the scan technology can be abused for many things. I as a software engineer can not even see what the scanner is searching for'); + await d.you("It can be that it will look for alternative political views and marks them as illegal even though they aren't"); + await d.you('It is a danger to our democracy when confidential messages are scanned for things that the political elite does not like'); + await d.you('But it is unfortunately my job to keep the surveillance working'); + await d.me('That does not solve the problem. But thank you for the information. I will look for ways to avoid the surveillance in the future', true); + await d.you('I apologize that I can not offer something better. But I hope you understand the situation'); +} + async function dialog_nabopige() { + if(current_language="da") { + await dialog_nabopige_da(); + } else { + await dialog_nabopige_en(); + } +} + +async function dialog_nabopige_da() { let d = new Dialog(); current_dialog = d; await d.you('Gæt hvem har snart fødselsdag!'); @@ -524,6 +649,29 @@ async function dialog_nabopige() { await d.me('børn har også brug for hjemligheder og fortrolighed!'); } +async function dialog_nabopige_en() { + let d = new Dialog(); + current_dialog = d; + await d.you("Guess who's birthday it is soon!"); + await d.me("It's yours?"); + await d.you('Right! That was maybe too easy'); + await d.me('How old will you be?'); + await d.you('ten'); + await d.you('I am excited for the party. I have invited a lot of people'); + await d.you('You are also invited!'); + await d.you('Hi, I want to tell you a secret'); + await d.you("But I just can't do that in the chat"); + await d.you('Because what we write here is being analysed'); + await d.you('And it is not going to be a secret when there are others who read the messages'); + await d.me('You can tell me the secret tomorrow, when I come to your house', true); + await d.me('I am surprised that you know about the chat surveillance'); + await d.you("Yes, it is stupid. I have read about it and I really don't like it"); + await d.you('It is better to have adult friends whom I can trust that a computer who reads everything that I write.'); + await d.me('Completely agree'); + await d.me('Children also need their secrets and confidentiality'); +} + + ]]>