diff options
| author | Alban Peignier | 2016-11-20 22:38:47 +0100 |
|---|---|---|
| committer | Alban Peignier | 2016-11-20 22:38:47 +0100 |
| commit | 85fd6480daebe50e423ba27bce772c7b7f86fbf6 (patch) | |
| tree | 04285d132e00fa82cb4786f946a605ac9f549795 /config | |
| parent | 7b05ae21fc9421b81fc071976f3bb98ed7c87f43 (diff) | |
| parent | 65c8a96a00f8d3afbd02cfb019b34f39ad44bc3e (diff) | |
| download | chouette-core-85fd6480daebe50e423ba27bce772c7b7f86fbf6.tar.bz2 | |
Merge branch 'master' into staging
Diffstat (limited to 'config')
26 files changed, 594 insertions, 146 deletions
diff --git a/config/application.rb b/config/application.rb index 52da477a5..70b927855 100644 --- a/config/application.rb +++ b/config/application.rb @@ -26,5 +26,20 @@ module ChouetteIhm # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.default_locale = :fr + + # Configure Browserify to use babelify to compile ES6 + config.browserify_rails.commandline_options = "-t [ babelify --presets [ react es2015 ] ]" + + config.active_record.observers = :route_observer + + unless Rails.env.production? + # Work around sprockets+teaspoon mismatch: + Rails.application.config.assets.precompile += %w(spec_helper.js) + # Make sure Browserify is triggered when + # asked to serve javascript spec files + config.browserify_rails.paths << lambda { |p| + p.start_with?(Rails.root.join("spec/javascripts").to_s) + } + end end end diff --git a/config/deploy.rb b/config/deploy.rb index cd6391ec3..bfbcabb4e 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -23,6 +23,11 @@ ssh_options[:forward_agent] = true require "bundler/capistrano" require 'whenever/capistrano' +require 'capistrano/npm' +set :npm_options, '--production --silent --no-progress' + +after 'deploy:finalize_update', 'npm:install' + # Whenever set :whenever_variables, ->{ "'environment=#{fetch :whenever_environment}&bundle_command=bin/bundle exec&additionnal_path=/var/lib/gems/2.2.0/bin'" } # invoke bin/bundle to use 'correct' ruby environment @@ -73,10 +78,3 @@ namespace :deploy do run "cd #{current_path} && #{bundle_cmd} exec /var/lib/gems/2.2.0/bin/rake db:seed RAILS_ENV=#{rails_env}" end end - -namespace :delayed_job do - task :restart do - run "sudo /etc/init.d/stif-boiv restart" - end - # after "deploy:restart", "delayed_job:restart" -end diff --git a/config/initializers/apartment.rb b/config/initializers/apartment.rb index db352fa6f..b439821d2 100644 --- a/config/initializers/apartment.rb +++ b/config/initializers/apartment.rb @@ -19,9 +19,9 @@ Apartment.configure do |config| # config.excluded_models = [ "Referential", + "ReferentialMetadata", "Organisation", "User", - "Delayed::Backend::ActiveRecord::Job", "Api::V1::ApiKey", "RuleParameterSet", "StopAreaReferential", @@ -34,7 +34,11 @@ Apartment.configure do |config| "Chouette::Line", "Chouette::GroupOfLine", "Chouette::Company", - "Chouette::Network" + "Chouette::Network", + "ReferentialCloning", + "Workbench", + "CleanUp", + "CleanUpResult" ] # use postgres schemas? diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index d2f4ec33a..928236c4a 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -5,4 +5,4 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -# Rails.application.config.assets.precompile += %w( search.js ) +Rails.application.config.assets.precompile += %w( es6_browserified/*.js ) diff --git a/config/initializers/delayed_job_config.rb b/config/initializers/delayed_job_config.rb deleted file mode 100644 index 147b2550e..000000000 --- a/config/initializers/delayed_job_config.rb +++ /dev/null @@ -1,6 +0,0 @@ -# config/initializers/delayed_job_config.rb -#Delayed::Job.destroy_failed_jobs = false -silence_warnings do - Delayed::Job.const_set("MAX_ATTEMPTS", 1) - Delayed::Job.const_set("MAX_RUN_TIME", 12.hours) -end
\ No newline at end of file diff --git a/config/initializers/devise_async.rb b/config/initializers/devise_async.rb index 3ee0a7858..10f4d98b6 100644 --- a/config/initializers/devise_async.rb +++ b/config/initializers/devise_async.rb @@ -1,2 +1,2 @@ -Devise::Async.backend = :delayed_job +Devise::Async.backend = :sidekiq Devise::Async.enabled = false # Set to true to use Delayed Job for asynchronous mail diff --git a/config/initializers/postgresql_adapter_patch.rb b/config/initializers/postgresql_adapter_patch.rb index ae228f62f..2e4d73f85 100644 --- a/config/initializers/postgresql_adapter_patch.rb +++ b/config/initializers/postgresql_adapter_patch.rb @@ -10,3 +10,45 @@ # end # end # ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:primary_key] = "bigserial primary key" + +# Add missing double-quote to write array of daterange in SQL query +# See #1782 + +class ActiveRecord::ConnectionAdapters::PostgreSQLColumn + + def self.array_to_string(value, column, adapter) + casted_values = value.map do |val| + if String === val + if val == "NULL" + "\"#{val}\"" + else + quote_and_escape(adapter.type_cast(val, column, true)) + end + elsif Range === val + casted_value = adapter.type_cast(val, column, true) + "\"#{casted_value}\"" + else + adapter.type_cast(val, column, true) + end + end + "{#{casted_values.join(',')}}" + end + +end + +module ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID + class DateRange < Range + # Unnormalize daterange + # [2016-11-19,2016-12-26) -> 2016-11-19..2016-12-25 + def type_cast(value) + result = super value + + if result.respond_to?(:exclude_end?) && result.exclude_end? + ::Range.new(result.begin, result.end - 1, false) + else + result + end + end + end + register_type 'daterange', DateRange.new(:date) +end diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index d5492e529..472863fa8 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -5,8 +5,9 @@ SimpleForm.setup do |config| # wrapper, change the order or even add your own to the # stack. The options given below are used to wrap the # whole input. - config.wrappers :default, class: :input, - hint_class: :field_with_hint, error_class: :field_with_errors do |b| + config.wrappers :default, class: 'form-group', + error_class: 'has-error' do |b| + # hint_class: :field_with_hint, error_class: :field_with_errors do |b| ## Extensions enabled by default # Any of these extensions can be disabled for a # given input by passing: `f.input EXTENSION_NAME => false`. @@ -41,8 +42,8 @@ SimpleForm.setup do |config| ## Inputs b.use :label_input - b.use :hint, wrap_with: { tag: :span, class: :hint } b.use :error, wrap_with: { tag: :span, class: :error } + b.use :hint, wrap_with: { tag: :span, class: :hint } ## full_messages_for # If you want to display the full error message for the attribute, you can @@ -72,7 +73,7 @@ SimpleForm.setup do |config| config.error_notification_tag = :div # CSS class to add for error notification helper. - config.error_notification_class = 'error_notification' + config.error_notification_class = 'alert alert-error' # ID to add for error notification helper. # config.error_notification_id = nil @@ -90,25 +91,24 @@ SimpleForm.setup do |config| # config.collection_wrapper_class = nil # You can wrap each item in a collection of radio/check boxes with a tag, - # defaulting to :span. Please note that when using :boolean_style = :nested, - # SimpleForm will force this option to be a label. + # defaulting to :span. # config.item_wrapper_tag = :span # You can define a class to use in all item wrappers. Defaulting to none. # config.item_wrapper_class = nil # How the label text should be generated altogether with the required text. - # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" } + config.label_text = lambda { |label, required, explicit_label| "#{label} #{required}" } # You can define the class to use on all labels. Default is nil. # config.label_class = nil # You can define the default class to be used on forms. Can be overriden # with `html: { :class }`. Defaulting to none. - # config.default_form_class = nil + config.default_form_class = 'form' # You can define which elements should obtain additional classes - # config.generate_additional_classes_for = [:wrapper, :label, :input] + config.generate_additional_classes_for = [:label, :input] # Whether attributes are required by default (or not). Default is true. # config.required_by_default = true diff --git a/config/initializers/simple_form_bootstrap.rb b/config/initializers/simple_form_bootstrap.rb index 4f4dc23b3..be0f4bf55 100644 --- a/config/initializers/simple_form_bootstrap.rb +++ b/config/initializers/simple_form_bootstrap.rb @@ -14,8 +14,8 @@ SimpleForm.setup do |config| b.use :label, class: 'control-label' b.use :input, class: 'form-control' - b.use :error, wrap_with: { tag: 'span', class: 'help-block' } - b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + b.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + b.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| @@ -26,8 +26,8 @@ SimpleForm.setup do |config| b.use :label, class: 'control-label' b.use :input - b.use :error, wrap_with: { tag: 'span', class: 'help-block' } - b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + b.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + b.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| @@ -38,8 +38,8 @@ SimpleForm.setup do |config| ba.use :label_input end - b.use :error, wrap_with: { tag: 'span', class: 'help-block' } - b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + b.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + b.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| @@ -47,8 +47,8 @@ SimpleForm.setup do |config| b.optional :readonly b.use :label, class: 'control-label' b.use :input - b.use :error, wrap_with: { tag: 'span', class: 'help-block' } - b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + b.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + b.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| @@ -62,8 +62,8 @@ SimpleForm.setup do |config| b.wrapper tag: 'div', class: 'col-sm-9' do |ba| ba.use :input, class: 'form-control' - ba.use :error, wrap_with: { tag: 'span', class: 'help-block' } - ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + ba.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + ba.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end end @@ -76,8 +76,8 @@ SimpleForm.setup do |config| b.wrapper tag: 'div', class: 'col-sm-9' do |ba| ba.use :input - ba.use :error, wrap_with: { tag: 'span', class: 'help-block' } - ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + ba.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + ba.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end end @@ -90,8 +90,8 @@ SimpleForm.setup do |config| ba.use :label_input end - wr.use :error, wrap_with: { tag: 'span', class: 'help-block' } - wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + wr.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + wr.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end end @@ -103,8 +103,8 @@ SimpleForm.setup do |config| b.wrapper tag: 'div', class: 'col-sm-9' do |ba| ba.use :input - ba.use :error, wrap_with: { tag: 'span', class: 'help-block' } - ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + ba.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + ba.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end end @@ -118,45 +118,32 @@ SimpleForm.setup do |config| b.use :label, class: 'sr-only' b.use :input, class: 'form-control' - b.use :error, wrap_with: { tag: 'span', class: 'help-block' } - b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + b.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + b.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end - config.wrappers :form_without_label, :tag => 'div', :class => 'form-group', :error_class => 'error' do |b| - + config.wrappers :multi_select, tag: 'div', class: 'form-group', error_class: 'has-error' do |b| b.use :html5 - b.use :placeholder - b.optional :maxlength - b.optional :pattern - b.optional :min_max b.optional :readonly - - b.wrapper tag: 'div', class: 'col-sm-12' do |ba| + b.use :label, class: 'control-label' + b.wrapper tag: 'div', class: 'form-inline' do |ba| ba.use :input, class: 'form-control' - ba.use :error, wrap_with: { tag: 'span', class: 'help-block' } - ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' } + ba.use :error, wrap_with: { tag: 'span', class: 'help-block small' } + ba.use :hint, wrap_with: { tag: 'p', class: 'help-block small' } end - end - - config.wrappers :nested, :tag => 'span', :error_class => 'has-error' do |b| - b.use :html5 - b.use :placeholder - b.optional :readonly - b.use :input - b.use :error, wrap_with: { tag: 'span', class: 'help-block' } - b.use :hint, wrap_with: { tag: 'p', class: 'help-block' } end - # Wrappers for forms and inputs using the Bootstrap toolkit. # Check the Bootstrap docs (http://getbootstrap.com) # to learn about the different styles for forms and inputs, # buttons and other elements. - config.default_wrapper = :horizontal_form + config.default_wrapper = :vertical_form config.wrapper_mappings = { check_boxes: :vertical_radio_and_checkboxes, radio_buttons: :vertical_radio_and_checkboxes, file: :vertical_file_input, boolean: :vertical_boolean, + datetime: :multi_select, + date: :multi_select, + time: :multi_select } end - diff --git a/config/locales/clean_ups.en.yml b/config/locales/clean_ups.en.yml index 27b3dc5c1..148362c35 100644 --- a/config/locales/clean_ups.en.yml +++ b/config/locales/clean_ups.en.yml @@ -3,12 +3,6 @@ en: success_tm: "%{count} time tables deleted" success_vj: "%{count} vehicle journeys deleted" success_jp: "%{count} journey patterns deleted" - success_r: "%{count} routes deleted" - success_l: "%{count} lines deleted" - success_sa: "%{count} stop areas deleted" - success_c: "%{count} companies deleted" - success_n: "%{count} networks deleted" - success_g: "%{count} groups of lines deleted" failure: "Fail when clean_up : %{error_message}" actions: clean_up: "clean up" @@ -16,12 +10,15 @@ en: activemodel: attributes: clean_up: - expected_date: "Final date : " - keep_lines: "keep lines" - keep_stops: "keep stop areas" - keep_companies: "keep companies" - keep_networks: "keep networks" - keep_group_of_lines: "keep groups of lines" + begin_date: "Begin date : " + end_date: "End date : " titles: clean_up: - expected_date: "value included in clean up" + begin_date: "Begin date of clean up" + end_date: "End date of clean up" + + formtastic: + titles: + clean_up: + begin_date: "Begin date of clean up" + end_date: "End date of clean up" diff --git a/config/locales/clean_ups.fr.yml b/config/locales/clean_ups.fr.yml index 13d34ac4c..cb0ce3f1a 100644 --- a/config/locales/clean_ups.fr.yml +++ b/config/locales/clean_ups.fr.yml @@ -3,12 +3,6 @@ fr: success_tm: "%{count} calendrier(s) supprimé(s)" success_vj: "%{count} course(s) supprimée(s)" success_jp: "%{count} mission(s) supprimée(s)" - success_r: "%{count} séquence(s) d'arrêt supprimée(s)" - success_l: "%{count} ligne(s) supprimée(s)" - success_sa: "%{count} arrêt(s) supprimé(s)" - success_c: "%{count} transporteur(s) supprimé(s)" - success_n: "%{count} réseau(x) supprimé(s)" - success_g: "%{count} groupe(s) de lignes supprimé(s)" failure: "Echec de la purge : %{error_message}" actions: clean_up: "Purger" @@ -16,12 +10,15 @@ fr: activemodel: attributes: clean_up: - expected_date: "Date limite : " - keep_lines: "conserver les lignes" - keep_stops: "conserver les arrêts" - keep_companies: "conserver les transporteurs" - keep_networks: "conserver les réseaux" - keep_group_of_lines: "conserver les groupes de lignes" + begin_date: "Début date limite : " + end_date: "Fin date limite : " titles: clean_up: - expected_date: "valeur incluse dans la purge" + begin_date: "Début date de la purge" + end_date: "Fin date de la purge" + + formtastic: + titles: + clean_up: + begin_date: "Début date de la purge" + end_date: "Fin date de la purge" diff --git a/config/locales/enumerize.en.yml b/config/locales/enumerize.en.yml index 99e2edb75..e09a08696 100644 --- a/config/locales/enumerize.en.yml +++ b/config/locales/enumerize.en.yml @@ -33,3 +33,190 @@ en: netex: "Experimental" hub: "Specific Transdev Format" kml: "line, route, ... drawings on Keyhole Markup Language format" + route: + direction: + straight_forward: 'Straight Forward' + backward: 'Backward' + clockwise: 'ClockWise' + counter_clockwise: 'Counter Clockwise' + north: 'North' + north_west: 'North West' + west: 'West' + south_west: 'South West' + south: 'South' + south_east: 'South East' + east: 'East' + north_east: 'North East' + wayback: + straight_forward: 'Straight Forward' + backward: 'Backward' + vehicle_journey: + transport_mode: + interchange: Interchange + unknown: "unknown" + air: "Air" + train: "Train" + long_distance_train: "Long distance train" + local_train: "Local train" + rapid_transit: "Rapid transit" + metro: "Metro" + tramway: "Tramway" + coach: "Coach" + bus: "Bus" + ferry: "Ferry" + waterborne: "Waterborne" + private_vehicle: "Private vehicle" + walk: "Walk" + trolleybus: "Trolleybus" + bicycle: "Bicycle" + shuttle: "Shuttle" + taxi: "Taxi" + val: "VAL" + other: "Other" + air: Air + bus: Bus + coach: Coach + ferry: Ferry + metro: Metro + rail: Rail + trolleybus: Trolleybus + tram: Tramway + water: Water + cableway: Cableway + funicular: Funicular + other: Other + + line: + transport_mode: + interchange: Interchange + unknown: "unknown" + air: "Air" + train: "Train" + long_distance_train: "Long distance train" + local_train: "Local train" + rapid_transit: "Rapid transit" + metro: "Metro" + tramway: "Tramway" + coach: "Coach" + bus: "Bus" + ferry: "Ferry" + waterborne: "Waterborne" + private_vehicle: "Private vehicle" + walk: "Walk" + trolleybus: "Trolleybus" + bicycle: "Bicycle" + shuttle: "Shuttle" + taxi: "Taxi" + val: "VAL" + other: "Other" + air: Air + bus: Bus + coach: Coach + ferry: Ferry + metro: Metro + rail: Rail + trolleybus: Trolleybus + tram: Tramway + water: Water + cableway: Cableway + funicular: Funicular + other: Other + transport_submode: + unknown: 'Unknown' + undefined: 'Undefined' + internationalFlight: 'International flight' + domesticFlight: 'Domestic flight' + intercontinentalFlight: 'Intercontinental flight' + domesticScheduledFlight: 'Domestic scheduled flight' + shuttleFlight: 'Shuttle flight' + intercontinentalCharterFlight: "Intercontinental charter flight" + internationalCharterFlight: "International charter flight" + roundTripCharterFlight: "Roundtrip charter flight" + sightseeingFlight: 'Sightseeing flight' + helicopterService: "Helicopter service" + domesticCharterFlight: "Domestic charter flight" + SchengenAreaFlight: 'Schengen area flight' + airshipService: 'Airship service' + shortHaulInternationalFlight: 'Short haul international flight' + canalBarge: 'Canal barge' + localBus: 'Local bus' + regionalBus: 'Regional bus' + expressBus: 'Express bus' + nightBus: 'Night bus' + postBus: 'Post but' + specialNeedsBus: 'Special needs bus' + mobilityBus: 'Mobility bus' + mobilityBusForRegisteredDisabled: 'Mobility bus for registered disabled' + sightseeingBus: 'sightseeingBus' + shuttleBus: 'Shuttle bus' + highFrequencyBus: 'High frequency bus' + dedicatedLaneBus: 'Dedicated lane bus' + schoolBus: 'School bus' + schoolAndPublicServiceBus: 'School and public service bus' + railReplacementBus: 'Rail replacement bus' + demandAndResponseBus: 'Demand and response bus' + airportLinkBus: 'Airport link bus' + internationalCoach: 'International coach' + nationalCoach: 'National coach' + shuttleCoach: 'Shuttle coach' + regionalCoach: 'Regional coach' + specialCoach: 'Special coach' + schoolCoach: 'School coach' + sightseeingCoach: 'Sightseeing coach' + touristCoach: 'Tourist coach' + commuterCoach: 'Commuter coach' + metro: 'Metro' + tube: 'Tube' + urbanRailway: 'Urban railway' + local: 'Local' + highSpeedRail: 'High speed rail' + suburbanRailway: 'Suburban railway' + regionalRail: 'Regional rail' + interregionalRail: 'Interregional rail' + longDistance: 'Long distance' + international: 'International' + sleeperRailService: 'Sleeper rail service' + nightRail: 'Night rail' + carTransportRailService: 'Car transport rail service' + touristRailway: 'Tourist railway' + railShuttle: 'Rail shuttle' + replacementRailService: 'Replacement rail service' + specialTrain: 'Special train' + crossCountryRail: 'Cross country rail' + rackAndPinionRailway: 'Rack and pinion railway' + cityTram: 'City tram' + localTram: 'Local tram' + regionalTram: 'Regional tram' + sightseeingTram: 'Sightseeing tram' + shuttleTram: 'Shuttle tram' + trainTram: 'Train tram' + internationalCarFerry: 'International car ferry' + nationalCarFerry: 'National car ferry' + regionalCarFerry: 'Regional car ferry' + localCarFerry: 'Local car ferry' + internationalPassengerFerry: 'International passenger ferry' + nationalPassengerFerry: 'National passenger ferry' + regionalPassengerFerry: 'Regional passenger ferry' + localPassengerFerry: 'Local passenger ferry' + postBoat: 'Post boat' + trainFerry: 'Train ferry' + roadFerryLink: 'Road ferry link' + airportBoatLink: "Airport boat link" + highSpeedVehicleService: 'High speed vehicle service' + highSpeedPassengerService: 'High speed passenger service' + sightseeingService: 'Sightseeing service' + schoolBoat: 'School boat' + cableFerry: 'Cable ferry' + riverBus: 'River bus' + scheduledFerry: 'Scheduled ferry' + shuttleFerryService: 'Shuttle ferry service' + telecabin: 'Telecabin' + cableCar: 'Cable car' + lift: 'Lift' + chairLift: 'Chair lift' + dragLift: 'Drag lift' + telecabinLink: 'Telecabin link' + funicular: 'Funicular' + streetCableCar: 'Street cable car' + allFunicularServices: 'All funicular services' + undefinedFunicular: 'Undefined funicular' diff --git a/config/locales/enumerize.fr.yml b/config/locales/enumerize.fr.yml index 4bfd71d28..62f5d53f6 100644 --- a/config/locales/enumerize.fr.yml +++ b/config/locales/enumerize.fr.yml @@ -1,6 +1,6 @@ fr: - simple_form: - include_blanks: + simple_form: + include_blanks: defaults: for_boarding: "Non défini" for_alighting: "Non défini" @@ -9,7 +9,7 @@ fr: normal: "Montée autorisée" forbidden: "Montée interdite" request_stop: "Montée sur demande au conducteur" - is_flexible: "Montée sur réservation" + is_flexible: "Montée sur réservation" for_alighting: normal: "Descente autorisée" forbidden: "Descente interdite" @@ -32,4 +32,190 @@ fr: gtfs: "General Transit Feed Specification défini par Google" netex: "Expérimental" hub: "Format spécifique Transdev" - kml: "Tracés de lignes, séquences d'arrêts, ... en 'Keyhole Markup Language'" + kml: "Tracés de lignes, séquences d'arrêts, ... en 'Keyhole Markup Language'" + route: + direction: + straight_forward: 'Aller' + backward: 'Retour' + clockwise: 'Sens horaire' + counter_clockwise: 'Sens anti horaire' + north: 'Nord' + north_west: 'Nord Ouest' + west: 'Ouest' + south_west: 'Sud Ouest' + south: 'Sud' + south_east: 'Sud Est' + east: 'Est' + north_east: 'Nord Est' + wayback: + straight_forward: 'Aller' + backward: 'Retour' + vehicle_journey: + transport_mode: + interchange: Interconnection + unknown: Inconnu + air: Air + train: Train + long_distance_train: Train Grande Ligne + local_train: TER + rapid_transit: RER + metro: Métro + tramway: Tramway + coach: Autocar + bus: Bus + ferry: Ferry + waterborne: Bac + private_vehicle: Voiture particulière + walk: Marche à pied + trolleybus: Trolleybus + bicycle: Vélo + shuttle: Navette + taxi: Taxi + val: VAL + other: Autre + bus: Bus + coach: Autocar + ferry: Ferry + metro: Métro + rail: Train + trolleybus: Trolleybus + tram: Tramway + water: Eau + cableway: Téléphérique + funicular: Funiculaire + other: Autre + + line: + transport_mode: + interchange: Interconnection + unknown: Inconnu + air: Air + train: Train + long_distance_train: Train Grande Ligne + local_train: TER + rapid_transit: RER + metro: Métro + tramway: Tramway + coach: Autocar + bus: Bus + ferry: Ferry + waterborne: Bac + private_vehicle: Voiture particulière + walk: Marche à pied + trolleybus: Trolleybus + bicycle: Vélo + shuttle: Navette + taxi: Taxi + val: VAL + other: Autre + bus: Bus + coach: Autocar + ferry: Ferry + metro: Métro + rail: Train + trolleybus: Trolleybus + tram: Tramway + water: Eau + cableway: Téléphérique + funicular: Funiculaire + other: Autre + + transport_submode: + unknown: 'Inconnu' + undefined: 'Non défini' + internationalFlight: 'Vol international' + domesticFlight: 'Vol intérieur' + intercontinentalFlight: 'Vol intercontinental' + domesticScheduledFlight: 'Vol intérieur régulier' + shuttleFlight: 'Vol de navette' + intercontinentalCharterFlight: "Vol 'charter' intercontinental" + internationalCharterFlight: "Vol 'charter' international" + roundTripCharterFlight: "Vol 'charter' aller/retour" + sightseeingFlight: 'Vol tourisme' + helicopterService: "Service d'hélicoptère" + domesticCharterFlight: "Vol 'charter' intérieur" + SchengenAreaFlight: 'Vol de zone Shengen' + airshipService: 'Service de dirigeable' + shortHaulInternationalFlight: 'Vol international à courte distance' + canalBarge: 'Péniche' + localBus: 'Bus local' + regionalBus: 'Bus régional' + expressBus: 'Bus express' + nightBus: 'Bus de nuit' + postBus: 'Bus postal' + specialNeedsBus: 'Bus de besoins spécial' + mobilityBus: 'Bus de mobilité' + mobilityBusForRegisteredDisabled: 'Bus de mobilité pour personnes handicapées' + sightseeingBus: 'Bus touristique' + shuttleBus: 'Bus navette' + highFrequencyBus: 'Bus à haute fréquence' + dedicatedLaneBus: 'Bus à voie réservée' + schoolBus: 'Bus scolaire' + schoolAndPublicServiceBus: 'Bus scolaire/service public' + railReplacementBus: 'Bus de remplacement de train' + demandAndResponseBus: 'Bus demande/réponse' + airportLinkBus: 'Bus de liaison aéroport' + internationalCoach: 'Autocar international' + nationalCoach: 'Autocar national' + shuttleCoach: 'Autocar navette' + regionalCoach: 'Autocar régional' + specialCoach: 'Autocar spécial' + schoolCoach: 'Autocar scolaire' + sightseeingCoach: 'Autocar touristique' + touristCoach: 'Autocar touristique (2)' + commuterCoach: 'Autocar de banlieue' + metro: 'Métro' + tube: 'Métro (2)' + urbanRailway: 'Train urbain' + local: 'Local' + highSpeedRail: 'Train à grande vitesse' + suburbanRailway: 'Train de banlieue' + regionalRail: 'Train régional' + interregionalRail: 'Train interrégional' + longDistance: 'Longue distance' + international: 'International' + sleeperRailService: 'Train à couchettes' + nightRail: 'Train de nuit' + carTransportRailService: 'Service ferroviaire de transport de voitures' + touristRailway: 'Train touristique' + railShuttle: 'Navette ferroviaire' + replacementRailService: 'Service de train de remplacement' + specialTrain: 'Train spécial' + crossCountryRail: 'Train de campagne' + rackAndPinionRailway: 'Train à crémaillère' + cityTram: 'Tramway de ville' + localTram: 'Tramway local' + regionalTram: 'Tramway régional' + sightseeingTram: 'Tramway touristique' + shuttleTram: 'Tramway navette' + trainTram: 'Train/tramway' + internationalCarFerry: 'Ferry international' + nationalCarFerry: 'Ferry national' + regionalCarFerry: 'Ferry régional' + localCarFerry: 'Ferry local' + internationalPassengerFerry: 'Traversier international à passagers' + nationalPassengerFerry: 'Traversier national à passagers' + regionalPassengerFerry: 'Traversier régional à passagers' + localPassengerFerry: 'Traversier local à passagers' + postBoat: 'Bateau de poste' + trainFerry: 'Navire transbordeur' + roadFerryLink: 'Liaison par navire transbordeur' + airportBoatLink: "Liaison maritime d'aéroport" + highSpeedVehicleService: 'Service de véhicule à grande vitesse' + highSpeedPassengerService: 'Service passager à grande vitesse' + sightseeingService: 'Service touristique' + schoolBoat: 'Bateau scolaire' + cableFerry: 'Traversier à câble' + riverBus: 'Bateau-bus' + scheduledFerry: 'Traversier régulier' + shuttleFerryService: 'Service de traversier-navette' + telecabin: 'Télécabine' + cableCar: 'Téléphérique' + lift: 'Ascenseur' + chairLift: 'Télésiège' + dragLift: 'Téléski' + telecabinLink: 'Liaison télécabine' + funicular: 'Funiculaire' + streetCableCar: 'Tramway (2)' + allFunicularServices: 'Tous services de funiculaire' + undefinedFunicular: 'Funiculaire non défini' diff --git a/config/locales/line_referential_syncs.en.yml b/config/locales/line_referential_syncs.en.yml index 82ef48170..e78288299 100644 --- a/config/locales/line_referential_syncs.en.yml +++ b/config/locales/line_referential_syncs.en.yml @@ -10,8 +10,8 @@ en: message: new: "New synchronisation added" pending: "Synchronisation en cours" - successful: "Synchronisation réussie après %{processing_time} secondes avec %{imported} éléments importés. %{deleted} éléments ont été supprimés." - failed: "Synchronisation interrompue après %{processing_time} secondes avec l'erreur : %{error}." + successful: "Synchronization successful after %{processing_time} with %{imported} objects created, %{updated} objects updated. %{deleted} objects were deleted.." + failed: "Synchronization failed after %{processing_time} with error: %{error}." notice: line_referential_sync: diff --git a/config/locales/line_referential_syncs.fr.yml b/config/locales/line_referential_syncs.fr.yml index 48b5df190..4a24fd937 100644 --- a/config/locales/line_referential_syncs.fr.yml +++ b/config/locales/line_referential_syncs.fr.yml @@ -10,7 +10,7 @@ fr: message: new: "Synchronisation en attente" pending: "Synchronisation en cours" - successful: "Synchronisation réussie après %{processing_time}, avec %{imported} éléments importés. %{deleted} éléments ont été supprimés." + successful: "Synchronisation réussie après %{processing_time}, avec %{imported} éléments importés, %{updated} éléments mise à jour. %{deleted} éléments ont été supprimés." failed: "Synchronisation interrompue après %{processing_time}, avec l'erreur : %{error}." notice: line_referential_sync: diff --git a/config/locales/lines.en.yml b/config/locales/lines.en.yml index 4bc485180..51ea2a176 100644 --- a/config/locales/lines.en.yml +++ b/config/locales/lines.en.yml @@ -23,13 +23,15 @@ en: deactivated: "Disabled line" title: "Lines" name_or_number: "Search by name or number..." - name_or_number_or_objectid: "Search by name, number or objectid..." + name_or_number_or_objectid_or_comment: "Search by name, number, objectid or comment..." no_networks: "No networks" no_companies: "No companies" no_group_of_lines: "No group of lines" + no_transport_modes: No transport mode all_networks: "All networks" all_companies: "All companies" all_group_of_lines: "All group of lines" + all_transport_modes: All transport modes multi_selection: "Multiple selection" multi_selection_enable: "Enable multiple selection" multi_selection_disable: "Disable multiple selection" @@ -59,6 +61,7 @@ en: published_name: "Published name" number: "Number" transport_mode: "Transport mode" + transport_submode: "Transport Submode" url: "Web page" color: "Line color" text_color: "Text color" diff --git a/config/locales/lines.fr.yml b/config/locales/lines.fr.yml index 9e749f038..0ac9e676e 100644 --- a/config/locales/lines.fr.yml +++ b/config/locales/lines.fr.yml @@ -23,13 +23,15 @@ fr: deactivated: "Ligne désactivée" title: "Lignes" name_or_number: "Recherche par nom ou indice..." - name_or_number_or_objectid: "Recherche par nom, indice ou objectid..." + name_or_number_or_objectid_or_comment: "Recherche par nom, indice, objectid ou commentaire..." no_networks: "Aucun réseaux" no_companies: "Aucun transporteurs" no_group_of_lines: "Aucun groupes de ligne" + no_transport_modes: Aucun mode de transport all_networks: "Tous les réseaux" all_companies: "Tous les transporteurs" all_group_of_lines: "Tous les groupes de ligne" + all_transport_modes: Tous les modes de transport multi_selection: "Sélection multiple" multi_selection_enable: "Activer la sélection multiple" multi_selection_disable: "Désactiver la sélection multiple" @@ -59,6 +61,7 @@ fr: published_name: "Nom public" number: "Indice" transport_mode: "Mode de transport" + transport_submode: "Sous mode de transport" url: "Page web associée" color: "Couleur du tracé" text_color: "Couleur du texte" diff --git a/config/locales/referentials.en.yml b/config/locales/referentials.en.yml index 3691a8227..3af12e7f4 100644 --- a/config/locales/referentials.en.yml +++ b/config/locales/referentials.en.yml @@ -24,6 +24,7 @@ en: destroy_confirm: "Do you confirm to destroy this data space ?" destroy: "Destroy this data space" edit: "Edit this data space" + clone: "Clone this data space" errors: pg_excluded: "can't begins with pg_" public_excluded: "public is a reserved value" @@ -78,7 +79,16 @@ en: upper_corner: "latitude,longitude in WGS84 referential, dot for decimal separator" lower_corner: "latitude,longitude in WGS84 referential, dot for decimal separator" + simple_form: + labels: + referential: + metadatas: + first_period_begin: 'First period begin' + first_period_end: 'First period end' + lines: Lines + notice: referential: archived: "The data space has been successfully archived" - unarchived: "The data space has been successfully unarchived"
\ No newline at end of file + unarchived: "The data space has been successfully unarchived" + deleted: "The data space has been successfully destroyed" diff --git a/config/locales/referentials.fr.yml b/config/locales/referentials.fr.yml index cada9c3a0..8c512a676 100644 --- a/config/locales/referentials.fr.yml +++ b/config/locales/referentials.fr.yml @@ -24,10 +24,12 @@ fr: destroy_confirm: "Etes vous sûr de vouloir supprimer cet espace de données ?" destroy: "Supprimer cet espace de données" edit: "Modifier cet espace de données" + clone: "Cloner cet espace de données" errors: pg_excluded: "ne peut pas commencer par pg_ (valeurs réservées)" public_excluded: "public est une valeur réservée" user_excluded: "%{user} est une valeur réservée" + overlapped_referential: "%{referential} couvre le même périmètre d'offre" activerecord: models: referential: @@ -78,7 +80,17 @@ fr: upper_corner: "latitude,longitude dans le référentiel WGS84, le séparateur de décimales est 'point'" lower_corner: "latitude,longitude dans le référentiel WGS84, le séparateur de décimales est 'point'" + simple_form: + labels: + referential: + metadatas: + first_period_begin: 'Première période de départ' + first_period_end: 'Première période de fin' + lines: Lignes + notice: referential: archived: "L'espace de données a été correctement archivé" unarchived: "L'espace de données a été correctement désarchivé" + unarchived_failed: "L'espace de données ne peut être désarchivé" + deleted: "L'espace de données a été correctement supprimé" diff --git a/config/locales/routes.en.yml b/config/locales/routes.en.yml index a3a26cb8c..073294884 100644 --- a/config/locales/routes.en.yml +++ b/config/locales/routes.en.yml @@ -18,8 +18,8 @@ en: title: "Update route %{route}" show: title: "Route %{route}" - stop_points: "Stop point on route list" - journey_patterns: "Route journey patterns list" + stop_points: "Stop point on route list" + journey_patterns: "Route journey patterns list" no_opposite_route: "No reversed route associated" undefined: "Undefined" index: @@ -33,37 +33,37 @@ en: for_alighting: "Alighting" route: no_journey_pattern: "No Journey pattern" - wayback: + wayback: positive: "forward" negative: "backward" opposite: "Opposite route" no_opposite: "No opposite route" - activerecord: - models: - route: + activerecord: + models: + route: zero: "route" one: "route" other: "routes" attributes: route: - wayback: + wayback: positive: "forward" negative: "backward" line: "Line" vehicle_journeys: "Vehicle journeys" journey_patterns: "Journey patterns" name: "Name" - published_name: "Published name" + published_name: "Published name" comment: "Comments" number: "Number" - direction_code: "Direction" - wayback_code: "Wayback" + direction: "Direction" + wayback: "Wayback" opposite_route: "Reversed route" objectid: "Neptune identifier" object_version: "Version" creation_time: "Created on" creator_id: "Created by" - no_journey_pattern: "No journey pattern" + no_journey_pattern: "No journey pattern" formtastic: titles: route: @@ -80,3 +80,9 @@ en: hub: route: objectid: "[prefix]:Route:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character. Maximum length of the unique key = 8." + + # simpleform + helpers: + submit: + route: + create: 'Create route' diff --git a/config/locales/routes.fr.yml b/config/locales/routes.fr.yml index ea190e6e2..183531236 100644 --- a/config/locales/routes.fr.yml +++ b/config/locales/routes.fr.yml @@ -1,29 +1,29 @@ fr: routes: actions: - new: "Ajouter une séquence d'arrêts" - edit: "Modifier cette séquence d'arrêts" + new: "Ajouter un itinéraire" + edit: "Modifier cet itinéraire" edit_boarding_alighting: "Contraintes de montée - descente" - destroy: "Supprimer cette séquence d'arrêts" - destroy_confirm: "Etes vous sûr de supprimer cette séquence d'arrêts ?" - export_kml: "Export KML de la séquence d'arrêts" - export_kml_all: "Export KML des séquences d'arrêts" - export_hub: "Export HUB de la séquence d'arrêts" - export_hub_all: "Export HUB des séquences d'arrêts" + destroy: "Supprimer cet itinéraire" + destroy_confirm: "Etes vous sûr de supprimer cet itinéraire ?" + export_kml: "Export KML de l'itinéraire" + export_kml_all: "Export KML des itinéraires" + export_hub: "Export HUB de l'itinéraire" + export_hub_all: "Export HUB des itinéraires" add_stop_point: "Ajouter un arrêt" new_stop_point: "Créer un arrêt pour l'ajouter" new: - title: "Ajouter une séquence d'arrêts" + title: "Ajouter un itinéraire" edit: - title: "Modifier la séquence d'arrêts %{route}" + title: "Modifier l'itinéraire %{route}" show: - title: "Séquence d'arrêts %{route} de la ligne %{line}" - stop_points: "Liste des arrêts de la séquence d'arrêts" + title: "Itinéraire %{route} de la ligne %{line}" + stop_points: "Liste des arrêts de l'itinéraire'" journey_patterns: "Liste des missions" - no_opposite_route: "Aucune séquence d'arrêts associée en sens opposé" + no_opposite_route: "Aucun itinéraire associé en sens opposé" undefined: "Non défini" index: - title: "Séquences d'arrêts" + title: "Itinéraires" selection: "Sélection" selection_all: "Tous" edit_boarding_alighting: @@ -36,14 +36,14 @@ fr: wayback: positive: "Aller" negative: "Retour" - opposite: "Séquence opposée" - no_opposite: "Pas de séquence opposée" + opposite: "Itinéraire opposé" + no_opposite: "Pas d'itinéraire opposé" activerecord: models: route: - zero: "séquence d'arrêts" - one: "séquence d'arrêts" - other: "séquences d'arrêts" + zero: "itinéraire" + one: "itinéraire" + other: "itinéraires" attributes: route: wayback: @@ -56,9 +56,10 @@ fr: published_name: "Nom public" number: "Indice" comment: "Commentaire" - direction_code: "Direction" - wayback_code: "Sens" - opposite_route: "Séquence d'arrêts associée en sens opposé" + direction: "Direction" + wayback: "Sens" + opposite_route: "Itinéraire associé en sens opposé" + opposite_route_id: "Itinéraire associé en sens opposé" objectid: "Identifiant Neptune" object_version: "Version" creation_time: "Créé le" @@ -80,3 +81,9 @@ fr: hub: route: objectid: "[prefixe]:Route:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'. Longueur maximale de la clé unique = 8." + + # simpleform + helpers: + submit: + route: + create: 'Créer un itinéraire' diff --git a/config/locales/stop_area_referential_syncs.en.yml b/config/locales/stop_area_referential_syncs.en.yml index 9dc3173bc..8b3a5e8c3 100644 --- a/config/locales/stop_area_referential_syncs.en.yml +++ b/config/locales/stop_area_referential_syncs.en.yml @@ -7,13 +7,11 @@ en: base: multiple_process: 'There is already an synchronisation in progress' stop_area_referential_sync: - synchronization: - message: - new: "New synchronisation added" - pending: "Synchronization pending" - successful: "Synchronization successful after %{processing_time} with %{imported} objects. %{deleted} objects were deleted.." - failed: "Synchronization failed after %{processing_time} with error: %{error}." + message: + new: "New synchronisation added" + pending: "Synchronization pending" + successful: "Synchronization successful after %{processing_time} with %{imported} objects created, %{updated} objects updated. %{deleted} objects were deleted.." + failed: "Synchronization failed after %{processing_time} with error: %{error}." notice: stop_area_referential_sync: created: 'Your synchronisation request has been created' - diff --git a/config/locales/stop_area_referential_syncs.fr.yml b/config/locales/stop_area_referential_syncs.fr.yml index d0b79a8db..bf8d32ac5 100644 --- a/config/locales/stop_area_referential_syncs.fr.yml +++ b/config/locales/stop_area_referential_syncs.fr.yml @@ -10,7 +10,7 @@ fr: message: new: "Synchronisation en attente" pending: "Synchronisation en cours" - successful: "Synchronisation réussie après %{processing_time}, avec %{imported} éléments importés. %{deleted} éléments ont été supprimés." + successful: "Synchronisation réussie après %{processing_time}, avec %{imported} éléments importés, %{updated} éléments mise à jour. %{deleted} éléments ont été supprimés." failed: "Synchronisation interrompue après %{processing_time}, avec l'erreur : %{error}." notice: stop_area_referential_sync: diff --git a/config/locales/vehicle_journeys.en.yml b/config/locales/vehicle_journeys.en.yml index 0687c32aa..abaa85d29 100644 --- a/config/locales/vehicle_journeys.en.yml +++ b/config/locales/vehicle_journeys.en.yml @@ -1,7 +1,7 @@ en: vehicle_journeys: vehicle_journeys_matrix: - line_routes: "Line's routes" + line_routes: "Line's routes" vehicle_journey: title_stopless: "Vehicle journey %{name}" title: "Vehicle journey leaving from %{stop} at %{time}" @@ -84,7 +84,7 @@ en: number: "Number" comment: "Comments" status_value: "Status Value" - transport_mode_name: "Transport Mode" + transport_mode: "Transport Mode" mobility_restricted_suitability: "PRM accessibility" flexible_service: "On demond transportation" unspecified_mrs: "Not specified" diff --git a/config/locales/vehicle_journeys.fr.yml b/config/locales/vehicle_journeys.fr.yml index 30a4bf081..5cd1b3087 100644 --- a/config/locales/vehicle_journeys.fr.yml +++ b/config/locales/vehicle_journeys.fr.yml @@ -84,7 +84,7 @@ fr: number: "Numéro" comment: "Commentaires" status_value: "Etat de trafic" - transport_mode_name: "Mode de transport" + transport_mode: "Mode de transport" mobility_restricted_suitability: "Accessibilité PMR" flexible_service: "Transport à la demande" unspecified_mrs: "Non spécifié" diff --git a/config/routes.rb b/config/routes.rb index 4b4411ea5..74e4b47b5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -23,6 +23,8 @@ ChouetteIhm::Application.routes.draw do end end + mount Sidekiq::Web => '/sidekiq' + namespace :api do namespace :v1 do resources :time_tables, :only => [:index, :show] |
