Removed gettext and simplified_localization-plugin. L18n is now the appropriate module.
Upgraded to rails 2.2.2 and replaced complex foodsoft.rb-loader with simple initializers/load_app_config.rb. Multiple foodcoops option is temporarly deactivated.
This commit is contained in:
parent
5b9a7e05df
commit
9f8d0d28ac
121 changed files with 1197 additions and 15237 deletions
|
@ -1,12 +1,7 @@
|
|||
require 'user'
|
||||
|
||||
class ApplicationController < ActionController::Base
|
||||
# Gettext For i18n
|
||||
# locale is chosen through browser http request
|
||||
init_gettext "foodsoft"
|
||||
|
||||
before_filter :select_foodcoop, :authenticate, :store_controller
|
||||
# before_filter :ensureUTF8
|
||||
#before_filter :select_foodcoop
|
||||
before_filter :authenticate, :store_controller
|
||||
after_filter :send_email_messages, :remove_controller
|
||||
|
||||
# sends a mail, when an error occurs
|
||||
|
@ -56,12 +51,12 @@ class ApplicationController < ActionController::Base
|
|||
private
|
||||
|
||||
# selects the foodcoop depending on the subdomain
|
||||
def select_foodcoop
|
||||
# get subdomain and set FoodSoft-class-variable (for later config-requests)
|
||||
FoodSoft.subdomain = request.subdomains.first
|
||||
# set database-connection
|
||||
ActiveRecord::Base.establish_connection(FoodSoft.get_database)
|
||||
end
|
||||
# def select_foodcoop
|
||||
# # get subdomain and set FoodSoft-class-variable (for later config-requests)
|
||||
# FoodSoft.subdomain = request.subdomains.first
|
||||
# # set database-connection
|
||||
# ActiveRecord::Base.establish_connection(FoodSoft.get_database)
|
||||
# end
|
||||
|
||||
# Ensures the HTTP content-type encoding is set to "UTF-8" for "text/html" contents.
|
||||
def ensureUTF8
|
||||
|
|
|
@ -163,7 +163,7 @@ class FinanceController < ApplicationController
|
|||
def createArticleResult
|
||||
render :update do |page|
|
||||
@article = OrderArticleResult.new(params[:order_article_result])
|
||||
@article.fc_markup = FoodSoft::getPriceMarkup
|
||||
@article.fc_markup = APP_CONFIG[:price_markup]
|
||||
@article.make_gross if @article.tax && @article.deposit && @article.net_price
|
||||
if @article.valid?
|
||||
@article.save
|
||||
|
|
|
@ -118,7 +118,7 @@ class MessagesController < ApplicationController
|
|||
@message = Message.new(
|
||||
:recipient => message.sender,
|
||||
:subject => "Re: #{message.subject}",
|
||||
:body => "#{message.sender.nick} schrieb am #{FoodSoft::format_date(message.created_on)} um #{FoodSoft::format_time(message.created_on)}:\n"
|
||||
:body => "#{message.sender.nick} schrieb am #{I18n.l(message.created_on.to_date)} um #{I18n.l(message.created_on, :format => :time)}:\n"
|
||||
)
|
||||
if (message.body)
|
||||
message.body.each_line{|l| @message.body += "> #{l}"}
|
||||
|
|
|
@ -133,13 +133,13 @@ class OrdersController < ApplicationController
|
|||
def text_fax_template
|
||||
order = Order.find(params[:id])
|
||||
supplier = order.supplier
|
||||
contact = FoodSoft.getFoodcoopContact
|
||||
text = _("Order for") + " #{FoodSoft.getFoodcoopName}"
|
||||
contact = APP_CONFIG[:contact].symbolize_keys
|
||||
text = _("Order for") + " #{APP_CONFIG[:name]}"
|
||||
text += "\n" + _("Customer number") + ": #{supplier.customer_number}" unless supplier.customer_number.blank?
|
||||
text += "\n" + _("Delivery date") + ": "
|
||||
text += "\n\n#{supplier.name}\n#{supplier.address}\nFAX: #{supplier.fax}\n\n"
|
||||
text += "****** " + _("Shipping address") + "\n\n"
|
||||
text += "#{FoodSoft.getFoodcoopName}\n#{contact[:street]}\n#{contact[:zip_code]} #{contact[:city]}\n\n"
|
||||
text += "#{APP_CONFIG[:name]}\n#{contact[:street]}\n#{contact[:zip_code]} #{contact[:city]}\n\n"
|
||||
text += "****** " + _("Articles") + "\n\n"
|
||||
text += _("Number") + " " + _("Quantity") + " " + _("Name") + "\n"
|
||||
# now display all ordered articles
|
||||
|
|
|
@ -2,11 +2,15 @@
|
|||
module ApplicationHelper
|
||||
|
||||
def format_time(time = Time.now)
|
||||
FoodSoft::format_date_time(time) unless time.nil?
|
||||
I18n.l time, :format => "%d.%m.%Y %H:%M"
|
||||
end
|
||||
|
||||
def format_date(time = Time.now)
|
||||
FoodSoft::format_date(time) unless time.nil?
|
||||
I18n.l time.to_date
|
||||
end
|
||||
|
||||
def format_datetime(time = Time.now)
|
||||
I18n.l time
|
||||
end
|
||||
|
||||
# Creates ajax-controlled-links for pagination
|
||||
|
|
|
@ -31,22 +31,22 @@ class Article < ActiveRecord::Base
|
|||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def net_price=(net_price)
|
||||
self[:net_price] = FoodSoft::delocalizeDecimalString(net_price)
|
||||
self[:net_price] = String.delocalized_decimal(net_price)
|
||||
end
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def tax=(tax)
|
||||
self[:tax] = FoodSoft::delocalizeDecimalString(tax)
|
||||
self[:tax] = String.delocalized_decimal(tax)
|
||||
end
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def deposit=(deposit)
|
||||
self[:deposit] = FoodSoft::delocalizeDecimalString(deposit)
|
||||
self[:deposit] = String.delocalized_decimal(deposit)
|
||||
end
|
||||
|
||||
# calculate the fc price and sets the attribute
|
||||
def calc_gross_price
|
||||
self.gross_price = ((net_price + deposit) * (tax / 100 + 1)) * (FoodSoft::getPriceMarkup / 100 + 1)
|
||||
self.gross_price = ((net_price + deposit) * (tax / 100 + 1)) * (APP_CONFIG[:price_markup] / 100 + 1)
|
||||
end
|
||||
|
||||
# Returns true if article has been updated at least 2 days ago
|
||||
|
@ -150,7 +150,7 @@ class Article < ActiveRecord::Base
|
|||
end
|
||||
|
||||
# convert units in foodcoop-size
|
||||
# uses FoodSoft.get_units_factors to calc the price/unit_quantity
|
||||
# uses unit factors in app_config.yml to calc the price/unit_quantity
|
||||
# returns new price and unit_quantity in array, when calc is possible => [price, unit_quanity]
|
||||
# returns false if units aren't foodsoft-compatible
|
||||
# returns nil if units are eqal
|
||||
|
@ -166,7 +166,8 @@ class Article < ActiveRecord::Base
|
|||
false
|
||||
end
|
||||
else # get factors for fc and supplier
|
||||
fc_unit_factor, supplier_unit_factor = FoodSoft.get_units_factors[self.unit], FoodSoft.get_units_factors[self.shared_article.unit]
|
||||
fc_unit_factor = APP_CONFIG[:units][self.unit]
|
||||
supplier_unit_factor = APP_CONFIG[:units][self.shared_article.unit]
|
||||
if fc_unit_factor and supplier_unit_factor
|
||||
convertion_factor = fc_unit_factor / supplier_unit_factor
|
||||
new_price = BigDecimal((convertion_factor * shared_article.price).to_s).round(2)
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
class Assignment < ActiveRecord::Base
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :task
|
||||
|
|
|
@ -15,7 +15,7 @@ class FinancialTransaction < ActiveRecord::Base
|
|||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def amount=(amount)
|
||||
self[:amount] = FoodSoft::delocalizeDecimalString(amount)
|
||||
self[:amount] = String.delocalized_decimal(amount)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
# * updated_by (User): the user who last updated this order
|
||||
#
|
||||
class GroupOrder < ActiveRecord::Base
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
belongs_to :order
|
||||
belongs_to :order_group
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
# * updated_on (timestamp): updated automatically by ActiveRecord
|
||||
#
|
||||
class GroupOrderArticle < ActiveRecord::Base
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
belongs_to :group_order
|
||||
belongs_to :order_article
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
# * created_on (timestamp)
|
||||
|
||||
class GroupOrderArticleQuantity < ActiveRecord::Base
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
belongs_to :group_order_article
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class GroupOrderArticleResult < ActiveRecord::Base
|
|||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def quantity=(quantity)
|
||||
self[:quantity] = FoodSoft::delocalizeDecimalString(quantity)
|
||||
self[:quantity] = String.delocalized_decimal(quantity)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
# * group_order_article_results: collection of associated GroupOrderArticleResults
|
||||
#
|
||||
class GroupOrderResult < ActiveRecord::Base
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
belongs_to :order
|
||||
has_many :group_order_article_results, :dependent => :destroy
|
||||
|
|
|
@ -5,37 +5,37 @@ class Mailer < ActionMailer::Base
|
|||
# Assumes user.setResetPasswordToken has been successfully called already.
|
||||
def password(user)
|
||||
request = ApplicationController.current.request
|
||||
subject "[#{FoodSoft::getFoodcoopName}] Neues Passwort für/ New password for " + user.nick
|
||||
subject "[#{APP_CONFIG[:name]}] Neues Passwort für/ New password for " + user.nick
|
||||
recipients user.email
|
||||
from "FoodSoft <#{FoodSoft::getEmailSender}>"
|
||||
from "FoodSoft <#{APP_CONFIG[:email_sender]}>"
|
||||
body :user => user,
|
||||
:link => url_for(:host => FoodSoft::getHost || request.host, :controller => "login", :action => "password", :id => user.id, :token => user.reset_password_token),
|
||||
:foodsoftUrl => url_for(:host => FoodSoft::getHost || request.host, :controller => "index")
|
||||
:link => url_for(:host => request.host, :controller => "login", :action => "password", :id => user.id, :token => user.reset_password_token),
|
||||
:foodsoftUrl => url_for(:host => request.host, :controller => "index")
|
||||
end
|
||||
|
||||
# Sends an email copy of the given internal foodsoft message.
|
||||
def message(message)
|
||||
request = ApplicationController.current.request
|
||||
subject "[#{FoodSoft::getFoodcoopName}] " + message.subject
|
||||
subject "[#{APP_CONFIG[:name]}] " + message.subject
|
||||
recipients message.recipient.email
|
||||
from (message.system_message? ? "FoodSoft <#{FoodSoft::getEmailSender}>" : "#{message.sender.nick} <#{message.sender.email}>")
|
||||
from (message.system_message? ? "FoodSoft <#{APP_CONFIG[:email_sender]}>" : "#{message.sender.nick} <#{message.sender.email}>")
|
||||
body :body => message.body, :sender => (message.system_message? ? 'Foodsoft' : message.sender.nick),
|
||||
:recipients => message.recipients,
|
||||
:reply => url_for(:host => FoodSoft::getHost || request.host, :controller => "messages", :action => "reply", :id => message),
|
||||
:profile => url_for(:host => FoodSoft::getHost || request.host, :controller => "index", :action => "myProfile", :id => message.recipient),
|
||||
:link => url_for(:host => FoodSoft::getHost || request.host, :controller => "messages", :action => "show", :id => message),
|
||||
:foodsoftUrl => url_for(:host => FoodSoft::getHost || request.host, :controller => "index")
|
||||
:reply => url_for(:host => request.host, :controller => "messages", :action => "reply", :id => message),
|
||||
:profile => url_for(:host => request.host, :controller => "index", :action => "myProfile", :id => message.recipient),
|
||||
:link => url_for(:host => request.host, :controller => "messages", :action => "show", :id => message),
|
||||
:foodsoftUrl => url_for(:host => request.host, :controller => "index")
|
||||
end
|
||||
|
||||
# Sends an invite email.
|
||||
def invite(invite)
|
||||
request = ApplicationController.current.request
|
||||
subject "Einladung in die Foodcoop #{FoodSoft::getFoodcoopName} - Invitation to the Foodcoop"
|
||||
subject "Einladung in die Foodcoop #{APP_CONFIG[:name]} - Invitation to the Foodcoop"
|
||||
recipients invite.email
|
||||
from "FoodSoft <#{FoodSoft::getEmailSender}>"
|
||||
from "FoodSoft <#{APP_CONFIG[:email_sender]}>"
|
||||
body :invite => invite,
|
||||
:link => url_for(:host => FoodSoft::getHost || request.host, :controller => "login", :action => "invite", :id => invite.token),
|
||||
:foodsoftUrl => url_for(:host => FoodSoft::getHost || request.host, :controller => "index")
|
||||
:link => url_for(:host => request.host, :controller => "login", :action => "invite", :id => invite.token),
|
||||
:foodsoftUrl => url_for(:host => request.host, :controller => "index")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
class Membership < ActiveRecord::Base
|
||||
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :group
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ class Message < ActiveRecord::Base
|
|||
|
||||
attr_accessible :recipient_id, :recipient, :subject, :body, :recipients
|
||||
|
||||
# needed for method 'from_template'
|
||||
include GetText::Rails
|
||||
|
||||
# Values for the email_state attribute: :none, :pending, :sent, :failed
|
||||
EMAIL_STATE = {
|
||||
|
|
|
@ -26,17 +26,17 @@ class Order < ActiveRecord::Base
|
|||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def invoice_amount=(amount)
|
||||
self[:invoice_amount] = FoodSoft::delocalizeDecimalString(amount)
|
||||
self[:invoice_amount] = String.delocalized_decimal(amount)
|
||||
end
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def deposit=(deposit)
|
||||
self[:deposit] = FoodSoft::delocalizeDecimalString(deposit)
|
||||
self[:deposit] = String.delocalized_decimal(deposit)
|
||||
end
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def deposit_credit=(deposit)
|
||||
self[:deposit_credit] = FoodSoft::delocalizeDecimalString(deposit)
|
||||
self[:deposit_credit] = String.delocalized_decimal(deposit)
|
||||
end
|
||||
|
||||
# Create or destroy OrderArticle associations on create/update
|
||||
|
@ -169,7 +169,7 @@ class Order < ActiveRecord::Base
|
|||
:gross_price => oa.article.gross_price,
|
||||
:tax => oa.article.tax,
|
||||
:deposit => oa.article.deposit,
|
||||
:fc_markup => FoodSoft::getPriceMarkup,
|
||||
:fc_markup => APP_CONFIG[:price_markup],
|
||||
:order_number => oa.article.order_number,
|
||||
:unit_quantity => oa.article.unit_quantity,
|
||||
:units_to_order => oa.units_to_order)
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
#
|
||||
class OrderArticle < ActiveRecord::Base
|
||||
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
belongs_to :order
|
||||
belongs_to :article
|
||||
has_many :group_order_articles, :dependent => :destroy
|
||||
|
|
|
@ -28,22 +28,22 @@ class OrderArticleResult < ActiveRecord::Base
|
|||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def net_price=(net_price)
|
||||
self[:net_price] = FoodSoft::delocalizeDecimalString(net_price)
|
||||
self[:net_price] = String.delocalized_decimal(net_price)
|
||||
end
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def tax=(tax)
|
||||
self[:tax] = FoodSoft::delocalizeDecimalString(tax)
|
||||
self[:tax] = String.delocalized_decimal(tax)
|
||||
end
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def deposit=(deposit)
|
||||
self[:deposit] = FoodSoft::delocalizeDecimalString(deposit)
|
||||
self[:deposit] = String.delocalized_decimal(deposit)
|
||||
end
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def units_to_order=(units_to_order)
|
||||
self[:units_to_order] = FoodSoft::delocalizeDecimalString(units_to_order)
|
||||
self[:units_to_order] = String.delocalized_decimal(units_to_order)
|
||||
end
|
||||
|
||||
# counts from every GroupOrderArticleResult for this ArticleResult
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
class SharedArticle < ActiveRecord::Base
|
||||
|
||||
# gettext-option
|
||||
untranslate_all
|
||||
|
||||
# connect to database from sharedLists-Application
|
||||
SharedArticle.establish_connection(FoodSoft::get_shared_lists_config)
|
||||
SharedArticle.establish_connection(APP_CONFIG[:shared_lists])
|
||||
# set correct table_name in external DB
|
||||
set_table_name :articles
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
class SharedSupplier < ActiveRecord::Base
|
||||
# used for gettext
|
||||
untranslate_all
|
||||
|
||||
# connect to database from sharedLists-Application
|
||||
SharedSupplier.establish_connection(FoodSoft::get_shared_lists_config)
|
||||
SharedSupplier.establish_connection(APP_CONFIG[:shared_lists])
|
||||
# set correct table_name in external DB
|
||||
set_table_name :suppliers
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ require 'digest/sha1'
|
|||
class User < ActiveRecord::Base
|
||||
has_many :memberships, :dependent => :destroy
|
||||
has_many :groups, :through => :memberships
|
||||
has_many :order_groups, :through => :memberships, :source => :group
|
||||
has_many :assignments, :dependent => :destroy
|
||||
has_many :tasks, :through => :assignments
|
||||
|
||||
|
@ -120,7 +121,8 @@ class User < ActiveRecord::Base
|
|||
|
||||
# Returns the user's OrderGroup or nil if none found.
|
||||
def find_ordergroup
|
||||
groups.find(:first, :conditions => "type = 'OrderGroup'")
|
||||
order_groups.first
|
||||
#groups.find(:first, :conditions => "type = 'OrderGroup'")
|
||||
end
|
||||
|
||||
# Find all tasks, for which the current user should be responsible
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
%td=h user.last_name
|
||||
%td=h user.email
|
||||
%td=h roles.join(', ')
|
||||
%td=h FoodSoft::format_date_time(user.last_login)
|
||||
%td=h format_date_time(user.last_login)
|
||||
%td
|
||||
= link_to(image_tag('b_edit.png', :size => "16x16", :border => "0", :alt => 'Benutzer_in bearbeiten', :title => 'Benutzer_in bearbeiten'), :action => 'editUser', :id => user)
|
||||
= link_to(image_tag('b_drop.png', :size => "16x16", :border => "0", :alt => 'Benutzer_in löschen', :title => 'Benutzer_in löschen'), |
|
||||
|
|
|
@ -56,5 +56,5 @@
|
|||
%td{:colspan => "4"}
|
||||
%b
|
||||
%abbr{:title => "= Gruppenbeträge - Rechnung ohne Pfand"} Differenz mit Aufschlag
|
||||
= "(#{number_to_percentage(FoodSoft.getPriceMarkup)}):"
|
||||
= "(#{number_to_percentage(APP_CONFIG[:price_markup])}):"
|
||||
%span#fcProfit= number_to_currency(@order.fcProfit)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#logo
|
||||
%a{:href => "/"}
|
||||
<span>food</span>soft
|
||||
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= FoodSoft::getFoodcoopName
|
||||
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= APP_CONFIG[:name]
|
||||
#nav= render :partial => 'shared/nav'
|
||||
|
||||
#main
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
= yield
|
||||
#meta
|
||||
Foodcoop
|
||||
= link_to_if FoodSoft::getFoodcoopUrl, FoodSoft::getFoodcoopName, FoodSoft::getFoodcoopUrl
|
||||
= link_to_if APP_CONFIG[:base_url], APP_CONFIG[:name], APP_CONFIG[:base_url]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
Hallo <%= user.nick %>!
|
||||
|
||||
Der Kontostand deiner Bestellgruppe <%= group.name %> ist durch eine Buchung am <%= transaction.created_on.strftime('%d.%m.%Y um %H:%M') %> ins Minus gerutscht: <%= FoodSoft::format_currency(group.account_balance) %>
|
||||
Der Kontostand deiner Bestellgruppe <%= group.name %> ist durch eine Buchung am <%= transaction.created_on.strftime('%d.%m.%Y um %H:%M') %> ins Minus gerutscht: <%= group.account_balance %>
|
||||
|
||||
Es wurden <%= FoodSoft::format_currency(transaction.amount) %> für "<%= transaction.note %>" abgebucht, die Buchung wurde von <%= transaction.user.nick %> erstellt.
|
||||
Es wurden <%= transaction.amount %> für "<%= transaction.note %>" abgebucht, die Buchung wurde von <%= transaction.user.nick %> erstellt.
|
||||
|
||||
Bitte zahlt so bald wie möglich wieder Geld ein, um das Gruppenkonto auszugleichen.
|
||||
|
||||
Viele Grüße von <%= FoodSoft::getFoodcoopName %>
|
||||
Viele Grüße von <%= APP_CONFIG[:name] %>
|
|
@ -5,10 +5,10 @@ Die Bestellung "<%= order.name %>" wurde am <%= order.ends.strftime('%d.%m.%Y um
|
|||
Für deine Bestellgruppe <%= group.name %> wurden die folgenden Artikel bestellt:
|
||||
<% for result in results
|
||||
article = result.order_article_result -%>
|
||||
<%= article.name %>: <%= result.quantity %> x <%= article.unit %> = <%= FoodSoft::format_currency(result.quantity * article.gross_price) %>
|
||||
<%= article.name %>: <%= result.quantity %> x <%= article.unit %> = <%= result.quantity * article.gross_price %>
|
||||
<% end -%>
|
||||
Gesamtpreis: <%= FoodSoft::format_currency(total) %>
|
||||
Gesamtpreis: <%= total %>
|
||||
|
||||
Bestellung online einsehen: <%= ApplicationController.current.url_for(:controller => 'ordering', :action => 'my_order_result', :id => order.id) %>
|
||||
|
||||
Viele Grüße von <%= FoodSoft::getFoodcoopName %>
|
||||
Viele Grüße von <%= APP_CONFIG[:name] %>
|
|
@ -125,7 +125,7 @@
|
|||
<%= button_to_function('-', "decreaseTolerance(#{i})") %>
|
||||
<% end -%>
|
||||
</td>
|
||||
<td id="td_price_<%= i %>" style="text-align:right; padding-right:10px; width:4em"><span id="price_<%= i %>_display"><%= number_to_currency(article_total, :unit => "") %></span> <%= FoodSoft::getCurrencyUnit %></td>
|
||||
<td id="td_price_<%= i %>" style="text-align:right; padding-right:10px; width:4em"><span id="price_<%= i %>_display"><%= number_to_currency(article_total, :unit => "") %></span> <%= l18n.number.currency.format.unit %></td>
|
||||
</tr>
|
||||
<% unless order_article.article.note.empty? -%>
|
||||
<tr id="note_<%= i %>" class="note" style="display:none">
|
||||
|
@ -139,7 +139,7 @@
|
|||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6"></td>
|
||||
<td colspan="3" class="currency"><%=_ "Total amount" %>: <span id="total_price"><%= total %></span> <%= FoodSoft::getCurrencyUnit %></td>
|
||||
<td colspan="3" class="currency"><%=_ "Total amount" %>: <span id="total_price"><%= total %></span> <%= l18n.number.currency.format.unit %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6"></td>
|
||||
|
@ -147,7 +147,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="6"></td>
|
||||
<td colspan="3" class="currency"><%=_ "New account balance"%>: <strong><span id="new_balance"><%= @order_group.account_balance - total %></span> <%= FoodSoft::getCurrencyUnit %></strong></td>
|
||||
<td colspan="3" class="currency"><%=_ "New account balance"%>: <strong><span id="new_balance"><%= @order_group.account_balance - total %></span> <%= l18n.number.currency.format.unit %></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;"><%= link_to_top %></td>
|
||||
|
@ -171,7 +171,7 @@
|
|||
setGroupBalance(<%= @availableFunds %>);
|
||||
|
||||
// localization
|
||||
setDecimalSeparator("<%= FoodSoft::getDecimalSeparator %>");
|
||||
setDecimalSeparator("<%= l18n.number.currency.format.separator %>");
|
||||
|
||||
// initialize javascript
|
||||
updateBalance();
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
@ends = @order.ends.strftime('%d.%m.%Y').to_s
|
||||
@title = replace_UTF8(@order.name.to_s) + " | beendet am " + @ends
|
||||
|
||||
pdf.SetAuthor(FoodSoft.getFoodcoopName)
|
||||
pdf.SetAuthor(APP_CONFIG[:name])
|
||||
pdf.SetTitle(replace_UTF8("Artikelsortierung für #{@order.name}, #{format_date(@order.ends)}"))
|
||||
pdf.AliasNbPages()
|
||||
pdf.AddPage()
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
@order_articles = @order.order_article_results
|
||||
|
||||
pdf.SetAuthor(replace_UTF8(FoodSoft.getFoodcoopName))
|
||||
pdf.SetAuthor(replace_UTF8(APP_CONFIG[:name]))
|
||||
pdf.SetTitle(replace_UTF8("BestellFAX für #{@order.supplier.name}"))
|
||||
pdf.AliasNbPages()
|
||||
pdf.AddPage()
|
||||
|
@ -19,15 +19,15 @@
|
|||
#the main informations
|
||||
pdf.SetY(15)
|
||||
pdf.SetFont('Arial','',10)
|
||||
pdf.Cell(0,5,replace_UTF8(FoodSoft.getFoodcoopName),0,0,'R')
|
||||
pdf.Cell(0,5,replace_UTF8(APP_CONFIG[:name]),0,0,'R')
|
||||
pdf.Ln()
|
||||
pdf.Cell(0,5,replace_UTF8(FoodSoft.getFoodcoopContact[:street]),0,0,'R')
|
||||
pdf.Cell(0,5,replace_UTF8(APP_CONFIG[:contact].symbolize_keys[:street]),0,0,'R')
|
||||
pdf.Ln()
|
||||
pdf.Cell(0,5,FoodSoft.getFoodcoopContact[:zip_code] + " " + replace_UTF8(FoodSoft.getFoodcoopContact[:city]),0,0,'R')
|
||||
pdf.Cell(0,5,APP_CONFIG[:contact].symbolize_keys[:zip_code] + " " + replace_UTF8(APP_CONFIG[:contact].symbolize_keys[:city]),0,0,'R')
|
||||
pdf.Ln()
|
||||
pdf.Cell(0,5,replace_UTF8(FoodSoft.getFoodcoopName[:phone]),0,0,'R')
|
||||
pdf.Cell(0,5,replace_UTF8(APP_CONFIG[:name][:phone]),0,0,'R')
|
||||
pdf.Ln()
|
||||
pdf.Cell(0,5,replace_UTF8(FoodSoft.getFoodcoopName[:email]),0,0,'R')
|
||||
pdf.Cell(0,5,replace_UTF8(APP_CONFIG[:name][:email]),0,0,'R')
|
||||
pdf.Ln()
|
||||
pdf.Cell(0,5,Date.today.strftime('%d.%m.%Y').to_s,0,0,'R')
|
||||
pdf.Ln()
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
@ends = @order.ends.strftime('%d.%m.%Y').to_s
|
||||
@title = replace_UTF8(@order.name.to_s) + " | beendet am " + @ends
|
||||
|
||||
pdf.SetAuthor(FoodSoft.getFoodcoopName)
|
||||
pdf.SetAuthor(APP_CONFIG[:name])
|
||||
pdf.SetTitle(replace_UTF8("GruppenSortierung für #{@order.name}, #{format_date(@order.ends)}"))
|
||||
pdf.SetFillColor(235)
|
||||
pdf.AliasNbPages()
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
MAX_ARTICLES_PER_PAGE = 15 #how many articles shoud written on a page
|
||||
|
||||
pdf=PDF.new
|
||||
pdf.SetAuthor(FoodSoft.getFoodcoopName)
|
||||
pdf.SetAuthor(APP_CONFIG[:name])
|
||||
@starts = @order.starts.strftime('%d.%m.%Y').to_s
|
||||
@ends = @order.ends.strftime('%d.%m.%Y').to_s
|
||||
@title = replace_UTF8(@order.name.to_s) + " | beendet am " + @ends
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
%li
|
||||
= image_tag 'b_user.png' , :size => '7x10', :border => 0, :alt => _("User")
|
||||
= link_to h(@current_user.nick), { :controller => 'index', :action => 'myProfile' }, { :title => _("User Settings") }
|
||||
- if FoodSoft::getFoodcoopUrl
|
||||
%li= link_to FoodSoft::getFoodcoopName, FoodSoft::getFoodcoopUrl, { :title => _("Go to your FoodCoop-Hompage") }
|
||||
- if APP_CONFIG[:base_url]
|
||||
%li= link_to APP_CONFIG[:name], APP_CONFIG[:base_url], { :title => _("Go to your FoodCoop-Hompage") }
|
||||
%li= link_to _("Help"), 'http://dev.foodcoops.net/wiki/FoodsoftDoku'
|
||||
%li= link_to _("Logout"), :controller => '/login', :action => 'logout'
|
|
@ -1,4 +1,4 @@
|
|||
--
|
||||
FoodSoft: <%= @foodsoftUrl %>
|
||||
Foodcoop-Homepage: <%= FoodSoft::getFoodcoopUrl %>
|
||||
Hilfe/Help: <%= FoodSoft::getHelp %>
|
||||
Foodcoop-Homepage: <%= APP_CONFIG[:base_url] %>
|
||||
Hilfe/Help: <%= APP_CONFIG[:help_url] %>
|
58
config/app_config.yml.SAMPLE
Normal file
58
config/app_config.yml.SAMPLE
Normal file
|
@ -0,0 +1,58 @@
|
|||
# Foodsoft configuration
|
||||
|
||||
development: &defaults
|
||||
# name of this foodcoop
|
||||
name: FC Test
|
||||
# foodcoop contact information (used for FAX messages)
|
||||
contact:
|
||||
street: Grüne Straße 103
|
||||
zip_code: "10997"
|
||||
city: Berlin
|
||||
country: Deutschland
|
||||
email: foodsoft@myfoodcoop.org
|
||||
phone: "030 323 23249"
|
||||
# base URL for this installation
|
||||
base_url: http://www.fctest.de
|
||||
# foodsoft documentation URL
|
||||
help_url: http://foodsoft.fcschinke09.de/trac/wiki/FoodsoftDoku
|
||||
# price markup in percent
|
||||
price_markup: 2.0
|
||||
# email address to be used as sender
|
||||
email_sender: foodsoft@myfoodcoop.org
|
||||
|
||||
# Config for the exception_notification plugin
|
||||
notification:
|
||||
error_recipients:
|
||||
- benni@dresdener27.de
|
||||
sender_address: FoodSoft Error <foodsoft@foodcoops.net>
|
||||
email_prefix: "[FoodSoft]"
|
||||
# Access to sharedLists, the external article-database
|
||||
shared_lists:
|
||||
adapter: mysql
|
||||
host: localhost
|
||||
database: sharedlists_development
|
||||
username: root
|
||||
password:
|
||||
encoding: utf8
|
||||
socket: /opt/lampp/var/mysql/mysql.sock
|
||||
# auto-units-conversion
|
||||
# this is used for automatic article-synchronization to handle different units
|
||||
# e.g. when foodcoop-unit should be 500g and supplier-unit is 1kg
|
||||
units:
|
||||
KG: 1
|
||||
1kg: 1
|
||||
500g: 0.5
|
||||
400g: 0.4
|
||||
300g: 0.3
|
||||
250g: 0.25
|
||||
200g: 0.2
|
||||
150g: 0.15
|
||||
125g: 0.125
|
||||
100g: 0.1
|
||||
50g: 0.05
|
||||
|
||||
test:
|
||||
<<: *defaults
|
||||
|
||||
production:
|
||||
<<: *defaults
|
|
@ -67,7 +67,7 @@ module Rails
|
|||
|
||||
class << self
|
||||
def rubygems_version
|
||||
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
|
||||
Gem::RubyGemsVersion rescue nil
|
||||
end
|
||||
|
||||
def gem_version
|
||||
|
@ -82,14 +82,14 @@ module Rails
|
|||
|
||||
def load_rubygems
|
||||
require 'rubygems'
|
||||
|
||||
unless rubygems_version >= '0.9.4'
|
||||
$stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
||||
min_version = '1.3.1'
|
||||
unless rubygems_version >= min_version
|
||||
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
|
||||
exit 1
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
$stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
||||
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
|
||||
exit 1
|
||||
end
|
||||
|
||||
|
|
|
@ -5,25 +5,22 @@
|
|||
# ENV['RAILS_ENV'] ||= 'production'
|
||||
|
||||
# Specifies gem version of Rails to use when vendor/rails is not present
|
||||
RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
|
||||
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
|
||||
|
||||
# Bootstrap the Rails environment, frameworks, and default configuration
|
||||
require File.join(File.dirname(__FILE__), 'boot')
|
||||
|
||||
# Need gettext for i18n
|
||||
require 'gettext/rails'
|
||||
|
||||
# Loads the "FoodSoft" module and configuration:
|
||||
require 'foodsoft'
|
||||
|
||||
Rails::Initializer.run do |config|
|
||||
# Settings in config/environments/* take precedence over those specified here
|
||||
# Settings in config/environments/* take precedence over those specified here.
|
||||
# Application configuration should go into files in config/initializers
|
||||
# -- all .rb files in that directory are automatically loaded.
|
||||
# See Rails::Configuration for more options.
|
||||
|
||||
# Skip frameworks you're not going to use (only works if using vendor/rails)
|
||||
# config.frameworks -= [ :action_web_service, :action_mailer ]
|
||||
|
||||
# Only load the plugins named here, by default all plugins in vendor/plugins are loaded
|
||||
# config.plugins = %W( exception_notification ssl_requirement )
|
||||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
||||
|
||||
# Add additional load paths for your own custom dirs
|
||||
# config.load_paths += %W( #{RAILS_ROOT}/extras )
|
||||
|
@ -48,7 +45,7 @@ Rails::Initializer.run do |config|
|
|||
# config.active_record.observers = :cacher, :garbage_collector
|
||||
|
||||
# Make Active Record use UTC-base instead of local time
|
||||
# config.active_record.default_timezone = :utc
|
||||
config.time_zone = 'UTC'
|
||||
|
||||
# Your secret key for verifying cookie session data integrity.
|
||||
# If you change this key, all old sessions will become invalid!
|
||||
|
@ -56,42 +53,31 @@ Rails::Initializer.run do |config|
|
|||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
config.action_controller.session = {
|
||||
:session_key => '_foodsoft_session',
|
||||
:secret => FoodSoft.get_session_secret
|
||||
:secret => "dhjfuez47892nsl39fh83ham3jsdfjkh4879sdh"
|
||||
}
|
||||
|
||||
# Specify gems that this application depends on.
|
||||
# They can then be installed with "rake gems:install" on new installations.
|
||||
# You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
|
||||
# config.gem "bj"
|
||||
# config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
|
||||
# config.gem "sqlite3-ruby", :lib => "sqlite3"
|
||||
# config.gem "aws-s3", :lib => "aws/s3"
|
||||
#
|
||||
# library for parsing/writing files from/to csv-file
|
||||
config.gem "fastercsv"
|
||||
|
||||
# The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
|
||||
# All files from config/locales/*.rb,yml are added automatically.
|
||||
# config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
|
||||
config.i18n.default_locale = :de
|
||||
|
||||
# See Rails::Configuration for more options
|
||||
end
|
||||
|
||||
# Add new inflection rules using the following format
|
||||
# (all these examples are active by default):
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )decimal
|
||||
# end
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
# Mime::Type.register "text/richtext", :rtf
|
||||
# Mime::Type.register "application/x-mobile", :mobile
|
||||
|
||||
# Include your application configuration below
|
||||
|
||||
# library for parsing/writing files from/to csv-file
|
||||
# doc: http://fastercsv.rubyforge.org/
|
||||
require 'faster_csv'
|
||||
|
||||
# Attention: Don't forget to set the locale through LocalizationSimplified plugin!
|
||||
|
||||
# Defines custom logging format.
|
||||
class Logger
|
||||
def format_message(severity, timestamp, progname, msg)
|
||||
format("%s %-5.5s %s\n", timestamp.strftime('%H:%M:%S'), severity, msg)
|
||||
end
|
||||
end
|
||||
|
||||
# Configuration of the exception_notification plugin
|
||||
# Mailadresses are set in config/foodsoft.yaml
|
||||
ExceptionNotifier.exception_recipients = FoodSoft.get_notification_config[:error_recipients]
|
||||
ExceptionNotifier.sender_address = FoodSoft.get_notification_config[:sender_address]
|
||||
ExceptionNotifier.email_prefix = FoodSoft.get_notification_config[:email_prefix]
|
||||
#class Logger
|
||||
# def format_message(severity, timestamp, progname, msg)
|
||||
# format("%s %-5.5s %s\n", timestamp.strftime('%H:%M:%S'), severity, msg)
|
||||
# end
|
||||
#end
|
|
@ -4,6 +4,9 @@
|
|||
# Code is not reloaded between requests
|
||||
config.cache_classes = true
|
||||
|
||||
# Enable threaded mode
|
||||
# config.threadsafe!
|
||||
|
||||
# Use a different logger for distributed setups
|
||||
# config.logger = SyslogLogger.new
|
||||
config.log_level = :warn
|
||||
|
@ -12,6 +15,9 @@ config.log_level = :warn
|
|||
config.action_controller.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Use a different cache store in production
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
# Enable serving of images, stylesheets, and javascripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
|
|
|
@ -27,8 +27,7 @@ test1:
|
|||
email_sender: foodsoft@myfoodcoop.org
|
||||
|
||||
# localized date/time formats
|
||||
date_format: %d.%m.%Y
|
||||
time_format: %H:%M
|
||||
|
||||
|
||||
|
||||
#test2:
|
||||
|
@ -44,5 +43,3 @@ test1:
|
|||
# help_url: http://foodsoft.fcschinke09.de/trac/wiki/FoodsoftDoku
|
||||
# price_markup: 1.0
|
||||
# email_sender: foodsoft@fctest2.org
|
||||
# date_format: %d.%m.%Y
|
||||
# time_format: %H:%M
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
# Foodsoft configuration
|
||||
|
||||
# Config for the exception_notification plugin
|
||||
notification:
|
||||
error_recipients:
|
||||
- foo@bar.tld
|
||||
sender_address: FoodSoft Error <foodsoft@foodcoops.net>
|
||||
email_prefix: "[FoodSoft]"
|
||||
|
||||
# Access to sharedLists, the external article-database
|
||||
shared_lists:
|
||||
adapter: mysql
|
||||
host: localhost
|
||||
database: sharedLists_development
|
||||
username: root
|
||||
password:
|
||||
encoding: utf8
|
||||
socket: /opt/lampp/var/mysql/mysql.sock
|
||||
|
||||
# secret to generate an integrity hash for cookie session data
|
||||
# the string should have at least 30 characters
|
||||
session_secret: dhjfuez47892nsl39fh83ham3jsdfjkh4879sdh
|
||||
|
||||
# auto-units-conversion
|
||||
# this is used for automatic article-synchronization to handle different units
|
||||
# e.g. when foodcoop-unit should be 500g and supplier-unit is 1kg
|
||||
units:
|
||||
KG: 1
|
||||
1kg: 1
|
||||
500g: 0.5
|
||||
400g: 0.4
|
||||
300g: 0.3
|
||||
250g: 0.25
|
||||
200g: 0.2
|
||||
150g: 0.15
|
||||
125g: 0.125
|
||||
100g: 0.1
|
||||
50g: 0.05
|
12
config/initializers/extensions.rb
Normal file
12
config/initializers/extensions.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
# extend the BigDecimal class
|
||||
class String
|
||||
|
||||
# remove comma from decimal inputs
|
||||
def self.delocalized_decimal(string)
|
||||
if !string.blank? and string.is_a?(String)
|
||||
BigDecimal.new(string.sub(',', '.'))
|
||||
else
|
||||
string
|
||||
end
|
||||
end
|
||||
end
|
10
config/initializers/gettext_helper.rb
Normal file
10
config/initializers/gettext_helper.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Remove this file, when every gettext-method <_("text to translate..")>
|
||||
# is replaced by rails l18n method: l18n.name.name...
|
||||
|
||||
module ActionView
|
||||
class Base
|
||||
def _(text)
|
||||
text
|
||||
end
|
||||
end
|
||||
end
|
10
config/initializers/inflections.rb
Normal file
10
config/initializers/inflections.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new inflection rules using the following format
|
||||
# (all these examples are active by default):
|
||||
# ActiveSupport::Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person', 'people'
|
||||
# inflect.uncountable %w( fish sheep )
|
||||
# end
|
9
config/initializers/load_app_config.rb
Normal file
9
config/initializers/load_app_config.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
raw_config = File.read(RAILS_ROOT + "/config/app_config.yml")
|
||||
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
|
||||
|
||||
|
||||
# Configuration of the exception_notification plugin
|
||||
# Mailadresses are set in config/foodsoft.yaml
|
||||
ExceptionNotifier.exception_recipients = APP_CONFIG[:error_recipients]
|
||||
ExceptionNotifier.sender_address = APP_CONFIG[:sender_address]
|
||||
ExceptionNotifier.email_prefix = APP_CONFIG[:email_prefix]
|
5
config/initializers/mime_types.rb
Normal file
5
config/initializers/mime_types.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
# Mime::Type.register "text/richtext", :rtf
|
||||
# Mime::Type.register_alias "text/html", :iphone
|
17
config/initializers/new_rails_defaults.rb
Normal file
17
config/initializers/new_rails_defaults.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# These settings change the behavior of Rails 2 apps and will be defaults
|
||||
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
||||
|
||||
if defined?(ActiveRecord)
|
||||
# Include Active Record class name as root for JSON serialized output.
|
||||
ActiveRecord::Base.include_root_in_json = true
|
||||
|
||||
# Store the full class name (including module namespace) in STI type column.
|
||||
ActiveRecord::Base.store_full_sti_class = true
|
||||
end
|
||||
|
||||
# Use ISO 8601 format for JSON serialized times and dates.
|
||||
ActiveSupport.use_standard_json_time_format = true
|
||||
|
||||
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
||||
# if you're including raw json in an HTML page.
|
||||
ActiveSupport.escape_html_entities_in_json = false
|
125
config/locales/de.yml
Normal file
125
config/locales/de.yml
Normal file
|
@ -0,0 +1,125 @@
|
|||
# German translations for Ruby on Rails
|
||||
# by Clemens Kofler (clemens@railway.at)
|
||||
|
||||
de:
|
||||
date:
|
||||
formats:
|
||||
default: "%d.%m.%Y"
|
||||
short: "%e. %b"
|
||||
long: "%e. %B %Y"
|
||||
only_day: "%e"
|
||||
|
||||
day_names: [Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag]
|
||||
abbr_day_names: [So, Mo, Di, Mi, Do, Fr, Sa]
|
||||
month_names: [~, Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
|
||||
abbr_month_names: [~, Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez]
|
||||
order: [ :day, :month, :year ]
|
||||
|
||||
time:
|
||||
formats:
|
||||
default: "%A, %e. %B %Y, %H:%M Uhr"
|
||||
short: "%e. %B, %H:%M Uhr"
|
||||
long: "%A, %e. %B %Y, %H:%M Uhr"
|
||||
time: "%H:%M"
|
||||
|
||||
am: "vormittags"
|
||||
pm: "nachmittags"
|
||||
|
||||
datetime:
|
||||
distance_in_words:
|
||||
half_a_minute: 'eine halbe Minute'
|
||||
less_than_x_seconds:
|
||||
zero: 'weniger als 1 Sekunde'
|
||||
one: 'weniger als 1 Sekunde'
|
||||
other: 'weniger als {{count}} Sekunden'
|
||||
x_seconds:
|
||||
one: '1 Sekunde'
|
||||
other: '{{count}} Sekunden'
|
||||
less_than_x_minutes:
|
||||
zero: 'weniger als 1 Minute'
|
||||
one: 'weniger als eine Minute'
|
||||
other: 'weniger als {{count}} Minuten'
|
||||
x_minutes:
|
||||
one: '1 Minute'
|
||||
other: '{{count}} Minuten'
|
||||
about_x_hours:
|
||||
one: 'etwa 1 Stunde'
|
||||
other: 'etwa {{count}} Stunden'
|
||||
x_days:
|
||||
one: '1 Tag'
|
||||
other: '{{count}} Tage'
|
||||
about_x_months:
|
||||
one: 'etwa 1 Monat'
|
||||
other: 'etwa {{count}} Monate'
|
||||
x_months:
|
||||
one: '1 Monat'
|
||||
other: '{{count}} Monate'
|
||||
about_x_years:
|
||||
one: 'etwa 1 Jahr'
|
||||
other: 'etwa {{count}} Jahre'
|
||||
over_x_years:
|
||||
one: 'mehr als 1 Jahr'
|
||||
other: 'mehr als {{count}} Jahre'
|
||||
|
||||
number:
|
||||
format:
|
||||
precision: 2
|
||||
separator: ','
|
||||
delimiter: '.'
|
||||
currency:
|
||||
format:
|
||||
unit: '€'
|
||||
format: '%n %u'
|
||||
separator:
|
||||
delimiter:
|
||||
precision:
|
||||
percentage:
|
||||
format:
|
||||
delimiter: ""
|
||||
precision:
|
||||
format:
|
||||
delimiter: ""
|
||||
human:
|
||||
format:
|
||||
delimiter: ""
|
||||
precision: 1
|
||||
|
||||
support:
|
||||
array:
|
||||
sentence_connector: "und"
|
||||
skip_last_comma: true
|
||||
|
||||
activerecord:
|
||||
errors:
|
||||
template:
|
||||
header:
|
||||
one: "Konnte dieses {{model}} Objekt nicht speichern: 1 Fehler."
|
||||
other: "Konnte dieses {{model}} Objekt nicht speichern: {{count}} Fehler."
|
||||
body: "Bitte überprüfen Sie die folgenden Felder:"
|
||||
|
||||
messages:
|
||||
inclusion: "ist kein gültiger Wert"
|
||||
exclusion: "ist nicht verfügbar"
|
||||
invalid: "ist nicht gültig"
|
||||
confirmation: "stimmt nicht mit der Bestätigung überein"
|
||||
accepted: "muss akzeptiert werden"
|
||||
empty: "muss ausgefüllt werden"
|
||||
blank: "muss ausgefüllt werden"
|
||||
too_long: "ist zu lang (nicht mehr als {{count}} Zeichen)"
|
||||
too_short: "ist zu kurz (nicht weniger als {{count}} Zeichen)"
|
||||
wrong_length: "hat die falsche Länge (muss genau {{count}} Zeichen haben)"
|
||||
taken: "ist bereits vergeben"
|
||||
not_a_number: "ist keine Zahl"
|
||||
greater_than: "muss größer als {{count}} sein"
|
||||
greater_than_or_equal_to: "muss größer oder gleich {{count}} sein"
|
||||
equal_to: "muss genau {{count}} sein"
|
||||
less_than: "muss kleiner als {{count}} sein"
|
||||
less_than_or_equal_to: "muss kleiner oder gleich {{count}} sein"
|
||||
odd: "muss ungerade sein"
|
||||
even: "muss gerade sein"
|
||||
models:
|
||||
article: Artikel
|
||||
attributes:
|
||||
article:
|
||||
net_price: Nettopreis
|
||||
gross_price: Bruttopreis
|
5
config/locales/en.yml
Normal file
5
config/locales/en.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Sample localization file for English. Add more files in this directory for other locales.
|
||||
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
||||
|
||||
en:
|
||||
hello: "Hello world"
|
|
@ -1,23 +1,46 @@
|
|||
ActionController::Routing::Routes.draw do |map|
|
||||
|
||||
map.my_profile 'my_profile', :controller => 'index', :action => 'myProfile'
|
||||
|
||||
# The priority is based upon order of creation: first created -> highest priority.
|
||||
|
||||
# Sample of regular route:
|
||||
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
||||
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
||||
# Keep in mind you can assign values other than :controller and :action
|
||||
|
||||
# Sample of named route:
|
||||
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
||||
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
||||
# This route can be invoked with purchase_url(:id => product.id)
|
||||
|
||||
# You can have the root of your site routed by hooking up ''
|
||||
# -- just remember to delete public/index.html.
|
||||
#map.connect '', :controller => 'login'
|
||||
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
||||
# map.resources :products
|
||||
|
||||
# Allow downloading Web Service WSDL as a file with an extension
|
||||
# instead of a file named 'wsdl'
|
||||
map.connect ':controller/service.wsdl', :action => 'wsdl'
|
||||
# Sample resource route with options:
|
||||
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
||||
|
||||
# Sample resource route with sub-resources:
|
||||
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
||||
|
||||
# Sample resource route with more complex sub-resources
|
||||
# map.resources :products do |products|
|
||||
# products.resources :comments
|
||||
# products.resources :sales, :collection => { :recent => :get }
|
||||
# end
|
||||
|
||||
# Sample resource route within a namespace:
|
||||
# map.namespace :admin do |admin|
|
||||
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
||||
# admin.resources :products
|
||||
# end
|
||||
|
||||
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
||||
# map.root :controller => "welcome"
|
||||
|
||||
# See how all your routes lay out with "rake routes"
|
||||
|
||||
# Install the default routes as the lowest priority.
|
||||
# Note: These default routes make all actions in every controller accessible via GET requests. You should
|
||||
# consider removing the them or commenting them out if you're using named routes and resources.
|
||||
|
||||
# Install the default route as the lowest priority.
|
||||
map.connect ':controller/:action/:id', :controller => 'index'
|
||||
|
|
183
lib/foodsoft.rb
183
lib/foodsoft.rb
|
@ -1,183 +0,0 @@
|
|||
require 'yaml'
|
||||
|
||||
# General FoodSoft module for application configuration and global methods.
|
||||
#
|
||||
# This library needs to be loaded in environment.rb through <code>require 'foodsoft'</code>.
|
||||
#
|
||||
module FoodSoft
|
||||
private
|
||||
@@foodcoops = Hash.new
|
||||
@@database = Hash.new
|
||||
@@foodsoft = Hash.new
|
||||
@@subdomain = String.new
|
||||
|
||||
public
|
||||
|
||||
# Loads the configuration file config/foodsoft.yml, ..foodcoops.yml and ..database.yml
|
||||
def self.load_configuration
|
||||
# load foodcoops-config
|
||||
@@foodcoops = YAML::load(File.open("#{RAILS_ROOT}/config/foodcoops.yml"))
|
||||
|
||||
# load database-config
|
||||
@@database = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml"))
|
||||
|
||||
# load foodsoft-config
|
||||
@@foodsoft = YAML::load(File.open("#{RAILS_ROOT}/config/foodsoft.yml")).symbolize_keys
|
||||
|
||||
# validates the parsed data
|
||||
self.validate
|
||||
rescue => e
|
||||
# raise "Failed to load configuration files: #{e.message}"
|
||||
end
|
||||
|
||||
|
||||
def self.subdomain=(subdomain)
|
||||
@@subdomain = subdomain
|
||||
end
|
||||
|
||||
def self.subdomain
|
||||
return @@subdomain
|
||||
end
|
||||
|
||||
def self.format_time(time = Time.now)
|
||||
raise "FoodSoft::time_format has not been set!" unless @@foodcoops[subdomain]["time_format"]
|
||||
time.strftime(@@foodcoops[subdomain]["time_format"]) unless time.nil?
|
||||
end
|
||||
|
||||
def self.format_date(date = Time.now)
|
||||
raise "FoodSoft: date_format has not been set!" unless @@foodcoops[subdomain]["date_format"]
|
||||
date.strftime(@@foodcoops[subdomain]["date_format"]) unless date.nil?
|
||||
end
|
||||
|
||||
def self.format_date_time(time = Time.now)
|
||||
"#{format_date(time)} #{format_time(time)}" unless time.nil?
|
||||
end
|
||||
|
||||
def self.format_currency(decimal)
|
||||
"#{self.getCurrencyUnit} %01.2f" % decimal
|
||||
end
|
||||
|
||||
# Returns the set host, otherwise returns nil
|
||||
def self.getHost
|
||||
return @@foodcoops[subdomain]["host"]
|
||||
end
|
||||
|
||||
def self.getFoodcoopName
|
||||
raise 'foodcoopName has not been set!' unless @@foodcoops[subdomain]["name"]
|
||||
return @@foodcoops[subdomain]["name"]
|
||||
end
|
||||
|
||||
def self.getFoodcoopContact
|
||||
raise "contact has not been set!" unless @@foodcoops[subdomain]["contact"]
|
||||
return @@foodcoops[subdomain]["contact"].symbolize_keys
|
||||
end
|
||||
|
||||
def self.getFoodcoopUrl
|
||||
return @@foodcoops[subdomain]["base_url"]
|
||||
end
|
||||
|
||||
def self.getHelp
|
||||
raise 'foodsoftHelp has not been set!' unless @@foodcoops[subdomain]["help_url"]
|
||||
return @@foodcoops[subdomain]["help_url"]
|
||||
end
|
||||
|
||||
# Returns the email sender used for system emails.
|
||||
def self.getEmailSender
|
||||
raise 'FoodSoft::emailSender has not been set!' unless @@foodcoops[subdomain]["email_sender"]
|
||||
return @@foodcoops[subdomain]["email_sender"]
|
||||
end
|
||||
|
||||
# Returns the price markup.
|
||||
def self.getPriceMarkup
|
||||
raise "FoodSoft::priceMarkup has not been set!" unless @@foodcoops[subdomain]["price_markup"]
|
||||
return @@foodcoops[subdomain]["price_markup"]
|
||||
end
|
||||
|
||||
# Returns the local decimal separator.
|
||||
def self.getDecimalSeparator
|
||||
if (separator = LocalizationSimplified::NumberHelper::CurrencyOptions[:separator])
|
||||
return separator
|
||||
else
|
||||
logger.warn('No locale configured through plugin LocalizationSimplified')
|
||||
return '.'
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the local currency unit.
|
||||
def self.getCurrencyUnit
|
||||
if (unit = LocalizationSimplified::NumberHelper::CurrencyOptions[:unit])
|
||||
return unit
|
||||
else
|
||||
logger.warn('No locale configured through plugin LocalizationSimplified')
|
||||
return '$'
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the delocalized version of the string, i.e. with the decimal separator local character properly replaced.
|
||||
# For example, for the locale "de-DE", the comma character "," will be replaced with the standard separator ".".
|
||||
def self.delocalizeDecimalString(string)
|
||||
if (string && string.is_a?(String) && !string.empty?)
|
||||
separator = getDecimalSeparator
|
||||
if (separator != '.' && string.index(separator))
|
||||
string = string.sub(separator, '.')
|
||||
end
|
||||
end
|
||||
return string
|
||||
end
|
||||
|
||||
# Return the specific database
|
||||
def self.get_database
|
||||
raise 'databse for foodcoop has not been set' unless @@database[subdomain]
|
||||
return @@database[subdomain]
|
||||
end
|
||||
|
||||
# Foodsoft-Config begins
|
||||
|
||||
# Returns an array with mail-adresses for the exception_notification plugin
|
||||
def self.get_notification_config
|
||||
raise 'FoodSoft::errorRecipients has not been set!' unless @@foodsoft[:notification]
|
||||
return @@foodsoft[:notification].symbolize_keys
|
||||
end
|
||||
|
||||
# returns shared_lists database connection
|
||||
def self.get_shared_lists_config
|
||||
raise "sharedLists database config has not been set" unless @@foodsoft[:shared_lists]
|
||||
return @@foodsoft[:shared_lists]
|
||||
end
|
||||
|
||||
# returns a string for an integrity hash for cookie session data
|
||||
def self.get_session_secret
|
||||
raise "session secret string has not been set" unless @@foodsoft[:session_secret]
|
||||
return @@foodsoft[:session_secret]
|
||||
end
|
||||
|
||||
# returns units-hash for automatic units-conversion
|
||||
# this hash looks like {"KG" => 1, "500g" => 0.5, ...}
|
||||
def self.get_units_factors
|
||||
raise "units has not been set" unless @@foodsoft[:units]
|
||||
@@foodsoft[:units]
|
||||
end
|
||||
|
||||
# validates the yaml-parsed-config-file
|
||||
def self.validate
|
||||
raise "Price markup is not a proper float. please use at least one decimal place" unless @@foodcoops.each {|fc| fc["price_markup"].is_a?(Float)}
|
||||
raise "Error recipients aren't set correctly. use hyphen for each recipient" unless @@foodsoft[:error_recipients].is_a?(Array)
|
||||
end
|
||||
end
|
||||
|
||||
# Automatically load configuration file:
|
||||
FoodSoft::load_configuration
|
||||
|
||||
# Makes "number_to_percentage" locale aware.
|
||||
module ActionView
|
||||
module Helpers
|
||||
module NumberHelper
|
||||
alias_method :foodsoft_old_number_to_percentage, :number_to_percentage
|
||||
|
||||
# Returns the number in the localized percentage format.
|
||||
def number_to_percentage(number, options = {})
|
||||
foodsoft_old_number_to_percentage(number, :precision => 1, :separator => FoodSoft::getDecimalSeparator)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Binary file not shown.
1978
po/de/foodsoft.po
1978
po/de/foodsoft.po
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1911
po/foodsoft.pot
1911
po/foodsoft.pot
File diff suppressed because it is too large
Load diff
20
public/javascripts/controls.js
vendored
20
public/javascripts/controls.js
vendored
|
@ -1,6 +1,6 @@
|
|||
// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
||||
// (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
|
||||
// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
|
||||
// (c) 2005-2008 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
|
||||
// (c) 2005-2008 Jon Tirsen (http://www.tirsen.com)
|
||||
// Contributors:
|
||||
// Richard Livsey
|
||||
// Rahul Bhargava
|
||||
|
@ -37,10 +37,10 @@
|
|||
if(typeof Effect == 'undefined')
|
||||
throw("controls.js requires including script.aculo.us' effects.js library");
|
||||
|
||||
var Autocompleter = { }
|
||||
var Autocompleter = { };
|
||||
Autocompleter.Base = Class.create({
|
||||
baseInitialize: function(element, update, options) {
|
||||
element = $(element)
|
||||
element = $(element);
|
||||
this.element = element;
|
||||
this.update = $(update);
|
||||
this.hasFocus = false;
|
||||
|
@ -209,13 +209,13 @@ Autocompleter.Base = Class.create({
|
|||
},
|
||||
|
||||
markPrevious: function() {
|
||||
if(this.index > 0) this.index--
|
||||
if(this.index > 0) this.index--;
|
||||
else this.index = this.entryCount-1;
|
||||
this.getEntry(this.index).scrollIntoView(true);
|
||||
},
|
||||
|
||||
markNext: function() {
|
||||
if(this.index < this.entryCount-1) this.index++
|
||||
if(this.index < this.entryCount-1) this.index++;
|
||||
else this.index = 0;
|
||||
this.getEntry(this.index).scrollIntoView(false);
|
||||
},
|
||||
|
@ -457,7 +457,7 @@ Autocompleter.Local = Class.create(Autocompleter.Base, {
|
|||
}
|
||||
}
|
||||
if (partial.length)
|
||||
ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
|
||||
ret = ret.concat(partial.slice(0, instance.options.choices - ret.length));
|
||||
return "<ul>" + ret.join('') + "</ul>";
|
||||
}
|
||||
}, options || { });
|
||||
|
@ -474,7 +474,7 @@ Field.scrollFreeActivate = function(field) {
|
|||
setTimeout(function() {
|
||||
Field.activate(field);
|
||||
}, 1);
|
||||
}
|
||||
};
|
||||
|
||||
Ajax.InPlaceEditor = Class.create({
|
||||
initialize: function(element, url, options) {
|
||||
|
@ -604,7 +604,7 @@ Ajax.InPlaceEditor = Class.create({
|
|||
this.triggerCallback('onEnterHover');
|
||||
},
|
||||
getText: function() {
|
||||
return this.element.innerHTML;
|
||||
return this.element.innerHTML.unescapeHTML();
|
||||
},
|
||||
handleAJAXFailure: function(transport) {
|
||||
this.triggerCallback('onFailure', transport);
|
||||
|
@ -780,7 +780,7 @@ Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, {
|
|||
onSuccess: function(transport) {
|
||||
var js = transport.responseText.strip();
|
||||
if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check
|
||||
throw 'Server returned an invalid collection representation.';
|
||||
throw('Server returned an invalid collection representation.');
|
||||
this._collection = eval(js);
|
||||
this.checkForExternalText();
|
||||
}.bind(this),
|
||||
|
|
41
public/javascripts/dragdrop.js
vendored
41
public/javascripts/dragdrop.js
vendored
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
||||
// (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
|
||||
// (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
|
||||
//
|
||||
// script.aculo.us is freely distributable under the terms of an MIT-style license.
|
||||
// For details, see the script.aculo.us web site: http://script.aculo.us/
|
||||
|
@ -121,7 +121,7 @@ var Droppables = {
|
|||
if(this.last_active)
|
||||
this.deactivate(this.last_active);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var Draggables = {
|
||||
drags: [],
|
||||
|
@ -218,7 +218,7 @@ var Draggables = {
|
|||
).length;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
|
@ -331,8 +331,8 @@ var Draggable = Class.create({
|
|||
|
||||
if(this.options.ghosting) {
|
||||
this._clone = this.element.cloneNode(true);
|
||||
this.element._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
|
||||
if (!this.element._originallyAbsolute)
|
||||
this._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
|
||||
if (!this._originallyAbsolute)
|
||||
Position.absolutize(this.element);
|
||||
this.element.parentNode.insertBefore(this._clone, this.element);
|
||||
}
|
||||
|
@ -403,9 +403,9 @@ var Draggable = Class.create({
|
|||
}
|
||||
|
||||
if(this.options.ghosting) {
|
||||
if (!this.element._originallyAbsolute)
|
||||
if (!this._originallyAbsolute)
|
||||
Position.relativize(this.element);
|
||||
delete this.element._originallyAbsolute;
|
||||
delete this._originallyAbsolute;
|
||||
Element.remove(this._clone);
|
||||
this._clone = null;
|
||||
}
|
||||
|
@ -478,10 +478,10 @@ var Draggable = Class.create({
|
|||
} else {
|
||||
if(Object.isArray(this.options.snap)) {
|
||||
p = p.map( function(v, i) {
|
||||
return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this))
|
||||
return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this));
|
||||
} else {
|
||||
p = p.map( function(v) {
|
||||
return (v/this.options.snap).round()*this.options.snap }.bind(this))
|
||||
return (v/this.options.snap).round()*this.options.snap }.bind(this));
|
||||
}
|
||||
}}
|
||||
|
||||
|
@ -560,7 +560,7 @@ var Draggable = Class.create({
|
|||
H = documentElement.clientHeight;
|
||||
} else {
|
||||
W = body.offsetWidth;
|
||||
H = body.offsetHeight
|
||||
H = body.offsetHeight;
|
||||
}
|
||||
}
|
||||
return { top: T, left: L, width: W, height: H };
|
||||
|
@ -608,7 +608,8 @@ var Sortable = {
|
|||
},
|
||||
|
||||
destroy: function(element){
|
||||
var s = Sortable.options(element);
|
||||
element = $(element);
|
||||
var s = Sortable.sortables[element.id];
|
||||
|
||||
if(s) {
|
||||
Draggables.removeObserver(s.element);
|
||||
|
@ -689,14 +690,14 @@ var Sortable = {
|
|||
tree: options.tree,
|
||||
hoverclass: options.hoverclass,
|
||||
onHover: Sortable.onHover
|
||||
}
|
||||
};
|
||||
|
||||
var options_for_tree = {
|
||||
onHover: Sortable.onEmptyHover,
|
||||
overlap: options.overlap,
|
||||
containment: options.containment,
|
||||
hoverclass: options.hoverclass
|
||||
}
|
||||
};
|
||||
|
||||
// fix for gecko engine
|
||||
Element.cleanWhitespace(element);
|
||||
|
@ -851,11 +852,11 @@ var Sortable = {
|
|||
children: [],
|
||||
position: parent.children.length,
|
||||
container: $(children[i]).down(options.treeTag)
|
||||
}
|
||||
};
|
||||
|
||||
/* Get the element containing the children and recurse over it */
|
||||
if (child.container)
|
||||
this._tree(child.container, options, child)
|
||||
this._tree(child.container, options, child);
|
||||
|
||||
parent.children.push (child);
|
||||
}
|
||||
|
@ -880,7 +881,7 @@ var Sortable = {
|
|||
children: [],
|
||||
container: element,
|
||||
position: 0
|
||||
}
|
||||
};
|
||||
|
||||
return Sortable._tree(element, options, root);
|
||||
},
|
||||
|
@ -940,14 +941,14 @@ var Sortable = {
|
|||
}).join('&');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Returns true if child is contained within element
|
||||
Element.isParent = function(child, element) {
|
||||
if (!child.parentNode || child == element) return false;
|
||||
if (child.parentNode == element) return true;
|
||||
return Element.isParent(child.parentNode, element);
|
||||
}
|
||||
};
|
||||
|
||||
Element.findChildren = function(element, only, recursive, tagName) {
|
||||
if(!element.hasChildNodes()) return null;
|
||||
|
@ -965,8 +966,8 @@ Element.findChildren = function(element, only, recursive, tagName) {
|
|||
});
|
||||
|
||||
return (elements.length>0 ? elements.flatten() : []);
|
||||
}
|
||||
};
|
||||
|
||||
Element.offsetSize = function (element, type) {
|
||||
return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
|
||||
}
|
||||
};
|
98
public/javascripts/effects.js
vendored
98
public/javascripts/effects.js
vendored
|
@ -70,25 +70,20 @@ var Effect = {
|
|||
Transitions: {
|
||||
linear: Prototype.K,
|
||||
sinoidal: function(pos) {
|
||||
return (-Math.cos(pos*Math.PI)/2) + 0.5;
|
||||
return (-Math.cos(pos*Math.PI)/2) + .5;
|
||||
},
|
||||
reverse: function(pos) {
|
||||
return 1-pos;
|
||||
},
|
||||
flicker: function(pos) {
|
||||
var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
|
||||
var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4;
|
||||
return pos > 1 ? 1 : pos;
|
||||
},
|
||||
wobble: function(pos) {
|
||||
return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
|
||||
return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5;
|
||||
},
|
||||
pulse: function(pos, pulses) {
|
||||
pulses = pulses || 5;
|
||||
return (
|
||||
((pos % (1/pulses)) * pulses).round() == 0 ?
|
||||
((pos * pulses * 2) - (pos * pulses * 2).floor()) :
|
||||
1 - ((pos * pulses * 2) - (pos * pulses * 2).floor())
|
||||
);
|
||||
return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5;
|
||||
},
|
||||
spring: function(pos) {
|
||||
return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));
|
||||
|
@ -249,18 +244,30 @@ Effect.Base = Class.create({
|
|||
this.totalTime = this.finishOn-this.startOn;
|
||||
this.totalFrames = this.options.fps*this.options.duration;
|
||||
|
||||
eval('this.render = function(pos){ '+
|
||||
'if (this.state=="idle"){this.state="running";'+
|
||||
codeForEvent(this.options,'beforeSetup')+
|
||||
(this.setup ? 'this.setup();':'')+
|
||||
codeForEvent(this.options,'afterSetup')+
|
||||
'};if (this.state=="running"){'+
|
||||
'pos=this.options.transition(pos)*'+this.fromToDelta+'+'+this.options.from+';'+
|
||||
'this.position=pos;'+
|
||||
codeForEvent(this.options,'beforeUpdate')+
|
||||
(this.update ? 'this.update(pos);':'')+
|
||||
codeForEvent(this.options,'afterUpdate')+
|
||||
'}}');
|
||||
this.render = (function() {
|
||||
function dispatch(effect, eventName) {
|
||||
if (effect.options[eventName + 'Internal'])
|
||||
effect.options[eventName + 'Internal'](effect);
|
||||
if (effect.options[eventName])
|
||||
effect.options[eventName](effect);
|
||||
}
|
||||
|
||||
return function(pos) {
|
||||
if (this.state === "idle") {
|
||||
this.state = "running";
|
||||
dispatch(this, 'beforeSetup');
|
||||
if (this.setup) this.setup();
|
||||
dispatch(this, 'afterSetup');
|
||||
}
|
||||
if (this.state === "running") {
|
||||
pos = (this.options.transition(pos) * this.fromToDelta) + this.options.from;
|
||||
this.position = pos;
|
||||
dispatch(this, 'beforeUpdate');
|
||||
if (this.update) this.update(pos);
|
||||
dispatch(this, 'afterUpdate');
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
this.event('beforeStart');
|
||||
if (!this.options.sync)
|
||||
|
@ -507,17 +514,16 @@ Effect.Highlight = Class.create(Effect.Base, {
|
|||
|
||||
Effect.ScrollTo = function(element) {
|
||||
var options = arguments[1] || { },
|
||||
scrollOffsets = document.viewport.getScrollOffsets(),
|
||||
elementOffsets = $(element).cumulativeOffset(),
|
||||
max = (window.height || document.body.scrollHeight) - document.viewport.getHeight();
|
||||
scrollOffsets = document.viewport.getScrollOffsets(),
|
||||
elementOffsets = $(element).cumulativeOffset();
|
||||
|
||||
if (options.offset) elementOffsets[1] += options.offset;
|
||||
|
||||
return new Effect.Tween(null,
|
||||
scrollOffsets.top,
|
||||
elementOffsets[1] > max ? max : elementOffsets[1],
|
||||
elementOffsets[1],
|
||||
options,
|
||||
function(p){ scrollTo(scrollOffsets.left, p.round()) }
|
||||
function(p){ scrollTo(scrollOffsets.left, p.round()); }
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -568,7 +574,7 @@ Effect.Puff = function(element) {
|
|||
new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
|
||||
Object.extend({ duration: 1.0,
|
||||
beforeSetupInternal: function(effect) {
|
||||
Position.absolutize(effect.effects[0].element)
|
||||
Position.absolutize(effect.effects[0].element);
|
||||
},
|
||||
afterFinishInternal: function(effect) {
|
||||
effect.effects[0].element.hide().setStyle(oldStyle); }
|
||||
|
@ -625,7 +631,7 @@ Effect.SwitchOff = function(element) {
|
|||
afterFinishInternal: function(effect) {
|
||||
effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}, arguments[1] || { }));
|
||||
};
|
||||
|
@ -674,7 +680,7 @@ Effect.Shake = function(element) {
|
|||
new Effect.Move(effect.element,
|
||||
{ x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) {
|
||||
effect.element.undoPositioned().setStyle(oldStyle);
|
||||
}}) }}) }}) }}) }}) }});
|
||||
}}); }}); }}); }}); }}); }});
|
||||
};
|
||||
|
||||
Effect.SlideDown = function(element) {
|
||||
|
@ -816,7 +822,7 @@ Effect.Grow = function(element) {
|
|||
effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
|
||||
}
|
||||
}, options)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -877,11 +883,13 @@ Effect.Shrink = function(element) {
|
|||
|
||||
Effect.Pulsate = function(element) {
|
||||
element = $(element);
|
||||
var options = arguments[1] || { };
|
||||
var oldOpacity = element.getInlineOpacity();
|
||||
var transition = options.transition || Effect.Transitions.sinoidal;
|
||||
var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
|
||||
reverser.bind(transition);
|
||||
var options = arguments[1] || { },
|
||||
oldOpacity = element.getInlineOpacity(),
|
||||
transition = options.transition || Effect.Transitions.linear,
|
||||
reverser = function(pos){
|
||||
return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5);
|
||||
};
|
||||
|
||||
return new Effect.Opacity(element,
|
||||
Object.extend(Object.extend({ duration: 2.0, from: 0,
|
||||
afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
|
||||
|
@ -934,7 +942,7 @@ Effect.Morph = Class.create(Effect.Base, {
|
|||
effect.transforms.each(function(transform) {
|
||||
effect.element.style[transform.style] = '';
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
this.start(options);
|
||||
|
@ -945,7 +953,7 @@ Effect.Morph = Class.create(Effect.Base, {
|
|||
if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
|
||||
color = color.parseColor();
|
||||
return $R(0,2).map(function(i){
|
||||
return parseInt( color.slice(i*2+1,i*2+3), 16 )
|
||||
return parseInt( color.slice(i*2+1,i*2+3), 16 );
|
||||
});
|
||||
}
|
||||
this.transforms = this.style.map(function(pair){
|
||||
|
@ -978,7 +986,7 @@ Effect.Morph = Class.create(Effect.Base, {
|
|||
transform.unit != 'color' &&
|
||||
(isNaN(transform.originalValue) || isNaN(transform.targetValue))
|
||||
)
|
||||
)
|
||||
);
|
||||
});
|
||||
},
|
||||
update: function(position) {
|
||||
|
@ -1074,14 +1082,14 @@ if (document.defaultView && document.defaultView.getComputedStyle) {
|
|||
Element.getStyles = function(element) {
|
||||
element = $(element);
|
||||
var css = element.currentStyle, styles;
|
||||
styles = Element.CSS_PROPERTIES.inject({ }, function(hash, property) {
|
||||
hash.set(property, css[property]);
|
||||
return hash;
|
||||
styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) {
|
||||
results[property] = css[property];
|
||||
return results;
|
||||
});
|
||||
if (!styles.opacity) styles.set('opacity', element.getOpacity());
|
||||
if (!styles.opacity) styles.opacity = element.getOpacity();
|
||||
return styles;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Effect.Methods = {
|
||||
morph: function(element, style) {
|
||||
|
@ -1090,7 +1098,7 @@ Effect.Methods = {
|
|||
return element;
|
||||
},
|
||||
visualEffect: function(element, effect, options) {
|
||||
element = $(element)
|
||||
element = $(element);
|
||||
var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1);
|
||||
new Effect[klass](element, options);
|
||||
return element;
|
||||
|
@ -1109,7 +1117,7 @@ $w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+
|
|||
element = $(element);
|
||||
Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options);
|
||||
return element;
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
|
629
public/javascripts/prototype.js
vendored
629
public/javascripts/prototype.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -1 +1,4 @@
|
|||
require "action_mailer"
|
||||
require "exception_notifier"
|
||||
require "exception_notifiable"
|
||||
require "exception_notifier_helper"
|
||||
|
|
|
@ -33,25 +33,25 @@ class ExceptionNotifier < ActionMailer::Base
|
|||
@@sections = %w(request session environment backtrace)
|
||||
cattr_accessor :sections
|
||||
|
||||
def self.reloadable?; false; end
|
||||
self.template_root = "#{File.dirname(__FILE__)}/../views"
|
||||
|
||||
def self.reloadable?() false end
|
||||
|
||||
def exception_notification(exception, controller, request, data={})
|
||||
content_type "text/plain"
|
||||
|
||||
subject "#{email_prefix}#{controller.controller_name}##{controller.action_name} (#{exception.class}) #{exception.message.inspect}"
|
||||
|
||||
recipients exception_recipients
|
||||
from sender_address
|
||||
|
||||
body data.merge({ :controller => controller, :request => request,
|
||||
:exception => exception, :host => request.env["HTTP_HOST"],
|
||||
:exception => exception, :host => (request.env["HTTP_X_FORWARDED_HOST"] || request.env["HTTP_HOST"]),
|
||||
:backtrace => sanitize_backtrace(exception.backtrace),
|
||||
:rails_root => rails_root, :data => data,
|
||||
:sections => sections })
|
||||
end
|
||||
|
||||
def template_root
|
||||
"#{File.dirname(__FILE__)}/../views"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def sanitize_backtrace(trace)
|
||||
|
@ -60,8 +60,7 @@ class ExceptionNotifier < ActionMailer::Base
|
|||
end
|
||||
|
||||
def rails_root
|
||||
return @rails_root if @rails_root
|
||||
@rails_root = Pathname.new(RAILS_ROOT).cleanpath.to_s
|
||||
@rails_root ||= Pathname.new(RAILS_ROOT).cleanpath.to_s
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -67,11 +67,12 @@ module ExceptionNotifierHelper
|
|||
end
|
||||
|
||||
def filter_sensitive_post_data_parameters(parameters)
|
||||
exclude_raw_post_parameters? ? @controller.filter_parameters(parameters) : parameters
|
||||
exclude_raw_post_parameters? ? @controller.__send__(:filter_parameters, parameters) : parameters
|
||||
end
|
||||
|
||||
def filter_sensitive_post_data_from_env(env_key, env_value)
|
||||
return env_value unless exclude_raw_post_parameters?
|
||||
(env_key =~ /RAW_POST_DATA/i) ? PARAM_FILTER_REPLACEMENT : env_value
|
||||
return PARAM_FILTER_REPLACEMENT if (env_key =~ /RAW_POST_DATA/i)
|
||||
return @controller.__send__(:filter_parameters, {env_key => env_value}).values[0]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% max = @request.env.keys.max { |a,b| a.length <=> b.length } -%>
|
||||
<% @request.env.keys.sort.each do |key| -%>
|
||||
* <%= "%*-s: %s" % [max.length, key, filter_sensitive_post_data_from_env(key, @request.env[key].to_s.strip)] %>
|
||||
* <%= "%-*s: %s" % [max.length, key, filter_sensitive_post_data_from_env(key, @request.env[key].to_s.strip)] %>
|
||||
<% end -%>
|
||||
|
||||
* Process: <%= $$ %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
* URL: <%= @request.protocol %><%= @host %><%= @request.request_uri %>
|
||||
* URL : <%= @request.protocol %><%= @host %><%= @request.request_uri %>
|
||||
* IP address: <%= @request.env["HTTP_X_FORWARDED_FOR"] || @request.env["REMOTE_ADDR"] %>
|
||||
* Parameters: <%= filter_sensitive_post_data_parameters(@request.parameters).inspect %>
|
||||
* Rails root: <%= @rails_root %>
|
||||
|
|
20
vendor/plugins/l10n-simplified-0.8/MIT-LICENSE
vendored
20
vendor/plugins/l10n-simplified-0.8/MIT-LICENSE
vendored
|
@ -1,20 +0,0 @@
|
|||
Copyright (c) 2006 Jesper Rønn-Jensen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
158
vendor/plugins/l10n-simplified-0.8/README
vendored
158
vendor/plugins/l10n-simplified-0.8/README
vendored
|
@ -1,158 +0,0 @@
|
|||
= Localization Simplified (aka LocalizationSimplified or L10n-simplified)
|
||||
|
||||
Localization Simplified plugin for Ruby on Rails. Really simple localization. Written by Jesper Rønn-Jensen ( http://justaddwater.dk/ )
|
||||
|
||||
The goal is to have a dead simple plugin for one-language (non-english) Rails
|
||||
applications. Many of the existing localization / internationalization plugins are
|
||||
too big for this and hard to get started with. Just dump this plugin in
|
||||
/vendor/plugins/, set your language and off you go.
|
||||
|
||||
Unlike the more advanced plugins, you don't have to translate anything in your
|
||||
view files. Just use the standard Rails commands you're used to.
|
||||
|
||||
The simple approach also makes limits. Make sure you understand them to decide if
|
||||
this plugin is right for you.
|
||||
|
||||
I use this plugin when creating new projects. Then later in the development
|
||||
process I can decide to change to a more advanced localization plugin (if necessary)
|
||||
|
||||
=== What it does
|
||||
This plugin modifies the following most used helpers for Rails
|
||||
* Sets UTF-8 connection to database (known to work with MySQL and PostgreSQL)
|
||||
* Localized monthnames on date_select etc. (changing the order of Y-M-D, on date_select and datetime_select from 0.7)
|
||||
* Localized ActiveRecord errors (and error headings)
|
||||
* Localized distance_of_time_in_words
|
||||
* Localized to_currency (from 0.7 also changing the order of unit/currency)
|
||||
* Simple pluralization also available in the lang-file
|
||||
* Uses standard Rails methods. In this way, there is no tedious rewrite required
|
||||
to localize your view files
|
||||
|
||||
|
||||
=== Limitations
|
||||
* More advanced features are not likely to be available here.
|
||||
* If you want support for multiple languages, use another L10N/I18n plugin, like
|
||||
GLoc or Globalize
|
||||
It could be a good idea to take a look at the [comparison chart](http://wiki.rubyonrails.org/rails/pages/InternationalizationComparison) on the Ruby on Rails wiki
|
||||
|
||||
=== Version notes
|
||||
* For Rails 1.1.x or below, use version 0.7.1 of this plugin
|
||||
* For Rails 1.2 or above, use version 0.8 (or higher) of this plugin
|
||||
|
||||
=== Supported languages
|
||||
Curr ently supported languages:
|
||||
* English (for running test cases and comparing to normal texts)
|
||||
* German
|
||||
* Spanish
|
||||
* Spanish (argentinian)
|
||||
* French
|
||||
* Dutch
|
||||
* Italian
|
||||
* Danish
|
||||
* Swedish
|
||||
* Finnish
|
||||
* Canadian French
|
||||
* Korean
|
||||
* Swedish Chef, and Pirate talk (just for the fun of it)
|
||||
* any other language you want. Just dump your translation in the /lib folder
|
||||
|
||||
=== Download code
|
||||
* Project homepage: http://rubyforge.org/projects/l10n-simplified/
|
||||
* Subversion access: svn checkout svn://rubyforge.org/var/svn/l10n-simplified
|
||||
* Browse: http://rubyforge.org/plugins/scmsvn/viewcvs.php/?root=l10n-simplified
|
||||
|
||||
|
||||
|
||||
=== Usage:
|
||||
in init.rb, set your language. That's it. Now your db connection is running UTF-8 and standard Rails output is localized.
|
||||
|
||||
If your view files contains text containing non-English characters (such as ß,ö,ñ or å), you probably also want to save your files as UTF-8.
|
||||
|
||||
|
||||
=== Installation:
|
||||
|
||||
1. Just copy this plugin into your /vendor/plugins/ folder
|
||||
2. Choose your lang-file in init.rb (default is Danish because I am Danish)
|
||||
3. no step three :)
|
||||
|
||||
|
||||
A special note of WARNING: All files here are saved using UTF-8 encoding.
|
||||
It's not required for working, I guess, but other encodings could bring you in trouble.
|
||||
|
||||
=== Your help
|
||||
Feel free to use, translate, modify and improve this code.
|
||||
Do send me translations, improvements, etc. I cannot promise to use it,
|
||||
but chances are that I will unless it bloats the code here completely or makes
|
||||
code harder to maintain.
|
||||
|
||||
I added FIXME notes in the code to indicate where I also could use help.
|
||||
|
||||
=== TODO / wishlist
|
||||
* A Rails application for testing L10n-simplified. This is top of my wish-list.
|
||||
I'd like it to contain a test suite testing ActiveRecord errors, datehelper, necessary
|
||||
numberhelper etc.
|
||||
* Rake task to create a release
|
||||
* Better tests to verify both hooks in Rails and this plugin
|
||||
* Better tests to verify each lang-file
|
||||
* Create rdoc in UTF-8 format and not including every lang-file (only lang_en.rb)
|
||||
* Rake task that modifies all view-files and converts them to UTF-8
|
||||
* Also a task that modifies all generators to use UTF-8
|
||||
|
||||
=== DONE
|
||||
* --- release 0.8 ---
|
||||
* Works with Rails 1.2 (not working with earlier versions)
|
||||
* Whitespace/formatting modifications. Removed commented code not needed
|
||||
* Removed code from plugin because Rails 1.2 date_select and datetime_select
|
||||
now support :order
|
||||
* ActiveRecord hooks updated for Rails 1.2 (thanks Casper Fabricius)
|
||||
* Dots after day number in time formats (Danish), to keep it consistent with Date formats
|
||||
* --- release 0.7.1 ---
|
||||
* Fixed RJS bug where javascript content-header was overwritten with text/html (thanks Jakob Skjerning)
|
||||
* Small language corrections by Wijnand Wiersma
|
||||
* PostGres friendly: Added quotes around ActiveRecord::Base.connection.execute "SET NAMES 'UTF8'" (thanks Wijnand Wiersma)
|
||||
* German language errors corrected by Matthias Tarasiewicz
|
||||
* Added "no step three" in installation section :)
|
||||
* --- release 0.7 ---
|
||||
* Fixed messed-up ø's and a few wording changes in README
|
||||
* Override +number_to_currency+ and +datetime_select+ to support :order
|
||||
even though I prefer these changes to go into Rails Core (2006-10-10)
|
||||
* Added italian lang file (thanks Michele Franzin) (2006-10-08)
|
||||
* Added argentinian flavoured Spanish lang File + corrected bug in lang_es (thanks Damian Janowski) (2006-10-03)
|
||||
* German translation issues (thanks Christian W. Zuckschwerdt) (2006-10-03)
|
||||
* Fixed typo in README File (thanks Diego Algorta Casamayou) (2006-10-02)
|
||||
* Bugfix removed incorrect 'then' after 'else' (thanks Michele Franzin)(2006-09-16)
|
||||
* Added augmented and corrected distance_of_time_in_words from Rails trunk (2006-09-07)
|
||||
* Added date_select and datetime_select on the helper page (2006-09-07)
|
||||
* Updated dutch date-time formats, thanks Jeroen Houben (2006-09-07)
|
||||
* --- release 0.6.1 ---
|
||||
* Added comments in all lang-files, thanks Jarkko Laine for the idea (2006-09-07)
|
||||
* Bugfix: Replaced hardcoded string in distance_of_time_in_words when :include_seconds was false (2006-08-30)
|
||||
* Added Canadian French translation (thanks Daniel) (2006-08-25)
|
||||
* Added comments in lang-file for documentation of how to localize (2006-08-25)
|
||||
* Added French translation (thanks Fred Cavazza) (2006-08-25)
|
||||
* Added Finnish translation (thanks Jarkko Laine) (2006-08-25)
|
||||
* Bugfix re-added HTTP header for UTF-8. Necessary for some lang-files (2004-08-24)
|
||||
* --- release 0.6 ---
|
||||
* Renamed test files to make rake test command work (2006-08-23)
|
||||
* Localized time "Wed Aug 23 12:38:22 Romance Daylight Time 2006" =>
|
||||
"onsdag d. 23 august 2006 12:38:22" (Danish)
|
||||
* Reordering of date_select fields (2006-08-23)
|
||||
* Test that plugin works with the Rails version it is installed next to (2006-08-20)
|
||||
* Added Dutch translation lang_nl.rb, thanks to Jeroen Houben (2006-08-20)
|
||||
* Added Pirate language lang_pirate.rb, thanks to Tobias Michaelsen (2006-08-18)
|
||||
* Added Date and Time#to_formatted_s with locale specific strings (2006-08-18)
|
||||
* Added MIT-license, copied from Ruby on Rails (2006-08-13)
|
||||
* Added tests for plugin (2006-08-13)
|
||||
* Localized version of Array.to_sentence (2006-08-09)
|
||||
* Added test scaffold (2006-08-09)
|
||||
* Added swedish language, thanks to Olle Jonsson (2006-08-09)
|
||||
* Localized version of to_currency helper (2006-08-07)
|
||||
|
||||
|
||||
=== Credits
|
||||
This plugin uses a few bits and pieces from other Rails plugins GLoc (http://rubyforge.org/projects/gloc/) and swe_rails (http://opensource.ki.se/swe_rails.html)
|
||||
|
||||
|
||||
Created 2006-07-28 by
|
||||
Jesper Rønn-Jensen http://justaddwater.dk/
|
||||
http://rubyforge.org/projects/l10n-simplified/
|
||||
http://agilewebdevelopment.com/plugins/localization_simplified
|
22
vendor/plugins/l10n-simplified-0.8/Rakefile
vendored
22
vendor/plugins/l10n-simplified-0.8/Rakefile
vendored
|
@ -1,22 +0,0 @@
|
|||
require 'rake'
|
||||
require 'rake/testtask'
|
||||
require 'rake/rdoctask'
|
||||
|
||||
desc 'Default: run unit tests.'
|
||||
task :default => :test
|
||||
|
||||
desc 'Test the l10n_simplified plugin.'
|
||||
Rake::TestTask.new(:test) do |t|
|
||||
t.libs << 'lib'
|
||||
t.pattern = 'test/**/*_test.rb'
|
||||
t.verbose = true
|
||||
end
|
||||
|
||||
desc 'Generate documentation for the l10n_simplified plugin.'
|
||||
Rake::RDocTask.new(:rdoc) do |rdoc|
|
||||
rdoc.rdoc_dir = 'rdoc'
|
||||
rdoc.title = 'LocalizationSimplified'
|
||||
rdoc.options << '--line-numbers' << '--inline-source'
|
||||
rdoc.rdoc_files.include('README')
|
||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
end
|
|
@ -1,24 +0,0 @@
|
|||
cd ..
|
||||
svn export l10n-simplified export\l10n-simplified-0.8
|
||||
(right-click to create zip file)
|
||||
FIXME make a rake task and
|
||||
|
||||
cd export
|
||||
tar -czf l10n-simplified-0.8.tar.gz l10n-simplified-0.8
|
||||
|
||||
|
||||
|
||||
|
||||
# ==========
|
||||
# other commands that I use with this plugin
|
||||
# ==========
|
||||
|
||||
|
||||
FIXME Create rdoc in UTF-8 format and not including every lang-file (only lang_en.rb)
|
||||
FIXME describe upload of rdoc to l10n-simplified website
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
20
vendor/plugins/l10n-simplified-0.8/init.rb
vendored
20
vendor/plugins/l10n-simplified-0.8/init.rb
vendored
|
@ -1,20 +0,0 @@
|
|||
# Choose language file here
|
||||
# ONLY choose one of the ones below:
|
||||
#require 'lang_en' #default language to run the test cases
|
||||
#require 'lang_da'
|
||||
require 'lang_de'
|
||||
#require 'lang_es'
|
||||
#require 'lang_fi'
|
||||
#require 'lang_fr'
|
||||
#require 'lang_nl'
|
||||
#require 'lang_ko'
|
||||
#require 'lang_se'
|
||||
#require 'lang_chef'
|
||||
#require 'lang_pirate'
|
||||
# You can Add your own localization file and add it here
|
||||
|
||||
|
||||
|
||||
# Also include hook code here
|
||||
require 'localization_simplified'
|
||||
|
118
vendor/plugins/l10n-simplified-0.8/lib/lang_cf.rb
vendored
118
vendor/plugins/l10n-simplified-0.8/lib/lang_cf.rb
vendored
|
@ -1,118 +0,0 @@
|
|||
# lang_cf.rb
|
||||
# french canadian translation file
|
||||
# Translation by Daniel Lepage ( http://www.solulabs.com/ )
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "cf",
|
||||
:updated => "2006-09-07"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "n'est pas inclus dans la liste",
|
||||
:exclusion => "est réservé",
|
||||
:invalid => "est non valide",
|
||||
:confirmation => "ne correspond pas à la confirmation",
|
||||
:accepted => "doit être accepté",
|
||||
:empty => "ne peut pas être vide",
|
||||
:blank => "ne peut pas être laissé à blanc",
|
||||
:too_long => "dépasse la longueur permise (le maximum étant de %d caractères)",
|
||||
:too_short => "est trop court (le minimum étant de %d caractères)",
|
||||
:wrong_length => "n'est pas de la bonne longueur (doit être de %d caractères)",
|
||||
:taken => "as déjà été pris",
|
||||
:not_a_number => "n'est pas un nombre",
|
||||
#Jespers additions:
|
||||
:error_translation => "erreur",
|
||||
:error_header => "%s interdit d'enregistrer %s ",
|
||||
:error_subheader => "Il y a des erreurs dans les champs suivants : "
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "moins de %d secondes",
|
||||
:half_a_minute => "30 secondes",
|
||||
:less_than_a_minute => "moins d'une minute",
|
||||
:one_minute => "1 minute",
|
||||
:x_minutes => "%d minutes",
|
||||
:one_hour => "environ 1 heure",
|
||||
:x_hours => "environ %d heures",
|
||||
:one_day => "1 jour",
|
||||
:x_days => "%d jours",
|
||||
:one_month => "1 mois",
|
||||
:x_months => "%d mois",
|
||||
:one_year => "1 an",
|
||||
:x_years => "%d ans"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre}
|
||||
AbbrMonthnames = [nil] + %w{Jan Fev Mar Avr Mai Jun Jui Aou Sep Oct Nov Dec}
|
||||
Daynames = %w{Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi}
|
||||
AbbrDaynames = %w{Dim Lun Mar Mer Jeu Ven Sam}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%B %d, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:year, :month, :day] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "$",
|
||||
:separator => ".", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'et',
|
||||
:skip_last_comma => false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
# end
|
119
vendor/plugins/l10n-simplified-0.8/lib/lang_chef.rb
vendored
119
vendor/plugins/l10n-simplified-0.8/lib/lang_chef.rb
vendored
|
@ -1,119 +0,0 @@
|
|||
# lang_chef.rb
|
||||
# Swedish Chef language file for Ruby on Rails
|
||||
# Translation by Jesper Rønn-Jensen ( http://justaddwater.dk/ ), via web based translator
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "chef",
|
||||
:updated => "2006-09-07"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "is nut inclooded in zee leest",
|
||||
:exclusion => "is reserfed",
|
||||
:invalid => "is infeleed",
|
||||
:confirmation => "duesn't metch cunffurmeshun",
|
||||
:accepted => "moost be-a eccepted",
|
||||
:empty => "cun't be-a impty",
|
||||
:blank => "ees reeequired",# alternate, formulation: "is required"
|
||||
:too_long => "is tuu lung (mexeemoom is %d cherecters)",
|
||||
:too_short => "is tuu shurt (meenimoom is %d cherecters)",
|
||||
:wrong_length => "is zee vrung lengt (shuoold be-a %d cherecters)",
|
||||
:taken => "hes elreedy beee tekee",
|
||||
:not_a_number => "is nut a noomber",
|
||||
#Jespers additions:
|
||||
:error_translation => "irrur",
|
||||
:error_header => "%s pruheebited thees %s frum beeeng sefed. Børk! Børk! Børk!",
|
||||
:error_subheader => "Zeere-a vere-a prublems veet zee fullooeeng feeelds:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "less thun %d secunds",
|
||||
:half_a_minute => "helff a meenoote-a",
|
||||
:less_than_a_minute => "less thun a meenoote-a",
|
||||
:one_minute => "one-a meenoote-a",
|
||||
:x_minutes => "%d meenootes",
|
||||
:one_hour => "ebuoot one-a huoor",
|
||||
:x_hours => "ebuoot %d huoors",
|
||||
:one_day => "one-a dey",
|
||||
:x_days => "%d deys",
|
||||
:one_month => "one-a munt",
|
||||
:x_months => "%d munts",
|
||||
:one_year => "one-a yeer",
|
||||
:x_years => "%d yeers"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{Junooery Febrooery Merch Epreel Mey Joone-a Jooly Oogoost Seeptembooor Ooctuber Nufember Deezember}
|
||||
AbbrMonthnames = [nil] + %w{Jun Feb Mer Epr Mey Joon Jool Oog Sep Ooct Nuf Deez}
|
||||
Daynames = %w{Soondey Mundey Tooesdey Vednesdey Thoorsdey Freedey Setoordey}
|
||||
AbbrDaynames = %w{Soon Mun Tooe-a Ved Thoo Free Set}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%B %d, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:year, :month, :day] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "$",
|
||||
:separator => ".", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'eend',
|
||||
:skip_last_comma => false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
# end
|
117
vendor/plugins/l10n-simplified-0.8/lib/lang_da.rb
vendored
117
vendor/plugins/l10n-simplified-0.8/lib/lang_da.rb
vendored
|
@ -1,117 +0,0 @@
|
|||
# lang_da.rb
|
||||
# Danish translation file
|
||||
# Translation by Jesper Rønn-Jensen ( http://justaddwater.dk/ )
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "da",
|
||||
:updated => "2006-09-07"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "er ikke med på listen",
|
||||
:exclusion => "er et reserveret ord",
|
||||
:invalid => "er ugyldig",
|
||||
:confirmation => "matcher ikke med bekræftelsen",
|
||||
:accepted => "skal accepteres",
|
||||
:empty => "kan ikke være tom",
|
||||
:blank => "skal udfyldes",
|
||||
:too_long => "er for langt (max er %d tegn)",
|
||||
:too_short => "er for kort (minimum er %d tegn)",
|
||||
:wrong_length => "har forkert længde (skal være %d tegn)",
|
||||
:taken => "er allerede taget",
|
||||
:not_a_number => "er ikke et tal",
|
||||
#Jespers additions:
|
||||
:error_translation => "fejl",
|
||||
:error_header => "%s forhindrede %s i at blive gemt",
|
||||
:error_subheader => "Problemer med følgende felter:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "under %d sekunder",
|
||||
:half_a_minute => "et halvt minut",
|
||||
:less_than_a_minute => "under et minut",
|
||||
:one_minute => "1 minut",
|
||||
:x_minutes => "%d minutter",
|
||||
:one_hour => "omkring en time",
|
||||
:x_hours => "omkring %d timer",
|
||||
:one_day => "1 dag",
|
||||
:x_days => "%d dage",
|
||||
:one_month => "1 måned",
|
||||
:x_months => "%d måneder",
|
||||
:one_year => "1 år",
|
||||
:x_years => "%d år"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{januar februar marts april maj juni juli august september oktober november december}
|
||||
AbbrMonthnames = [nil] + %w{jan feb mar apr maj jun jul aug sep okt nov dec}
|
||||
Daynames = %w{søndag mandag tirsdag onsdag torsdag fredag lørdag}
|
||||
AbbrDaynames = %w{søn man tir ons tors fre lør}
|
||||
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%e. %b",
|
||||
:long => "%e. %B, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%A d. %d %B %Y %H:%M", #no timezone
|
||||
:short => "%d. %b %H:%M",
|
||||
:long => "%d. %B %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "kr.",
|
||||
:separator => ",", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:number, :unit] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'og',
|
||||
:skip_last_comma => true
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
Inflector.inflections do |inflect|
|
||||
inflect.uncountable %w( fejl )
|
||||
end
|
117
vendor/plugins/l10n-simplified-0.8/lib/lang_de.rb
vendored
117
vendor/plugins/l10n-simplified-0.8/lib/lang_de.rb
vendored
|
@ -1,117 +0,0 @@
|
|||
# lang_de.rb
|
||||
# German translation file
|
||||
# Translation by Benedikt Huber
|
||||
# Additions by Matthias Tarasiewicz - parasew (at) gmail
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "de",
|
||||
:updated => "2006-09-28"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "ist nicht in der Liste gültiger Optionen enthalten",
|
||||
:exclusion => "ist reserviert",
|
||||
:invalid => "ist ungültig",
|
||||
:confirmation => "entspricht nicht der Bestätigung",
|
||||
:accepted => "muss akzeptiert werden",
|
||||
:empty => "darf nicht leer sein",
|
||||
:blank => "wird benötigt",# alternate, formulation: "is required"
|
||||
:too_long => "ist zu lang (höchstens %d Zeichen)",
|
||||
:too_short => "ist zu kurz (mindestens %d Zeichen)",
|
||||
:wrong_length => "hat eine falsche Länge (sollte %d Zeichen sein)",
|
||||
:taken => "ist schon vergeben",
|
||||
:not_a_number => "ist keine Zahl",
|
||||
#Bennis additions
|
||||
:greater_than => "muss größer sein als %d",
|
||||
#Jespers additions:
|
||||
:error_translation => "Fehler",
|
||||
:error_header => "%s hinderte %s daran, gespeichert zu werden",
|
||||
:error_subheader => "Es gab folgende Probleme: "
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "weniger als %d Sekunden",
|
||||
:half_a_minute => "eine halbe Minute",
|
||||
:less_than_a_minute => "weniger als eine Minute",
|
||||
:one_minute => "1 Minute",
|
||||
:x_minutes => "%d Minuten",
|
||||
:one_hour => "ungefähr 1 Stunde",
|
||||
:x_hours => "ungefähr %d Stunden",
|
||||
:one_day => "1 Tag",
|
||||
:x_days => "%d Tage",
|
||||
:one_month => "1 Monat",
|
||||
:x_months => "%d Monate",
|
||||
:one_year => "1 Jahr",
|
||||
:x_years => "%d Jahre"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{Januar Februar März April Mai Juni Juli August September Oktober November Dezember}
|
||||
AbbrMonthnames = [nil] + %w{Jan Feb Mrz Apr Mai Jun Jul Aug Sep Okt Nov Dez}
|
||||
Daynames = %w{Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag}
|
||||
AbbrDaynames = %w{So Mo Di Mi Do Fr Sa}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%A, %d %B %Y %H:%M:%S %Z",
|
||||
:short => "%d %b. %H:%M",
|
||||
:long => "%d %B %Y, %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "€",
|
||||
:separator => ",", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:number, :unit] #order is at present unsupported in Rails
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'und',
|
||||
:skip_last_comma => true
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
Inflector.inflections do |inflect|
|
||||
inflect.uncountable %w( Fehler )
|
||||
end
|
119
vendor/plugins/l10n-simplified-0.8/lib/lang_en.rb
vendored
119
vendor/plugins/l10n-simplified-0.8/lib/lang_en.rb
vendored
|
@ -1,119 +0,0 @@
|
|||
# lang_en.rb
|
||||
# English baseline translation file. Comes in handy for testing purposes
|
||||
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "en",
|
||||
:updated => "2006-09-01"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "is not included in the list",
|
||||
:exclusion => "is reserved",
|
||||
:invalid => "is invalid",
|
||||
:confirmation => "doesn't match confirmation",
|
||||
:accepted => "must be accepted",
|
||||
:empty => "can't be empty",
|
||||
:blank => "can't be blank",# alternate, formulation: "is required"
|
||||
:too_long => "is too long (maximum is %d characters)",
|
||||
:too_short => "is too short (minimum is %d characters)",
|
||||
:wrong_length => "is the wrong length (should be %d characters)",
|
||||
:taken => "has already been taken",
|
||||
:not_a_number => "is not a number",
|
||||
#Jespers additions:
|
||||
:error_translation => "error",
|
||||
:error_header => "%s prohibited this %s from being saved",
|
||||
:error_subheader => "There were problems with the following fields:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "less than %d seconds",
|
||||
:half_a_minute => "half a minute",
|
||||
:less_than_a_minute => "less than a minute",
|
||||
:one_minute => "1 minute",
|
||||
:x_minutes => "%d minutes",
|
||||
:one_hour => "about 1 hour",
|
||||
:x_hours => "about %d hours",
|
||||
:one_day => "1 day",
|
||||
:x_days => "%d days",
|
||||
:one_month => "1 month",
|
||||
:x_months => "%d months",
|
||||
:one_year => "1 year",
|
||||
:x_years => "%d years"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{January February March April May June July August September October November December}
|
||||
AbbrMonthnames = [nil] + %w{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}
|
||||
Daynames = %w{Sunday Monday Tuesday Wednesday Thursday Friday Saturday}
|
||||
AbbrDaynames = %w{Sun Mon Tue Wed Thu Fri Sat}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%B %d, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:year, :month, :day] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "$",
|
||||
:separator => ".", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'and',
|
||||
:skip_last_comma => false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
# end
|
115
vendor/plugins/l10n-simplified-0.8/lib/lang_es.rb
vendored
115
vendor/plugins/l10n-simplified-0.8/lib/lang_es.rb
vendored
|
@ -1,115 +0,0 @@
|
|||
# lang_es.rb
|
||||
# Spanish translation file.
|
||||
# Translation by Luis Villa del Campo (www.grancomo.com)
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "es",
|
||||
:updated => "2006-10-03"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "no está incluido en la lista",
|
||||
:exclusion => "está reservado",
|
||||
:invalid => "no es válido",
|
||||
:confirmation => "no coincide con la conformación",
|
||||
:accepted => "debe ser aceptado",
|
||||
:empty => "no puede estar vacío",
|
||||
:blank => "no puede estar en blanco",# alternate, formulation: "is required"
|
||||
:too_long => "es demasiado largo (el máximo es %d caracteres)",
|
||||
:too_short => "es demasiado corto (el mínimo es %d caracteres)",
|
||||
:wrong_length => "no posee el largo correcto (debería ser de %d caracteres)",
|
||||
:taken => "ya está ocupado",
|
||||
:not_a_number => "no es un número",
|
||||
#Jespers additions:
|
||||
:error_translation => "error",
|
||||
:error_header => "%s no permite guardar %s",
|
||||
:error_subheader => "Ha habido problemas con los siguientes campos:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "menos de %d segundos",
|
||||
:half_a_minute => "medio minuto",
|
||||
:less_than_a_minute => "menos de un minuto",
|
||||
:one_minute => "1 minuto",
|
||||
:x_minutes => "%d minutos",
|
||||
:one_hour => "sobre una hora",
|
||||
:x_hours => "sobre %d horas",
|
||||
:one_day => "un día",
|
||||
:x_days => "%d días",
|
||||
:one_month => "1 mes",
|
||||
:x_months => "%d meses",
|
||||
:one_year => "1 año",
|
||||
:x_years => "%d años"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre}
|
||||
AbbrMonthnames = [nil] + %w{ene feb mar abr may jun jul ago sep oct nov dic}
|
||||
Daynames = %w{domingo lunes martes miércoles jueves viernes sábado}
|
||||
AbbrDaynames = %w{dom lun mar mié jue vie sáb}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%B %d, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "€",
|
||||
:separator => ",", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'y',
|
||||
:skip_last_comma => true
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
Inflector.inflections do |inflect|
|
||||
inflect.plural /^(error)$/i, '\1es'
|
||||
end
|
120
vendor/plugins/l10n-simplified-0.8/lib/lang_es_ar.rb
vendored
120
vendor/plugins/l10n-simplified-0.8/lib/lang_es_ar.rb
vendored
|
@ -1,120 +0,0 @@
|
|||
# lang_es-AR.rb
|
||||
# Argentinean-flavored Spanish translation file.
|
||||
# Translation by Damian Janowski damian.janowski@gmail.com
|
||||
# (based on lang_es.rb by Luis Villa del Campo)
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "es-ar",
|
||||
:updated => "2006-10-03"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "no está incluido en la lista",
|
||||
:exclusion => "está reservado",
|
||||
:invalid => "es inválido",
|
||||
:confirmation => "no coincide con la confirmación",
|
||||
:accepted => "debe ser aceptado",
|
||||
:empty => "no puede estar vacío",
|
||||
:blank => "no puede estar en blanco", # alternate, formulation: "es requerido"
|
||||
:too_long => "es demasiado largo (el máximo es de %d caracteres)",
|
||||
:too_short => "es demasiado corto (el mínimo es de %d caracteres)",
|
||||
:wrong_length => "no posee el largo correcto (debería ser de %d caracteres)",
|
||||
:taken => "ya está tomado",
|
||||
:not_a_number => "no es un número",
|
||||
#Jespers additions:
|
||||
:error_translation => "error ocurrió",
|
||||
:error_header => "%s al guardar su %s",
|
||||
:error_subheader => "Los siguientes campos presentan problemas:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "menos de %d segundos",
|
||||
:half_a_minute => "medio minuto",
|
||||
:less_than_a_minute => "menos de un minuto",
|
||||
:one_minute => "1 minuto",
|
||||
:x_minutes => "%d minutos",
|
||||
:one_hour => "una hora",
|
||||
:x_hours => "%d horas",
|
||||
:one_day => "un día",
|
||||
:x_days => "%d días",
|
||||
:one_month => "un mes",
|
||||
:x_months => "%d meses",
|
||||
:one_year => "un año",
|
||||
:x_years => "%d años"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre}
|
||||
AbbrMonthnames = [nil] + %w{ene feb mar abr may jun jul ago sep oct nov dic}
|
||||
Daynames = %w{domingo lunes martes miércoles jueves viernes sábado}
|
||||
AbbrDaynames = %w{dom lun mar mié jue vie sáb}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%e %b",
|
||||
:long => "%e de %B de %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d de %b de %Y %H:%M:%S %z",
|
||||
:short => "%b %d %H:%M",
|
||||
:long => "%d de %B de %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "$",
|
||||
:separator => ",", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'y',
|
||||
:skip_last_comma => true
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
inflect.plural /^(error ocurrió)$/i, 'errores ocurrieron'
|
||||
end
|
119
vendor/plugins/l10n-simplified-0.8/lib/lang_fi.rb
vendored
119
vendor/plugins/l10n-simplified-0.8/lib/lang_fi.rb
vendored
|
@ -1,119 +0,0 @@
|
|||
# lang_fi.rb
|
||||
# Finnish translation file.
|
||||
# Translation by Jarkko Laine ( http://jlaine.net/ )
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "fi",
|
||||
:updated => "2006-09-07"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "ei löydy listalta",
|
||||
:exclusion => "on varattu",
|
||||
:invalid => "on virheellinen",
|
||||
:confirmation => "ei vastaa vahvistusta",
|
||||
:accepted => "on hyväksyttävä",
|
||||
:empty => "ei voi olla tyhjä",
|
||||
:blank => "ei voi olla tyhjä",
|
||||
:too_long => "on liian pitkä (maksimi on %d merkkiä)",
|
||||
:too_short => "on liian lyhyt (minimi on %d merkkiä)",
|
||||
:wrong_length => "on väärän pituinen (oikea pituus %d merkkiä)",
|
||||
:taken => "on jo varattu",
|
||||
:not_a_number => "ei ole numero",
|
||||
#Jespers additions:
|
||||
:error_translation => "virhe",
|
||||
:error_header => "%s esti tämän %s tallentamisen",
|
||||
:error_subheader => "Seuraavat kentät aiheuttivat ongelmia:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "alle %d sekuntia",
|
||||
:half_a_minute => "puoli minuuttia",
|
||||
:less_than_a_minute => "alle minuutti",
|
||||
:one_minute => "1 minuutti",
|
||||
:x_minutes => "%d minuuttia",
|
||||
:one_hour => "noin tunti",
|
||||
:x_hours => "noin %d tuntia",
|
||||
:one_day => "1 päivä",
|
||||
:x_days => "%d päivää",
|
||||
:one_month => "1 month",
|
||||
:x_months => "%d months",
|
||||
:one_year => "1 year",
|
||||
:x_years => "%d years"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{tammikuu helmikuu maaliskuu huhtikuu toukokuu kesäkuu heinäkuu elokuu syyskuu lokakuu marraskuu joulukuu}
|
||||
AbbrMonthnames = [nil] + %w{tammi helmi maalis huhti touko kesä heinä elo syys loka marras joulu}
|
||||
Daynames = %w{sunnuntai maanantai tiistai keskiviikko torstai perjantai lauantai}
|
||||
AbbrDaynames = %w{su ma ti ke to pe la}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%e.%m.%Y",
|
||||
:short => "%d.%m.",
|
||||
:long => "%e. %Bta %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a %Bn %e. %H:%M:%S %Z %Y",
|
||||
:short => "%d.%m.%Y %H:%M",
|
||||
:long => "%a %e. %Bta %Y %T"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "€",
|
||||
:separator => " ", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'ja',
|
||||
:skip_last_comma => true
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
# end
|
118
vendor/plugins/l10n-simplified-0.8/lib/lang_fr.rb
vendored
118
vendor/plugins/l10n-simplified-0.8/lib/lang_fr.rb
vendored
|
@ -1,118 +0,0 @@
|
|||
# lang_fr.rb
|
||||
# Traduction française des messages d'erruer. A compléter ou corriger.
|
||||
# Translation by Frédéric Cavazza ( www.fredcavazza.net )
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "fr",
|
||||
:updated => "2006-09-07"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "n'est pas inclut dans la liste",
|
||||
:exclusion => "est réservé",
|
||||
:invalid => "est invalide",
|
||||
:confirmation => "ne correspond pas à la confirmation",
|
||||
:accepted => "doit être accepté",
|
||||
:empty => "ne peut pas être vide",
|
||||
:blank => "ne peut pas être vierge",# alternate, formulation: "is required"
|
||||
:too_long => "est trop long (%d caractères maximum)",
|
||||
:too_short => "est trop court(%d caractères minimum)",
|
||||
:wrong_length => "n'est pas de la bonne longueur (devrait être de %d caractères)",
|
||||
:taken => "est déjà prit",
|
||||
:not_a_number => "n'est pas le nombre",
|
||||
#Jespers additions:
|
||||
:error_translation => "erreur",
|
||||
:error_header => "%s interdit ce %s d'être sauvegardé",
|
||||
:error_subheader => "Il y a des problèmes avec les champs suivants :"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "moins de %d secondes",
|
||||
:half_a_minute => "une demi-minute",
|
||||
:less_than_a_minute => "moins d'une minute",
|
||||
:one_minute => "1 minute",
|
||||
:x_minutes => "%d minutes",
|
||||
:one_hour => "à peut près 1 heure",
|
||||
:x_hours => "à peu près %d heures",
|
||||
:one_day => "1 jour",
|
||||
:x_days => "%d jours",
|
||||
:one_month => "1 mois",
|
||||
:x_months => "%d mois",
|
||||
:one_year => "1 an",
|
||||
:x_years => "%d ans"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Decembre}
|
||||
AbbrMonthnames = [nil] + %w{Jan Fev Mar Avr Mai Jui Jul Aoû Sep Oct Nov Dec}
|
||||
Daynames = %w{Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi}
|
||||
AbbrDaynames = %w{Dim Lun Mar Mer Jeu Ven Sam}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%B %d, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:year, :month, :day] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "€",
|
||||
:separator => ".", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'et',
|
||||
:skip_last_comma => false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
# end
|
120
vendor/plugins/l10n-simplified-0.8/lib/lang_it.rb
vendored
120
vendor/plugins/l10n-simplified-0.8/lib/lang_it.rb
vendored
|
@ -1,120 +0,0 @@
|
|||
# lang_it.rb
|
||||
# Traduzione italiana.
|
||||
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "it",
|
||||
:updated => "2006-09-16"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "non è incluso nella lista",
|
||||
:exclusion => "è riservato",
|
||||
:invalid => "non è valido",
|
||||
:confirmation => "doesn't match confirmation",
|
||||
:accepted => "deve essere accettato",
|
||||
:empty => "non può essere vuoto",
|
||||
:blank => "è richiesto",# alternate, formulation: "is required"
|
||||
:too_long => "è troppo lungo (massimo %d caratteri)",
|
||||
:too_short => "è troppo corto (minimo %d caratteri)",
|
||||
:wrong_length => "è della lunghezza sbagliata (dovrebbe essere di %d caratteri)",
|
||||
:taken => "è già stato assegnato",
|
||||
:not_a_number => "non è un numero",
|
||||
#Jespers additions:
|
||||
:error_translation => "errore",
|
||||
:error_header => "%s impedisce a %s di essere salvato",
|
||||
:error_subheader => "Ci sono dei problemi con i seguenti campi:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "meno di %d secondi",
|
||||
:half_a_minute => "mezzo minuto",
|
||||
:less_than_a_minute => "meno di un minuto",
|
||||
:one_minute => "un minuto",
|
||||
:x_minutes => "%d minuti",
|
||||
:one_hour => "circa un'ora",
|
||||
:x_hours => "circa %d ore",
|
||||
:one_day => "un giorno",
|
||||
:x_days => "%d giorni",
|
||||
:one_month => "un mese",
|
||||
:x_months => "%d mesi",
|
||||
:one_year => "un anno",
|
||||
:x_years => "%d anni"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w( Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio
|
||||
Agosto Settembre Ottobre Novembre Dicembre )
|
||||
Daynames = %w( Domenica Lunedì Martedì Marcoledì Giovedì Venerdì Sabato )
|
||||
AbbrMonthnames = [nil] + %w( Gen Feb Mar Apr Mag Giu
|
||||
Lug Ago Set Ott Nov Dic )
|
||||
AbbrDaynames = %w( Dom Lun Mar Mer Gio Ven Sab )
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%d-%m-%Y",
|
||||
:short => "%e %b",
|
||||
:long => "%e %B, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%d %B, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "¤",
|
||||
:separator => ",", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'e',
|
||||
:skip_last_comma => false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
# end
|
119
vendor/plugins/l10n-simplified-0.8/lib/lang_ko.rb
vendored
119
vendor/plugins/l10n-simplified-0.8/lib/lang_ko.rb
vendored
|
@ -1,119 +0,0 @@
|
|||
# lang_ko.rb
|
||||
# Translation by Jeong Mok, Cho ( http://niceview.egloos.com )
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "ko",
|
||||
:updated => "2006-09-29"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "값은 목록에 없습니다.",
|
||||
:exclusion => "값은 이미 사용중입니다.",
|
||||
:invalid => "값이 잘못되었습니다.",
|
||||
:confirmation => "가 일치하지 않습니다.",
|
||||
:accepted => "항목이 채크되어야 합니다.",
|
||||
:empty => "값은 꼭 입력하셔야 합니다.",
|
||||
:blank => "값은 꼭 입력하셔야 합니다.",# alternate, formulation: "is required"
|
||||
:too_long => "값이 너무 깁니다. (최대 %d자 이내)",
|
||||
:too_short => "값이 너무 짧습니다. (최소 %d자 이상)",
|
||||
:wrong_length => "값은 길이가 잘못되었습니다. (%d자로 입력하세요)",
|
||||
:taken => "값은 이미 사용중입니다.",
|
||||
:not_a_number => "값은 숫자가 아닙니다.",
|
||||
#Jespers additions:
|
||||
:error_translation => "개의 애러",
|
||||
:error_header => "%s가 발생하였습니다. 이 %s는(은) 저장되지 않았습니다.",
|
||||
:error_subheader => "다음의 항목에 대한 입력값들이 잘못되었습니다."
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "%d초 이내",
|
||||
:half_a_minute => "30초",
|
||||
:less_than_a_minute => "1분 이내",
|
||||
:one_minute => "1분",
|
||||
:x_minutes => "%d분",
|
||||
:one_hour => "약 1시간",
|
||||
:x_hours => "약 %d시간",
|
||||
:one_day => "1일",
|
||||
:x_days => "%d일",
|
||||
:one_month => "1개월",
|
||||
:x_months => "%d개월",
|
||||
:one_year => "1년",
|
||||
:x_years => "%d년"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{1월 2월 3월 4월 5월 6월 7월 8월 9월 10월 11월 12월}
|
||||
AbbrMonthnames = [nil] + %w{1 2 3 4 5 6 7 8 9 10 11 12}
|
||||
Daynames = %w{일요일 월요일 화요일 수요일 목요일 금요일 토요일}
|
||||
AbbrDaynames = %w{일 월 화 수 목 금 토}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y/%m/%d",
|
||||
:short => "%m/%d",
|
||||
:long => "%Y년 %b월 %e일 %A"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
#:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:default => "%Y/%m/%d (%a) %p %H:%M:%S",
|
||||
:short => "%H:%M",
|
||||
:long => "%Y년 %b월 %e일 %A %p %I시 %M분 %S초"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:year, :month, :day] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "₩",
|
||||
:separator => ".", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => '그리고',
|
||||
:skip_last_comma => true
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
inflect.uncountable '개의 애러'
|
||||
end
|
||||
|
115
vendor/plugins/l10n-simplified-0.8/lib/lang_nl.rb
vendored
115
vendor/plugins/l10n-simplified-0.8/lib/lang_nl.rb
vendored
|
@ -1,115 +0,0 @@
|
|||
# lang_nl.rb
|
||||
# Dutch translation by Jeroen Houben
|
||||
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "nl",
|
||||
:updated => "2006-08-23"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "zit niet in de lijst",
|
||||
:exclusion => "is gereserveerd",
|
||||
:invalid => "is ongeldig",
|
||||
:confirmation => "is niet hetzelfde als de verificatie",
|
||||
:accepted => "moet worden geaccepteerd",
|
||||
:empty => "mag niet leeg zijn",
|
||||
:blank => "mag niet blanko zijn",# alternate, formulation: "is required"
|
||||
:too_long => "is te lang (maximum is %d karakters)",
|
||||
:too_short => "is te kort (minimum is %d karakters)",
|
||||
:wrong_length => "is de verkeerde lengte (dient %d karakters te zijn)",
|
||||
:taken => "is reeds in gebruik",
|
||||
:not_a_number => "is geen nummer",
|
||||
#Jespers additions:
|
||||
:error_translation => "fout",
|
||||
:error_header => "%s zorgen ervoor dat %s niet kan worden opgeslagen",
|
||||
:error_subheader => "Er zijn problemen met de volgende velden:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "minder dan %d seconden",
|
||||
:half_a_minute => "een halve minuut",
|
||||
:less_than_a_minute => "minder dan een halve minuut",
|
||||
:one_minute => "1 minuut",
|
||||
:x_minutes => "%d minuten",
|
||||
:one_hour => "ongeveer 1 uur",
|
||||
:x_hours => "ongeveer %d uur",
|
||||
:one_day => "1 dag",
|
||||
:x_days => "%d dagen",
|
||||
:one_month => "1 maand",
|
||||
:x_months => "%d maanden",
|
||||
:one_year => "1 jaar",
|
||||
:x_years => "%d jaar"
|
||||
}
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{Januari Februari Maart April Mei Juni Juli Augustus September Oktober November December}
|
||||
AbbrMonthnames = [nil] + %w{Jan Feb Mar Apr Mei Jun Jul Aug Sep Okt Nov Dec}
|
||||
Daynames = %w{Zondag Maandag Dinsdag Woensdag Donderdag Vrijdag Zaterdag}
|
||||
AbbrDaynames = %w{Zo Ma Di Wo Do Vr Za}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%d-%m-%Y",
|
||||
:short => "%d %b",
|
||||
:long => "%d %B %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%d %B %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "€",
|
||||
:separator => ".", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:unit, :number] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'en',
|
||||
:skip_last_comma => false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
Inflector.inflections do |inflect|
|
||||
inflect.irregular 'fout', 'fouten'
|
||||
end
|
|
@ -1,119 +0,0 @@
|
|||
# lang_pirate.rb
|
||||
# Pirate baseline translation file.
|
||||
# Translated by Tobias Michaelsen , additions by Jesper Rønn-Jensen ( http://justaddwater.dk/ )
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "pirate",
|
||||
:updated => "2006-09-07"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "be not included in the list, me hearty",
|
||||
:exclusion => "be reserrrrved",
|
||||
:invalid => "be innvalid, m hearty",
|
||||
:confirmation => "doesn't match confirmation",
|
||||
:accepted => "must be accepted, arrrrh!",
|
||||
:empty => "no nay ne'er be empty",
|
||||
:blank => "no nay be blank, ye scurvy dog!",# alternate, formulation: "is required"
|
||||
:too_long => "be too vastly in length (no more than %d characters or ye drivin' me nuts)",
|
||||
:too_short => "be way too short (at least %d characters or ye drivin' me nuts)",
|
||||
:wrong_length => "be the wrong length (should be %d characters)",
|
||||
:taken => "has already been taken",
|
||||
:not_a_number => "be not a number, matey",
|
||||
#Jespers additions:
|
||||
:error_translation => "errrorrr",
|
||||
:error_header => "Ahoy me hearty! %s prohibited ye %s from bein' saved",
|
||||
:error_subheader => "Turn the steering wheeel and corrrect these fields, arrrrh."
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "less than %d seconds",
|
||||
:half_a_minute => "half arrr minute",
|
||||
:less_than_a_minute => "less than arrr minute",
|
||||
:one_minute => "1 minute ye landlubber",
|
||||
:x_minutes => "%d minutes accounted ferrrr",
|
||||
:one_hour => "about one hourrr and a bottle of rum",
|
||||
:x_hours => "about %d hourrrs and a bottle of rum",
|
||||
:one_day => "1 day and a dead mans chest arrr",
|
||||
:x_days => "%d days and a ship full of hornpipes",
|
||||
:one_month => "1 full moon",
|
||||
:x_months => "%d full moons",
|
||||
:one_year => "1 yearrrr",
|
||||
:x_years => "%d yearrrrrs"
|
||||
}
|
||||
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{January February March April May June July August September October November December}
|
||||
AbbrMonthnames = [nil] + %w{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}
|
||||
Daynames = %w{Sunday Monday Tuesday Wednesday Thurrrrrrsday Frrriday Saturrrrday}
|
||||
AbbrDaynames = %w{Sun Mon Tue Wed Thurrrr Frri Sat}
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%A, %d %b %Y %H:%M:%S",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%B %d, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:year, :month, :day] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "pieces o' silver",
|
||||
:separator => ".", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:number, :unit] #order is at present unsupported in Rails
|
||||
#to support for instance Danish format, the order is different: Unit comes last (ex. "1.234,00 dkr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'and',
|
||||
:skip_last_comma => false
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
# Inflector.inflections do |inflect|
|
||||
# inflect.plural /^(ox)$/i, '\1en'
|
||||
# inflect.singular /^(ox)en/i, '\1'
|
||||
# inflect.irregular 'person people'
|
||||
# inflect.uncountable %w( information )
|
||||
# end
|
116
vendor/plugins/l10n-simplified-0.8/lib/lang_se.rb
vendored
116
vendor/plugins/l10n-simplified-0.8/lib/lang_se.rb
vendored
|
@ -1,116 +0,0 @@
|
|||
# lang_se.rb
|
||||
# Swedish translation file.
|
||||
# Translation from plugin swe_rails by Ola Bini ( http://ola-bini.blogspot.com/ ) and Olle Jonsson ( http://olleolleolle.dk )
|
||||
|
||||
|
||||
module LocalizationSimplified
|
||||
About = {
|
||||
:lang => "se",
|
||||
:updated => "2006-09-07"
|
||||
}
|
||||
|
||||
class ActiveRecord
|
||||
# ErrorMessages to override default messages in
|
||||
# +ActiveRecord::Errors::@@default_error_messages+
|
||||
# This plugin also replaces hardcoded 3 text messages
|
||||
# :error_translation is inflected using the Rails
|
||||
# inflector.
|
||||
#
|
||||
# Remember to modify the Inflector with your localized translation
|
||||
# of "error" and "errors" in the bottom of this file
|
||||
#
|
||||
ErrorMessages = {
|
||||
:inclusion => "finns inte i listan",
|
||||
:exclusion => "Är reserverat",
|
||||
:invalid => "Är ogiltigt",
|
||||
:confirmation => "stämmer inte övererens",
|
||||
:accepted => "måste vara accepterad",
|
||||
:empty => "för ej vara tom",
|
||||
:blank => "för ej vara blank",
|
||||
:too_long => "Är för lång (maximum är %d tecken)",
|
||||
:too_short => "Är för kort (minimum är %d tecken)",
|
||||
:wrong_length => "har fel längd (ska vara %d tecken)",
|
||||
:taken => "har redan tagits",
|
||||
:not_a_number => "Är ej ett nummer",
|
||||
#Jespers additions:
|
||||
:error_translation => "fel",
|
||||
:error_header => "%s förhindrade %s från at sparse",
|
||||
:error_subheader => "Problemar met dissa felterne:"
|
||||
}
|
||||
end
|
||||
|
||||
# Texts to override +distance_of_time_in_words()+
|
||||
class DateHelper
|
||||
Texts = {
|
||||
:less_than_x_seconds => "mindre än %d sekunder",
|
||||
:half_a_minute => "en halv minut",
|
||||
:less_than_a_minute => "mindre än en minut",
|
||||
:one_minute => "1 minut",
|
||||
:x_minutes => "%d minutter",
|
||||
:one_hour => "ungefär 1 timma",
|
||||
:x_hours => "ungefär %d timmar",
|
||||
:one_day => "1 dygn",
|
||||
:x_days => "%d dygn",
|
||||
:one_month => "1 month",
|
||||
:x_months => "%d months",
|
||||
:one_year => "1 year",
|
||||
:x_years => "%d years"
|
||||
}
|
||||
# Rails uses Month names in Date and time select boxes
|
||||
# (+date_select+ and +datetime_select+ )
|
||||
# Currently (as of version 1.1.6), Rails doesn't use daynames
|
||||
Monthnames = [nil] + %w{januari februari mars april maj juni juli augusti september oktober november december}
|
||||
AbbrMonthnames = [nil] + %w{jan feb mar apr maj jun jul aug sep okt nov dec}
|
||||
Daynames = %w{söndag måndag tisdag onsdag torsdag fredag lördag}
|
||||
AbbrDaynames = %w{sön mån tis ons tors fre lör}
|
||||
|
||||
|
||||
# Date and time format syntax explained in http://www.rubycentral.com/ref/ref_c_time.html#strftime
|
||||
# These are sent to strftime that Ruby's date and time handlers use internally
|
||||
# Same options as php (that has a better list: http://www.php.net/strftime )
|
||||
DateFormats = {
|
||||
:default => "%Y-%m-%d",
|
||||
:short => "%b %e",
|
||||
:long => "%B %e, %Y"
|
||||
}
|
||||
|
||||
TimeFormats = {
|
||||
:default => "%a, %d %b %Y %H:%M:%S %z",
|
||||
:short => "%d %b %H:%M",
|
||||
:long => "%B %d, %Y %H:%M"
|
||||
}
|
||||
# Set the order of +date_select+ and +datetime_select+ boxes
|
||||
# Note that at present, the current Rails version only supports ordering of date_select boxes
|
||||
DateSelectOrder = {
|
||||
:order => [:day, :month, :year] #default Rails is US ordered: :order => [:year, :month, :day]
|
||||
}
|
||||
end
|
||||
|
||||
class NumberHelper
|
||||
# CurrencyOptions are used as default for +Number#to_currency()+
|
||||
# http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449
|
||||
CurrencyOptions = {
|
||||
:unit => "kr.",
|
||||
:separator => ",", #unit separator (between integer part and fraction part)
|
||||
:delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567
|
||||
:order => [:number, :unit] #order is at present unsupported in Rails
|
||||
#to support for instance Swedish format, the order is different: Unit comes last (ex. "1.234,00 kr.")
|
||||
}
|
||||
end
|
||||
|
||||
class ArrayHelper
|
||||
# Modifies +Array#to_sentence()+
|
||||
# http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274
|
||||
ToSentenceTexts = {
|
||||
:connector => 'och',
|
||||
:skip_last_comma => true
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Use the inflector below to pluralize "error" from
|
||||
# @@default_error_messages[:error_translation] above (if necessary)
|
||||
Inflector.inflections do |inflect|
|
||||
inflect.uncountable %w( fel )
|
||||
end
|
|
@ -1,229 +0,0 @@
|
|||
# LocalizationSimplified (L10n-simplified)
|
||||
# Really simple localization for Rails
|
||||
# By Jesper Rønn-Jensen ( http://justaddwater.dk/ )
|
||||
# Plugin available at http://rubyforge.org/projects/l10n-simplified/
|
||||
#
|
||||
module LocalizationSimplified
|
||||
@@ignore = "\xFF\xFF\xFF\xFF" # %% == Literal "%" character
|
||||
# substitute all daynames and monthnames with localized names
|
||||
# from RUtils plugin
|
||||
def self.localize_strftime(date='%d.%m.%Y', time='')
|
||||
date.gsub!(/%%/, @@ignore)
|
||||
date.gsub!(/%a/, LocalizationSimplified::DateHelper::AbbrDaynames[time.wday])
|
||||
date.gsub!(/%A/, LocalizationSimplified::DateHelper::Daynames[time.wday])
|
||||
date.gsub!(/%b/, LocalizationSimplified::DateHelper::AbbrMonthnames[time.mon])
|
||||
date.gsub!(/%B/, LocalizationSimplified::DateHelper::Monthnames[time.mon])
|
||||
date.gsub!(@@ignore, '%%')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module ActiveRecord
|
||||
class Errors
|
||||
#Error messages modified in lang file
|
||||
@@default_error_messages.update(LocalizationSimplified::ActiveRecord::ErrorMessages)
|
||||
end
|
||||
end
|
||||
|
||||
module ActionView
|
||||
module Helpers
|
||||
|
||||
#Modify ActiveRecord to use error message headers (text from lang-file)
|
||||
module ActiveRecordHelper
|
||||
alias_method :old_error_messages_for, :error_messages_for
|
||||
|
||||
def error_messages_for(*params)
|
||||
options = params.last.is_a?(Hash) ? params.pop.symbolize_keys : {}
|
||||
objects = params.collect {|object_name| instance_variable_get("@#{object_name}") }.compact
|
||||
count = objects.inject(0) {|sum, object| sum + object.errors.count }
|
||||
unless count.zero?
|
||||
html = {}
|
||||
[:id, :class].each do |key|
|
||||
if options.include?(key)
|
||||
value = options[key]
|
||||
html[key] = value unless value.blank?
|
||||
else
|
||||
html[key] = 'errorExplanation'
|
||||
end
|
||||
end
|
||||
messages = ActiveRecord:: Errors.default_error_messages
|
||||
header_message = format( messages[:error_header],
|
||||
pluralize(count, messages[:error_translation]),
|
||||
(options[:object_name] ||
|
||||
params.first).to_s.gsub("_", " "))
|
||||
error_messages = objects.map {|object| object.errors.full_messages.map {|msg| content_tag(:li, msg) } }
|
||||
content_tag(:div,
|
||||
content_tag(options[:header_tag] || :h2, header_message) <<
|
||||
content_tag(:p, messages[:error_subheader]) <<
|
||||
content_tag(:ul, error_messages),
|
||||
html
|
||||
)
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Modify DateHelper to use text from lang-file
|
||||
module DateHelper
|
||||
#Modify DateHelper distance_of_time_in_words
|
||||
alias_method :old_distance_of_time_in_words, :distance_of_time_in_words
|
||||
def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false)
|
||||
from_time = from_time.to_time if from_time.respond_to?(:to_time)
|
||||
to_time = to_time.to_time if to_time.respond_to?(:to_time)
|
||||
distance_in_minutes = (((to_time - from_time).abs)/60).round
|
||||
distance_in_seconds = ((to_time - from_time).abs).round
|
||||
|
||||
#First, I invent a variable (makes it easier for future localization)
|
||||
messages = LocalizationSimplified::DateHelper::Texts #localized
|
||||
case distance_in_minutes
|
||||
when 0..1
|
||||
return (distance_in_minutes==0) ? messages[:less_than_a_minute] : messages[:one_minute] unless include_seconds
|
||||
case distance_in_seconds
|
||||
when 0..5 then format( messages[:less_than_x_seconds], 5 )
|
||||
when 6..10 then format( messages[:less_than_x_seconds], 10 )
|
||||
when 11..20 then format( messages[:less_than_x_seconds], 20 )
|
||||
when 21..40 then messages[:half_a_minute]
|
||||
when 41..59 then messages[:less_than_a_minute]
|
||||
else messages[:one_minute]
|
||||
end
|
||||
|
||||
when 2..44 then format(messages[:x_minutes], distance_in_minutes)
|
||||
when 45..89 then messages[:one_hour]
|
||||
when 90..1439 then format( messages[:x_hours], (distance_in_minutes.to_f / 60.0).round )
|
||||
when 1440..2879 then messages[:one_day]
|
||||
when 2880..43199 then format( messages[:x_days], (distance_in_minutes / 1440).round )
|
||||
when 43200..86399 then messages[:one_month]
|
||||
when 86400..525959 then format( messages[:x_months], (distance_in_minutes / 43200).round )
|
||||
when 525960..1051919 then messages[:one_year]
|
||||
else format( messages[:x_years], (distance_in_minutes / 525960).round )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Give default settings to number_to_currency()
|
||||
module NumberHelper
|
||||
alias_method :orig_number_to_currency, :number_to_currency
|
||||
#modify number_to_currency to accept :order option
|
||||
def number_to_currency(number, options = {})
|
||||
# Blend default options with localized currency options
|
||||
options.reverse_merge!(LocalizationSimplified::NumberHelper::CurrencyOptions)
|
||||
options[:order] ||= [:unit, :number]
|
||||
options = options.stringify_keys
|
||||
precision, unit, separator, delimiter = options.delete("precision") { 2 }, options.delete("unit") { "$" }, options.delete("separator") { "." }, options.delete("delimiter") { "," }
|
||||
separator = "" unless precision > 0
|
||||
|
||||
#add leading space before trailing unit
|
||||
unit = " " + unit if options["order"] == [:number, :unit]
|
||||
output = ''
|
||||
begin
|
||||
options["order"].each do |param|
|
||||
case param
|
||||
when :unit
|
||||
output << unit
|
||||
when :number
|
||||
parts = number_with_precision(number, precision).split('.')
|
||||
output << number_with_delimiter(parts[0], delimiter) + separator + parts[1].to_s
|
||||
end
|
||||
end
|
||||
rescue
|
||||
output = number
|
||||
end
|
||||
output
|
||||
end
|
||||
end# module NumberHelper
|
||||
|
||||
module DateHelper
|
||||
alias_method :orig_date_select, :date_select
|
||||
# Blend default options with localized :order option
|
||||
def date_select(object_name, method, options = {})
|
||||
options.reverse_merge!(LocalizationSimplified::DateHelper::DateSelectOrder)
|
||||
orig_date_select(object_name, method, options)
|
||||
end
|
||||
|
||||
alias_method :orig_datetime_select, :datetime_select
|
||||
# Blend default options with localized :order option
|
||||
def datetime_select(object_name, method, options = {})
|
||||
options.reverse_merge!(LocalizationSimplified::DateHelper::DateSelectOrder)
|
||||
orig_datetime_select(object_name, method, options)
|
||||
end
|
||||
end #module DateHelper
|
||||
|
||||
end #module Helpers
|
||||
end #module ActionView
|
||||
|
||||
|
||||
class Array
|
||||
alias :orig_to_sentence :to_sentence
|
||||
def to_sentence(options = {})
|
||||
#Blend default options with sent through options
|
||||
options.reverse_merge!(LocalizationSimplified::ArrayHelper::ToSentenceTexts)
|
||||
orig_to_sentence(options)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Modification of ruby constants
|
||||
class Date
|
||||
#FIXME as these are defined as Ruby constants, they can not be overwritten
|
||||
MONTHNAMES = LocalizationSimplified::DateHelper::Monthnames
|
||||
ABBR_MONTHNAMES = LocalizationSimplified::DateHelper::AbbrMonthnames
|
||||
#DAYNAMES = LocalizationSimplified::DateHelper::Daynames #not in use by Rails
|
||||
#ABBR_DAYNAMES = LocalizationSimplified::DateHelper::AbbrDaynames #not in use by Rails
|
||||
end
|
||||
|
||||
# Modification of default Time format using Time.to_formatted_s(:default)
|
||||
# Localizes the hash with the formats :default, :short, :long
|
||||
# Usage:
|
||||
# <% t = Time.parse('2006-12-25 13:55') %>
|
||||
# <%= t.to_formatted_s(:short) #=> outputs time in localized format %>
|
||||
# <%= t #=> outputs time in localized format %>
|
||||
class Time
|
||||
alias_method :old_strftime, :strftime
|
||||
# Pre-translate format of Time before the time string is translated by strftime.
|
||||
# The <tt>:default</tt> time format is changed by localizing month and daynames.
|
||||
# Also Rails ActiveSupport allow us to modify the <tt>:default</tt> timeformatting string.
|
||||
# Originally, its <tt>:default => "%a, %d %b %Y %H:%M:%S %z"</tt> (RFC2822 names), but as it can be
|
||||
# modified in this plugin, and we can end up with a different file format in logfiles, etc
|
||||
def strftime(date)
|
||||
LocalizationSimplified::localize_strftime(date, self)
|
||||
old_strftime(date)
|
||||
end
|
||||
end
|
||||
|
||||
# Modification of default Date format using Date.to_formatted_s(:default)
|
||||
# Localizes the hash with the formats :default, :short, :long
|
||||
# Usage:
|
||||
# <% d = Date.parse('2006-12-25') %>
|
||||
# <%= d.to_formatted_s(:short) #=> outputs date in localized format %>
|
||||
#
|
||||
# FIXME The Time conversion still does not modify week day and month (for some reason)
|
||||
ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(LocalizationSimplified::DateHelper::DateFormats)
|
||||
|
||||
# Modification of default Time format using Time.to_formatted_s(:default)
|
||||
# Localizes the hash with the formats :default, :short, :long
|
||||
# Usage:
|
||||
# <% t = Time.parse('2006-12-25 13:55') %>
|
||||
# <%= t.to_formatted_s(:short) #=> outputs time in localized format %>
|
||||
# <%= t #=> outputs time in localized format %>
|
||||
#
|
||||
# FIXME The Time conversion still does not modify week day and month (for some reason)
|
||||
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(LocalizationSimplified::DateHelper::TimeFormats)
|
||||
|
||||
|
||||
# Modify Actioncontroller to always use UTF-8
|
||||
# Currently this modifies MySQL. Please add other databases you find necessary
|
||||
class ActionController::Base
|
||||
before_filter :configure_charsets
|
||||
|
||||
def configure_charsets(charset='utf-8')
|
||||
# Set connection charset. MySQL 4.0 doesn't support this so it
|
||||
# will throw an error, MySQL 4.1+ needs this.
|
||||
suppress(ActiveRecord::StatementInvalid) do
|
||||
ActiveRecord::Base.connection.execute "SET NAMES 'UTF8'"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActionController</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActionController</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Class <a href="ActionController/Base.html" class="link">ActionController::Base</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,161 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: ActionController::Base</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">ActionController::Base</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Modify Actioncontroller to always use UTF-8 Currently this modifies MySQL.
|
||||
Please add other databases you find necessary
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000003">configure_charsets</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000003" class="method-detail">
|
||||
<a name="M000003"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000003" class="method-signature">
|
||||
<span class="method-name">configure_charsets</span><span class="method-args">(charset='utf-8')</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000003-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 197</span>
|
||||
197: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure_charsets</span>(<span class="ruby-identifier">charset</span>=<span class="ruby-value str">'utf-8'</span>)
|
||||
198: <span class="ruby-identifier">$KCODE</span> = <span class="ruby-value str">'u'</span>
|
||||
199: <span class="ruby-comment cmt"># Response header necessary with some lang-files (like lang_pirate.rb for some reason)</span>
|
||||
200: <span class="ruby-ivar">@response</span>.<span class="ruby-identifier">headers</span>[<span class="ruby-value str">"Content-Type"</span>] = <span class="ruby-value str">"text/html; charset=utf-8"</span>
|
||||
201:
|
||||
202: <span class="ruby-comment cmt"># Set connection charset. MySQL 4.0 doesn't support this so it</span>
|
||||
203: <span class="ruby-comment cmt"># will throw an error, MySQL 4.1 needs this</span>
|
||||
204: <span class="ruby-identifier">suppress</span>(<span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">StatementInvalid</span>) <span class="ruby-keyword kw">do</span>
|
||||
205: <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">connection</span>.<span class="ruby-identifier">execute</span> <span class="ruby-value str">'SET NAMES UTF8'</span>
|
||||
206: <span class="ruby-keyword kw">end</span>
|
||||
207: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,117 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActionView</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActionView</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Give default settings to number_to_currency()
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="ActionView/Helpers.html" class="link">ActionView::Helpers</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,113 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActionView::Helpers</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActionView::Helpers</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Module <a href="Helpers/ActiveRecordHelper.html" class="link">ActionView::Helpers::ActiveRecordHelper</a><br />
|
||||
Module <a href="Helpers/DateHelper.html" class="link">ActionView::Helpers::DateHelper</a><br />
|
||||
Module <a href="Helpers/NumberHelper.html" class="link">ActionView::Helpers::NumberHelper</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,176 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActionView::Helpers::ActiveRecordHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActionView::Helpers::ActiveRecordHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Modify <a href="../../ActiveRecord.html">ActiveRecord</a> to use error
|
||||
message headers (text from lang-file)
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000005">error_messages_for</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
<div id="aliases-list">
|
||||
<h3 class="section-bar">External Aliases</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="aliases">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">error_messages_for</td>
|
||||
<td>-></td>
|
||||
<td class="context-item-value">old_error_messages_for</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000005" class="method-detail">
|
||||
<a name="M000005"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000005" class="method-signature">
|
||||
<span class="method-name">error_messages_for</span><span class="method-args">(object_name, options = {})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000005-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 65</span>
|
||||
65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">error_messages_for</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">options</span> = {})
|
||||
66: <span class="ruby-identifier">messages</span> = <span class="ruby-constant">ActiveRecord</span><span class="ruby-operator">::</span><span class="ruby-constant">Errors</span>.<span class="ruby-identifier">default_error_messages</span>
|
||||
67: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">symbolize_keys</span>
|
||||
68: <span class="ruby-identifier">object</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">"@#{object_name}"</span>)
|
||||
69: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">object</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">object</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">empty?</span>
|
||||
70: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">"div"</span>,
|
||||
71: <span class="ruby-identifier">content_tag</span>(
|
||||
72: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:header_tag</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"h2"</span>,
|
||||
73: <span class="ruby-identifier">format</span>( <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:error_header</span>], <span class="ruby-identifier">pluralize</span>(<span class="ruby-identifier">object</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">count</span>, <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:error_translation</span>]), <span class="ruby-identifier">object_name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">"_"</span>, <span class="ruby-value str">" "</span>) )
|
||||
74: <span class="ruby-comment cmt">#"#{pluralize(object.errors.count, "error")} prohibited this #{object_name.to_s.gsub("_", " ")} from being saved"</span>
|
||||
75: ) <span class="ruby-operator">+</span>
|
||||
76: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">"p"</span>, <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:error_subheader</span>]) <span class="ruby-operator">+</span>
|
||||
77: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">"ul"</span>, <span class="ruby-identifier">object</span>.<span class="ruby-identifier">errors</span>.<span class="ruby-identifier">full_messages</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">msg</span><span class="ruby-operator">|</span> <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">"li"</span>, <span class="ruby-identifier">msg</span>) }),
|
||||
78: <span class="ruby-value str">"id"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:id</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"errorExplanation"</span>, <span class="ruby-value str">"class"</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:class</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"errorExplanation"</span>
|
||||
79: )
|
||||
80: <span class="ruby-keyword kw">else</span>
|
||||
81: <span class="ruby-value str">""</span>
|
||||
82: <span class="ruby-keyword kw">end</span>
|
||||
83: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,233 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActionView::Helpers::DateHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActionView::Helpers::DateHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Modify <a href="DateHelper.html">DateHelper</a> to use text from lang-file
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000007">date_select</a>
|
||||
<a href="#M000008">datetime_select</a>
|
||||
<a href="#M000006">distance_of_time_in_words</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
<div id="aliases-list">
|
||||
<h3 class="section-bar">External Aliases</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="aliases">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">distance_of_time_in_words</td>
|
||||
<td>-></td>
|
||||
<td class="context-item-value">old_distance_of_time_in_words</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td> </td>
|
||||
<td colspan="2" class="context-item-desc">
|
||||
Modify <a href="DateHelper.html">DateHelper</a> <a
|
||||
href="DateHelper.html#M000006">distance_of_time_in_words</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">date_select</td>
|
||||
<td>-></td>
|
||||
<td class="context-item-value">orig_date_select</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">datetime_select</td>
|
||||
<td>-></td>
|
||||
<td class="context-item-value">orig_datetime_select</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000007" class="method-detail">
|
||||
<a name="M000007"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000007" class="method-signature">
|
||||
<span class="method-name">date_select</span><span class="method-args">(object_name, method, options = {})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Blend default options with localized :order option
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000007-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 117</span>
|
||||
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">date_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {})
|
||||
118: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">DateSelectOrder</span>)
|
||||
119: <span class="ruby-identifier">orig_date_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
120: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000008" class="method-detail">
|
||||
<a name="M000008"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000008" class="method-signature">
|
||||
<span class="method-name">datetime_select</span><span class="method-args">(object_name, method, options = {})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Blend default options with localized :order option
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000008-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 126</span>
|
||||
126: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">datetime_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {})
|
||||
127: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">DateSelectOrder</span>)
|
||||
128: <span class="ruby-identifier">orig_datetime_select</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
||||
129: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000006" class="method-detail">
|
||||
<a name="M000006"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000006" class="method-signature">
|
||||
<span class="method-name">distance_of_time_in_words</span><span class="method-args">(from_time, to_time = 0, include_seconds = false)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000006-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 93</span>
|
||||
93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword kw">false</span>)
|
||||
94: <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span>, <span class="ruby-identifier">include_seconds</span>)
|
||||
95: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,157 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActionView::Helpers::NumberHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActionView::Helpers::NumberHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000004">number_to_currency</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
<div id="aliases-list">
|
||||
<h3 class="section-bar">External Aliases</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="aliases">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">number_to_currency</td>
|
||||
<td>-></td>
|
||||
<td class="context-item-value">orig_number_to_currency</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000004" class="method-detail">
|
||||
<a name="M000004"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000004" class="method-signature">
|
||||
<span class="method-name">number_to_currency</span><span class="method-args">(number, options = {})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Blend default options with localized currency options
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000004-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 107</span>
|
||||
107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">number_to_currency</span>(<span class="ruby-identifier">number</span>, <span class="ruby-identifier">options</span> = {})
|
||||
108: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">NumberHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">CurrencyOptions</span>)
|
||||
109: <span class="ruby-identifier">orig_number_to_currency</span>(<span class="ruby-identifier">number</span>, <span class="ruby-identifier">options</span>)
|
||||
110: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,111 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: ActiveRecord</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">ActiveRecord</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Class <a href="ActiveRecord/Errors.html" class="link">ActiveRecord::Errors</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,111 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: ActiveRecord::Errors</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">ActiveRecord::Errors</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,161 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Array</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Array</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000002">to_sentence</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
<div id="aliases-list">
|
||||
<h3 class="section-bar">External Aliases</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="aliases">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">to_sentence</td>
|
||||
<td>-></td>
|
||||
<td class="context-item-value">orig_to_sentence</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000002" class="method-detail">
|
||||
<a name="M000002"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000002" class="method-signature">
|
||||
<span class="method-name">to_sentence</span><span class="method-args">(options = {})</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000002-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 137</span>
|
||||
137: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_sentence</span>(<span class="ruby-identifier">options</span> = {})
|
||||
138: <span class="ruby-comment cmt">#Blend default options with sent through options</span>
|
||||
139: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">ArrayHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">ToSentenceTexts</span>)
|
||||
140: <span class="ruby-identifier">orig_to_sentence</span>(<span class="ruby-identifier">options</span>)
|
||||
141: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,136 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: Date</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">Date</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Modification of ruby constants
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">MONTHNAMES</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">LocalizationSimplified::DateHelper::Monthnames</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
FIXME as these are defined as Ruby constants, they can’t be
|
||||
overwritten
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,344 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: LocalizationSimplified</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">LocalizationSimplified</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/lib/lang_cf_rb.html">
|
||||
lib/lang_cf.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_chef_rb.html">
|
||||
lib/lang_chef.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_da_rb.html">
|
||||
lib/lang_da.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_de_rb.html">
|
||||
lib/lang_de.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_en_rb.html">
|
||||
lib/lang_en.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_es_rb.html">
|
||||
lib/lang_es.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_fi_rb.html">
|
||||
lib/lang_fi.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_fr_rb.html">
|
||||
lib/lang_fr.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_fr__rb.html">
|
||||
lib/lang_fr_.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_nl_rb.html">
|
||||
lib/lang_nl.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_pirate_rb.html">
|
||||
lib/lang_pirate.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_se_rb.html">
|
||||
lib/lang_se.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/lang_template_rb.html">
|
||||
lib/lang_template.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/lib/localization_simplified_rb.html">
|
||||
lib/localization_simplified.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="LocalizationSimplified.html">LocalizationSimplified</a> Really
|
||||
simple localization for Rails By Jesper Rønn-Jensen ( <a
|
||||
href="http://justaddwater.dk">justaddwater.dk</a>/ ) Plugin available at <a
|
||||
href="http://rubyforge.org/projects/l10n-simplified">rubyforge.org/projects/l10n-simplified</a>/
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000010">distance_of_time_in_words</a>
|
||||
<a href="#M000009">localize_strftime</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Class <a href="LocalizationSimplified/ActiveRecord.html" class="link">LocalizationSimplified::ActiveRecord</a><br />
|
||||
Class <a href="LocalizationSimplified/ArrayHelper.html" class="link">LocalizationSimplified::ArrayHelper</a><br />
|
||||
Class <a href="LocalizationSimplified/DateHelper.html" class="link">LocalizationSimplified::DateHelper</a><br />
|
||||
Class <a href="LocalizationSimplified/NumberHelper.html" class="link">LocalizationSimplified::NumberHelper</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "cf", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "chef", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "da", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "de", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "en", :updated => "2006-09-01"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "es", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "fi", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "fr", :updated => "2006-09-03"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "fr", :updated => "2006-08-24"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "nl", :updated => "2006-08-23"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "pirate", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "se", :updated => "2006-09-07"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">About</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :lang => "en",#add locale code here :updated => "2006-09-01"</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000010" class="method-detail">
|
||||
<a name="M000010"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000010" class="method-signature">
|
||||
<span class="method-name">distance_of_time_in_words</span><span class="method-args">(from_time, to_time = 0, include_seconds = false)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Modify <a href="LocalizationSimplified/DateHelper.html">DateHelper</a> <a
|
||||
href="LocalizationSimplified.html#M000010">distance_of_time_in_words</a>
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000010-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 20</span>
|
||||
20: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">distance_of_time_in_words</span>(<span class="ruby-identifier">from_time</span>, <span class="ruby-identifier">to_time</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">include_seconds</span> = <span class="ruby-keyword kw">false</span>)
|
||||
21: <span class="ruby-identifier">from_time</span> = <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
|
||||
22: <span class="ruby-identifier">to_time</span> = <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">to_time</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">to_time</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_time</span>)
|
||||
23: <span class="ruby-identifier">distance_in_minutes</span> = (((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>)<span class="ruby-operator">/</span><span class="ruby-value">60</span>).<span class="ruby-identifier">round</span>
|
||||
24: <span class="ruby-identifier">distance_in_seconds</span> = ((<span class="ruby-identifier">to_time</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">from_time</span>).<span class="ruby-identifier">abs</span>).<span class="ruby-identifier">round</span>
|
||||
25:
|
||||
26: <span class="ruby-comment cmt">#First, I invent a variable (makes it easier for future i10n)</span>
|
||||
27: <span class="ruby-identifier">messages</span> = <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">Texts</span> <span class="ruby-comment cmt">#localized</span>
|
||||
28: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_minutes</span>
|
||||
29: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">1</span>
|
||||
30: <span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">distance_in_minutes</span><span class="ruby-operator">==</span><span class="ruby-value">0</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:less_than_a_minute</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:one_minute</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">include_seconds</span>
|
||||
31: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">distance_in_seconds</span>
|
||||
32: <span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">5</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">format</span>( <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:less_than_x_seconds</span>], <span class="ruby-value">5</span> )
|
||||
33: <span class="ruby-keyword kw">when</span> <span class="ruby-value">6</span><span class="ruby-operator">..</span><span class="ruby-value">10</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">format</span>( <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:less_than_x_seconds</span>], <span class="ruby-value">10</span> )
|
||||
34: <span class="ruby-keyword kw">when</span> <span class="ruby-value">11</span><span class="ruby-operator">..</span><span class="ruby-value">20</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">format</span>( <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:less_than_x_seconds</span>], <span class="ruby-value">20</span> )
|
||||
35: <span class="ruby-keyword kw">when</span> <span class="ruby-value">21</span><span class="ruby-operator">..</span><span class="ruby-value">40</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:half_a_minute</span>]
|
||||
36: <span class="ruby-keyword kw">when</span> <span class="ruby-value">41</span><span class="ruby-operator">..</span><span class="ruby-value">59</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:less_than_a_minute</span>]
|
||||
37: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:one_minute</span>]
|
||||
38: <span class="ruby-keyword kw">end</span>
|
||||
39:
|
||||
40: <span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span><span class="ruby-operator">..</span><span class="ruby-value">45</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">format</span>(<span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:x_minutes</span>], <span class="ruby-identifier">distance_in_minutes</span>)
|
||||
41: <span class="ruby-keyword kw">when</span> <span class="ruby-value">46</span><span class="ruby-operator">..</span><span class="ruby-value">90</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:one_hour</span>]
|
||||
42: <span class="ruby-keyword kw">when</span> <span class="ruby-value">90</span><span class="ruby-operator">..</span><span class="ruby-value">1440</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">format</span>( <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:x_hours</span>], (<span class="ruby-identifier">distance_in_minutes</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">60.0</span>).<span class="ruby-identifier">round</span> )
|
||||
43: <span class="ruby-keyword kw">when</span> <span class="ruby-value">1441</span><span class="ruby-operator">..</span><span class="ruby-value">2880</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:one_day</span>]
|
||||
44: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">format</span>( <span class="ruby-identifier">messages</span>[<span class="ruby-identifier">:x_days</span>], (<span class="ruby-identifier">distance_in_minutes</span> <span class="ruby-operator">/</span> <span class="ruby-value">1440</span>).<span class="ruby-identifier">round</span> )
|
||||
45: <span class="ruby-keyword kw">end</span>
|
||||
46: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000009" class="method-detail">
|
||||
<a name="M000009"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="#M000009" class="method-signature">
|
||||
<span class="method-name">localize_strftime</span><span class="method-args">(date='%d.%m.%Y', time='')</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
substitute all daynames and monthnames with localized names from RUtils
|
||||
plugin
|
||||
</p>
|
||||
<p><a class="source-toggle" href="#"
|
||||
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
||||
<div class="method-source-code" id="M000009-source">
|
||||
<pre>
|
||||
<span class="ruby-comment cmt"># File lib/localization_simplified.rb, line 10</span>
|
||||
10: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">localize_strftime</span>(<span class="ruby-identifier">date</span>=<span class="ruby-value str">'%d.%m.%Y'</span>, <span class="ruby-identifier">time</span>=<span class="ruby-value str">''</span>)
|
||||
11: <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%%/</span>, <span class="ruby-ivar">@@ignore</span>)
|
||||
12: <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%a/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">AbbrDaynames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">wday</span>])
|
||||
13: <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%A/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">Daynames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">wday</span>])
|
||||
14: <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%b/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">AbbrMonthnames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">mon</span>])
|
||||
15: <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/%B/</span>, <span class="ruby-constant">LocalizationSimplified</span><span class="ruby-operator">::</span><span class="ruby-constant">DateHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">Monthnames</span>[<span class="ruby-identifier">time</span>.<span class="ruby-identifier">mon</span>])
|
||||
16: <span class="ruby-identifier">date</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-ivar">@@ignore</span>, <span class="ruby-value str">'%%'</span>)
|
||||
17: <span class="ruby-keyword kw">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,376 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: LocalizationSimplified::ActiveRecord</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">LocalizationSimplified::ActiveRecord</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/lang_cf_rb.html">
|
||||
lib/lang_cf.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_chef_rb.html">
|
||||
lib/lang_chef.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_da_rb.html">
|
||||
lib/lang_da.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_de_rb.html">
|
||||
lib/lang_de.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_en_rb.html">
|
||||
lib/lang_en.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_es_rb.html">
|
||||
lib/lang_es.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fi_rb.html">
|
||||
lib/lang_fi.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr_rb.html">
|
||||
lib/lang_fr.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr__rb.html">
|
||||
lib/lang_fr_.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_nl_rb.html">
|
||||
lib/lang_nl.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_pirate_rb.html">
|
||||
lib/lang_pirate.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_se_rb.html">
|
||||
lib/lang_se.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_template_rb.html">
|
||||
lib/lang_template.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "n'est pas inclus dans la liste", :exclusion => "est réservé", :invalid => "est non valide", :confirmation => "ne correspond pas à la confirmation", :accepted => "doit être accepté", :empty => "ne peut pas être vide", :blank => "ne peut pas être laissé à blanc", :too_long => "dépasse la longueur permise (le maximum étant de %d caractères)", :too_short => "est trop court (le minimum étant de %d caractères)", :wrong_length => "n'est pas de la bonne longueur (doit être de %d caractères)", :taken => "as déjà été pris", :not_a_number => "n'est pas un nombre", #Jespers additions: :error_translation => "erreur", :error_header => "%s interdit d'enregistrer %s ", :error_subheader => "Il y a des erreurs dans les champs suivants : "</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "is nut inclooded in zee leest", :exclusion => "is reserfed", :invalid => "is infeleed", :confirmation => "duesn't metch cunffurmeshun", :accepted => "moost be-a eccepted", :empty => "cun't be-a impty", :blank => "ees reeequired",# alternate, formulation: "is required" :too_long => "is tuu lung (mexeemoom is %d cherecters)", :too_short => "is tuu shurt (meenimoom is %d cherecters)", :wrong_length => "is zee vrung lengt (shuoold be-a %d cherecters)", :taken => "hes elreedy beee tekee", :not_a_number => "is nut a noomber", #Jespers additions: :error_translation => "irrur", :error_header => "%s pruheebited thees %s frum beeeng sefed", :error_subheader => "Zeere-a vere-a prublems veet zee fullooeeng feeelds:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "er ikke med på listen", :exclusion => "er et reserveret ord", :invalid => "er ugyldig", :confirmation => "matcher ikke med bekræftelsen", :accepted => "skal accepteres", :empty => "kan ikke være tom", :blank => "skal udfyldes", :too_long => "er for langt (max er %d tegn)", :too_short => "er for kort (minimum er %d tegn)", :wrong_length => "har forkert længde (skal være %d tegn)", :taken => "er allerede taget", :not_a_number => "er ikke et tal", #Jespers additions: :error_translation => "fejl", :error_header => "%s forhindrede %s i at blive gemt", :error_subheader => "Problemer med følgende felter:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "ist nicht in Liste gültiger Optionen enthalten", :exclusion => "ist reserviert", :invalid => "ist ungültig", :confirmation => "entspricht nicht der Best<73>tigung", :accepted => "muß akzeptiert werden", :empty => "darf nicht leer sein", :blank => "darf nicht leer sein",# alternate, formulation: "is required" :too_long => "ist zu lang (höchstens %d Zeichen)", :too_short => "ist zu kurz (mindestens %d Zeichen)", :wrong_length => "hat eine falsche Länge (es sollten %d Zeichen sein)", :taken => "ist schon vergeben", :not_a_number => "ist keine Zahl", #Jespers additions: :error_translation => "Fehl", :error_header => "%s verhinderte dieser %s gespeichert werden", :error_subheader => "Es gab probleme mit dem folgenden:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "is not included in the list", :exclusion => "is reserved", :invalid => "is invalid", :confirmation => "doesn't match confirmation", :accepted => "must be accepted", :empty => "can't be empty", :blank => "can't be blank",# alternate, formulation: "is required" :too_long => "is too long (maximum is %d characters)", :too_short => "is too short (minimum is %d characters)", :wrong_length => "is the wrong length (should be %d characters)", :taken => "has already been taken", :not_a_number => "is not a number", #Jespers additions: :error_translation => "error", :error_header => "%s prohibited this %s from being saved", :error_subheader => "There were problems with the following fields:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "no está incluido en la lista", :exclusion => "está reservado", :invalid => "no es válido", :confirmation => "no coincide con la conformación", :accepted => "debe ser aceptado", :empty => "no puede estar vacío", :blank => "no puede estar en blanco",# alternate, formulation: "is required" :too_long => "es demasiado largo (el máximo es %d caracteres)", :too_short => "es demasiado cordo (el minimo es %d caracteres)", :wrong_length => "is the wrong length (should be %d characters)", :taken => "ya está ocupado", :not_a_number => "no es un número", #Jespers additions: :error_translation => "error", :error_header => "%s no permite guardar %s", :error_subheader => "Ha habido problemas con los siguientes campos:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "ei löydy listalta", :exclusion => "on varattu", :invalid => "on virheellinen", :confirmation => "ei vastaa vahvistusta", :accepted => "on hyväksyttävä", :empty => "ei voi olla tyhjä", :blank => "ei voi olla tyhjä", :too_long => "on liian pitkä (maksimi on %d merkkiä)", :too_short => "on liian lyhyt (minimi on %d merkkiä)", :wrong_length => "on väärän pituinen (oikea pituus %d merkkiä)", :taken => "on jo varattu", :not_a_number => "ei ole numero", #Jespers additions: :error_translation => "virhe", :error_header => "%s esti tämän %s tallentamisen", :error_subheader => "Seuraavat kentät aiheuttivat ongelmia:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "n'est pas inclut dans la liste", :exclusion => "est réservé", :invalid => "est invalide", :confirmation => "ne correspond pas à la confirmation", :accepted => "doit être accepté", :empty => "ne peut pas être vide", :blank => "ne peut pas être vierge",# alternate, formulation: "is required" :too_long => "est trop long (%d caractères maximum)", :too_short => "est trop court(%d caractères minimum)", :wrong_length => "n'est pas de la bonne longueur (devrait être de %d caractères)", :taken => "est déjà prit", :not_a_number => "n'est pas le nombre", #Jespers additions: :error_translation => "erreur", :error_header => "%s interdit ce %s d'être sauvegardé", :error_subheader => "Il y a des problèmes avec les champs suivants :"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "n'est pas inclus dans la liste", :exclusion => "est réservé", :invalid => "est non valide", :confirmation => "ne correspond pas à la confirmation", :accepted => "doit être accepté", :empty => "ne peut pas être vide", :blank => "ne peut pas être laissé à blanc", :too_long => "dépasse la longueur permise (le maximum étant de %d caractères)", :too_short => "est trop court (le minimum étant de %d caractères)", :wrong_length => "n'est pas de la bonne longueur (doit être de %d caractères)", :taken => "as déjà été pris", :not_a_number => "n'est pas un nombre", #Jespers additions: :error_translation => "erreur", :error_header => "%s interdit d'enregistrer %s ", :error_subheader => "Il y a des erreurs dans les champs suivants : "</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "zit niet in de lijst", :exclusion => "is gereserveerd", :invalid => "is ongeldig", :confirmation => "is niet hetzelfde als de verificatie", :accepted => "moet worden geaccepteerd", :empty => "mag niet leeg zijn", :blank => "mag niet blanko zijn",# alternate, formulation: "is required" :too_long => "is te land (maximum is %d karakters)", :too_short => "is te kort (minimum is %d karakters)", :wrong_length => "is de verkeerde lengte (dient %d karakters te zijn)", :taken => "is reeds in gebruik", :not_a_number => "is geen nummer", #Jespers additions: :error_translation => "fout", :error_header => "%s zorgen ervoor dat %s niet kan worden opgeslagen", :error_subheader => "Er zijn problemen met de volgende velden:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "be not included in the list, me hearty", :exclusion => "be reserrrrved", :invalid => "be innvalid, m hearty", :confirmation => "doesn't match confirmation", :accepted => "must be accepted, arrrrh!", :empty => "no nay ne'er be empty", :blank => "no nay be blank, ye scurvy dog!",# alternate, formulation: "is required" :too_long => "be too vastly in length (no more than %d characters or ye drivin' me nuts)", :too_short => "be way too short (at least %d characters or ye drivin' me nuts)", :wrong_length => "be the wrong length (should be %d characters)", :taken => "has already been taken", :not_a_number => "be not a number, matey", #Jespers additions: :error_translation => "errrorrr", :error_header => "Ohoy! %s prohibited ye %s from bein' saved", :error_subheader => "Turn the steering wheeel and corrrect these fields, arrrrh."</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "finns inte i listan", :exclusion => "Är reserverat", :invalid => "Är ogiltigt", :confirmation => "stämmer inte övererens", :accepted => "måste vara accepterad", :empty => "för ej vara tom", :blank => "för ej vara blank", :too_long => "Är för lång (maximum är %d tecken)", :too_short => "Är för kort (minimum är %d tecken)", :wrong_length => "har fel längd (ska vara %d tecken)", :taken => "har redan tagits", :not_a_number => "Är ej ett nummer", #Jespers additions: :error_translation => "fel", :error_header => "%s förhindrade %s från at sparse", :error_subheader => "Problemar met dissa felterne:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ErrorMessages</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :inclusion => "is not included in the list", :exclusion => "is reserved", :invalid => "is invalid", :confirmation => "doesn't match confirmation", :accepted => "must be accepted", :empty => "can't be empty", :blank => "can't be blank",# alternate, formulation: "is required" :too_long => "is too long (maximum is %d characters)", :too_short => "is too short (minimum is %d characters)", :wrong_length => "is the wrong length (should be %d characters)", :taken => "has already been taken", :not_a_number => "is not a number", #Jespers additions: :error_translation => "error", :error_header => "%s prohibited this %s from being saved", :error_subheader => "There were problems with the following fields:"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
ErrorMessages to override default messages in
|
||||
+ActiveRecord::Errors::@@default_error_messages+ This plugin also replaces
|
||||
hardcoded 3 text messages :error_translation is inflected using the Rails
|
||||
inflector.
|
||||
|
||||
<p>
|
||||
Remember to modify the Inflector with your localized translation of
|
||||
"error" and "errors" in the bottom of this file
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,304 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: LocalizationSimplified::ArrayHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">LocalizationSimplified::ArrayHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/lang_cf_rb.html">
|
||||
lib/lang_cf.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_chef_rb.html">
|
||||
lib/lang_chef.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_da_rb.html">
|
||||
lib/lang_da.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_de_rb.html">
|
||||
lib/lang_de.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_en_rb.html">
|
||||
lib/lang_en.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_es_rb.html">
|
||||
lib/lang_es.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fi_rb.html">
|
||||
lib/lang_fi.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr_rb.html">
|
||||
lib/lang_fr.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr__rb.html">
|
||||
lib/lang_fr_.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_nl_rb.html">
|
||||
lib/lang_nl.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_pirate_rb.html">
|
||||
lib/lang_pirate.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_se_rb.html">
|
||||
lib/lang_se.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_template_rb.html">
|
||||
lib/lang_template.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'et', :skip_last_comma => false</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'eend', :skip_last_comma => false</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'og', :skip_last_comma => true</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'und', :skip_last_comma => true</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'and', :skip_last_comma => false</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'y', :skip_last_comma => true</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'ja', :skip_last_comma => true</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'et', :skip_last_comma => false</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'et', :skip_last_comma => false</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'en', :skip_last_comma => false</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'and', :skip_last_comma => false</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'och', :skip_last_comma => true</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">ToSentenceTexts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :connector => 'and', :skip_last_comma => false</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Modifies +<a href="../Array.html#M000002">Array#to_sentence</a>()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274">api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/Conversions.html#M000274</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,969 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: LocalizationSimplified::DateHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">LocalizationSimplified::DateHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/lang_cf_rb.html">
|
||||
lib/lang_cf.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_chef_rb.html">
|
||||
lib/lang_chef.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_da_rb.html">
|
||||
lib/lang_da.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_de_rb.html">
|
||||
lib/lang_de.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_en_rb.html">
|
||||
lib/lang_en.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_es_rb.html">
|
||||
lib/lang_es.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fi_rb.html">
|
||||
lib/lang_fi.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr_rb.html">
|
||||
lib/lang_fr.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr__rb.html">
|
||||
lib/lang_fr_.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_nl_rb.html">
|
||||
lib/lang_nl.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_pirate_rb.html">
|
||||
lib/lang_pirate.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_se_rb.html">
|
||||
lib/lang_se.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_template_rb.html">
|
||||
lib/lang_template.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Texts to override +distance_of_time_in_words()+
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "moins de %d secondes", :half_a_minute => "30 secondes", :less_than_a_minute => "moins d'une minute", :one_minute => "1 minute", :x_minutes => "%d minutes", :one_hour => "environ 1 heure", :x_hours => "environ %d heures", :one_day => "1 jour", :x_days => "%d jours"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Fev Mar Avr Mai Jun Jui Aou Sep Oct Nov Dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Dim Lun Mar Mer Jeu Ven Sam}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:year, :month, :day]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "less thun %d secunds", :half_a_minute => "helff a meenoote-a", :less_than_a_minute => "less thun a meenoote-a", :one_minute => "1 meenoote-a", :x_minutes => "%d meenootes", :one_hour => "ebuoot 1 huoor", :x_hours => "ebuoot %d huoors", :one_day => "1 dey", :x_days => "%d deys"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Junooery Febrooery Merch Epreel Mey Joone-a Jooly Oogoost Seeptembooor Ooctuber Nufember Deezember}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jun Feb Mer Epr Mey Joon Jool Oog Sep Ooct Nuf Deez}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Soondey Mundey Tooesdey Vednesdey Thoorsdey Freedey Setoordey}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Soon Mun Tooe-a Ved Thoo Free Set}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:year, :month, :day]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "under %d sekunder", :half_a_minute => "et halvt minut", :less_than_a_minute => "under et minut", :one_minute => "1 minut", :x_minutes => "%d minutter", :one_hour => "omkring en time", :x_hours => "omkring %d timer", :one_day => "1 dag", :x_days => "%d dage"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{januar februar marts april maj juni juli august september oktober november december}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{jan feb mar apr maj jun jul aug sep okt nov dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{søndag mandag tirsdag onsdag torsdag fredag lørdag}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{søn man tir ons tors fre lør}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%e %b", :long => "%e %B, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%A d. %d %B %Y %H:%M", #no timezone :short => "%d. %b %H:%M", :long => "%d. %B %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:day, :month, :year]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "weniger als %d Sekunden", :half_a_minute => "hälfte ein Minute", :less_than_a_minute => "weniger als ein Minute", :one_minute => "1 minute", :x_minutes => "%d Minuten", :one_hour => "ungefähr 1 Stunden", :x_hours => "ungefähr %d Stunden", :one_day => "1 Tag", :x_days => "%d Tage"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Januar Februar Märtz April Mai Juni Juli August September Oktober November Dezember}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Feb Mrz Apr Mai Jun Jul Aug Sep Oct Nov Dez}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Sontag Montag Dienstag Mittwoch Donnerstag Freitag Samstag}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Son Mon Die Mit Don Fre Sam}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:day, :month, :year]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "less than %d seconds", :half_a_minute => "half a minute", :less_than_a_minute => "less than a minute", :one_minute => "1 minute", :x_minutes => "%d minutes", :one_hour => "about 1 hour", :x_hours => "about %d hours", :one_day => "1 day", :x_days => "%d days"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{January February March April May June July August September October November December}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Sunday Monday Tuesday Wednesday Thursday Friday Saturday}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Sun Mon Tue Wed Thu Fri Sat}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:year, :month, :day]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "menos de %d segundos", :half_a_minute => "medio minuto", :less_than_a_minute => "menos de un minuto", :one_minute => "1 minuto", :x_minutes => "%d minutos", :one_hour => "sobre una hora", :x_hours => "sobre %d horas", :one_day => "un día", :x_days => "%d días"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{ene feb mar abr may jun jul ago sep oct nov dic}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{domingo lunes martes miércoles jueves viernes sábado}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{dom lun mar mié jue vie sáb }</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:day, :month, :year]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "alle %d sekuntia", :half_a_minute => "puoli minuuttia", :less_than_a_minute => "alle minuutti", :one_minute => "1 minuutti", :x_minutes => "%d minuuttia", :one_hour => "noin tunti", :x_hours => "noin %d tuntia", :one_day => "1 päivä", :x_days => "%d päivää"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{tammikuu helmikuu maaliskuu huhtikuu toukokuu kesäkuu heinäkuu elokuu syyskuu lokakuu marraskuu joulukuu}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{tammi helmi maalis huhti touko kesä heinä elo syys loka marras joulu}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{sunnuntai maanantai tiistai keskiviikko torstai perjantai lauantai}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{su ma ti ke to pe la}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%e.%m.%Y", :short => "%d.%m.", :long => "%e. %Bta %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a %Bn %e. %H:%M:%S %Z %Y", :short => "%d.%m.%Y %H:%M", :long => "%a %e. %Bta %Y %T"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:day, :month, :year]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "moins de %d secondes", :half_a_minute => "une demi-minute", :less_than_a_minute => "moins d'une minute", :one_minute => "1 minute", :x_minutes => "%d minutes", :one_hour => "à peut près 1 heure", :x_hours => "à peu près %d heures", :one_day => "1 jour", :x_days => "%d jours"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Decembre}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Fev Mar Avr Mai Jui Jul Aoû Sep Oct Nov Dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Dim Lun Mar Mer Jeu Ven Sam}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:year, :month, :day]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "moins de %d secondes", :half_a_minute => "30 secondes", :less_than_a_minute => "moins d'une minute", :one_minute => "1 minute", :x_minutes => "%d minutes", :one_hour => "environ 1 heure", :x_hours => "environ %d heures", :one_day => "1 jour", :x_days => "%d jours"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Janvier Février Mars Avril Mai Juin Juillet Août Septembre Octobre Novembre Décembre}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Fev Mar Avr Mai Jun Jui Aou Sep Oct Nov Dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Dim Lun Mar Mer Jeu Ven Sam}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:year, :month, :day]</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "minder dan %d seconden", :half_a_minute => "een halve minuut", :less_than_a_minute => "minder dan een halve minuut", :one_minute => "1 minuut", :x_minutes => "%d minuten", :one_hour => "ongeveer 1 uur", :x_hours => "ongeveer %d uur", :one_day => "1 dag", :x_days => "%d dagen"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Januari Februari Maart April Mei Juni Juli Augustus September October November December}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Feb Mar Apr Mei Jun Jul Aug Sep Oct Nov Dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Zondag Maandag Dinsdag Woensdag Donderdag Vrijdag Zaterdag}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Zo Ma Di Wo Do Vr Za}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:day, :month, :year]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "less than %d seconds", :half_a_minute => "half arrr minute", :less_than_a_minute => "less than arrr minute", :one_minute => "1 minute ye landlubber", :x_minutes => "%d minutes accounted ferrrr", :one_hour => "about one hourrr and a bottle of rum", :x_hours => "about %d hourrrs and a bottle of rum", :one_day => "1 day and a dead mans chest arrr", :x_days => "%d days and a ship full of hornpipes"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{January February March April May June July August September October November December}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Sunday Monday Tuesday Wednesday Thurrrrrrsday Frrriday Saturrrrday}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Sun Mon Tue Wed Thurrrr Frri Sat}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%A, %d %b %Y %H:%M:%S", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:year, :month, :day]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "mindre än %d sekunder", :half_a_minute => "en halv minut", :less_than_a_minute => "mindre än en minut", :one_minute => "1 minut", :x_minutes => "%d minutter", :one_hour => "ungefär 1 timma", :x_hours => "ungefär %d timmar", :one_day => "1 dygn", :x_days => "%d dygn"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{januari februari mars april maj juni juli augusti september oktober november december}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Rails uses Month names in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{jan feb mar apr maj jun jul aug sep okt nov dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{söndag måndag tisdag onsdag torsdag fredag lördag}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{sön mån tis ons tors fre lör}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:day, :month, :year]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Texts</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :less_than_x_seconds => "less than %d seconds", :half_a_minute => "half a minute", :less_than_a_minute => "less than a minute", :one_minute => "1 minute", :x_minutes => "%d minutes", :one_hour => "about 1 hour", :x_hours => "about %d hours", :one_day => "1 day", :x_days => "%d days"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Monthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{January February March April May June July August September October November December}</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Monthnames used by Rails in <a href="../Date.html">Date</a> and time select
|
||||
boxes (<tt>date_select</tt> and <tt>datetime_select</tt> ) Currently (as of
|
||||
version 1.1.6), Rails doesn’t use daynames
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrMonthnames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">[nil] + %w{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">Daynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Sunday Monday Tuesday Wednesday Thursday Friday Saturday}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">AbbrDaynames</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">%w{Sun Mon Tue Wed Thu Fri Sat}</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%Y-%m-%d", :short => "%b %e", :long => "%B %e, %Y"</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
<a href="../Date.html">Date</a> and time format syntax explained in <a
|
||||
href="http://www.rubycentral.com/ref/ref_c_time.html#strftime">www.rubycentral.com/ref/ref_c_time.html#strftime</a>
|
||||
These are sent to strftime that Ruby’s date and time handlers use
|
||||
internally Same options as php (that has a better list: <a
|
||||
href="http://www.php.net/strftime">www.php.net/strftime</a> )
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">TimeFormats</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :default => "%a, %d %b %Y %H:%M:%S %z", :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M"</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">DateSelectOrder</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :order => [:year, :month, :day]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
Set the order of <tt>date_select</tt> and <tt>datetime_select</tt> boxes
|
||||
Note that at present, the current Rails version only supports ordering of
|
||||
date_select boxes
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,304 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: LocalizationSimplified::NumberHelper</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">LocalizationSimplified::NumberHelper</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/lib/lang_cf_rb.html">
|
||||
lib/lang_cf.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_chef_rb.html">
|
||||
lib/lang_chef.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_da_rb.html">
|
||||
lib/lang_da.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_de_rb.html">
|
||||
lib/lang_de.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_en_rb.html">
|
||||
lib/lang_en.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_es_rb.html">
|
||||
lib/lang_es.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fi_rb.html">
|
||||
lib/lang_fi.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr_rb.html">
|
||||
lib/lang_fr.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_fr__rb.html">
|
||||
lib/lang_fr_.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_nl_rb.html">
|
||||
lib/lang_nl.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_pirate_rb.html">
|
||||
lib/lang_pirate.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_se_rb.html">
|
||||
lib/lang_se.rb
|
||||
</a>
|
||||
<br />
|
||||
<a href="../../files/lib/lang_template_rb.html">
|
||||
lib/lang_template.rb
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "$", :separator => ".", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "$", :separator => ".", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "kr. ", :separator => ",", #unit separator (between integer part and fraction part) :delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567 :order => [:number, :unit]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "€", :separator => ",", #unit separator (between integer part and fraction part) :delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "$", :separator => ".", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "€", :separator => ",", #unit separator (between integer part and fraction part) :delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "€", :separator => " ", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "€", :separator => ".", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "$", :separator => ".", :delimiter => ",", :order => nil</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "€", :separator => ".", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "pieces o' silver", :separator => ".", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "kr. ", :separator => ",", #unit separator (between integer part and fraction part) :delimiter => ".", #delimiter between each group of thousands. Example: 1.234.567 :order => [:number, :unit]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">CurrencyOptions</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">{ :unit => "$", :separator => ".", #unit separator (between integer part and fraction part) :delimiter => ",", #delimiter between each group of thousands. Example: 1.234.567 :order => [:unit, :number]</td>
|
||||
<td width="3em"> </td>
|
||||
<td class="context-item-desc">
|
||||
CurrencyOptions are used as default for +Number#to_currency()+ <a
|
||||
href="http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449">api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000449</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue