Hi! I’m doing my Quality Assurance Project ‘American -British Translator’ so far.
It’s listed on the last but it’s not gonna be my last one. I skipped several projects.
And I’ve realized it is on the last for reasons.
It’s freaking hard. I think my bran just stopped and I don’t know from where to start to solve problems.
Well, my translator is working but not perfectly.
Setting aside testing problems, I’m struggling the function of translator.
So my struggle point is
Can you toss this in the trashcan for me -> Can you toss this in the bin for me
it should be the answer but I get ’ Can you toss this in the rubbishcan for me?’
so I checked that there are ‘trashcan : bin’ and ‘trash: rubbish’ pairs in dictionary.
I’ve tried to figure this out but I am lost. It looks pretty simple to fix this but my foresight is blurry. Could anyone give me any tips if you have time and don’t mind to do this?
Link to my project : https://repl.it/@atiktook/boilerplate-project-american-british-english-translator#public/translator.js
if(mode === 'american-to-british'){
answer = americanDic.filter(x => input.includes(x[0]))
answer.forEach( word =>
input = input.replace(word[0], "<span class='highlight' style='color:green'>" + word[1] + "</span>")
)
if(input.match(amerTimeRegex)){
changedTime = input.match(amerTimeRegex)[0].replace('\:', '\.')
input = input.replace(input.match(amerTimeRegex)[0], "<span class='highlight' style='color:green'>" + changedTime + "</span>")
}
}
the code regarding the problem…
Thank you in advance and sorry if my english is not clear enough to explain where I’m stuck right now.