Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

MicrosoftTCE/translator-intro

Repository files navigation

translator-intro

This repository contains two components:

  • a website serving as an introductory page to Translator
  • userscripts that modify the behavior of Translator

The intended scenario is for users to begin at this website, make a language selection, be redirected to Translator, then be redirected back to this website when the Translator session ends.

Website

Setup

  1. Install Git, Ruby, then RubyGems, then Bundler.

  2. Download code:

git clone [email protected]:MicrosoftTCE/translator-intro.git
  1. Install Jekyll:
cd translator-intro
bundle install

Run development server

After performing the above setup:

bundle exec jekyll serve

You should now be able to see the website at http://127.0.0.1:4000

Serving website

On GitHub (recommended)

This site is currently served from GitHub Pages, which automatically builds Jekyll sites.

https://microsofttce.github.io/translator-intro/

Therefore, any code changes that are pushed to the gh-pages branch of this repository will automatically become live at the above URL.

Elsewhere

To serve this project from a hosting location other than GitHub Pages (after completing above setup):

  1. Build the site
bundle exec jekyll build
  1. Host the contents of the _site directory however you'd like:
cd _site
python -m SimpleHTTPServer

userscripts

The directory userscripts contains files intended for use with the Tampermonkey web browser extension.

These scripts were installed on Surface tablets to slightly modify the behavior of Translator in the following ways:

  • Translator Join.user.js
    • Set the applicant name to "Applicant "
    • Set the language selection based on the "language" URL parameter
  • Translator Chat.user.js
    • Redirect user back to this website when Translator displays an exit dialogue
    • Redirect user back to this website when Translator force-exits the user

Installing

To install these scripts on a web browser so that Translator's behavior is modified as described above:

  1. Install the Tampermonkey extension

  2. Install the two scripts by browsing to their raw JavaScript representation in this repository. Tampermonkey should ask you to install them upon browsing to them. Please ensure you use the gh-pages branch: