README.md in translation_center-0.0.7 vs README.md in translation_center-0.0.8
- old
+ new
@@ -135,11 +135,11 @@
If your application doesn't use devise for authentication then you have to
provide helper named `current_user` that returns the current user in the session and a before_filter named `authenticate_user!` that redirects a user
to login page if not already signed in.
-You need to add these methods in an initialize, for example `translation_authentication.rb` :
+You also need to add these methods in an initialize, for example `translation_authentication.rb` :
```ruby
module TranslationCenter
class ApplicationController < ActionController::Base
# current_user is needed in views
@@ -155,13 +155,27 @@
end
end
```
-**Note:** Also notice that your user must have an email attribute.
+**Email attribute:**
+Translation Center assumes that the translator model (for example `User`) has an `email` attribute, this attribute is used when showing translations, activity log in dashboard and updating existing translations.
+If your `User` model has no `email` attribute add one or define a method named `email` like the following:
+
+```ruby
+def email
+ "translator_#{self.id}@myapp.com"
+end
+```
+
+
+
+
+
+
##Inspector
Another nice option is the inspector that allows the users to go directly to the key from your application view.
Just set `inspector` option in `translation_center.yml` to `all` if you want to inspect all keys otherwise set it to `missing` to inspect only untranslated keys, and then add this line to your `application.css`
@@ -173,22 +187,10 @@
```ruby
//= require translation_center/inspector
```
-and to your application layout
-
-```ruby
-translation_center_root = "<%= translation_center_path %>
-```
-
-if you are using haml then it should be
-
-```ruby
-translation_center_root = #{translation_center_path}
-```
-
-Now when you reload your page you will see a small icon beside your translated keys.
+Now when you reload your page you will see a small icon beside your keys.
![Alt text](https://raw.github.com/BadrIT/translation_center/master/samples/inspector_shot.png "Inspected keys")
In the previous image, if you click on the icon of 'Betrachten', you will be directed to the key page, where you can add/edit translations directly.