User blog:Lonely Dinosaur/Pronouns and names tester

It's a website program which allow you to test as many names and pronouns as you want.

Source code
Pronouns and Names Tester



function shuffle(array){

let index = Math.floor(Math.random * array.length);

let string = array[0];

array[0] = array[index];

array[index] = string;

}

function upperCase(string){

return string.charAt(0).toUpperCase + string.slice(1);

}

function testResults(form){

let name = form.name.value;

let subjectPronoun = form.subjectPronoun.value;

let objectPronoun = form.objectPronoun.value;

let possesiveDeterminer = form.possesiveDeterminer.value;

let possesivePronoun = form.possesivePronoun.value;

let reflexivePronoun = form.reflexivePronoun.value;

let plural = form.plural.value;

let is = 'is';

let has = 'has';

let was = 'was';

let s = 's';

let does = 'does';

if(plural === '1'){

is = 'are';

has = 'have';

was = 'were';

s = '' ;

does = 'do';

}

let sentencesN = [`I've met ${name} today. `,

`${name} is my best friend. `,

`Do you know ${name}? `];

let sentencesSP = [`${upperCase(subjectPronoun)} ${is} really cool. `,

`${upperCase(subjectPronoun)} ${is} a part of the LGBTA wiki. `,

`${upperCase(subjectPronoun)} ${has} so beautiful eyes! `,

`Every time ${subjectPronoun} laugh${s}, I can't help but laugh with ${objectPronoun}. `];

let sentencesOP = [`I can't wait to meet with ${objectPronoun} again. `,

`I'm in love with ${objectPronoun}. `,

`I can introduce ${objectPronoun} to you. `];

let sentencesPD = [`${upperCase(possesiveDeterminer)} jokes are so funny! `,

`I'm amazed with ${possesiveDeterminer} skills. `,

`${upperCase(possesiveDeterminer)} smile always brightens up my day. `];

let sentencesPP = [`This bracelet is ${possesivePronoun}, ${subjectPronoun} ${has} borrowed it to me. `,

`This plushie is ${possesivePronoun}, isn't it cute? `,

`This notebook is ${possesivePronoun}, ${subjectPronoun} must have forgotten it. `];

let sentencesRP = [`${upperCase(subjectPronoun)} ${has} made cookies for me for ${reflexivePronoun}, that was so wholesome of ${objectPronoun}. `,

`${upperCase(subjectPronoun)} ${is} making a dinner for ${reflexivePronoun} right now. `,

`${upperCase(subjectPronoun)} organised ${possesiveDeterminer} birthday party all for ${reflexivePronoun}, can you belive that? `];

shuffle(sentencesN);

shuffle(sentencesOP);

shuffle(sentencesSP);

shuffle(sentencesPD);

shuffle(sentencesPP);

shuffle(sentencesRP);

let result = sentencesN[0] + sentencesSP[0] + sentencesOP[0] + sentencesPD[0] + sentencesPP[0] + sentencesRP[0];

alert(result);

}



Input your name/name you want to test:



Input all forms of your pronouns/pronouns you want to test, as in the example:











This pronoun set is:



singular

plural



How to use it
You need to copy-paste whole source code to your text editor, then save it under the name "index.html" (it probably won't work properly if you name it differently). Some text editors may add extension of the file (for example ".txt") automatically, in this case you have to remove it. If you are working on a mobile device, your text editor may not allow you to add extension of the file when saving (not sure, I don't have much experience with mobiles), in this case you have to go to location of the file after it and change it manually. If you don't have a text editor, you can go to internet website which will allow you paste code on it and download it as a file (example of such website that I've found: https://gadtool.blogspot.com/2021/03/notepad.html; if you put extension in the name of the file, it'll be automatically saved in html format) (then you probably won't be able to take a look on the source code, so if you're planning to modify testing sentences, you may want to store your version of the code in your notes and download a new version of the file every time you make a change in it). Now you can open the file in your browser and your pronouns and names tester is ready to use. (Singular/plural option determines kind of verbs used with pronouns in sentences, for those who were not sure. Plural you'll use only with pronouns such as they/them.)

How to personalize testing sentences
Sample testing sentences may not feel like they describe you and there are only few of them (also they probably contain at least one misspelling or grammatical error, cause I'm not native), so you'd probably want to customize them. You can find them in the code and figure out how to change and add ones for yourself, but it may be easier if tell you all the rules you have to follow. So here they are:


 * Every sentence has to be stored in sentences lists, inside of a [] brackets.
 * Sentences in the list have to be separated by commas.
 * Every sentence has to be writed inside `` backticks (this is not an apostrophe). (You can write more than one sentence in one backticks, if you want result message to be longer, they just have to be inside of them.)
 * There should be space after the final dot of the sentence.
 * Every time when in sentence should be used a name or a pronoun, you should write the name of the variable which stores it inside of a ${} brackets. If you are confused by names of the pronouns, almost at the end of the code you'll find they/them example with all the names written next to them.
 * If pronoun is at the beggining of the sentence, you should write ${upperCase} and put the variable name in the brackets. (You can do this also for names, if you often write them starting with lowercase.)
 * For every verb which changes depending on the noun plurality reffering to you (in the third person), but not after your name, you should be using a variable. ${is}, ${has}, ${was} and ${does} for each of these verbs, and ${s} at the end of the regular ones. You shouldn't use shortened forms of these verbs. If there are other irregular ones that I've missed, you can add it in this way: "let singularformoftheverb = 'singular form of the verb';" added above "if(plural === '1'){" line, and "singularformoftheverb = 'plural form of the verb';" added belove this line.
 * Every sentence in sentence list should contain type of variable which first letter(s) are in the name of this list (for example sentencesN is for names). It's to make sure you'll see every type of pronoun in the result message.
 * You shouldn't put similiar/conflicted sentences on different list, cause it may result in artifical sounding message.
 * If you don't want outcome to be random, you can take "let result =..." line and place it beyond all "shuffle..." lines. Then you can change all zeros to indexes of sentences you want to get (you have to count on which place is this sentence on specific list, but beggining from zero).
 * If you have some experience with JavaScript/HTML, feel free to mess up with this code and send new version of it to your friends or upload it on the wiki. Just don't claim it to be your own.

To see the results of your changes, you have to save the file and refresh/reopen the page. If something doesn't work properly or you have any questions, feel free to message me. I hope it'll help you find pronouns set(s) and name(s) that you're comfortable with!