Permalink
Browse files

Changes

  • Loading branch information...
1 parent 08277a5 commit 1520b0f7197be0135bdb7524b31671a179c68b4c @onefriendaday committed Mar 29, 2012
View
@@ -1,4 +1,4 @@
-major: 3
-minor: 1
-patch: 11
+major: 0
+minor: 0
+patch: 1
build:
View
@@ -1,6 +1,7 @@
=Kryptonite. A really simple CMS
-Comming
+Coming
+
==Installation
View
@@ -27,11 +27,11 @@ begin
Jeweler::Tasks.new do |gem|
gem.name = "kryptonite"
gem.summary = "A lightweight Ruby on Rails CMS."
- gem.description = "Kryptonite is an open-source CMS for Ruby on Rails, originally developed by Spoiled Milk."
+ gem.description = "Kryptonite is an open-source CMS for Ruby on Rails, originally developed by Spoiled Milk. Extended by Alexander Feiglstorfer."
gem.files = Dir["Gemfile", "MIT-LICENSE", "Rakefile", "README.rdoc", "PUBLIC_VERSION.yml", "{lib}/**/*", "{app}/**/*", "{config}/**/*"]
- gem.email = "mail@russellquinn.com"
- gem.authors = ["Russell Quinn", "Spoiled Milk"]
- gem.homepage = "http://github.com/spoiledmilk/kryptonite3"
+ gem.email = "delooks@gmail.com"
+ gem.authors = ["Alexander Feiglstorfer", "M2Hero"]
+ gem.homepage = "http://github.com/onefriendaday/Kryptonite"
gem.add_dependency("will_paginate", ["3.0.0"])
gem.add_dependency("authlogic", ["3.0.3"])
end
View
@@ -1,4 +1,4 @@
-major: 3
-minor: 1
-patch: 11
+major: 0
+minor: 0
+patch: 1
build:
@@ -24,7 +24,7 @@ def index
end
def blank
- @kryptonite_page_title = "Welcome"
+ @kryptonite_page_title = t(:home_page_title)
end
private
@@ -17,12 +17,12 @@ def create
end
if users.length > 1
- flash[:notice] = "Multiple accounts were found. Emails have been sent to " + params[:recover_email] + " with instructions on how to reset your passwords"
+ flash[:notice] = t(:multiple_acctounts_notice, :email=>params[:recover_email])
else
- flash[:notice] = "An email has been sent to " + params[:recover_email] + " with instructions on how to reset your password"
+ flash[:notice] = t(:email_sent_notice, :email=>params[:recover_email])
end
else
- flash[:warning] = "There is no user with that email"
+ flash[:warning] = t(:no_user_warning)
end
redirect_to new_kryptonite_user_session_url
@@ -35,14 +35,14 @@ def edit
def update
if params[:kryptonite_user][:password].empty? || params[:kryptonite_user][:password_confirmation].empty?
- flash.now[:warning] = "A field has been left empty"
+ flash.now[:warning] = t(:field_empty_warning)
else
@reset_user.password = params[:kryptonite_user][:password]
@reset_user.password_confirmation = params[:kryptonite_user][:password_confirmation]
if @reset_user.save
- flash[:notice] = "Password successfully updated"
+ flash[:notice] = t(:password_updated_notice)
redirect_to new_kryptonite_user_session_url
return
end
@@ -58,7 +58,7 @@ def load_user_using_perishable_token
@reset_user = Kryptonite::User.find_using_perishable_token params[:token]
unless @reset_user
- flash[:warning] = "Your account could not be located. Try to copy and paste the URL directly from the email."
+ flash[:warning] = t(:account_not_located_warning)
redirect_to new_kryptonite_user_session_url
end
end
@@ -15,7 +15,7 @@ def new
def create
@user_session = Kryptonite::UserSession.new params[:kryptonite_user_session]
if @user_session.save
- flash[:notice] = "Login successful"
+ flash[:notice] = t(:login_successful)
redirect_back_or_default :controller => :kryptonite, :action => :index
else
render :action => :new
@@ -24,7 +24,7 @@ def create
def destroy
current_user_session.destroy
- flash[:notice] = "Logout successful"
+ flash[:notice] = t(:logout_successful)
redirect_back_or_default new_kryptonite_user_session_url
end
@@ -7,12 +7,12 @@ class UsersController < Kryptonite::KryptoniteController
before_filter :needs_admin_or_current_user, :only => [:show, :destroy, :update, :update_password]
def index
- @kryptonite_page_title = "Users"
+ @kryptonite_page_title = t("users.page_title")
@users = Kryptonite::User.paginate :order => "login", :page => params[:page]
end
def new
- @kryptonite_page_title = "Add a new user"
+ @kryptonite_page_title = t("users.add_new")
@kryptonite_user = Kryptonite::User.new
@kryptonite_user.time_zone = Rails.configuration.time_zone
end
@@ -21,27 +21,27 @@ def create
@kryptonite_user = Kryptonite::User.new params[:kryptonite_user]
if @kryptonite_user.save
- flash[:notice] = "An email has been sent to " + @kryptonite_user.name + " with the new account details"
+ flash[:notice] = t("users.email_sent_with_details", :username=>@kryptonite_user.name)
redirect_to kryptonite_users_path
else
- flash.now[:warning] = "There were problems when trying to create a new user"
+ flash.now[:warning] = t("users.problems_saving_warning")
render :action => :new
end
end
def show
@kryptonite_user = Kryptonite::User.find params[:id]
- @kryptonite_page_title = @kryptonite_user.name + " | View User"
+ @kryptonite_page_title = @kryptonite_user.name + " | " + t("users.show")
end
def update
@kryptonite_user = Kryptonite::User.find params[:id]
- @kryptonite_page_title = @kryptonite_user.name + " | Update User"
+ @kryptonite_page_title = @kryptonite_user.name + " | " + t("users.update")
if @kryptonite_user.update_attributes params[:kryptonite_user]
- flash[:notice] = @kryptonite_user.name + " has been updated"
+ flash[:notice] = t("users.updated_notice", :username=>@kryptonite_user.name)
else
- flash.now[:warning] = "There were problems when trying to update this user"
+ flash.now[:warning] = t("users.problems_updating")
render :action => :show
return
end
@@ -55,36 +55,36 @@ def update
def update_password
@kryptonite_user = Kryptonite::User.find params[:id]
- @kryptonite_page_title = @kryptonite_user.name + " | Update Password"
+ @kryptonite_page_title = @kryptonite_user.name + " | " + t("users.update_password")
if @kryptonite_user.valid_password? params[:form_current_password]
if @kryptonite_user.update_attributes params[:kryptonite_user]
- flash.now[:notice] = "Your password has been changed"
+ flash.now[:notice] = t("users.password_changed_notice")
else
- flash.now[:warning] = "There were problems when trying to change the password"
+ flash.now[:warning] = t("users.problems_changing_password")
end
else
- flash.now[:warning] = "The current password is incorrect"
+ flash.now[:warning] = t("users.password_incorrect")
end
render :action => :show
end
def reset_password
@kryptonite_user = Kryptonite::User.find params[:id]
- @kryptonite_page_title = @kryptonite_user.name + " | Reset Password"
+ @kryptonite_page_title = @kryptonite_user.name + " | " + t("users.reset_password")
@kryptonite_user.notify_of_new_password = true unless @kryptonite_user.id == @session_user.id
if @kryptonite_user.update_attributes params[:kryptonite_user]
if @kryptonite_user.id == @session_user.id
- flash.now[:notice] = "Your password has been reset"
+ flash.now[:notice] = t("users.password_reseted")
else
- flash.now[:notice] = "Password has been reset and " + @kryptonite_user.name + " has been notified by email"
+ flash.now[:notice] = t("users.password_reseted_and_emailed", :username=>@kryptonite_user.name)
end
else
- flash.now[:warning] = "There were problems when trying to reset this user's password"
+ flash.now[:warning] = t("users.problems_reseting_password")
end
render :action => :show
end
@@ -93,7 +93,7 @@ def destroy
user = Kryptonite::User.find params[:id]
if user.is_admin? == false || Kryptonite::User.has_more_than_one_admin
user.destroy
- flash[:notice] = user.name + " has been deleted"
+ flash[:notice] = t("users.deleted", :username=>user.name)
end
redirect_to kryptonite_users_path
end
@@ -11,7 +11,7 @@ def generate_new_password from, kryptonite_user, host, pass
@pass = pass
@from_text = kryptonite_config_website_name
- mail(:to => kryptonite_user.email, :from => from, :subject => "[#{kryptonite_config_website_name}] New password")
+ mail(:to => kryptonite_user.email, :from => from, :subject => t("new_password_subject", :website_name=>kryptonite_config_website_name))
end
def new_user_information from, kryptonite_user, host, pass
@@ -21,7 +21,7 @@ def new_user_information from, kryptonite_user, host, pass
@pass = pass
@from_text = kryptonite_config_website_name
- mail(:to => kryptonite_user.email, :from => from, :subject => "[#{kryptonite_config_website_name}] New user account")
+ mail(:to => kryptonite_user.email, :from => from, :subject => t("new_account_subject", :website_name=>kryptonite_config_website_name))
end
def password_reset_instructions from, kryptonite_user, host
@@ -32,7 +32,7 @@ def password_reset_instructions from, kryptonite_user, host
@reset_password_url = edit_kryptonite_password_reset_url + "/?token=#{kryptonite_user.perishable_token}"
@from_text = kryptonite_config_website_name
- mail(:to => kryptonite_user.email, :from => from, :subject => "[#{kryptonite_config_website_name}] Password reset instructions")
+ mail(:to => kryptonite_user.email, :from => from, :subject => t("password_reset_subject", :website_name=>kryptonite_config_website_name))
end
end
@@ -1 +1 @@
-<h2>Welcome to the <%= kryptonite_config_website_name %> administration system</h2>
+<h2><%=t "welcome_title", :website_name=>kryptonite_config_website_name %></h2>
@@ -1,12 +1,12 @@
-Dear <%= @name %>,<br />
+<%=t "greeting", :name=>@name %><br />
<br />
-Your password has been reset by an administrator for your account at:<br />
+<%=t "password_reset_by_admin" %>:<br />
<br />
<%= @host %>/kryptonite<br />
<br />
-Login: <%= @login %><br />
-New password: <%= @pass %><br />
+<%=t "login" %>: <%= @login %><br />
+<%=t "new_password" %>: <%= @pass %><br />
<br />
-From<br />
+<%=t "from" %><br />
<br />
<%= @from_text %>
@@ -1,12 +1,12 @@
-Dear <%= @name %>,<br />
+<%=t "greeting", :name=>@name %><br />
<br />
-A new user account has been created for you at:<br />
+<%=t "new_account_created" %>:<br />
<br />
<%= @host %>/kryptonite<br />
<br />
-Login: <%= @login %><br />
-Password: <%= @pass %><br />
+<%=t "login" %>: <%= @login %><br />
+<%=t "new_password" %>: <%= @pass %><br />
<br />
-From<br />
+<%=t "from" %><br />
<br />
<%= @from_text %>
@@ -1,11 +1,10 @@
-Dear <%= @name %>,<br />
+<%=t "greeting", :name=>@name %><br />
+<br />
+<%=t "reset_instructions", :login=>@login %>
<br />
-A request to reset the password for login '<%= @login %>' has been made.<br />
-If you did not make this request, simply ignore this email.<br />
-Otherwise, click the link below to proceed:<br />
<br />
<%= @reset_password_url %><br />
<br />
-From<br />
+<%=t "from" %><br />
<br />
<%= @from_text %>
@@ -27,21 +27,21 @@
<div class="text">
<p>
- <%= f.label :password, "Password:" %>
+ <%= f.label :password, "#{t(:password)}:" %>
<%= f.password_field :password, :class => "kryptoniteTextField" %>
</p>
</div>
<div class="text">
<p>
- <%= f.label :password_confirmation, "Confirm password:" %>
+ <%= f.label :password_confirmation, "#{t(:confirm_password)}:" %>
<%= f.password_field :password_confirmation, :class => "kryptoniteTextField" %>
</p>
</div>
<div class="submit_remember">
<p>
- <%= f.submit "Reset password", :class => "kryptoniteSubmit" %>
+ <%= f.submit t(:reset_password), :class => "kryptoniteSubmit" %>
</p>
</div>
@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>Welcome to <%= kryptonite_config_website_name %></title>
+ <title><%=t "welcome_title", :website_name=>kryptonite_config_website_name %></title>
<%= stylesheet_link_tag "/kryptonite/stylesheets/login" %>
<%= javascript_include_tag "/kryptonite/javascripts/jquery", "/kryptonite/javascripts/login", "/kryptonite/javascripts/rails" %>
<%= csrf_meta_tag %>
@@ -17,8 +17,7 @@
<%= yield %>
</div>
<div id="footer">
- <p>Based on <%= link_to "Kryptonite", "http://www.kryptonitecms.com" %> <%= kryptonite_get_short_version_string %> technology,
- an open-source project initiated by <a href="http://www.spoiledmilk.dk">Spoiled Milk</a>.</p>
+ <p>Based on <%= link_to "Kryptonite", "http://www.m2hero.com" %> <%= kryptonite_get_short_version_string %> technology.</p>
</div>
</body>
</html>
View
@@ -0,0 +1,42 @@
+en:
+ welcome_title: "Hi, to the KS of %{website_name}"
+ home_page_title: "Home"
+ multiple_acctounts_notice: "Multiple accounts were found. Emails have been sent to %{email} with instructions on how to reset your passwords"
+ email_sent_notice: "An email has been sent to %{email} with instructions on how to reset your password"
+ no_user_warning: "There is no user with that email"
+ field_empty_warning: "A field has been left empty"
+ password_updated_notice: "Password successfully updated"
+ account_not_located_warning: "Your account could not be located. Try to copy and paste the URL directly from the email."
+ login_successful: "Login successful"
+ logout_successful: "Logout successful"
+ users:
+ page_title: "Users"
+ add_new: "Add a new user"
+ email_sent_with_details: "An email has been sent to %{username} with the new account details"
+ problems_saving_warning: "There were problems when trying to create a new user"
+ show: "View User"
+ update: "Update User"
+ updated_notice: "%{username} has been updated"
+ problems_updating: "There were problems when trying to update this user"
+ update_password: "Update Password"
+ password_changed_notice: "Your password has been changed"
+ problems_changing_password: "There were problems when trying to change the password"
+ password_incorrect: "The current password is incorrect"
+ reset_password: "Reset Password"
+ password_reseted: "Your password has been reset"
+ password_reseted_and_emailed: "Password has been reset and %{username} has been notified by email"
+ problems_reseting_password: "There were problems when trying to reset this user's password"
+ deleted: "%{username} has been deleted"
+ new_password_subject: "[%{website_name}] New password"
+ new_account_subject: "[%{website_name}] New user account"
+ password_reset_subject: "[%{website_name}] Password reset instructions"
+ greeting: "Dear %{name},"
+ password_reset_by_admin: "Your password has been reset by an administrator for your account at"
+ login: "Login"
+ new_password: "New password"
+ from: "From"
+ new_account_created: "A new user account has been created for you at"
+ reset_instructions: "A request to reset the password for login '%{login}' has been made.<br />If you did not make this request, simply ignore this email.<br />Otherwise, click the link below to proceed:"
+ password: "Password"
+ confirm_password: "Confirm password"
+ reset_password: "Reset password"
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 1520b0f

Please sign in to comment.