aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAlban Peignier2012-03-11 14:59:34 +0100
committerAlban Peignier2012-03-11 15:06:12 +0100
commitda9830bbeac8b124f8065ece1aebfd482b52a57b (patch)
tree862dcd15ba1c958e1bead25a08522cc3c646ec6a /config
parentdc8a6f7f9182996ea3f39986b45c3a71927a8e4a (diff)
downloadchouette-core-da9830bbeac8b124f8065ece1aebfd482b52a57b.tar.bz2
Complete a first i18n support
Diffstat (limited to 'config')
-rw-r--r--config/initializers/inflections.rb7
-rw-r--r--config/initializers/ninoxe.rb21
-rw-r--r--config/locales/actions.yml14
-rw-r--r--config/locales/lines.yml22
-rw-r--r--config/locales/networks.yml2
-rw-r--r--config/locales/referentials.yml28
-rw-r--r--config/locales/will_paginate.yml18
7 files changed, 83 insertions, 29 deletions
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index 9e8b0131f..e9642c49c 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -1,10 +1,13 @@
+# -*- coding: undecided -*-
# 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|
+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
+ inflect.irregular 'réseau', 'réseaux'
+end
+
diff --git a/config/initializers/ninoxe.rb b/config/initializers/ninoxe.rb
index 3c26e41f4..c9b6085a1 100644
--- a/config/initializers/ninoxe.rb
+++ b/config/initializers/ninoxe.rb
@@ -1,36 +1,25 @@
Chouette::ActiveRecord.establish_chouette_connection = false
-
class Chouette::Line
def self.model_name
- name = "Line"
- def name.name
- self
- end
- ActiveModel::Name.new name
+ ActiveModel::Name.new Chouette::Line, Chouette, "Line"
end
end
class Chouette::Network
+
def self.model_name
- name = "Network"
- def name.name
- self
- end
- ActiveModel::Name.new name
+ ActiveModel::Name.new Chouette::Network, Chouette, "Network"
end
end
class Chouette::Company
+
def self.model_name
- name = "Company"
- def name.name
- self
- end
- ActiveModel::Name.new name
+ ActiveModel::Name.new Chouette::Company, Chouette, "Company"
end
end
diff --git a/config/locales/actions.yml b/config/locales/actions.yml
new file mode 100644
index 000000000..e6e4687f5
--- /dev/null
+++ b/config/locales/actions.yml
@@ -0,0 +1,14 @@
+en:
+ actions:
+ edit: Edit
+ destroy: Destroy
+ search: Search
+ or: or
+ cancel: cancel
+fr:
+ actions:
+ edit: Modifier
+ destroy: Supprimer
+ search: Chercher
+ or: ou
+ cancel: annuler \ No newline at end of file
diff --git a/config/locales/lines.yml b/config/locales/lines.yml
index f7b9d55df..447d61920 100644
--- a/config/locales/lines.yml
+++ b/config/locales/lines.yml
@@ -8,12 +8,17 @@ en:
new:
title: "Add a new line"
edit:
- title: "Update line"
+ title: "Update line %{line}"
show:
- title: "Line"
+ title: "Line %{line}"
+ index:
+ title: Lines
+ name_or_number: "Name or number"
+ selection: Selection
+ selection_all: All
activerecord:
models:
- line: Lignes
+ line: Line
attributes:
line:
network: "Network"
@@ -21,10 +26,10 @@ en:
registration_number: "Registration number"
name: "Name"
published_name: "Public name"
- number: "NUmber"
+ number: "Number"
transport_mode_name: "Transport mode"
comment: "Comments"
- object_id: Neptune identifier
+ objectid: Neptune identifier
object_version: Version
creation_time: Created on
creator_id: Created by
@@ -43,10 +48,13 @@ fr:
show:
title: Ligne %{line}
index:
+ name_or_number: "Nom ou indice"
title: Lignes
+ selection: Sélection
+ selection_all: Tous
activerecord:
models:
- line: Lignes
+ line: Ligne
attributes:
line:
network: "Réseau"
@@ -57,7 +65,7 @@ fr:
number: "Indice"
transport_mode_name: "Mode de transport"
comment: "Commentaire"
- object_id: "Identifiant Neptune"
+ objectid: "Identifiant Neptune"
object_version: "Version"
creation_time: "Créé le"
creator_id: "Créé par"
diff --git a/config/locales/networks.yml b/config/locales/networks.yml
index 1a555abc3..1ca90b35e 100644
--- a/config/locales/networks.yml
+++ b/config/locales/networks.yml
@@ -8,7 +8,7 @@ en:
new:
title: "Add a new network"
edit:
- title: "Update network"
+ title: "Update network %{network}"
show:
title: "Network"
index:
diff --git a/config/locales/referentials.yml b/config/locales/referentials.yml
index 9a6c0900f..962af34fb 100644
--- a/config/locales/referentials.yml
+++ b/config/locales/referentials.yml
@@ -1,3 +1,25 @@
+en:
+ referentials:
+ edit:
+ title: "Edit the referentiel"
+ show:
+ title: Referential
+ new:
+ title: Create a new referential
+ submit: "Create a referential"
+ actions:
+ new: Add a referential
+ destroy_confirm: "Do you confirm to destroy this referential ?"
+ destroy: Destroy this referential
+ edit: Edit this referential
+ activerecord:
+ models:
+ referential: Referential
+ attributes:
+ referential:
+ name: Name
+ slug: Code
+
fr:
referentials:
edit:
@@ -9,9 +31,9 @@ fr:
submit: "Créer un référentiel"
actions:
new: Ajouter un référentiel
- destroy_confirm: "Etes vous sûr de vouloir supprimer le référentiel ?"
- destroy: Supprimer
- edit: Modifier
+ destroy_confirm: "Etes vous sûr de vouloir supprimer ce référentiel ?"
+ destroy: Supprimer ce référentiel
+ edit: Modifier ce référentiel
activerecord:
models:
referential: Référentiel
diff --git a/config/locales/will_paginate.yml b/config/locales/will_paginate.yml
new file mode 100644
index 000000000..e03aca81c
--- /dev/null
+++ b/config/locales/will_paginate.yml
@@ -0,0 +1,18 @@
+fr:
+ will_paginate:
+ previous_label: "← Précédent"
+ next_label: "Suivant →"
+ page_gap: "…"
+
+ page_entries_info:
+ single_page:
+ zero: "Aucun(e) %{model} trouvé(e)"
+ one: "1 %{model} affiché(e)"
+ other: "%{count} %{model} affiché(e)s"
+ single_page_html:
+ zero: "Aucun(e) %{model} trouvé(e)"
+ one: "<b>1</b> %{model} affiché(e)s"
+ other: "<b>%{count}</b> %{model} affiché(e)s"
+
+ multi_page: "%{model} %{from} - %{to} sur %{count} au total"
+ multi_page_html: "%{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> sur <b>%{count}</b> au total"