github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jodosha / click-to-globalize

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 29
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (5)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (3)
    • for-2.0
    • for-2.1
    • master ✓
  • Tags (5)
    • v0.5.0
    • v0.4.0
    • v0.3.1
    • v0.3.0
    • list
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Globalization made easy with interface in place translations — Read more

  cancel

http://lucaguidi.com/projects/click-to-globalize

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Prepare for v0.5.0 
jodosha (author)
Sat Apr 11 03:03:32 -0700 2009
commit  695cfd63384a49b518cdacf75295f0bfa0945adb
tree    795d9b0b9233eb815fe074e4ba7d00a240070a3f
parent  a3ca6f0d73d4fb087e1e85876e3dc6951a57f843
click-to-globalize /
name age
history
message
file MIT-LICENSE Thu Apr 09 03:49:37 -0700 2009 Modified README with new instructions. Updated ... [jodosha]
file README.textile Thu Apr 09 04:03:50 -0700 2009 Write, commit, hope, repeat. [jodosha]
file Rakefile Wed Apr 08 11:07:16 -0700 2009 Make Javascript test running properly [jodosha]
file about.yml Sat Apr 11 03:03:32 -0700 2009 Prepare for v0.5.0 [jodosha]
directory app/ Mon Apr 06 07:09:05 -0700 2009 Deprecated globalize? in favor of in_place_tran... [jodosha]
directory assets/ Thu Apr 09 03:18:09 -0700 2009 Strip I18n markers when get translations with AJAX [jodosha]
directory config/ Mon Apr 06 03:37:32 -0700 2009 Added locales controller [jodosha]
file init.rb Mon Apr 06 04:22:13 -0700 2009 Extracted some code into proper helpers [jodosha]
file install.rb Mon Apr 06 07:23:29 -0700 2009 Updated install/unistall tasks [jodosha]
directory lib/ Thu Apr 09 04:22:34 -0700 2009 Ensure to load helpers in main app [jodosha]
directory tasks/ Mon Apr 06 07:27:34 -0700 2009 Hide development related tasks to end users [jodosha]
directory test/ Thu Apr 09 03:18:09 -0700 2009 Strip I18n markers when get translations with AJAX [jodosha]
file uninstall.rb Mon May 12 05:24:18 -0700 2008 Initial import [jodosha]
README.textile

Click to Globalize
======

Click to Globalize is a Rails plugin, it allows to edit in place i18n labels.

If you have a previous i18n experience, you probably noticed that the
main problem of dedicated back-ends is the lack of the context where the
string will be placed in. It isn’t a trivial issue: you’ll never know if the
meaning of your string is harmonious with other labels and how your string will
be rendered, until the page load.

Now you can forget this issues, you can directly translate in place!!

Check for news and tutorials at the project home page.

Getting Started
===

  1. Install Click to Globalize:
    1. script/plugin install git://github.com/jodosha/click-to-globalize.git
    2. rake click:setup
  2. Add at the end of your layout the following code:
    1. <%= click_to_globalize -%>
  3. Put in your view:
    1. <%= t(:'hello_world') %>
  4. Start your server and click to globalize.

Prerequisites
=====

Click to Globalize is framework agnostic, it can talks with all the Rails
plugins who speak the i18n API, but please make sure
to use a persistent backend.
In fact, the default i18n backend shipped with Rails, rely on YAML files, this
means it doesn’t allow runtime translations modifications.

For this purpose, feel free to use my experimental globalize2 fork

Features
====

  1. In place editing for each i18n string.
  2. Easy and painless plug-in/plug-out process.
  3. Unobtrusive Javascripts.
  4. Auto transformation from input text to textarea for long strings.

Advanced Features
=====
You may wish to restrict the access to Click to Globalize features, if you don’t
everyone can edit your pages.
All you need to do is override the in_place_translations? method.

class ApplicationController < ActionController::Base def in_place_translations? current_user.admin? end end

NOTE: The old globalize? method has been deprecated.

Uninstall
=====

script/plugin remove click-to-globalize

Old Rails applications
======

The current version of Click to Globalize targets Rails 2.3.x applications.
If your application uses former version, please check the following branches:

  1. for-2.0
  2. for-2.1

Common Issues
=====

  1. Due to unobtrusive nature of the plugin, each page is parsed by javascript
    to find the right element and bind to it an Ajax.InPlaceEditor.
    Be sure your (X)HTML is wellformed.

NOTE: If you use the Rails scaffold system, Click to Globalize
doesn’t works. Cleanup the code before to use.

How To Contribute
=====

  1. Check out the code and test it:
    1. git clone git://github.com/jodosha/click-to-globalize.git
    2. rake click
  2. Create a ticket to the Sushistar Lighthouse page
  3. Create a patch and add as attachment to the ticket.

Credits
===

Javascript tests are a custom implementation of the old Prototype test libs.

Copyright
=====
2007-2009 Luca Guidi, released under the MIT license

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server