radiant-french_language_pack-extension 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README ADDED
@@ -0,0 +1,3 @@
1
+ = I18n Fr
2
+
3
+ Description goes here
data/Rakefile ADDED
@@ -0,0 +1,123 @@
1
+ # I think this is the one that should be moved to the extension Rakefile template
2
+
3
+ # In rails 1.2, plugins aren't available in the path until they're loaded.
4
+ # Check to see if the rspec plugin is installed first and require
5
+ # it if it is. If not, use the gem version.
6
+
7
+ # Determine where the RSpec plugin is by loading the boot
8
+ unless defined? RADIANT_ROOT
9
+ ENV["RAILS_ENV"] = "test"
10
+ case
11
+ when ENV["RADIANT_ENV_FILE"]
12
+ require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
13
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
14
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
15
+ else
16
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
17
+ end
18
+ end
19
+
20
+ require 'rake'
21
+ require 'rake/rdoctask'
22
+ require 'rake/testtask'
23
+
24
+ rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
25
+ $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
26
+ require 'spec/rake/spectask'
27
+ require 'cucumber'
28
+ require 'cucumber/rake/task'
29
+
30
+ # Cleanup the RADIANT_ROOT constant so specs will load the environment
31
+ Object.send(:remove_const, :RADIANT_ROOT)
32
+
33
+ extension_root = File.expand_path(File.dirname(__FILE__))
34
+
35
+ task :default => :spec
36
+ task :stats => "spec:statsetup"
37
+
38
+ desc "Run all specs in spec directory"
39
+ Spec::Rake::SpecTask.new(:spec) do |t|
40
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
41
+ t.spec_files = FileList['spec/**/*_spec.rb']
42
+ end
43
+
44
+ task :features => 'spec:integration'
45
+
46
+ namespace :spec do
47
+ desc "Run all specs in spec directory with RCov"
48
+ Spec::Rake::SpecTask.new(:rcov) do |t|
49
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
50
+ t.spec_files = FileList['spec/**/*_spec.rb']
51
+ t.rcov = true
52
+ t.rcov_opts = ['--exclude', 'spec', '--rails']
53
+ end
54
+
55
+ desc "Print Specdoc for all specs"
56
+ Spec::Rake::SpecTask.new(:doc) do |t|
57
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
58
+ t.spec_files = FileList['spec/**/*_spec.rb']
59
+ end
60
+
61
+ [:models, :controllers, :views, :helpers].each do |sub|
62
+ desc "Run the specs under spec/#{sub}"
63
+ Spec::Rake::SpecTask.new(sub) do |t|
64
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
65
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
66
+ end
67
+ end
68
+
69
+ desc "Run the Cucumber features"
70
+ Cucumber::Rake::Task.new(:integration) do |t|
71
+ t.fork = true
72
+ t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
73
+ # t.feature_pattern = "#{extension_root}/features/**/*.feature"
74
+ t.profile = "default"
75
+ end
76
+
77
+ # Setup specs for stats
78
+ task :statsetup do
79
+ require 'code_statistics'
80
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
81
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views)
82
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
83
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
84
+ ::CodeStatistics::TEST_TYPES << "Model specs"
85
+ ::CodeStatistics::TEST_TYPES << "View specs"
86
+ ::CodeStatistics::TEST_TYPES << "Controller specs"
87
+ ::CodeStatistics::TEST_TYPES << "Helper specs"
88
+ ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
89
+ end
90
+
91
+ namespace :db do
92
+ namespace :fixtures do
93
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
94
+ task :load => :environment do
95
+ require 'active_record/fixtures'
96
+ ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
97
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
98
+ Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
104
+
105
+ desc 'Generate documentation for the fr extension.'
106
+ Rake::RDocTask.new(:rdoc) do |rdoc|
107
+ rdoc.rdoc_dir = 'rdoc'
108
+ rdoc.title = 'I18nFrExtension'
109
+ rdoc.options << '--line-numbers' << '--inline-source'
110
+ rdoc.rdoc_files.include('README')
111
+ rdoc.rdoc_files.include('lib/**/*.rb')
112
+ end
113
+
114
+ # For extensions that are in transition
115
+ desc 'Test the fr extension.'
116
+ Rake::TestTask.new(:test) do |t|
117
+ t.libs << 'lib'
118
+ t.pattern = 'test/**/*_test.rb'
119
+ t.verbose = true
120
+ end
121
+
122
+ # Load any custom rakefiles for extension
123
+ Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
@@ -0,0 +1,234 @@
1
+ ---
2
+ fr:
3
+ account: 'Account'
4
+ activerecord:
5
+ errors:
6
+ messages:
7
+ blank: 'obligatoire' # required
8
+ invalid: 'invalid format' #invalid_format
9
+ not_a_number: 'doit &ecirc;tre un nombre' # must be number
10
+ not_a_page: "il doit exister une page a cette adresse" # there must be a page at this address
11
+ not_permitted: 'doit &ecirc;tre une des valeurs permitt&eacute;'
12
+ taken: 'nom d&eacute;j&agrave; utilis&eacute;' # name_in_use
13
+ too_long: '{{count}}-caract&egrave;res maximum' # character_limit
14
+ too_short: '{{count}}-caract&egrave;res minimum' # character_minimum
15
+ models:
16
+ page:
17
+ attributes:
18
+ slug:
19
+ taken: "jeton (slug) d&eacute;j&agrave; utilis&eacute; pour l'enfant de ce parent" # slug_in_use
20
+ user:
21
+ attributes:
22
+ email:
23
+ invalid: 'adresse courriel non valide' # invalid_email
24
+ login:
25
+ taken: 'identification d&eacute;j&agrave; utilis&eacute;e' # login already in use
26
+ password:
27
+ confirmation: 'doit &ecirc;tre identique &agrave; sa confirmation' # password_confirmation
28
+ add_child: 'Ajouter Page'
29
+ add_field: 'Ajouter Field'
30
+ add_part: 'Ajouter une Partie de Page'
31
+ add_tab: "Ajouter un Onglet"
32
+ admin: "Administrateur"
33
+ available_tags: "Tags disponibles"
34
+ available_tags_for: 'Tags disponibles pour {{name}}'
35
+ body: "Body"
36
+ breadcrumb: "Fil d'ariane"
37
+ buttons:
38
+ create: "Cr&eacute;er {{name}}"
39
+ save_and_continue: "Enregistrer et continuer"
40
+ save_changes: "Enregistrer les modifications"
41
+ cancel: "Annuler"
42
+ change: 'Changer'
43
+ close: "Fermer"
44
+ config:
45
+ admin:
46
+ title: 'admin header title'
47
+ defaults:
48
+ locale: 'langage de default'
49
+ page:
50
+ fields: "page fields"
51
+ filter: "page filter"
52
+ parts: "page parts"
53
+ status: "page status"
54
+ dev:
55
+ host: "dev site domain"
56
+ local:
57
+ timezone: "local timezone"
58
+ site:
59
+ title: "titre du site"
60
+ host: "nom de domaine du site"
61
+ user:
62
+ allow_password_reset?: "allow password reset"
63
+ content: 'Contenu'
64
+ content_type: "Type&#8209;Contenu"
65
+ creating_status: 'En train de cr&eacute;er {{model}}&#8230;'
66
+ date:
67
+ abbr_day_names: [Di, Lu, Ma, Me, Je, Ve, Sa]
68
+ abbr_month_names: [~, Jan, Fev, Mar, Avr, Mai, Jun, Jul, Aou, Sep, Oct, Nov, Dec]
69
+ day_names: [Dimanche, Lundi, Mardi, Mercredi, Jeudi, Vendredi, Samedi]
70
+ formats:
71
+ default: "%d.%m.%Y"
72
+ long: "%e. %B %Y"
73
+ only_day: "%e"
74
+ short: "%e. %b"
75
+ month_names: [~, Janvier, F&eacute;vrier, Mars, Avril, Mai, Juin, Juillet, Ao&ucirc;t, Septembre, Octobre, Novembre, Decembre]
76
+ order: [:day, :month, :year]
77
+ delete_layout: "Supprimer Layout"
78
+ delete_pages: "Supprimer {{pages}}"
79
+ delete_snippet: 'Supprimer Snippet'
80
+ delete_user: 'Supprimer Utilisateur'
81
+ description: 'Description'
82
+ design: 'Design'
83
+ designer: 'Designer'
84
+ draft: "Brouillon"
85
+ edit: 'Modifier'
86
+ edit_configuration: "Modifier configuration"
87
+ edit_layout: "Modifier Layout"
88
+ edit_page: "Modifier Page"
89
+ edit_preferences: "Modifier vos pr&eacute;f&eacute;rences"
90
+ edit_settings: 'Modifier param&egrave;tres'
91
+ edit_snippet: "Modifier Snippet"
92
+ edit_user: "Modifier Utilisateur"
93
+ email_address: 'Adresse E-mail'
94
+ extension: "Extension"
95
+ extensions: "Extensions"
96
+ filter: "Filtre"
97
+ hidden: "Cach&eacute;"
98
+ hide: 'Masquer'
99
+ keywords: 'Mots cl&eacute;s'
100
+ language: "Langage"
101
+ layout: "Layout"
102
+ layouts: "Layouts"
103
+ log_out: "D&eacute;connexion"
104
+ logged_in_as: 'Connect&eacute; en tant que'
105
+ login: "Login"
106
+ modify: "Modifier"
107
+ more: "Plus"
108
+ more_info: "Plus d'information"
109
+ name: "Nom"
110
+ new_homepage: "Nouvelle Page d'Accueil"
111
+ new_layout: "Ajouter Layout"
112
+ new_page: "Nouvelle Page"
113
+ new_password: 'Nouveau Mot de passe'
114
+ new_snippet: "Ajouter un Snippet"
115
+ new_user: "Ajouter un Utilisateur"
116
+ 'no': 'Non'
117
+ no_layouts: 'Aucun Layout'
118
+ no_pages: "Aucune Page"
119
+ no_snippets: 'Aucun Snippet'
120
+ notes: "Notes"
121
+ optional: "En option"
122
+ or: "ou"
123
+ page: "Page"
124
+ page_hierarchy: 'Hi&eacute;rarchie de les pages du site'
125
+ page_page: 'Page Part'
126
+ page_title: "Titre"
127
+ page_type: "Type Page"
128
+ pages: "Pages"
129
+ pages_controller:
130
+ removed_many: "Les pages ont &eacute;t&eacute; correctement retir&eacute;es du site."
131
+ removed_one: "La page a &eacute;t&eacute; correctement retir&eacute;e du site."
132
+ saved: "Votre page enregistr&eacute;e ci-dessous."
133
+ password: "Mot de passe"
134
+ password_confirmation: "Confirmer le mot de passe"
135
+ personal: 'Profile'
136
+ personal_preferences: 'Pr&eacute;f&eacute;rences du Profile'
137
+ please_login: 'SVP Identifiez-vous'
138
+ powered_by: 'Powered by'
139
+ preferences: "Pr&eacute;f&eacute;rences"
140
+ preferences_controller:
141
+ error_updating: "Une erreur a &eacute;t&eacute; d&eacute;tect&eacute;e pendant la modification de vos pr&eacute;f&eacute;rences."
142
+ updated: "Vos pr&eacute;f&eacute;rences ont &eacute;t&eacute; modifi&eacute;es."
143
+ preview: 'Preview'
144
+ published: "Publi&eacute;"
145
+ published_at: "Publi&eacute; le"
146
+ published_on: "Publi&eacute; le"
147
+ reference: "R&eacute;f&eacute;rence"
148
+ remember_me: "Conserver mes informations"
149
+ remember_me_in_this_browser: 'Se souvenir de moi dans ce browser'
150
+ remove: 'Supprimer'
151
+ remove_field: 'Supprimer le field'
152
+ remove_layout: "Supprimer le Layout"
153
+ remove_page: 'Supprimer la Page'
154
+ remove_pages: "Supprimer les {{pages}}"
155
+ remove_snippet: 'Supprimer le Snippet'
156
+ remove_tab: "Supprimer l'Onglet"
157
+ remove_user: "Supprimer l'Utilisateur"
158
+ required: "Obligatoire"
159
+ resource_controller:
160
+ not_found: "{{humanized_model_name}} could not be found."
161
+ removed: "{{humanized_model_name}} supprim&eacute;."
162
+ saved: "{{humanized_model_name}} enregistr&eacute; ci-dessous."
163
+ update_conflict: "{{humanized_model_name}} a &eacute;t&eacute; modifi&eacute; depuis son affichage. Toute modification ne pourra &ecirc;tre enregistr&eacute;e sans perte potentielle de donn&eacute;e."
164
+ validation_errors: "Erreurs de validation pendant le traitement de ce formulaire. SVP examinez son contenu et corrigez les erreurs avant de continuer."
165
+ reviewed: "R&eacute;vis&eacute;"
166
+ roles: "Roles"
167
+ saving_changes: Sauvegarde des modifications
168
+ saving_preferences: Sauvegarde des pr&eacute;f&eacute;rences
169
+ scheduled: "Scheduled"
170
+ search_tags: 'Search Tags:'
171
+ select:
172
+ default: '<d&eacute;faut>'
173
+ inherit: "<h&eacute;rite de>"
174
+ none: "<aucun>"
175
+ normal: "<normal>"
176
+ settings: 'Param&egrave;tres'
177
+ slug: 'Slug'
178
+ snippet: "Snippet"
179
+ snippets: "Snippets"
180
+ status: "Statut"
181
+ # Warnings and info text:
182
+ testing: Testing
183
+ text:
184
+ layouts:
185
+ remove_warning: "Confirmez-vous la <strong class='warning'>suppression</strong> du layout suivant?"
186
+ pages:
187
+ remove_warning: "Confirmez-vous la <strong class='warning'>suppression</strong> des pages suivantes {{pages}}?"
188
+ snippets:
189
+ remove_warning: "Confirmez-vous la <strong class='warning'>suppression</strong> des fragments r&eacute;utilisables (snippet) suivants?"
190
+ users:
191
+ remove_warning: "Confirmez-vous la <strong class='warning'>suppression</strong> de l'utilisateur suivant?"
192
+ this_file_language: "Fran&ccedil;ais"
193
+ time:
194
+ am: 'AM'
195
+ formats:
196
+ datetime:
197
+ formats:
198
+ default: "%Y-%m-%dT%H:%M:%S%Z"
199
+ default: "%a %b %d %H:%M:%S %Z %Y"
200
+ long: "%B %d, %Y %H:%M"
201
+ only_second: "%S"
202
+ short: "%d %b %H:%M"
203
+ time: "%H:%M"
204
+ timestamp: "%I:%M <small>%p</small> on %B %d, %Y"
205
+ pm: 'PM'
206
+ timestamp:
207
+ at: "&agrave;"
208
+ by: "par"
209
+ last_updated: "Derni&egrave;re modification"
210
+ type: 'Type'
211
+ units:
212
+ KB: "KB"
213
+ MB: "MB"
214
+ GB: "GB"
215
+ seconds: "secondes"
216
+ minutes: "minutes"
217
+ hours: "heures"
218
+ days: "jours"
219
+ weeks: "semaines"
220
+ months: "mois"
221
+ user: "Utilisateur"
222
+ username: "Nom Utilisateur"
223
+ username_or_email: 'Nom Utilisateur ou Adresse E-mail'
224
+ users: "Utilisateurs"
225
+ users_controller:
226
+ cannot_delete_self: "Vous ne pouvez pas vous supprimer vous-m&ecirc;me!. "
227
+ version: "Version"
228
+ view_site: "Afficher le site"
229
+ warning: 'Attention'
230
+ website: "Website"
231
+ welcome_controller:
232
+ invalid_user: "Nom ou mot de passe invalide."
233
+ logged_out: "Vous n'&ecirc;tes plus identifi&eacute;(e)'"
234
+ 'yes': 'Oui'
@@ -0,0 +1,554 @@
1
+ # encoding: utf-8
2
+ ---
3
+ fr:
4
+ desc:
5
+ author:
6
+ Renders the name of the author of the current page.
7
+
8
+ breadcrumb:
9
+ Renders the @breadcrumb@ attribute of the current page.
10
+
11
+ breadcrumbs:
12
+ Renders a trail of breadcrumbs to the current page. The separator attribute
13
+ specifies the HTML fragment that is inserted between each of the breadcrumbs. By
14
+ default it is set to @>@. The boolean nolinks attribute can be specified to render
15
+ breadcrumbs in plain text, without any links (useful when generating title tag).
16
+
17
+ *Usage&#58;*
18
+
19
+ <pre><code><r&#58;breadcrumbs [separator="separator_string"] [nolinks="true"] /></code></pre>
20
+
21
+ children-count:
22
+ Renders the total number of children.
23
+
24
+ children-each-child:
25
+ Page attribute tags inside of this tag refer to the current child. This is occasionally
26
+ useful if you are inside of another tag (like &lt;r&#58;find&gt;) and need to refer back to the
27
+ current child.
28
+
29
+ *Usage&#58;*
30
+
31
+ <pre><code><r&#58;children&#58;each>
32
+ <r&#58;child>...</r&#58;child>
33
+ </r&#58;children&#58;each>
34
+ </code></pre>
35
+
36
+ children-each-header:
37
+ Renders the tag contents only if the contents do not match the previous header. This
38
+ is extremely useful for rendering date headers for a list of child pages.
39
+
40
+ If you would like to use several header blocks you may use the @name@ attribute to
41
+ name the header. When a header is named it will not restart until another header of
42
+ the same name is different.
43
+
44
+ Using the @restart@ attribute you can cause other named headers to restart when the
45
+ present header changes. Simply specify the names of the other headers in a semicolon
46
+ separated list.
47
+
48
+ *Usage&#58;*
49
+
50
+ <pre><code><r&#58;children&#58;each>
51
+ <r&#58;header [name="header_name"] [restart="name1[;name2;...]"]>
52
+ ...
53
+ </r&#58;header>
54
+ </r&#58;children&#58;each>
55
+ </code></pre>
56
+
57
+ children-each-if_first:
58
+ Renders the tag contents only if the current page is the first child in the context of
59
+ a children&#58;each tag
60
+
61
+ *Usage&#58;*
62
+
63
+ <pre><code><r&#58;children&#58;each>
64
+ <r&#58;if_first >
65
+ ...
66
+ </r&#58;if_first>
67
+ </r&#58;children&#58;each>
68
+ </code></pre>
69
+
70
+
71
+ children-each-if_last:
72
+ Renders the tag contents only if the current page is the last child in the context of
73
+ a children&#58;each tag
74
+
75
+ *Usage&#58;*
76
+
77
+ <pre><code><r&#58;children&#58;each>
78
+ <r&#58;if_last >
79
+ ...
80
+ </r&#58;if_last>
81
+ </r&#58;children&#58;each>
82
+ </code></pre>
83
+
84
+
85
+ children-each-unless_first:
86
+ Renders the tag contents unless the current page is the first child in the context of
87
+ a children&#58;each tag
88
+
89
+ *Usage&#58;*
90
+
91
+ <pre><code><r&#58;children&#58;each>
92
+ <r&#58;unless_first >
93
+ ...
94
+ </r&#58;unless_first>
95
+ </r&#58;children&#58;each>
96
+ </code></pre>
97
+
98
+
99
+ children-each-unless_last:
100
+ Renders the tag contents unless the current page is the last child in the context of
101
+ a children&#58;each tag
102
+
103
+ *Usage&#58;*
104
+
105
+ <pre><code><r&#58;children&#58;each>
106
+ <r&#58;unless_last >
107
+ ...
108
+ </r&#58;unless_last>
109
+ </r&#58;children&#58;each>
110
+ </code></pre>
111
+
112
+
113
+ children-each:
114
+ Cycles through each of the children. Inside this tag all page attribute tags
115
+ are mapped to the current child page.
116
+
117
+ *Usage&#58;*
118
+
119
+ <pre><code><r&#58;children&#58;each [offset="number"] [limit="number"]
120
+ [by="published_at|updated_at|created_at|slug|title|keywords|description"]
121
+ [order="asc|desc"] [status="draft|reviewed|published|hidden|all"]>
122
+ ...
123
+ </r&#58;children&#58;each>
124
+ </code></pre>
125
+
126
+ children-first:
127
+ Returns the first child. Inside this tag all page attribute tags are mapped to
128
+ the first child. Takes the same ordering options as @<r&#58;children&#58;each>@.
129
+
130
+ *Usage&#58;*
131
+
132
+ <pre><code><r&#58;children&#58;first>...</r&#58;children&#58;first></code></pre>
133
+
134
+ children-last:
135
+ Returns the last child. Inside this tag all page attribute tags are mapped to
136
+ the last child. Takes the same ordering options as @<r&#58;children&#58;each>@.
137
+
138
+ *Usage&#58;*
139
+
140
+ <pre><code><r&#58;children&#58;last>...</r&#58;children&#58;last></code></pre>
141
+
142
+ children:
143
+ Gives access to a page's children.
144
+
145
+ *Usage&#58;*
146
+
147
+ <pre><code><r&#58;children>...</r&#58;children></code></pre>
148
+
149
+ comment:
150
+ Nothing inside a set of comment tags is rendered.
151
+
152
+ *Usage&#58;*
153
+
154
+ <pre><code><r&#58;comment>...</r&#58;comment></code></pre>
155
+
156
+ content:
157
+ Renders the main content of a page. Use the @part@ attribute to select a specific
158
+ page part. By default the @part@ attribute is set to body. Use the @inherit@
159
+ attribute to specify that if a page does not have a content part by that name that
160
+ the tag should render the parent's content part. By default @inherit@ is set to
161
+ @false@. Use the @contextual@ attribute to force a part inherited from a parent
162
+ part to be evaluated in the context of the child page. By default 'contextual'
163
+ is set to true.
164
+
165
+ *Usage&#58;*
166
+
167
+ <pre><code><r&#58;content [part="part_name"] [inherit="true|false"] [contextual="true|false"] /></code></pre>
168
+
169
+ cycle:
170
+ Renders one of the passed values based on a global cycle counter. Use the @reset@
171
+ attribute to reset the cycle to the beginning. Use the @name@ attribute to track
172
+ multiple cycles; the default is @cycle@.
173
+
174
+ *Usage&#58;*
175
+
176
+ <pre><code><r&#58;cycle values="first, second, third" [reset="true|false"] [name="cycle"] /></code></pre>
177
+
178
+ date:
179
+ Renders the date based on the current page (by default when it was published or created).
180
+ The format attribute uses the same formating codes used by the Ruby @strftime@ function. By
181
+ default it's set to @&#37;A, &#37;B &#37;d, &#37;Y@. The @for@ attribute selects which date to render. Valid
182
+ options are @published_at@, @created_at@, @updated_at@, and @now@. @now@ will render the
183
+ current date/time, regardless of the page.
184
+
185
+ *Usage&#58;*
186
+
187
+ <pre><code><r&#58;date [format="&#37;A, &#37;B &#37;d, &#37;Y"] [for="published_at"]/></code></pre>
188
+
189
+ escape_html:
190
+ Escapes angle brackets, etc. for rendering in an HTML document.
191
+
192
+ *Usage&#58;*
193
+
194
+ <pre><code><r&#58;escape_html>...</r&#58;escape_html></code></pre>
195
+
196
+ find:
197
+ Inside this tag all page related tags refer to the page found at the @url@ attribute.
198
+ @url@s may be relative or absolute paths.
199
+
200
+ *Usage&#58;*
201
+
202
+ <pre><code><r&#58;find url="value_to_find">...</r&#58;find></code></pre>
203
+
204
+ if_ancestor_or_self:
205
+ Renders the contained elements if the current contextual page is either the actual page or one of its parents.
206
+
207
+ This is typically used inside another tag (like &lt;r&#58;children&#58;each&gt;) to add conditional mark-up if the child element is or descends from the current page.
208
+
209
+ *Usage&#58;*
210
+
211
+ <pre><code><r&#58;if_ancestor_or_self>...</r&#58;if_ancestor_or_self></code></pre>
212
+
213
+ if_children:
214
+ Renders the contained elements only if the current contextual page has one or
215
+ more child pages. The @status@ attribute limits the status of found child pages
216
+ to the given status, the default is @"published"@. @status="all"@ includes all
217
+ non-virtual pages regardless of status.
218
+
219
+ *Usage&#58;*
220
+
221
+ <pre><code><r&#58;if_children [status="published"]>...</r&#58;if_children></code></pre>
222
+
223
+ if_content:
224
+ Renders the containing elements if all of the listed parts exist on a page.
225
+ By default the @part@ attribute is set to @body@, but you may list more than one
226
+ part by separating them with a comma. Setting the optional @inherit@ to true will
227
+ search ancestors independently for each part. By default @inherit@ is set to @false@.
228
+
229
+ When listing more than one part, you may optionally set the @find@ attribute to @any@
230
+ so that it will render the containing elements if any of the listed parts are found.
231
+ By default the @find@ attribute is set to @all@.
232
+
233
+ *Usage&#58;*
234
+
235
+ <pre><code><r&#58;if_content [part="part_name, other_part"] [inherit="true"] [find="any"]>...</r&#58;if_content></code></pre>
236
+
237
+ if_dev:
238
+ Renders the containing elements only if Radiant in is development mode.
239
+
240
+ *Usage&#58;*
241
+
242
+ <pre><code><r&#58;if_dev>...</r&#58;if_dev></code></pre>
243
+
244
+ if_parent:
245
+ Renders the contained elements only if the current contextual page has a parent, i.e.
246
+ is not the root page.
247
+
248
+ *Usage&#58;*
249
+
250
+ <pre><code><r&#58;if_parent>...</r&#58;if_parent></code></pre>
251
+
252
+ if_self:
253
+ Renders the contained elements if the current contextual page is also the actual page.
254
+
255
+ This is typically used inside another tag (like &lt;r&#58;children&#58;each&gt;) to add conditional mark-up if the child element is the current page.
256
+
257
+ *Usage&#58;*
258
+
259
+ <pre><code><r&#58;if_self>...</r&#58;if_self></code></pre>
260
+
261
+ if_url:
262
+ Renders the containing elements only if the page's url matches the regular expression
263
+ given in the @matches@ attribute. If the @ignore_case@ attribute is set to false, the
264
+ match is case sensitive. By default, @ignore_case@ is set to true.
265
+
266
+ *Usage&#58;*
267
+
268
+ <pre><code><r&#58;if_url matches="regexp" [ignore_case="true|false"]>...</r&#58;if_url></code></pre>
269
+
270
+ link:
271
+ Renders a link to the page. When used as a single tag it uses the page's title
272
+ for the link name. When used as a double tag the part in between both tags will
273
+ be used as the link text. The link tag passes all attributes over to the HTML
274
+ @a@ tag. This is very useful for passing attributes like the @class@ attribute
275
+ or @id@ attribute. If the @anchor@ attribute is passed to the tag it will
276
+ append a pound sign (<code>#</code>) followed by the value of the attribute to
277
+ the @href@ attribute of the HTML @a@ tag--effectively making an HTML anchor.
278
+
279
+ *Usage&#58;*
280
+
281
+ <pre><code><r&#58;link [anchor="name"] [other attributes...] /></code></pre>
282
+
283
+ or
284
+
285
+ <pre><code><r&#58;link [anchor="name"] [other attributes...]>link text here</r&#58;link></code></pre>
286
+
287
+ markdown:
288
+ Filters its contents with the Markdown filter.
289
+
290
+ *Usage&#58;*
291
+
292
+ <pre><code><r&#58;markdown>** bold text **</r&#58;markdown></code></pre>
293
+
294
+ produces
295
+
296
+ <pre><code><strong> bold text </strong></code></pre>
297
+
298
+ meta-description:
299
+ Emits the page description field in a meta tag, unless attribute
300
+ 'tag' is set to 'false'.
301
+
302
+ *Usage&#58;*
303
+
304
+ <pre><code> <r&#58;meta&#58;description [tag="false"] /> </code></pre>
305
+
306
+ meta-keywords:
307
+ Emits the page keywords field in a meta tag, unless attribute
308
+ 'tag' is set to 'false'.
309
+
310
+ *Usage&#58;*
311
+
312
+ <pre><code> <r&#58;meta&#58;keywords [tag="false"] /> </code></pre>
313
+
314
+ meta:
315
+ The namespace for 'meta' attributes. If used as a singleton tag, both the description
316
+ and keywords fields will be output as &lt;meta /&gt; tags unless the attribute 'tag' is set to 'false'.
317
+
318
+ *Usage&#58;*
319
+
320
+ <pre><code> <r&#58;meta [tag="false"] />
321
+ <r&#58;meta>
322
+ <r&#58;description [tag="false"] />
323
+ <r&#58;keywords [tag="false"] />
324
+ </r&#58;meta>
325
+ </code></pre>
326
+
327
+ navigation-if_first:
328
+ Renders the containing elements if the element is the first
329
+ in the navigation list
330
+
331
+ *Usage&#58;*
332
+
333
+ <pre><code><r&#58;normal><r&#58;if_first>...</r&#58;if_first></r&#58;normal></code></pre>
334
+
335
+ navigation-if_last:
336
+ Renders the containing elements if the element is the last
337
+ in the navigation list
338
+
339
+ *Usage&#58;*
340
+
341
+ <pre><code><r&#58;normal><r&#58;if_last>...</r&#58;if_last></r&#58;normal></code></pre>
342
+
343
+ navigation:
344
+ Renders a list of links specified in the @urls@ attribute according to three
345
+ states&#58;
346
+
347
+ * @normal@ specifies the normal state for the link
348
+ * @here@ specifies the state of the link when the url matches the current
349
+ page's URL
350
+ * @selected@ specifies the state of the link when the current page matches
351
+ is a child of the specified url
352
+ # @if_last@ renders its contents within a @normal@, @here@ or
353
+ @selected@ tag if the item is the last in the navigation elements
354
+ # @if_first@ renders its contents within a @normal@, @here@ or
355
+ @selected@ tag if the item is the first in the navigation elements
356
+
357
+ The @between@ tag specifies what should be inserted in between each of the links.
358
+
359
+ *Usage&#58;*
360
+
361
+ <pre><code><r&#58;navigation urls="[Title&#58; url | Title&#58; url | ...]">
362
+ <r&#58;normal><a href="<r&#58;url />"><r&#58;title /></a></r&#58;normal>
363
+ <r&#58;here><strong><r&#58;title /></strong></r&#58;here>
364
+ <r&#58;selected><strong><a href="<r&#58;url />"><r&#58;title /></a></strong></r&#58;selected>
365
+ <r&#58;between> | </r&#58;between>
366
+ </r&#58;navigation>
367
+ </code></pre>
368
+
369
+ page:
370
+ Causes the tags referring to a page's attributes to refer to the current page.
371
+
372
+ *Usage&#58;*
373
+
374
+ <pre><code><r&#58;page>...</r&#58;page></code></pre>
375
+
376
+ parent:
377
+ Page attribute tags inside this tag refer to the parent of the current page.
378
+
379
+ *Usage&#58;*
380
+
381
+ <pre><code><r&#58;parent>...</r&#58;parent></code></pre>
382
+
383
+ random:
384
+ Randomly renders one of the options specified by the @option@ tags.
385
+
386
+ *Usage&#58;*
387
+
388
+ <pre><code><r&#58;random>
389
+ <r&#58;option>...</r&#58;option>
390
+ <r&#58;option>...</r&#58;option>
391
+ ...
392
+ <r&#58;random>
393
+ </code></pre>
394
+
395
+ rfc1123_date:
396
+ Outputs the published date using the format mandated by RFC 1123. (Ideal for RSS feeds.)
397
+
398
+ *Usage&#58;*
399
+
400
+ <pre><code><r&#58;rfc1123_date /></code></pre>
401
+
402
+ slug:
403
+ Renders the @slug@ attribute of the current page.
404
+
405
+ smarty_pants:
406
+ Filters its contents with the SmartyPants filter.
407
+
408
+ *Usage&#58;*
409
+
410
+ <pre><code><r&#58;smarty_pants>"A revolutionary quotation."</r&#58;smarty_pants></code></pre>
411
+
412
+ produces
413
+
414
+ <pre><code>&#8220;A revolutionary quotation.&#8221;</code></pre>
415
+
416
+ snippet:
417
+ Renders the snippet specified in the @name@ attribute within the context of a page.
418
+
419
+ *Usage&#58;*
420
+
421
+ <pre><code><r&#58;snippet name="snippet_name" /></code></pre>
422
+
423
+ When used as a double tag, the part in between both tags may be used within the
424
+ snippet itself, being substituted in place of @<r&#58;yield/>@.
425
+
426
+ *Usage&#58;*
427
+
428
+ <pre><code><r&#58;snippet name="snippet_name">Lorem ipsum dolor...</r&#58;snippet></code></pre>
429
+
430
+ status:
431
+ Prints the page's status as a string. Optional attribute 'downcase'
432
+ will cause the status to be all lowercase.
433
+
434
+ *Usage&#58;*
435
+
436
+ <pre><code><r&#58;status [downcase='true'] /></code></pre>
437
+
438
+ textile:
439
+ Filters its contents with the Textile filter.
440
+
441
+ *Usage*&#58;
442
+
443
+ <pre><code><r&#58;textile>
444
+ * First
445
+ * Second
446
+ </r&#58;textile></code></pre>
447
+
448
+ produces&#58;
449
+
450
+ <pre><code><ul>
451
+ <li>First</li>
452
+ <li>Second</li>
453
+ </ul></code></pre>
454
+
455
+ title:
456
+ Renders the @title@ attribute of the current page.
457
+
458
+ unless_ancestor_or_self:
459
+ Renders the contained elements unless the current contextual page is either the actual page or one of its parents.
460
+
461
+ This is typically used inside another tag (like &lt;r&#58;children&#58;each&gt;) to add conditional mark-up unless the child element is or descends from the current page.
462
+
463
+ *Usage&#58;*
464
+
465
+ <pre><code><r&#58;unless_ancestor_or_self>...</r&#58;unless_ancestor_or_self></code></pre>
466
+
467
+ unless_children:
468
+ Renders the contained elements only if the current contextual page has no children.
469
+ The @status@ attribute limits the status of found child pages to the given status,
470
+ the default is @"published"@. @status="all"@ includes all non-virtual pages
471
+ regardless of status.
472
+
473
+ *Usage&#58;*
474
+
475
+ <pre><code><r&#58;unless_children [status="published"]>...</r&#58;unless_children></code></pre>
476
+
477
+ unless_content:
478
+ The opposite of the @if_content@ tag. It renders the contained elements if all of the
479
+ specified parts do not exist. Setting the optional @inherit@ to true will search
480
+ ancestors independently for each part. By default @inherit@ is set to @false@.
481
+
482
+ When listing more than one part, you may optionally set the @find@ attribute to @any@
483
+ so that it will not render the containing elements if any of the listed parts are found.
484
+ By default the @find@ attribute is set to @all@.
485
+
486
+ *Usage&#58;*
487
+
488
+ <pre><code><r&#58;unless_content [part="part_name, other_part"] [inherit="false"] [find="any"]>...</r&#58;unless_content></code></pre>
489
+
490
+ unless_dev:
491
+ The opposite of the @if_dev@ tag.
492
+
493
+ *Usage&#58;*
494
+
495
+ <pre><code><r&#58;unless_dev>...</r&#58;unless_dev></code></pre>
496
+
497
+ unless_parent:
498
+ Renders the contained elements only if the current contextual page has no parent, i.e.
499
+ is the root page.
500
+
501
+ *Usage&#58;*
502
+
503
+ <pre><code><r&#58;unless_parent>...</r&#58;unless_parent></code></pre>
504
+
505
+ unless_self:
506
+ Renders the contained elements unless the current contextual page is also the actual page.
507
+
508
+ This is typically used inside another tag (like &lt;r&#58;children&#58;each&gt;) to add conditional mark-up unless the child element is the current page.
509
+
510
+ *Usage&#58;*
511
+
512
+ <pre><code><r&#58;unless_self>...</r&#58;unless_self></code></pre>
513
+
514
+ unless_url:
515
+ The opposite of the @if_url@ tag.
516
+
517
+ *Usage&#58;*
518
+
519
+ <pre><code><r&#58;unless_url matches="regexp" [ignore_case="true|false"]>...</r&#58;unless_url></code></pre>
520
+
521
+ url:
522
+ Renders the @url@ attribute of the current page.
523
+
524
+ yield:
525
+ Used within a snippet as a placeholder for substitution of child content, when
526
+ the snippet is called as a double tag.
527
+
528
+ *Usage (within a snippet)&#58;*
529
+
530
+ <pre><code>
531
+ <div id="outer">
532
+ <p>before</p>
533
+ <r&#58;yield/>
534
+ <p>after</p>
535
+ </div>
536
+ </code></pre>
537
+
538
+ If the above snippet was named "yielding", you could call it from any Page,
539
+ Layout or Snippet as follows&#58;
540
+
541
+ <pre><code><r&#58;snippet name="yielding">Content within</r&#58;snippet></code></pre>
542
+
543
+ Which would output the following&#58;
544
+
545
+ <pre><code>
546
+ <div id="outer">
547
+ <p>before</p>
548
+ Content within
549
+ <p>after</p>
550
+ </div>
551
+ </code></pre>
552
+
553
+ When called in the context of a Page or a Layout, @<r&#58;yield/>@ outputs nothing.
554
+
@@ -0,0 +1,9 @@
1
+ class FrenchLanguagePackExtension < Radiant::Extension
2
+ version "1.0"
3
+ description "Provides a French translation for the Radiant admin interface"
4
+ url "http://yourwebsite.com/fr"
5
+
6
+ def activate
7
+
8
+ end
9
+ end
@@ -0,0 +1,2 @@
1
+ module RadiantFrenchLanguagePackExtension
2
+ end
@@ -0,0 +1,3 @@
1
+ module RadiantFrenchLanguagePackExtension
2
+ VERSION = "1.0.1"
3
+ end
@@ -0,0 +1,28 @@
1
+ namespace :radiant do
2
+ namespace :extensions do
3
+ namespace :fr do
4
+
5
+ desc "Runs the migration of the I18n Fr extension"
6
+ task :migrate => :environment do
7
+ require 'radiant/extension_migrator'
8
+ if ENV["VERSION"]
9
+ I18nFrExtension.migrator.migrate(ENV["VERSION"].to_i)
10
+ else
11
+ I18nFrExtension.migrator.migrate
12
+ end
13
+ end
14
+
15
+ desc "Copies public assets of the I18n Fr to the instance public/ directory."
16
+ task :update => :environment do
17
+ is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
18
+ puts "Copying assets from I18nFrExtension"
19
+ Dir[I18nFrExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
20
+ path = file.sub(I18nFrExtension.root, '')
21
+ directory = File.dirname(path)
22
+ mkdir_p RAILS_ROOT + directory, :verbose => false
23
+ cp file, RAILS_ROOT + path, :verbose => false
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "radiant-french_language_pack-extension/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "radiant-french_language_pack-extension"
7
+ s.version = RadiantFrenchLanguagePackExtension::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Radiant CMS Dev Team"]
10
+ s.email = ["radiant@radiantcms.org"]
11
+ s.homepage = "http://radiantcms.org/"
12
+ s.summary = %q{French Language Pack for Radiant CMS}
13
+ s.description = %q{Provides a French translation for the Radiant admin interface}
14
+
15
+ ignores = if File.exist?(".gitignore")
16
+ File.read(".gitignore").split("\n").inject([]) {|a,p| a + Dir[p] }
17
+ else
18
+ []
19
+ end
20
+ s.files = Dir["**/*"] - ignores
21
+ s.test_files = Dir["test/**/*","spec/**/*","features/**/*"] - ignores
22
+ s.require_paths = ["lib"]
23
+
24
+ # s.add_dependency "some_gem", "~> 1.0.0"
25
+
26
+ s.post_install_message = %{
27
+ Add this to your radiant project with:
28
+ config.gem "radiant-french_language_pack-extension", :version => "~> #{RadiantFrenchLanguagePackExtension::VERSION}"
29
+ }
30
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: radiant-french_language_pack-extension
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Radiant CMS Dev Team
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-01-28 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Provides a French translation for the Radiant admin interface
15
+ email:
16
+ - radiant@radiantcms.org
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - config/locales/fr.yml
22
+ - config/locales/fr_available_tags.yml
23
+ - french_language_pack_extension.rb
24
+ - lib/radiant-french_language_pack-extension/version.rb
25
+ - lib/radiant-french_language_pack-extension.rb
26
+ - lib/tasks/i18n_fr_extension_tasks.rake
27
+ - radiant-french_language_pack-extension.gemspec
28
+ - Rakefile
29
+ - README
30
+ homepage: http://radiantcms.org/
31
+ licenses: []
32
+ post_install_message: ! "\n Add this to your radiant project with:\n config.gem
33
+ \"radiant-french_language_pack-extension\", :version => \"~> 1.0.1\"\n "
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubyforge_project:
51
+ rubygems_version: 1.8.23
52
+ signing_key:
53
+ specification_version: 3
54
+ summary: French Language Pack for Radiant CMS
55
+ test_files: []