Project

er18ern

0.0
No commit activity in last 3 years
No release in over 3 years
i18n helpers (with ermahgerd)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

er18ern

i18n extensions and utilities

Put this in an initializer

Er18Ern::RailsApp.setup!

Put this in script/ermahgerd

require 'er18ern'

translator = Er18Ern::Translator.new
translator.locales_dir = File.expand_path('../../config/locales/', __FILE__)
translator.google_translator_hax_locale_dirs = File.expand_path('../../config/locale_hax/', __FILE__)

translator.generate_ermahgerd!
translator.resave_en!
translator.save_jp!
translator.save_engrish!
translator.generate_google_translations! #have to do this last because it could override the matching of the jp and engrish

Use copy/paste with google translate to: locale_hax/GOOGLE_TRANSLATE_INPUT (en) --> locale_hax/GOOGLE_TRANSLATE_OUTPUT (jp) locale_hax/GOOGLE_TRANSLATE_OUTPUT (jp) --> ?? --> ?? --> ?? --> locale_hax/GOOGLE_TRANSLATE_AGAIN (engrish)

TODO: write some tests!