Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed language packs

  • Loading branch information...
commit 4d3a74cf3d80b847535032dc957f7906e4a3bf7e 1 parent b0ff225
Keith Bingman kbingman authored
Showing with 5,764 additions and 39 deletions.
  1. +8 −32 lib/generators/language_extension/language_extension_generator.rb
  2. +3 −6 lib/tasks/translate.rake
  3. +1 −1  lib/translation_support.rb
  4. +3 −0  vendor/extensions/dutch_language_pack/README
  5. +123 −0 vendor/extensions/dutch_language_pack/Rakefile
  6. +182 −0 vendor/extensions/dutch_language_pack/config/locales/nl.yml
  7. +553 −0 vendor/extensions/dutch_language_pack/config/locales/nl_available_tags.yml
  8. +1 −0  vendor/extensions/dutch_language_pack/cucumber.yml
  9. +9 −0 vendor/extensions/dutch_language_pack/dutch_language_pack_extension.rb
  10. +16 −0 vendor/extensions/dutch_language_pack/features/support/env.rb
  11. +14 −0 vendor/extensions/dutch_language_pack/features/support/paths.rb
  12. +28 −0 vendor/extensions/dutch_language_pack/lib/tasks/i18n_nl_extension_tasks.rake
  13. +6 −0 vendor/extensions/dutch_language_pack/spec/spec.opts
  14. +36 −0 vendor/extensions/dutch_language_pack/spec/spec_helper.rb
  15. +3 −0  vendor/extensions/french_language_pack/README
  16. +123 −0 vendor/extensions/french_language_pack/Rakefile
  17. +182 −0 vendor/extensions/french_language_pack/config/locales/fr.yml
  18. +553 −0 vendor/extensions/french_language_pack/config/locales/fr_available_tags.yml
  19. +1 −0  vendor/extensions/french_language_pack/cucumber.yml
  20. +16 −0 vendor/extensions/french_language_pack/features/support/env.rb
  21. +14 −0 vendor/extensions/french_language_pack/features/support/paths.rb
  22. +9 −0 vendor/extensions/french_language_pack/french_language_pack_extension.rb
  23. +28 −0 vendor/extensions/french_language_pack/lib/tasks/i18n_fr_extension_tasks.rake
  24. +6 −0 vendor/extensions/french_language_pack/spec/spec.opts
  25. +36 −0 vendor/extensions/french_language_pack/spec/spec_helper.rb
  26. +3 −0  vendor/extensions/german_language_pack/README
  27. +123 −0 vendor/extensions/german_language_pack/Rakefile
  28. +182 −0 vendor/extensions/german_language_pack/config/locales/de.yml
  29. +553 −0 vendor/extensions/german_language_pack/config/locales/de_available_tags.yml
  30. +9 −0 vendor/extensions/german_language_pack/german_language_pack_extension.rb
  31. +28 −0 vendor/extensions/german_language_pack/lib/tasks/i18n_de_extension_tasks.rake
  32. +3 −0  vendor/extensions/italian_language_pack/README
  33. +123 −0 vendor/extensions/italian_language_pack/Rakefile
  34. +182 −0 vendor/extensions/italian_language_pack/config/locales/it.yml
  35. +553 −0 vendor/extensions/italian_language_pack/config/locales/it_available_tags.yml
  36. +1 −0  vendor/extensions/italian_language_pack/cucumber.yml
  37. +16 −0 vendor/extensions/italian_language_pack/features/support/env.rb
  38. +14 −0 vendor/extensions/italian_language_pack/features/support/paths.rb
  39. +8 −0 vendor/extensions/italian_language_pack/italian_language_pack_extension.rb
  40. +28 −0 vendor/extensions/italian_language_pack/lib/tasks/i18n_it_extension_tasks.rake
  41. +6 −0 vendor/extensions/italian_language_pack/spec/spec.opts
  42. +36 −0 vendor/extensions/italian_language_pack/spec/spec_helper.rb
  43. +3 −0  vendor/extensions/japanese_language_pack/README
  44. +123 −0 vendor/extensions/japanese_language_pack/Rakefile
  45. +182 −0 vendor/extensions/japanese_language_pack/config/locales/ja.yml
  46. +553 −0 vendor/extensions/japanese_language_pack/config/locales/ja_available_tags.yml
  47. +1 −0  vendor/extensions/japanese_language_pack/cucumber.yml
  48. +16 −0 vendor/extensions/japanese_language_pack/features/support/env.rb
  49. +14 −0 vendor/extensions/japanese_language_pack/features/support/paths.rb
  50. +9 −0 vendor/extensions/japanese_language_pack/japanese_language_pack_extension.rb
  51. +28 −0 vendor/extensions/japanese_language_pack/lib/tasks/i18n_ja_extension_tasks.rake
  52. +6 −0 vendor/extensions/japanese_language_pack/spec/spec.opts
  53. +36 −0 vendor/extensions/japanese_language_pack/spec/spec_helper.rb
  54. +3 −0  vendor/extensions/russian_language_pack/README
  55. +123 −0 vendor/extensions/russian_language_pack/Rakefile
  56. +182 −0 vendor/extensions/russian_language_pack/config/locales/ru.yml
  57. +553 −0 vendor/extensions/russian_language_pack/config/locales/ru_available_tags.yml
  58. +1 −0  vendor/extensions/russian_language_pack/cucumber.yml
  59. +16 −0 vendor/extensions/russian_language_pack/features/support/env.rb
  60. +14 −0 vendor/extensions/russian_language_pack/features/support/paths.rb
  61. +28 −0 vendor/extensions/russian_language_pack/lib/tasks/i18n_ru_extension_tasks.rake
  62. +9 −0 vendor/extensions/russian_language_pack/russian_language_pack_extension.rb
  63. +6 −0 vendor/extensions/russian_language_pack/spec/spec.opts
  64. +36 −0 vendor/extensions/russian_language_pack/spec/spec_helper.rb
40 lib/generators/language_extension/language_extension_generator.rb
View
@@ -5,8 +5,8 @@ class LanguageExtensionGenerator < Rails::Generator::NamedBase
def initialize(runtime_args, runtime_options = {})
super
- @extension_file_name = "i18n_#{file_name}_extension"
- @extension_path = "vendor/extensions/i18n_#{file_name}"
+ @extension_file_name = "#{file_name}_language_pack_extension"
+ @extension_path = "vendor/extensions/#{file_name}_language_pack"
@localization_name = localization_name
end
@@ -17,39 +17,15 @@ def manifest
m.template 'README', "#{extension_path}/README"
m.template 'extension.rb', "#{extension_path}/#{extension_file_name}.rb"
- m.template 'tasks.rake', "#{extension_path}/lib/tasks/#{extension_file_name}_tasks.rake"
+ # m.template 'tasks.rake', "#{extension_path}/lib/tasks/#{extension_file_name}_tasks.rake"
m.template 'lang.yml', "#{extension_path}/config/locales/#{localization_name}.yml"
m.template 'available_tags.yml', "#{extension_path}/config/locales/#{localization_name}_available_tags.yml"
-
- if options[:with_test_unit]
- m.directory "#{extension_path}/test/fixtures"
- m.directory "#{extension_path}/test/functional"
- m.directory "#{extension_path}/test/unit"
-
- m.template 'Rakefile', "#{extension_path}/Rakefile"
- m.template 'test_helper.rb', "#{extension_path}/test/test_helper.rb"
- m.template 'functional_test.rb', "#{extension_path}/test/functional/#{extension_file_name}_test.rb"
- else
- m.directory "#{extension_path}/spec/controllers"
- m.directory "#{extension_path}/spec/models"
- m.directory "#{extension_path}/spec/views"
- m.directory "#{extension_path}/spec/helpers"
- m.directory "#{extension_path}/features/support"
- m.directory "#{extension_path}/features/step_definitions/admin"
-
- m.template 'RSpecRakefile', "#{extension_path}/Rakefile"
- m.template 'spec_helper.rb', "#{extension_path}/spec/spec_helper.rb"
- m.file 'spec.opts', "#{extension_path}/spec/spec.opts"
- m.file 'cucumber.yml', "#{extension_path}/cucumber.yml"
- m.template 'cucumber_env.rb', "#{extension_path}/features/support/env.rb"
- m.template 'cucumber_paths.rb', "#{extension_path}/features/support/paths.rb"
- end
end
end
def class_name
- 'I18n' + super.to_name.gsub(' ', '') + 'Extension'
+ super.to_name.gsub(' ', '') + 'LanguagePackExtension'
end
def extension_name
@@ -57,10 +33,10 @@ def extension_name
end
def add_options!(opt)
- opt.separator ''
- opt.separator 'Options:'
- opt.on("--with-test-unit",
- "Use Test::Unit for this extension instead of RSpec") { |v| options[:with_test_unit] = v }
+ # opt.separator ''
+ # opt.separator 'Options:'
+ # opt.on("--with-test-unit",
+ # "Use Test::Unit for this extension instead of RSpec") { |v| options[:with_test_unit] = v }
end
def localization_name
9 lib/tasks/translate.rake
View
@@ -9,7 +9,7 @@ namespace :radiant do
language_root = "#{RADIANT_ROOT}/config/locales"
words = TranslationSupport.get_translation_keys(language_root)
locale_paths.each do |path|
- if path == language_root || path.match('i18n_')
+ if path == language_root || path.match('language_pack')
Dir["#{path}/*.yml"].each do |filename|
next if filename.match('_available_tags')
basename = File.basename(filename, '.yml')
@@ -43,16 +43,13 @@ namespace :radiant do
language_root = "#{RADIANT_ROOT}/config/locales"
words = TranslationSupport.open_available_tags("#{language_root}/en_available_tags.yml")
locale_paths.each do |path|
- if path == language_root || path.match('i18n_')
+ if path == language_root || path.match('language_pack')
Dir["#{path}/*.yml"].each do |filename|
- puts filename
next unless filename.match('_available_tags')
basename = File.basename(filename, '_available_tags.yml')
puts "Syncing #{basename}"
(comments, other) = TranslationSupport.open_available_tags(filename)
- words.each { |k,v| other[k] ||= words[k] } # Initializing hash variable as empty if it does not exist
- other.delete_if { |k,v| !words[k] } # Remove if not defined in en.yml
- TranslationSupport.write_file(filename, basename, comments, other)
+ puts other
end
end
end
2  lib/translation_support.rb
View
@@ -35,7 +35,7 @@ def create_hash(data, basename)
def open_available_tags(filename)
data = YAML::load(File.open("#{filename}"))
- data
+ data.to_s
end
#Writes to file from translation data hash structure
3  vendor/extensions/dutch_language_pack/README
View
@@ -0,0 +1,3 @@
+= I18n Nl
+
+Description goes here
123 vendor/extensions/dutch_language_pack/Rakefile
View
@@ -0,0 +1,123 @@
+# I think this is the one that should be moved to the extension Rakefile template
+
+# In rails 1.2, plugins aren't available in the path until they're loaded.
+# Check to see if the rspec plugin is installed first and require
+# it if it is. If not, use the gem version.
+
+# Determine where the RSpec plugin is by loading the boot
+unless defined? RADIANT_ROOT
+ ENV["RAILS_ENV"] = "test"
+ case
+ when ENV["RADIANT_ENV_FILE"]
+ require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
+ else
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
+ end
+end
+
+require 'rake'
+require 'rake/rdoctask'
+require 'rake/testtask'
+
+rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
+$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
+require 'spec/rake/spectask'
+require 'cucumber'
+require 'cucumber/rake/task'
+
+# Cleanup the RADIANT_ROOT constant so specs will load the environment
+Object.send(:remove_const, :RADIANT_ROOT)
+
+extension_root = File.expand_path(File.dirname(__FILE__))
+
+task :default => :spec
+task :stats => "spec:statsetup"
+
+desc "Run all specs in spec directory"
+Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+task :features => 'spec:integration'
+
+namespace :spec do
+ desc "Run all specs in spec directory with RCov"
+ Spec::Rake::SpecTask.new(:rcov) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.rcov = true
+ t.rcov_opts = ['--exclude', 'spec', '--rails']
+ end
+
+ desc "Print Specdoc for all specs"
+ Spec::Rake::SpecTask.new(:doc) do |t|
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ end
+
+ [:models, :controllers, :views, :helpers].each do |sub|
+ desc "Run the specs under spec/#{sub}"
+ Spec::Rake::SpecTask.new(sub) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
+ end
+ end
+
+ desc "Run the Cucumber features"
+ Cucumber::Rake::Task.new(:integration) do |t|
+ t.fork = true
+ t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
+ # t.feature_pattern = "#{extension_root}/features/**/*.feature"
+ t.profile = "default"
+ end
+
+ # Setup specs for stats
+ task :statsetup do
+ require 'code_statistics'
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views)
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
+ ::CodeStatistics::TEST_TYPES << "Model specs"
+ ::CodeStatistics::TEST_TYPES << "View specs"
+ ::CodeStatistics::TEST_TYPES << "Controller specs"
+ ::CodeStatistics::TEST_TYPES << "Helper specs"
+ ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
+ end
+
+ namespace :db do
+ namespace :fixtures do
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
+ task :load => :environment do
+ require 'active_record/fixtures'
+ ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
+ Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
+ end
+ end
+ end
+ end
+end
+
+desc 'Generate documentation for the nl extension.'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'I18nNlExtension'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+# For extensions that are in transition
+desc 'Test the nl extension.'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+end
+
+# Load any custom rakefiles for extension
+Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
182 vendor/extensions/dutch_language_pack/config/locales/nl.yml
View
@@ -0,0 +1,182 @@
+---
+nl:
+ account: 'Account'
+ activerecord:
+ errors:
+ messages:
+ blank: 'verplicht' # required
+ invalid: 'ongeldige indeling' #invalid_format
+ not_a_number: 'moet een getal zijn' # must be number
+ taken: 'naam reeds in gebruik' # name_in_use
+ too_long: 'maximum {{count}} tekens' # character_limit
+ too_short: 'minimum {{count}} tekens' # character_minimum
+ models:
+ page:
+ attributes:
+ slug:
+ taken: 'URL pagina (slug) reeds in gebruik' # slug_in_use
+ user:
+ attributes:
+ email:
+ invalid: 'ongeldig e-mailadres' # invalid_email
+ login:
+ taken: 'gebruikersnaam reeds in gebruik' # login already in use
+ password:
+ confirmation: 'moet overeen komen' # password_confirmation
+ add_child: 'Child Toevoegen'
+ add_part: 'Part Toevoegen'
+ add_tab: 'Tab Toevoegen'
+ admin: 'Beheerder'
+ available_tags: 'Beschikbare Tags'
+ available_tags_for: 'Beschikbare Tags voor {{name}}'
+ body: 'Body'
+ breadcrumb: 'Breadcrumb'
+ buttons:
+ create: '{{name}} Aanmaken'
+ save_and_continue: 'Opslaan en verder bewerken'
+ save_changes: 'Opslaan'
+ cancel: 'Annuleren'
+ change: 'Wijzigen'
+ close: 'Sluiten'
+ content: 'Inhoud'
+ content_type: 'InhoudsType'
+ creating_status: '{{model}}&#8230; aan het maken'
+ date:
+ abbr_day_names: [zo, ma, di, wo, do, vr, za]
+ abbr_month_names: [~, jan, feb, mar, apr, mei, jun, jul, aug, sep, okt, nov, dec]
+ day_names: [zondag, maandag, dinsdag, woensdag, donderdag, vrijdag, zaterdag]
+ formats:
+ default: "%d/%m/%Y"
+ long: "%e %B %Y"
+ only_day: "%e"
+ short: "%e %b"
+ month_names: [~, januari, februari, maart, april, mei, juni, juli, augustus, september, october, november, december]
+ order: [ :day, :month, :year ]
+ delete_layout: 'Layout verwijderen'
+ delete_pages: '{{pages}} verwijderen'
+ delete_snippet: 'Snippet verwijderen'
+ delete_user: 'Gebruiker verwijderen'
+ description: 'Omschrijving'
+ design: 'Ontwerp'
+ designer: 'Ontwerper'
+ draft: 'Ontwerp'
+ edit_layout: 'Layout Wijzigen'
+ edit_page: 'Pagina Wijzigen'
+ edit_snippet: 'Snippet Wijzigen'
+ edit_user: 'Gebruiker Wijzigen'
+ email_address: 'E-mailadres'
+ extension: 'Module'
+ extensions: 'Modules'
+ filter: 'Filter'
+ hidden: 'Verborgen'
+ hide: 'Verbergen'
+ keywords: 'Sleutelwoorden'
+ language: 'Taal'
+ layout: 'Layout'
+ layouts: 'Layouts'
+ log_out: 'Afmelden'
+ logged_in_as: 'Aangemeld als'
+ login: 'Aanmelden'
+ modify: 'Bewerken'
+ more: 'Meer'
+ name: 'Naam'
+ new_layout: 'Niewe Layout'
+ new_page: 'Niewe Pagina'
+ new_password: 'Niew Wachtwoord'
+ new_snippet: 'Nieuwe Snippet'
+ new_user: 'Nieuwe Gebruiker'
+ no_pages: "Geen Pagina's"
+ notes: 'Notities'
+ optional: 'Optioneel'
+ or: 'of'
+ page: 'Pagina'
+ page_page: 'Page Part'
+ page_title: 'Pagina Titel'
+ page_type: 'Pagina Type'
+ pages: "Pagina's"
+ pages_controller:
+ removed_many: "De pagina's werden verwijderd van de site."
+ removed_one: "De pagina is verwijderd van de site."
+ saved: "Je pagina is hieronder opgeslagen."
+ password: 'Wachtwoord'
+ password_confirmation: Bevestig Nieuw Wachtwoord'
+ personal: 'Personlijk'
+ personal_preferences: 'Persoonlijke Voorkeuren'
+ please_login: 'Gelieve aan te melden'
+ powered_by: 'Powered by'
+ preferences: 'Voorkeuren'
+ preferences_controller:
+ error_updating: 'Er is een fout opgetreden bij het opslaan van je voorkeuren.'
+ updated: 'Je voorkeuren zijn bijgewerkt.'
+ published: 'Gepubliceerd'
+ published_at: 'Gepuliceerd op'
+ reference: 'Referentie'
+ remember_me: 'Onthoud me'
+ remove: 'Verwijderen'
+ remove_layout: 'Layout Verwijderen'
+ remove_page: 'Pagina Verwijderen'
+ remove_pages: '{{pages}} Verwijderen'
+ remove_tab: 'Tab Verwijderen'
+ remove_user: 'Gebruiker verwijderen'
+ required: 'Vereist'
+ resource_controller:
+ not_found: "{{humanized_model_name}} is niet gevonden."
+ removed: "{{humanized_model_name}} is verwijderd."
+ saved: "{{humanized_model_name}} is hieronder opgelsagen."
+ update_conflict: "{{humanized_model_name}} is bijgewerkt sinds sinds het laden. De wijzigingen kunnen niet opgeslagen worden zonder mogelijk verlies van gegevens."
+ validation_errors: "Er zijn validatiefouten opgetreden tijdens het verwerken van dit formulier. Kijk het formulier aub na en verbeter eventuele fouten om verder te gaan."
+ reviewed: 'Nagekeken'
+ roles: 'Rollen'
+ saving_changes: 'Aan het bijwerken'
+ saving_preferences: 'Voorkeuren aan het bijwerken'
+ scheduled: "Scheduled"
+ search_tags: 'Tags doorzoeken:'
+ select:
+ inherit: '<erven>'
+ none: '<geen>'
+ normal: '<normaal>'
+ settings: 'Instellingen'
+ slug: 'Slug'
+ snippet: 'Snippet'
+ snippets: 'Snippets'
+ status: 'Status'
+ # Warnings and info text:
+ testing: Testing
+ text:
+ layouts:
+ remove_warning: 'Ben je zeker dat je de volgende layout <strong class="warning">definitief</strong> wil <strong class="warning">verwijderen</strong>?'
+ pages:
+ remove_warning: 'Ben je zeker dat je de volgende pagina <strong class="warning">definitief</strong> wil <strong class="warning">verwijderen</strong>?'
+ snippets:
+ remove_warning: 'Ben je zeker dat je de volgende snippet <strong class="warning">definitief</strong> wil <strong class="warning">verwijderen</strong>?'
+ users:
+ remove_warning: 'Ben je zeker dat je de volgende gebruiker <strong class="warning">definitief</strong> wil <strong class="warning">verwijderen</strong>?'
+ this_file_language: "Nederlands"
+ time:
+ am: 'am'
+ formats:
+ datetime:
+ formats:
+ default: "%Y-%m-%dT%H:%M:%S%Z"
+ default: "%a %d %b %H:%M:%S %Z %Y"
+ long: "%d %B %Y %H:%M"
+ only_second: "%S"
+ short: "%d %b %H:%M"
+ time: "%H:%M"
+ timestamp: "%H:%M op %d %B %Y"
+ pm: 'pm'
+ timestamp:
+ at: 'om'
+ by: 'door'
+ last_updated: 'Laatst bijgewerkt'
+ user: 'Gebruiker'
+ username: 'Gebruikersnaam'
+ users: 'Gebruikers'
+ users_controller:
+ cannot_delete_self: 'Je kan jezelf niet verwijderen.'
+ version: 'Versie'
+ view_site: 'Bekijk Site'
+ website: 'Website'
+ welcome_controller:
+ invalid_user: 'Onbekende gebruikersnaam of wachtwoord.'
+ logged_out: 'Je bent nu afgemeld.'
553 vendor/extensions/dutch_language_pack/config/locales/nl_available_tags.yml
View
@@ -0,0 +1,553 @@
+---
+nl:
+ desc:
+ author:
+ Renders the name of the author of the current page.
+
+ breadcrumb:
+ Renders the @breadcrumb@ attribute of the current page.
+
+ breadcrumbs:
+ Renders a trail of breadcrumbs to the current page. The separator attribute
+ specifies the HTML fragment that is inserted between each of the breadcrumbs. By
+ default it is set to @>@. The boolean nolinks attribute can be specified to render
+ breadcrumbs in plain text, without any links (useful when generating title tag).
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;breadcrumbs [separator="separator_string"] [nolinks="true"] /></code></pre>
+
+ children-count:
+ Renders the total number of children.
+
+ children-each-child:
+ Page attribute tags inside of this tag refer to the current child. This is occasionally
+ useful if you are inside of another tag (like &lt;r&#58;find&gt;) and need to refer back to the
+ current child.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;child>...</r&#58;child>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+ children-each-header:
+ Renders the tag contents only if the contents do not match the previous header. This
+ is extremely useful for rendering date headers for a list of child pages.
+
+ If you would like to use several header blocks you may use the @name@ attribute to
+ name the header. When a header is named it will not restart until another header of
+ the same name is different.
+
+ Using the @restart@ attribute you can cause other named headers to restart when the
+ present header changes. Simply specify the names of the other headers in a semicolon
+ separated list.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;header [name="header_name"] [restart="name1[;name2;...]"]>
+ ...
+ </r&#58;header>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+ children-each-if_first:
+ Renders the tag contents only if the current page is the first child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;if_first >
+ ...
+ </r&#58;if_first>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each-if_last:
+ Renders the tag contents only if the current page is the last child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;if_last >
+ ...
+ </r&#58;if_last>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each-unless_first:
+ Renders the tag contents unless the current page is the first child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;unless_first >
+ ...
+ </r&#58;unless_first>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each-unless_last:
+ Renders the tag contents unless the current page is the last child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;unless_last >
+ ...
+ </r&#58;unless_last>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each:
+ Cycles through each of the children. Inside this tag all page attribute tags
+ are mapped to the current child page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each [offset="number"] [limit="number"]
+ [by="published_at|updated_at|created_at|slug|title|keywords|description"]
+ [order="asc|desc"] [status="draft|reviewed|published|hidden|all"]>
+ ...
+ </r&#58;children&#58;each>
+ </code></pre>
+
+ children-first:
+ Returns the first child. Inside this tag all page attribute tags are mapped to
+ the first child. Takes the same ordering options as @<r&#58;children&#58;each>@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;first>...</r&#58;children&#58;first></code></pre>
+
+ children-last:
+ Returns the last child. Inside this tag all page attribute tags are mapped to
+ the last child. Takes the same ordering options as @<r&#58;children&#58;each>@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;last>...</r&#58;children&#58;last></code></pre>
+
+ children:
+ Gives access to a page's children.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children>...</r&#58;children></code></pre>
+
+ comment:
+ Nothing inside a set of comment tags is rendered.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;comment>...</r&#58;comment></code></pre>
+
+ content:
+ Renders the main content of a page. Use the @part@ attribute to select a specific
+ page part. By default the @part@ attribute is set to body. Use the @inherit@
+ attribute to specify that if a page does not have a content part by that name that
+ the tag should render the parent's content part. By default @inherit@ is set to
+ @false@. Use the @contextual@ attribute to force a part inherited from a parent
+ part to be evaluated in the context of the child page. By default 'contextual'
+ is set to true.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;content [part="part_name"] [inherit="true|false"] [contextual="true|false"] /></code></pre>
+
+ cycle:
+ Renders one of the passed values based on a global cycle counter. Use the @reset@
+ attribute to reset the cycle to the beginning. Use the @name@ attribute to track
+ multiple cycles; the default is @cycle@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;cycle values="first, second, third" [reset="true|false"] [name="cycle"] /></code></pre>
+
+ date:
+ Renders the date based on the current page (by default when it was published or created).
+ The format attribute uses the same formating codes used by the Ruby @strftime@ function. By
+ default it's set to @&#37;A, &#37;B &#37;d, &#37;Y@. The @for@ attribute selects which date to render. Valid
+ options are @published_at@, @created_at@, @updated_at@, and @now@. @now@ will render the
+ current date/time, regardless of the page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;date [format="&#37;A, &#37;B &#37;d, &#37;Y"] [for="published_at"]/></code></pre>
+
+ escape_html:
+ Escapes angle brackets, etc. for rendering in an HTML document.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;escape_html>...</r&#58;escape_html></code></pre>
+
+ find:
+ Inside this tag all page related tags refer to the page found at the @url@ attribute.
+ @url@s may be relative or absolute paths.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;find url="value_to_find">...</r&#58;find></code></pre>
+
+ if_ancestor_or_self:
+ Renders the contained elements if the current contextual page is either the actual page or one of its parents.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_ancestor_or_self>...</r&#58;if_ancestor_or_self></code></pre>
+
+ if_children:
+ Renders the contained elements only if the current contextual page has one or
+ more child pages. The @status@ attribute limits the status of found child pages
+ to the given status, the default is @"published"@. @status="all"@ includes all
+ non-virtual pages regardless of status.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_children [status="published"]>...</r&#58;if_children></code></pre>
+
+ if_content:
+ Renders the containing elements if all of the listed parts exist on a page.
+ By default the @part@ attribute is set to @body@, but you may list more than one
+ part by separating them with a comma. Setting the optional @inherit@ to true will
+ search ancestors independently for each part. By default @inherit@ is set to @false@.
+
+ When listing more than one part, you may optionally set the @find@ attribute to @any@
+ so that it will render the containing elements if any of the listed parts are found.
+ By default the @find@ attribute is set to @all@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_content [part="part_name, other_part"] [inherit="true"] [find="any"]>...</r&#58;if_content></code></pre>
+
+ if_dev:
+ Renders the containing elements only if Radiant in is development mode.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_dev>...</r&#58;if_dev></code></pre>
+
+ if_parent:
+ Renders the contained elements only if the current contextual page has a parent, i.e.
+ is not the root page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_parent>...</r&#58;if_parent></code></pre>
+
+ if_self:
+ Renders the contained elements if the current contextual page is also the actual page.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_self>...</r&#58;if_self></code></pre>
+
+ if_url:
+ Renders the containing elements only if the page's url matches the regular expression
+ given in the @matches@ attribute. If the @ignore_case@ attribute is set to false, the
+ match is case sensitive. By default, @ignore_case@ is set to true.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_url matches="regexp" [ignore_case="true|false"]>...</r&#58;if_url></code></pre>
+
+ link:
+ Renders a link to the page. When used as a single tag it uses the page's title
+ for the link name. When used as a double tag the part in between both tags will
+ be used as the link text. The link tag passes all attributes over to the HTML
+ @a@ tag. This is very useful for passing attributes like the @class@ attribute
+ or @id@ attribute. If the @anchor@ attribute is passed to the tag it will
+ append a pound sign (<code>#</code>) followed by the value of the attribute to
+ the @href@ attribute of the HTML @a@ tag--effectively making an HTML anchor.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;link [anchor="name"] [other attributes...] /></code></pre>
+
+ or
+
+ <pre><code><r&#58;link [anchor="name"] [other attributes...]>link text here</r&#58;link></code></pre>
+
+ markdown:
+ Filters its contents with the Markdown filter.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;markdown>** bold text **</r&#58;markdown></code></pre>
+
+ produces
+
+ <pre><code><strong> bold text </strong></code></pre>
+
+ meta-description:
+ Emits the page description field in a meta tag, unless attribute
+ 'tag' is set to 'false'.
+
+ *Usage&#58;*
+
+ <pre><code> <r&#58;meta&#58;description [tag="false"] /> </code></pre>
+
+ meta-keywords:
+ Emits the page keywords field in a meta tag, unless attribute
+ 'tag' is set to 'false'.
+
+ *Usage&#58;*
+
+ <pre><code> <r&#58;meta&#58;keywords [tag="false"] /> </code></pre>
+
+ meta:
+ The namespace for 'meta' attributes. If used as a singleton tag, both the description
+ and keywords fields will be output as &lt;meta /&gt; tags unless the attribute 'tag' is set to 'false'.
+
+ *Usage&#58;*
+
+ <pre><code> <r&#58;meta [tag="false"] />
+ <r&#58;meta>
+ <r&#58;description [tag="false"] />
+ <r&#58;keywords [tag="false"] />
+ </r&#58;meta>
+ </code></pre>
+
+ navigation-if_first:
+ Renders the containing elements if the element is the first
+ in the navigation list
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;normal><r&#58;if_first>...</r&#58;if_first></r&#58;normal></code></pre>
+
+ navigation-if_last:
+ Renders the containing elements if the element is the last
+ in the navigation list
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;normal><r&#58;if_last>...</r&#58;if_last></r&#58;normal></code></pre>
+
+ navigation:
+ Renders a list of links specified in the @urls@ attribute according to three
+ states&#58;
+
+ * @normal@ specifies the normal state for the link
+ * @here@ specifies the state of the link when the url matches the current
+ page's URL
+ * @selected@ specifies the state of the link when the current page matches
+ is a child of the specified url
+ # @if_last@ renders its contents within a @normal@, @here@ or
+ @selected@ tag if the item is the last in the navigation elements
+ # @if_first@ renders its contents within a @normal@, @here@ or
+ @selected@ tag if the item is the first in the navigation elements
+
+ The @between@ tag specifies what should be inserted in between each of the links.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;navigation urls="[Title&#58; url | Title&#58; url | ...]">
+ <r&#58;normal><a href="<r&#58;url />"><r&#58;title /></a></r&#58;normal>
+ <r&#58;here><strong><r&#58;title /></strong></r&#58;here>
+ <r&#58;selected><strong><a href="<r&#58;url />"><r&#58;title /></a></strong></r&#58;selected>
+ <r&#58;between> | </r&#58;between>
+ </r&#58;navigation>
+ </code></pre>
+
+ page:
+ Causes the tags referring to a page's attributes to refer to the current page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;page>...</r&#58;page></code></pre>
+
+ parent:
+ Page attribute tags inside this tag refer to the parent of the current page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;parent>...</r&#58;parent></code></pre>
+
+ random:
+ Randomly renders one of the options specified by the @option@ tags.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;random>
+ <r&#58;option>...</r&#58;option>
+ <r&#58;option>...</r&#58;option>
+ ...
+ <r&#58;random>
+ </code></pre>
+
+ rfc1123_date:
+ Outputs the published date using the format mandated by RFC 1123. (Ideal for RSS feeds.)
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;rfc1123_date /></code></pre>
+
+ slug:
+ Renders the @slug@ attribute of the current page.
+
+ smarty_pants:
+ Filters its contents with the SmartyPants filter.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;smarty_pants>"A revolutionary quotation."</r&#58;smarty_pants></code></pre>
+
+ produces
+
+ <pre><code>&#8220;A revolutionary quotation.&#8221;</code></pre>
+
+ snippet:
+ Renders the snippet specified in the @name@ attribute within the context of a page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;snippet name="snippet_name" /></code></pre>
+
+ When used as a double tag, the part in between both tags may be used within the
+ snippet itself, being substituted in place of @<r&#58;yield/>@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;snippet name="snippet_name">Lorem ipsum dolor...</r&#58;snippet></code></pre>
+
+ status:
+ Prints the page's status as a string. Optional attribute 'downcase'
+ will cause the status to be all lowercase.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;status [downcase='true'] /></code></pre>
+
+ textile:
+ Filters its contents with the Textile filter.
+
+ *Usage*&#58;
+
+ <pre><code><r&#58;textile>
+ * First
+ * Second
+ </r&#58;textile></code></pre>
+
+ produces&#58;
+
+ <pre><code><ul>
+ <li>First</li>
+ <li>Second</li>
+ </ul></code></pre>
+
+ title:
+ Renders the @title@ attribute of the current page.
+
+ unless_ancestor_or_self:
+ Renders the contained elements unless the current contextual page is either the actual page or one of its parents.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_ancestor_or_self>...</r&#58;unless_ancestor_or_self></code></pre>
+
+ unless_children:
+ Renders the contained elements only if the current contextual page has no children.
+ The @status@ attribute limits the status of found child pages to the given status,
+ the default is @"published"@. @status="all"@ includes all non-virtual pages
+ regardless of status.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_children [status="published"]>...</r&#58;unless_children></code></pre>
+
+ unless_content:
+ The opposite of the @if_content@ tag. It renders the contained elements if all of the
+ specified parts do not exist. Setting the optional @inherit@ to true will search
+ ancestors independently for each part. By default @inherit@ is set to @false@.
+
+ When listing more than one part, you may optionally set the @find@ attribute to @any@
+ so that it will not render the containing elements if any of the listed parts are found.
+ By default the @find@ attribute is set to @all@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_content [part="part_name, other_part"] [inherit="false"] [find="any"]>...</r&#58;unless_content></code></pre>
+
+ unless_dev:
+ The opposite of the @if_dev@ tag.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_dev>...</r&#58;unless_dev></code></pre>
+
+ unless_parent:
+ Renders the contained elements only if the current contextual page has no parent, i.e.
+ is the root page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_parent>...</r&#58;unless_parent></code></pre>
+
+ unless_self:
+ Renders the contained elements unless the current contextual page is also the actual page.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_self>...</r&#58;unless_self></code></pre>
+
+ unless_url:
+ The opposite of the @if_url@ tag.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_url matches="regexp" [ignore_case="true|false"]>...</r&#58;unless_url></code></pre>
+
+ url:
+ Renders the @url@ attribute of the current page.
+
+ yield:
+ Used within a snippet as a placeholder for substitution of child content, when
+ the snippet is called as a double tag.
+
+ *Usage (within a snippet)&#58;*
+
+ <pre><code>
+ <div id="outer">
+ <p>before</p>
+ <r&#58;yield/>
+ <p>after</p>
+ </div>
+ </code></pre>
+
+ If the above snippet was named "yielding", you could call it from any Page,
+ Layout or Snippet as follows&#58;
+
+ <pre><code><r&#58;snippet name="yielding">Content within</r&#58;snippet></code></pre>
+
+ Which would output the following&#58;
+
+ <pre><code>
+ <div id="outer">
+ <p>before</p>
+ Content within
+ <p>after</p>
+ </div>
+ </code></pre>
+
+ When called in the context of a Page or a Layout, @<r&#58;yield/>@ outputs nothing.
+
1  vendor/extensions/dutch_language_pack/cucumber.yml
View
@@ -0,0 +1 @@
+default: --format progress features --tags ~@proposed,~@in_progress
9 vendor/extensions/dutch_language_pack/dutch_language_pack_extension.rb
View
@@ -0,0 +1,9 @@
+class DutchLanguagePackExtension < Radiant::Extension
+ version "1.0"
+ description "Provides a Dutch translation for the Radiant admin interface"
+ url "http://yourwebsite.com/nl"
+
+ def activate
+
+ end
+end
16 vendor/extensions/dutch_language_pack/features/support/env.rb
View
@@ -0,0 +1,16 @@
+# Sets up the Rails environment for Cucumber
+ENV["RAILS_ENV"] = "test"
+# Extension root
+extension_env = File.expand_path(File.dirname(__FILE__) + '/../../../../../config/environment')
+require extension_env+'.rb'
+
+Dir.glob(File.join(RADIANT_ROOT, "features", "**", "*.rb")).each {|step| require step}
+
+Cucumber::Rails::World.class_eval do
+ include Dataset
+ datasets_directory "#{RADIANT_ROOT}/spec/datasets"
+ Dataset::Resolver.default = Dataset::DirectoryResolver.new("#{RADIANT_ROOT}/spec/datasets", File.dirname(__FILE__) + '/../../spec/datasets', File.dirname(__FILE__) + '/../datasets')
+ self.datasets_database_dump_path = "#{Rails.root}/tmp/dataset"
+
+ # dataset :nl
+end
14 vendor/extensions/dutch_language_pack/features/support/paths.rb
View
@@ -0,0 +1,14 @@
+def path_to(page_name)
+ case page_name
+
+ when /the homepage/i
+ root_path
+
+ when /login/i
+ login_path
+ # Add more page name => path mappings here
+
+ else
+ raise "Can't find mapping from \"#{page_name}\" to a path."
+ end
+end
28 vendor/extensions/dutch_language_pack/lib/tasks/i18n_nl_extension_tasks.rake
View
@@ -0,0 +1,28 @@
+namespace :radiant do
+ namespace :extensions do
+ namespace :nl do
+
+ desc "Runs the migration of the I18n Nl extension"
+ task :migrate => :environment do
+ require 'radiant/extension_migrator'
+ if ENV["VERSION"]
+ I18nNlExtension.migrator.migrate(ENV["VERSION"].to_i)
+ else
+ I18nNlExtension.migrator.migrate
+ end
+ end
+
+ desc "Copies public assets of the I18n Nl to the instance public/ directory."
+ task :update => :environment do
+ is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
+ puts "Copying assets from I18nNlExtension"
+ Dir[I18nNlExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
+ path = file.sub(I18nNlExtension.root, '')
+ directory = File.dirname(path)
+ mkdir_p RAILS_ROOT + directory, :verbose => false
+ cp file, RAILS_ROOT + path, :verbose => false
+ end
+ end
+ end
+ end
+end
6 vendor/extensions/dutch_language_pack/spec/spec.opts
View
@@ -0,0 +1,6 @@
+--colour
+--format
+progress
+--loadby
+mtime
+--reverse
36 vendor/extensions/dutch_language_pack/spec/spec_helper.rb
View
@@ -0,0 +1,36 @@
+unless defined? RADIANT_ROOT
+ ENV["RAILS_ENV"] = "test"
+ case
+ when ENV["RADIANT_ENV_FILE"]
+ require ENV["RADIANT_ENV_FILE"]
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
+ else
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
+ end
+end
+require "#{RADIANT_ROOT}/spec/spec_helper"
+
+Dataset::Resolver.default << (File.dirname(__FILE__) + "/datasets")
+
+if File.directory?(File.dirname(__FILE__) + "/matchers")
+ Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
+end
+
+Spec::Runner.configure do |config|
+ # config.use_transactional_fixtures = true
+ # config.use_instantiated_fixtures = false
+ # config.fixture_path = RAILS_ROOT + '/spec/fixtures'
+
+ # You can declare fixtures for each behaviour like this:
+ # describe "...." do
+ # fixtures :table_a, :table_b
+ #
+ # Alternatively, if you prefer to declare them only once, you can
+ # do so here, like so ...
+ #
+ # config.global_fixtures = :table_a, :table_b
+ #
+ # If you declare global fixtures, be aware that they will be declared
+ # for all of your examples, even those that don't use them.
+end
3  vendor/extensions/french_language_pack/README
View
@@ -0,0 +1,3 @@
+= I18n Fr
+
+Description goes here
123 vendor/extensions/french_language_pack/Rakefile
View
@@ -0,0 +1,123 @@
+# I think this is the one that should be moved to the extension Rakefile template
+
+# In rails 1.2, plugins aren't available in the path until they're loaded.
+# Check to see if the rspec plugin is installed first and require
+# it if it is. If not, use the gem version.
+
+# Determine where the RSpec plugin is by loading the boot
+unless defined? RADIANT_ROOT
+ ENV["RAILS_ENV"] = "test"
+ case
+ when ENV["RADIANT_ENV_FILE"]
+ require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
+ else
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
+ end
+end
+
+require 'rake'
+require 'rake/rdoctask'
+require 'rake/testtask'
+
+rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
+$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
+require 'spec/rake/spectask'
+require 'cucumber'
+require 'cucumber/rake/task'
+
+# Cleanup the RADIANT_ROOT constant so specs will load the environment
+Object.send(:remove_const, :RADIANT_ROOT)
+
+extension_root = File.expand_path(File.dirname(__FILE__))
+
+task :default => :spec
+task :stats => "spec:statsetup"
+
+desc "Run all specs in spec directory"
+Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+task :features => 'spec:integration'
+
+namespace :spec do
+ desc "Run all specs in spec directory with RCov"
+ Spec::Rake::SpecTask.new(:rcov) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.rcov = true
+ t.rcov_opts = ['--exclude', 'spec', '--rails']
+ end
+
+ desc "Print Specdoc for all specs"
+ Spec::Rake::SpecTask.new(:doc) do |t|
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ end
+
+ [:models, :controllers, :views, :helpers].each do |sub|
+ desc "Run the specs under spec/#{sub}"
+ Spec::Rake::SpecTask.new(sub) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
+ end
+ end
+
+ desc "Run the Cucumber features"
+ Cucumber::Rake::Task.new(:integration) do |t|
+ t.fork = true
+ t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
+ # t.feature_pattern = "#{extension_root}/features/**/*.feature"
+ t.profile = "default"
+ end
+
+ # Setup specs for stats
+ task :statsetup do
+ require 'code_statistics'
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views)
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
+ ::CodeStatistics::TEST_TYPES << "Model specs"
+ ::CodeStatistics::TEST_TYPES << "View specs"
+ ::CodeStatistics::TEST_TYPES << "Controller specs"
+ ::CodeStatistics::TEST_TYPES << "Helper specs"
+ ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
+ end
+
+ namespace :db do
+ namespace :fixtures do
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
+ task :load => :environment do
+ require 'active_record/fixtures'
+ ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
+ Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
+ end
+ end
+ end
+ end
+end
+
+desc 'Generate documentation for the fr extension.'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'I18nFrExtension'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+# For extensions that are in transition
+desc 'Test the fr extension.'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+end
+
+# Load any custom rakefiles for extension
+Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
182 vendor/extensions/french_language_pack/config/locales/fr.yml
View
@@ -0,0 +1,182 @@
+---
+fr:
+ account: 'Account'
+ activerecord:
+ errors:
+ messages:
+ blank: 'obligatoire' # required
+ invalid: 'invalid format' #invalid_format
+ not_a_number: 'doit être un nombre' # must be number
+ taken: 'nom déjà utilisé' # name_in_use
+ too_long: '{{count}}-caractères maximum' # character_limit
+ too_short: '{{count}}-caractères minimum' # character_minimum
+ models:
+ page:
+ attributes:
+ slug:
+ taken: "jeton (slug) déjà utilisé pour l'enfant de ce parent" # slug_in_use
+ user:
+ attributes:
+ email:
+ invalid: 'adresse courriel non valide' # invalid_email
+ login:
+ taken: 'identification déjà utilisée' # login already in use
+ password:
+ confirmation: 'doit être identique à sa confirmation' # password_confirmation
+ add_child: 'Add Child'
+ add_part: 'Add Part'
+ add_tab: "Ajouter Onglet"
+ admin: "Administrateur"
+ available_tags: "Tags disponibles"
+ available_tags_for: 'Tags disponibles pour {{name}}'
+ body: "Body"
+ breadcrumb: 'Breadcrumb'
+ buttons:
+ create: "Créer {{name}}"
+ save_and_continue: "Enregistrer et continuer"
+ save_changes: "Enregistrer les modifications"
+ cancel: "Annuler"
+ change: 'Change'
+ close: "Fermer"
+ content: 'Content'
+ content_type: "Type&#8209;Contenu"
+ creating_status: 'Creating {{model}}&#8230;'
+ date:
+ abbr_day_names: [Di, Lu, Ma, Me, Je, Ve, Sa]
+ abbr_month_names: [~, Jan, Fev, Mar, Avr, Mai, Jun, Jul, Aou, Sep, Oct, Nov, Dec]
+ day_names: [Dimanche, Lundi, Mardi, Mercredi, Jeudi, Vendredi, Samedi]
+ formats:
+ default: "%d.%m.%Y"
+ long: "%e. %B %Y"
+ only_day: "%e"
+ short: "%e. %b"
+ month_names: [~, Janvier, Février, Mars, Avril, Mai, Juin, Juillet, Août, Septembre, Octobre, Novembre, Decembre]
+ order: [:day, :month, :year]
+ delete_layout: "Supprimer Layout"
+ delete_pages: "Supprimer {{pages}}"
+ delete_snippet: 'Delete Snippet'
+ delete_user: 'Delete User'
+ description: 'Description'
+ design: 'Design'
+ designer: 'Designer'
+ draft: "Brouillon"
+ edit_layout: "Modifier Layout"
+ edit_page: "Modifier Page"
+ edit_snippet: "Modifier Snippet"
+ edit_user: "Modifier Utilisateur"
+ email_address: 'E-mail Address'
+ extension: "Extension"
+ extensions: "Extensions"
+ filter: "Filtre"
+ hidden: "Caché"
+ hide: 'Hide'
+ keywords: 'Keywords'
+ language: "Langage"
+ layout: "Layout"
+ layouts: "Layouts"
+ log_out: "Déconnexion"
+ logged_in_as: 'Logged in as'
+ login: "Login"
+ modify: "Modifier"
+ more: "Plus"
+ name: "Nom"
+ new_layout: "Ajouter Layout"
+ new_page: "Nouvelle Page"
+ new_password: 'New Password'
+ new_snippet: "Ajouter Snippet"
+ new_user: "Ajouter Utilisateur"
+ no_pages: "Aucune Page"
+ notes: "Notes"
+ optional: "En option"
+ or: "ou"
+ page: "Page"
+ page_page: 'Page Part'
+ page_title: "Titre"
+ page_type: "Type Page"
+ pages: "Pages"
+ pages_controller:
+ removed_many: "Les pages ont été correctement retirées du site."
+ removed_one: "La page a été correctement retirée du site."
+ saved: "Votre page enregistrée ci-dessous."
+ password: "Mot de passe"
+ password_confirmation: "Confirmer le Mot de passe"
+ personal: 'Personal'
+ personal_preferences: 'Personal Preferences'
+ please_login: 'SVP Identifiez-vous'
+ powered_by: 'Powered by'
+ preferences: "Préférences"
+ preferences_controller:
+ error_updating: "Une erreur a été détectée pendant la modification de vos préférences."
+ updated: "Vos préférences ont été modifiées."
+ published: "Publié"
+ published_at: "Publié le"
+ reference: "Référence"
+ remember_me: "Conserver mes informations"
+ remove: 'Remove'
+ remove_layout: "Retirer Layout"
+ remove_page: 'Remove Page'
+ remove_pages: "Retirer {{pages}}"
+ remove_tab: "Supprimer Onglet"
+ remove_user: 'Remove user'
+ required: "Obligatoire"
+ resource_controller:
+ not_found: "{{humanized_model_name}} could not be found."
+ removed: "{{humanized_model_name}} supprimé."
+ saved: "{{humanized_model_name}} enregistré ci-dessous."
+ update_conflict: "{{humanized_model_name}} a été modifié depuis son affichage. Toute modification ne pourra être enregistrée sans perte potentielle de donnée."
+ validation_errors: "Erreurs de validation pendant le traitement de ce formulaire. SVP examinez son contenu et corrigez les erreurs avant de continuer."
+ reviewed: "Révisé"
+ roles: "Roles"
+ saving_changes: Saving Changes
+ saving_preferences: Saving preferences
+ scheduled: "Scheduled"
+ search_tags: 'Search Tags:'
+ select:
+ inherit: "<hérite de>"
+ none: "<aucun>"
+ normal: "<normal>"
+ settings: 'Settings'
+ slug: 'Slug'
+ snippet: "Snippet"
+ snippets: "Snippets"
+ status: "Statut"
+ # Warnings and info text:
+ testing: Testing
+ text:
+ layouts:
+ remove_warning: "Confirmez-vous la <strong class='warning'>suppression</strong> du layout suivant?"
+ pages:
+ remove_warning: "Confirmez-vous la <strong class='warning'>suppression</strong> des pages suivantes {{pages}}?"
+ snippets:
+ remove_warning: "Confirmez-vous la <strong class='warning'>suppression</strong> des fragments réutilisables (snippet) suivants?"
+ users:
+ remove_warning: 'Are you sure you want to <strong class="warning">permanently remove</strong> the following user?'
+ this_file_language: "Français"
+ time:
+ am: 'AM'
+ formats:
+ datetime:
+ formats:
+ default: "%Y-%m-%dT%H:%M:%S%Z"
+ default: "%a %b %d %H:%M:%S %Z %Y"
+ long: "%B %d, %Y %H:%M"
+ only_second: "%S"
+ short: "%d %b %H:%M"
+ time: "%H:%M"
+ timestamp: "%I:%M <small>%p</small> on %B %d, %Y"
+ pm: 'PM'
+ timestamp:
+ at: "à"
+ by: "par"
+ last_updated: "Dernière modification"
+ user: "Utilisateur"
+ username: "Nom Utilisateur"
+ users: "Utilisateurs"
+ users_controller:
+ cannot_delete_self: "Vous ne pouvez pas vous supprimer vous-même!. "
+ version: "Version"
+ view_site: "Afficher le site"
+ website: "Website"
+ welcome_controller:
+ invalid_user: "Nom ou mot de passe invalide."
+ logged_out: "Vous n'êtes plus identifié(e)'"
553 vendor/extensions/french_language_pack/config/locales/fr_available_tags.yml
View
@@ -0,0 +1,553 @@
+---
+fr:
+ desc:
+ author:
+ Renders the name of the author of the current page.
+
+ breadcrumb:
+ Renders the @breadcrumb@ attribute of the current page.
+
+ breadcrumbs:
+ Renders a trail of breadcrumbs to the current page. The separator attribute
+ specifies the HTML fragment that is inserted between each of the breadcrumbs. By
+ default it is set to @>@. The boolean nolinks attribute can be specified to render
+ breadcrumbs in plain text, without any links (useful when generating title tag).
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;breadcrumbs [separator="separator_string"] [nolinks="true"] /></code></pre>
+
+ children-count:
+ Renders the total number of children.
+
+ children-each-child:
+ Page attribute tags inside of this tag refer to the current child. This is occasionally
+ useful if you are inside of another tag (like &lt;r&#58;find&gt;) and need to refer back to the
+ current child.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;child>...</r&#58;child>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+ children-each-header:
+ Renders the tag contents only if the contents do not match the previous header. This
+ is extremely useful for rendering date headers for a list of child pages.
+
+ If you would like to use several header blocks you may use the @name@ attribute to
+ name the header. When a header is named it will not restart until another header of
+ the same name is different.
+
+ Using the @restart@ attribute you can cause other named headers to restart when the
+ present header changes. Simply specify the names of the other headers in a semicolon
+ separated list.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;header [name="header_name"] [restart="name1[;name2;...]"]>
+ ...
+ </r&#58;header>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+ children-each-if_first:
+ Renders the tag contents only if the current page is the first child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;if_first >
+ ...
+ </r&#58;if_first>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each-if_last:
+ Renders the tag contents only if the current page is the last child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;if_last >
+ ...
+ </r&#58;if_last>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each-unless_first:
+ Renders the tag contents unless the current page is the first child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;unless_first >
+ ...
+ </r&#58;unless_first>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each-unless_last:
+ Renders the tag contents unless the current page is the last child in the context of
+ a children&#58;each tag
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each>
+ <r&#58;unless_last >
+ ...
+ </r&#58;unless_last>
+ </r&#58;children&#58;each>
+ </code></pre>
+
+
+ children-each:
+ Cycles through each of the children. Inside this tag all page attribute tags
+ are mapped to the current child page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;each [offset="number"] [limit="number"]
+ [by="published_at|updated_at|created_at|slug|title|keywords|description"]
+ [order="asc|desc"] [status="draft|reviewed|published|hidden|all"]>
+ ...
+ </r&#58;children&#58;each>
+ </code></pre>
+
+ children-first:
+ Returns the first child. Inside this tag all page attribute tags are mapped to
+ the first child. Takes the same ordering options as @<r&#58;children&#58;each>@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;first>...</r&#58;children&#58;first></code></pre>
+
+ children-last:
+ Returns the last child. Inside this tag all page attribute tags are mapped to
+ the last child. Takes the same ordering options as @<r&#58;children&#58;each>@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children&#58;last>...</r&#58;children&#58;last></code></pre>
+
+ children:
+ Gives access to a page's children.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;children>...</r&#58;children></code></pre>
+
+ comment:
+ Nothing inside a set of comment tags is rendered.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;comment>...</r&#58;comment></code></pre>
+
+ content:
+ Renders the main content of a page. Use the @part@ attribute to select a specific
+ page part. By default the @part@ attribute is set to body. Use the @inherit@
+ attribute to specify that if a page does not have a content part by that name that
+ the tag should render the parent's content part. By default @inherit@ is set to
+ @false@. Use the @contextual@ attribute to force a part inherited from a parent
+ part to be evaluated in the context of the child page. By default 'contextual'
+ is set to true.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;content [part="part_name"] [inherit="true|false"] [contextual="true|false"] /></code></pre>
+
+ cycle:
+ Renders one of the passed values based on a global cycle counter. Use the @reset@
+ attribute to reset the cycle to the beginning. Use the @name@ attribute to track
+ multiple cycles; the default is @cycle@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;cycle values="first, second, third" [reset="true|false"] [name="cycle"] /></code></pre>
+
+ date:
+ Renders the date based on the current page (by default when it was published or created).
+ The format attribute uses the same formating codes used by the Ruby @strftime@ function. By
+ default it's set to @&#37;A, &#37;B &#37;d, &#37;Y@. The @for@ attribute selects which date to render. Valid
+ options are @published_at@, @created_at@, @updated_at@, and @now@. @now@ will render the
+ current date/time, regardless of the page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;date [format="&#37;A, &#37;B &#37;d, &#37;Y"] [for="published_at"]/></code></pre>
+
+ escape_html:
+ Escapes angle brackets, etc. for rendering in an HTML document.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;escape_html>...</r&#58;escape_html></code></pre>
+
+ find:
+ Inside this tag all page related tags refer to the page found at the @url@ attribute.
+ @url@s may be relative or absolute paths.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;find url="value_to_find">...</r&#58;find></code></pre>
+
+ if_ancestor_or_self:
+ Renders the contained elements if the current contextual page is either the actual page or one of its parents.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_ancestor_or_self>...</r&#58;if_ancestor_or_self></code></pre>
+
+ if_children:
+ Renders the contained elements only if the current contextual page has one or
+ more child pages. The @status@ attribute limits the status of found child pages
+ to the given status, the default is @"published"@. @status="all"@ includes all
+ non-virtual pages regardless of status.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_children [status="published"]>...</r&#58;if_children></code></pre>
+
+ if_content:
+ Renders the containing elements if all of the listed parts exist on a page.
+ By default the @part@ attribute is set to @body@, but you may list more than one
+ part by separating them with a comma. Setting the optional @inherit@ to true will
+ search ancestors independently for each part. By default @inherit@ is set to @false@.
+
+ When listing more than one part, you may optionally set the @find@ attribute to @any@
+ so that it will render the containing elements if any of the listed parts are found.
+ By default the @find@ attribute is set to @all@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_content [part="part_name, other_part"] [inherit="true"] [find="any"]>...</r&#58;if_content></code></pre>
+
+ if_dev:
+ Renders the containing elements only if Radiant in is development mode.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_dev>...</r&#58;if_dev></code></pre>
+
+ if_parent:
+ Renders the contained elements only if the current contextual page has a parent, i.e.
+ is not the root page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_parent>...</r&#58;if_parent></code></pre>
+
+ if_self:
+ Renders the contained elements if the current contextual page is also the actual page.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_self>...</r&#58;if_self></code></pre>
+
+ if_url:
+ Renders the containing elements only if the page's url matches the regular expression
+ given in the @matches@ attribute. If the @ignore_case@ attribute is set to false, the
+ match is case sensitive. By default, @ignore_case@ is set to true.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;if_url matches="regexp" [ignore_case="true|false"]>...</r&#58;if_url></code></pre>
+
+ link:
+ Renders a link to the page. When used as a single tag it uses the page's title
+ for the link name. When used as a double tag the part in between both tags will
+ be used as the link text. The link tag passes all attributes over to the HTML
+ @a@ tag. This is very useful for passing attributes like the @class@ attribute
+ or @id@ attribute. If the @anchor@ attribute is passed to the tag it will
+ append a pound sign (<code>#</code>) followed by the value of the attribute to
+ the @href@ attribute of the HTML @a@ tag--effectively making an HTML anchor.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;link [anchor="name"] [other attributes...] /></code></pre>
+
+ or
+
+ <pre><code><r&#58;link [anchor="name"] [other attributes...]>link text here</r&#58;link></code></pre>
+
+ markdown:
+ Filters its contents with the Markdown filter.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;markdown>** bold text **</r&#58;markdown></code></pre>
+
+ produces
+
+ <pre><code><strong> bold text </strong></code></pre>
+
+ meta-description:
+ Emits the page description field in a meta tag, unless attribute
+ 'tag' is set to 'false'.
+
+ *Usage&#58;*
+
+ <pre><code> <r&#58;meta&#58;description [tag="false"] /> </code></pre>
+
+ meta-keywords:
+ Emits the page keywords field in a meta tag, unless attribute
+ 'tag' is set to 'false'.
+
+ *Usage&#58;*
+
+ <pre><code> <r&#58;meta&#58;keywords [tag="false"] /> </code></pre>
+
+ meta:
+ The namespace for 'meta' attributes. If used as a singleton tag, both the description
+ and keywords fields will be output as &lt;meta /&gt; tags unless the attribute 'tag' is set to 'false'.
+
+ *Usage&#58;*
+
+ <pre><code> <r&#58;meta [tag="false"] />
+ <r&#58;meta>
+ <r&#58;description [tag="false"] />
+ <r&#58;keywords [tag="false"] />
+ </r&#58;meta>
+ </code></pre>
+
+ navigation-if_first:
+ Renders the containing elements if the element is the first
+ in the navigation list
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;normal><r&#58;if_first>...</r&#58;if_first></r&#58;normal></code></pre>
+
+ navigation-if_last:
+ Renders the containing elements if the element is the last
+ in the navigation list
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;normal><r&#58;if_last>...</r&#58;if_last></r&#58;normal></code></pre>
+
+ navigation:
+ Renders a list of links specified in the @urls@ attribute according to three
+ states&#58;
+
+ * @normal@ specifies the normal state for the link
+ * @here@ specifies the state of the link when the url matches the current
+ page's URL
+ * @selected@ specifies the state of the link when the current page matches
+ is a child of the specified url
+ # @if_last@ renders its contents within a @normal@, @here@ or
+ @selected@ tag if the item is the last in the navigation elements
+ # @if_first@ renders its contents within a @normal@, @here@ or
+ @selected@ tag if the item is the first in the navigation elements
+
+ The @between@ tag specifies what should be inserted in between each of the links.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;navigation urls="[Title&#58; url | Title&#58; url | ...]">
+ <r&#58;normal><a href="<r&#58;url />"><r&#58;title /></a></r&#58;normal>
+ <r&#58;here><strong><r&#58;title /></strong></r&#58;here>
+ <r&#58;selected><strong><a href="<r&#58;url />"><r&#58;title /></a></strong></r&#58;selected>
+ <r&#58;between> | </r&#58;between>
+ </r&#58;navigation>
+ </code></pre>
+
+ page:
+ Causes the tags referring to a page's attributes to refer to the current page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;page>...</r&#58;page></code></pre>
+
+ parent:
+ Page attribute tags inside this tag refer to the parent of the current page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;parent>...</r&#58;parent></code></pre>
+
+ random:
+ Randomly renders one of the options specified by the @option@ tags.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;random>
+ <r&#58;option>...</r&#58;option>
+ <r&#58;option>...</r&#58;option>
+ ...
+ <r&#58;random>
+ </code></pre>
+
+ rfc1123_date:
+ Outputs the published date using the format mandated by RFC 1123. (Ideal for RSS feeds.)
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;rfc1123_date /></code></pre>
+
+ slug:
+ Renders the @slug@ attribute of the current page.
+
+ smarty_pants:
+ Filters its contents with the SmartyPants filter.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;smarty_pants>"A revolutionary quotation."</r&#58;smarty_pants></code></pre>
+
+ produces
+
+ <pre><code>&#8220;A revolutionary quotation.&#8221;</code></pre>
+
+ snippet:
+ Renders the snippet specified in the @name@ attribute within the context of a page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;snippet name="snippet_name" /></code></pre>
+
+ When used as a double tag, the part in between both tags may be used within the
+ snippet itself, being substituted in place of @<r&#58;yield/>@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;snippet name="snippet_name">Lorem ipsum dolor...</r&#58;snippet></code></pre>
+
+ status:
+ Prints the page's status as a string. Optional attribute 'downcase'
+ will cause the status to be all lowercase.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;status [downcase='true'] /></code></pre>
+
+ textile:
+ Filters its contents with the Textile filter.
+
+ *Usage*&#58;
+
+ <pre><code><r&#58;textile>
+ * First
+ * Second
+ </r&#58;textile></code></pre>
+
+ produces&#58;
+
+ <pre><code><ul>
+ <li>First</li>
+ <li>Second</li>
+ </ul></code></pre>
+
+ title:
+ Renders the @title@ attribute of the current page.
+
+ unless_ancestor_or_self:
+ Renders the contained elements unless the current contextual page is either the actual page or one of its parents.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_ancestor_or_self>...</r&#58;unless_ancestor_or_self></code></pre>
+
+ unless_children:
+ Renders the contained elements only if the current contextual page has no children.
+ The @status@ attribute limits the status of found child pages to the given status,
+ the default is @"published"@. @status="all"@ includes all non-virtual pages
+ regardless of status.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_children [status="published"]>...</r&#58;unless_children></code></pre>
+
+ unless_content:
+ The opposite of the @if_content@ tag. It renders the contained elements if all of the
+ specified parts do not exist. Setting the optional @inherit@ to true will search
+ ancestors independently for each part. By default @inherit@ is set to @false@.
+
+ When listing more than one part, you may optionally set the @find@ attribute to @any@
+ so that it will not render the containing elements if any of the listed parts are found.
+ By default the @find@ attribute is set to @all@.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_content [part="part_name, other_part"] [inherit="false"] [find="any"]>...</r&#58;unless_content></code></pre>
+
+ unless_dev:
+ The opposite of the @if_dev@ tag.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_dev>...</r&#58;unless_dev></code></pre>
+
+ unless_parent:
+ Renders the contained elements only if the current contextual page has no parent, i.e.
+ is the root page.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_parent>...</r&#58;unless_parent></code></pre>
+
+ unless_self:
+ Renders the contained elements unless the current contextual page is also the actual page.
+
+ 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.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_self>...</r&#58;unless_self></code></pre>
+
+ unless_url:
+ The opposite of the @if_url@ tag.
+
+ *Usage&#58;*
+
+ <pre><code><r&#58;unless_url matches="regexp" [ignore_case="true|false"]>...</r&#58;unless_url></code></pre>
+
+ url:
+ Renders the @url@ attribute of the current page.
+
+ yield:
+ Used within a snippet as a placeholder for substitution of child content, when
+ the snippet is called as a double tag.
+
+ *Usage (within a snippet)&#58;*
+
+ <pre><code>
+ <div id="outer">
+ <p>before</p>
+ <r&#58;yield/>
+ <p>after</p>
+ </div>
+ </code></pre>
+
+ If the above snippet was named "yielding", you could call it from any Page,
+ Layout or Snippet as follows&#58;
+
+ <pre><code><r&#58;snippet name="yielding">Content within</r&#58;snippet></code></pre>
+
+ Which would output the following&#58;
+
+ <pre><code>
+ <div id="outer">
+ <p>before</p>
+ Content within
+ <p>after</p>
+ </div>
+ </code></pre>
+
+ When called in the context of a Page or a Layout, @<r&#58;yield/>@ outputs nothing.
+
1  vendor/extensions/french_language_pack/cucumber.yml
View
@@ -0,0 +1 @@
+default: --format progress features --tags ~@proposed,~@in_progress
16 vendor/extensions/french_language_pack/features/support/env.rb
View
@@ -0,0 +1,16 @@
+# Sets up the Rails environment for Cucumber
+ENV["RAILS_ENV"] = "test"
+# Extension root
+extension_env = File.expand_path(File.dirname(__FILE__) + '/../../../../../config/environment')
+require extension_env+'.rb'
+
+Dir.glob(File.join(RADIANT_ROOT, "features", "**", "*.rb")).each {|step| require step}
+
+Cucumber::Rails::World.class_eval do
+ include Dataset
+ datasets_directory "#{RADIANT_ROOT}/spec/datasets"
+ Dataset::Resolver.default = Dataset::DirectoryResolver.new("#{RADIANT_ROOT}/spec/datasets", File.dirname(__FILE__) + '/../../spec/datasets', File.dirname(__FILE__) + '/../datasets')
+ self.datasets_database_dump_path = "#{Rails.root}/tmp/dataset"
+
+ # dataset :fr
+end
14 vendor/extensions/french_language_pack/features/support/paths.rb
View
@@ -0,0 +1,14 @@
+def path_to(page_name)
+ case page_name
+
+ when /the homepage/i
+ root_path
+
+ when /login/i
+ login_path
+ # Add more page name => path mappings here
+
+ else
+ raise "Can't find mapping from \"#{page_name}\" to a path."
+ end
+end
9 vendor/extensions/french_language_pack/french_language_pack_extension.rb
View
@@ -0,0 +1,9 @@
+class FrenchLanguagePackExtension < Radiant::Extension
+ version "1.0"
+ description "Provides a French translation for the Radiant admin interface"
+ url "http://yourwebsite.com/fr"
+
+ def activate
+
+ end
+end
28 vendor/extensions/french_language_pack/lib/tasks/i18n_fr_extension_tasks.rake
View
@@ -0,0 +1,28 @@
+namespace :radiant do
+ namespace :extensions do
+ namespace :fr do
+
+ desc "Runs the migration of the I18n Fr extension"
+ task :migrate => :environment do
+ require 'radiant/extension_migrator'
+ if ENV["VERSION"]
+ I18nFrExtension.migrator.migrate(ENV["VERSION"].to_i)
+ else
+ I18nFrExtension.migrator.migrate
+ end
+ end
+
+ desc "Copies public assets of the I18n Fr to the instance public/ directory."
+ task :update => :environment do
+ is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
+ puts "Copying assets from I18nFrExtension"
+ Dir[I18nFrExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
+ path = file.sub(I18nFrExtension.root, '')
+ directory = File.dirname(path)
+ mkdir_p RAILS_ROOT + directory, :verbose => false
+ cp file, RAILS_ROOT + path, :verbose => false
+ end
+ end
+ end
+ end
+end
6 vendor/extensions/french_language_pack/spec/spec.opts
View
@@ -0,0 +1,6 @@
+--colour
+--format
+progress
+--loadby
+mtime
+--reverse
36 vendor/extensions/french_language_pack/spec/spec_helper.rb
View
@@ -0,0 +1,36 @@
+unless defined? RADIANT_ROOT
+ ENV["RAILS_ENV"] = "test"
+ case
+ when ENV["RADIANT_ENV_FILE"]
+ require ENV["RADIANT_ENV_FILE"]
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../../")}/config/environment"
+ else
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../")}/config/environment"
+ end
+end
+require "#{RADIANT_ROOT}/spec/spec_helper"
+
+Dataset::Resolver.default << (File.dirname(__FILE__) + "/datasets")
+
+if File.directory?(File.dirname(__FILE__) + "/matchers")
+ Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
+end
+
+Spec::Runner.configure do |config|
+ # config.use_transactional_fixtures = true
+ # config.use_instantiated_fixtures = false
+ # config.fixture_path = RAILS_ROOT + '/spec/fixtures'
+
+ # You can declare fixtures for each behaviour like this:
+ # describe "...." do
+ # fixtures :table_a, :table_b
+ #
+ # Alternatively, if you prefer to declare them only once, you can
+ # do so here, like so ...
+ #
+ # config.global_fixtures = :table_a, :table_b
+ #
+ # If you declare global fixtures, be aware that they will be declared
+ # for all of your examples, even those that don't use them.
+end
3  vendor/extensions/german_language_pack/README
View
@@ -0,0 +1,3 @@
+= I18n De
+
+Description goes here
123 vendor/extensions/german_language_pack/Rakefile
View
@@ -0,0 +1,123 @@
+# I think this is the one that should be moved to the extension Rakefile template
+
+# In rails 1.2, plugins aren't available in the path until they're loaded.
+# Check to see if the rspec plugin is installed first and require
+# it if it is. If not, use the gem version.
+
+# Determine where the RSpec plugin is by loading the boot
+unless defined? RADIANT_ROOT
+ ENV["RAILS_ENV"] = "test"
+ case
+ when ENV["RADIANT_ENV_FILE"]
+ require File.dirname(ENV["RADIANT_ENV_FILE"]) + "/boot"
+ when File.dirname(__FILE__) =~ %r{vendor/radiant/vendor/extensions}
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../../../")}/config/boot"
+ else
+ require "#{File.expand_path(File.dirname(__FILE__) + "/../../../")}/config/boot"
+ end
+end
+
+require 'rake'
+require 'rake/rdoctask'
+require 'rake/testtask'
+
+rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
+$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
+require 'spec/rake/spectask'
+require 'cucumber'
+require 'cucumber/rake/task'
+
+# Cleanup the RADIANT_ROOT constant so specs will load the environment
+Object.send(:remove_const, :RADIANT_ROOT)
+
+extension_root = File.expand_path(File.dirname(__FILE__))
+
+task :default => :spec
+task :stats => "spec:statsetup"
+
+desc "Run all specs in spec directory"
+Spec::Rake::SpecTask.new(:spec) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+task :features => 'spec:integration'
+
+namespace :spec do
+ desc "Run all specs in spec directory with RCov"
+ Spec::Rake::SpecTask.new(:rcov) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.rcov = true
+ t.rcov_opts = ['--exclude', 'spec', '--rails']
+ end
+
+ desc "Print Specdoc for all specs"
+ Spec::Rake::SpecTask.new(:doc) do |t|
+ t.spec_opts = ["--format", "specdoc", "--dry-run"]
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ end
+
+ [:models, :controllers, :views, :helpers].each do |sub|
+ desc "Run the specs under spec/#{sub}"
+ Spec::Rake::SpecTask.new(sub) do |t|
+ t.spec_opts = ['--options', "\"#{extension_root}/spec/spec.opts\""]
+ t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
+ end
+ end
+
+ desc "Run the Cucumber features"
+ Cucumber::Rake::Task.new(:integration) do |t|
+ t.fork = true
+ t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
+ # t.feature_pattern = "#{extension_root}/features/**/*.feature"
+ t.profile = "default"
+ end
+
+ # Setup specs for stats
+ task :statsetup do
+ require 'code_statistics'
+ ::STATS_DIRECTORIES << %w(Model\ specs spec/models)
+ ::STATS_DIRECTORIES << %w(View\ specs spec/views)
+ ::STATS_DIRECTORIES << %w(Controller\ specs spec/controllers)
+ ::STATS_DIRECTORIES << %w(Helper\ specs spec/views)
+ ::CodeStatistics::TEST_TYPES << "Model specs"
+ ::CodeStatistics::TEST_TYPES << "View specs"
+ ::CodeStatistics::TEST_TYPES << "Controller specs"
+ ::CodeStatistics::TEST_TYPES << "Helper specs"
+ ::STATS_DIRECTORIES.delete_if {|a| a[0] =~ /test/}
+ end
+
+ namespace :db do
+ namespace :fixtures do
+ desc "Load fixtures (from spec/fixtures) into the current environment's database. Load specific fixtures using FIXTURES=x,y"
+ task :load => :environment do
+ require 'active_record/fixtures'
+ ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym)
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'spec', 'fixtures', '*.{yml,csv}'))).each do |fixture_file|
+ Fixtures.create_fixtures('spec/fixtures', File.basename(fixture_file, '.*'))
+ end
+ end
+ end
+ end
+end
+
+desc 'Generate documentation for the de extension.'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'I18nDeExtension'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+# For extensions that are in transition
+desc 'Test the de extension.'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+end
+
+# Load any custom rakefiles for extension
+Dir[File.dirname(__FILE__) + '/tasks/*.rake'].sort.each { |f| require f }
182 vendor/extensions/german_language_pack/config/locales/de.yml
View
@@ -0,0 +1,182 @@
+---
+de:
+ account: 'Konto'
+ activerecord:
+ errors:
+ messages:
+ blank: 'obligatorisch' # required
+ invalid: 'ungültiges Format' #invalid_format
+ not_a_number: 'Muss eine Zahl sein' # must be number
+ taken: 'Name schon in Benutzung' # name_in_use
+ too_long: '{{count}}-Zeichnen-Limit' # character_limit
+ too_short: '{{count}}-Zeichen-Minimum' # character_minimum
+ models:
+ page:
+ attributes:
+ slug:
+ taken: 'Slug schon in Benutzung als Kind der Elternseite' # slug_in_use
+ user:
+ attributes:
+ email:
+ invalid: 'ungülitge E-Mail-Adresse' # invalid_email
+ login:
+ taken: 'Login schon in Benutzung' # login already in use
+ password:
+ confirmation: 'muss der Bestätigung entsprechen' # password_confirmation
+ add_child: 'Neue Unterseite'
+ add_part: 'Neues Part'
+ add_tab: 'fügt Tab ein'
+ admin: 'Administrator'
+ available_tags: 'Available Tags'
+ available_tags_for: 'Available Tags for {{name}}'
+ body: 'Body'
+ breadcrumb: 'Breadcrumb'
+ buttons:
+ create: '{{name}} erstellen'
+ save_and_continue: 'Sichern und bearbeiten'
+ save_changes: 'Änderungen sichern'
+ cancel: 'Zurück'
+ change: 'Ändern'
+ close: 'Schliessen'
+ content: 'Inhalt'
+ content_type: 'Inhalt&#8209;Typ'
+ creating_status: 'Creating {{model}}&#8230;'
+ date:
+ abbr_day_names: [So, Mo, Di, Mi, Do, Fr, Sa]
+ abbr_month_names: [~, Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez]
+ day_names: [Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag]
+ formats:
+ default: "%d.%m.%Y"
+ long: "%e. %B %Y"
+ only_day: "%e"
+ short: "%e. %b"
+ month_names: [~, Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
+ order: [:day, :month, :year]
+ delete_layout: 'Layout löschen'
+ delete_pages: 'lösche {{pages}}'
+ delete_snippet: 'Snippet löschen'
+ delete_user: 'Benutzer Löschen'
+ description: 'Beschreibung'
+ design: 'Design'
+ designer: 'Designer'
+ draft: 'Entwurf'
+ edit_layout: 'Layout bearbeiten'
+ edit_page: 'Seite bearbeiten'
+ edit_snippet: 'Snippet bearbeiten'
+ edit_user: 'Benutzer bearbeiten'
+ email_address: 'E-Mail Adresse'
+ extension: 'Erweiterung'