No commit activity in last 3 years
No release in over 3 years
Translates an english string to wookie speak and vice versa.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.9.2
~> 2.0
 Project Readme

WookieTranslator

Build Status

2012/04/01

This gem is based on http://selarips.free.fr/wookieetranslator/ and built after a tweet from @MikeSwole.

Installation

Add this line to your application's Gemfile:

gem 'wookie-translator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install wookie-translator

Usage

The gem comes with a command line interface:

$ wookie -e "enter your text here!"
$ wookie -w "wowhaoworc rooohurc aowokao acworcwo!"

You may also use the gem's API:

require 'wookie-translator'
t = Wookie::Translator.new
wookie = t.to_wookie "Hello World."
english = t.from_wookie wookie #=> "hello world."

If you want to use another wookie dialect, you want to inherit from Wookie::Dialect::Base and implement the methods #to_wookie and #from_wookie:

require 'wookie-translator'
class ReverseWookie < Wookie::Dialect::Base
  def to_wookie(english)
    english.reverse
  end

  def from_wookie(wookie)
    wookie.reverse
  end
end

t = Wookie::Translator.new(dialect: ReverseWookie)
wookie = t.to_wookie "Hello World." #=> ".dlroW olleH"
english = t.from_wookie wookie #=> "Hello World."

Contributing

The wookie translator lacks of translations for the three main dialects: Shyriiwook, Xaczik and Thykarann. If you are a native speaker (or at least familiar with one of those dialects), you're encouraged to follow these steps:

  1. Fork it
  2. Create your dialect branch (git checkout -b dialect-X)
  3. Build a new dialect class
  4. Commit your changes (git commit -am 'Added missing dialect')
  5. Push to the branch (git push origin dialect-X)
  6. Create new Pull Request

License

This code is public domain. Remember that »Wookie« and »Star Wars« are courtesy of LucasArts.