Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combined features and fixes currently in use by numerex for several production apps #15

Open
wants to merge 112 commits into
base: master
Choose a base branch
from

Conversation

spemmons
Copy link

i really like this gem and have pushed my company to use it for several apps, especially when needing to go to outside translation firms to get the localization work done. the GUI is particularly useful for this process, but also the rake tasks have been enhanced to deal with practical scenarios we encounter...

some of the earlier changes included in the history were done by a spanish-speaking contractor we used, but more recently, i've done most of the changes...

FIXES

  • various changes to work with rails 3.0, mostly pulled from other contributors...
  • localize ("l" method) format was being modified with gsub and might be a frozen constant -- made a dup before processing...
  • explicitly use I18n::Backend::Locale model in places where simply using Locale was getting confused...
  • direct English "keys" with trailing periods were sometimes getting confused with locale-file keys if the English was a single word like "Tracking..." -- also ensure that matching is case sensitive...

FEATURES

  • when loading locale files from gems, it is possible that the app may want to override them, so we the gem files first, followed by the app files...
  • improved the finding of direct English text in code that allows avoiding the use of /locales/en.yml for most app-level translations -- this is the really beauty of this gem IMHO...
  • generally beefed up the rake tasks to include a full "reset_locales_and_translations" process that will load gem-based locale files, search for direct English in the app, and prepare other locales for translation in the GUI
  • added a TranslationSource model with a "belongs_to" relationship to Translation that helps establish where a translation came from: locale file, source file, etc. -- useful for diagnostics
  • import/export/backup of translations into /config/translations/XX.yml for each locale in the DB; helps with migrating translations from a test/dev server where the GUI is allowed to run to a production server where it is not...
  • added rails engine to server public assets used by GUI
  • route to GUI is not published when Rails.env.production? is true
  • generally improved GUI for usability and provide graphical feedback regarding % completion
  • added export to CSV to GUI -- no import from CSV yet... needed?

KNOWN ISSUES:

  • i have had a goal (not yet achieved) of using travis CI to run the tests. i'm not really an rspec guy, so i've struggled getting the tests running successfully. they do not seem to have been kept up-to-date and they need more work... and better coverage. i hope to address that soon...
  • the standard i18n handling of "default" values is not quite right, but this was true before...
  • asset translation doesn't work... did it ever? we don't use it, so haven't invested time in this...

cheers! -SE-

sborrazas and others added 30 commits October 20, 2011 10:28
…ored. It will only insert translations of already inserted locales.
spemmons and others added 30 commits August 24, 2012 16:53
better capture of patterns from app source
capture %(...) and %[...] strings
explicitly use I18n::Backend::Locale since Locale sometimes is not loaded
do not show translations GUI in production
bug fix for matching translations using %[...] and %(...) syntax
bug fix for keys with trailing periods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants