Skip to content

shartrooper/US-and-UK-english-translator

Repository files navigation

freeCodeCamp - Quality Assurance 5: American / British English Translator

User stories:

  1. I can enter a simple sentence into the text area and select whether to translate to British or American English from the dropdown menu.
  2. When the "Translate" button is pressed, append the translated sentence to the translated-sentence div. See the JavaScript files in /public for the different spelling and terms your application should translate.
  3. Your application should handle the way time is written in American and British English. For example, ten thirty is written as "10.30" in British English and "10:30" in American English.
  4. Your application should also handle the way titles/honorifics are abbreviated in American and British English. For example, Doctor Wright is abbreviated as "Dr Wright" in British English and "Dr. Wright" in American English. See /public/american-to-british-titles.js for the different titles your application should handle.
  5. Wrap any translated spelling or terms with <span class="highlight">...</span> tags so they appear in green.
  6. If the sentence in the text area has no spelling or terms that should be translated, append the message "Everything looks good to me!" to the translated-sentence div.
  7. If there is no text in the text area, append the message "Error: No text to translate." to the error-msg div so the text appears in red.
  8. I can press the "Clear Input" button to remove all text from the text area and the translated-sentence div.
  9. All 20 unit tests are complete and passing. See /tests/1_unit-tests.js for the sentences you should write tests for.
  10. All 4 functional tests are complete and passing. See /tests/2_functional-tests.js for the functionality you should write tests for.

Testing and Notes

  • All main logic into public/translator.js.
  • To run the project,npm start for standard with testing or npm run watch with nodemon in dev mode. npm run test with test mode.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages