Initial commit of foodsoft 2
This commit is contained in:
commit
5b9a7e05df
657 changed files with 70444 additions and 0 deletions
118
vendor/plugins/l10n-simplified-0.8/lib/lang_cf.rb
vendored
Executable file
118
vendor/plugins/l10n-simplified-0.8/lib/lang_cf.rb
vendored
Executable file
|
|
@ -0,0 +1,118 @@
|
|||
# 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
Executable file
119
vendor/plugins/l10n-simplified-0.8/lib/lang_chef.rb
vendored
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
# 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
Executable file
117
vendor/plugins/l10n-simplified-0.8/lib/lang_da.rb
vendored
Executable file
|
|
@ -0,0 +1,117 @@
|
|||
# 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
Executable file
117
vendor/plugins/l10n-simplified-0.8/lib/lang_de.rb
vendored
Executable file
|
|
@ -0,0 +1,117 @@
|
|||
# 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
Executable file
119
vendor/plugins/l10n-simplified-0.8/lib/lang_en.rb
vendored
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
# 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
Executable file
115
vendor/plugins/l10n-simplified-0.8/lib/lang_es.rb
vendored
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
# 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
Executable file
120
vendor/plugins/l10n-simplified-0.8/lib/lang_es_ar.rb
vendored
Executable file
|
|
@ -0,0 +1,120 @@
|
|||
# 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
Executable file
119
vendor/plugins/l10n-simplified-0.8/lib/lang_fi.rb
vendored
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
# 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
Executable file
118
vendor/plugins/l10n-simplified-0.8/lib/lang_fr.rb
vendored
Executable file
|
|
@ -0,0 +1,118 @@
|
|||
# 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
Executable file
120
vendor/plugins/l10n-simplified-0.8/lib/lang_it.rb
vendored
Executable file
|
|
@ -0,0 +1,120 @@
|
|||
# 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
Executable file
119
vendor/plugins/l10n-simplified-0.8/lib/lang_ko.rb
vendored
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
# 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
Executable file
115
vendor/plugins/l10n-simplified-0.8/lib/lang_nl.rb
vendored
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
# 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
|
||||
119
vendor/plugins/l10n-simplified-0.8/lib/lang_pirate.rb
vendored
Executable file
119
vendor/plugins/l10n-simplified-0.8/lib/lang_pirate.rb
vendored
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
# 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
Executable file
116
vendor/plugins/l10n-simplified-0.8/lib/lang_se.rb
vendored
Executable file
|
|
@ -0,0 +1,116 @@
|
|||
# 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
|
||||
229
vendor/plugins/l10n-simplified-0.8/lib/localization_simplified.rb
vendored
Executable file
229
vendor/plugins/l10n-simplified-0.8/lib/localization_simplified.rb
vendored
Executable file
|
|
@ -0,0 +1,229 @@
|
|||
# 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue