Permalink
Browse files

Prepare locale scoping for inherited_resources integration. Add .ackr…

…c for searching all files in template source dir.
  • Loading branch information...
1 parent 58ffe6d commit 01d76fc37afa713e996376892a5fec70b05f7b96 @maxim maxim committed Sep 7, 2009
View
1 .ackrc
@@ -0,0 +1 @@
+-a
View
@@ -35,6 +35,11 @@ chriseppstein-compass-960-plugin:
:lib: ninesixty
:source: http://gems.github.com
:if: "design == 'compass' && compass_css_framework =~ /960/"
+josevalim-inherited_resources:
+ :options:
+ :lib: inherited_resources
+ :source: http://gems.github.com
+ :version: >= 0.9.0
# development only
cwninja-inaction_mailer:
@@ -22,7 +22,7 @@ def edit
def update
find_user
if @user.update_attributes(params[:user])
- flash[:notice] = t('flash.user_update_success')
+ flash[:notice] = t('flash.accounts.update.notice')
redirect_to account_url
else
render :template => "users/edit"
@@ -8,10 +8,10 @@ def create
@user = User.find_by_email(params[:email])
if @user
@user.deliver_password_reset_instructions!
- flash[:notice] = t('flash.password_instructions_sent')
+ flash[:notice] = t('flash.password_resets.create.notice')
redirect_to root_url
else
- flash[:notice] = t('flash.email_not_found')
+ flash[:error] = t('flash.password_resets.create.error')
render :action => :new
end
end
@@ -23,7 +23,7 @@ def update
@user.password = params[:user][:password]
@user.password_confirmation = params[:user][:password_confirmation]
if @user.save
- flash[:notice] = t('flash.password_update_success')
+ flash[:notice] = t('flash.password_resets.update.notice')
redirect_to account_url
else
render :action => :edit
@@ -34,7 +34,7 @@ def update
def load_user_using_perishable_token
@user = User.find_using_perishable_token(params[:id])
unless @user
- flash[:notice] = t('flash.user_token_not_found')
+ flash[:error] = t('flash.require_user_token')
redirect_to root_url
end
end
@@ -9,7 +9,7 @@ def new
def create
@user_session = UserSession.new(params[:user_session])
if @user_session.save
- flash[:success] = t('flash.login_success')
+ flash[:notice] = t('flash.user_sessions.create.notice')
redirect_back_or_default root_url
else
render :action => :new
@@ -18,7 +18,7 @@ def create
def destroy
current_user_session.destroy
- flash[:success] = t('flash.logout_success')
+ flash[:notice] = t('flash.user_sessions.destroy.notice')
redirect_back_or_default new_user_session_url
end
end
@@ -24,7 +24,7 @@ def edit
def update
find_user
if @user.update_attributes(params[:user])
- flash[:notice] = t('flash.user_update_success')
+ flash[:notice] = t('flash.users.update.notice')
redirect_to account_url
else
render :action => :edit
@@ -34,7 +34,7 @@ def update
def destroy
find_user
@user.destroy
- flash[:notice] = t('flash.user_destroy_success')
+ flash[:notice] = t('flash.users.destroy.notice')
redirect_to(users_url)
end
@@ -7,7 +7,7 @@
<%= link_to t('link.login'), new_user_session_path %>
<% end %>
<% authenticated_only do %>
- <%= link_to t('link.logout'), user_session_path, :method => :delete, :confirm => t('flash.logout_confirmation') %>
+ <%= link_to t('link.logout'), user_session_path, :method => :delete, :confirm => t('confirm.logout') %>
<%= link_to t('link.user'), account_path %>
<% end %>
</div>
@@ -11,7 +11,7 @@
<td><%=h user.login %></td>
<td><%= link_to t('link.show'), user %></td>
<td><%= link_to t('link.edit'), edit_user_path(user) %></td>
- <td><%= link_to t('link.destroy'), user, :confirm => t('flash.destroy_confirmation'), :method => :delete %></td>
+ <td><%= link_to t('link.destroy'), user, :confirm => t('confirm.destroy'), :method => :delete %></td>
</tr>
<% end %>
</table>
@@ -17,27 +17,48 @@ en:
edit: Edit
destroy: Destroy
+ confirm:
+ logout: "Are you sure you want to logout?"
+ destroy: "Are you sure?"
+
flash:
- logout_confirmation: "Are you sure you want to logout?"
- destroy_confirmation: "Are you sure?"
+ accounts:
+ create:
+ notice: "Account registered!"
+ update:
+ notice: "Account successfully updated."
+ users:
+ create:
+ notice: "User successfully created."
+ update:
+ notice: "User successfully updated."
+ destroy:
+ notice: "User successfully deleted."
+
+ activations:
+ create:
+ notice: "Your account has been activated."
+
+ user_sessions:
+ create:
+ notice: "Login successful!"
+ destroy:
+ notice: "Logout successful!"
+
+ password_resets:
+ create:
+ notice: "Instructions to reset your password have been emailed to you. Please check your email."
+ error: "No user was found with that email address."
+ update:
+ notice: "Password successfully updated."
+
require_admin: "Sorry, you don't have access to that."
require_user: "You must be logged in to access this page."
require_no_user: "You must be logged out to access this page."
- user_create_success: "Account registered!"
- user_update_success: "Account successfully updated."
- user_destroy_success: 'User successfully deleted.'
-
- activation_required: "Your account has been created. Please check your e-mail for your account activation instructions."
- activation_success: "Your account has been activated."
-
- password_instructions_sent: "Instructions to reset your password have been emailed to you. Please check your email."
- email_not_found: "No user was found with that email address."
- password_update_success: "Password successfully updated."
- user_token_not_found: "We're sorry, but we could not locate your account. If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process."
- login_success: "Login successful!"
- logout_success: "Logout successful!"
+ require_activation: "Your account has been created. Please check your e-mail for your account activation instructions."
+ require_user_token: "We're sorry, but we could not locate your account. If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process."
# Email subjects
subject:
@@ -17,7 +17,7 @@ def create
if @user.activate!(params)
@user.deliver_welcome_email!
- flash[:notice] = t('flash.activation_success')
+ flash[:notice] = t('flash.activations.create.notice')
redirect_to root_url
else
render :action => :new
@@ -1,7 +1,7 @@
def create
@user = User.new(params[:user])
if @user.save
- flash[:notice] = t('flash.user_create_success')
+ flash[:notice] = t('flash.users.create.notice')
redirect_back_or_default root_url
else
render :template => "users/new"
@@ -2,7 +2,7 @@ def create
@user = User.new(params[:user])
if @user.signup!(params)
@user.deliver_activation_instructions!
- flash[:notice] = t('flash.activation_required')
+ flash[:notice] = t('flash.activations.create.notice')
redirect_back_or_default root_url
else
render :template => "users/new"
@@ -2,7 +2,7 @@ def create
@user = User.new(params[:user])
if @user.signup!(params)
@user.deliver_activation_instructions!
- flash[:notice] = t('flash.activation_required')
+ flash[:notice] = t('flash.require_activation')
redirect_back_or_default root_url
else
render :action => :new

0 comments on commit 01d76fc

Please sign in to comment.