Coder Social home page Coder Social logo

michaellindstromm / d21-group-translator-polyglot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nss-day-cohort-21/d21-group-translator-polyglot

0.0 1.0 0.0 20 KB

d21-group-translator-polyglot created by GitHub Classroom

CSS 0.01% HTML 24.84% JavaScript 75.15%

d21-group-translator-polyglot's Introduction

Language Translator

Setup

mkdir -p ~/workspace/group-projects/translator && cd $_

This will be a group project managed by Github Classroom, so pick one teammate to create the Classroom team. Once the repo is created, the other teammates can join the Classroom team and clone the repository.

Instructions

Represent a small bilingual lexicon as a Javascript object (see example below) and use it to translate a holiday card message from English into another language. Each member of the team will build a JavaScript module that will convert text entered into an input field to the language that they choose.

{"merry":"god", "christmas":"jul", "and":"och", "happy":"gott", "new":"nytt", "year":"år"}

This is Swedish, so please choose other languages. You can add as many words/translations as you wish so that the user can write more complex holiday cards.

  1. One team member creates a Github project and adds the others as collaborators.
  2. Each team member picks a language.
  3. Your project should have one HTML file that has a textarea, a select element with an option for each language, a button with a label of "Translate", and an empty DOM element into which the translated text will be inserted.
  4. The team must discuss and choose a single variable name that will hold all of the logic that the team creates.
  5. Each team member will create one JavaScript file that contains one IIFE. Each teammate's IIFE will augment the other teammates' IIFEs.
  6. The lexicon should be a private variable that cannot be accessed by the other team member's module except through an accessor (getter) method.
  7. Each IIFE should expose, in its public interface, a method named translateTo{Language} (e.g. translateToSpanish or translateToFinnish) that accepts a single argument. That argument's value should be the text entered in by the user. The method should return the translated text.
  8. The team should create an extra JavaScript file that handles interacting with the form elements and determining which method should be called.

Optional Bonus 1

Find a way to write your IIFEs so that it doesn't matter whose module gets created first.


Optional Bonus 2

In addition to inserting the translated text into the HTML document, have the browser read the translated text to the user.

d21-group-translator-polyglot's People

Contributors

joeshep avatar jsheridanwells avatar michaellindstromm 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.