diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 5ca18f60936..e8465893b5c 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -82,7 +82,6 @@ //= require globalize //= require send_admin_notification_alert //= require modal_download -//= require settings //= require cookies //= require columns_selector //= require budget_edit_associations @@ -136,8 +135,7 @@ var initialize_modules = function() { App.Globalize.initialize(); App.SendAdminNotificationAlert.initialize(); App.ModalDownload.initialize(); - App.Settings.initialize(); - if ($("#js-columns-selector").length) { + if ( $('#js-columns-selector').length) { App.ColumnsSelector.initialize(); } App.BudgetEditAssociations.initialize(); diff --git a/app/assets/javascripts/foundation_extras.js b/app/assets/javascripts/foundation_extras.js index c6e344684ff..f1a87802750 100644 --- a/app/assets/javascripts/foundation_extras.js +++ b/app/assets/javascripts/foundation_extras.js @@ -17,6 +17,9 @@ $(window).trigger("resize"); $(document).on("page:before-unload", this.clearSticky); window.addEventListener("popstate", this.clearSticky, false); + $("#side_menu ul").on("down.zf.accordionMenu", function(e) { + Foundation.reInit($("[data-equalizer]")); + }); $(function() { if ($(window).width() < 620) { App.FoundationExtras.mobile_ui_init(); diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index d43db6130a3..e853f00d827 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -217,6 +217,13 @@ $sidebar-active: #f4fcd0; color: #fff; } + @include breakpoint(medium) { + td .enabled, + td .disabled { + padding: $line-height / 2 0; + } + } + th { background: $brand; color: #fff; diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index ad1a0dd0ba6..b7ede32fe30 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -23,3 +23,4 @@ @import "autocomplete_overrides"; @import "jquery-ui/sortable"; @import "leaflet"; +@import "wizard"; diff --git a/app/assets/stylesheets/wizard.scss b/app/assets/stylesheets/wizard.scss new file mode 100644 index 00000000000..8b356dd7d97 --- /dev/null +++ b/app/assets/stylesheets/wizard.scss @@ -0,0 +1,46 @@ +.wizard { + h3 { + margin-bottom: 0; + } + + h3, + .current-step { + display: inline-block; + padding: .7em 0; + } + + .current-step { + @include breakpoint(medium) { + margin-left: $line-height; + } + } + + .btn-back-step { + margin-right: $line-height; + } + + .btn-back-step i { + position: relative; + &:before { + position: absolute; + top: 2px; + left: -20px; + } + } + + .v-aligner { + display: flex; + align-items: center; + justify-content: center; + } + + .button { + margin-bottom: 0; + } + + @include breakpoint(small) { + input.button { + padding: 1em 0; + } + } +} diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index fdbc2b4d52d..565f31c73cb 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -8,29 +8,20 @@ class Admin::SettingsController < Admin::BaseController :poster_feature_short_title_setting, :poster_feature_description_setting def index - all_settings = Setting.all.group_by { |setting| setting.type } - @configuration_settings = all_settings["configuration"] - @feature_settings = all_settings["feature"] - @participation_processes_settings = all_settings["process"] - @map_configuration_settings = all_settings["map"] - @proposals_settings = all_settings["proposals"] - @remote_census_general_settings = all_settings["remote_census.general"] - @remote_census_request_settings = all_settings["remote_census.request"] - @remote_census_response_settings = all_settings["remote_census.response"] - @uploads_settings = all_settings["uploads"] + @settings_groups = ["configuration", "process", "feature", "map", "uploads", "proposals", "remote_census", "social", "advanced", "smtp", "regional", "sms"].freeze end def update @setting = Setting.find(params[:id]) @setting.update(settings_params) - redirect_to request_referer, notice: t("admin.settings.flash.updated") + redirect_to request.referer, notice: t("admin.settings.flash.updated") end def update_map Setting["map.latitude"] = params[:latitude].to_f Setting["map.longitude"] = params[:longitude].to_f Setting["map.zoom"] = params[:zoom].to_i - redirect_to admin_settings_path, notice: t("admin.settings.index.map.flash.update") + redirect_to request.referer, notice: t("admin.settings.index.map.flash.update") end def update_content_types @@ -43,6 +34,12 @@ def update_content_types redirect_to admin_settings_path, notice: t("admin.settings.flash.updated") end + def show + @settings = settings_by_group(params[:id]) + + render params[:id] + end + private def settings_params @@ -53,8 +50,20 @@ def content_type_params params.permit(:jpg, :png, :gif, :pdf, :doc, :docx, :xls, :xlsx, :csv, :zip) end - def request_referer - return request.referer + params[:setting][:tab] if params[:setting][:tab] - request.referer + def settings_by_group(group) + all_settings = Setting.all.group_by { |setting| setting.type } + case group + when "remote_census" + [all_settings["remote_census.general"]] + [all_settings["remote_census.request"]] + [all_settings["remote_census.response"]] + when "social" + [all_settings["social.facebook"]] + [all_settings["social.twitter"]] + [all_settings["social.google"]] + when "advanced" + [all_settings["advanced.auth"]] + [all_settings["advanced.tracking"]] + when "regional" + [all_settings["regional.default_locale"]] + [all_settings["regional.available_locale"]] + [all_settings["regional.time_zone"]] + else + all_settings[group] + end end + end diff --git a/app/controllers/admin/wizards/installer_controller.rb b/app/controllers/admin/wizards/installer_controller.rb new file mode 100644 index 00000000000..50286c3eacc --- /dev/null +++ b/app/controllers/admin/wizards/installer_controller.rb @@ -0,0 +1,51 @@ +class Admin::Wizards::InstallerController < Admin::BaseController + layout "wizard" + + before_action :set_total_steps + before_action :set_settings, only: :show + + def new + end + + def show + render params[:id] + end + + private + + def set_total_steps + @total_steps = 7 + end + + def set_settings + case params[:id] + when "general_settings" + @settings = [Setting.find_by(key: "org_name"), + Setting.find_by(key: "min_age_to_participate")] + when "participation_process" + @settings = [[Setting.find_by(key: "process.debates"), + Setting.find_by(key: "process.proposals"), + Setting.find_by(key: "votes_for_proposal_success"), + Setting.find_by(key: "process.polls"), + Setting.find_by(key: "process.budgets")]] + when "map" + @settings = [[Setting.find_by(key: "feature.map"), + Setting.find_by(key: "map.latitude"), + Setting.find_by(key: "map.longitude"), + Setting.find_by(key: "map.zoom")]] + when "smtp" + @settings = [Setting.find_by(key: "feature.smtp_configuration"), + Setting.find_by(key: "smtp.address"), + Setting.find_by(key: "smtp.port"), + Setting.find_by(key: "smtp.domain"), + Setting.find_by(key: "smtp.username"), + Setting.find_by(key: "smtp.password"), + Setting.find_by(key: "smtp.authentication"), + Setting.find_by(key: "smtp.enable_starttls_auto")] + when "regional" + all_settings = Setting.all.group_by { |setting| setting.type } + @settings = [all_settings["regional.default_locale"]] + [all_settings["regional.available_locale"]] + [all_settings["regional.time_zone"]] + end + end + +end diff --git a/app/controllers/admin/wizards_controller.rb b/app/controllers/admin/wizards_controller.rb new file mode 100644 index 00000000000..5cc4bb959e7 --- /dev/null +++ b/app/controllers/admin/wizards_controller.rb @@ -0,0 +1,7 @@ +class Admin::WizardsController < Admin::BaseController + + def index + @wizards = ["installation"].freeze + end + +end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ffe4f4f4a4d..7222ee702fa 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base include HasFilters include HasOrders include AccessDeniedHandler + include RegionalSettings default_form_builder ConsulFormBuilder protect_from_forgery with: :exception @@ -28,12 +29,13 @@ class ApplicationController < ActionController::Base def authenticate_http_basic authenticate_or_request_with_http_basic do |username, password| - username == Rails.application.secrets.http_basic_username && password == Rails.application.secrets.http_basic_password + username == Retrocompatibility.calculate_value("advanced.auth.http_basic_username", "http_basic_username") && + password == Retrocompatibility.calculate_value("advanced.auth.http_basic_password", "http_basic_password") end end def http_basic_auth_site? - Rails.application.secrets.http_basic_auth + Retrocompatibility.calculate_value("advanced.auth.http_basic_auth", "http_basic_auth") end def verify_lock diff --git a/app/controllers/concerns/regional_settings.rb b/app/controllers/concerns/regional_settings.rb new file mode 100644 index 00000000000..290457cbed5 --- /dev/null +++ b/app/controllers/concerns/regional_settings.rb @@ -0,0 +1,14 @@ +module RegionalSettings + extend ActiveSupport::Concern + + included do + before_action :initialize_regional_settings + end + + private + + def initialize_regional_settings + Regional::Locales.load_default_and_available_locales + Regional::Timezone.load_timezone + end +end diff --git a/app/controllers/users/omniauth_callbacks_controller.rb b/app/controllers/users/omniauth_callbacks_controller.rb index 67edc4e2605..95cdcfcfb24 100644 --- a/app/controllers/users/omniauth_callbacks_controller.rb +++ b/app/controllers/users/omniauth_callbacks_controller.rb @@ -1,15 +1,15 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController def twitter - sign_in_with :twitter_login, :twitter + sign_in_with :twitter end def facebook - sign_in_with :facebook_login, :facebook + sign_in_with :facebook end def google_oauth2 - sign_in_with :google_login, :google_oauth2 + sign_in_with :google_oauth2 end def after_sign_in_path_for(resource) @@ -22,8 +22,8 @@ def after_sign_in_path_for(resource) private - def sign_in_with(feature, provider) - raise ActionController::RoutingError.new("Not Found") unless Setting["feature.#{feature}"] + def sign_in_with(provider) + raise ActionController::RoutingError.new("Not Found") unless Setting["social.#{provider}.login"] auth = request.env["omniauth.auth"] diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index 9f3a21c7e62..5dda01e5b54 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -48,7 +48,7 @@ def menu_profiles? def menu_settings? controllers_names = ["settings", "tags", "geozones", "images", "content_blocks", - "local_census_records", "imports"] + "local_census_records", "imports", "wizards"] controllers_names.include?(controller_name) && controller.class.parent != Admin::Poll::Questions::Answers end diff --git a/app/helpers/map_locations_helper.rb b/app/helpers/map_locations_helper.rb index d0f51f5f6be..394d799704a 100644 --- a/app/helpers/map_locations_helper.rb +++ b/app/helpers/map_locations_helper.rb @@ -53,8 +53,9 @@ def prepare_map_settings(map_location, editable, parent_class, investments_coord map_center_latitude: map_location_latitude(map_location), map_center_longitude: map_location_longitude(map_location), map_zoom: map_location_zoom(map_location), - map_tiles_provider: Rails.application.secrets.map_tiles_provider, - map_tiles_provider_attribution: Rails.application.secrets.map_tiles_provider_attribution, + map_tiles_provider: Retrocompatibility.calculate_value("map.tiles_provider", "map_tiles_provider"), + map_tiles_provider_attribution: Retrocompatibility.calculate_value("map.tiles_provider_attribution", + "map_tiles_provider_attribution"), marker_editable: editable, marker_remove_selector: "##{map_location_remove_marker_link_id(map_location)}", latitude_input_selector: "##{map_location_input_id(parent_class, "latitude")}", diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index 5d9ee2ebea8..88671f9b8a4 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -1,19 +1,62 @@ module SettingsHelper def feature?(name) - setting["feature.#{name}"].presence || setting["process.#{name}"].presence + setting["feature.#{name}"].presence || setting["process.#{name}"].presence || setting["social.#{name}"].presence end def setting @all_settings ||= Hash[Setting.all.map { |s| [s.key, s.value.presence] }] end - def display_setting_name(setting_name) - if setting_name == "setting" - t("admin.settings.setting_name") - else - t("admin.settings.#{setting_name}") + def is_feature?(setting) + social_feature?(setting) || + advanced_feature?(setting) || + smtp_feature?(setting) || + regional_feature?(setting) || + process_feature?(setting) || + map_feature?(setting) + end + + def social_feature?(setting) + key = setting.key.split(".") + key.first == "social" && key.last == "login" + end + + def advanced_feature?(setting) + setting.key == "advanced.auth.http_basic_auth" + end + + def smtp_feature?(setting) + setting.key == "smtp.enable_starttls_auto" || setting.key == "feature.smtp_configuration" + end + + def process_feature?(setting) + key = setting.key.split(".") + key.first == "process" + end + + def map_feature?(setting) + setting.key == "feature.map" + end + + def regional_feature?(setting) + key = setting.key.split(".") + key.first == "regional" && key.second == "available_locale" + end + + def options_for_default_locale + I18n.available_locales.map do |locale| + [name_for_locale(locale), locale] end end + def regional_setting?(setting) + setting.type.rpartition(".").first == "regional" + end + + def need_disable_language?(setting) + setting_locale = setting.key.rpartition(".").last.to_sym + setting_locale == I18n.default_locale || setting_locale == I18n.locale + end + end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 2788620705b..3e51b980e34 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -3,4 +3,9 @@ class ApplicationMailer < ActionMailer::Base helper :application default from: Proc.new { "#{Setting["mailer_from_name"]} <#{Setting["mailer_from_address"]}>" } layout "mailer" + before_action :set_smtp_settings + + def set_smtp_settings + SmtpConfiguration.set_configuration + end end diff --git a/app/mailers/devise_mailer.rb b/app/mailers/devise_mailer.rb index 89f2a76b6c9..ee7e45c3dbd 100644 --- a/app/mailers/devise_mailer.rb +++ b/app/mailers/devise_mailer.rb @@ -2,6 +2,11 @@ class DeviseMailer < Devise::Mailer helper :application, :settings include Devise::Controllers::UrlHelpers default template_path: "devise/mailer" + before_action :set_smtp_settings + + def set_smtp_settings + SmtpConfiguration.set_configuration + end protected diff --git a/app/models/setting.rb b/app/models/setting.rb index 3770aca1d13..992dfc3925f 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -8,9 +8,9 @@ def prefix end def type - if %w[feature process proposals map html homepage uploads].include? prefix + if %w[feature process proposals map html homepage uploads smtp sms].include? prefix prefix - elsif %w[remote_census].include? prefix + elsif %w[remote_census social advanced regional].include? prefix key.rpartition(".").first else "configuration" @@ -81,9 +81,6 @@ def mime_types def defaults { "feature.featured_proposals": nil, - "feature.facebook_login": true, - "feature.google_login": true, - "feature.twitter_login": true, "feature.public_stats": true, "feature.signature_sheets": true, "feature.user.recommendations": true, @@ -99,6 +96,16 @@ def defaults "feature.translation_interface": nil, "feature.remote_census": nil, "feature.valuation_comment_notification": true, + "feature.smtp_configuration": nil, + "social.facebook.login": true, + "social.facebook.key": nil, + "social.facebook.secret": nil, + "social.google.login": true, + "social.google.key": nil, + "social.google.secret": nil, + "social.twitter.login": true, + "social.twitter.key": nil, + "social.twitter.secret": nil, "homepage.widgets.feeds.debates": true, "homepage.widgets.feeds.processes": true, "homepage.widgets.feeds.proposals": true, @@ -109,6 +116,8 @@ def defaults "map.latitude": 51.48, "map.longitude": 0.0, "map.zoom": 10, + "map.tiles_provider": nil, + "map.tiles_provider_attribution": nil, "process.debates": true, "process.proposals": true, "process.polls": true, @@ -132,6 +141,48 @@ def defaults "uploads.documents.max_amount": 3, "uploads.documents.max_size": 3, "uploads.documents.content_types": "application/pdf", + "advanced.auth.http_basic_auth": nil, + "advanced.auth.http_basic_username": nil, + "advanced.auth.http_basic_password": nil, + "advanced.tracking.rollbar_server_token": nil, + # SMTP Configuration + "smtp.address": nil, + "smtp.port": nil, + "smtp.domain": nil, + "smtp.username": nil, + "smtp.password": nil, + "smtp.authentication": nil, + "smtp.enable_starttls_auto": nil, + # Languages and Time Zone + "regional.default_locale.key": "en", + "regional.available_locale.ar": true, + "regional.available_locale.bs": true, + "regional.available_locale.cs": true, + "regional.available_locale.da": true, + "regional.available_locale.de": true, + "regional.available_locale.el": true, + "regional.available_locale.en": true, + "regional.available_locale.es": true, + "regional.available_locale.fa": true, + "regional.available_locale.fr": true, + "regional.available_locale.gl": true, + "regional.available_locale.he": true, + "regional.available_locale.hr": true, + "regional.available_locale.id": true, + "regional.available_locale.it": true, + "regional.available_locale.nl": true, + "regional.available_locale.pl": true, + "regional.available_locale.pt-BR": true, + "regional.available_locale.ru": true, + "regional.available_locale.sl": true, + "regional.available_locale.sq": true, + "regional.available_locale.so": true, + "regional.available_locale.sv": true, + "regional.available_locale.tr": true, + "regional.available_locale.val": true, + "regional.available_locale.zh-CN": true, + "regional.available_locale.zh-TW": true, + "regional.time_zone.key": "Madrid", # Names for the moderation console, as a hint for moderators # to know better how to assign users with official positions "official_level_1_name": I18n.t("seeds.settings.official_level_1_name"), @@ -184,7 +235,10 @@ def defaults "remote_census.response.gender": "", "remote_census.response.name": "", "remote_census.response.surname": "", - "remote_census.response.valid": "" + "remote_census.response.valid": "", + "sms.endpoint": nil, + "sms.username": nil, + "sms.password": nil } end diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index 91245c0cf12..64d10194b40 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -1,5 +1,5 @@
-
diff --git a/app/views/admin/settings/_map_configuration_tab.html.erb b/app/views/admin/settings/map.html.erb similarity index 68% rename from app/views/admin/settings/_map_configuration_tab.html.erb rename to app/views/admin/settings/map.html.erb index fd811098935..c68aa76a5c0 100644 --- a/app/views/admin/settings/_map_configuration_tab.html.erb +++ b/app/views/admin/settings/map.html.erb @@ -1,7 +1,8 @@ +<%= back_link_to admin_settings_path %> <% if feature?(:map) %>

<%= t("admin.settings.index.map.title") %>

- <%= render "settings_table", settings: @map_configuration_settings, setting_name: "setting", tab: "#tab-map-configuration" %> + <%= render "settings_table", settings: @settings %>

<%= t("admin.settings.index.map.help") %>

diff --git a/app/views/admin/settings/process.html.erb b/app/views/admin/settings/process.html.erb new file mode 100644 index 00000000000..1a05d672e22 --- /dev/null +++ b/app/views/admin/settings/process.html.erb @@ -0,0 +1,4 @@ +<%= back_link_to admin_settings_path %> +

<%= t("admin.settings.index.process.title") %>

+ +<%= render "featured_settings_table", features: @settings %> diff --git a/app/views/admin/settings/proposals.html.erb b/app/views/admin/settings/proposals.html.erb new file mode 100644 index 00000000000..01a4e67de3d --- /dev/null +++ b/app/views/admin/settings/proposals.html.erb @@ -0,0 +1,4 @@ +<%= back_link_to admin_settings_path %> +

<%= t("admin.settings.index.proposals.title") %>

+ +<%= render "settings_table", settings: @settings %> diff --git a/app/views/admin/settings/regional.html.erb b/app/views/admin/settings/regional.html.erb new file mode 100644 index 00000000000..c312ca0fe5c --- /dev/null +++ b/app/views/admin/settings/regional.html.erb @@ -0,0 +1,9 @@ +<%= back_link_to admin_settings_path %> +

<%= t("admin.settings.index.regional.title") %>

+
+ <%= t("admin.settings.restart_info") %> +
+<% @settings.each do |setting_group| %> +

<%= t("admin.settings.index.regional.#{setting_group.first.key.split(".").second}") %>

+ <%= render "mixed_settings_table", settings: setting_group %> +<% end %> diff --git a/app/views/admin/settings/remote_census.html.erb b/app/views/admin/settings/remote_census.html.erb new file mode 100644 index 00000000000..dfcedc0f457 --- /dev/null +++ b/app/views/admin/settings/remote_census.html.erb @@ -0,0 +1,13 @@ +<%= back_link_to admin_settings_path %> +

<%= t("admin.settings.index.remote_census.title") %>

+ +<% if feature?(:remote_census) %> + <% @settings.each do |setting_group| %> +

<%= t("admin.settings.index.remote_census.#{setting_group.first.key.split(".").second}") %>

+ <%= render "settings_table", settings: setting_group %> + <% end %> +<% else %> +
+ <%= t("admin.settings.index.remote_census.how_to_enable") %> +
+<% end %> diff --git a/app/views/admin/settings/sms.html.erb b/app/views/admin/settings/sms.html.erb new file mode 100644 index 00000000000..5d1b9dcb471 --- /dev/null +++ b/app/views/admin/settings/sms.html.erb @@ -0,0 +1,4 @@ +<%= back_link_to admin_settings_path %> +

<%= t("admin.settings.index.sms.title") %>

+ +<%= render "settings_table", settings: @settings %> diff --git a/app/views/admin/settings/smtp.html.erb b/app/views/admin/settings/smtp.html.erb new file mode 100644 index 00000000000..0f878a08714 --- /dev/null +++ b/app/views/admin/settings/smtp.html.erb @@ -0,0 +1,10 @@ +<%= back_link_to admin_settings_path %> + +<% if feature?(:smtp_configuration) %> +

<%= t("admin.settings.index.smtp.title") %>

+ <%= render "mixed_settings_table", settings: @settings %> +<% else %> +
+ <%= t("admin.settings.index.smtp.how_to_enable") %> +
+<% end %> diff --git a/app/views/admin/settings/social.html.erb b/app/views/admin/settings/social.html.erb new file mode 100644 index 00000000000..e2b765ba373 --- /dev/null +++ b/app/views/admin/settings/social.html.erb @@ -0,0 +1,9 @@ +<%= back_link_to admin_settings_path %> +

<%= t("admin.settings.index.social.title") %>

+
+ <%= t("admin.settings.restart_info") %> +
+<% @settings.each do |setting_group| %> +

<%= t("admin.settings.index.social.#{setting_group.first.key.split(".").second}") %>

+ <%= render "mixed_settings_table", settings: setting_group %> +<% end %> diff --git a/app/views/admin/settings/uploads.html.erb b/app/views/admin/settings/uploads.html.erb new file mode 100644 index 00000000000..6ba029a5d7f --- /dev/null +++ b/app/views/admin/settings/uploads.html.erb @@ -0,0 +1,4 @@ +<%= back_link_to admin_settings_path %> +

<%= t("admin.settings.index.uploads.title") %>

+ +<%= render "settings_table", settings: @settings %> diff --git a/app/views/admin/site_customization/content_blocks/index.html.erb b/app/views/admin/site_customization/content_blocks/index.html.erb index 17328f8a252..c8b539120b5 100644 --- a/app/views/admin/site_customization/content_blocks/index.html.erb +++ b/app/views/admin/site_customization/content_blocks/index.html.erb @@ -6,7 +6,7 @@

<%= t("admin.site_customization.content_blocks.index.title") %>

-<%= render "admin/settings/settings_table", settings: @html_settings, setting_name: "setting" %> +<%= render "admin/settings/settings_table", settings: @html_settings %>

<%= t("admin.site_customization.content_blocks.information") %>

diff --git a/app/views/admin/wizards/_header_steps.html.erb b/app/views/admin/wizards/_header_steps.html.erb new file mode 100644 index 00000000000..d36b3a2035a --- /dev/null +++ b/app/views/admin/wizards/_header_steps.html.erb @@ -0,0 +1,19 @@ +
+
+

<%= t("wizard.header.title") %>

+ <%= t("wizard.header.step") %> <%= current_step %> <%= t("wizard.header.step_of") %> <%= total_steps %> +
+ +
+ <% if defined?(back_step) %> + <%= link_to back_step, class: "btn-back-step" do %> + + <%= t("wizard.header.back_step") %> + <% end %> + <% end %> + <% if defined?(next_step) %> + <%= link_to t("wizard.header.next_step"), next_step, class: "button" %> + <% end %> +
+
+
diff --git a/app/views/admin/wizards/_wizard.html.erb b/app/views/admin/wizards/_wizard.html.erb new file mode 100644 index 00000000000..3885b9763b9 --- /dev/null +++ b/app/views/admin/wizards/_wizard.html.erb @@ -0,0 +1,12 @@ + + + <%= t("wizard.admin.module_title") %> +
+ + <%= t("wizard.admin.description") %> + + + + <%= link_to t("admin.actions.configure"), new_admin_wizards_installer_path, class: "button hollow" %> + + diff --git a/app/views/admin/wizards/index.html.erb b/app/views/admin/wizards/index.html.erb new file mode 100644 index 00000000000..6f8901d135b --- /dev/null +++ b/app/views/admin/wizards/index.html.erb @@ -0,0 +1,8 @@ +

<%= t("wizard.admin.title") %>

+
+ + + <%= render partial: "wizard", collection: @wizards %> + +
+
diff --git a/app/views/admin/wizards/installer/finish.html.erb b/app/views/admin/wizards/installer/finish.html.erb new file mode 100644 index 00000000000..403a20ce280 --- /dev/null +++ b/app/views/admin/wizards/installer/finish.html.erb @@ -0,0 +1,11 @@ +<%= render "admin/wizards/header_steps", current_step: 7, + total_steps: @total_steps, + back_step: admin_wizards_installer_path(:regional) %> + +
+
+

<%= t("wizard.finish.title") %>

+

<%= t("wizard.finish.description_html") %>

+ <%= link_to t("wizard.finish.btn_finish"), admin_root_path, class: "button" %> +
+
diff --git a/app/views/admin/wizards/installer/general_settings.html.erb b/app/views/admin/wizards/installer/general_settings.html.erb new file mode 100644 index 00000000000..de2d9797fbd --- /dev/null +++ b/app/views/admin/wizards/installer/general_settings.html.erb @@ -0,0 +1,12 @@ +<%= render "admin/wizards/header_steps", current_step: 2, + total_steps: @total_steps, + back_step: new_admin_wizards_installer_path, + next_step: admin_wizards_installer_path(:participation_process) %> + +
+
+

<%= t("admin.menu.settings") %>

+

<%= t("wizard.general_settings.description_html") %>

+ <%= render "admin/settings/settings_table", settings: @settings %> +
+
diff --git a/app/views/admin/wizards/installer/map.html.erb b/app/views/admin/wizards/installer/map.html.erb new file mode 100644 index 00000000000..e530837bd14 --- /dev/null +++ b/app/views/admin/wizards/installer/map.html.erb @@ -0,0 +1,17 @@ +<%= render "admin/wizards/header_steps", current_step: 4, + total_steps: @total_steps, + back_step: admin_wizards_installer_path(:participation_process), + next_step: admin_wizards_installer_path(:smtp) %> + +
+
+

<%= t("admin.settings.index.map.title") %>

+

<%= t("wizard.map.description_html") %>

+ <%#= render "admin/settings/settings_table", settings: @settings %> + <% @settings.each do |setting_group| %> + <%= render "admin/settings/mixed_settings_table", settings: setting_group %> + <% end %> +

<%= t("admin.settings.index.map.help") %>

+ <%= render "admin/settings/map_form" %> +
+
diff --git a/app/views/admin/wizards/installer/new.html.erb b/app/views/admin/wizards/installer/new.html.erb new file mode 100644 index 00000000000..cee3e39bbd8 --- /dev/null +++ b/app/views/admin/wizards/installer/new.html.erb @@ -0,0 +1,10 @@ +<%= render "admin/wizards/header_steps", current_step: 1, + total_steps: @total_steps %> + +
+
+

<%= t("wizard.new.title") %>

+

<%= t("wizard.new.description_html") %>

+ <%= link_to t("wizard.new.btn_start"), admin_wizards_installer_path(:general_settings), class: "button" %> +
+
diff --git a/app/views/admin/wizards/installer/participation_process.html.erb b/app/views/admin/wizards/installer/participation_process.html.erb new file mode 100644 index 00000000000..9db21cd980d --- /dev/null +++ b/app/views/admin/wizards/installer/participation_process.html.erb @@ -0,0 +1,14 @@ +<%= render "admin/wizards/header_steps", current_step: 3, + total_steps: @total_steps, + back_step: admin_wizards_installer_path(:general_settings), + next_step: admin_wizards_installer_path(:map) %> + +
+
+

<%= t("admin.settings.index.process.title") %>

+

<%= t("wizard.partecipation_process.description_html") %>

+ <% @settings.each do |setting_group| %> + <%= render "admin/settings/mixed_settings_table", settings: setting_group %> + <% end %> +
+
diff --git a/app/views/admin/wizards/installer/regional.html.erb b/app/views/admin/wizards/installer/regional.html.erb new file mode 100644 index 00000000000..2e18f29c805 --- /dev/null +++ b/app/views/admin/wizards/installer/regional.html.erb @@ -0,0 +1,15 @@ +<%= render "admin/wizards/header_steps", current_step: 6, + total_steps: @total_steps, + back_step: admin_wizards_installer_path(:smtp), + next_step: admin_wizards_installer_path(:finish) %> + +
+
+

<%= t("wizard.regional.title") %>

+

<%= t("wizard.regional.description_html") %>

+ <% @settings.each do |setting_group| %> +

<%= t("admin.settings.index.regional.#{setting_group.first.key.split(".").second}") %>

+ <%= render "admin/settings/mixed_settings_table", settings: setting_group %> + <% end %> +
+
diff --git a/app/views/admin/wizards/installer/smtp.html.erb b/app/views/admin/wizards/installer/smtp.html.erb new file mode 100644 index 00000000000..0228508df4c --- /dev/null +++ b/app/views/admin/wizards/installer/smtp.html.erb @@ -0,0 +1,12 @@ +<%= render "admin/wizards/header_steps", current_step: 5, + total_steps: @total_steps, + back_step: admin_wizards_installer_path(:map), + next_step: admin_wizards_installer_path(:regional) %> + +
+
+

<%= t("wizard.smtp.title") %>

+

<%= t("wizard.smtp.description_html") %>

+ <%= render "admin/settings/mixed_settings_table", settings: @settings %> +
+
diff --git a/app/views/devise/_omniauth_form.html.erb b/app/views/devise/_omniauth_form.html.erb index 3f2ad28c810..c39bc7e869b 100644 --- a/app/views/devise/_omniauth_form.html.erb +++ b/app/views/devise/_omniauth_form.html.erb @@ -1,4 +1,4 @@ -<% if feature?(:twitter_login) || feature?(:facebook_login) || feature?(:google_login) %> +<% if feature?("twitter.login") || feature?("facebook.login") || feature?("google.login") %> <% if current_page?(new_user_session_path) %>
@@ -8,7 +8,7 @@
- <% if feature? :twitter_login %> + <% if feature?("twitter.login") %>
<%= link_to t("omniauth.twitter.name"), user_twitter_omniauth_authorize_path, title: t("omniauth.twitter.sign_in"), @@ -16,7 +16,7 @@
<% end %> - <% if feature? :facebook_login %> + <% if feature?("facebook.login") %>
<%= link_to t("omniauth.facebook.name"), user_facebook_omniauth_authorize_path, title: t("omniauth.facebook.sign_in"), @@ -24,7 +24,7 @@
<% end %> - <% if feature? :google_login %> + <% if feature?("google.login") %>
<%= link_to t("omniauth.google_oauth2.name"), user_google_oauth2_omniauth_authorize_path, title: t("omniauth.google_oauth2.sign_in"), @@ -45,7 +45,7 @@
- <% if feature? :twitter_login %> + <% if feature?("twitter.login") %>
<%= link_to t("omniauth.twitter.name"), user_twitter_omniauth_authorize_path, title: t("omniauth.twitter.sign_up"), @@ -53,7 +53,7 @@
<% end %> - <% if feature? :facebook_login %> + <% if feature?("facebook.login") %>
<%= link_to t("omniauth.facebook.name"), user_facebook_omniauth_authorize_path, title: t("omniauth.facebook.sign_up"), @@ -61,7 +61,7 @@
<% end %> - <% if feature? :google_login %> + <% if feature?("google.login") %>
<%= link_to t("omniauth.google_oauth2.name"), user_google_oauth2_omniauth_authorize_path, title: t("omniauth.google_oauth2.sign_up"), diff --git a/app/views/layouts/wizard.html.erb b/app/views/layouts/wizard.html.erb new file mode 100644 index 00000000000..e18fd4277ad --- /dev/null +++ b/app/views/layouts/wizard.html.erb @@ -0,0 +1,25 @@ + + + + + <%= render "layouts/common_head", default_title: "Admin" %> + <%= content_for :head %> + + + "> +
+
+
+ <%= render "layouts/admin_header" %> + +
+
+ <%= render "layouts/flash" %> + <%= yield %> +
+
+
+
+
+ + diff --git a/app/views/shared/_social_media_meta_tags.html.erb b/app/views/shared/_social_media_meta_tags.html.erb index af48d2bdaad..f5181099730 100644 --- a/app/views/shared/_social_media_meta_tags.html.erb +++ b/app/views/shared/_social_media_meta_tags.html.erb @@ -19,4 +19,4 @@ " /> " /> - +" /> diff --git a/config/application.rb b/config/application.rb index bb5a7580b97..173cf3dc0dd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -59,6 +59,8 @@ class Application < Rails::Application config.i18n.load_path += Dir[Rails.root.join("config", "locales", "custom", "**", "*.{rb,yml}")] config.after_initialize do + Regional::Locales.load_default_and_available_locales + Regional::Timezone.load_timezone Globalize.set_fallbacks_to_all_available_locales GraphQLApi::Loader.setup end diff --git a/config/deploy.rb b/config/deploy.rb index 21a0259ba0d..8ee96f75599 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -44,7 +44,7 @@ def deploysecret(key) before :starting, "rvm1:install:ruby" before :starting, "install_bundler_gem" - after "deploy:migrate", "add_new_settings" + after "deploy:migrate", "manage_settings" after :publishing, "deploy:restart" after :published, "delayed_job:restart" after :published, "refresh_sitemap" @@ -55,7 +55,7 @@ def deploysecret(key) desc "Deploys and runs the tasks needed to upgrade to a new release" task :upgrade do - after "add_new_settings", "execute_release_tasks" + after "manage_settings", "execute_release_tasks" invoke "deploy" end end @@ -78,11 +78,11 @@ def deploysecret(key) end end -task :add_new_settings do +task :manage_settings do on roles(:db) do within release_path do with rails_env: fetch(:rails_env) do - execute :rake, "settings:add_new_settings" + execute :rake, "settings:manage_settings" end end end diff --git a/config/environments/preproduction.rb b/config/environments/preproduction.rb index 78a4432494e..286b87e66d2 100644 --- a/config/environments/preproduction.rb +++ b/config/environments/preproduction.rb @@ -72,16 +72,7 @@ config.action_mailer.asset_host = "https://#{Rails.application.secrets.server_name}" # SMTP configuration to deliver emails - # Uncomment the following block of code and add your SMTP service credentials - # config.action_mailer.delivery_method = :smtp - # config.action_mailer.smtp_settings = { - # address: "smtp.example.com", - # port: 587, - # domain: "example.com", - # user_name: "", - # password: "", - # authentication: "plain", - # enable_starttls_auto: true } + # You can update SMTP credentials on admin settings section "SMTP configuration" # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). diff --git a/config/environments/production.rb b/config/environments/production.rb index 6c23b8ab55c..6a35472b847 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -73,16 +73,7 @@ config.action_mailer.asset_host = "https://#{Rails.application.secrets.server_name}" # SMTP configuration to deliver emails - # Uncomment the following block of code and add your SMTP service credentials - # config.action_mailer.delivery_method = :smtp - # config.action_mailer.smtp_settings = { - # address: "smtp.example.com", - # port: 587, - # domain: "example.com", - # user_name: "", - # password: "", - # authentication: "plain", - # enable_starttls_auto: true } + # You can update SMTP credentials on admin settings section "SMTP configuration" # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 8e64e9fae31..427f96f1b7e 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -72,16 +72,7 @@ config.action_mailer.asset_host = "https://#{Rails.application.secrets.server_name}" # SMTP configuration to deliver emails - # Uncomment the following block of code and add your SMTP service credentials - # config.action_mailer.delivery_method = :smtp - # config.action_mailer.smtp_settings = { - # address: "smtp.example.com", - # port: 587, - # domain: "example.com", - # user_name: "", - # password: "", - # authentication: "plain", - # enable_starttls_auto: true } + # You can update SMTP credentials on admin settings section "SMTP configuration" # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index a948511fdbc..e0cb4c19f86 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -48,6 +48,7 @@ data: - config/locales/%{locale}/stats.yml - config/locales/%{locale}/download.yml - config/locales/%{locale}/tracking.yml + - config/locales/%{locale}/wizard.yml # Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom: # `i18n-tasks normalize -p` will force move the keys according to these rules @@ -213,6 +214,10 @@ ignore_unused: - landings.cambia_tu_ciudad.* - "seeds.settings.*" - "dashboard.polls.*.submit" + - "admin.settings.index.remote_census.*" + - "admin.settings.index.social.*" + - "admin.settings.index.advanced.*" + - "admin.settings.index.regional.*" #### ## Exclude these keys from the `i18n-tasks eq-base" report: # ignore_eq_base: diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 3f4a58076a6..0867eb3d918 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -239,9 +239,18 @@ # Add a new OmniAuth provider. Check the wiki for more information on setting # up on your models and hooks. # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo' - config.omniauth :twitter, Rails.application.secrets.twitter_key, Rails.application.secrets.twitter_secret - config.omniauth :facebook, Rails.application.secrets.facebook_key, Rails.application.secrets.facebook_secret, scope: "email", info_fields: "email,name,verified" - config.omniauth :google_oauth2, Rails.application.secrets.google_oauth2_key, Rails.application.secrets.google_oauth2_secret + if ActiveRecord::Base.connection.data_source_exists?("settings") + twitter_key = Retrocompatibility.calculate_value("social.twitter.key", "twitter_key") + twitter_secret = Retrocompatibility.calculate_value("social.twitter.secret", "twitter_secret") + facebook_key = Retrocompatibility.calculate_value("social.facebook.key", "facebook_key") + facebook_secret = Retrocompatibility.calculate_value("social.facebook.secret", "facebook_secret") + google_key = Retrocompatibility.calculate_value("social.google.key", "google_oauth2_key") + google_secret = Retrocompatibility.calculate_value("social.google.secret", "google_oauth2_secret") + + config.omniauth :twitter, twitter_key, twitter_secret + config.omniauth :facebook, facebook_key, facebook_secret, scope: "email", info_fields: "email,name,verified" + config.omniauth :google_oauth2, google_key, google_secret + end # ==> Warden configuration # If you want to use other strategies, that are not supported by Devise, or diff --git a/config/locales/ar/admin.yml b/config/locales/ar/admin.yml index 5caaf653b5a..4e4b52d6d6e 100644 --- a/config/locales/ar/admin.yml +++ b/config/locales/ar/admin.yml @@ -1258,24 +1258,27 @@ ar: flash: updated: تم تحديث القيمة index: - update_setting: تحديث - participation_processes: "عمليات المشاركة" - feature_flags: المميزات - features: - enabled: "تم تفعيل الميزة" - disabled: "تم إلغاء الميزة" - enable: "تفعيل" - disable: "تعطيل" + process: + title: "عمليات المشاركة" + feature: + title: المميزات map: - title: تعديل الخريطة + title: تعديل الخريطة help: هنا يمكنك تخصيص طريقة عرض الخريطة للمستخدمين. اسحب محدد الخريطة أو انقر في أي مكان على الخريطة، حدد التكبير المطلوب وانقر على زر "تحديث". flash: update: تم تحديث تعديلات الخريطة بنجاح. form: submit: تحديث how_to_enable: 'لإظهار الخريطة للمستخدمين، يجب تفعيل "الموقع الجغرافي للمقترحات والاستثمارات في الميزانية" في علامة التبويب "الميزات".' - dashboard: - title: لوحة القيادة الخاصة بالمقترحات + proposals: + title: لوحة القيادة الخاصة بالمقترحات + update_setting: تحديث + feature_flags: المميزات + features: + enabled: "تم تفعيل الميزة" + disabled: "تم إلغاء الميزة" + enable: "تفعيل" + disable: "تعطيل" setting: الميزة setting_actions: الإجراءات setting_name: إعداد diff --git a/config/locales/ast/admin.yml b/config/locales/ast/admin.yml index 2133ec5618f..fa8f78603eb 100644 --- a/config/locales/ast/admin.yml +++ b/config/locales/ast/admin.yml @@ -755,16 +755,42 @@ ast: updated: Valor actualizado index: title: Configuración global - update_setting: Actualizar - feature_flags: Funcionalidades + configuration: + title: Configuración global + description: Listado de configuraciones generales para personalizar la aplicación. + process: + title: Procesos de participación + description: Selecciona los procesos de participación que estaran disponibles en la aplicación. + uploads: + title: Imágenes y documentos + description: Personaliza las características de los archivos adjuntos de la aplicación. + feature: + title: Funcionalidades + description: Activa/Desactiva las diferentes funcionalidades que ofrece la aplicación. + map: + title: Configuración del mapa + description: Permite actualizar la geolocalización de la aplicación, y definir el zoom del mapa que se mostrará a los usuarios. + help: Aquí puedes personalizar la manera en la que se muestra el mapa a los usuarios. Arrastra el marcador o pulsa sobre cualquier parte del mapa, ajusta el zoom y pulsa el botón 'Actualizar'. + flash: + update: La configuración del mapa se ha guardado correctamente. + form: + submit: Actualizar + how_to_enable: 'Para mostrar el mapa a los usuarios se debe de activar "Geolocalización de propuestas y proyectos de gasto" en la pestaña "Funcionalidades".' + proposals: + title: Panel de progreso de propuestas + description: Permite configurar los principales campos para ofrecer a los usuarios un panel de control para sus propuestas. + remote_census: + title: Configuración del Censo Remoto + description: Permite configurar la conexión con el Censo Remoto (SOAP) + how_to_enable: 'Para configurar la conexión con el Censo Remoto (SOAP) se debe activar "Configurar la conexión al censo remoto (SOAP)" en la pestaña "Funcionalidades".' + general: Datos Generales + request: Datos Petición + response: Datos Respuesta features: enabled: "Funcionalidad activada" disabled: "Funcionalidad desactivada" enable: "Activar" disable: "Desactivar" - map: - form: - submit: Actualizar setting_actions: Acciones setting_status: Estáu setting_value: Valor diff --git a/config/locales/ast/settings.yml b/config/locales/ast/settings.yml index e00bbb75ed9..77a68dc9097 100644 --- a/config/locales/ast/settings.yml +++ b/config/locales/ast/settings.yml @@ -23,8 +23,12 @@ ast: meta_keywords: "Palabras clave (SEO)" min_age_to_participate: Edad mínima para participar feature: - twitter_login: "Registro con Twitter" - facebook_login: "Registro con Facebook" - google_login: "Registro con Google" signature_sheets: "Hojas de firmas" spending_proposals: "Propuestes d'inversión" + social: + twitter: + login: "Registro con Twitter" + facebook: + login: "Registro con Facebook" + google: + login: "Registro con Google" diff --git a/config/locales/bs-BA/admin.yml b/config/locales/bs-BA/admin.yml index c771f0c6ab0..4dbabc6c080 100644 --- a/config/locales/bs-BA/admin.yml +++ b/config/locales/bs-BA/admin.yml @@ -1270,14 +1270,12 @@ bs: updated: Vrijednost ažurirana index: title: Postavke za konfiguraciju - update_setting: Ažuriraj - participation_processes: "Participativni procesi" - feature_flags: Značajke - features: - enabled: "Značajke uključene" - disabled: "Značajke isključene" - enable: "Uključi" - disable: "Isključi" + configuration: + title: Postavke za konfiguraciju + process: + title: "Participativni procesi" + feature: + title: Značajke map: title: Konfiguracija mape help: Ovdje možete prilagoditi način na koji se mapa prikazuje korisnicima. Vucite marker ili kliknite bilo gdje iznad mape, podesite zumiranje i pritisnite dugme za ažuriranje podataka. @@ -1286,8 +1284,14 @@ bs: form: submit: Ažuriraj how_to_enable: 'Kako bi se pokazala mapa korisnicima, u tabu "Značajke" morate uključiti "Geolociranje prijedloga i budžetskih investicija".' - dashboard: + proposals: title: Kontrolna ploča za prijedloge + update_setting: Ažuriraj + features: + enabled: "Značajke uključene" + disabled: "Značajke isključene" + enable: "Uključi" + disable: "Isključi" setting: Značajka setting_actions: Radnje setting_name: Postavke diff --git a/config/locales/bs-BA/settings.yml b/config/locales/bs-BA/settings.yml index ab95818f1e8..d3aa0c99927 100644 --- a/config/locales/bs-BA/settings.yml +++ b/config/locales/bs-BA/settings.yml @@ -83,12 +83,6 @@ bs: direct_message_max_per_day: "Maksimalni broj direktnih poruka po danu" direct_message_max_per_day_description: "Maksimalni broj direktnih poruka koje korisnik može poslati u jednom danu" feature: - twitter_login: "Prijava preko Twittera" - twitter_login_description: "Omogući korisnicima da se prijave preko Twitter profila" - facebook_login: "Prijava preko Facebooka" - facebook_login_description: "Omogući korisnicima da se prijave preko Facebook profila" - google_login: "Prijava preko Googlea" - google_login_description: "Omogući korisnicima da se prijave preko Google profila" featured_proposals: "Istaknuti prijedlozi" featured_proposals_description: "Pokazuje istaknute prijedloge na strani sa indeksom prijedloga" signature_sheets: "Potpisni listovi" @@ -144,3 +138,13 @@ bs: per_page_code_head_description: "Kod se pojavljuje u etiketi . Korisno za unošenje prilagođenih skripti, analitike..." per_page_code_body: "Kod na svakoj strani ()" per_page_code_body_description: "Kod se pojavljuje u etiketi . Korisno za unošenje prilagođenih skripti, analitike..." + social: + twitter: + login: "Prijava preko Twittera" + login_description: "Omogući korisnicima da se prijave preko Twitter profila" + facebook: + login: "Prijava preko Facebooka" + login_description: "Omogući korisnicima da se prijave preko Facebook profila" + google: + login: "Prijava preko Googlea" + login_description: "Omogući korisnicima da se prijave preko Google profila" diff --git a/config/locales/ca/admin.yml b/config/locales/ca/admin.yml index e23c97cecd8..cffca44ce04 100644 --- a/config/locales/ca/admin.yml +++ b/config/locales/ca/admin.yml @@ -732,16 +732,19 @@ ca: updated: Valor actualitzat index: title: Configuració global + configuration: + title: Configuració global + feature: + title: Funcionalitats + map: + form: + submit: Actualitzar update_setting: Actualitzar - feature_flags: Funcionalitats features: enabled: "Funcionalitat activada" disabled: "Funcionalitat desactivada" enable: "Activa" disable: "Desactivar" - map: - form: - submit: Actualitzar setting_actions: Accions setting_status: Estat setting_value: valor diff --git a/config/locales/ca/settings.yml b/config/locales/ca/settings.yml index 5578af870c1..c759ac70359 100644 --- a/config/locales/ca/settings.yml +++ b/config/locales/ca/settings.yml @@ -21,8 +21,12 @@ ca: meta_keywords: "Paraules clau (SEO)" min_age_to_participate: Edat mínima per participar feature: - twitter_login: "Registre amb Twitter" - facebook_login: "Registre amb Facebook" - google_login: "Registre amb Google" signature_sheets: "Fulla de signatures" spending_proposals: "Propuestas de inversión" + social: + twitter: + login: "Registre amb Twitter" + facebook: + login: "Registre amb Facebook" + google: + login: "Registre amb Google" diff --git a/config/locales/cs-CZ/admin.yml b/config/locales/cs-CZ/admin.yml index 8d8e3f7d122..7c65ed20163 100644 --- a/config/locales/cs-CZ/admin.yml +++ b/config/locales/cs-CZ/admin.yml @@ -1099,13 +1099,10 @@ cs: updated: Hodnota aktualizována index: title: Nastavení konfigurace - update_setting: Aktualizovat - feature_flags: Doporučené - features: - enabled: "Funkce povolena" - disabled: "Funkce je zakázaná" - enable: "Povolit" - disable: "Zakázat" + configuration: + title: Nastavení konfigurace + feature: + title: Doporučené map: title: Konfigurace mapy help: Zde můžete přizpůsobit zobrazení mapy uživatelům. Přetáhněte značku mapy nebo klikněte kdekoli na mapu, nastavte požadované zvětšení a klikněte na tlačítko "Aktualizovat". @@ -1113,6 +1110,12 @@ cs: update: Nastavení mapy bylp úspěšně aktualizováno. form: submit: Aktualizovat + update_setting: Aktualizovat + features: + enabled: "Funkce povolena" + disabled: "Funkce je zakázaná" + enable: "Povolit" + disable: "Zakázat" setting: Vlastnosti setting_actions: Akce setting_name: Nastavení diff --git a/config/locales/cs-CZ/settings.yml b/config/locales/cs-CZ/settings.yml index 35591abbfc6..d11ec170b7b 100644 --- a/config/locales/cs-CZ/settings.yml +++ b/config/locales/cs-CZ/settings.yml @@ -62,12 +62,6 @@ cs: min_age_to_participate_description: "Uživatelé od tohoto věku se mohou účastnit všech procesů" analytics_url: "Adresa URL služby Analytics" feature: - twitter_login: "Twutter přihlášení" - twitter_login_description: "Povolit uživatelům, aby se zaregistrovali se svým účtem Twitter" - facebook_login: "Facebook přihlášení" - facebook_login_description: "Povolit uživatelům, aby se zaregistrovali se svým účtem Facebook" - google_login: "Přihlášení Google" - google_login_description: "Povolit uživatelům, aby se zaregistrovali se svým účtem Google" featured_proposals: "Doporučené návrhy" featured_proposals_description: "Zobrazit doporučené návrhy na hlavní stránce návrhů" signature_sheets: "Podpisové archy" @@ -100,3 +94,13 @@ cs: public_stats_description: "Zobrazit veřejné statistiky v panelu Administrace" help_page: "Stránka nápovědy" help_page_description: 'Zobrazí nabídku Nápověda obsahující stránku s informacemi o každé povolené funkci' + social: + twitter: + login: "Twutter přihlášení" + login_description: "Povolit uživatelům, aby se zaregistrovali se svým účtem Twitter" + facebook: + login: "Facebook přihlášení" + login_description: "Povolit uživatelům, aby se zaregistrovali se svým účtem Facebook" + google: + login: "Přihlášení Google" + login_description: "Povolit uživatelům, aby se zaregistrovali se svým účtem Google" diff --git a/config/locales/da-DK/admin.yml b/config/locales/da-DK/admin.yml index fb55898ed93..4f002a48be1 100644 --- a/config/locales/da-DK/admin.yml +++ b/config/locales/da-DK/admin.yml @@ -1237,14 +1237,12 @@ da: updated: Pris opdateret index: title: Konfigurationsindstillinger - update_setting: Opdater - participation_processes: "Deltagelsesprocesser" - feature_flags: Funktioner - features: - enabled: "Funktion aktiveret" - disabled: "Funktion deaktiveret" - enable: "Aktiver" - disable: "Deaktiver" + configuration: + title: Konfigurationsindstillinger + process: + title: Deltagelsesprocesser + feature: + title: Funktioner map: title: Kortindstillinger help: Her kan du indstille, hvordan kortet vises til brugerne. Træk kortmarkøren eller klik på kortet, indstil den ønskede zoom og klik på knappen "Opdater". @@ -1253,8 +1251,14 @@ da: form: submit: Opdater how_to_enable: 'For at gøre kortet synligt for brugerne skal du aktivere "Borger- og budgetforslags geografiske område" under fanebladet "Funktioner".' - dashboard: + proposals: title: Dashboard for forslag + update_setting: Opdater + features: + enabled: "Funktion aktiveret" + disabled: "Funktion deaktiveret" + enable: "Aktiver" + disable: "Deaktiver" setting: Funktioner setting_actions: Handlinger setting_name: Indstillinger diff --git a/config/locales/da-DK/settings.yml b/config/locales/da-DK/settings.yml index e950e137376..b3c138a3a38 100644 --- a/config/locales/da-DK/settings.yml +++ b/config/locales/da-DK/settings.yml @@ -83,12 +83,6 @@ da: direct_message_max_per_day: "Max antal direkte beskeder pr. dag" direct_message_max_per_day_description: "Det maksimale antal direkte beskeder en bruger kan sende om dagen" feature: - twitter_login: "Twitter login" - twitter_login_description: "Tillad brugere at registrere sig med Twitter" - facebook_login: "Facebook login" - facebook_login_description: "Tillad brugere at registrere sig med Facebook" - google_login: "Google login" - google_login_description: "Tillad brugere at registrere sig med Google" featured_proposals: "Udvalgte forslag" featured_proposals_description: "Viser udvalgte forslag på indeks" signature_sheets: "Signaturark" @@ -144,3 +138,13 @@ da: per_page_code_head_description: "Denne kode vises i . Brugbar i forhold til indlæsning af brugerdefinerede fremstillinger, analyser..." per_page_code_body: "Kode inkluderet på alle sidesektioner ()" per_page_code_body_description: "Denne kode vises i . Brugbar i forhold til indlæsning af brugerdefinerede fremsitllinger, analyser..." + social: + twitter: + login: "Twitter login" + login_description: "Tillad brugere at registrere sig med Twitter" + facebook: + login: "Facebook login" + login_description: "Tillad brugere at registrere sig med Facebook" + google: + login: "Google login" + login_description: "Tillad brugere at registrere sig med Google" diff --git a/config/locales/de-DE/admin.yml b/config/locales/de-DE/admin.yml index f518bd40210..cc74426280b 100644 --- a/config/locales/de-DE/admin.yml +++ b/config/locales/de-DE/admin.yml @@ -1117,13 +1117,10 @@ de: updated: Wert aktualisiert index: title: Konfigurationseinstellungen - update_setting: Aktualisieren - feature_flags: Funktionen - features: - enabled: "Funktion aktiviert" - disabled: "Funktion deaktiviert" - enable: "Aktivieren" - disable: "Deaktivieren" + configuration: + title: Konfigurationseinstellungen + feature: + title: Funktionen map: title: Kartenkonfiguration help: Hier können Sie festlegen, wie die Karte den Benutzer*innen angezeigt wird. Bewegen Sie den Marker oder klicken Sie auf einen beliebigen Teil der Karte, passen Sie den Zoom an und klicken Sie auf die Schaltfläche "Aktualisieren". @@ -1131,6 +1128,15 @@ de: update: Kartenkonfiguration erfolgreich aktualisiert. form: submit: Aktualisieren + proposals: + title: Panel de progreso de propuestas + description: Permite configurar los principales campos para ofrecer a los usuarios un panel de control para sus propuestas. + update_setting: Aktualisieren + features: + enabled: "Funktion aktiviert" + disabled: "Funktion deaktiviert" + enable: "Aktivieren" + disable: "Deaktivieren" setting: Funktion setting_actions: Aktionen setting_name: Einstellung diff --git a/config/locales/de-DE/settings.yml b/config/locales/de-DE/settings.yml index 89bce893619..4285ba63fa0 100644 --- a/config/locales/de-DE/settings.yml +++ b/config/locales/de-DE/settings.yml @@ -58,12 +58,6 @@ de: min_age_to_participate_description: "Nutzer ab diesem Alter können an allen Prozessen teilnehmen" analytics_url: "Analytik-URL" feature: - twitter_login: "Twitter login" - twitter_login_description: "Anmeldung mit Twitter-Account erlauben" - facebook_login: "Facebook login" - facebook_login_description: "Anmeldung mit Facebook-Account erlauben" - google_login: "Google login" - google_login_description: "Anmeldung mit Google-Account erlauben" signature_sheets: "Unterschriftenbögen" spending_proposals: "Ausgabenvorschläge" spending_proposals_description: "⚠️ Hinweis: Diese Funktionalität wurde durch Bürgerhaushaltung ersetzt und verschwindet in neuen Versionen" @@ -93,3 +87,13 @@ de: public_stats_description: "Öffentliche Statistiken im Administrationsbereich anzeigen" help_page: "Hilfeseite" help_page_description: 'Zeigt ein "Hilfe"-Menü an, das eine Seite mit Informationen über die einzelnen aktivierten Funktionen enthält' + social: + twitter: + login: "Twitter login" + login_description: "Anmeldung mit Twitter-Account erlauben" + facebook: + login: "Facebook login" + login_description: "Anmeldung mit Facebook-Account erlauben" + google: + login: "Google login" + login_description: "Anmeldung mit Google-Account erlauben" diff --git a/config/locales/el-GR/admin.yml b/config/locales/el-GR/admin.yml index a14dabb6221..1485dad28b3 100644 --- a/config/locales/el-GR/admin.yml +++ b/config/locales/el-GR/admin.yml @@ -112,7 +112,7 @@ el: title: Νέος συμμετοχικός προϋπολογισμός winners: calculate: Υπολογισμός νικητήριων επενδύσεων - calculated: Υπολογισμός νικητών. Η διαδικασία θα ολοκληρωθεί σύντομα. + calculated: Υπολογισμός νικητών. Η διαδικασία θα ολοκληρωθεί σύντομα. recalculate: Επαναυπολογισμός νικητήριων επενδύσεων budget_groups: name: "Όνομα" @@ -230,7 +230,7 @@ el: author_username: Όνομα συντάκτη incompatible: Δεν είναι συμβατά price: Τιμή - cannot_calculate_winners: Ο προϋπολογισμός πρέπει να παραμείνει στη φάση «Ψηφοφορία προγραμμάτων», «Εξέταση ψηφοδελτίων» ή «Τελικός προϋπολογισμός» προκειμένου να επιλεχθούν τα νικητήρια προγράμματα. + cannot_calculate_winners: Ο προϋπολογισμός πρέπει να παραμείνει στη φάση «Ψηφοφορία προγραμμάτων», «Εξέταση ψηφοδελτίων» ή «Τελικός προϋπολογισμός» προκειμένου να επιλεχθούν τα νικητήρια προγράμματα. see_results: "Εμφάνιση αποτελεσμάτων" show: assigned_admin: Ανατεθημένος διαχειριστής @@ -299,7 +299,7 @@ el: new_milestone: Δημιουργία νέου ορόσημου form: admin_statuses: Διαχείριση καταστάσεων - no_statuses_defined: Δεν υπάρχουν καθορισμένες καταστάσεις + no_statuses_defined: Δεν υπάρχουν καθορισμένες καταστάσεις new: creating: Δημιουργία ορόσημου date: Ημερομηνία @@ -315,7 +315,7 @@ el: statuses: index: title: Καταστάσεις οροσήμων - empty_statuses: Δεν υπάρχουν καταστάσεις ορόσημων + empty_statuses: Δεν υπάρχουν καταστάσεις ορόσημων new_status: Δημιουργία νέας κατάστασης οροσήμου table_name: Όνομα table_description: Περιγραφή @@ -388,7 +388,7 @@ el: required_supports: Απαιτούμενη στήριξη day_offset: Απαιτούμενες ημέρες action_active: Ενεργό - order: Σειρά + order: Σειρά published_proposal: Δημοσιευμένη πρόταση default: email: E-Mail @@ -1260,14 +1260,12 @@ el: updated: Η αξία ανανεώθηκε index: title: Ρυθμίσεις διαμόρφωσης - update_setting: Ενημέρωση - participation_processes: "Διαδικασίες συμμετοχής" - feature_flags: Χαρακτηριστικά - features: - enabled: "Χαρακτηριστικό ενεργοποιημένο" - disabled: "Χαρακτηριστικό απενεργοποιημένο" - enable: "Ενεργοποίηση" - disable: "Απενεργοποίηση" + configuration: + title: Ρυθμίσεις διαμόρφωσης + process: + title: "Διαδικασίες συμμετοχής" + feature: + title: Χαρακτηριστικά map: title: Διαμόρφωση χάρτη help: Εδώ μπορείτε να προσαρμόσετε τον τρόπο που θα εμφανιστεί ο χάρτης για τους χρήστες. Σύρετε το δείκτη του χάρτη ή κάντε κλικ οπουδήποτε πάνω στο χάρτη, ρυθμίστε το επιθυμητό ζουμ και κάντε κλικ στο κουμπί «Ενημέρωση». @@ -1276,8 +1274,14 @@ el: form: submit: Ενημέρωση how_to_enable: 'Για να δείξετε το χάρτη σε χρήστες πρέπει να ενεργοποιήσετε το «Προτάσεις και γεωτοποθεσία προϋπολογισμού επενδύσεων » στην καρτέλα «Χαρακτηριστικά».' - dashboard: + proposals: title: Πίνακας εργαλείων προτάσεων + update_setting: Ενημέρωση + features: + enabled: "Χαρακτηριστικό ενεργοποιημένο" + disabled: "Χαρακτηριστικό απενεργοποιημένο" + enable: "Ενεργοποίηση" + disable: "Απενεργοποίηση" setting: Χαρακτηριστικό setting_actions: Ενέργειες setting_name: Ρύθμιση diff --git a/config/locales/el-GR/settings.yml b/config/locales/el-GR/settings.yml index 4f366cca92a..f5e1670e3e8 100644 --- a/config/locales/el-GR/settings.yml +++ b/config/locales/el-GR/settings.yml @@ -83,12 +83,6 @@ el: direct_message_max_per_day: "Μέγιστος αριθμός άμεσων μηνυμάτων ανά ημέρα" direct_message_max_per_day_description: "Μέγιστος αριθμός των άμεσων μηνυμάτων που μπορεί να στείλει ένας χρήστης ανά ημέρα" feature: - twitter_login: "Σύνδεση στο Twitter" - twitter_login_description: "Να επιτρέπεται στους χρήστες να υπογράφουν με το λογαριασμό τους στο Twitter" - facebook_login: "Σύνδεση με Facebook" - facebook_login_description: "Να επιτρέπεται στους χρήστες να εγγράφονται με το λογαριασμό τους στο Facebook" - google_login: "Σύνδεση με Google" - google_login_description: "Να επιτρέπεται στους χρήστες η εγγραφή με τον Google λογαριασμό τους" featured_proposals: "Προτεινόμενες προτάσεις" featured_proposals_description: "Εμφανίζει προτεινόμενες προτάσεις στη σελίδα περιεχόμενο προτάσεων" signature_sheets: "Φύλλα υπογραφών" @@ -144,3 +138,13 @@ el: per_page_code_head_description: "Αυτός ο κωδικός θα εμφανιστεί μέσα σε ετικέτα . Χρήσιμος για την εισαγωγή προσαρμοσμένων δεσμών ενεργειών..." per_page_code_body: "Κωδικός που πρέπει να περιλαμβάνονται σε κάθε σελίδα ()" per_page_code_body_description: "Αυτός ο κωδικός θα εμφανιστεί μέσα σε ετικέτα . Χρήσιμος για την εισαγωγή προσαρμοσμένων δεσμών ενεργειών..." + social: + twitter: + login: "Σύνδεση στο Twitter" + login_description: "Να επιτρέπεται στους χρήστες να υπογράφουν με το λογαριασμό τους στο Twitter" + facebook: + login: "Σύνδεση με Facebook" + login_description: "Να επιτρέπεται στους χρήστες να εγγράφονται με το λογαριασμό τους στο Facebook" + google: + login: "Σύνδεση με Google" + login_description: "Να επιτρέπεται στους χρήστες η εγγραφή με τον Google λογαριασμό τους" diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 3685fcb649e..a8d7d3ad15c 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -709,6 +709,7 @@ en: debates: "Debates" comments: "Comments" local_census_records: Manage local census + wizards: Wizard administrators: index: title: Administrators @@ -1246,38 +1247,74 @@ en: updated: Value updated index: title: Settings - general: Configuration settings - update_setting: Update - participation_processes: "Participation processes" - images_and_documents: "Images and documents" - feature_flags: Features - features: - enabled: "Feature enabled" - disabled: "Feature disabled" - enable: "Enable" - disable: "Disable" + configuration: + title: Configuration settings + description: List of general configurations to customize the application. + process: + title: Participation processes + description: Selects the participation processes that will be available in the application. + uploads: + title: Images and documents + description: Customize the characteristics of the application attachments. + feature: + title: Features + description: Activates/deactivates the different functionalities offered by the application. map: title: Map configuration + description: Allows you to update the geolocation of the application, and define the zoom of the map that will be shown to users. help: Here you can customize the way the map is displayed to users. Drag map marker or click anywhere over the map, set desired zoom and click button "Update". flash: update: Map configuration updated succesfully. form: submit: Update how_to_enable: 'To show the map to users you must enable "Proposals and budget investments geolocation" on "Features" tab.' - dashboard: + proposals: title: Proposals dashboard + description: Allows configuring the main fields to offer users a control panel for their proposals. remote_census: title: Remote Census configuration + description: Allow configure remote census (SOAP) how_to_enable: 'To configure remote census (SOAP) you must enable "Configure connection to remote census (SOAP)" on "Features" tab.' - remote_census_general_name: General Information - remote_census_request_name: Request Data - remote_census_response_name: Response Data + general: General Information + request: Request Data + response: Response Data + update_setting: Update + features: + enabled: "Feature enabled" + disabled: "Feature disabled" + enable: "Enable" + disable: "Disable" + social: + title: "Registration with social networks" + description: "Allow users to sign up with social networks (Twitter, Facebook, Google)" + facebook: "Facebook" + twitter: "Twitter" + google: "Google" + advanced: + title: "Advanced Configuration" + description: "Allow update advanced configuration" + auth: "Http basic authentication" + tracking: "Error tracking" + smtp: + title: "SMTP Configuration" + description: "Set SMTP server configuration to send emails." + how_to_enable: 'To update SMTP configuration you must enable "SMTP Configuration" on "Features" tab.' + regional: + title: "Languages and Time Zone" + description: "Set default locale, available locales and time zone" + default_locale: "Application default locale" + available_locale: "Application available locales" + timezone: "Time Zone" + sms: + title: SMS Configuration + description: "Set SMS configuration to send sms for verification users." setting: Feature setting_actions: Actions setting_name: Setting setting_status: Status setting_value: Value no_description: "No description" + restart_info: "Note: For changes to this section to take effect correctly, contact your system administrator to restart all services that are using the application." shared: true_value: "Yes" false_value: "No" diff --git a/config/locales/en/settings.yml b/config/locales/en/settings.yml index f2eef602a8b..b0be0ef12f0 100644 --- a/config/locales/en/settings.yml +++ b/config/locales/en/settings.yml @@ -83,12 +83,6 @@ en: direct_message_max_per_day: "Direct Message max number per day" direct_message_max_per_day_description: "Number max of direct messages one user can send per day" feature: - twitter_login: "Twitter login" - twitter_login_description: "Allow users to sign up with their Twitter account" - facebook_login: "Facebook login" - facebook_login_description: "Allow users to sign up with their Facebook account" - google_login: "Google login" - google_login_description: "Allow users to sign up with their Google Account" featured_proposals: "Featured proposals" featured_proposals_description: "Shows featured proposals on index proposals page" signature_sheets: "Signature sheets" @@ -122,6 +116,8 @@ en: translation_interface_description: "Displays the manual translation interface that allows users to enter their content in all application available languages. This option only affects user application forms and independently will always be active in the administration panel." remote_census: "Configure connection to remote census (SOAP)" remote_census_description: "Allows to configure the connection to the remote census of each institution" + smtp_configuration: "SMTP Configuration" + smtp_configuration_description: "Enable this feature to send emails through SMTP server." valuation_comment_notification: "Valuation comment notification" valuation_comment_notification_description: "Send an email to all associated users except valuation commenter to budget investment when a new valuation comment is created" remote_census: @@ -163,6 +159,10 @@ en: longitude_description: "Longitude to show the position of the map" zoom: "Zoom" zoom_description: "Zoom to show the map position" + tiles_provider: "TMS(Tile Map Service) Provider" + tiles_provider_description: "Example value: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'" + tiles_provider_attribution: "Attribution from TMS Provider" + tiles_provider_attribution_description: "Example value: '© OpenStreetMap contributors'" process: debates: "Debates" debates_description: "The citizens' debate space is aimed at anyone who can present issues that concern them and about which they want to share their views with others" @@ -201,3 +201,120 @@ en: max_size_description: "Maximum size allowed for an uploaded document (in Megabytes/MB)" content_types: "Accepted content types for documents" content_types_description: "Select all the content types allowed for uploaded documents" + social: + twitter: + login: "Twitter login" + login_description: "Allow users to sign up with their Twitter account" + key: "API Key Twitter" + key_description: "API key to configure the registration via Twitter" + secret: "Secret Token Twitter" + secret_description: "Secret Token to configure the registration via Twitter" + facebook: + login: "Facebook login" + login_description: "Allow users to sign up with their Facebook account" + key: "API Key Facebook" + key_description: "API key to configure the registration via Facebook" + secret: "Secret Token Facebook" + secret_description: "Secret token to configure the registration via Facebook" + google: + login: "Google login" + login_description: "Allow users to sign up with their Google account" + key: "API Key Google" + key_description: "API key to configure the registration via Google" + secret: "Secret Token Google" + secret_description: "Secret token to configure the registration via Google" + advanced: + auth: + http_basic_auth: "Http basic authentication" + http_basic_auth_description: "Allow Enable/Disable http basic authentication. In order to enable this field ensure have defined a user and password." + http_basic_username: "Http basic authentication Username." + http_basic_username_description: "Allow set Username. In order to update the User must first disable the Http Basic Authentication, update the User and re-enable the Http Basic Authentication." + http_basic_password: "Http basic authentication Password." + http_basic_password_description: "Allow set Password. In order to update the Password must first disable the Http Basic Authentication, update the Password and re-enable the Http Basic Authentication." + tracking: + rollbar_server_token: "Rollbar server token" + rollbar_server_token_description: "This token will give the application access to your Rollbar account." + smtp: + address: "SMTP Host" + address_description: "Configure SMTP server host. Example: 'smtp.example.com'" + port: "SMTP Port" + port_description: "Configure SMTP server port. Example: 587" + domain: "Domain" + domain_description: "Configure SMTP server domain. Example: 'example.com'" + username: "SMTP User" + username_description: "Configure SMTP server user. Example: 'username'" + password: "SMTP Password" + password_description: "Configure SMTP server password. Example: 'password'" + authentication: "SMTP Authentication" + authentication_description: "Configure SMTP server authentication type. Example: 'plain'" + enable_starttls_auto: "Enable SMTP TLS" + enable_starttls_auto_description: "Configure SMTP server TLS configuration. Example: 'true'" + regional: + default_locale: + key: "Default locale" + key_description: "Set application default language." + available_locale: + ar: "Arabic" + ar_description: "Enable the Arabic language in the application" + bs: "Bosnian" + bs_description: "Enable the Bosnian language in the application" + cs: "Czech" + cs_description: "Enable the Czech language in the application" + da: "Danish" + da_description: "Enable the Danish language in the application" + de: "German" + de_description: "Enable the German language in the application" + el: "Greek" + el_description: "Enable the Greek language in the application" + en: "English" + en_description: "Enable the English language in the application" + es: "Spanish" + es_description: "Enable the Spanish language in the application" + fa: "Persian" + fa_description: "Enable the Persian language in the application" + fr: "French" + fr_description: "Enable the French language in the application" + gl: "Galician" + gl_description: "Enable the Galician language in the application" + he: "Hebrew" + he_description: "Enable the Hebrew language in the application" + hr: "Croatian" + hr_description: "Enable the Croatian language in the application" + id: "Indonesian" + id_description: "Enable the Indonesian language in the application" + it: "Italian" + it_description: "Enable the Italian language in the application" + nl: "Dutch" + nl_description: "Enable the Dutch language in the application" + pl: "Polish" + pl_description: "Enable the Polish language in the application" + pt-BR: "Brazilian Portuguese" + pt-BR_description: "Enable the Brazilian Portuguese language in the application" + ru: "Russian" + ru_description: "Enable the Russian language in the application" + sl: "Slovenian" + sl_description: "Enable the Slovenian language in the application" + sq: "Albanian" + sq_description: "Enable the Albanian language in the application" + so: "Somali" + so_description: "Enable the Somali language in the application" + sv: "Swedish" + sv_description: "Enable the Swedish language in the application" + tr: "Turkish" + tr_description: "Enable the Turkish language in the application" + val: "Valencian" + val_description: "Enable the Valencian language in the application" + zh-CN: "Chinese" + zh-CN_description: "Enable the Chinese language in the application" + zh-TW: "Taiwanese" + zh-TW_description: "Enable the Taiwanese language in the application" + time_zone: + key: "Time Zone" + key_description: "Define the Time Zone of the application" + sms: + endpoint: "SMS endpoint" + endpoint_description: "Host name where the sms service is available" + username: "SMS service username" + username_description: "Allow set username" + password: "SMS service password" + password_description: "Allow set password" diff --git a/config/locales/en/wizard.yml b/config/locales/en/wizard.yml new file mode 100644 index 00000000000..a22258d6a74 --- /dev/null +++ b/config/locales/en/wizard.yml @@ -0,0 +1,32 @@ +en: + wizard: + admin: + title: Wizard + module_title: Installation Wizard + description: Through this tool we present you the installation of the system. + header: + title: Installation Wizard + step: Step + step_of: of + back_step: Back + next_step: Next + new: + title: Welcome to the Consul installation wizard + description_html: In this wizard we will carry out step by step all the necessary configuration to be able to customize the application to the needs of your Institution. If you do not have any information requested in the wizard, you will be able to ignore it and modify it in the future in the related Settings Section or from this same Wizard. + btn_start: Get Started + general_settings: + description_html: In this step you can update some of the most important Global Application Settings. If you want to modify any of them once the Wizard has been carried out, you can go to the "Configuration > Global Configuration" section or by running the Installation Wizard again. + partecipation_process: + description_html: In this step you can activate/deactivate the participation processes that each Institution decides to use. If you want to modify any of them once the Wizard has been carried out, you can access the "Configuration > Participation Processes" section or by running the Installation Wizard again. + map: + description_html: In this step you will be able to activate/deactivate the geolocation of proposals and spending projects, and customize the way the map is shown to users. If you want to modify any of them once the Wizard has been carried out, you can access the "Configuration > Map Configuration" section or run the Installation Wizard again. + smtp: + title: SMTP Connection + description_html: In this step you will be able to configure the SMTP connection to be able to send mails from the application. If you want to modify any of them once the Wizard has been carried out, you will be able to access the section "Configuration > SMTP Connection" or by running the Installation Wizard again. + regional: + title: Languages and Time Zone + description_html: In this step you can set the default language of the application, the available languages and the time zone you are in. If you want to modify any of them once the Wizard has been carried out, you can go to the "Configuration > Regional Settings" section or by running the Installation Wizard again. + finish: + title: Assistant successfully completed + description_html: If you want to modify any data once the Wizard has been carried out, you can modify it in the Configuration section or by running the Installation Wizard again. + btn_finish: Finish Wizard diff --git a/config/locales/es-PE/admin.yml b/config/locales/es-PE/admin.yml index 331e65811a5..47f153ad32f 100644 --- a/config/locales/es-PE/admin.yml +++ b/config/locales/es-PE/admin.yml @@ -850,13 +850,18 @@ es-PE: updated: Valor actualizado index: title: Configuración global - update_setting: Actualizar - feature_flags: Funcionalidades - features: - enabled: "Funcionalidad activada" - disabled: "Funcionalidad desactivada" - enable: "Activar" - disable: "Desactivar" + configuration: + title: Configuración global + description: Listado de configuraciones generales para personalizar la aplicación. + process: + title: Procesos de participación + description: Selecciona los procesos de participación que estaran disponibles en la aplicación. + uploads: + title: Imágenes y documentos + description: Personaliza las características de los archivos adjuntos de la aplicación. + feature: + title: Funcionalidades + description: Activa/Desactiva las diferentes funcionalidades que ofrece la aplicación. map: title: Configuración del mapa help: Aquí puedes personalizar la manera en la que se muestra el mapa a los usuarios. Arrastra el marcador o pulsa sobre cualquier parte del mapa, ajusta el zoom y pulsa el botón 'Actualizar'. @@ -864,6 +869,22 @@ es-PE: update: La configuración del mapa se ha guardado correctamente. form: submit: Actualizar + proposals: + title: Panel de progreso de propuestas + description: Permite configurar los principales campos para ofrecer a los usuarios un panel de control para sus propuestas. + remote_census: + title: Configuración del Censo Remoto + description: Permite configurar la conexión con el Censo Remoto (SOAP) + how_to_enable: 'Para configurar la conexión con el Censo Remoto (SOAP) se debe activar "Configurar la conexión al censo remoto (SOAP)" en la pestaña "Funcionalidades".' + general: Datos Generales + request: Datos Petición + response: Datos Respuesta + update_setting: Actualizar + features: + enabled: "Funcionalidad activada" + disabled: "Funcionalidad desactivada" + enable: "Activar" + disable: "Desactivar" setting_actions: Acciones setting_status: Estado setting_value: Valor diff --git a/config/locales/es-PE/settings.yml b/config/locales/es-PE/settings.yml index 5e18804ba61..73a13856996 100644 --- a/config/locales/es-PE/settings.yml +++ b/config/locales/es-PE/settings.yml @@ -26,11 +26,15 @@ es-PE: meta_keywords: "Palabras clave (SEO)" min_age_to_participate: Edad mínima para participar feature: - twitter_login: "Registro con Twitter" - facebook_login: "Registro con Facebook" - google_login: "Registro con Google" signature_sheets: "Hojas de firmas" spending_proposals: "Propuestas de inversión" community: "Comunidad en propuestas y proyectos de inversión" map: "Geolocalización de propuestas y proyectos de inversión" allow_images: "Permitir subir y mostrar imágenes" + social: + twitter: + login: "Registro con Twitter" + facebook: + login: "Registro con Facebook" + google: + login: "Registro con Google" diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 48ce63edff0..f3b7f811133 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -708,6 +708,7 @@ es: debates: "Debates" comments: "Comentarios" local_census_records: Gestionar censo local + wizards: Asistente administrators: index: title: Administradores @@ -1245,38 +1246,74 @@ es: updated: Valor actualizado index: title: Configuración global - general: Configuración global - update_setting: Actualizar - participation_processes: "Procesos de participación" - images_and_documents: "Imágenes y documentos" - feature_flags: Funcionalidades - features: - enabled: "Funcionalidad activada" - disabled: "Funcionalidad desactivada" - enable: "Activar" - disable: "Desactivar" + configuration: + title: Configuración global + description: Listado de configuraciones generales para personalizar la aplicación. + process: + title: Procesos de participación + description: Selecciona los procesos de participación que estaran disponibles en la aplicación. + uploads: + title: Imágenes y documentos + description: Personaliza las características de los archivos adjuntos de la aplicación. + feature: + title: Funcionalidades + description: Activa/Desactiva las diferentes funcionalidades que ofrece la aplicación. map: title: Configuración del mapa + description: Permite actualizar la geolocalización de la aplicación, y definir el zoom del mapa que se mostrará a los usuarios. help: Aquí puedes personalizar la manera en la que se muestra el mapa a los usuarios. Arrastra el marcador o pulsa sobre cualquier parte del mapa, ajusta el zoom y pulsa el botón 'Actualizar'. flash: update: La configuración del mapa se ha guardado correctamente. form: submit: Actualizar how_to_enable: 'Para mostrar el mapa a los usuarios se debe de activar "Geolocalización de propuestas y proyectos de gasto" en la pestaña "Funcionalidades".' - dashboard: + proposals: title: Panel de progreso de propuestas + description: Permite configurar los principales campos para ofrecer a los usuarios un panel de control para sus propuestas. remote_census: title: Configuración del Censo Remoto + description: Permite configurar la conexión con el Censo Remoto (SOAP) how_to_enable: 'Para configurar la conexión con el Censo Remoto (SOAP) se debe activar "Configurar la conexión al censo remoto (SOAP)" en la pestaña "Funcionalidades".' - remote_census_general_name: Datos Generales - remote_census_request_name: Datos Petición - remote_census_response_name: Datos Respuesta + general: Datos Generales + request: Datos Petición + response: Datos Respuesta + update_setting: Actualizar + features: + enabled: "Funcionalidad activada" + disabled: "Funcionalidad desactivada" + enable: "Activar" + disable: "Desactivar" + social: + title: "Registro con Redes sociales" + description: "Permitir que los usuarios se registren con las Redes sociales (Twitter, Facebook, Google)" + facebook: "Facebook" + twitter: "Twitter" + google: "Google" + advanced: + title: "Configuración Avanzada" + description: "Permitir actualizar las configuraciones avanzadas" + auth: "Autenticación básica por http" + tracking: "Monitorización de errores" + smtp: + title: "Configuración SMTP" + description: "Configuración del servidor SMTP para el envio de emails." + how_to_enable: 'Para activar la configuración SMTP debe activar "Configurar SMTP" en la pestaña "Funcionalidades".' + regional: + title: "Idiomas y Zona Horaria" + description: "Define el idioma por defecto, los idiomas disponibles y la zona horaria." + default_locale: "Idioma por defecto de la aplicación" + available_locale: "Idiomas disponibles de la aplicación" + timezone: "Zona horaria" + sms: + title: Configuración SMS + description: "Configurar las credenciales del servicio SMS para el envio de sms para verificar un usuario." setting: Funcionalidad setting_actions: Acciones setting_name: Configuración setting_status: Estado setting_value: Valor no_description: "Sin descripción" + restart_info: "Nota: Para que aplicar los cambios realizados en esta sección correctamente, contacte con su administrador de sistemas para que reinicie todos los servicios que esten usando la aplicación." shared: true_value: "Sí" false_value: "No" @@ -1662,4 +1699,4 @@ es: errored: Filas erróneas created: Registros creados local_census_records: - no_records_found: No se han encontrado registros. \ No newline at end of file + no_records_found: No se han encontrado registros. diff --git a/config/locales/es/settings.yml b/config/locales/es/settings.yml index df376f70268..7b62227d5b1 100644 --- a/config/locales/es/settings.yml +++ b/config/locales/es/settings.yml @@ -83,12 +83,6 @@ es: direct_message_max_per_day: "Mensajes directos máximos por día" direct_message_max_per_day_description: "Número de mensajes directos máximos que un usuario puede enviar por día" feature: - twitter_login: "Registro con Twitter" - twitter_login_description: "Permitir que los usuarios se registren con su cuenta de Twitter" - facebook_login: "Registro con Facebook" - facebook_login_description: "Permitir que los usuarios se registren con su cuenta de Facebook" - google_login: "Registro con Google" - google_login_description: "Permitir que los usuarios se registren con su cuenta de Google" featured_proposals: "Propuestas destacadas" featured_proposals_description: "Muestra propuestas destacadas en la página principal de propuestas" signature_sheets: "Hojas de firmas" @@ -122,6 +116,8 @@ es: translation_interface_description: "Muestra la interfaz de traducción manual permitiendo a los usuarios introducir sus contenidos en todos los idiomas disponibles de la aplicación si así lo desean. Esta opción solo afecta a las vistas de usuarios de la aplicación, en el panel de administración está activa siempre." remote_census: "Configurar conexión al censo remoto (SOAP)" remote_census_description: "Permite configurar la conexión al censo remoto de cada institución" + smtp_configuration: "Configuración SMTP" + smtp_configuration_description: "Activa esta funcionalidad para poder añadir la configuración SMTP y poder enviar emails desde la aplicación." valuation_comment_notification: "Notificar comentarios de evaluación" valuation_comment_notification_description: "Envía un email a todos los usuarios menos al que haya comentado asociados a un presupuesto participativo cuando se cree un nuevo comentario de evaluación" remote_census: @@ -163,6 +159,10 @@ es: longitude_description: "Longitud para mostrar la posición del mapa" zoom: "Zoom" zoom_description: "Zoom para mostrar la posición del mapa" + tiles_provider: "Proveedor de las especificaciones cartográficas - TMS(Tile Map Service)" + tiles_provider_description: "Valor de Ejemplo: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'" + tiles_provider_attribution: "Atribución al Proveedor de las especificaciones cartográficas - TMS(Tile Map Service)" + tiles_provider_attribution_description: "Valor de ejemplo: '© OpenStreetMap contributors'" process: debates: "Debates" debates_description: "El espacio de debates ciudadanos está dirigido a que cualquier persona pueda exponer temas que le preocupan y sobre los que quiera compartir puntos de vista con otras personas" @@ -201,3 +201,120 @@ es: max_size_description: "Tamaño máximo permitido al subir un documento (en Megabytes/MB)" content_types: "Tipos de documentos permitidos" content_types_description: "Selecciona todos los tipos permitidos para los documentos subidos" + social: + twitter: + login: "Registro con Twitter" + login_description: "Permitir que los usuarios se registren con su cuenta de Twitter" + key: "API Key Twitter" + key_description: "API Key para configurar el registro por Twitter" + secret: "Secret Token Twitter" + secret_description: "Secret token para configurar el registro por Twitter" + facebook: + login: "Registro con Facebook" + login_description: "Permitir que los usuarios se registren con su cuenta de Facebook" + key: "API Key Facebook" + key_description: "API Key para configurar el registro por Facebook" + secret: "Secret Token Facebook" + secret_description: "Secret token para configurar el registro por Facebook" + google: + login: "Registro con Google" + login_description: "Permitir que los usuarios se registren con su cuenta de Google" + key: "API Key Google" + key_description: "API Key para configurar el registro por Google" + secret: "Secret Token Google" + secret_description: "Secret token para configurar el registro por Google" + advanced: + auth: + http_basic_auth: "Autenticación básica por http" + http_basic_auth_description: "Permitir Activar/Desactivar la autenticación básica por http. Para habilitar este campo, asegúrese de haber definido un usuario y una contraseña." + http_basic_username: "Usuario para la autenticación básica por http" + http_basic_username_description: "Permitir setear el Usuario. Para poder actualizar el Usuario debe deshabilitar primero la Autenticación básica por http, actualizar el Usuario y volver a activar la Autenticación básica por http." + http_basic_password: "Contraseña para la autenticación básica por http" + http_basic_password_description: "Permitir setear la Contraseña. Para poder actualizar la Contraseña debe deshabilitar primero la Autenticación básica por http, actualizar la Contraseña y volver a activar la Autenticación básica por http." + tracking: + rollbar_server_token: "Token de acceso a Rollbar" + rollbar_server_token_description: "Este token le dará a la aplicación acceso a su cuenta Rollbar." + smtp: + address: "Host SMTP" + address_description: "Configura el host del servidor SMTP. Ejemplo: 'smtp.example.com'" + port: "Puerto SMTP" + port_description: "Configura el puerto del servidor SMTP. Ejemplo: 587" + domain: "Dominio" + domain_description: "Configura el dominio del servidor SMTP. Ejemplo: 'example.com'" + username: "Usuario SMTP" + username_description: "Configura el usuario del servidor SMTP. Ejemplo: 'username'" + password: "Contraseña SMTP" + password_description: "Configura la contraseña del servidor SMTP. Ejemplo: 'password'" + authentication: "Autenticación SMTP" + authentication_description: "Configura el mecanismo de autenticación del servidor SMTP. Ejemplo: 'plain'" + enable_starttls_auto: "Activar TLS para SMTP" + enable_starttls_auto_description: "Activar TLS del servidor SMTP." + regional: + default_locale: + key: "Idioma por defecto" + key_description: "Definir el idioma por defecto de la aplicación" + available_locale: + ar: "Árabe" + ar_description: "Activar el idioma Árabe en la aplicación." + bs: "Bosnio" + bs_description: "Activar el idioma Bosnio en la aplicación." + cs: "Checo" + cs_description: "Activar el idioma Checo en la aplicación." + da: "Danés" + da_description: "Activar el idioma Danés en la aplicación." + de: "Alemán" + de_description: "Activar el idioma Aleman en la aplicación." + el: "Griego" + el_description: "Activar el idioma Griego en la aplicación." + en: "Inglés" + en_description: "Activar el idioma Inglés en la aplicación." + es: "Español" + es_description: "Activar el idioma Español en la aplicación." + fa: "Persa" + fa_description: "Activar el idioma Persa en la aplicación." + fr: "Francés" + fr_description: "Activar el idioma Francés en la aplicación." + gl: "Gallego" + gl_description: "Activar el idioma Gallego en la aplicación." + he: "Hebreo" + he_description: "Activar el idioma Hebreo en la aplicación." + hr: "Croata" + hr_description: "Activar el idioma Croata en la aplicación." + id: "Indonesio" + id_description: "Activar el idioma Indonesio en la aplicación." + it: "Italiano" + it_description: "Activar el idioma Italiano en la aplicación." + nl: "Holandés" + nl_description: "Activar el idioma Holandés en la aplicación." + pl: "Polaco" + pl_description: "Activar el idioma Polaco en la aplicación." + pt-BR: "Portugués Brasileño" + pt-BR_description: "Activar el idioma Portugués Brasileño en la aplicación." + ru: "Ruso" + ru_description: "Activar el idioma Ruso en la aplicación." + sl: "Esloveno" + sl_description: "Activar el idioma Esloveno en la aplicación." + sq: "Albanés" + sq_description: "Activar el idioma Albanés en la aplicación." + so: "Somalí" + so_description: "Activar el idioma Somalí en la aplicación." + sv: "Sueco" + sv_description: "Activar el idioma Sueco en la aplicación." + tr: "Turco" + tr_description: "Activar el idioma Turco en la aplicación." + val: "Valenciano" + val_description: "Activar el idioma Valenciano en la aplicación." + zh-CN: "Chino" + zh-CN_description: "Activar el idioma Chino en la aplicación." + zh-TW: "Taiwanés" + zh-TW_description: Activar el idioma Taiwanés en la aplicación. + time_zone: + key: "Zona horaria" + key_description: "Selecciona la zona horaria de la aplicación" + sms: + endpoint: "SMS endpoint" + endpoint_description: "Nombre del host donde se encuentra el servicio de SMS" + username: "Usuario para el servicio de SMS" + username_description: "Permitir setear el usuario" + password: "Password para el servicio de SMS" + password_description: "Permitir setear el password" diff --git a/config/locales/es/wizard.yml b/config/locales/es/wizard.yml new file mode 100644 index 00000000000..500f2b29f5e --- /dev/null +++ b/config/locales/es/wizard.yml @@ -0,0 +1,32 @@ +es: + wizard: + admin: + title: Asistente + module_title: Asistente de instalación + description: A través de esta herramienta le presentamos la instalación del sistema. + header: + title: Asistente de instalación + step: Paso + step_of: de + back_step: Atrás + next_step: Siguiente + new: + title: Bienvenido al asistente de instalación de Consul + description_html: En este asistente realizaremos paso a paso toda la configuración necesaria para poder personalizar la aplicación a las necesidades de su Institución. Si no dispone de alguna información solicitada en el asistente podrá obviarlos y modificarlo en un futuro en la Sección de Configuración relacionada o desde este mismo Asistente. + btn_start: Empezar + general_settings: + description_html: En este paso podrá actualizar algunas de las Configuraciones Globales de la aplicación más importantes. En caso de querer modificar alguna una vez realizado el Asistente podrá acceder a la sección "Configuración > Configuración Global" o volviendo a ejecutar el Asistente de Instalación + partecipation_process: + description_html: En este paso podrán activar/desactivar los procesos de participación que decida utilizar cada Institución. En caso de querer modificar alguna una vez realizado el Asistente podrá acceder a la sección "Configuración > Procesos de Participación" o volviendo a ejecutar el Asistente de Instalación + map: + description_html: En este paso podrán activar/desactivar la geolocalización de las propuestas y proyectos de gasto, y personalizar la manera en que se muestra el mapa a los usuarios. En caso de querer modificar alguna una vez realizado el Asistente podrá acceder a la sección "Configuración > Configuración del mapa" o volviendo a ejecutar el Asistente de Instalación + smtp: + title: Conexión SMTP + description_html: En este paso podrán configurar la conexión SMTP para poder enviar correos desde la aplicación En caso de querer modificar alguna una vez realizado el Asistente podrá acceder a la sección "Configuración > Conexión SMTP" o volviendo a ejecutar el Asistente de Instalación + regional: + title: Idiomas y Zona horaria + description_html: En este paso podrán configurar el idioma por defecto de la aplicación, los idiomas disponibles y la zona horaria en la que se encuentra. En caso de querer modificar alguna una vez realizado el Asistente podrá acceder a la sección "Configuración > Regional Settings" o volviendo a ejecutar el Asistente de Instalación + finish: + title: Asistente finalizado con éxito + description_html: En caso de querer modificar cualquier dato una vez realizado el Asistente podrá modificarlo en la sección Configuración o volviendo a ejecutar el Asistente de Instalación + btn_finish: Finalizar Asistente diff --git a/config/locales/fa-IR/admin.yml b/config/locales/fa-IR/admin.yml index f5d6673b69b..26c28506e14 100644 --- a/config/locales/fa-IR/admin.yml +++ b/config/locales/fa-IR/admin.yml @@ -945,13 +945,10 @@ fa: updated: ارزش به روز شد index: title: تنظیمات پیکربندی - update_setting: به روز رسانی - feature_flags: ویژگی ها - features: - enabled: "ویژگی فعال شده" - disabled: "ویژگی غیرفعال شده " - enable: "فعال کردن" - disable: "غیر فعال کردن" + configuration: + title: تنظیمات پیکربندی + feature: + title: ویژگی ها map: title: پیکربندی نقشه help: در اینجا شما می توانید نحوه نمایش نقشه به کاربران را سفارشی کنید. نشانگر نقشه را بکشید یا روی هر نقشه روی نقشه کلیک کنید، زوم مورد نظر را تنظیم کنید و دکمه "بروزرسانی" را کلیک کنید. @@ -959,6 +956,12 @@ fa: update: پیکربندی نقشه با موفقیت به روز شد form: submit: به روز رسانی + update_setting: به روز رسانی + features: + enabled: "ویژگی فعال شده" + disabled: "ویژگی غیرفعال شده " + enable: "فعال کردن" + disable: "غیر فعال کردن" setting_actions: اقدامات setting_status: وضعیت ها setting_value: "ارزش\n" diff --git a/config/locales/fa-IR/settings.yml b/config/locales/fa-IR/settings.yml index 551778a0f00..502068d0476 100644 --- a/config/locales/fa-IR/settings.yml +++ b/config/locales/fa-IR/settings.yml @@ -24,11 +24,8 @@ fa: meta_title: "عنوان سایت (SEO)" meta_description: "توضیحات سایت (SEO)" meta_keywords: "واژه هاي كليدي (SEO)" - min_age_to_participate: حداقل سن مورد نیاز برای شرکت + min_age_to_participate: حداقل سن مورد نیاز برای شرکت feature: - twitter_login: "ورود توییتر" - facebook_login: "ورود فیس بوک" - google_login: "ورود به سایت گوگل" signature_sheets: "ورق امضا" spending_proposals: "هزینه های طرح ها" user: @@ -38,3 +35,10 @@ fa: map: "پیشنهادات و جغرافیای سرمایه گذاری بودجه" allow_images: "اجازه آپلود و نمایش تصاویر" allow_attached_documents: "اجازه آپلود و نمایش اسناد متصل" + social: + twitter: + login: "ورود توییتر" + facebook: + login: "ورود فیس بوک" + google: + login: "ورود به سایت گوگل" diff --git a/config/locales/fi-FI/settings.yml b/config/locales/fi-FI/settings.yml index 65f215e2090..1425aad9892 100644 --- a/config/locales/fi-FI/settings.yml +++ b/config/locales/fi-FI/settings.yml @@ -8,12 +8,16 @@ fi: instagram_handle: "Instagram käyttäjätunnus" org_name: "Organisaatio" feature: - twitter_login: "Twitter kirjautuminen" - twitter_login_description: "Sallii kirjautumisen käyttämällä Twitter-tiliä" - facebook_login: "Facebook kirjautuminen" - facebook_login_description: "Sallii kirjautumisen käyttämällä Facebook-tiliä" - google_login: "Google kirjautuminen" - google_login_description: "Sallii kirjautumisen käyttämällä Google-tiliä" user: recommendations: "Suositukset" help_page: "Ohje-sivu" + social: + twitter: + login: "Twitter kirjautuminen" + login_description: "Sallii kirjautumisen käyttämällä Twitter-tiliä" + facebook: + login: "Facebook kirjautuminen" + login_description: "Sallii kirjautumisen käyttämällä Facebook-tiliä" + google: + login: "Google kirjautuminen" + login_description: "Sallii kirjautumisen käyttämällä Google-tiliä" diff --git a/config/locales/fr/admin.yml b/config/locales/fr/admin.yml index 2f938877e58..0cf1a3a4843 100644 --- a/config/locales/fr/admin.yml +++ b/config/locales/fr/admin.yml @@ -1189,13 +1189,10 @@ fr: updated: Valeur mise-à-jour index: title: Paramètres - update_setting: Mettre-à-jour - feature_flags: Fonctionnalités - features: - enabled: "Fonctionnalité activée" - disabled: "Fonctionnalité désactivée" - enable: "Activer" - disable: "Désactiver" + configuration: + title: Paramètres + feature: + title: Fonctionnalités map: title: Configuration de la carte help: Vous pouvez ici modifier la manière dont la carte est affichée pour les utilisateurs. Déplacez le marqueur ou cliquez à n'importe quel endroit sur la carte, définissez le niveau de zoom et cliquez sur le bouton "Mettre à jour". @@ -1203,6 +1200,12 @@ fr: update: Configuration de la carte mise à jour avec succès. form: submit: Mettre-à-jour + update_setting: Mettre-à-jour + features: + enabled: "Fonctionnalité activée" + disabled: "Fonctionnalité désactivée" + enable: "Activer" + disable: "Désactiver" setting: Fonctionnalité setting_actions: Actions setting_name: Paramètres diff --git a/config/locales/fr/settings.yml b/config/locales/fr/settings.yml index 6664b68078f..9dd6524ddf1 100644 --- a/config/locales/fr/settings.yml +++ b/config/locales/fr/settings.yml @@ -66,12 +66,6 @@ fr: direct_message_max_per_day: "Nombre maximum de messages directs par jour" direct_message_max_per_day_description: "Nombre maximum de messages directs qu'un utilisateur peut envoyer par jour" feature: - twitter_login: "Se connecter avec Twitter" - twitter_login_description: "Autoriser les utilisateurs à s’inscrire avec leur compte Twitter" - facebook_login: "Se connecter avec Facebook" - facebook_login_description: "Autoriser les utilisateurs à s'inscrire avec leur compte Facebook" - google_login: "Se connecter avec Google" - google_login_description: "Autoriser les utilisateurs à s’inscrire avec leur compte Google" featured_proposals: "Propositions en vedette" featured_proposals_description: "Affiche les propositions en vedette sur la page d'index des propositions" signature_sheets: "Feuilles de signature" @@ -122,3 +116,13 @@ fr: per_page_code_head_description: "Ce code apparaitra à l'intérieur de l'étiquette . Utile pour les scripts personalisés, analytiques..." per_page_code_body: "Code à inclure dans chaque page ()" per_page_code_body_description: "Ce code apparaitra à l'intérieur de l'étiquette . Utile pour les scripts personalisés, analytiques..." + social: + twitter: + login: "Se connecter avec Twitter" + login_description: "Autoriser les utilisateurs à s’inscrire avec leur compte Twitter" + facebook: + login: "Se connecter avec Facebook" + login_description: "Autoriser les utilisateurs à s'inscrire avec leur compte Facebook" + google: + login: "Se connecter avec Google" + login_description: "Autoriser les utilisateurs à s’inscrire avec leur compte Google" diff --git a/config/locales/gl/admin.yml b/config/locales/gl/admin.yml index dbcf438f370..ea19388038e 100644 --- a/config/locales/gl/admin.yml +++ b/config/locales/gl/admin.yml @@ -1129,13 +1129,10 @@ gl: updated: Valor actualizado index: title: Configuración global - update_setting: Actualizar - feature_flags: Funcionalidades - features: - enabled: "Funcionalidade activada" - disabled: "Funcionalidade desactivada" - enable: "Activar" - disable: "Desactivar" + configuration: + title: Configuración global + feature: + title: Funcionalidades map: title: Configuración do mapa help: Aquí podes personalizar o xeito en que os e as usuarias ven o mapa. Arrastra o marcador ou preme en calquera parte do mapa, axusta o zoom e preme o botón 'Actualizar'. @@ -1143,6 +1140,12 @@ gl: update: A configuración do mapa gardouse correctamente. form: submit: Actualizar + update_setting: Actualizar + features: + enabled: "Funcionalidade activada" + disabled: "Funcionalidade desactivada" + enable: "Activar" + disable: "Desactivar" setting: Característica setting_actions: Accións setting_name: Axuste diff --git a/config/locales/gl/settings.yml b/config/locales/gl/settings.yml index 01400e041f5..2253c87a30f 100644 --- a/config/locales/gl/settings.yml +++ b/config/locales/gl/settings.yml @@ -62,12 +62,6 @@ gl: min_age_to_participate_description: "Os usuarios maiores desta idade poden participar en todos os procesos" analytics_url: "URL de analytics" feature: - twitter_login: "Rexistro con Twitter" - twitter_login_description: "Permitir aos usuarios o inicio de sesión coa conta de Twitter" - facebook_login: "Rexistro con Facebook" - facebook_login_description: "Permitir aos usuarios o inicio de sesión coa conta de Facebook" - google_login: "Rexistro con Google" - google_login_description: "Permitir aos usuarios o inicio de sesión coa conta de Google" featured_proposals: "Propostas destacadas" featured_proposals_description: "Amosar as propostas destacadas na páxina principal das propostas" signature_sheets: "Follas de sinaturas" @@ -100,3 +94,14 @@ gl: public_stats_description: "Amosa as estatísticas públicas no panel de administración" help_page: "Páxina de axuda" help_page_description: 'Amosa un menú de axuda que contén unha páxina con información sobre cada unha das características habilitadas' + social: + twitter: + login: "Rexistro con Twitter" + twitter: + login_description: "Permitir aos usuarios o inicio de sesión coa conta de Twitter" + facebook: + login: "Rexistro con Facebook" + login_description: "Permitir aos usuarios o inicio de sesión coa conta de Facebook" + google: + login: "Rexistro con Google" + login_description: "Permitir aos usuarios o inicio de sesión coa conta de Google" diff --git a/config/locales/he/admin.yml b/config/locales/he/admin.yml index 496cc21cd82..34dc2ff12e9 100644 --- a/config/locales/he/admin.yml +++ b/config/locales/he/admin.yml @@ -1268,14 +1268,8 @@ he: updated: הערך מעודכן index: title: הגדרות תצורה - update_setting: עדכן - participation_processes: "השתתפות בתהליכים" - feature_flags: מאפיינים - features: - enabled: "התכונה מופעלת" - disabled: "התכונה מושבתת" - enable: "לאפשר" - disable: "להשבית" + configuration: + title: הגדרות תצורה map: title: תצורת מפה help: כאן באפשרותך להתאים אישית את הדרך שהמפה מוצגת למשתמשים. גרור סמן מפה או לחץ במקום כלשהו על המפה, להגדיר זום הרצוי ולחץ על כפתור "עדכון". @@ -1284,7 +1278,17 @@ he: form: submit: עדכן how_to_enable: 'כדי להציג את המפה למשתמשים עליך לאפשר "הצעות, תקציב השקעות איזורים גאוגרפיים" בכרטיסיה "תכונות".' - dashboard: + process: + title: "השתתפות בתהליכים" + feature: + title: מאפיינים + update_setting: עדכן + features: + enabled: "התכונה מופעלת" + disabled: "התכונה מושבתת" + enable: "לאפשר" + disable: "להשבית" + proposals: title: לוח מחוונים להצעות setting: מאפיינים setting_actions: פעולות diff --git a/config/locales/he/settings.yml b/config/locales/he/settings.yml index f6393b42743..7ae41ee673a 100644 --- a/config/locales/he/settings.yml +++ b/config/locales/he/settings.yml @@ -83,12 +83,6 @@ he: direct_message_max_per_day: "הודעה ישירה, מקסימום הודעות ליום" direct_message_max_per_day_description: "מקסימום הודעות שמשתמש אחד יכול לשלוח ביום" feature: - twitter_login: "טוויטר כניסה" - twitter_login_description: "לאפשר למשתמשים להירשם עם חשבון הטוויטר שלהם" - facebook_login: "כניסה עם חשבון פייסבוק" - facebook_login_description: "לאפשר למשתמשים להירשם עם חשבון הפייסבוק שלהם" - google_login: "כניסה עם חשבון גוגל" - google_login_description: "לאפשר למשתמשים להירשם עם חשבון הגוגל שלהם" featured_proposals: "הצעות מוצעות" featured_proposals_description: "מציג הצעות מובלטות בדף הבית של ההצעות" signature_sheets: "דפי חתימות" @@ -144,3 +138,13 @@ he: per_page_code_head_description: "קוד זה יופיע בתוך תווית ה- . שימושי עבור הזנת סקריפטים מותאמים אישית, אנליטיקה..." per_page_code_body: "קוד שייכלל בכל דף ()" per_page_code_body_description: "קוד זה יופיע בתוך תווית ה- . שימושי עבור הזנת סקריפטים מותאמים אישית, ואנליטיקה..." + social: + twitter: + login: "טוויטר כניסה" + login_description: "לאפשר למשתמשים להירשם עם חשבון הטוויטר שלהם" + facebook: + login: "כניסה עם חשבון פייסבוק" + login_description: "לאפשר למשתמשים להירשם עם חשבון הפייסבוק שלהם" + google: + login: "כניסה עם חשבון גוגל" + login_description: "לאפשר למשתמשים להירשם עם חשבון הגוגל שלהם" diff --git a/config/locales/id-ID/admin.yml b/config/locales/id-ID/admin.yml index b5da22a9b26..c668156d051 100644 --- a/config/locales/id-ID/admin.yml +++ b/config/locales/id-ID/admin.yml @@ -924,19 +924,22 @@ id: updated: Nilai diperbarui index: title: Pengaturan konfigurasi - update_setting: Perbarui - feature_flags: Fitur - features: - enabled: "Fitur diaktifkan" - disabled: "Fitur dinonaktifkan" - enable: "Aktifkan" - disable: "Nonaktifkan" + configuration: + title: Pengaturan konfigurasi map: help: Di sini anda bisa menyesuaikan cara peta untuk ditampilkan kepada pengguna. Seret penanda peta atau klik di mana saja dari peta, mengatur zoom yang diinginkan dan klik tombol "Update". flash: update: Peta konfigurasi berhasil diperbarui. form: submit: Perbarui + feature: + title: Fitur + update_setting: Perbarui + features: + enabled: "Fitur diaktifkan" + disabled: "Fitur dinonaktifkan" + enable: "Aktifkan" + disable: "Nonaktifkan" setting_actions: Tindakan setting_status: Status setting_value: Nilai diff --git a/config/locales/id-ID/settings.yml b/config/locales/id-ID/settings.yml index 7f0b0007d07..97b55116a68 100644 --- a/config/locales/id-ID/settings.yml +++ b/config/locales/id-ID/settings.yml @@ -26,11 +26,15 @@ id: meta_keywords: "Kata kunci (SEO)" min_age_to_participate: Usia Minimum yang diperlukan untuk berpartisipasi feature: - twitter_login: "Twitter masuk" - facebook_login: "Facebook masuk" - google_login: "Google masuk" signature_sheets: "Lembaran tanda tangan" spending_proposals: "Pengeluaran proposal" community: "Masyarakat pada proposal dan investasi" map: "Proposal dan anggaran investasi" allow_images: "Mengizinkan unggah dan tampilkan gambar" + social: + twitter: + login: "Twitter masuk" + facebook: + login: "Facebook masuk" + google: + login: "Google masuk" diff --git a/config/locales/it/admin.yml b/config/locales/it/admin.yml index 429d32ff94c..24fd159d79f 100644 --- a/config/locales/it/admin.yml +++ b/config/locales/it/admin.yml @@ -1031,13 +1031,8 @@ it: updated: Valore aggiornato index: title: Impostazioni di configurazione - update_setting: Aggiorna - feature_flags: Funzionalità - features: - enabled: "Funzionalità attivata" - disabled: "Funzionalità disabilitata" - enable: "Attivare" - disable: "Disattivare" + configuration: + title: Impostazioni di configurazione map: title: Configurazione della mappa help: Qui puoi personalizzare come la mappa viene visualizzata dagli utenti. Trascina il segnaposto o clicca in qualunque punto della mappa, imposta lo zoom desiderato e clicca sul tasto “Aggiorna”. @@ -1045,6 +1040,14 @@ it: update: Configurazione dela mappa aggiornata con successo. form: submit: Aggiorna + feature: + title: Funzionalità + update_setting: Aggiorna + features: + enabled: "Funzionalità attivata" + disabled: "Funzionalità disabilitata" + enable: "Attivare" + disable: "Disattivare" setting: Funzionalità setting_actions: Azioni setting_name: Impostazione diff --git a/config/locales/it/settings.yml b/config/locales/it/settings.yml index dc346eac307..72441e0141d 100644 --- a/config/locales/it/settings.yml +++ b/config/locales/it/settings.yml @@ -25,11 +25,15 @@ it: meta_keywords: "Parole chiave (SEO)" min_age_to_participate: Età minima necessaria per partecipare feature: - twitter_login: "Accesso con Twitter" - facebook_login: "Accesso con Facebook" - google_login: "Accesso con Google" signature_sheets: "Fogli firma" spending_proposals: "Proposte di spesa" user: recommendations: "Raccomandazioni" help_page: "Guida" + social: + twitter: + login: "Accesso con Twitter" + facebook: + login: "Accesso con Facebook" + google: + login: "Accesso con Google" diff --git a/config/locales/nl/admin.yml b/config/locales/nl/admin.yml index 89e5104752c..9896d82a642 100644 --- a/config/locales/nl/admin.yml +++ b/config/locales/nl/admin.yml @@ -1167,14 +1167,8 @@ nl: updated: Value updated index: title: Configuration settings - update_setting: Update - participation_processes: "Deelnameprocessen" - feature_flags: Features - features: - enabled: "Feature enabled" - disabled: "Feature disabled" - enable: "Enable" - disable: "Disable" + configuration: + title: Configuration settings map: title: Kaart instellingen help: Hier kunt u aanpassen hoe de kaart aan deelnemers wordt getoond. Sleep de kaartmarkering of klik ergens op de kaart, stel het gewenste zoomniveau in en klik "Pas aan". @@ -1183,6 +1177,16 @@ nl: form: submit: Update how_to_enable: 'Om de kaart te tonen aan gebruikers moet "Voorstellen en begroting investeringen geolocation" zijn ingeschakeld op tabblad "Voorzieningen".' + feature: + title: Features + process: + title: Deelnameprocessen + update_setting: Update + features: + enabled: "Feature enabled" + disabled: "Feature disabled" + enable: "Enable" + disable: "Disable" setting: Functie setting_actions: Activiteiten setting_name: Instelling diff --git a/config/locales/nl/settings.yml b/config/locales/nl/settings.yml index a6f9b4b059a..4529b8b2dff 100644 --- a/config/locales/nl/settings.yml +++ b/config/locales/nl/settings.yml @@ -66,12 +66,6 @@ nl: direct_message_max_per_day: "Maximaal aantal privé berichten per dag" direct_message_max_per_day_description: "Maximum aantal privé berichten dat gebruikers per dag mogen versturen" feature: - twitter_login: "Twitter login" - twitter_login_description: "Sta gebruikers to om aan te melden met hun Twitter account" - facebook_login: "Facebook login" - facebook_login_description: "Sta gebruikers to om aan te melden met hun Facebook account" - google_login: "Google login" - google_login_description: "Sta gebruikers to om aan te melden met hun Google account" featured_proposals: "Uitgelichte voorstellen" featured_proposals_description: "Toon de uitgelichte voorstellen op de voorstellen-pagina" signature_sheets: "Handtekeninglijsten" @@ -127,3 +121,13 @@ nl: per_page_code_head_description: "Deze code verschijnt in het -label. Handig voor het invoeren van aangepaste scripts en analyses." per_page_code_body: "Code die ingevoegd wordt op elke pagina()" per_page_code_body_description: "Deze code verschijnt in het -label. Dit kan handig zijn voor het invoeren van aangepaste scripts en analyses." + social: + twitter: + login: "Twitter login" + login_description: "Sta gebruikers to om aan te melden met hun Twitter account" + facebook: + login: "Facebook login" + login_description: "Sta gebruikers to om aan te melden met hun Facebook account" + google: + login: "Google login" + login_description: "Sta gebruikers to om aan te melden met hun Google account" diff --git a/config/locales/pl-PL/admin.yml b/config/locales/pl-PL/admin.yml index c1220043227..3120ed8171f 100644 --- a/config/locales/pl-PL/admin.yml +++ b/config/locales/pl-PL/admin.yml @@ -1160,14 +1160,10 @@ pl: updated: Wartość zaktualizowana index: title: Ustawienia konfiguracji - update_setting: Zaktualizuj - participation_processes: "Procesy partycypacyjne" - feature_flags: Funkcje - features: - enabled: "Funkcja włączona" - disabled: "Funkcja wyłączona" - enable: "Włącz" - disable: "Wyłącz" + configuration: + title: Ustawienia konfiguracji + feature: + title: Funkcje map: title: Konfiguracja mapy help: Tutaj możesz dostosować sposób wyświetlania mapy użytkownikom. Przeciągnij znacznik mapy lub kliknij w dowolnym miejscu na mapie, ustaw żądane przybliżenie i kliknij przycisk "Aktualizuj". @@ -1176,6 +1172,14 @@ pl: form: submit: Zaktualizuj how_to_enable: 'Aby pokazać mapę użytkownikom musisz włączyć opcję "Propozycje i geolokalizacja inwestycji budżetowych" w zakładce Ustawienia -> Ustawienia globalne' + process: + title: Procesy partycypacyjne + update_setting: Zaktualizuj + features: + enabled: "Funkcja włączona" + disabled: "Funkcja wyłączona" + enable: "Włącz" + disable: "Wyłącz" setting: Funkcja setting_actions: Akcje setting_name: Ustawienie diff --git a/config/locales/pl-PL/settings.yml b/config/locales/pl-PL/settings.yml index 25ade2c1f39..81f6f647f76 100644 --- a/config/locales/pl-PL/settings.yml +++ b/config/locales/pl-PL/settings.yml @@ -66,12 +66,6 @@ pl: direct_message_max_per_day: "Maksymalna liczba bezpośrednich wiadomości w ciągu jednego dnia" direct_message_max_per_day_description: "Maksymalna liczba bezpośrednich wiadomości jaką jeden użytkownik może przesłać jednego dnia" feature: - twitter_login: "Login do Twittera" - twitter_login_description: "Zezwalaj użytkownikom na rejestrację za pomocą konta na Twitterze" - facebook_login: "Login do Facebooka" - facebook_login_description: "Zezwalaj użytkownikom na rejestrację za pomocą konta na Facebooku" - google_login: "Login do Google" - google_login_description: "Zezwalaj użytkownikom na rejestrację za pomocą konta Google" featured_proposals: "Wnioski rekomendowane" featured_proposals_description: "Pokazuje rekomendowane wnioski na stronie ze spisem wniosków" signature_sheets: "Arkusze podpisu" @@ -127,3 +121,13 @@ pl: per_page_code_head_description: "Kod ten pojawi się wewnątrz etykiety . Przydatny do wprowadzania własnych skryptów, analiz..." per_page_code_body: "Kod, który ma być zamieszczony na każdej stronie ()" per_page_code_body_description: "Kod ten pojawi się wewnątrz etykiety Przydatny do wprowadzania własnych skryptów, analiz..." + social: + twitter: + login: "Login do Twittera" + login_description: "Zezwalaj użytkownikom na rejestrację za pomocą konta na Twitterze" + facebook: + login: "Login do Facebooka" + login_description: "Zezwalaj użytkownikom na rejestrację za pomocą konta na Facebooku" + google: + login: "Login do Google" + login_description: "Zezwalaj użytkownikom na rejestrację za pomocą konta Google" diff --git a/config/locales/pt-BR/admin.yml b/config/locales/pt-BR/admin.yml index 2e9746e38c2..a190ad11622 100644 --- a/config/locales/pt-BR/admin.yml +++ b/config/locales/pt-BR/admin.yml @@ -1032,13 +1032,10 @@ pt-BR: updated: Valor atualizado index: title: Definições de configuração - update_setting: Atualizar - feature_flags: Atributos - features: - enabled: "Atributo habilitado" - disabled: "Atributo não habilitado" - enable: "Habilitar" - disable: "Desabilitar" + configuration: + title: Definições de configuração + feature: + title: Atributos map: title: Configuração do mapa help: Aqui você pode personalizar a maneira como o mapa é exibido para os usuários. Arraste o marcador do mapa ou clique em qualquer lugar do mapa, defina o zoom desejado e clique no botão "Atualizar". @@ -1046,6 +1043,12 @@ pt-BR: update: Configuração do mapa atualizada com sucesso. form: submit: Atualizar + update_setting: Atualizar + features: + enabled: "Atributo habilitado" + disabled: "Atributo não habilitado" + enable: "Habilitar" + disable: "Desabilitar" setting: Caracteristica setting_actions: Ações setting_name: Configuração diff --git a/config/locales/pt-BR/settings.yml b/config/locales/pt-BR/settings.yml index 56bbbec8390..e169b1edc96 100644 --- a/config/locales/pt-BR/settings.yml +++ b/config/locales/pt-BR/settings.yml @@ -58,12 +58,6 @@ pt-BR: min_age_to_participate_description: "Usuários acima dessa idade podem participar de todo o processo" analytics_url: "URL das análises" feature: - twitter_login: "Login do Twitter" - twitter_login_description: "Permitir usuários de inscrever-se com sua conta do twitter" - facebook_login: "Login do Facebook" - facebook_login_description: "Permitir usuários de inscrever-se com sua conta do Facebook" - google_login: "Login do Google" - google_login_description: "Permitir usuários de inscrever-se com sua conta do Google" signature_sheets: "Folhas de assinatura" signature_sheets_description: "Permite adicionar do painel de administração as assinaturas coletadas no site para propostas e projetos de investimento do orçamento participativo" spending_proposals: "Propostas de gastos" @@ -94,3 +88,13 @@ pt-BR: public_stats_description: "Mostra estatísticas públicas no painel de administração" help_page: "Página de ajuda" help_page_description: 'Mostra um menu de Ajuda contendo a página com a seção de informações sobre cada recurso abilitado' + social: + twitter: + login: "Login do Twitter" + login_description: "Permitir usuários de inscrever-se com sua conta do twitter" + facebook: + login: "Login do Facebook" + login_description: "Permitir usuários de inscrever-se com sua conta do Facebook" + google: + login: "Login do Google" + login_description: "Permitir usuários de inscrever-se com sua conta do Google" diff --git a/config/locales/ru/admin.yml b/config/locales/ru/admin.yml index 48fb4ffba55..290e4f48dd7 100644 --- a/config/locales/ru/admin.yml +++ b/config/locales/ru/admin.yml @@ -1160,14 +1160,10 @@ ru: updated: Значение обновлено index: title: Настройки конфигурации - update_setting: Обновить - participation_processes: "Процессы участия" - feature_flags: Функции - features: - enabled: "Функция включена" - disabled: "Функция отключена" - enable: "Включить" - disable: "Выключить" + configuration: + title: Настройки конфигурации + feature: + title: Функции map: title: Конфигурация карты help: Здесь вы можете настроить способ отображения карты для пользователей. Переместите маркер карты или нажмите где-либо на карте, установите желаемое приближение и нажмите на кнопку "Обновить". @@ -1176,6 +1172,14 @@ ru: form: submit: Обновить how_to_enable: 'Чтобы показать карту пользователям, вы должны включить "Геолокацию предложений и бюджетов" на вкладке "Функции".' + process: + title: "Процессы участия" + update_setting: Обновить + features: + enabled: "Функция включена" + disabled: "Функция отключена" + enable: "Включить" + disable: "Выключить" setting: Особенность setting_actions: Действия setting_name: Настройка diff --git a/config/locales/ru/settings.yml b/config/locales/ru/settings.yml index d62832d0c37..41259c390a1 100644 --- a/config/locales/ru/settings.yml +++ b/config/locales/ru/settings.yml @@ -66,12 +66,6 @@ ru: direct_message_max_per_day: "Максимальное количество прямых сообщений в день" direct_message_max_per_day_description: "Максимальное количество прямых сообщений, которое один пользователь может отправить за день" feature: - twitter_login: "Логин от Twitter" - twitter_login_description: "Позволяет пользователям регистрироваться при помощи их аккаунта в Twitter" - facebook_login: "Логин Facebook" - facebook_login_description: "Позволяет пользователям регистрироваться при помощи их аккаунтов на Facebook" - google_login: "Логин Google" - google_login_description: "Позволяет пользователям регистрироваться при помощи их аккаунтов в Google" featured_proposals: "Особенные предложения" featured_proposals_description: "Отображает особенные предложения на индексной странице предложений" signature_sheets: "Подписные листы" @@ -127,3 +121,13 @@ ru: per_page_code_head_description: "Этот код появится внутри тега . Полезно для внедрения произвольных скриптов, кодов аналитики..." per_page_code_body: "Код, включаемый на каждой странице ()" per_page_code_body_description: "Этот код появится внутри тега . Полезно для внедрения произвольных скриптов, кодов аналитики..." + social: + twitter: + login: "Логин от Twitter" + login_description: "Позволяет пользователям регистрироваться при помощи их аккаунта в Twitter" + facebook: + login: "Логин Facebook" + login_description: "Позволяет пользователям регистрироваться при помощи их аккаунтов на Facebook" + google: + login: "Логин Google" + login_description: "Позволяет пользователям регистрироваться при помощи их аккаунтов в Google" diff --git a/config/locales/sl-SI/admin.yml b/config/locales/sl-SI/admin.yml index 56e1392a993..a6240bdb501 100644 --- a/config/locales/sl-SI/admin.yml +++ b/config/locales/sl-SI/admin.yml @@ -819,13 +819,10 @@ sl: updated: Vrednost posodobljena index: title: Nastavitve konfiguracije - update_setting: Posodobi - feature_flags: Funkcije - features: - enabled: "Funkcija omogočena" - disabled: "Funkcija onemogočena" - enable: "Omogoči" - disable: "Onemogoči" + configuration: + title: Nastavitve konfiguracije + feature: + title: Funkcije map: title: Konfiguracija zemljevida help: Tukaj lahko prilagodiš, kako se zemljevid prikazuje uporabnikom. Povleci označevalec zemljevida in klikni kamorkoli na zemljevid, določi povečavo in klikni gumb "Posodobi". @@ -833,6 +830,12 @@ sl: update: Konfiguracija zemljevida uspešno posodobljena. form: submit: Posodobi + update_setting: Posodobi + features: + enabled: "Funkcija omogočena" + disabled: "Funkcija onemogočena" + enable: "Omogoči" + disable: "Onemogoči" shared: booths_search: button: Išči diff --git a/config/locales/sl-SI/settings.yml b/config/locales/sl-SI/settings.yml index 82282d7f0b3..ea0fcd59c56 100644 --- a/config/locales/sl-SI/settings.yml +++ b/config/locales/sl-SI/settings.yml @@ -26,9 +26,6 @@ sl: meta_keywords: "Ključne besede (SEO)" min_age_to_participate: Minimalna starost za sodelovanje feature: - twitter_login: "Prijava v Twitter" - facebook_login: "Prijava v Facebook" - google_login: "Prijava v Google" signature_sheets: "Podpisni listi" spending_proposals: "Naložbeni projekti" spending_proposal_features: @@ -40,3 +37,10 @@ sl: map: "Geolokacija predlogov in proračunskih naložb" allow_images: "Dovoli nalaganje in prikaz slik" allow_attached_documents: "Dovoli nalaganje in prikaz pripetih dokumentov" + social: + twitter: + login: "Prijava v Twitter" + facebook: + login: "Prijava v Facebook" + google: + login: "Prijava v Google" diff --git a/config/locales/so-SO/admin.yml b/config/locales/so-SO/admin.yml index 981f90dfe4a..15c6051b369 100644 --- a/config/locales/so-SO/admin.yml +++ b/config/locales/so-SO/admin.yml @@ -1036,13 +1036,10 @@ so: updated: Cusboneysii Qimaha index: title: Dejinta Qaybinta - update_setting: Cusboneysiin - feature_flags: Soobandhigiidyo / Muqaalo - features: - enabled: "Muujin karo" - disabled: "Aan Muujin karin" - enable: "Karti leh" - disable: "Hawl gaab ah" + configuration: + title: Dejinta Qaybinta + feature: + title: Soobandhigiidyo / Muqaalo map: title: Qaybinta Khariirada help: Halkan waxaad ku habeyn kartaa qaabka khariidada loo soo bandhigo dadka isticmaala. Tijaabi calaamade khariidadda ama guji meel kasta oo ka mida khariidada, waxaad dhigataa mujin iyo guji badhan "Cusboneysii". @@ -1050,6 +1047,12 @@ so: update: Qaabinta qaabka dib u cusbooneysiinta Khariirada. form: submit: Cusboneysiin + update_setting: Cusboneysiin + features: + enabled: "Muujin karo" + disabled: "Aan Muujin karin" + enable: "Karti leh" + disable: "Hawl gaab ah" setting: Soobandhigiid / Muqaal setting_actions: Tilaabooyin setting_name: Dejinta diff --git a/config/locales/so-SO/settings.yml b/config/locales/so-SO/settings.yml index 7459f42e005..646e1ac1258 100644 --- a/config/locales/so-SO/settings.yml +++ b/config/locales/so-SO/settings.yml @@ -58,12 +58,6 @@ so: min_age_to_participate_description: "Isticmaalayaasha da'adani way ka qaybqaadan karaan dhammaan hababka" analytics_url: "URLka falanqaynta" feature: - twitter_login: "Galitaanka bogga Twitter" - twitter_login_description: "U ogolow dadka isticmaala inay iska diiwaan galiyaan xisaabtooda Twitter" - facebook_login: "Gelintaanka Facebook" - facebook_login_description: "U ogolow dadka isticmaala inay iska diiwaan galiyaan xisaabtooda Facebook akoonka" - google_login: "Gelintaanka Google" - google_login_description: "U ogolow dadka isticmaala inay iska diiwaan galiyaan akoonka Google" signature_sheets: "Warqadaha Saxixyada" signature_sheets_description: "Waxay u ogolaataa in lagu daro golaha maamulka ee loo soo ururiyey barta-mashruucyada soo jeedinta iyo mashaariicda maalgashiga miisaaniyadda ka qaybqaadashada" spending_proposals: "Bixinta soo jeedinta" @@ -94,3 +88,13 @@ so: public_stats_description: "Muuji tirooyinka dadweynaha ee guddiga maamulka" help_page: "Bogga Caawinta" help_page_description: 'Waxay muujisaa maqaallada caawimaadda oo ku jira bog leh qaybta macluumaadka ee ku saabsan muuqaal kasta oo awood leh' + social: + twitter: + login: "Galitaanka bogga Twitter" + login_description: "U ogolow dadka isticmaala inay iska diiwaan galiyaan xisaabtooda Twitter" + facebook: + login: "Gelintaanka Facebook" + login_description: "U ogolow dadka isticmaala inay iska diiwaan galiyaan xisaabtooda Facebook akoonka" + google: + login: "Gelintaanka Google" + login_description: "U ogolow dadka isticmaala inay iska diiwaan galiyaan akoonka Google" diff --git a/config/locales/sq-AL/admin.yml b/config/locales/sq-AL/admin.yml index c096ddca4da..9b57608e6e6 100644 --- a/config/locales/sq-AL/admin.yml +++ b/config/locales/sq-AL/admin.yml @@ -1038,13 +1038,8 @@ sq: updated: Vlera e përditësuar index: title: Cilësimet e konfigurimit - update_setting: Përditëso - feature_flags: Karakteristikat - features: - enabled: "Funksioni i aktivizuar" - disabled: "Funksioni i caktivizuar" - enable: "Aktivizuar" - disable: "Caktivizo" + configuration: + title: Cilësimet e konfigurimit map: title: Konfigurimi i hartës help: Këtu mund të personalizoni mënyrën se si hartë shfaqet tek përdoruesit. Zvarrit shënuesin e hartës ose kliko kudo mbi hartën, vendosni zmadhimin e dëshiruar dhe klikoni butonin "Përditëso". @@ -1052,6 +1047,14 @@ sq: update: Konfigurimi i hartave u rifreskua me sukses. form: submit: Përditëso + feature: + title: Karakteristikat + update_setting: Përditëso + features: + enabled: "Funksioni i aktivizuar" + disabled: "Funksioni i caktivizuar" + enable: "Aktivizuar" + disable: "Caktivizo" setting: Karakteristikat setting_actions: Veprimet setting_name: Opsione diff --git a/config/locales/sq-AL/settings.yml b/config/locales/sq-AL/settings.yml index 23f61400adf..52d817fadb5 100644 --- a/config/locales/sq-AL/settings.yml +++ b/config/locales/sq-AL/settings.yml @@ -58,12 +58,6 @@ sq: min_age_to_participate_description: "Përdoruesit e kësaj moshe mund të marrin pjesë në të gjitha proceset" analytics_url: "URL e analitikës" feature: - twitter_login: "\nIdentifikohu në Twitter" - twitter_login_description: "\nLejo përdoruesit të regjistrohen me llogarinë e tyre në Twitter" - facebook_login: "Identifikohu në Facebook" - facebook_login_description: "\nLejo përdoruesit të regjistrohen me llogarinë e tyre në Facebook" - google_login: "Identifikohu në Google" - google_login_description: "\nLejo përdoruesit të regjistrohen me llogarinë e tyre në Google" signature_sheets: "Nënshkrimi i fletëve" signature_sheets_description: "Kjo lejon shtimin e nënshkrimit të paneleve të Administratës të mbledhura në vend të Propozimeve dhe projekteve të investimeve të buxheteve pjesëmarrëse" spending_proposals: "Shpenzimet e propozimeve" @@ -94,3 +88,13 @@ sq: public_stats_description: "Shfaqni statistikat publike në panelin e Administratës" help_page: "Faqja ndihmëse" help_page_description: 'Shfaq një meny Ndihmë që përmban një faqe me një seksion informacioni rreth secilës janë të akitivizuar vecoritë' + social: + twitter: + login: "\nIdentifikohu në Twitter" + login_description: "\nLejo përdoruesit të regjistrohen me llogarinë e tyre në Twitter" + facebook: + login: "Identifikohu në Facebook" + login_description: "\nLejo përdoruesit të regjistrohen me llogarinë e tyre në Facebook" + google: + login: "Identifikohu në Google" + login_description: "\nLejo përdoruesit të regjistrohen me llogarinë e tyre në Google" diff --git a/config/locales/sv-SE/admin.yml b/config/locales/sv-SE/admin.yml index d5696fce585..a4f86da68ca 100644 --- a/config/locales/sv-SE/admin.yml +++ b/config/locales/sv-SE/admin.yml @@ -1084,13 +1084,10 @@ sv: updated: Uppdaterat index: title: Konfigurationsinställningar - update_setting: Uppdatera - feature_flags: Funktioner - features: - enabled: "Aktiverad funktion" - disabled: "Inaktiverad funktion" - enable: "Aktivera" - disable: "Inaktivera" + configuration: + title: Konfigurationsinställningar + feature: + title: Funktioner map: title: Kartinställningar help: Här kan du anpassa hur kartan visas för användare. Dra kartmarkören eller klicka på kartan, ställ in önskad zoom och klicka på knappen ”Uppdatera”. @@ -1098,6 +1095,12 @@ sv: update: Kartinställningarna har uppdaterats. form: submit: Uppdatera + update_setting: Uppdatera + features: + enabled: "Aktiverad funktion" + disabled: "Inaktiverad funktion" + enable: "Aktivera" + disable: "Inaktivera" setting_actions: Åtgärder setting_status: Status setting_value: Kostnad diff --git a/config/locales/sv-SE/settings.yml b/config/locales/sv-SE/settings.yml index c0e12f063fd..860bb769f0d 100644 --- a/config/locales/sv-SE/settings.yml +++ b/config/locales/sv-SE/settings.yml @@ -32,9 +32,6 @@ sv: email_short_title: E-post email_description: E-posts beskrivning feature: - twitter_login: "Twitter-inloggning" - facebook_login: "Facebook-inloggning" - google_login: "Google-inloggning" signature_sheets: "Namninsamlingar" spending_proposals: "Investeringsförslag" user: @@ -57,3 +54,10 @@ sv: proposals: "Förslag" polls: "Omröstningar" legislation: "Planering" + social: + twitter: + login: "Twitter-inloggning" + facebook: + login: "Facebook-inloggning" + google: + login: "Google-inloggning" diff --git a/config/locales/tr-TR/admin.yml b/config/locales/tr-TR/admin.yml index e3153099ab3..bdf76f4f091 100644 --- a/config/locales/tr-TR/admin.yml +++ b/config/locales/tr-TR/admin.yml @@ -1162,13 +1162,10 @@ tr: updated: Değer güncellendi index: title: Yapılandırma ayarları - update_setting: Güncelleme - feature_flags: Özellikler - features: - enabled: "Özellik etkinleştirildi" - disabled: "Özellik devre dışı" - enable: "Etkinleştir" - disable: "Devre dışı bırakma" + configuration: + title: Yapılandırma ayarları + feature: + title: Özellikler map: title: Harita yapılandırma help: Burada haritanın kullanıcılara gösterilme şeklini kişiselleştirebilirsiniz. Harita işaretçisini sürükleyin veya haritanın herhangi bir yerine tıklayın, istediğiniz yakınlaştırmayı ayarlayın ve "Güncelle" düğmesine tıklayın. @@ -1176,6 +1173,12 @@ tr: update: Harita yapılandırma başarıyla güncellendi. form: submit: Güncelleme + update_setting: Güncelleme + features: + enabled: "Özellik etkinleştirildi" + disabled: "Özellik devre dışı" + enable: "Etkinleştir" + disable: "Devre dışı bırakma" setting: Özellik setting_actions: Aksiyon setting_name: Ayar diff --git a/config/locales/tr-TR/settings.yml b/config/locales/tr-TR/settings.yml index b18c5c7994a..eb4c29c7f57 100644 --- a/config/locales/tr-TR/settings.yml +++ b/config/locales/tr-TR/settings.yml @@ -68,12 +68,6 @@ tr: direct_message_max_per_day: "Günlük maksimum Doğrudan Mesaj sayısı" direct_message_max_per_day_description: "Bir kullanıcının günlük olarak gönderebileceği maksimum doğrudan mesajların sayısı" feature: - twitter_login: "Twitter girişi" - twitter_login_description: "Kullanıcıların Twitter hesapları ile kayıt olmalarına izin ver" - facebook_login: "Facebook girişi" - facebook_login_description: "Kullanıcıların Facebook hesapları ile kayıt olmalarına izin ver" - google_login: "Google girişi" - google_login_description: "Kullanıcıların Google Hesapları ile kayıt olmalarına izin ver" featured_proposals: "Öne Çıkan öneriler" featured_proposals_description: "Dizin önerileri sayfasında öne çıkan önerileri gösterir" signature_sheets: "İmza sayfaları" @@ -106,3 +100,13 @@ tr: public_stats_description: "Yönetim panelinde kamu istatistiklerini görüntüleme" help_page: "Yardım sayfası" help_page_description: 'Etkinleştirilen her özellik hakkında bir bilgi bölümü içeren bir sayfa içeren bir Yardım menüsü görüntüler. Ayrıca "Özel sayfalar" ve "Özel içerik blokları" bölümlerinde özel sayfalar ve menüler oluşturulabilir' + social: + twitter: + login: "Twitter girişi" + login_description: "Kullanıcıların Twitter hesapları ile kayıt olmalarına izin ver" + facebook: + login: "Facebook girişi" + login_description: "Kullanıcıların Facebook hesapları ile kayıt olmalarına izin ver" + google: + login: "Google girişi" + login_description: "Kullanıcıların Google Hesapları ile kayıt olmalarına izin ver" diff --git a/config/locales/val/admin.yml b/config/locales/val/admin.yml index da5a9526b65..fef2b0812a8 100644 --- a/config/locales/val/admin.yml +++ b/config/locales/val/admin.yml @@ -1087,13 +1087,10 @@ val: updated: Valor actualitzat index: title: Configuració global - update_setting: Actualitzar - feature_flags: Funcionalitats - features: - enabled: "Funcionalitat activada" - disabled: "Funcionalitat desactivada" - enable: "Activa" - disable: "Desactivar" + configuration: + title: Configuració global + feature: + title: Funcionalitats map: title: Configuració del mapa help: Ací pots personalitzar la manera en la que es mostra el mapa als usuaris. Arrastra el marcador o pulsa sobre quansevol part del mapa, ajusta el zoom i polsa el botó 'Actualitzar'. @@ -1101,6 +1098,12 @@ val: update: La configuració del mapa s'ha guardat correctament. form: submit: Actualitzar + update_setting: Actualitzar + features: + enabled: "Funcionalitat activada" + disabled: "Funcionalitat desactivada" + enable: "Activa" + disable: "Desactivar" setting: Característica setting_actions: Accions setting_name: Configuració diff --git a/config/locales/val/settings.yml b/config/locales/val/settings.yml index 80ee1f250a9..ba96d7770ec 100644 --- a/config/locales/val/settings.yml +++ b/config/locales/val/settings.yml @@ -62,12 +62,6 @@ val: min_age_to_participate_description: "Els usuaris majors d'edat podran participar en tots els processos" analytics_url: "URL d'estadístiques externes" feature: - twitter_login: "Registre amb Twitter" - twitter_login_description: "Permetre que els usuaris es registren amb el seu compte de Twiter" - facebook_login: "Registre amb Facebook" - facebook_login_description: "Permetre que els usuaris es registren amb el seu compte de Facebook" - google_login: "Registre amb Google" - google_login_description: "Permetre que els usuaris es registren amb el seu compte de Google" featured_proposals: "Propostes destacades" featured_proposals_description: "Mostrar les propostes destacades en la pàgina principal de les propostes" signature_sheets: "Fulles de signatures" @@ -100,3 +94,13 @@ val: public_stats_description: "Mostra les estadístiques públiques en el panell d'Administració" help_page: "Pàgina d'ajuda" help_page_description: 'Mostra un menú Ajuda que conté una pàgina amb una secció d''informació sobre cada funcionalitat habilitada' + social: + twitter: + login: "Registre amb Twitter" + login_description: "Permetre que els usuaris es registren amb el seu compte de Twiter" + facebook: + login: "Registre amb Facebook" + login_description: "Permetre que els usuaris es registren amb el seu compte de Facebook" + google: + login: "Registre amb Google" + login_description: "Permetre que els usuaris es registren amb el seu compte de Google" diff --git a/config/locales/zh-CN/admin.yml b/config/locales/zh-CN/admin.yml index 95f9222b37d..796a61c232c 100644 --- a/config/locales/zh-CN/admin.yml +++ b/config/locales/zh-CN/admin.yml @@ -1039,13 +1039,10 @@ zh-CN: updated: 价值已更新 index: title: 配置设置 - update_setting: 更新 - feature_flags: 功能 - features: - enabled: "功能已启用" - disabled: "功能已禁用" - enable: "启用" - disable: "禁用" + configuration: + title: 配置设置 + feature: + title: 功能 map: title: 地图配置 help: 在这里您可以自定义地图显示给用户的方式。拖动地图标记或者点击地图上的任意位置,设置所需的缩放,并点击“更新”按钮“。 @@ -1053,6 +1050,12 @@ zh-CN: update: 已成功更新地图配置。 form: submit: 更新 + update_setting: 更新 + features: + enabled: "功能已启用" + disabled: "功能已禁用" + enable: "启用" + disable: "禁用" setting: 特性 setting_actions: 行动 setting_name: 设置 diff --git a/config/locales/zh-CN/settings.yml b/config/locales/zh-CN/settings.yml index 6dfa3868524..a33ce90cd5e 100644 --- a/config/locales/zh-CN/settings.yml +++ b/config/locales/zh-CN/settings.yml @@ -62,12 +62,6 @@ zh-CN: min_age_to_participate_description: "超过此年龄的用户可以参与所有进程" analytics_url: "分析URL" feature: - twitter_login: "Twitter登录" - twitter_login_description: "允许用户使用他们的Twitter账户来注册" - facebook_login: "Facebook登录" - facebook_login_description: "允许用户使用他们的Facebook账户来注册" - google_login: "Google登录" - google_login_description: "允许用户使用他们的Google账户来注册" featured_proposals: "特色提议" featured_proposals_description: "在索引提议页面上显示特色提议" signature_sheets: "签名表" @@ -100,3 +94,13 @@ zh-CN: public_stats_description: "在管理面板中显示公众统计数据" help_page: "帮助页面" help_page_description: '显示帮助菜单,其中包含一个页面,它含有每个已启用功能的资讯' + social: + twitter: + login: "Twitter登录" + login_description: "允许用户使用他们的Twitter账户来注册" + facebook: + login: "Facebook登录" + login_description: "允许用户使用他们的Facebook账户来注册" + google: + login: "Google登录" + login_description: "允许用户使用他们的Google账户来注册" diff --git a/config/locales/zh-TW/admin.yml b/config/locales/zh-TW/admin.yml index d99d750a152..a1adc3cbbf7 100644 --- a/config/locales/zh-TW/admin.yml +++ b/config/locales/zh-TW/admin.yml @@ -1028,13 +1028,10 @@ zh-TW: updated: 價值已更新 index: title: 配置設置 - update_setting: 更新 - feature_flags: 功能 - features: - enabled: "功能已啟用" - disabled: "功能已禁用" - enable: "啟用" - disable: "禁用" + configuration: + title: 配置設置 + feature: + title: 功能 map: title: 地圖配置 help: 您可以在這裡自定義為用戶顯示地圖的方式。 拖動地圖標記或單擊地圖上的任意位置,設置所需的縮放並單擊“更新”按鈕。 @@ -1042,6 +1039,12 @@ zh-TW: update: 已成功更新地圖配置。 form: submit: 更新 + update_setting: 更新 + features: + enabled: "功能已啟用" + disabled: "功能已禁用" + enable: "啟用" + disable: "禁用" setting: 功能 setting_actions: 行動 setting_name: 設置 diff --git a/config/locales/zh-TW/settings.yml b/config/locales/zh-TW/settings.yml index de7b8b7ace1..b12d8fd3f48 100644 --- a/config/locales/zh-TW/settings.yml +++ b/config/locales/zh-TW/settings.yml @@ -58,12 +58,6 @@ zh-TW: min_age_to_participate_description: "超過此年齡的用戶可以參與所有進程" analytics_url: "分析 URL" feature: - twitter_login: "Twitter 登錄" - twitter_login_description: "允許用戶使用他們的Twitter帳戶登記" - facebook_login: "Facebook 登錄" - facebook_login_description: "允許用戶使用他們的Facebook 帳戶登記" - google_login: "Google 登錄" - google_login_description: "允許用戶使用他們的Google 帳戶登記" signature_sheets: "簽名表" signature_sheets_description: "這允許從現場收集的管理面板簽名加到參與預算的提案和投資項目" spending_proposals: "支出建議" @@ -94,3 +88,13 @@ zh-TW: public_stats_description: "在管理面板中顯示公眾統計數據" help_page: "幫助頁" help_page_description: '顯示説明菜單,其中包含一個頁面,內有每個已啟用功能的資訊' + social: + twitter: + login: "Twitter 登錄" + login_description: "允許用戶使用他們的Twitter帳戶登記" + facebook: + login: "Facebook 登錄" + login_description: "允許用戶使用他們的Facebook 帳戶登記" + google: + login: "Google 登錄" + login_description: "允許用戶使用他們的Google 帳戶登記" diff --git a/config/routes/admin.rb b/config/routes/admin.rb index f7310709fb5..045c80e957b 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -92,7 +92,7 @@ get :search, on: :collection end - resources :settings, only: [:index, :update] + resources :settings, only: [:index, :update, :show] put :update_map, to: "settings#update_map" put :update_content_types, to: "settings#update_content_types" @@ -260,4 +260,10 @@ namespace :local_census_records do resources :imports, only: [:new, :create, :show] end + + resources :wizards, only: :index + namespace :wizards do + resources :installer, only: [:new, :show] + end + end diff --git a/lib/regional/locales.rb b/lib/regional/locales.rb new file mode 100644 index 00000000000..684a145b3af --- /dev/null +++ b/lib/regional/locales.rb @@ -0,0 +1,31 @@ +module Regional + class Locales + + def self.load_default_and_available_locales + return unless ActiveRecord::Base.connection.data_source_exists?("settings") + load_i18n_default_locale + load_i18n_available_locales + end + + private + + def self.load_i18n_default_locale + setting_default_locale = Setting["regional.default_locale.key"] + I18n.default_locale = setting_default_locale.to_sym if setting_default_locale.present? + end + + def self.load_i18n_available_locales + all_settings = Setting.all.group_by { |setting| setting.type } + settings = all_settings["regional.available_locale"] + return if settings.blank? + + I18n.available_locales = load_available_locales_keys(settings) + end + + def self.load_available_locales_keys(settings) + settings.select { |setting| Setting["#{setting.key}"].present? } + .map { |setting| setting.key.rpartition(".").last.to_s } + end + end + +end diff --git a/lib/regional/timezone.rb b/lib/regional/timezone.rb new file mode 100644 index 00000000000..e8cd82cc59b --- /dev/null +++ b/lib/regional/timezone.rb @@ -0,0 +1,12 @@ +module Regional + class Timezone + + def self.load_timezone + return unless ActiveRecord::Base.connection.data_source_exists?("settings") + setting_timezone = Setting["regional.time_zone.key"] + + Time.zone = setting_timezone if setting_timezone.present? + end + + end +end diff --git a/lib/retrocompatibility.rb b/lib/retrocompatibility.rb new file mode 100644 index 00000000000..d1088fd1aa7 --- /dev/null +++ b/lib/retrocompatibility.rb @@ -0,0 +1,6 @@ +module Retrocompatibility + def self.calculate_value(setting_key, secret_key) + Setting["#{setting_key}"].present? ? Setting["#{setting_key}"] : Rails.application.secrets[secret_key] + end + +end diff --git a/lib/sms_api.rb b/lib/sms_api.rb index 69a0d93a1d0..121a7af1d7a 100644 --- a/lib/sms_api.rb +++ b/lib/sms_api.rb @@ -8,11 +8,11 @@ def initialize def url return "" unless end_point_available? - open(Rails.application.secrets.sms_end_point).base_uri.to_s + open(Retrocompatibility.calculate_value("sms.endpoint", "sms_end_point")).base_uri.to_s end def authorization - Base64.encode64("#{Rails.application.secrets.sms_username}:#{Rails.application.secrets.sms_password}") + Base64.encode64("#{Retrocompatibility.calculate_value("sms.username", "sms_username")}:#{Retrocompatibility.calculate_value("sms.password", "sms_password")}") end def sms_deliver(phone, code) diff --git a/lib/smtp_configuration.rb b/lib/smtp_configuration.rb new file mode 100644 index 00000000000..1927e7df576 --- /dev/null +++ b/lib/smtp_configuration.rb @@ -0,0 +1,17 @@ +class SmtpConfiguration + def self.set_configuration + if (Rails.env.production? || Rails.env.staging? || Rails.env.preproduction?) && Setting["feature.smtp_configuration"].present? + ActionMailer::Base.delivery_method = :smtp + ActionMailer::Base.smtp_settings = { + address: Setting["smtp.address"], + port: Setting["smtp.port"], + domain: Setting["smtp.domain"], + authentication: Setting["smtp.authentication"], + user_name: Setting["smtp.username"], + password: Setting["smtp.password"], + enable_starttls_auto: Setting["smtp.enable_starttls_auto"].present? + } + end + end + +end diff --git a/lib/tasks/settings.rake b/lib/tasks/settings.rake index c434180bae1..5d08f8399d2 100644 --- a/lib/tasks/settings.rake +++ b/lib/tasks/settings.rake @@ -4,4 +4,50 @@ namespace :settings do ApplicationLogger.new.info "Adding new settings" Setting.add_new_settings end + + desc "Rename existing settings" + task rename_setting_keys: :environment do + ApplicationLogger.new.info "Renaming existing settings" + Setting.rename_key from: "feature.facebook_login", to: "social.facebook.login" + Setting.rename_key from: "feature.google_login", to: "social.google.login" + Setting.rename_key from: "feature.twitter_login", to: "social.twitter.login" + end + + desc "Add new settings" + task add_new_settings: :environment do + ApplicationLogger.new.info "Adding new settings" + Setting.add_new_settings + end + + desc "Manage settings" + task manage_settings: [:rename_setting_keys, :add_new_settings] + + desc "Copy http basic auth from secrets to settings" + task copy_http_basic_auth_to_settings: :environment do + Setting["advanced.auth.http_basic_auth"] = Rails.application.secrets["http_basic_auth"] + Setting["advanced.auth.http_basic_username"] = Rails.application.secrets["http_basic_username"] + Setting["advanced.auth.http_basic_password"] = Rails.application.secrets["http_basic_password"] + end + + desc "Copy existing SMTP configuration to settings database" + task update_smtp_settings: :environment do + if Rails.application.config.action_mailer.delivery_method == :smtp + Setting["feature.smtp_configuration"] = true + Setting["smtp.address"] = Rails.application.config.action_mailer.smtp_settings[:address] + Setting["smtp.port"] = Rails.application.config.action_mailer.smtp_settings[:port] + Setting["smtp.domain"] = Rails.application.config.action_mailer.smtp_settings[:domain] + Setting["smtp.username"] = Rails.application.config.action_mailer.smtp_settings[:user_name] + Setting["smtp.password"] = Rails.application.config.action_mailer.smtp_settings[:password] + Setting["smtp.authentication"] = Rails.application.config.action_mailer.smtp_settings[:authentication] + Setting["smtp.enable_starttls_auto"] = Rails.application.config.action_mailer.smtp_settings[:enable_starttls_auto] + end + end + + desc "Copy sms api configuration from secrets to settings" + task copy_sms_configuration_to_settings: :environment do + Setting["sms.endpoint"] = Rails.application.secrets["sms_end_point"] + Setting["sms.username"] = Rails.application.secrets["sms_username"] + Setting["sms.password"] = Rails.application.secrets["sms_password"] + end + end diff --git a/spec/features/admin/budget_investments_spec.rb b/spec/features/admin/budget_investments_spec.rb index 86c8b8c4bf0..efc02b3542e 100644 --- a/spec/features/admin/budget_investments_spec.rb +++ b/spec/features/admin/budget_investments_spec.rb @@ -1553,7 +1553,8 @@ before { selected_bi.update(cached_votes_up: 50) } scenario "After unselecting an investment", :js do - create_list(:budget_investment, 30, budget: budget) + allow(Budget::Investment).to receive(:default_per_page).and_return 1 + create_list(:budget_investment, 2, budget: budget) visit admin_budget_budget_investments_path(budget) diff --git a/spec/features/admin/feature_flags_spec.rb b/spec/features/admin/feature_flags_spec.rb index 6fbc6c758c5..e9c66669936 100644 --- a/spec/features/admin/feature_flags_spec.rb +++ b/spec/features/admin/feature_flags_spec.rb @@ -21,7 +21,9 @@ budget = create(:budget) visit admin_settings_path - within("#settings-tabs") { click_link "Participation processes" } + within "#process-section" do + click_link "Configure" + end within("#edit_setting_#{setting.id}") do expect(page).to have_button "Disable" @@ -50,7 +52,9 @@ end visit admin_settings_path - within("#settings-tabs") { click_link "Participation processes" } + within "#process-section" do + click_link "Configure" + end within("#edit_setting_#{setting.id}") do expect(page).to have_button "Enable" @@ -66,10 +70,14 @@ end scenario "Disable a feature" do - setting = Setting.find_by(key: "feature.twitter_login") + setting = Setting.find_by(key: "feature.community") visit admin_settings_path + within "#feature-section" do + click_link "Configure" + end + within("#edit_setting_#{setting.id}") do expect(page).to have_button "Disable" expect(page).not_to have_button "Enable" @@ -88,6 +96,9 @@ setting = Setting.find_by(key: "feature.map") visit admin_settings_path + within "#feature-section" do + click_link "Configure" + end within("#edit_setting_#{setting.id}") do expect(page).to have_button "Enable" diff --git a/spec/features/admin/settings_spec.rb b/spec/features/admin/settings_spec.rb index 72096e02c03..19e9e5248d2 100644 --- a/spec/features/admin/settings_spec.rb +++ b/spec/features/admin/settings_spec.rb @@ -12,9 +12,53 @@ visit admin_settings_path - expect(page).to have_content "First" - expect(page).to have_content "Second" - expect(page).to have_content "Third" + expect(page).to have_content "Configuration settings" + expect(page).to have_content "List of general configurations to customize the application." + expect(page).to have_link("Configure", href: admin_setting_path("configuration")) + + expect(page).to have_content "Participation processes" + expect(page).to have_content "Selects the participation processes that will be available in the application." + expect(page).to have_link("Configure", href: admin_setting_path("process")) + + expect(page).to have_content "Features" + expect(page).to have_content "Activates/deactivates the different functionalities offered by the application." + expect(page).to have_link("Configure", href: admin_setting_path("feature")) + + expect(page).to have_content "Map configuration" + expect(page).to have_content "Allows you to update the geolocation of the application, and define the zoom of the map that will be shown to users." + expect(page).to have_link("Configure", href: admin_setting_path("map")) + + expect(page).to have_content "Images and documents" + expect(page).to have_content "Customize the characteristics of the application attachments." + expect(page).to have_link("Configure", href: admin_setting_path("uploads")) + + expect(page).to have_content "Proposals dashboard" + expect(page).to have_content "Allows configuring the main fields to offer users a control panel for their proposals." + expect(page).to have_link("Configure", href: admin_setting_path("proposals")) + + expect(page).to have_content "Remote Census configuration" + expect(page).to have_content "Allow configure remote census (SOAP)" + expect(page).to have_link("Configure", href: admin_setting_path("remote_census")) + + expect(page).to have_content "Registration with social networks" + expect(page).to have_content "Allow users to sign up with social networks (Twitter, Facebook, Google)" + expect(page).to have_link("Configure", href: admin_setting_path("social")) + + expect(page).to have_content "Advanced Configuration" + expect(page).to have_content "Allow update advanced configuration" + expect(page).to have_link("Configure", href: admin_setting_path("advanced")) + + expect(page).to have_content "SMTP Configuration" + expect(page).to have_content "Set SMTP server configuration to send emails." + expect(page).to have_link("Configure", href: admin_setting_path("smtp")) + + expect(page).to have_content "Languages and Time Zone" + expect(page).to have_content "Set default locale, available locales and time zone" + expect(page).to have_link("Configure", href: admin_setting_path("regional")) + + expect(page).to have_content "SMS Configuration" + expect(page).to have_content "Set SMS configuration to send sms for verification users." + expect(page).to have_link("Configure", href: admin_setting_path("sms")) end scenario "Update" do @@ -22,6 +66,10 @@ visit admin_settings_path + within "#configuration-section" do + click_link "Configure" + end + within("#edit_setting_#{setting.id}") do fill_in "setting_#{setting.id}", with: "Super Users of level 1" click_button "Update" @@ -30,14 +78,138 @@ expect(page).to have_content "Value updated" end + describe "Show" do + + scenario "Should display configuration settings section" do + setting = Setting.create(key: "configuration.setting_sample") + + visit admin_setting_path("configuration") + + expect(page).to have_content "Configuration settings" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display process settings section" do + setting = Setting.create(key: "process.setting_sample") + + visit admin_setting_path("process") + + expect(page).to have_content "Participation processes" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display feature settings section" do + setting = Setting.create(key: "feature.setting_sample") + + visit admin_setting_path("feature") + + expect(page).to have_content "Features" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display map settings section" do + Setting["feature.map"] = true + setting = Setting.create(key: "map.setting_sample") + + visit admin_setting_path("map") + + expect(page).to have_content "Map configuration" + expect(page).to have_css("#edit_setting_#{setting.id}") + expect(page).to have_content "Latitude" + expect(page).to have_content "Longitude" + expect(page).to have_content "Zoom" + expect(page).to have_content "TMS(Tile Map Service) Provider" + expect(page).to have_content "Attribution from TMS Provider" + end + + scenario "Should display uploads settings section" do + setting = Setting.create(key: "uploads.setting_sample") + + visit admin_setting_path("uploads") + + expect(page).to have_content "Images and documents" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display proposals settings section" do + setting = Setting.create(key: "proposals.setting_sample") + + visit admin_setting_path("proposals") + + expect(page).to have_content "Proposals dashboard" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display remote_census settings section" do + Setting["feature.remote_census"] = true + setting = Setting.create(key: "remote_census.response.setting_sample") + + visit admin_setting_path("remote_census") + + expect(page).to have_content "Remote Census configuration" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display social settings section" do + setting = Setting.create(key: "social.twitter.setting_sample") + + visit admin_setting_path("social") + + expect(page).to have_content "Registration with social networks" + expect(page).to have_content "Twitter" + expect(page).to have_content "Facebook" + expect(page).to have_content "Google" + expect(page).to have_content "Note: For changes to this section to take effect correctly, contact your system administrator to restart all services that are using the application." + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display smtp settings section" do + setting = Setting.create(key: "smtp.setting_sample") + Setting["feature.smtp_configuration"] = true + + visit admin_setting_path("smtp") + + expect(page).to have_content "SMTP Configuration" + expect(page).to have_content "SMTP Host" + expect(page).to have_content "SMTP Port" + expect(page).to have_content "Domain" + expect(page).to have_content "SMTP User" + expect(page).to have_content "SMTP Password" + expect(page).to have_content "SMTP Authentication" + expect(page).to have_content "Enable SMTP TLS" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display regional settings section" do + setting = Setting.create(key: "regional.default_locale.setting_sample") + + visit admin_setting_path("regional") + + expect(page).to have_content "Application default locale" + expect(page).to have_content "Application available locales" + expect(page).to have_content "Time Zone" + expect(page).to have_css("#edit_setting_#{setting.id}") + end + + scenario "Should display with disabled style default_locale as available_locales feature" do + default_locale = Setting.find_by(key: "regional.default_locale.key").value + available_locale_setting_from_default_locale = Setting.find_by(key: "regional.available_locale.#{default_locale}") + + visit admin_setting_path("regional") + + within "#edit_setting_#{available_locale_setting_from_default_locale.id}" do + expect(find("input[name='commit'][type='submit']").disabled?).to be true + end + end + + end + describe "Update map" do scenario "Should not be able when map feature deactivated" do Setting["feature.map"] = false - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#map-tab").click + + visit admin_setting_path("map") expect(page).to have_content "To show the map to users you must enable " \ '"Proposals and budget investments geolocation" ' \ @@ -47,10 +219,8 @@ scenario "Should be able when map feature activated" do Setting["feature.map"] = true - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#map-tab").click + + visit admin_setting_path("map") expect(page).to have_css("#admin-map") expect(page).not_to have_content "To show the map to users you must enable " \ @@ -60,9 +230,8 @@ scenario "Should show successful notice" do Setting["feature.map"] = true - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path + + visit admin_setting_path("map") within "#map-form" do click_on "Update" @@ -73,10 +242,8 @@ scenario "Should display marker by default", :js do Setting["feature.map"] = true - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path + visit admin_setting_path("map") expect(find("#latitude", visible: false).value).to eq "51.48" expect(find("#longitude", visible: false).value).to eq "0.0" @@ -84,30 +251,27 @@ scenario "Should update marker", :js do Setting["feature.map"] = true - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#map-tab").click + visit admin_setting_path("map") + find("#admin-map").click within "#map-form" do click_on "Update" end - expect(find("#latitude", visible: false).value).not_to eq "51.48" expect(page).to have_content "Map configuration updated succesfully" + expect(find("#latitude", visible: false).value).not_to eq "51.48" end end describe "Update content types" do - scenario "stores the correct mime types" do - setting = Setting.create(key: "upload.images.content_types", value: "image/png") - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#images-and-documents-tab").click + scenario "stores the correct mime types", :js do + setting = Setting.find_by(key: "uploads.images.content_types") + setting.update(value: "image/png") + + visit admin_setting_path("uploads") within "#edit_setting_#{setting.id}" do expect(find("#png")).to be_checked @@ -120,10 +284,12 @@ end expect(page).to have_content "Value updated" - expect(Setting["upload.images.content_types"]).to include "image/png" - expect(Setting["upload.images.content_types"]).to include "image/gif" + expect(Setting["uploads.images.content_types"]).to include "image/png" + expect(Setting["uploads.images.content_types"]).to include "image/gif" - visit admin_settings_path(anchor: "tab-images-and-documents") + within "#uploads-section" do + click_link "Configure" + end within "#edit_setting_#{setting.id}" do expect(find("#png")).to be_checked @@ -142,10 +308,8 @@ scenario "Should not be able when remote census feature deactivated" do Setting["feature.remote_census"] = nil - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#remote-census-tab").click + + visit admin_setting_path("remote_census") expect(page).to have_content "To configure remote census (SOAP) you must enable " \ '"Configure connection to remote census (SOAP)" ' \ @@ -153,10 +317,7 @@ end scenario "Should be able when remote census feature activated" do - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#remote-census-tab").click + visit admin_setting_path("remote_census") expect(page).to have_content("General Information") expect(page).to have_content("Request Data") @@ -168,115 +329,48 @@ end - describe "Should redirect to same tab after update setting" do - - context "remote census" do - - before do - Setting["feature.remote_census"] = true - end - - scenario "On #tab-remote-census-configuration", :js do - remote_census_setting = create(:setting, key: "remote_census.general.whatever") - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#remote-census-tab").click - - within("#edit_setting_#{remote_census_setting.id}") do - fill_in "setting_#{remote_census_setting.id}", with: "New value" - click_button "Update" - end + describe "Update Regional Settings" do - expect(page).to have_current_path(admin_settings_path) - expect(page).to have_css("div#tab-remote-census-configuration.is-active") - end - end + scenario "Should update default_locale", :js do + setting = Setting.find_by(key: "regional.default_locale.key") - scenario "On #tab-configuration", :js do - configuration_setting = Setting.create(key: "whatever") - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#tab-configuration").click + visit admin_setting_path("regional") - within("#edit_setting_#{configuration_setting.id}") do - fill_in "setting_#{configuration_setting.id}", with: "New value" + within("#edit_setting_#{setting.id}") do + select("Español", from: "setting_value") click_button "Update" end - expect(page).to have_current_path(admin_settings_path) - expect(page).to have_css("div#tab-configuration.is-active") + expect(page).to have_content "Value updated" + expect(I18n.default_locale).to eq :es end - context "map configuration" do + scenario "Should update available_locales", :js do + setting = Setting.find_by(key: "regional.available_locale.es") + visit admin_setting_path("regional") + expect(I18n.available_locales).to include :es - before do - Setting["feature.map"] = true + accept_alert do + find("#edit_setting_#{setting.id} .button").click end - scenario "On #tab-map-configuration", :js do - map_setting = Setting.create(key: "map.whatever") - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#map-tab").click - - within("#edit_setting_#{map_setting.id}") do - fill_in "setting_#{map_setting.id}", with: "New value" - click_button "Update" - end - - expect(page).to have_current_path(admin_settings_path) - expect(page).to have_css("div#tab-map-configuration.is-active") - end + expect(page).to have_content "Value updated" + expect(I18n.available_locales).not_to include :es end - scenario "On #tab-proposals", :js do - proposal_dashboard_setting = Setting.create(key: "proposals.whatever") - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#proposals-tab").click + scenario "Should update time_zone" do + setting = Setting.find_by(key: "regional.time_zone.key") + visit admin_setting_path("regional") - within("#edit_setting_#{proposal_dashboard_setting.id}") do - fill_in "setting_#{proposal_dashboard_setting.id}", with: "New value" + within("#edit_setting_#{setting.id}") do + select("(GMT-05:00) Lima", from: "setting_value") click_button "Update" end - expect(page).to have_current_path(admin_settings_path) - expect(page).to have_css("div#tab-proposals.is-active") - end - - scenario "On #tab-participation-processes", :js do - process_setting = Setting.create(key: "process.whatever") - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#participation-processes-tab").click - - accept_alert do - find("#edit_setting_#{process_setting.id} .button").click - end - - expect(page).to have_current_path(admin_settings_path) - expect(page).to have_css("div#tab-participation-processes.is-active") + expect(page).to have_content "Value updated" + expect(Time.zone.name).to eq "Lima" end - scenario "On #tab-feature-flags", :js do - feature_setting = Setting.create(key: "feature.whatever") - admin = create(:administrator).user - login_as(admin) - visit admin_settings_path - find("#features-tab").click - - accept_alert do - find("#edit_setting_#{feature_setting.id} .button").click - end - - expect(page).to have_current_path(admin_settings_path) - expect(page).to have_css("div#tab-feature-flags.is-active") - end end describe "Skip verification" do @@ -285,8 +379,7 @@ Setting["feature.user.skip_verification"] = "true" setting = Setting.where(key: "feature.user.skip_verification").first - visit admin_settings_path - find("#features-tab").click + visit admin_setting_path("feature") accept_alert do find("#edit_setting_#{setting.id} .button").click @@ -299,8 +392,7 @@ Setting["feature.user.skip_verification"] = nil setting = Setting.where(key: "feature.user.skip_verification").first - visit admin_settings_path - find("#features-tab").click + visit admin_setting_path("feature") accept_alert do find("#edit_setting_#{setting.id} .button").click diff --git a/spec/features/admin/wizards/installer_spec.rb b/spec/features/admin/wizards/installer_spec.rb new file mode 100644 index 00000000000..78bade3b88f --- /dev/null +++ b/spec/features/admin/wizards/installer_spec.rb @@ -0,0 +1,124 @@ +require "rails_helper" + +describe "Wizard Installer" do + + before do + @admin = create(:administrator) + login_as(@admin.user) + end + + context "Steps" do + scenario "Initial step" do + visit new_admin_wizards_installer_path + + expect(page).to have_content "Installation Wizard" + expect(page).to have_content "Step 1 of 7" + expect(page).to have_content "Welcome to the Consul installation wizard" + expect(page).to have_content "In this wizard we will carry out step by step all the necessary configuration to be able to customize the application to the needs of your Institution. If you do not have any information requested in the wizard, you will be able to ignore it and modify it in the future in the related Settings Section or from this same Wizard." + expect(page).to have_link("Get Started", href: admin_wizards_installer_path(:general_settings)) + end + + scenario "General Settings Step" do + visit admin_wizards_installer_path(:general_settings) + + expect(page).to have_content "Installation Wizard" + expect(page).to have_content "Step 2 of 7" + expect(page).to have_content "Global settings" + expect(page).to have_content 'In this step you can update some of the most important Global Application Settings. If you want to modify any of them once the Wizard has been carried out, you can go to the "Configuration > Global Configuration" section or by running the Installation Wizard again.' + expect(page).to have_link("Back", href: new_admin_wizards_installer_path) + expect(page).to have_link("Next", href: admin_wizards_installer_path(:participation_process)) + within "#installer-general-settings" do + expect(page).to have_css(".setting", count: 2) + expect(page).to have_content "Site name" + expect(page).to have_content "Minimum age needed to participate" + end + end + + scenario "Participation processes Step" do + visit admin_wizards_installer_path(:participation_process) + + expect(page).to have_content "Installation Wizard" + expect(page).to have_content "Step 3 of 7" + expect(page).to have_content "Participation processes" + expect(page).to have_content 'In this step you can activate/deactivate the participation processes that each Institution decides to use. If you want to modify any of them once the Wizard has been carried out, you can access the "Configuration > Participation Processes" section or by running the Installation Wizard again.' + expect(page).to have_link("Back", href: admin_wizards_installer_path(:general_settings)) + expect(page).to have_link("Next", href: admin_wizards_installer_path(:map)) + within "#installer-participation-process" do + expect(page).to have_css(".setting", count: 5) + expect(page).to have_content "Debates" + expect(page).to have_content "Proposals" + expect(page).to have_content "Number of supports necessary for approval of a Proposal" + expect(page).to have_content "Polls" + expect(page).to have_content "Participatory budgeting" + end + end + + scenario "Map Step" do + visit admin_wizards_installer_path(:map) + + expect(page).to have_content "Installation Wizard" + expect(page).to have_content "Step 4 of 7" + expect(page).to have_content "Map configuration" + expect(page).to have_content 'In this step you will be able to activate/deactivate the geolocation of proposals and spending projects, and customize the way the map is shown to users. If you want to modify any of them once the Wizard has been carried out, you can access the "Configuration > Map Configuration" section or run the Installation Wizard again.' + expect(page).to have_link("Back", href: admin_wizards_installer_path(:participation_process)) + expect(page).to have_link("Next", href: admin_wizards_installer_path(:smtp)) + within "#installer-map" do + expect(page).to have_css(".setting", count: 4) + expect(page).to have_content "Proposals and budget investments geolocation" + expect(page).to have_content "Latitude" + expect(page).to have_content "Longitude" + expect(page).to have_content "Zoom" + end + end + + scenario "Smtp Step" do + visit admin_wizards_installer_path(:smtp) + + expect(page).to have_content "Installation Wizard" + expect(page).to have_content "Step 5 of 7" + expect(page).to have_content "SMTP Connection" + expect(page).to have_content 'In this step you will be able to configure the SMTP connection to be able to send mails from the application. If you want to modify any of them once the Wizard has been carried out, you will be able to access the section "Configuration > SMTP Connection" or by running the Installation Wizard again.' + expect(page).to have_link("Back", href: admin_wizards_installer_path(:map)) + expect(page).to have_link("Next", href: admin_wizards_installer_path(:regional)) + within "#installer-smtp" do + expect(page).to have_css(".setting", count: 8) + expect(page).to have_content "SMTP Configuration" + expect(page).to have_content "SMTP Host" + expect(page).to have_content "SMTP Port" + expect(page).to have_content "Domain" + expect(page).to have_content "SMTP User" + expect(page).to have_content "SMTP Password" + expect(page).to have_content "SMTP Authentication" + expect(page).to have_content "Enable SMTP TLS" + end + end + + scenario "Regional Step" do + visit admin_wizards_installer_path(:regional) + + expect(page).to have_content "Installation Wizard" + expect(page).to have_content "Step 6 of 7" + expect(page).to have_content "Languages and Time Zone" + expect(page).to have_content 'In this step you can set the default language of the application, the available languages and the time zone you are in. If you want to modify any of them once the Wizard has been carried out, you can go to the "Configuration > Regional Settings" section or by running the Installation Wizard again.' + expect(page).to have_link("Back", href: admin_wizards_installer_path(:smtp)) + expect(page).to have_link("Next", href: admin_wizards_installer_path(:finish)) + within "#installer-regional" do + expect(page).to have_css(".setting", count: 29) + expect(page).to have_content "Application default locale" + expect(page).to have_content "Application available locales" + expect(page).to have_content "Time Zone" + end + end + + scenario "Finish Step" do + visit admin_wizards_installer_path(:finish) + + expect(page).to have_content "Installation Wizard" + expect(page).to have_content "Step 7 of 7" + expect(page).to have_content "Assistant successfully completed" + expect(page).to have_content 'If you want to modify any data once the Wizard has been carried out, you can modify it in the Configuration section or by running the Installation Wizard again.' + expect(page).to have_link("Back", href: admin_wizards_installer_path(:regional)) + end + end + +end diff --git a/spec/features/admin/wizards_spec.rb b/spec/features/admin/wizards_spec.rb new file mode 100644 index 00000000000..bce4a0f9235 --- /dev/null +++ b/spec/features/admin/wizards_spec.rb @@ -0,0 +1,28 @@ +require "rails_helper" + +describe "Admin Wizards" do + + before do + @admin = create(:administrator) + login_as(@admin.user) + end + + context "Admin sidebar" do + scenario "Display wizard section on admin menu" do + visit admin_root_path + + expect(page).to have_link("Wizard", href: admin_wizards_path) + end + end + + scenario "Index" do + visit admin_wizards_path + + expect(page).to have_content("Wizard") + + expect(page).to have_content("Installation Wizard") + expect(page).to have_content("Through this tool we present you the installation of the system.") + expect(page).to have_link("Configure", href: new_admin_wizards_installer_path) + end + +end diff --git a/spec/features/localization_spec.rb b/spec/features/localization_spec.rb index 9e7465f6c7e..b4303b9be57 100644 --- a/spec/features/localization_spec.rb +++ b/spec/features/localization_spec.rb @@ -62,6 +62,7 @@ let!(:default_locales) { I18n.available_locales.dup } before do + Setting["regional.available_locale.wl"] = true I18n.enforce_available_locales = false I18n.available_locales = default_locales + [:wl] I18n.locale = :wl diff --git a/spec/helpers/map_locations_helper_spec.rb b/spec/helpers/map_locations_helper_spec.rb new file mode 100644 index 00000000000..1070b7045ff --- /dev/null +++ b/spec/helpers/map_locations_helper_spec.rb @@ -0,0 +1,25 @@ +require "rails_helper" + +describe MapLocationsHelper do + + describe "#prepare_map_settings" do + + it "returns tiles provider values from Secrets when related settings do not exists" do + options = prepare_map_settings(MapLocation.new, false, "budgets", nil) + + expect(options[:map_tiles_provider]).to eq "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" + expect(options[:map_tiles_provider_attribution]).to eq "© OpenStreetMap contributors" + end + + it "returns tiles provider values from Settings when related settings are definded" do + Setting["map.tiles_provider"] = "example_map_tiles_provider" + Setting["map.tiles_provider_attribution"] = "example_map_tiles_provider_attribution" + options = prepare_map_settings(MapLocation.new, false, "budgets", nil) + + expect(options[:map_tiles_provider]).to eq "example_map_tiles_provider" + expect(options[:map_tiles_provider_attribution]).to eq "example_map_tiles_provider_attribution" + end + + end + +end diff --git a/spec/helpers/settings_helper_spec.rb b/spec/helpers/settings_helper_spec.rb index a5b8f729951..7bfd3e5fd84 100644 --- a/spec/helpers/settings_helper_spec.rb +++ b/spec/helpers/settings_helper_spec.rb @@ -28,12 +28,45 @@ end end - describe "#display_setting_name" do - it "returns correct setting_name" do - expect(display_setting_name("setting")).to eq("Setting") - expect(display_setting_name("remote_census_general_name")).to eq("General Information") - expect(display_setting_name("remote_census_request_name")).to eq("Request Data") - expect(display_setting_name("remote_census_response_name")).to eq("Response Data") + describe "#social_feature?" do + it "returns true when social setting is a feature flag" do + social_setting_flag = Setting.create(key: "social.sample_social.login") + social_setting_input = Setting.create(key: "social.sample_social.input") + social_setting_one_level = Setting.create(key: "social.one_level") + another_setting = Setting.create(key: "another_setting.sample_key") + + expect(social_feature?(social_setting_flag)).to eq true + expect(social_feature?(social_setting_input)).to eq false + expect(social_feature?(social_setting_one_level)).to eq false + expect(social_feature?(another_setting)).to eq false + end + end + + describe "#smtp_feature?" do + it "returns true when smtp setting is a feature flag" do + smtp_setting_flag = Setting.create(key: "smtp.enable_starttls_auto") + smtp_setting_input = Setting.create(key: "smtp.sample_smtp.input") + smtp_setting_one_level = Setting.create(key: "smtp.one_level") + another_setting = Setting.create(key: "another_setting.sample_key") + + expect(smtp_feature?(smtp_setting_flag)).to eq true + expect(smtp_feature?(smtp_setting_input)).to eq false + expect(smtp_feature?(smtp_setting_one_level)).to eq false + expect(smtp_feature?(another_setting)).to eq false + end + end + + describe "#regional_feature?" do + it "returns true when regional setting is a feature flag" do + regional_setting_flag = Setting.create(key: "regional.available_locale.login") + regional_setting_input = Setting.create(key: "regional.sample_regional.input") + regional_setting_one_level = Setting.create(key: "regional.one_level") + another_setting = Setting.create(key: "another_setting.sample_key") + + expect(regional_feature?(regional_setting_flag)).to eq true + expect(regional_feature?(regional_setting_input)).to eq false + expect(regional_feature?(regional_setting_one_level)).to eq false + expect(regional_feature?(another_setting)).to eq false end end diff --git a/spec/lib/regional/locales.rb b/spec/lib/regional/locales.rb new file mode 100644 index 00000000000..961034aaebb --- /dev/null +++ b/spec/lib/regional/locales.rb @@ -0,0 +1,60 @@ +require "rails_helper" + +describe Regional::Locales do + + describe "Default Locale" do + + context "#load_i18n_default_locale" do + + after do + I18n.default_locale = :en + end + + it "when related Setting with default_locale is blank, return default_locale defined in application.rb" do + Setting["regional.default_locale.key"] = nil + + Regional::Locales.load_i18n_default_locale + + expect(I18n.default_locale).to eq :en + end + + it "when related Setting with default_locale is filled, return default_locale defined in Settings" do + Setting["regional.default_locale.key"] = :es + + Regional::Locales.load_i18n_default_locale + + expect(I18n.default_locale).to eq :es + end + + end + + end + + describe "Available Locales" do + + context "#load_i18n_available_locales" do + + let!(:available_locales) { I18n.available_locales } + let!(:available_locales_without_de) { I18n.available_locales - [:de] } + + it "when related Setting with available_locales are blank, return available_locales defined in application.rb" do + Setting.where("key LIKE ?", "regional.available_locale.%").delete_all + + Regional::Locales.load_i18n_available_locales + + expect(I18n.available_locales).to eq available_locales + end + + it "when related Setting with default_locale is filled, return default_locale defined in Settings" do + Setting["regional.available_locale.de"] = nil + + Regional::Locales.load_i18n_available_locales + + expect(I18n.available_locales).to eq available_locales_without_de + end + + end + + end + +end diff --git a/spec/lib/regional/timezone.rb b/spec/lib/regional/timezone.rb new file mode 100644 index 00000000000..623b1bbc70a --- /dev/null +++ b/spec/lib/regional/timezone.rb @@ -0,0 +1,33 @@ +require "rails_helper" + +describe Regional::Timezone do + + describe "Timezone" do + + context "#load_timezone" do + + after do + Time.zone = "Madrid" + end + + it "when related Setting with timezone is blank, return timezone defined in application.rb" do + Setting["regional.time_zone.key"] = nil + + Regional::Timezone.load_timezone + + expect(Time.zone.name).to eq "Madrid" + end + + it "when related Setting with timezone is filled, return timezone defined in Settings" do + Setting["regional.time_zone.key"] = "Lima" + + Regional::Timezone.load_timezone + + expect(Time.zone.name).to eq "Lima" + end + + end + + end + +end diff --git a/spec/lib/tasks/settings_spec.rb b/spec/lib/tasks/settings_spec.rb new file mode 100644 index 00000000000..ca0497d14db --- /dev/null +++ b/spec/lib/tasks/settings_spec.rb @@ -0,0 +1,113 @@ +require "rails_helper" + +describe Setting do + + describe "#rename_setting_keys" do + + let :run_rake_task do + Rake::Task["settings:rename_setting_keys"].reenable + Rake.application.invoke_task "settings:rename_setting_keys" + end + + let :old_keys do + %w[feature.facebook_login feature.google_login feature.twitter_login] + end + + let :new_keys do + %w[social.facebook.login social.google.login social.twitter.login] + end + + context "with existing old settings" do + it "rename all settings keys keeping the same value" do + Setting.destroy_all + old_keys.each { |old_key| Setting[old_key] = "old value" } + + run_rake_task + + new_keys.each do |new_key| + expect(Setting[new_key]).to eq "old value" + end + + old_keys.each do |old_key| + expect(Setting.where(key: old_key)).not_to exist + end + end + end + + context "without existing old settings" do + it "initializes all settings with null value" do + Setting.destroy_all + + run_rake_task + + new_keys.each do |new_key| + expect(Setting[new_key]).to eq nil + end + + old_keys.each do |old_key| + expect(Setting.where(key: old_key)).not_to exist + end + end + end + + context "with already existing new settings" do + it "does not change the value of the new settings even if the old setting exist" do + Setting.destroy_all + old_keys.each { |old_key| Setting[old_key] = "old value" } + new_keys.each { |new_key| Setting[new_key] = "new value" } + + run_rake_task + + new_keys.each do |new_key| + expect(Setting[new_key]).to eq "new value" + end + + old_keys.each do |old_key| + expect(Setting.where(key: old_key)).not_to exist + end + end + end + + end + + describe "Retrocompatibility smtp settings for existing installations" do + + let :run_rake_task do + Rake::Task["settings:update_smtp_settings"].reenable + Rake.application.invoke_task "settings:update_smtp_settings" + end + + context "#update_smtp_settings" do + + before do + Rails.application.config.action_mailer.delivery_method = :smtp + Rails.application.config.action_mailer.smtp_settings = { address: "smtp.test.com", + port: 587, + domain: "mail.com", + user_name: "username test", + password: "password_test", + authentication: "plain", + enable_starttls_auto: true } + end + + after do + Rails.application.config.action_mailer.delivery_method = :test + Rails.application.config.action_mailer.smtp_settings = nil + end + + it "Update correctly SMTP settings with action_mailer application configuration" do + run_rake_task + + expect(Setting["smtp.address"]).to eq "smtp.test.com" + expect(Setting["smtp.port"]).to eq "587" + expect(Setting["smtp.domain"]).to eq "mail.com" + expect(Setting["smtp.username"]).to eq "username test" + expect(Setting["smtp.password"]).to eq "password_test" + expect(Setting["smtp.authentication"]).to eq "plain" + expect(Setting["smtp.enable_starttls_auto"].present?).to eq true + end + end + + end + +end diff --git a/spec/models/setting_spec.rb b/spec/models/setting_spec.rb index 12580521128..cec95d2d8ee 100644 --- a/spec/models/setting_spec.rb +++ b/spec/models/setting_spec.rb @@ -72,6 +72,21 @@ configuration_setting = Setting.create(key: "whatever") expect(configuration_setting.type).to eq "configuration" end + + it "returns 'social.social_name' for 'social' settings" do + configuration_setting = Setting.create(key: "social.social_name.sample_setting") + expect(configuration_setting.type).to eq "social.social_name" + end + + it "returns the key prefix for 'smtp' settings" do + map_setting = Setting.create(key: "smtp.whatever") + expect(map_setting.type).to eq "smtp" + end + + it "returns 'regional.regional_section' for 'regional' settings" do + configuration_setting = Setting.create(key: "regional.regional_name.sample_setting") + expect(configuration_setting.type).to eq "regional.regional_name" + end end describe "#enabled?" do