GithubHelp home page GithubHelp logo

alevanni / american-british-translator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 299 KB

A translator from american to british english and vice versa

JavaScript 96.09% CSS 2.02% Shell 0.23% HTML 1.66%

american-british-translator's Introduction

Image

  • Project can be found on repl at https://american-british-translator.alevanni.repl.co/
  • All logic goes into /components/translator.js
  • Complete the /api/translate route in /routes/api.js
  • Create all of the unit/functional tests in tests/1_unit-tests.js and tests/2_functional-tests.js
  • A very basic template for the manual test cases is in the file /tests/myTestCaseTemplate.ods.
  • Postman functional tests are in the file /tests/POST suite.postman_collection.json.
  • Postman results are in the file /tests/POST suite.test.json
  • See the JavaScript files in /components for the different spelling and terms your application should translate
  • To run the tests on Repl.it, set NODE_ENV to test without quotes in the .env file
  • To run the tests in the console, use the command npm run test. To open the Repl.it console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell"

Write the following tests in tests/1_unit-tests.js:

  • Translate Mangoes are my favorite fruit. to British English
  • Translate I ate yogurt for breakfast. to British English
  • Translate We had a party at my friend's condo. to British English
  • Translate Can you toss this in the trashcan for me? to British English
  • Translate The parking lot was full. to British English
  • Translate Like a high tech Rube Goldberg machine. to British English
  • Translate To play hooky means to skip class or work. to British English
  • Translate No Mr. Bond, I expect you to die. to British English
  • Translate Dr. Grosh will see you now. to British English
  • Translate Lunch is at 12:15 today. to British English
  • Translate We watched the footie match for a while. to American English
  • Translate Paracetamol takes up to an hour to work. to American English
  • Translate First, caramelise the onions. to American English
  • Translate I spent the bank holiday at the funfair. to American English
  • Translate I had a bicky then went to the chippy. to American English
  • Translate I've just got bits and bobs in my bum bag. to American English
  • Translate The car boot sale at Boxted Airfield was called off. to American English
  • Translate Have you met Mrs Kalyani? to American English
  • Translate Prof Joyner of King's College, London. to American English
  • Translate Tea time is usually around 4 or 4.30. to American English
  • Highlight translation in Mangoes are my favorite fruit.
  • Highlight translation in I ate yogurt for breakfast.
  • Highlight translation in We watched the footie match for a while.
  • Highlight translation in Paracetamol takes up to an hour to work.

Write the following tests in tests/2_functional-tests.js:

  • Translation with text and locale fields: POST request to /api/translate
  • Translation with text and invalid locale field: POST request to /api/translate
  • Translation with missing text field: POST request to /api/translate
  • Translation with missing locale field: POST request to /api/translate
  • Translation with empty text: POST request to /api/translate
  • Translation with text that needs no translation: POST request to /api/translate

american-british-translator's People

Contributors

alevanni avatar ttury avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.