diff --git a/.erb-lint.yml b/.erb-lint.yml index 9c0b1a2e65704..b892e89a52894 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -701,7 +701,6 @@ linters: - is-accordion-submenu - is-accordion-submenu-parent - is-accordion-submenu-parent[aria-expanded=true] - - is-admin - is-anchored - is-at-bottom - is-at-top diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 7f91153abd0b3..6b4064b6a917f 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -23,7 +23,7 @@ Individual workflows with changes: - `ci_javascript.yml`: Runs tests for the JS files. Tests must run from the project root folder. You will need to install NodeJS and the JS dependencies: ```yml -- uses: actions/setup-node@v3 +- uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - run: npm ci diff --git a/.github/workflows/brakeman.yml b/.github/workflows/brakeman.yml index 12c76f0018257..f8d6799d56880 100644 --- a/.github/workflows/brakeman.yml +++ b/.github/workflows/brakeman.yml @@ -55,7 +55,7 @@ jobs: if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/build_app.yml b/.github/workflows/build_app.yml index 5af8feed5ef01..b3594b3b04eab 100644 --- a/.github/workflows/build_app.yml +++ b/.github/workflows/build_app.yml @@ -34,19 +34,19 @@ jobs: env: POSTGRES_PASSWORD: postgres steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ inputs.ruby_version }} bundler-cache: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ inputs.node_version }} cache: 'npm' cache-dependency-path: ./package-lock.json - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: app-cache with: path: ./spec/decidim_dummy_app/ diff --git a/.github/workflows/ci_generators.yml b/.github/workflows/ci_generators.yml index d142ee93a5a29..676f8f05f12be 100644 --- a/.github/workflows/ci_generators.yml +++ b/.github/workflows/ci_generators.yml @@ -72,27 +72,27 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Get npm cache directory path id: npm-cache-dir-path run: echo "dir=$(npm get cache)-${{ env.DECIDIM_MODULE }}" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: npm-cache with: path: ${{ steps.npm-cache-dir-path.outputs.dir }} key: npm-${{ hashFiles('**/package-lock.json') }} restore-keys: | npm- - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: app-cache with: path: ./Gemfile.lock @@ -106,7 +106,7 @@ jobs: working-directory: ${{ env.DECIDIM_MODULE }} env: SIMPLECOV: "true" - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 name: Upload coverage with: token: ${{ env.CODECOV_TOKEN }} diff --git a/.github/workflows/ci_javascript.yml b/.github/workflows/ci_javascript.yml index 96f7d441e1f48..b480bcfe1a171 100644 --- a/.github/workflows/ci_javascript.yml +++ b/.github/workflows/ci_javascript.yml @@ -33,16 +33,16 @@ jobs: if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Get npm cache directory path id: npm-cache-dir-path run: echo "dir=$(npm get cache)-javascript" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: npm-cache with: path: ${{ steps.npm-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/ci_main.yml b/.github/workflows/ci_main.yml index d0b0d9b35fed9..372d3fada3aa2 100644 --- a/.github/workflows/ci_main.yml +++ b/.github/workflows/ci_main.yml @@ -25,20 +25,20 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Get npm cache directory path id: npm-cache-dir-path run: echo "dir=$(npm get cache)-main" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: npm-cache with: path: ${{ steps.npm-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/ci_performance_metrics_monitoring.yml b/.github/workflows/ci_performance_metrics_monitoring.yml index ec94f518e6816..4dbbfbbdcae8e 100644 --- a/.github/workflows/ci_performance_metrics_monitoring.yml +++ b/.github/workflows/ci_performance_metrics_monitoring.yml @@ -52,20 +52,20 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Get npm cache directory path id: npm-cache-dir-path run: echo "dir=$(npm get cache)-${{ env.DECIDIM_MODULE }}" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: npm-cache with: path: ${{ steps.npm-cache-dir-path.outputs.dir }} @@ -90,7 +90,7 @@ jobs: name: Warmup the cache at the configured lighthouse urls working-directory: ./development_app/ - name: Audit URLs using Lighthouse - uses: treosh/lighthouse-ci-action@v10 + uses: treosh/lighthouse-ci-action@v11 with: runs: 3 # run more than once to warm up the application uploadArtifacts: true diff --git a/.github/workflows/ci_production_check.yml b/.github/workflows/ci_production_check.yml index e1560cdbf4e07..4afcc9bcb2d15 100644 --- a/.github/workflows/ci_production_check.yml +++ b/.github/workflows/ci_production_check.yml @@ -46,20 +46,20 @@ jobs: DATABASE_HOST: localhost RUBYOPT: '-W:no-deprecated' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Get npm cache directory path id: npm-cache-dir-path run: echo "dir=$(npm get cache)-${{ env.DECIDIM_MODULE }}" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: npm-cache with: path: ${{ steps.npm-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/lint_code.yml b/.github/workflows/lint_code.yml index 96e70c9607471..1527ea84c1197 100644 --- a/.github/workflows/lint_code.yml +++ b/.github/workflows/lint_code.yml @@ -38,20 +38,20 @@ jobs: if: "!startsWith(github.head_ref, 'chore/l10n')" timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Get npm cache directory path id: npm-cache-dir-path run: echo "dir=$(npm get cache)-lint" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: npm-cache with: path: ${{ steps.npm-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/test_app.yml b/.github/workflows/test_app.yml index e7d2f63f31e39..82dc801d67071 100644 --- a/.github/workflows/test_app.yml +++ b/.github/workflows/test_app.yml @@ -72,14 +72,14 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ inputs.ruby_version }} - uses: nanasess/setup-chromedriver@v2 - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: app-cache with: path: ./spec/decidim_dummy_app/ @@ -110,13 +110,13 @@ jobs: SIMPLECOV: "true" SHAKAPACKER_RUNTIME_COMPILE: "false" NODE_ENV: "test" - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 name: Upload coverage with: token: ${{ inputs.codecov_token }} name: ${{ inputs.working-directory }} flags: ${{ inputs.working-directory }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: screenshots diff --git a/Gemfile.lock b/Gemfile.lock index c70c00cd026ec..365b48936e16a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -475,7 +475,7 @@ GEM mime-types-data (3.2023.1205) mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.5) + mini_portile2 (2.8.7) minitest (5.22.2) msgpack (1.4.5) multi_xml (0.6.0) @@ -492,7 +492,7 @@ GEM net-smtp (0.3.4) net-protocol nio4r (2.7.0) - nokogiri (1.16.2) + nokogiri (1.16.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) oauth (1.1.0) @@ -559,7 +559,7 @@ GEM public_suffix (5.0.4) puma (6.4.2) nio4r (~> 2.0) - racc (1.7.3) + racc (1.8.0) rack (2.2.8.1) rack-attack (6.7.0) rack (>= 1.0, < 4) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4f6416f022576..1086f238ba90d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -221,7 +221,28 @@ bin/rails db:drop db:create db:migrate assets:precompile db:seed You can see more details about this change on PR [\#12828](https://github.com/decidim/decidim/pull/12828) -### 5.3. [[TITLE OF THE CHANGE]] +### 5.3. Verifications need a help text + +In order to explain better to administrators what authorizations they have available we have added a new internationalization (i18n) key to the verifications workflows. + +If you have a custom authorization handler, you need to add the help text to the `config/locales/en.yml` file, where `en.yml` is the locale file for the language you are using. + +For instance, for the SMS authorization handler, you need to add the following key: + +```yaml +en: + decidim: + authorization_handlers: + admin: + sms: + help: + - This is the help text for the SMS authorization handler + - This is the second line of the help text +``` + +You can see more details about this change on PR [\#13029](https://github.com/decidim/decidim/pull/13029) + +### 5.4. [[TITLE OF THE CHANGE]] In order to [[REASONING (e.g. improve the maintenance of the code base)]] we have changed... diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index e3b452b4b41b7..a4c7f739cef0e 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -136,6 +136,7 @@ ignore_unused: - decidim.admin.participatory_process_steps.default_title - decidim.authorization_handlers.{direct,multistep} - decidim.admin.models.assembly_member.positions.* + - decidim.application.documents.component_documents.* - decidim.statistics.* - decidim.components.* - decidim.filters.linked_classes.* @@ -349,8 +350,10 @@ ignore_unused: - layouts.decidim.assemblies.promoted_assembly.take_part - versions.dropdown.option_* - decidim.meetings.meetings.filters.* + - decidim.meetings.polls.questions.index_admin.statuses.{closed,published,unpublished} - decidim.meetings.directory.meetings.index.space_type - decidim.authorization_modals.content.* + - decidim.authorization_handlers.admin.{another_dummy_authorization_handler,csv_census,dummy_authorization_handler,id_documents,postal_letter,sms}.help - time.buttons.* ## Exclude these keys from the `i18n-tasks eq-base' report: diff --git a/decidim-accountability/app/controllers/decidim/accountability/results_controller.rb b/decidim-accountability/app/controllers/decidim/accountability/results_controller.rb index 10f3a431a0bca..6989927748c9f 100644 --- a/decidim-accountability/app/controllers/decidim/accountability/results_controller.rb +++ b/decidim-accountability/app/controllers/decidim/accountability/results_controller.rb @@ -8,7 +8,7 @@ class ResultsController < Decidim::Accountability::ApplicationController helper Decidim::TraceabilityHelper helper Decidim::Accountability::BreadcrumbHelper - helper_method :results, :result, :first_class_categories, :count_calculator, :nav_paths + helper_method :results, :result, :first_class_categories, :count_calculator def show raise ActionController::RoutingError, "Not Found" unless result @@ -29,24 +29,6 @@ def result @result ||= search_collection.includes(:timeline_entries).find_by(id: params[:id]) end - def next_result - return if search_collection.size < 2 - - search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].gt(result.id)).first - end - - def prev_result - return if search_collection.size < 2 - - search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].lt(result.id)).last - end - - def nav_paths - return {} if result.blank? - - { prev_path: prev_result, next_path: next_result }.compact_blank.transform_values { |result| result_path(result) } - end - def search_collection Result.where(component: current_component) end diff --git a/decidim-accountability/app/views/decidim/accountability/results/_project.html.erb b/decidim-accountability/app/views/decidim/accountability/results/_project.html.erb index 2d7767deeb438..45c034e4644ef 100644 --- a/decidim-accountability/app/views/decidim/accountability/results/_project.html.erb +++ b/decidim-accountability/app/views/decidim/accountability/results/_project.html.erb @@ -1,4 +1,4 @@ -<%= render layout: "layouts/decidim/shared/layout_item", locals: nav_paths do %> +<%= render layout: "layouts/decidim/shared/layout_item" do %> <%= cell("decidim/accountability/project", result) %>
diff --git a/decidim-accountability/config/locales/eu.yml b/decidim-accountability/config/locales/eu.yml index 78e3d114589b1..0c407f3fd8238 100644 --- a/decidim-accountability/config/locales/eu.yml +++ b/decidim-accountability/config/locales/eu.yml @@ -137,11 +137,11 @@ eu: create: Egoera sortu title: Beste egoera bat update: - invalid: Arazo bat egon da egoera hau eguneratzean. - success: Egoera zuzen eguneratua. + invalid: Arazoren bat gertatu da egoera hau sortzean. + success: Egoera ondo eguneratu da. timeline_entries: create: - invalid: Arazo bat egon da sarrera hau sortzean. + invalid: Arazoen bat gertatu da sarrera hau sortzean. success: Sarrera zuzen sortua. destroy: success: Sarrera behar bezala ezabatua. diff --git a/decidim-accountability/config/locales/pl.yml b/decidim-accountability/config/locales/pl.yml index 91678b4484fe6..0eaf8f64d3595 100644 --- a/decidim-accountability/config/locales/pl.yml +++ b/decidim-accountability/config/locales/pl.yml @@ -185,6 +185,11 @@ pl: success: Importowanie wyników zakończyło się pomyślnie. Możesz przejrzeć wyniki w panelu administracyjnym. import_projects_mailer: import: + added_projects: + one: Wynik został prawidłowo zaimportowany z projektów. + few: "Wyniki zostały prawidłowo zaimportowane z projektów." + many: "Wyniki zostały prawidłowo zaimportowane z projektów." + other: "%{count} wynik/wyniki/wyników został/zostały/zostało zaimportowanych z projektów." subject: Zaimportowano wyniki success: Pomyślnie zaimportowano projekty do wyników w komponencie %{component_name}. Możesz przejrzeć wyniki w interfejsie administracji. last_activity: diff --git a/decidim-accountability/config/locales/th-TH.yml b/decidim-accountability/config/locales/th-TH.yml index 0e2bdcc0a2b85..f34b6e70826bc 100644 --- a/decidim-accountability/config/locales/th-TH.yml +++ b/decidim-accountability/config/locales/th-TH.yml @@ -139,6 +139,9 @@ th: timeline_entries: create: invalid: เกิดปัญหาในการสร้างรายการนี้ + success: สร้างรายการสําเร็จแล้ว + destroy: + success: ลบรายการเรียบร้อยแล้ว results: home: categories_label: หมวดหมู่ diff --git a/decidim-accountability/spec/shared/manage_results_examples.rb b/decidim-accountability/spec/shared/manage_results_examples.rb index dec97c1a56a7e..230ac46299cc2 100644 --- a/decidim-accountability/spec/shared/manage_results_examples.rb +++ b/decidim-accountability/spec/shared/manage_results_examples.rb @@ -31,6 +31,7 @@ context "when having existing proposals" do let!(:proposal_component) { create(:proposal_component, participatory_space:) } let!(:proposals) { create_list(:proposal, 5, component: proposal_component) } + let(:attributes) { attributes_for(:result, component: current_component) } it "updates a result" do within "tr", text: translated(result.title) do @@ -38,13 +39,7 @@ end within ".edit_result" do - fill_in_i18n( - :result_title, - "#result-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + fill_in_i18n(:result_title, "#result-title-tabs", **attributes[:title].except("machine_translations")) tom_select("#proposals_list", option_id: proposals.first(2).map(&:id)) @@ -54,28 +49,20 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My new title") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated result") + expect(page).to have_content(translated(attributes[:title])) end it "creates a new result", :slow do click_on "New result", match: :first within ".new_result" do - fill_in_i18n( - :result_title, - "#result-title-tabs", - en: "My result", - es: "Mi result", - ca: "El meu result" - ) - fill_in_i18n_editor( - :result_description, - "#result-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:result_title, "#result-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:result_description, "#result-description-tabs", **attributes[:description].except("machine_translations")) tom_select("#proposals_list", option_id: proposals.first(2).map(&:id)) @@ -88,8 +75,12 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My result") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created result") + expect(page).to have_content(attributes[:title]["en"]) end end diff --git a/decidim-accountability/spec/shared/manage_statuses_examples.rb b/decidim-accountability/spec/shared/manage_statuses_examples.rb index 69af2bf4c8bec..9eda4605063fd 100644 --- a/decidim-accountability/spec/shared/manage_statuses_examples.rb +++ b/decidim-accountability/spec/shared/manage_statuses_examples.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true RSpec.shared_examples "manage statuses" do + let(:attributes) { attributes_for(:status) } + it "updates a status" do within "tr", text: status.key do click_on "Edit" @@ -10,9 +12,7 @@ fill_in_i18n( :status_name, "#status-name-tabs", - en: "My new name", - es: "Mi nuevo nombre", - ca: "El meu nou nom" + **attributes[:name].except("machine_translations") ) find("*[type=submit]").click @@ -21,8 +21,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My new name") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:name])} status") end it "creates a new status" do @@ -31,21 +34,8 @@ within ".new_status" do fill_in :status_key, with: "status_key_1" - fill_in_i18n( - :status_name, - "#status-name-tabs", - en: "A longer name", - es: "Nombre más larga", - ca: "Nom més llarga" - ) - - fill_in_i18n( - :status_description, - "#status-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:status_name, "#status-name-tabs", **attributes[:name].except("machine_translations")) + fill_in_i18n(:status_description, "#status-description-tabs", **attributes[:description].except("machine_translations")) fill_in :status_progress, with: 75 @@ -56,8 +46,11 @@ within "table" do expect(page).to have_content("status_key_1") - expect(page).to have_content("A longer name") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:name])} status") end describe "deleting a result" do diff --git a/decidim-accountability/spec/shared/manage_timeline_examples.rb b/decidim-accountability/spec/shared/manage_timeline_examples.rb new file mode 100644 index 0000000000000..6544bf64800d5 --- /dev/null +++ b/decidim-accountability/spec/shared/manage_timeline_examples.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +RSpec.shared_examples "manage timeline" do + let(:attributes) { attributes_for(:timeline_entry, result:) } + + it "updates a timeline entry", versioning: true do + visit current_path + click_on "Edit", match: :first + + within ".edit_timeline_entry" do + fill_in :timeline_entry_entry_date_date, with: Date.current.strftime("%d/%m/%Y") + fill_in_i18n(:timeline_entry_title, "#timeline_entry-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:timeline_entry_description, "#timeline_entry-description-tabs", **attributes[:description].except("machine_translations")) + + find("*[type=submit]").click + end + + expect(page).to have_admin_callout("successfully") + + within "table" do + expect(page).to have_content(translated(attributes[:title])) + end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} timeline entry") + end + + it "creates a timeline entry", versioning: true do + click_on "New timeline entry", match: :first + + within ".new_timeline_entry" do + fill_in :timeline_entry_entry_date_date, with: Date.current.strftime("%d/%m/%Y") + fill_in_i18n(:timeline_entry_title, "#timeline_entry-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:timeline_entry_description, "#timeline_entry-description-tabs", **attributes[:description].except("machine_translations")) + + find("*[type=submit]").click + end + + expect(page).to have_admin_callout("successfully") + + within "table" do + expect(page).to have_content(translated(attributes[:title])) + end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} timeline entry") + end +end diff --git a/decidim-accountability/spec/system/admin/admin_manages_accountability_spec.rb b/decidim-accountability/spec/system/admin/admin_manages_accountability_spec.rb index 347e554c4ed47..1d3a820e598dc 100644 --- a/decidim-accountability/spec/system/admin/admin_manages_accountability_spec.rb +++ b/decidim-accountability/spec/system/admin/admin_manages_accountability_spec.rb @@ -35,4 +35,17 @@ it_behaves_like "manage statuses" end + + describe "timeline" do + before do + visit_component_admin + within "tr", text: translated(result.title) do + click_on "Project evolution" + end + end + + let!(:timeline_entry) { create(:timeline_entry, result:) } + + it_behaves_like "manage timeline" + end end diff --git a/decidim-accountability/spec/system/comments_spec.rb b/decidim-accountability/spec/system/comments_spec.rb index ffab4d87c4f8a..e84d43a86accf 100644 --- a/decidim-accountability/spec/system/comments_spec.rb +++ b/decidim-accountability/spec/system/comments_spec.rb @@ -9,4 +9,11 @@ let(:resource_path) { resource_locator(commentable).path } include_examples "comments" + + context "with comments blocked" do + let!(:component) { create(:component, manifest_name: :accountability, participatory_space:, organization:) } + let(:participatory_space) { create(:participatory_process, :with_steps, organization:) } + + include_examples "comments blocked" + end end diff --git a/decidim-admin/app/commands/decidim/admin/create_attachment.rb b/decidim-admin/app/commands/decidim/admin/create_attachment.rb index cf26df4de6ce6..42aa200d5d942 100644 --- a/decidim-admin/app/commands/decidim/admin/create_attachment.rb +++ b/decidim-admin/app/commands/decidim/admin/create_attachment.rb @@ -5,14 +5,14 @@ module Admin # A command with all the business logic to add an attachment to a # participatory process. class CreateAttachment < Decidim::Command + delegate :current_user, to: :form # Public: Initializes the command. # # form - A form object with the params. # attached_to - The ActiveRecord::Base that will hold the attachment - def initialize(form, attached_to, user) + def initialize(form, attached_to) @form = form @attached_to = attached_to - @user = user end # Executes the command. Broadcasts these events: @@ -27,7 +27,7 @@ def call build_attachment if @attachment.valid? - Decidim.traceability.perform_action!(:create, Decidim::Attachment, @user) do + Decidim.traceability.perform_action!(:create, Decidim::Attachment, current_user) do @attachment.save! notify_followers broadcast(:ok) @@ -51,7 +51,8 @@ def build_attachment weight: form.weight, attachment_collection: form.attachment_collection, file: form.file, # Define attached_to before this - content_type: blob(form.file).content_type + content_type: form.file && blob(form.file).content_type, + link: form.file ? nil : form.link ) end diff --git a/decidim-admin/app/commands/decidim/admin/create_attachment_collection.rb b/decidim-admin/app/commands/decidim/admin/create_attachment_collection.rb index 06d4e89b67ef4..bdd3f4302a40b 100644 --- a/decidim-admin/app/commands/decidim/admin/create_attachment_collection.rb +++ b/decidim-admin/app/commands/decidim/admin/create_attachment_collection.rb @@ -5,14 +5,14 @@ module Admin # A command with all the business logic to add an attachment collection # to a participatory space. class CreateAttachmentCollection < Decidim::Command + delegate :current_user, to: :form # Public: Initializes the command. # # form - A form object with the params. # collection_for - The ActiveRecord::Base that will hold the collection - def initialize(form, collection_for, user) + def initialize(form, collection_for) @form = form @collection_for = collection_for - @user = user end # Executes the command. Broadcasts these events: @@ -35,7 +35,7 @@ def call def create_attachment_collection Decidim.traceability.create!( AttachmentCollection, - @user, + current_user, attributes ) end diff --git a/decidim-admin/app/commands/decidim/admin/create_participatory_space_private_user.rb b/decidim-admin/app/commands/decidim/admin/create_participatory_space_private_user.rb index fa190abc20291..1e4b5803974c6 100644 --- a/decidim-admin/app/commands/decidim/admin/create_participatory_space_private_user.rb +++ b/decidim-admin/app/commands/decidim/admin/create_participatory_space_private_user.rb @@ -5,14 +5,14 @@ module Admin # A command with all the business logic when creating a new participatory space # private user in the system. class CreateParticipatorySpacePrivateUser < Decidim::Command + delegate :current_user, to: :form # Public: Initializes the command. # # form - A form object with the params. # private_user_to - The private_user_to that will hold the # user role - def initialize(form, current_user, private_user_to, via_csv: false) + def initialize(form, private_user_to, via_csv: false) @form = form - @current_user = current_user @private_user_to = private_user_to @via_csv = via_csv end @@ -39,7 +39,7 @@ def call private - attr_reader :form, :private_user_to, :current_user, :user + attr_reader :form, :private_user_to, :user def create_private_user action = @via_csv ? "create_via_csv" : "create" diff --git a/decidim-admin/app/commands/decidim/admin/deliver_newsletter.rb b/decidim-admin/app/commands/decidim/admin/deliver_newsletter.rb index 04530b9983803..ff57037de8383 100644 --- a/decidim-admin/app/commands/decidim/admin/deliver_newsletter.rb +++ b/decidim-admin/app/commands/decidim/admin/deliver_newsletter.rb @@ -4,19 +4,18 @@ module Decidim module Admin # Delivers the newsletter to its recipients. class DeliverNewsletter < Decidim::Command + delegate :current_user, to: :form # Initializes the command. # # newsletter - The newsletter to deliver. # form - A form object with the params. - # user - the Decidim::User that delivers the newsletter - def initialize(newsletter, form, user) + def initialize(newsletter, form) @newsletter = newsletter @form = form - @user = user end def call - return broadcast(:invalid) if @form.send_to_all_users && !@user.admin? + return broadcast(:invalid) if @form.send_to_all_users && !current_user.admin? return broadcast(:invalid) unless @form.valid? return broadcast(:invalid) if @newsletter.sent? return broadcast(:no_recipients) if recipients.blank? @@ -36,7 +35,7 @@ def send_newsletter! Decidim.traceability.perform_action!( "deliver", @newsletter, - @user + current_user ) do NewsletterJob.perform_later(@newsletter, @form.as_json, recipients.map(&:id)) end diff --git a/decidim-admin/app/commands/decidim/admin/participatory_space/create_admin.rb b/decidim-admin/app/commands/decidim/admin/participatory_space/create_admin.rb index 2a1d68bfcf164..460f41508378f 100644 --- a/decidim-admin/app/commands/decidim/admin/participatory_space/create_admin.rb +++ b/decidim-admin/app/commands/decidim/admin/participatory_space/create_admin.rb @@ -4,6 +4,7 @@ module Decidim module Admin module ParticipatorySpace class CreateAdmin < Decidim::Command + delegate :current_user, to: :form # Public: Initializes the command. # # form - A form object with the params. @@ -11,7 +12,6 @@ class CreateAdmin < Decidim::Command # user role def initialize(form, participatory_space, options = {}) @form = form - @current_user = form.current_user @participatory_space = participatory_space @event_class = options.delete(:event_class) @event = options.delete(:event) @@ -41,7 +41,7 @@ def call private - attr_reader :form, :participatory_space, :current_user, :user + attr_reader :form, :participatory_space, :user def event_class = @event_class || (raise NotImplementedError, "You must define an event_class") diff --git a/decidim-admin/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb b/decidim-admin/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb index 06244ca5a038b..3f49c5f14924d 100644 --- a/decidim-admin/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +++ b/decidim-admin/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb @@ -7,14 +7,13 @@ module Admin class ProcessParticipatorySpacePrivateUserImportCsv < Decidim::Command include Decidim::Admin::CustomImport + delegate :current_user, to: :form # Public: Initializes the command. # # form - the form object containing the uploaded file - # current_user - the user performing the action # private_users_to - The private_users_to that will hold the user role - def initialize(form, current_user, private_users_to) + def initialize(form, private_users_to) @form = form - @current_user = current_user @private_users_to = private_users_to end @@ -33,9 +32,11 @@ def call private + attr_reader :form + def process_csv process_import_file(@form.file) do |(email, user_name)| - ImportParticipatorySpacePrivateUserCsvJob.perform_later(email, user_name, @private_users_to, @current_user) if email.present? && user_name.present? + ImportParticipatorySpacePrivateUserCsvJob.perform_later(email, user_name, @private_users_to, current_user) if email.present? && user_name.present? end end end diff --git a/decidim-admin/app/commands/decidim/admin/promote_managed_user.rb b/decidim-admin/app/commands/decidim/admin/promote_managed_user.rb index 88e7c30b4d5eb..e50f0477cc957 100644 --- a/decidim-admin/app/commands/decidim/admin/promote_managed_user.rb +++ b/decidim-admin/app/commands/decidim/admin/promote_managed_user.rb @@ -8,15 +8,14 @@ module Admin # will be invited to the application and will lose the managed flag # so the user cannot be impersonated anymore. class PromoteManagedUser < Decidim::Command + delegate :current_user, to: :form # Public: Initializes the command. # # form - A form object with the params. # user - The user to promote - # promoted_by - The user performing the operation - def initialize(form, user, promoted_by) + def initialize(form, user) @form = form @user = user - @promoted_by = promoted_by end # Executes the command. Broadcasts these events: @@ -35,7 +34,7 @@ def call broadcast(:ok) end - attr_reader :form, :user, :promoted_by + attr_reader :form, :user private @@ -46,7 +45,7 @@ def promote_user end def invite_user - user.invite!(promoted_by) + user.invite!(current_user) end def email_already_exists? diff --git a/decidim-admin/app/commands/decidim/admin/update_attachment.rb b/decidim-admin/app/commands/decidim/admin/update_attachment.rb index bcd4c36f733d3..26e8f0f9f1a0f 100644 --- a/decidim-admin/app/commands/decidim/admin/update_attachment.rb +++ b/decidim-admin/app/commands/decidim/admin/update_attachment.rb @@ -9,14 +9,14 @@ class UpdateAttachment < Decidim::Command attr_reader :attachment + delegate :current_user, to: :form # Public: Initializes the command. # # attachment - the Attachment to update # form - A form object with the params. - def initialize(attachment, form, user) + def initialize(attachment, form) @attachment = attachment @form = form - @user = user end # Executes the command. Broadcasts these events: @@ -37,20 +37,23 @@ def call attr_reader :form def update_attachment - Decidim.traceability.update!(@attachment, @user, attributes) + Decidim.traceability.update!(@attachment, current_user, attributes) end def attributes { title: form.title, file: form.file, + link: form.link, description: form.description, - weight: form.weight, - attachment_collection: form.attachment_collection + weight: form.weight }.merge( attachment_attributes(:file) - ).reject do |attribute, value| - value.blank? && attribute != :attachment_collection + ).compact_blank.merge( + attachment_collection: form.attachment_collection + ).tap do |attrs| + attrs[:file] = nil if form.link.present? && form.file.blank? + attrs[:link] = nil if form.file.present? && form.link.blank? end end end diff --git a/decidim-admin/app/commands/decidim/admin/update_attachment_collection.rb b/decidim-admin/app/commands/decidim/admin/update_attachment_collection.rb index aa9e40426c2d2..dd4a9384a3edc 100644 --- a/decidim-admin/app/commands/decidim/admin/update_attachment_collection.rb +++ b/decidim-admin/app/commands/decidim/admin/update_attachment_collection.rb @@ -4,14 +4,14 @@ module Decidim module Admin # A command with all the business logic when updating an attachment collection. class UpdateAttachmentCollection < Decidim::Command + delegate :current_user, to: :form # Public: Initializes the command. # # attachment_collection - The AttachmentCollection to update # form - A form object with the params. - def initialize(attachment_collection, form, user) + def initialize(attachment_collection, form) @attachment_collection = attachment_collection @form = form - @user = user end # Executes the command. Broadcasts these events: @@ -34,7 +34,7 @@ def call def update_attachment_collection Decidim.traceability.update!( @attachment_collection, - @user, + current_user, attributes ) end diff --git a/decidim-admin/app/commands/decidim/admin/update_component_permissions.rb b/decidim-admin/app/commands/decidim/admin/update_component_permissions.rb index bcdc4eba4dae2..54f99ea9f2c16 100644 --- a/decidim-admin/app/commands/decidim/admin/update_component_permissions.rb +++ b/decidim-admin/app/commands/decidim/admin/update_component_permissions.rb @@ -5,16 +5,16 @@ module Admin # This command gets called when permissions for a component are updated # in the admin panel. class UpdateComponentPermissions < Decidim::Command + delegate :current_user, to: :form # Public: Initializes the command. # # form - The form from which the data in this component comes from. # component - The component to update. # resource - The resource to update. - def initialize(form, component, resource, user) + def initialize(form, component, resource) @form = form @component = component @resource = resource - @user = user end # Public: Sets the permissions for a component. @@ -23,7 +23,7 @@ def initialize(form, component, resource, user) def call return broadcast(:invalid) unless form.valid? - Decidim.traceability.perform_action!("update_permissions", @component, @user) do + Decidim.traceability.perform_action!("update_permissions", @component, current_user) do transaction do update_permissions run_hooks diff --git a/decidim-admin/app/commands/decidim/admin/update_external_domain_allowlist.rb b/decidim-admin/app/commands/decidim/admin/update_external_domain_allowlist.rb index 52088c4fd8f05..f5375f9535980 100644 --- a/decidim-admin/app/commands/decidim/admin/update_external_domain_allowlist.rb +++ b/decidim-admin/app/commands/decidim/admin/update_external_domain_allowlist.rb @@ -5,16 +5,17 @@ module Admin class UpdateExternalDomainAllowlist < Decidim::Command attr_reader :form, :organization - def initialize(form, organization, user) + delegate :current_user, to: :form + + def initialize(form, organization) @form = form @organization = organization - @user = user end def call return broadcast(:invalid) if form.invalid? - Decidim.traceability.perform_action!("update_external_domain", @organization, @user) do + Decidim.traceability.perform_action!("update_external_domain", @organization, current_user) do save_domains! end diff --git a/decidim-admin/app/commands/decidim/admin/update_help_sections.rb b/decidim-admin/app/commands/decidim/admin/update_help_sections.rb index 3aafc5f232cd7..05aea2af7c641 100644 --- a/decidim-admin/app/commands/decidim/admin/update_help_sections.rb +++ b/decidim-admin/app/commands/decidim/admin/update_help_sections.rb @@ -5,10 +5,11 @@ module Admin # This command gets called when a content block is updated from the admin # panel. class UpdateHelpSections < Decidim::Command - def initialize(form, organization, user) + delegate :current_user, to: :form + + def initialize(form, organization) @form = form @organization = organization - @user = user end def call @@ -18,7 +19,7 @@ def call @form.sections.each do |section| next unless content_has_changed?(section) - Decidim.traceability.perform_action!("update", ContextualHelpSection, @user, { "resource" => { "title" => section.id.humanize } }) do + Decidim.traceability.perform_action!("update", ContextualHelpSection, current_user, { "resource" => { "title" => section.id.humanize } }) do ContextualHelpSection.set_content(@organization, section.id, section.content) ContextualHelpSection.find_by(organization: @organization, section_id: section.id) end @@ -30,6 +31,8 @@ def call private + attr_reader :form + def content_has_changed?(section) return if ContextualHelpSection.find_by(organization: @organization, section_id: section.id).nil? && section.content.compact_blank.blank? diff --git a/decidim-admin/app/commands/decidim/admin/update_newsletter.rb b/decidim-admin/app/commands/decidim/admin/update_newsletter.rb index 9fd9c244bb7ff..d9c8bd4705826 100644 --- a/decidim-admin/app/commands/decidim/admin/update_newsletter.rb +++ b/decidim-admin/app/commands/decidim/admin/update_newsletter.rb @@ -4,17 +4,16 @@ module Decidim module Admin # Updates the newsletter given form data. class UpdateNewsletter < Decidim::Command + delegate :current_user, to: :form # Initializes the command. # # newsletter - The Newsletter to update. # form - The form object containing the data to update. - # user - The user that updates the newsletter. - def initialize(newsletter, form, user) + def initialize(newsletter, form) @newsletter = newsletter @content_block = newsletter.template @form = form - @user = user - @organization = user.organization + @organization = form.current_organization end def call @@ -32,19 +31,20 @@ def call private - attr_reader :user, :newsletter, :content_block, :organization, :form + attr_reader :newsletter, :content_block, :organization, :form def update_newsletter + # pp current_user.inspect @newsletter = Decidim.traceability.update!( newsletter, - user, + current_user, subject: form.subject, - author: user + author: current_user ) end def update_content_block - ContentBlocks::UpdateContentBlock.call(form, content_block, user) do + ContentBlocks::UpdateContentBlock.call(form, content_block, current_user) do on(:ok) do |content_block| @content_block = content_block end diff --git a/decidim-admin/app/controllers/concerns/decidim/admin/filterable.rb b/decidim-admin/app/controllers/concerns/decidim/admin/filterable.rb index 9471b35ce0646..e04c659b8573d 100644 --- a/decidim-admin/app/controllers/concerns/decidim/admin/filterable.rb +++ b/decidim-admin/app/controllers/concerns/decidim/admin/filterable.rb @@ -20,12 +20,15 @@ module Filterable :filters, :filters_with_values, :find_dynamic_translation, + :filter_prefix_key, :query, :query_params, :query_params_with, :query_params_without, + :blank_query_params, :ransack_params, - :search_field_predicate + :search_field_predicate, + :adjacent_items delegate :categories, to: :current_component delegate :scopes, to: :current_organization @@ -36,10 +39,70 @@ def query private + def check_admin_session_filters + if (current_filters = ransack_params).present? + admin_session_filters = session["admin_filters"] || {} + return if admin_session_filters[filter_prefix_key] == current_filters + + current_filters = {} if current_filters[:reset_filters] == "true" + + admin_session_filters[filter_prefix_key] = current_filters + session["admin_filters"] = admin_session_filters + + redirect_to url_for(query_params.merge(q: {})) if current_filters.blank? + else + @session_filter_params = {} unless session_filter_params.is_a?(Hash) + redirect_to url_for(query_params_with(session_filter_params)) if session_filter_params.present? + end + end + def filtered_collection paginate(query.result) end + def session_filtered_collection + @session_filtered_collection ||= begin + query = base_query.ransack(session_filter_params, search_context: :admin, auth_object: current_user).result + # The limit reorders as pagination does + query.limit(query.count) + end + end + + # This method takes the query used by filter and selects the id of + # each item of the filtered collection (this extra select id avoids + # some errors where the SQL of the filtered collection query uses + # aliases and the id is not available in the result) and uses the lag + # and lead window functions which returns the previous and next ids in + # the query + def adjacent_items(item) + query = + <<-SQL.squish + WITH + collection AS (#{session_filtered_collection.select(:id).to_sql}), + successors AS ( + SELECT + id, + Lag(id, 1) OVER () prev_item, + Lead(id, 1) OVER () next_item + FROM + collection + ) + SELECT + prev_item, + next_item + FROM + successors + WHERE + successors.id = #{item.id} + SQL + + (ActiveRecord::Base.connection.exec_query(query).first || {}).compact_blank.transform_values { |id| collection.find_by(id:) } + end + + def filter_prefix_key + @filter_prefix_key ||= controller_name.to_sym + end + def base_query raise NotImplementedError, "A base query is needed to filter admin resources" end @@ -63,6 +126,10 @@ def ransack_params query_params[:q] || {} end + def session_filter_params + @session_filter_params ||= (session["admin_filters"] || {}).with_indifferent_access.fetch(filter_prefix_key, {}) + end + # For injecting ransack params while keeping query params in links. def query_params_with(hash) query_params.merge(q: ransack_params.merge(hash)) @@ -70,7 +137,15 @@ def query_params_with(hash) # For rejecting ransack params while keeping query params in links. def query_params_without(*) - query_params.merge(q: ransack_params.except(*)) + q = ransack_params.except(*) + + return blank_query_params if q.blank? + + query_params.merge(q:) + end + + def blank_query_params + query_params.merge(q: { reset_filters: true }) end # Ransack predicate to use in the search_form_for. diff --git a/decidim-admin/app/controllers/decidim/admin/authorization_workflows_controller.rb b/decidim-admin/app/controllers/decidim/admin/authorization_workflows_controller.rb index bb1d03eb7a826..c9da8cd0cc3e5 100644 --- a/decidim-admin/app/controllers/decidim/admin/authorization_workflows_controller.rb +++ b/decidim-admin/app/controllers/decidim/admin/authorization_workflows_controller.rb @@ -10,7 +10,9 @@ class AuthorizationWorkflowsController < Decidim::Admin::ApplicationController def index enforce_permission_to :index, :authorization_workflow - @workflows = Decidim::Verifications.admin_workflows + @workflows = Decidim::Verifications.workflows.select do |manifest| + current_organization.available_authorizations.include?(manifest.name.to_s) + end # Decidim::Verifications::Authorizations Query @authorizations = Decidim::Verifications::Authorizations.new( diff --git a/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb b/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb index 675786f55fc54..5f19729c4076c 100644 --- a/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb +++ b/decidim-admin/app/controllers/decidim/admin/component_permissions_controller.rb @@ -20,7 +20,7 @@ def update enforce_permission_to(:update, :component, component:) @permissions_form = PermissionsForm.from_params(params) - UpdateComponentPermissions.call(@permissions_form, component, resource, current_user) do + UpdateComponentPermissions.call(@permissions_form, component, resource) do on(:ok) do flash[:notice] = t("component_permissions.update.success", scope: "decidim.admin") redirect_to return_path diff --git a/decidim-admin/app/controllers/decidim/admin/concerns/has_attachment_collections.rb b/decidim-admin/app/controllers/decidim/admin/concerns/has_attachment_collections.rb index 4963f36b30a7e..5ba14a3395ab2 100644 --- a/decidim-admin/app/controllers/decidim/admin/concerns/has_attachment_collections.rb +++ b/decidim-admin/app/controllers/decidim/admin/concerns/has_attachment_collections.rb @@ -31,7 +31,7 @@ def create enforce_permission_to :create, :attachment_collection @form = form(AttachmentCollectionForm).from_params(params, collection_for:) - CreateAttachmentCollection.call(@form, collection_for, current_user) do + CreateAttachmentCollection.call(@form, collection_for) do on(:ok) do flash[:notice] = I18n.t("attachment_collections.create.success", scope: "decidim.admin") redirect_to action: :index @@ -56,7 +56,7 @@ def update enforce_permission_to :update, :attachment_collection, attachment_collection: @attachment_collection @form = form(AttachmentCollectionForm).from_params(params, collection_for:) - UpdateAttachmentCollection.call(@attachment_collection, @form, current_user) do + UpdateAttachmentCollection.call(@attachment_collection, @form) do on(:ok) do flash[:notice] = I18n.t("attachment_collections.update.success", scope: "decidim.admin") redirect_to action: :index diff --git a/decidim-admin/app/controllers/decidim/admin/concerns/has_attachments.rb b/decidim-admin/app/controllers/decidim/admin/concerns/has_attachments.rb index 29dc1a4660401..9e58fc89270fe 100644 --- a/decidim-admin/app/controllers/decidim/admin/concerns/has_attachments.rb +++ b/decidim-admin/app/controllers/decidim/admin/concerns/has_attachments.rb @@ -31,7 +31,7 @@ def create enforce_permission_to(:create, :attachment, attached_to:) @form = form(::Decidim::Admin::AttachmentForm).from_params(params, attached_to:) - CreateAttachment.call(@form, attached_to, current_user) do + CreateAttachment.call(@form, attached_to) do on(:ok) do flash[:notice] = I18n.t("attachments.create.success", scope: "decidim.admin") redirect_to action: :index @@ -56,7 +56,7 @@ def update enforce_permission_to(:update, :attachment, attachment:) @form = form(::Decidim::Admin::AttachmentForm).from_params(attachment_params, attached_to:) - UpdateAttachment.call(@attachment, @form, current_user) do + UpdateAttachment.call(@attachment, @form) do on(:ok) do flash[:notice] = I18n.t("attachments.update.success", scope: "decidim.admin") redirect_to action: :index diff --git a/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users.rb b/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users.rb index e94e90d3865ee..3513509ec4dd4 100644 --- a/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users.rb +++ b/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users.rb @@ -33,7 +33,7 @@ def create enforce_permission_to :create, :space_private_user @form = form(ParticipatorySpacePrivateUserForm).from_params(params, privatable_to:) - CreateParticipatorySpacePrivateUser.call(@form, current_user, current_participatory_space) do + CreateParticipatorySpacePrivateUser.call(@form, current_participatory_space) do on(:ok) do flash[:notice] = I18n.t("participatory_space_private_users.create.success", scope: "decidim.admin") redirect_to action: :index diff --git a/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb b/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb index 9cfc6e72cfcde..834377cdd0821 100644 --- a/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +++ b/decidim-admin/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb @@ -26,7 +26,7 @@ def create enforce_permission_to :csv_import, :space_private_user @form = form(ParticipatorySpacePrivateUserCsvImportForm).from_params(params, privatable_to:) - ProcessParticipatorySpacePrivateUserImportCsv.call(@form, current_user, current_participatory_space) do + ProcessParticipatorySpacePrivateUserImportCsv.call(@form, current_participatory_space) do on(:ok) do flash[:notice] = I18n.t("participatory_space_private_users_csv_imports.create.success", scope: "decidim.admin") redirect_to after_import_path diff --git a/decidim-admin/app/forms/decidim/admin/attachment_form.rb b/decidim-admin/app/forms/decidim/admin/attachment_form.rb index c590dbb91b49b..1a786a02af240 100644 --- a/decidim-admin/app/forms/decidim/admin/attachment_form.rb +++ b/decidim-admin/app/forms/decidim/admin/attachment_form.rb @@ -12,10 +12,12 @@ class AttachmentForm < Form translatable_attribute :description, String attribute :weight, Integer, default: 0 attribute :attachment_collection_id, Integer + attribute :link, String mimic :attachment - validates :file, presence: true, unless: :persisted? + validates :file, presence: true, unless: :persisted_or_link? + validates :link, url: true validates :file, passthru: { to: Decidim::Attachment } validates :title, :description, translatable_presence: true validates :attachment_collection, presence: true, if: ->(form) { form.attachment_collection_id.present? } @@ -25,6 +27,10 @@ class AttachmentForm < Form alias organization current_organization + def persisted_or_link? + persisted? || link.present? + end + def attachment_collections @attachment_collections ||= attached_to.attachment_collections end diff --git a/decidim-admin/app/helpers/decidim/admin/filterable_helper.rb b/decidim-admin/app/helpers/decidim/admin/filterable_helper.rb index a01809821f7a6..4221d813d95b0 100644 --- a/decidim-admin/app/helpers/decidim/admin/filterable_helper.rb +++ b/decidim-admin/app/helpers/decidim/admin/filterable_helper.rb @@ -98,9 +98,14 @@ def applied_filters_hidden_field_tags end def applied_filters_tags(i18n_ctx) - ransack_params.slice(*filters).map do |filter, value| + tags = ransack_params.slice(*filters).map do |filter, value| applied_filter_tag(filter, value, filterable_i18n_scope_from_ctx(i18n_ctx)) - end.join.html_safe + end + return if tags.blank? + + tags << remove_all_filters_tag if tags.count > 1 + + tags.join.html_safe end def applied_filter_tag(filter, value, i18n_scope) @@ -111,6 +116,13 @@ def applied_filter_tag(filter, value, i18n_scope) end end + def remove_all_filters_tag + link_to(url_for(blank_query_params), class: "label bg-transparent") do + concat t("decidim.admin.filters.remove_all") + concat icon("delete-bin-line", aria_label: t("decidim.admin.filters.remove_all"), role: "img") + end + end + def remove_filter_icon_link(filter) icon_link_to( "delete-bin-line", @@ -125,6 +137,10 @@ def filterable_i18n_scope_from_ctx(i18n_ctx) i18n_scope += ".#{i18n_ctx}" if i18n_ctx i18n_scope end + + def filtered_adjacent_paths(item, path_method) + adjacent_items(item).transform_values(&method(path_method)) + end end end end diff --git a/decidim-admin/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb b/decidim-admin/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb index a26273396bb58..adaeabfc294c8 100644 --- a/decidim-admin/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +++ b/decidim-admin/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb @@ -20,7 +20,7 @@ def perform(email, user_name, privatable_to, current_user) current_participatory_space: privatable_to ) - Decidim::Admin::CreateParticipatorySpacePrivateUser.call(private_user_form, current_user, privatable_to, via_csv: true) + Decidim::Admin::CreateParticipatorySpacePrivateUser.call(private_user_form, privatable_to, via_csv: true) end end end diff --git a/decidim-admin/app/packs/src/decidim/admin/css_preview.js b/decidim-admin/app/packs/src/decidim/admin/css_preview.js index 350c8369aea89..fbf6cebfef2a2 100644 --- a/decidim-admin/app/packs/src/decidim/admin/css_preview.js +++ b/decidim-admin/app/packs/src/decidim/admin/css_preview.js @@ -30,7 +30,9 @@ window.addEventListener("DOMContentLoaded", () => { updateRules.forEach((rule) => { const [target, property, value] = rule.split(":"); - document.querySelector(target).style[property.trim()] = value.trim(); + if (target !== "") { + document.querySelector(target).style[property.trim()] = value.trim(); + } }); }) }) diff --git a/decidim-admin/app/packs/stylesheets/decidim/admin/_cards.scss b/decidim-admin/app/packs/stylesheets/decidim/admin/_cards.scss index 16066695ae4f0..eab273bf743dd 100644 --- a/decidim-admin/app/packs/stylesheets/decidim/admin/_cards.scss +++ b/decidim-admin/app/packs/stylesheets/decidim/admin/_cards.scss @@ -107,7 +107,7 @@ } .fcell .label { - @apply p-2 mb-2; + @apply p-2; } .card-section-draggable-list { diff --git a/decidim-admin/app/packs/stylesheets/decidim/admin/_item_show.scss b/decidim-admin/app/packs/stylesheets/decidim/admin/_item_show.scss index acbb6799dab7c..16f5c680342b7 100644 --- a/decidim-admin/app/packs/stylesheets/decidim/admin/_item_show.scss +++ b/decidim-admin/app/packs/stylesheets/decidim/admin/_item_show.scss @@ -16,6 +16,14 @@ @apply font-normal; } } + + &--with-action-options { + @apply flex-row flex-wrap; + } + + &__action-options { + @apply flex bg-background p-8 w-full mt-4 w-full; + } } .item_show__content { diff --git a/decidim-admin/app/views/decidim/admin/attachments/_form.html.erb b/decidim-admin/app/views/decidim/admin/attachments/_form.html.erb index 6c276e7b338c9..8d6fb8eca8df8 100644 --- a/decidim-admin/app/views/decidim/admin/attachments/_form.html.erb +++ b/decidim-admin/app/views/decidim/admin/attachments/_form.html.erb @@ -17,8 +17,27 @@ <%= form.select :attachment_collection_id, @form.attachment_collections.map { |c| [translated_attribute(c.name), c.id] }, include_blank: true %> -
- <%= form.upload :file, button_class: "button button__sm button__transparent-secondary" %> +
+ <%= cell "decidim/tab_panels", [ + { + enabled: true, + id: "file", + text: "Upload file", + icon: "file-upload-line", + method: :cell, + selected: form.object.file.present?, + args: ["/decidim/attachments_file_tab", form] + }, + { + enabled: true, + id: "link", + text: "Link", + icon: "link", + method: :cell, + selected: form.object.link.present?, + args: ["/decidim/attachments_link_tab", form] + } + ] %>
diff --git a/decidim-admin/app/views/decidim/admin/attachments/index.html.erb b/decidim-admin/app/views/decidim/admin/attachments/index.html.erb index fe9ae4896b8c0..5d8e77c70a676 100644 --- a/decidim-admin/app/views/decidim/admin/attachments/index.html.erb +++ b/decidim-admin/app/views/decidim/admin/attachments/index.html.erb @@ -34,7 +34,7 @@ <%= attachment.file_type %> - <%= number_to_human_size(attachment.file_size) %> + <%= attachment.file? ? number_to_human_size(attachment.file_size) : "-" %> <% if allowed_to? :update, :attachment, attachment: attachment %> diff --git a/decidim-admin/app/views/decidim/admin/authorization_workflows/index.html.erb b/decidim-admin/app/views/decidim/admin/authorization_workflows/index.html.erb index d12a32a6c411c..e1ec2474f0e12 100644 --- a/decidim-admin/app/views/decidim/admin/authorization_workflows/index.html.erb +++ b/decidim-admin/app/views/decidim/admin/authorization_workflows/index.html.erb @@ -18,20 +18,38 @@ <%= t("decidim.authorization_handlers.name") %> - <%= t("decidim.authorization_handlers.help") %> + <%= t("decidim.authorization_handlers.help") %> <% @workflows.each do |manifest| %> <% workflow = Decidim::Verifications::Adapter.new(manifest) %> - <%= link_to workflow.fullname, workflow.admin_root_path %> - + <% if workflow.has_admin_root_path? %> + <%= link_to workflow.fullname, workflow.admin_root_path %> + <% else %> + <%= workflow.fullname %> + <% end %> + + + <% i18n_key = "decidim.authorization_handlers.admin.#{workflow.key}.help" %> + <% if I18n.exists?(i18n_key, current_locale) %> + + <% else %> +
+ +
+ <% end %> <% end %> diff --git a/decidim-admin/app/views/decidim/admin/shared/_adjacent_navigation.html.erb b/decidim-admin/app/views/decidim/admin/shared/_adjacent_navigation.html.erb new file mode 100644 index 0000000000000..d915726e56112 --- /dev/null +++ b/decidim-admin/app/views/decidim/admin/shared/_adjacent_navigation.html.erb @@ -0,0 +1,30 @@ +<% adjacent_paths ||= {} %> +
+ + <% if adjacent_paths["prev_item"].present? %> + <%= link_to( + adjacent_paths["prev_item"], + class: "button button__sm button__text-secondary", + title: t("previous_title", scope: "decidim.admin.shared.adjacent_navigation"), + rel: "prev" + ) do %> + <%= icon "arrow-left-s-line", class: "fill-current" %> + <%= t("previous", scope: "decidim.admin.shared.adjacent_navigation") %> + <% end %> + <% end %> + + + + <% if adjacent_paths["next_item"].present? %> + <%= link_to( + adjacent_paths["next_item"], + class: "button button__sm button__text-secondary", + title: t("next_title", scope: "decidim.admin.shared.adjacent_navigation"), + rel: "next" + ) do %> + <%= t("next", scope: "decidim.admin.shared.adjacent_navigation") %> + <%= icon "arrow-right-s-line", class: "fill-current" %> + <% end %> + <% end %> + +
diff --git a/decidim-admin/app/views/decidim/admin/shared/_filters.html.erb b/decidim-admin/app/views/decidim/admin/shared/_filters.html.erb index 1767e85dc6ddb..37517f09f19d2 100644 --- a/decidim-admin/app/views/decidim/admin/shared/_filters.html.erb +++ b/decidim-admin/app/views/decidim/admin/shared/_filters.html.erb @@ -31,6 +31,6 @@ <% end %> -
+
<%= applied_filters_tags(i18n_ctx) %>
diff --git a/decidim-admin/config/locales/bg.yml b/decidim-admin/config/locales/bg.yml index 05f9221e6e813..ffb702cc79c86 100644 --- a/decidim-admin/config/locales/bg.yml +++ b/decidim-admin/config/locales/bg.yml @@ -2,7 +2,7 @@ bg: activemodel: attributes: area: - area_type: Тип район + area_type: Тип област name: Име organization: Организация area_type: @@ -570,6 +570,7 @@ bg: appearance: Външен вид area_types: Типове области areas: Области + components: Компоненти configuration: Конфигурация content: Докладвано съдържание external_domain_allowlist: Лист с позволени външни домейни diff --git a/decidim-admin/config/locales/ca.yml b/decidim-admin/config/locales/ca.yml index 11474e0ec6658..beaf268a201a8 100644 --- a/decidim-admin/config/locales/ca.yml +++ b/decidim-admin/config/locales/ca.yml @@ -450,6 +450,7 @@ ca: values: 'false': Publicat 'true': Despublicat + remove_all: Eliminar tots scope_id_eq: label: Àmbit search_label: Cercar @@ -570,6 +571,7 @@ ca: appearance: Aparença area_types: Tipus d'àrees areas: Àrees + components: Components configuration: Configuració content: Contingut reportat external_domain_allowlist: Dominis externs permesos @@ -963,6 +965,11 @@ ca: help: Aquests tokens s'utilitzen per a compartir públicament aquest recurs no publicat a qualsevol usuari. S'ocultaran quan es publiqui el recurs. Fes clic en la icona de compartir el token per a visitar la URL compartible. title: Compartir tokens shared: + adjacent_navigation: + next: Següent + next_title: Següent element + previous: Anterior + previous_title: Element anterior gallery: add_images: Afegir imatges edit_images: Editar imatges diff --git a/decidim-admin/config/locales/de.yml b/decidim-admin/config/locales/de.yml index 36e7596cea0a4..3c4fb6e9db92c 100644 --- a/decidim-admin/config/locales/de.yml +++ b/decidim-admin/config/locales/de.yml @@ -219,7 +219,7 @@ de: error: Beim Erstellen eines neuen Bereichstyps ist ein Fehler aufgetreten. success: Bereichstyp wurde erfolgreich erstellt. destroy: - success: Der Bereichstyp wurde erfolgreich zerstört. + success: Der Bereichstyp wurde erfolgreich gelöscht. edit: title: Bereichstyp bearbeiten update: Aktualisieren @@ -235,7 +235,7 @@ de: success: Bereich wurde erfolgreich erstellt. destroy: has_spaces: Dieser Bereich hat abhängige partizipative Räume. Bitte stellen Sie sicher, dass kein partizipativer Raum mehr diesen Bereich referenziert, bevor sie ihn löschen. - success: Bereich wurde erfolgreich zerstört. + success: Bereich wurde erfolgreich gelöscht. edit: title: Bereich bearbeiten update: Aktualisieren @@ -251,7 +251,7 @@ de: error: Beim Erstellen eines neuen Ordners ist ein Fehler aufgetreten. success: Ordner erfolgreich erstellt destroy: - success: Der Ordner wurde erfolgreich zerstört. + success: Der Ordner wurde erfolgreich gelöscht. edit: title: Ordner bearbeiten update: Aktualisieren @@ -268,7 +268,7 @@ de: error: Beim Erstellen des neuen Anhangs ist ein Fehler aufgetreten. success: Anhang wurde erfolgreich erstellt. destroy: - success: Anhang wurde erfolgreich entfernt. + success: Anhang wurde erfolgreich gelöscht. edit: title: Anhang bearbeiten update: Aktualisieren @@ -450,6 +450,7 @@ de: values: 'false': Veröffentlicht 'true': Unveröffentlicht + remove_all: Alle entfernen scope_id_eq: label: Themenbereich search_label: Suche @@ -570,6 +571,7 @@ de: appearance: Aussehen area_types: Bereichstypen areas: Bereiche + components: Komponenten configuration: Aufbau content: Gemeldeter Inhalt external_domain_allowlist: Erlaubte externe Domains @@ -732,7 +734,7 @@ de: success: Newsletter erfolgreich geliefert destroy: error_already_sent: 'Newsletter kann nicht gelöscht werden: Es wurde bereits gesendet.' - success: Newsletter erfolgreich zerstört. + success: Newsletter erfolgreich gelöscht. edit: save_and_preview: Speichern und Vorschau title: Newsletter bearbeiten @@ -874,7 +876,7 @@ de: success: Participatory Space Privater Benutzerzugriff erfolgreich erstellt. destroy: error: Beim Löschen eines privaten Benutzers für diesen partizipativen Bereich ist ein Fehler aufgetreten. - success: Participatory Space Privater Benutzerzugriff wurde erfolgreich zerstört. + success: Privater Zugriff zum partizipativen Raum erfolgreich gelöscht. index: import_via_csv: Aus CSV-Datein importieren title: Participatory Space privater Benutzer @@ -924,7 +926,7 @@ de: error: Beim Erstellen eines neuen Geltungstyps ist ein Fehler aufgetreten. success: Der Geltungsbereichstyp wurde erfolgreich erstellt. destroy: - success: Der Scope-Typ wurde erfolgreich zerstört + success: Der Themen-Typ wurde erfolgreich gelöscht edit: title: Bereichstyp bearbeiten update: Aktualisieren @@ -963,6 +965,11 @@ de: help: Diese Token werden verwendet, um diese unveröffentlichte Ressource öffentlich an jeden Benutzer weiterzugeben. Sie werden ausgeblendet, wenn das Werk veröffentlicht wird. Klicken Sie auf das Teilen-Symbol des Tokens um die teilbare URL zu besuchen. title: Token teilen shared: + adjacent_navigation: + next: Weiter + next_title: Nächstes Element + previous: Zurück + previous_title: Vorheriges Element gallery: add_images: Bilder hinzufügen edit_images: Bilder bearbeiten @@ -989,7 +996,7 @@ de: error: Beim Erstellen einer neuen Seite ist ein Fehler aufgetreten. success: Seite erfolgreich erstellt destroy: - success: Seite erfolgreich zerstört + success: Seite erfolgreich gelöscht edit: changed_notably_help: Wenn diese Option aktiviert ist, werden Nutzende benachrichtigt, um die neuen Nutzungsbedingungen zu akzeptieren. last_notable_change: 'Letzte signifikante Änderung: %{tos_version_formatted}' diff --git a/decidim-admin/config/locales/en.yml b/decidim-admin/config/locales/en.yml index 09175b5b03447..b0cf812736638 100644 --- a/decidim-admin/config/locales/en.yml +++ b/decidim-admin/config/locales/en.yml @@ -451,6 +451,7 @@ en: values: 'false': Published 'true': Unpublished + remove_all: Remove all scope_id_eq: label: Scope search_label: Search @@ -965,6 +966,11 @@ en: help: These tokens are used to publicly share this unpublished resource to any user. They will be hidden when the resource is published. Click on the token's share icon to visit the shareable URL. title: Share tokens shared: + adjacent_navigation: + next: Next + next_title: Next item + previous: Previous + previous_title: Previous item gallery: add_images: Add images edit_images: Edit images diff --git a/decidim-admin/config/locales/es-MX.yml b/decidim-admin/config/locales/es-MX.yml index d7743ed217fbf..0592fbf7597b3 100644 --- a/decidim-admin/config/locales/es-MX.yml +++ b/decidim-admin/config/locales/es-MX.yml @@ -570,6 +570,7 @@ es-MX: appearance: Apariencia area_types: Tipos de área areas: Áreas + components: Componentes configuration: Configuración content: Contenido reportado external_domain_allowlist: Dominios externos permitidos diff --git a/decidim-admin/config/locales/es-PY.yml b/decidim-admin/config/locales/es-PY.yml index a37a7927f06b5..bd3c86941fad5 100644 --- a/decidim-admin/config/locales/es-PY.yml +++ b/decidim-admin/config/locales/es-PY.yml @@ -570,6 +570,7 @@ es-PY: appearance: Apariencia area_types: Tipos de área areas: Áreas + components: Componentes configuration: Configuración content: Contenido reportado external_domain_allowlist: Dominios externos permitidos diff --git a/decidim-admin/config/locales/es.yml b/decidim-admin/config/locales/es.yml index aef6957b02b73..54e7d99485872 100644 --- a/decidim-admin/config/locales/es.yml +++ b/decidim-admin/config/locales/es.yml @@ -450,6 +450,7 @@ es: values: 'false': Publicada 'true': Sin publicar + remove_all: Eliminar todos scope_id_eq: label: Ámbito search_label: Buscar @@ -570,6 +571,7 @@ es: appearance: Apariencia area_types: Tipos de área areas: Áreas + components: Componentes configuration: Configuración content: Contenido reportado external_domain_allowlist: Dominios externos permitidos @@ -963,6 +965,11 @@ es: help: Estos tokens se utilizan para compartir públicamente este recurso no publicado a cualquier usuario. Se ocultarán cuando se publique el recurso. Haz clic en el icono de compartir el token para visitar la URL compartible. title: Compartir tokens shared: + adjacent_navigation: + next: Siguiente + next_title: Siguiente elemento + previous: Anterior + previous_title: Anterior elemento gallery: add_images: Añadir imágenes edit_images: Editar imagenes diff --git a/decidim-admin/config/locales/eu.yml b/decidim-admin/config/locales/eu.yml index a7336adbe51bc..60d7906651ab6 100644 --- a/decidim-admin/config/locales/eu.yml +++ b/decidim-admin/config/locales/eu.yml @@ -561,6 +561,7 @@ eu: appearance: Itxura area_types: Arlo motak areas: Arloak + components: Osagaiak configuration: Konfigurazioa content: Eduki salatua external_domain_allowlist: Baimendutako kanpoko domeinuak diff --git a/decidim-admin/config/locales/fi-plain.yml b/decidim-admin/config/locales/fi-plain.yml index b43bb5e8519af..2eddb35bceece 100644 --- a/decidim-admin/config/locales/fi-plain.yml +++ b/decidim-admin/config/locales/fi-plain.yml @@ -570,6 +570,7 @@ fi-pl: appearance: Ulkoasu area_types: Aluetyypit areas: Alueet + components: Komponentit configuration: Asetukset content: Ilmoitettu sisältö external_domain_allowlist: Sallitut ulkoiset verkko-osoitteet diff --git a/decidim-admin/config/locales/fi.yml b/decidim-admin/config/locales/fi.yml index 629d92bdbac71..5171a26b325d9 100644 --- a/decidim-admin/config/locales/fi.yml +++ b/decidim-admin/config/locales/fi.yml @@ -570,6 +570,7 @@ fi: appearance: Ulkoasu area_types: Aluetyypit areas: Alueet + components: Komponentit configuration: Asetukset content: Ilmoitettu sisältö external_domain_allowlist: Sallitut ulkoiset verkko-osoitteet diff --git a/decidim-admin/config/locales/fr-CA.yml b/decidim-admin/config/locales/fr-CA.yml index feff1a5be61b6..44cef0bca5053 100644 --- a/decidim-admin/config/locales/fr-CA.yml +++ b/decidim-admin/config/locales/fr-CA.yml @@ -570,6 +570,7 @@ fr-CA: appearance: Apparence area_types: Types de périmètre d'assemblée areas: Zones d'application + components: Fonctionnalités configuration: Configuration content: Contenu signalé external_domain_allowlist: Domaines externes autorisés diff --git a/decidim-admin/config/locales/fr.yml b/decidim-admin/config/locales/fr.yml index b7df7b50e7160..d50ee45faf338 100644 --- a/decidim-admin/config/locales/fr.yml +++ b/decidim-admin/config/locales/fr.yml @@ -570,6 +570,7 @@ fr: appearance: Apparence area_types: Types de périmètre d'assemblée areas: Périmètres d'assemblée + components: Fonctionnalités configuration: Configuration content: Contenu signalé external_domain_allowlist: Domaines externes autorisés diff --git a/decidim-admin/config/locales/it.yml b/decidim-admin/config/locales/it.yml index d4855398fcf7b..3848371a87d87 100644 --- a/decidim-admin/config/locales/it.yml +++ b/decidim-admin/config/locales/it.yml @@ -430,6 +430,7 @@ it: appearance: Aspetto area_types: Tipi di ambito territoriale areas: Ambiti territoriali + components: Componenti configuration: Configurazione help_sections: Sezioni di Aiuto homepage: Homepage diff --git a/decidim-admin/config/locales/ja.yml b/decidim-admin/config/locales/ja.yml index 129e523b1a606..5a2e35633c1ac 100644 --- a/decidim-admin/config/locales/ja.yml +++ b/decidim-admin/config/locales/ja.yml @@ -565,6 +565,7 @@ ja: appearance: 外観 area_types: エリア種別 areas: エリア + components: コンポーネント configuration: 設定 content: 報告されたコンテンツ external_domain_allowlist: 許可された外部ドメイン diff --git a/decidim-admin/config/locales/sq-AL.yml b/decidim-admin/config/locales/sq-AL.yml index 66a1afefd9994..399142d13574a 100644 --- a/decidim-admin/config/locales/sq-AL.yml +++ b/decidim-admin/config/locales/sq-AL.yml @@ -61,6 +61,10 @@ sq: from: Adresa email e dërguesit github_handler: Emri i përdoruesit Github highlight_color: Theksim + highlighted_content_banner_action_subtitle: Nëntitull i butonit të veprimit + highlighted_content_banner_action_title: Titulli i butonit të veprimit + highlighted_content_banner_action_url: URL e butonit të veprimit + highlighted_content_banner_enabled: Shfaq banerin e theksuar të përmbajtjes highlighted_content_banner_image: Imazhi highlighted_content_banner_short_description: Përshkrim i shkurtër highlighted_content_banner_title: Titulli @@ -110,19 +114,369 @@ sq: organization: Organizata slug: Slug i adresës URL title: Titulli + topic_id: Temë + weight: Rendit pozicionet + static_page_topic: + description: Përshkrimi + name: Emri i temës + title: Titulli + weight: Rendit pozicionet + user_group_csv_verification: + file: Skeda + errors: + models: + organization: + attributes: + official_img_footer: + allowed_file_content_types: Skedar imazhi i pavlefshëm activerecord: attributes: decidim/static_page: content: Përmbajtje slug: Slug i adresës URL title: Titulli + doorkeeper/application: + authorize_url: Autorizo URL + client_secret: Sekreti i klientit + organization_name: Emri i organizatës + organization_url: URL e organizatës + redirect_uri: Ridrejto URL-të + site: Faqe interneti decidim: admin: + actions: + add: Shto + attachment: + new: Shtojcë e re + browse: Shfleto + category: + new: Kategoria e re + export: Eksporto të gjitha + import: Importo + newsletter: + new: Newsletter i ri + per_page: Për faqe + permissions: Lejet + reject: Refuzo + send_me_a_test_email: Më dërgo një email prove + share: Shpërndaj + user: + new: Administrator i ri + verify: Verifiko + admin_terms_of_service: + actions: + accept: Pranoj kushtet + refuse: Refuzoj kushtet e administratorit + title: Pranoj kushtet e përdorimit + area_types: + edit: + update: Përditëso + areas: + edit: + title: Përditëso zonën + update: Përditëso + new: + create: Krijo zonën + attachment_collections: + new: + create: Krijo + title: Dojse e re + update: + error: Ndodhi një gabim gjatë përditësimit të kësaj dosjeje. + success: Dosja u përditësua me sukses. + attachments: + edit: + update: Përditëso + index: + attachments_title: Skedat e bashkëlidhura + new: + create: Krijo bashkangjitje + autocomplete: + no_results: Nuk u gjetën rezultate + search_prompt: Shkruaj të paktën 3 shkronja për të kërkuar. + block_user: + new: + action: Blloko llogarinë dhe dërgo arsyen + justification: Arsye + title: Blloko përdoruesin %{name} + categories: + create: + error: Ndodhi një gabim gjatë krijimit të kësaj kategorie. + success: Kategoria u krijua me sukses. + destroy: + success: Kategoria u fshi me sukses. + edit: + title: Përpuno kategoritë + update: Përditëso + index: + categories_title: Kategoritë + new: + create: Krijo kategori + title: Kategori e re + update: + error: Ndodhi një gabim gjatë përditësimit të kësaj kategorie. + success: Kategoria u përditësua me sukses. + component_permissions: + update: + success: Të drejtat u përditësuan me sukses. + components: + edit: + update: Përditëso + index: + headers: + actions: Veprimet + title: Komponentet + conflicts: + attempts: Tentativa + 'false': 'Jo' + solved: Është zgjidhur + transfer: + email: Email + name: Emri + reason: Arsyeja + title: Transfero + 'true': 'Po' + user_name: Perdoruesit + content_blocks: + edit: + title: Përmbatja e faqes + update: Përditëso + exports: + formats: + CSV: CSV + Excel: Excel + FormPDF: PDF + JSON: JSON + notice: Eksportimi është duke u kryer. Do të merrni një email kur të ketë perfunduar. + filters: + category_id_eq: + label: Kategori + filter_label: Filtra + invitation_accepted_at_present: + label: Ftesa u pranua + values: + 'false': 'Jo' + 'true': 'Po' + last_sign_in_at_present: + values: + 'false': 'Jo' + 'true': 'Po' + moderated_users: + reports_reason_eq: + label: Arsyeja e raportimit + values: + does_not_belong: Nuk përket + offensive: Ofenduese + spam: Spam + moderations: + reportable_type_string_eq: + label: Tipi + officialized_at_null: + label: Gjendja + participatory_space_private_users: + user_invitation_accepted_at_not_null: + label: Ftesa u pranua + values: + 'false': E papranuar + 'true': Pranuar + user_invitation_sent_at_not_null: + label: Ftesa u dërguan + values: + 'false': Nuk është dërguar + 'true': Dërguar + private_space_eq: + label: Private + values: + 'false': Publike + 'true': Private + published_at_null: + label: Publikuar + values: + 'false': Publikuar + 'true': E papublikuar + scope_id_eq: + label: Qëllimi + search_label: Kërko + state_eq: + label: Gjendja + values: + all: Të gjitha + pending: Në pritje + rejected: Refuzuar + verified: Verifikuar + forms: + file_help: + import: + message_1: Skedat CSV, JSON dhe Excel (.xlsx) janë të suportuara + impersonations: + form: + authorization_method: Mënyra e autorizimit + name: Emri + reason: Arsyeja + new: + impersonate: Hiqet si dikush + imports: + and: dhe + new: + accepted_mime_types: + csv: CSV + json: JSON + xlsx: Excel (.xlsx) + actions: + back: Prapa + import: Importo + logs: + filters: + text: Kërko me email përdoruesi, emër ose nofkë. + user: Përdorues + managed_users: + promotions: + new: + promote: Promovo + menu: + admins: Administratorët + appearance: Pamja + area_types: Lloji i zonës + areas: Zonat + components: Komponentët + configuration: Konfigurimi + content: Përmbajtje e raportuar + homepage: Kryefaqja + newsletters: Buletinet + participants: Pjesëmarrësit + scopes: Fushëveprimet + settings: Cilësimet + static_page_topics: Temat + static_pages: Faqet + user_groups: Grupet + users: Pjesëmarrësit + metrics: + metrics: + see_more_metrics: Shiko më shumë të dhëna models: + area: + fields: + area_type: Lloji i zonës + name: Emri + area_type: + fields: + name: Emri + plural: Shumës + attachment: + fields: + collection: Dosje + content_type: Lloji + file_size: Madhësia + title: Titulli + name: Bashkëngjitje + attachment_collection: + name: Dosje + category: + name: Kategori + impersonation_log: + fields: + admin: Administrator + expired_at: Skaduar më + reason: Arsyeja + user: Pjesëmarrës + newsletter: + fields: + created_at: Krijuar më + progress: Ecuria + sent_to: Dërguar drejt + subject: Subjekt + name: Buletin + scope: + fields: + name: Emri + scope_type: + fields: + name: Emri + plural: Shumës share_token: fields: + created_at: Krijuar më + expires_at: Skadon më last_used_at: Hera e fundit që u përdor times_used: Sa herë është përdorur + token: Token + moderated_users: + index: + reason: Arsyeja + report: + reasons: + does_not_belong: Nuk përket + offensive: Ofenduese + spam: Spam + tabs: + blocked: Bllokuar + moderations: + index: + title: Përmbajtje e raportuar + report: + reasons: + does_not_belong: Nuk përket + offensive: Ofenduese + spam: Spam + reports: + index: + author: Autor(ët) + content_original_language: Gjuha origjinale e përmbajtjes + reported_content: Përmbajtje e raportuar + show: + report_reason: Arsyeja + title: Detajet e raportit + newsletter_templates: + index: + preview_template: Parapamje + title: Shabllonet e newsletter + use_template: Përdor këtë shabllon + show: + use_template: Përdor këtë shabllon + newsletters: + create: + error: Ndodhi një gabim gjatë krijimit të newsletter. + success: Newsletter u krijua me sukses. Të lutem, verifikoje para se ta dërgosh. + deliver: + error: Ndodhi një gabim gjatë dërgimit të newsletter. + success: Newsletter u dërgua me sukses. + destroy: + success: Newsletter u shkatërrua me sukses. + edit: + save_and_preview: Ruaj dhe parashiko + title: Përpuno newsletter + index: + all: të gjitha + all_users: 'Të gjithë përdoruesit ' + and: 'dhe ' + confirm_delete: A je i sigurt që do ta fshish këtë newsletter? + followers: 'ndjekësit ' + has_been_sent_to: 'I është dërguar: ' + not_sent: Nuk është dërguar + participants: 'pjesëmarrësit ' + subscribed_count: 'Abonuar:' + title: Newsletters + new: + save: Ruaj + title: Buletin i ri + select_recipients_to_deliver: + all_spaces: Të gjitha + all_users_help: Dërgo buletinin te të gjithë përdoruesit e konfirmuar. + confirm_deliver: A je i sigurt që do ta dërgosh këtë buletin? Veprimi nuk mund të anulohet. + deliver: Dërgo buletinin + none: Asnjë + show: + preview: Parapamje + subject: Tema + officializations: + index: + actions: Veprimet + block: Blloko përdoruesin + created_at: Krijuar më + name: Emri + nickname: Nofka + reports: Raportet + status: Statusi organization: form: social_handlers: Rrjetet sociale @@ -137,3 +491,59 @@ sq: saturation: Thellësia title: Përzgjedhësi i ngjyrës update_suggested_colors: Përditëso ngjyrat e rekomanduara + resource_permissions: + edit: + title: Github + scope_types: + edit: + update: Përditëso + scopes: + edit: + update: Përditëso + share_tokens: + actions: + destroy: Fshi + share: Shpërndaj + static_page_topics: + edit: + title: Përpuno temën + update: Përditëso temën + new: + create: Krijo temën + title: Temë e re + static_pages: + edit: + title: Përpuno faqen + update: Përditëso + titles: + dashboard: Paneli + menu: Menu + page_topics: Temat + pages: Faqet + panel: Administrator + participants: Pjesëmarrësit + statistics: Aktiviteti + user_groups: Grupet + users: Administratorët + user_groups_csv_verifications: + new: + upload: Ngarko + users: + form: + email: Email + name: Emri + role: Roli + new: + create: Fto + users_statistics: + users_count: + admins: Administratorët + last_day: Dita e fundit + last_month: Muaji i kaluar + last_week: Java e kaluar + participants: Pjesëmarrësit + moderations: + models: + moderation: + fields: + reportable_type: Lloji diff --git a/decidim-admin/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb b/decidim-admin/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb index 7372eb9a02f12..7ac4bf3d2517a 100644 --- a/decidim-admin/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/commands/create_attachment_collection_examples.rb @@ -25,10 +25,11 @@ module Admin form_params, collection_for: ).with_context( - current_organization: organization + current_organization: organization, + current_user: user ) end - let(:command) { described_class.new(form, collection_for, user) } + let(:command) { described_class.new(form, collection_for) } describe "when the form is not valid" do before do diff --git a/decidim-admin/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb b/decidim-admin/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb index a44b2a43a3b90..a34a3af16d08d 100644 --- a/decidim-admin/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/commands/update_attachment_collection_examples.rb @@ -26,10 +26,11 @@ module Admin form_params, collection_for: ).with_context( - current_organization: organization + current_organization: organization, + current_user: user ) end - let(:command) { described_class.new(attachment_collection, form, user) } + let(:command) { described_class.new(attachment_collection, form) } describe "when the form is not valid" do before do diff --git a/decidim-admin/lib/decidim/admin/test/manage_attachment_collections_examples.rb b/decidim-admin/lib/decidim/admin/test/manage_attachment_collections_examples.rb index 117a873c19ea5..97cc4dafa4726 100644 --- a/decidim-admin/lib/decidim/admin/test/manage_attachment_collections_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/manage_attachment_collections_examples.rb @@ -2,6 +2,7 @@ shared_examples "manage attachment collections examples" do let!(:attachment_collection) { create(:attachment_collection, collection_for:) } + let(:attributes) { attributes_for(:attachment_collection) } before do visit current_path @@ -30,17 +31,13 @@ fill_in_i18n( :attachment_collection_name, "#attachment_collection-name-tabs", - en: "Application forms", - es: "Formularios de solicitud", - ca: "Formularis de sol·licitud" + **attributes[:name].except("machine_translations") ) fill_in_i18n( :attachment_collection_description, "#attachment_collection-description-tabs", - en: "Contains the application forms", - es: "Contiene los formularios de solicitud", - ca: "Conté els formularis de sol·licitud" + **attributes[:description].except("machine_translations") ) find("*[type=submit]").click @@ -49,8 +46,11 @@ expect(page).to have_admin_callout("successfully") within "#attachment_collections table" do - expect(page).to have_text("Application forms") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:name])} attachment collection") end it "can update an attachment collection" do @@ -64,9 +64,7 @@ fill_in_i18n( :attachment_collection_name, "#attachment_collection-name-tabs", - en: "Latest application forms", - es: "Últimos formularios de solicitud", - ca: "Últims formularis de sol·licitud" + **attributes[:name].except("machine_translations") ) find("*[type=submit]").click @@ -75,8 +73,11 @@ expect(page).to have_admin_callout("successfully") within "#attachment_collections table" do - expect(page).to have_text("Latest application forms") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:name])} attachment collection") end context "when deleting a attachment collection" do diff --git a/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb b/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb index 4f60bf6958036..9f5fe73e872b9 100644 --- a/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/manage_attachments_examples.rb @@ -63,6 +63,42 @@ end end + it "can add attachments with a link to a process" do + click_on "New attachment" + + within ".new_attachment" do + fill_in_i18n( + :attachment_title, + "#attachment-title-tabs", + en: "Very Important Document", + es: "Documento Muy Importante", + ca: "Document Molt Important" + ) + + fill_in_i18n( + :attachment_description, + "#attachment-description-tabs", + en: "This document contains important information", + es: "Este documento contiene información importante", + ca: "Aquest document conté informació important" + ) + end + + within ".new_attachment" do + find_by_id("trigger-link").click + + fill_in "attachment[link]", with: "https://example.com/docs.pdf" + + find("*[type=submit]").click + end + + expect(page).to have_admin_callout("successfully") + + within "#attachments table" do + expect(page).to have_text("Very Important Document") + end + end + it "can add attachments within a collection to a process" do click_on "New attachment" diff --git a/decidim-admin/lib/decidim/admin/test/manage_categories_examples.rb b/decidim-admin/lib/decidim/admin/test/manage_categories_examples.rb index 777ae9d05516f..afb12cd0239f0 100644 --- a/decidim-admin/lib/decidim/admin/test/manage_categories_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/manage_categories_examples.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true shared_examples "manage categories examples" do + let(:attributes) { attributes_for(:category) } it "lists all the categories for the process" do within "#categories table" do expect(page).to have_content(translated(category.name, locale: :en)) @@ -25,9 +26,7 @@ fill_in_i18n( :category_name, "#category-name-tabs", - en: "My category", - es: "Mi categoría", - ca: "La meva categoria" + **attributes[:name].except("machine_translations") ) find("*[type=submit]").click @@ -36,8 +35,11 @@ expect(page).to have_admin_callout("successfully") within "#categories table" do - expect(page).to have_content("My category") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("added the #{translated(attributes[:name])} category to the") end it "updates a category" do @@ -51,9 +53,7 @@ fill_in_i18n( :category_name, "#category-name-tabs", - en: "My new name", - es: "Mi nuevo nombre", - ca: "El meu nou nom" + **attributes[:name].except("machine_translations") ) find("*[type=submit]").click @@ -62,8 +62,11 @@ expect(page).to have_admin_callout("successfully") within "#categories table" do - expect(page).to have_content("My new name") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:name])} category in the") end context "when deleting a category" do diff --git a/decidim-admin/lib/decidim/admin/test/manage_hide_content_examples.rb b/decidim-admin/lib/decidim/admin/test/manage_hide_content_examples.rb index bf8ab353e7431..a8fd46071e411 100644 --- a/decidim-admin/lib/decidim/admin/test/manage_hide_content_examples.rb +++ b/decidim-admin/lib/decidim/admin/test/manage_hide_content_examples.rb @@ -54,6 +54,10 @@ click_on I18n.t("decidim.admin.block_user.new.action") expect(content.reload).to be_hidden + + visit decidim_admin.root_path + expect(page).to have_content("blocked user") + expect(page).to have_content("hid a resource of type") end end end diff --git a/decidim-admin/spec/commands/decidim/admin/create_attachment_spec.rb b/decidim-admin/spec/commands/decidim/admin/create_attachment_spec.rb index 9763ba0f85b49..d6dbbca0c739c 100644 --- a/decidim-admin/spec/commands/decidim/admin/create_attachment_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/create_attachment_spec.rb @@ -4,7 +4,7 @@ module Decidim::Admin describe CreateAttachment do - subject { described_class.call(form, attached_to, user) } + subject { described_class.call(form, attached_to) } let(:user) { create(:user) } let(:form) do instance_double( @@ -21,6 +21,7 @@ module Decidim::Admin }, file:, attachment_collection: nil, + current_user: user, weight: 0 ) end diff --git a/decidim-admin/spec/commands/decidim/admin/create_participatory_space_private_user_spec.rb b/decidim-admin/spec/commands/decidim/admin/create_participatory_space_private_user_spec.rb index 58ec5da4c1081..0cfbbb0782c07 100644 --- a/decidim-admin/spec/commands/decidim/admin/create_participatory_space_private_user_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/create_participatory_space_private_user_spec.rb @@ -4,7 +4,7 @@ module Decidim::Admin describe CreateParticipatorySpacePrivateUser do - subject { described_class.new(form, current_user, privatable_to, via_csv:) } + subject { described_class.new(form, privatable_to, via_csv:) } let(:via_csv) { false } let(:privatable_to) { create(:participatory_process) } @@ -17,6 +17,7 @@ module Decidim::Admin invalid?: invalid, delete_current_private_participants?: delete, email:, + current_user:, name: ) end diff --git a/decidim-admin/spec/commands/decidim/admin/deliver_newsletter_spec.rb b/decidim-admin/spec/commands/decidim/admin/deliver_newsletter_spec.rb index 771298faa2214..721e0f1b6cc97 100644 --- a/decidim-admin/spec/commands/decidim/admin/deliver_newsletter_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/deliver_newsletter_spec.rb @@ -39,7 +39,7 @@ module Decidim::Admin current_user: ) end - let(:command) { described_class.new(newsletter, form, current_user) } + let(:command) { described_class.new(newsletter, form) } def user_localized_body(user) newsletter.template.settings.body.stringify_keys[user.locale] diff --git a/decidim-admin/spec/commands/decidim/admin/process_participatory_space_private_user_import_csv_spec.rb b/decidim-admin/spec/commands/decidim/admin/process_participatory_space_private_user_import_csv_spec.rb index 7bbe550d0029f..ff733c42aff8f 100644 --- a/decidim-admin/spec/commands/decidim/admin/process_participatory_space_private_user_import_csv_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/process_participatory_space_private_user_import_csv_spec.rb @@ -4,7 +4,7 @@ module Decidim::Admin describe ProcessParticipatorySpacePrivateUserImportCsv do - subject { described_class.new(form, current_user, private_users_to) } + subject { described_class.new(form, private_users_to) } let(:current_user) { create(:user, :admin, organization:) } let(:organization) { create(:organization) } diff --git a/decidim-admin/spec/commands/decidim/admin/promote_managed_user_spec.rb b/decidim-admin/spec/commands/decidim/admin/promote_managed_user_spec.rb index fe09121f20f13..235bdec0b093b 100644 --- a/decidim-admin/spec/commands/decidim/admin/promote_managed_user_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/promote_managed_user_spec.rb @@ -4,7 +4,7 @@ module Decidim::Admin describe PromoteManagedUser do - subject { described_class.new(form, user, current_user) } + subject { described_class.new(form, user) } let(:organization) { create(:organization) } let!(:current_user) { create(:user, :admin, organization:) } diff --git a/decidim-admin/spec/commands/decidim/admin/update_attachment_spec.rb b/decidim-admin/spec/commands/decidim/admin/update_attachment_spec.rb index f2275f11f4d1a..a9fb5a06b7fbf 100644 --- a/decidim-admin/spec/commands/decidim/admin/update_attachment_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/update_attachment_spec.rb @@ -22,11 +22,14 @@ module Decidim::Admin es: "Una ciudad" }, file:, + link:, attachment_collection: nil, + current_user: user, weight: 2 ) end let(:file) { upload_test_file(Decidim::Dev.test_file("city.jpeg", "image/jpeg")) } + let(:link) { "" } describe "when valid" do before do @@ -35,7 +38,7 @@ module Decidim::Admin it "broadcasts :ok and updates the attachment" do expect do - described_class.call(attachment, form, user) + described_class.call(attachment, form) end.to broadcast(:ok) expect(attachment["title"]["en"]).to eq("An image") @@ -48,7 +51,7 @@ module Decidim::Admin .with(:update, attachment, user, {}) .and_call_original - expect { described_class.call(attachment, form, user) }.to change(Decidim::ActionLog, :count) + expect { described_class.call(attachment, form) }.to change(Decidim::ActionLog, :count) action_log = Decidim::ActionLog.last expect(action_log.action).to eq("update") expect(action_log.version).to be_present @@ -62,7 +65,7 @@ module Decidim::Admin it "does not update the component" do expect do - described_class.call(attachment, form, user) + described_class.call(attachment, form) end.to broadcast(:invalid) attachment.reload diff --git a/decidim-admin/spec/commands/decidim/admin/update_component_permissions_spec.rb b/decidim-admin/spec/commands/decidim/admin/update_component_permissions_spec.rb index 47cf09e4a4065..ee2b465a1a64b 100644 --- a/decidim-admin/spec/commands/decidim/admin/update_component_permissions_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/update_component_permissions_spec.rb @@ -4,7 +4,7 @@ module Decidim::Admin describe UpdateComponentPermissions do - subject(:command) { described_class.call(form, component, resource, user) } + subject(:command) { described_class.call(form, component, resource) } let(:organization) { create(:organization, available_authorizations: ["dummy"]) } let(:participatory_process) { create(:participatory_process, :with_steps, organization:) } @@ -48,7 +48,8 @@ module Decidim::Admin authorization_handlers_names: ["dummy"], authorization_handlers_options: { "dummy" => { "perry" => "mason" } } ) - } + }, + current_user: user ) end diff --git a/decidim-admin/spec/commands/decidim/admin/update_external_domain_allowlist_spec.rb b/decidim-admin/spec/commands/decidim/admin/update_external_domain_allowlist_spec.rb index 20bea18c4a733..f6c18f771f41f 100644 --- a/decidim-admin/spec/commands/decidim/admin/update_external_domain_allowlist_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/update_external_domain_allowlist_spec.rb @@ -6,8 +6,8 @@ module Decidim::Admin describe UpdateExternalDomainAllowlist do let(:organization) { create(:organization, external_domain_allowlist: []) } let(:user) { create(:user, organization:) } - let(:form) { Decidim::Admin::OrganizationExternalDomainAllowlistForm.from_params(attributes) } - let(:command) { described_class.new(form, organization, user) } + let(:form) { Decidim::Admin::OrganizationExternalDomainAllowlistForm.from_params(attributes).with_context(current_user: user) } + let(:command) { described_class.new(form, organization) } let(:domains) { ["erabaki.pamplona.es", "osallistu.hel.fi", "codefor.fr"] } let(:attributes) do { diff --git a/decidim-admin/spec/commands/decidim/admin/update_help_sections_spec.rb b/decidim-admin/spec/commands/decidim/admin/update_help_sections_spec.rb index a6cbfc5146a30..a5cf15d4a7ea0 100644 --- a/decidim-admin/spec/commands/decidim/admin/update_help_sections_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/update_help_sections_spec.rb @@ -6,8 +6,8 @@ module Decidim::Admin describe UpdateHelpSections do let(:organization) { create(:organization, external_domain_allowlist: []) } let(:user) { create(:user, organization:) } - let(:form) { Decidim::Admin::HelpSectionsForm.from_params(attributes) } - let(:command) { described_class.new(form, organization, user) } + let(:form) { Decidim::Admin::HelpSectionsForm.from_params(attributes).with_context(current_user: user) } + let(:command) { described_class.new(form, organization) } let(:attributes) do { sections: { diff --git a/decidim-admin/spec/commands/decidim/admin/update_newsletter_spec.rb b/decidim-admin/spec/commands/decidim/admin/update_newsletter_spec.rb index 46bb81ffd5338..11d8eb0e35b35 100644 --- a/decidim-admin/spec/commands/decidim/admin/update_newsletter_spec.rb +++ b/decidim-admin/spec/commands/decidim/admin/update_newsletter_spec.rb @@ -16,10 +16,10 @@ module Decidim::Admin Decidim::Admin::NewsletterForm.from_params( subject: newsletter_subject, settings: newsletter_body.transform_keys { |key| "body_#{key}" } - ).with_context(current_organization: organization) + ).with_context(current_organization: user.organization, current_user: user) end - let(:command) { described_class.new(newsletter, form, user) } + let(:command) { described_class.new(newsletter, form) } describe "when the form is not valid" do let(:newsletter_subject) { nil } diff --git a/decidim-admin/spec/system/admin_manages_help_sections_spec.rb b/decidim-admin/spec/system/admin_manages_help_sections_spec.rb index 1dbebd692c845..9fe240f43a3bb 100644 --- a/decidim-admin/spec/system/admin_manages_help_sections_spec.rb +++ b/decidim-admin/spec/system/admin_manages_help_sections_spec.rb @@ -28,6 +28,9 @@ help_content = Decidim::ContextualHelpSection.find_content(organization, :participatory_processes) expect(help_content).to include("en" => "

Well hello!

") + + visit decidim_admin.root_path + expect(page).to have_content("updated the Participatory processes help section") end it "destroys the section when it is empty" do diff --git a/decidim-admin/spec/system/admin_manages_more_locales_spec.rb b/decidim-admin/spec/system/admin_manages_more_locales_spec.rb index 8cda16ff2e202..a1355ec99c9b1 100644 --- a/decidim-admin/spec/system/admin_manages_more_locales_spec.rb +++ b/decidim-admin/spec/system/admin_manages_more_locales_spec.rb @@ -22,6 +22,8 @@ end after do + Decidim.available_locales = %w(en ca es) + I18n.available_locales = %w(en ca es) Decidim::Admin.send(:remove_const, :StaticPageForm) load "#{Decidim::Admin::Engine.root}/app/forms/decidim/admin/static_page_form.rb" end diff --git a/decidim-admin/spec/system/admin_manages_newsletters_spec.rb b/decidim-admin/spec/system/admin_manages_newsletters_spec.rb index ccc9dcb5f1af3..393d87fdfa348 100644 --- a/decidim-admin/spec/system/admin_manages_newsletters_spec.rb +++ b/decidim-admin/spec/system/admin_manages_newsletters_spec.rb @@ -7,6 +7,7 @@ describe "Admin manages newsletters" do let(:organization) { create(:organization) } + let!(:attributes) { attributes_for(:newsletter, organization:) } let(:user) { create(:user, :admin, :confirmed, name: "Sarah Kerrigan", organization:) } let!(:deliverable_users) { create_list(:user, 5, :confirmed, newsletter_notifications_at: Time.current, organization:) } @@ -41,9 +42,7 @@ fill_in_i18n( :newsletter_subject, "#newsletter-subject-tabs", - en: "A fancy newsletter for %{name}", - es: "Un correo electrónico muy chulo para %{name}", - ca: "Un correu electrònic flipant per a %{name}" + **attributes[:subject].except("machine_translations") ) fill_in_i18n_editor( @@ -82,7 +81,10 @@ end expect(page).to have_content("Preview") - expect(page).to have_content("A fancy newsletter for #{user.name}") + expect(page).to have_content(translated(attributes[:subject])) + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:subject])} newsletter") end end @@ -148,9 +150,7 @@ fill_in_i18n( :newsletter_subject, "#newsletter-subject-tabs", - en: "A fancy newsletter", - es: "Un correo electrónico muy chulo", - ca: "Un correu electrònic flipant" + **attributes[:subject].except("machine_translations") ) fill_in_i18n_editor( @@ -165,7 +165,10 @@ end expect(page).to have_content("Preview") - expect(page).to have_content("A fancy newsletter") + expect(page).to have_content(translated(attributes[:subject])) + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:subject])} newsletter") end end diff --git a/decidim-admin/spec/system/admin_manages_organization_area_types_spec.rb b/decidim-admin/spec/system/admin_manages_organization_area_types_spec.rb index 710f0cf9b56ea..fecb046cf276d 100644 --- a/decidim-admin/spec/system/admin_manages_organization_area_types_spec.rb +++ b/decidim-admin/spec/system/admin_manages_organization_area_types_spec.rb @@ -5,6 +5,7 @@ describe "Admin manages area types" do let(:admin) { create(:user, :admin, :confirmed) } let(:organization) { admin.organization } + let(:attributes) { attributes_for(:area_type) } before do switch_to_host(organization.host) @@ -24,17 +25,13 @@ fill_in_i18n( :area_type_name, "#area_type-name-tabs", - en: "Sectorial en", - es: "Sectorial es", - ca: "Sectorial ca" + **attributes[:name].except("machine_translations") ) fill_in_i18n( :area_type_plural, "#area_type-plural-tabs", - en: "Sectorials en", - es: "Sectoriales es", - ca: "Sectorials ca" + **attributes[:plural].except("machine_translations") ) find("*[type=submit]").click @@ -43,8 +40,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Sectorial en") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:name])} area type") end context "with existing area_types" do @@ -69,13 +69,13 @@ fill_in_i18n( :area_type_name, "#area_type-name-tabs", - en: "Not Sectorial en" + **attributes[:name].except("machine_translations") ) fill_in_i18n( :area_type_plural, "#area_type-plural-tabs", - en: "This is the new plural" + **attributes[:plural].except("machine_translations") ) find("*[type=submit]").click end @@ -83,8 +83,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Not Sectorial en") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:name])} area type") end it "can delete them" do diff --git a/decidim-admin/spec/system/admin_manages_organization_areas_spec.rb b/decidim-admin/spec/system/admin_manages_organization_areas_spec.rb index 6ce0ea16ac26d..9ac777a86db9a 100644 --- a/decidim-admin/spec/system/admin_manages_organization_areas_spec.rb +++ b/decidim-admin/spec/system/admin_manages_organization_areas_spec.rb @@ -5,6 +5,7 @@ describe "Organization Areas" do let(:admin) { create(:user, :admin, :confirmed) } let(:organization) { admin.organization } + let(:attributes) { attributes_for(:area) } before do switch_to_host(organization.host) @@ -24,9 +25,8 @@ click_on "Add" within ".item__edit-form" do - fill_in_i18n :area_name, "#area-name-tabs", en: "My area", - es: "Mi area", - ca: "La meva area" + fill_in_i18n :area_name, "#area-name-tabs", **attributes[:name].except("machine_translations") + select area_type.name["en"], from: :area_area_type_id find("*[type=submit]").click @@ -35,8 +35,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My area") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:name])} area") end context "with existing areas" do @@ -59,17 +62,16 @@ end within ".item__edit-form" do - fill_in_i18n :area_name, "#area-name-tabs", en: "Another area", - es: "Otra area", - ca: "Una altra area" + fill_in_i18n :area_name, "#area-name-tabs", **attributes[:name].except("machine_translations") find("*[type=submit]").click end expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Another area") + expect(page).to have_content(translated(attributes[:name])) end + expect(page).to have_content("updated the #{translated(attributes[:name])} area") end it "can delete them" do diff --git a/decidim-admin/spec/system/admin_manages_organization_scope_types_spec.rb b/decidim-admin/spec/system/admin_manages_organization_scope_types_spec.rb index fc0e16becef03..766f72997aa18 100644 --- a/decidim-admin/spec/system/admin_manages_organization_scope_types_spec.rb +++ b/decidim-admin/spec/system/admin_manages_organization_scope_types_spec.rb @@ -5,6 +5,7 @@ describe "Admin manages scope types" do let(:admin) { create(:user, :admin, :confirmed) } let(:organization) { admin.organization } + let!(:attributes) { attributes_for(:scope_type) } before do switch_to_host(organization.host) @@ -24,17 +25,13 @@ fill_in_i18n( :scope_type_name, "#scope_type-name-tabs", - en: "Territorial en", - es: "Territorial es", - ca: "Territorial ca" + **attributes[:name].except("machine_translations") ) fill_in_i18n( :scope_type_plural, "#scope_type-plural-tabs", - en: "Territorials en", - es: "Territoriales es", - ca: "Territorials ca" + **attributes[:plural].except("machine_translations") ) find("*[type=submit]").click @@ -43,8 +40,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Territorial en") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:name])} scope type") end context "with existing scope_types" do @@ -69,13 +69,13 @@ fill_in_i18n( :scope_type_name, "#scope_type-name-tabs", - en: "Not Territorial en" + **attributes[:name].except("machine_translations") ) fill_in_i18n( :scope_type_plural, "#scope_type-plural-tabs", - en: "This is the new plural" + **attributes[:plural].except("machine_translations") ) find("*[type=submit]").click end @@ -83,8 +83,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Not Territorial en") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:name])} scope type") end it "can delete them" do diff --git a/decidim-admin/spec/system/admin_manages_organization_scopes_spec.rb b/decidim-admin/spec/system/admin_manages_organization_scopes_spec.rb index 2ae76f8ed660b..205befbb5ca65 100644 --- a/decidim-admin/spec/system/admin_manages_organization_scopes_spec.rb +++ b/decidim-admin/spec/system/admin_manages_organization_scopes_spec.rb @@ -5,6 +5,7 @@ describe "Organization scopes" do let(:admin) { create(:user, :admin, :confirmed) } let(:organization) { admin.organization } + let!(:attributes) { attributes_for(:scope) } before do switch_to_host(organization.host) @@ -24,9 +25,7 @@ click_on "Add" within ".new_scope" do - fill_in_i18n :scope_name, "#scope-name-tabs", en: "My nice district", - es: "Mi lindo distrito", - ca: "El meu bonic barri" + fill_in_i18n :scope_name, "#scope-name-tabs", **attributes[:name].except("machine_translations") fill_in "Code", with: "MY-DISTRICT" select scope_type.name["en"], from: :scope_scope_type_id @@ -36,8 +35,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My nice district") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:name])} scope") end context "with existing scopes" do @@ -53,17 +55,18 @@ end within ".edit_scope" do - fill_in_i18n :scope_name, "#scope-name-tabs", en: "Another district", - es: "Otro distrito", - ca: "Un altre districte" + fill_in_i18n :scope_name, "#scope-name-tabs", **attributes[:name].except("machine_translations") find("*[type=submit]").click end expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Another district") + expect(page).to have_content(translated(attributes[:name])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:name])} scope") end it "can delete them" do diff --git a/decidim-admin/spec/system/admin_manages_organization_spec.rb b/decidim-admin/spec/system/admin_manages_organization_spec.rb index 27527e84a8534..7e4394500ffa2 100644 --- a/decidim-admin/spec/system/admin_manages_organization_spec.rb +++ b/decidim-admin/spec/system/admin_manages_organization_spec.rb @@ -6,6 +6,7 @@ include ActionView::Helpers::SanitizeHelper let(:organization) { create(:organization) } + let(:attributes) { attributes_for(:organization) } let(:user) { create(:user, :admin, :confirmed, organization:) } before do @@ -17,7 +18,7 @@ it "updates the values from the form" do visit decidim_admin.edit_organization_path - fill_in "Name", with: "My super-uber organization" + fill_in_i18n :organization_name, "#organization-name-tabs", **attributes[:name].except("machine_translations") %w(X Facebook Instagram YouTube GitHub).each do |network| within "#organization_social_handlers" do @@ -38,6 +39,9 @@ click_on "Update" expect(page).to have_content("updated successfully") + + visit decidim_admin.root_path + expect(page).to have_content("updated the organization settings") end it "marks the comments_max_length as required" do @@ -46,6 +50,8 @@ expect(page).to have_no_content("There is an error in this field.") fill_in :organization_comments_max_length, with: "" + find_by_id("organization_rich_text_editor_in_public_views").click + expect(page).to have_content("There is an error in this field.") end @@ -467,7 +473,7 @@ let(:parsed_content) do cnt = <<~HTML

testing

-

foo
link

+

foo
link


HTML diff --git a/decidim-admin/spec/system/static_pages_spec.rb b/decidim-admin/spec/system/static_pages_spec.rb index 45dd865e7a511..c1da2114093bd 100644 --- a/decidim-admin/spec/system/static_pages_spec.rb +++ b/decidim-admin/spec/system/static_pages_spec.rb @@ -148,6 +148,7 @@ describe "Managing pages" do let!(:topic) { create(:static_page_topic, organization:) } + let(:attributes) { attributes_for(:static_page) } before do login_as admin, scope: :user @@ -172,17 +173,13 @@ fill_in_i18n( :static_page_title, "#static_page-title-tabs", - en: "Welcome to Decidim", - es: "Te damos la bienvendida a Decidim", - ca: "Et donem la benvinguda a Decidim" + **attributes[:title].except("machine_translations") ) fill_in_i18n_editor( :static_page_content, "#static_page-content-tabs", - en: "

Some HTML content

", - es: "

Contenido HTML

", - ca: "

Contingut HTML

" + **attributes[:content].except("machine_translations") ) select topic.title[I18n.locale.to_s], from: :static_page_topic_id @@ -192,8 +189,11 @@ expect(page).to have_admin_callout("successfully") within ".card", text: topic.title[I18n.locale.to_s] do - expect(page).to have_css("tr", text: "Welcome to Decidim") + expect(page).to have_css("tr", text: translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} static page") end context "with existing pages" do @@ -223,12 +223,12 @@ fill_in_i18n( :static_page_title, "#static_page-title-tabs", - en: "Not welcomed anymore" + **attributes[:title].except("machine_translations") ) fill_in_i18n_editor( :static_page_content, "#static_page-content-tabs", - en: "This is the new content" + **attributes[:content].except("machine_translations") ) select topic.title[I18n.locale.to_s], from: :static_page_topic_id find("*[type=submit]").click @@ -237,8 +237,11 @@ expect(page).to have_admin_callout("successfully") within ".card", text: topic.title[I18n.locale.to_s] do - expect(page).to have_css("tr", text: "Not welcomed anymore") + expect(page).to have_css("tr", text: translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} static page") end it "can delete them" do diff --git a/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/index.html.erb b/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/index.html.erb index 587a77566b1a2..cac7030102b08 100644 --- a/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/index.html.erb +++ b/decidim-assemblies/app/views/decidim/assemblies/admin/assemblies/index.html.erb @@ -48,6 +48,8 @@ <% if allowed_to? :update, :assembly, assembly: assembly %> <%= link_to translated_attribute(assembly.title), edit_assembly_path(assembly) %> + <% elsif allowed_to? :read, :component, assembly: assembly %> + <%= link_to translated_attribute(assembly.title), components_path(assembly) %>
<% else %> <%= translated_attribute(assembly.title) %> <% end %> diff --git a/decidim-assemblies/config/locales/bg.yml b/decidim-assemblies/config/locales/bg.yml index 38885869a3f36..60e66a579df7a 100644 --- a/decidim-assemblies/config/locales/bg.yml +++ b/decidim-assemblies/config/locales/bg.yml @@ -30,9 +30,431 @@ bg: github: GitHub hashtag: Хаштаг hero_image: Изображение за начална страница + import_attachments: Импортиране на прикачени файлове + import_categories: Импортиране на категории + import_components: Импортиране на компоненти + included_at: Включено в(ъв) + instagram: Instagram + internal_organisation: Вътрешна организация + is_transparent: Е прозрачно + local_area: Област на организацията + meta_scope: Метаданни за обхвата + parent_id: Родителско събрание + participatory_processes_ids: Свързани процеси за участие + participatory_scope: Какво е решено + participatory_structure: Как е решено + private_space: Частно пространство + promoted: Акцентирано + published_at: Публикувано на + purpose_of_action: Цел на действието + scope_id: Обхват + scopes_enabled: Обхватите са активирани + short_description: Кратко описание + show_statistics: Покажи статистиката + slug: Съкратен URL + special_features: Специални функции + subtitle: Подзаглавие + target: Кой участва + title: Заглавие + twitter: X + weight: Подредба на позиция + youtube: YouTube + assembly_member: + birthday: Рождена дата + birthplace: Място на раждане + ceased_date: Дата на прекратяване + designation_date: Дата на обозначаване + full_name: Пълно име + gender: Пол + non_user_avatar: Аватар + position: Длъжност + user_id: Потребител или група + weight: Подредба на позиция + assembly_user_role: + email: Имейл + name: Име + role: Роля + errors: + models: + assembly: + attributes: + document: + allowed_file_content_types: 'Невалиден файлов формат. Позволени са само файлове със следните разширения: %{types}.' + activerecord: + models: + decidim/assembly: + one: Събрание + other: Събрания + decidim/assembly_member: + one: Член на събранието + other: Членове на събранието + decidim/assembly_user_role: + one: Потребителска роля в събранието + other: Потребителски роли в събранието decidim: + admin: + actions: + import_assembly: Импортиране + new_assembly: Ново събрание + new_assembly_member: Нов член на събранието + new_assembly_type: Нов тип събрание + new_assembly_user_role: Нов администратор на събранието + assemblies: + create: + error: Възникна проблем при създаването на ново събрание. + success: Събранието беше създадено успешно. + edit: + update: Актуализация + index: + private: Частни + public: Публични + published: Публикувано + unpublished: Непубликувано + new: + create: Създаване + title: Ново събрание + update: + error: Възникна проблем при актуализирането на това събрание. + success: Събранието беше актуализирано успешно. + assemblies_copies: + create: + error: Възникна проблем при дублирането на това събрание. + success: Събранието беше дублирано успешно. + assemblies_types: + create: + error: Възникна проблем при създаването на нов тип събрание. + success: Типът събрание беше създаден успешно. + destroy: + success: Типът събрание беше изтрит успешно. + new: + create: Създаване + title: Нов тип събрание + update: + error: Възникна проблем при актуализирането на този тип събрание. + success: Типът на събранието беше актуализиран успешно. + assembly_copies: + new: + copy: Копиране + select: Изберете кои данни искате да дублирате + title: Дублиране на събрание + assembly_imports: + create: + error: Възникна проблем при импортирането на това събрание. + success: Събранието беше импортирано успешно. + new: + import: Импортиране + select: Изберете кои данни искате да импортирате + title: Импортиране на събрание + assembly_members: + create: + error: Възникна проблем при добавянето на член за това събрание. + success: Членът беше добавен успешно за това събрание. + destroy: + success: Членът беше изтрит успешно за това събрание. + edit: + title: Актуализиране на член на събранието + update: Актуализация + index: + assembly_members_title: Членове на събранието + new: + create: Създаване + title: Нов член на събранието + update: + error: Възникна проблем при актуализирането на члена за това събрание. + success: Членът беше актуализиран успешно за това събрание. + assembly_publications: + create: + error: Възникна проблем при публикуването на това събрание. + success: Събранието беше публикувано успешно. + destroy: + error: Възникна проблем при премахването на публикацията за това събрание. + success: Публикацията на събранието беше премахната успешно. + assembly_user_roles: + create: + error: Възникна проблем при добавянето на администратор за това събрание. + success: Администраторът беше добавен успешно към това събрание. + destroy: + success: Администраторът беше премахнат успешно от това събрание. + edit: + title: Актуализиране на администратора на събранието + update: Актуализация + index: + assembly_admins_title: Администратори на събранието + new: + create: Създаване + title: Нов администратор на събранието + update: + error: Възникна проблем при актуализирането на администратор за това събрание. + success: Администраторът беше актуализиран успешно за това събрание. + filters: + ceased_date_not_null: + label: Прекратено + values: + 'false': Не е прекратено + 'true': Прекратено + decidim_assemblies_type_id_eq: + label: Тип събрание + search_placeholder: + full_name_or_user_name_or_user_nickname_cont: Търсене по име или псевдоним + menu: + assemblies: Събрания + assemblies_submenu: + assembly_admins: Администратори на събранието + assembly_members: Членове + attachment_collections: Папки + attachment_files: Файлове + attachments: Прикачени файлове + categories: Категории + components: Компоненти + info: Относно това събрание + landing_page: Целева страница + moderations: Модерации + private_users: Частни потребители + see_assembly: Вижте събранието + assemblies_types: Типове събрания + models: + assemblies_types: + fields: + created_at: Създадено на + title: Заглавие + assembly: + fields: + actions: Активности + created_at: Създадено на + private: Частни + promoted: Акцентирано + published: Публикувано + title: Заглавие + name: Събрание + assembly_member: + fields: + ceased_date: Дата на прекратяване + designation_date: Дата на обозначаване + full_name: Име + position: Длъжност + name: Член + positions: + other: Друго + president: Президент + secretary: Секретар + vice_president: Вицепрезидент + assembly_user_role: + fields: + email: Имейл + name: Име + role: Роля + name: Администратор на събрание + roles: + admin: Администратор + collaborator: Сътрудник + moderator: Модератор + valuator: Оценител + titles: + assemblies: Събрания + assemblies_types: Типове събрания + admin_log: + assembly: + create: "%{user_name} създаде събранието %{resource_name}" + duplicate: "%{user_name} дублира събранието %{resource_name}" + export: "%{user_name} експортна събранието %{resource_name}" + import: "%{user_name} импортира събранието %{resource_name}" + publish: "%{user_name} публикува събранието %{resource_name}" + unpublish: "%{user_name} премахна публикацията на събранието %{resource_name}" + update: "%{user_name} актуализира събранието %{resource_name}" + assembly_member: + create: "%{user_name} създаде члена %{resource_name} в събранието %{space_name}" + delete: "%{user_name} премахна члена %{resource_name} от събранието %{space_name}" + update: "%{user_name} актуализира члена %{resource_name} в събранието %{space_name}" + assembly_setting: + update: "%{user_name} актуализира настройките за събранията" + assembly_type: + create: "%{user_name} създаде типа събрание %{resource_name}" + delete: "%{user_name} премахна типа събрание %{resource_name}" + publish: "%{user_name} публикува типа събрание %{resource_name}" + unpublish: "%{user_name} премахна публикацията на типа събрание %{resource_name}" + update: "%{user_name} актуализира типа събрание %{resource_name}" + assembly_user_role: + create: "%{user_name} покани %{resource_name} в събранието %{space_name}" + delete: "%{user_name} премахна участника %{resource_name} от събранието %{space_name}" + update: "%{user_name} промени ролята на %{resource_name} в събранието %{space_name}" assemblies: + admin: + assemblies: + form: + announcement_help: Текстът, който въвеждате тук, ще бъде показан на потребителя точно под информацията за събранието. + duration: Продължителност + duration_help: Ако продължителността на това събрание е ограничена, изберете крайната дата. В противен случай ще се показва като неограничено във времето. + filters: Филтри + images: Изображения + included_at_help: Изберете датата, на която този модул е ​​добавен към платформата. Не е задължително да е същата като датата на създаване. + metadata: Метаданни + other: Друго + select_a_created_by: Изберете „Създадено от“ + select_an_area: Изберете област + select_an_assembly_type: Изберете тип събрание + select_parent_assembly: Изберете родителско събрание + slug_help_html: 'Използват се променливи полета в URL адреса, за да се генерират URL адреси, които водят към това събрание. Допуска се използването само на букви, цифри и тирета и адресът трябва да започва с буква. Пример: %{url}' + social_handlers: Социални мрежи + title: Основна информация + visibility: Видимост + assemblies_types: + form: + title: Редактиране на типа събрание + assembly_copies: + form: + slug_help_html: 'Използват се променливи полета в URL адреса, за да се генерират URL адреси, които водят към това събрание. Допуска се използването само на букви, цифри и тирета и адресът трябва да започва с буква. Пример: %{url}' + assembly_imports: + form: + slug_help_html: 'Използват се променливи полета в URL адреса, за да се генерират URL адреси, които водят към това събрание. Допуска се използването само на букви, цифри и тирета и адресът трябва да започва с буква. Пример: %{url}' + assembly_members: + form: + existing_user: Съществуващ участник + explanation: 'Указания за изображението:' + image_guide: За предпочитане е портретно (вертикално) изображение без текст. + non_user: Не е участник + non_user_avatar_help: Трябва да получите съгласието на лицата, преди да ги публикувате като членове. + select_a_position: Изберете длъжност + select_user: Изберете участник + user_type: Тип участник + content_blocks: + highlighted_assemblies: + max_results: Максимален брой елементи, които да се показват + new_import: + accepted_types: + json: JSON assemblies: + description: + area_name: Област + closing_date: Дата на затваряне + created_by: Създадено от + creation_date: Дата на създаване + data: Дата на събранието + developer_group: Група за популяризиране + duration: Продължителност + included_at: Включено в(ъв) + indefinite_duration: Неопределено + local_area: Област на организацията + meta_scope: Обхват + participatory_scope: Какво е решено + participatory_structure: Как е решено + target: Кой участва + title: Относно това събрание filters: names: all: Всички + type: Тип + show: + title: Относно това събрание + assembly_members: + index: + members: Членове + assembly_types: + commission: Комисия + consultative_advisory: Консултативно/Съветнически + executive: Изпълнителен директор + government: Правителство + others: Други + participatory: Съучастие + working_group: Работна група + content_blocks: + children_assemblies: + name: Събрания + dates_metadata: + name: Метаданни за дати + extra_data: + name: Тип и продължителност + highlighted_assemblies: + name: Акцентирани събрания + related_assemblies: + name: Свързани събрания + created_by: + city_council: Общински съвет + others: Други + public: Публично + filter: + all: Всички типове + commission: Комисия + consultative_advisory: Консултативно/Съветнически + executive: Изпълнителен директор + government: Правителство + help: 'Покажи:' + others: Други + participatory: Съучастие + working_group: Работна група + index: + title: Събрания + last_activity: + new_assembly: 'Ново събрание:' + pages: + home: + highlighted_assemblies: + active_spaces: Активни събрания + see_all_spaces: Вижте всички събрания + user_profile: + member_of: + member_of: Член на + show: + assembly_type: Тип събрание + duration: Продължителност + private_space: Това е частно събрание + social_networks_title: Посетете събранието на + assembly_members: + assembly_member: + designated_on: Обозначено на + index: + title: Членове + events: + assemblies: + create_assembly_member: + email_intro: Администратор на събранието %{resource_name} Ви добави като един от членовете му. + email_outro: Получихте това известие, защото бяхте поканени на събрание. Проверете страницата за сглобяване, за да допринесете! + email_subject: Получихте покана да станете член на събранието %{resource_name}! + notification_title: Бяхте регистрирани като член на събранието %{resource_name}. Посетете страницата на събранието, за да допринесете! + assembly: + role_assigned: + email_intro: Получихте ролята на %{role} за събранието „%{resource_title}“. + email_outro: Получавате това известие, защото сте %{role} на събранието „%{resource_title}“. + email_subject: Получихте ролята на %{role} за „%{resource_title}“. + notification_title: Получихте ролята на %{role} за събранието %{resource_title}. + help: + participatory_spaces: + assemblies: + contextual: "

Събрание е група от членове на организация, които се срещат периодично, за да взимат решения за конкретна област или обхват на организацията.

Събранията провеждат срещи, като някои са частни, а други са със свободен достъп. Ако са със свободен достъп, е възможно да участвате в тях (например: да присъствате, ако капацитетът го позволява, да добавяте точки към дневния ред или да коментирате предложенията или решенията на въпросния орган).

Примери: Общо събрание (което заседава веднъж годишно, за да определи чрез гласуване основните насоки на действие на организацията, както и изпълнителните ѝ органи), консултативен съвет по въпросите на равенството (който заседава веднъж на всеки два месеца, за да изготвя предложения за подобряване на взаимоотношенията между половете в организацията), комисия за оценяване (която заседава всеки месец с цел наблюдение на определен процес) или гаранционен орган (който събира данни за инциденти, злоупотреби или предложения за подобряване на процедурите за взимане на решения) — всички те са примери за събрания.

\n" + page: "

Събрание е група от членове на организация, които се срещат периодично, за да взимат решения за конкретна област или обхват на организацията.

Събранията провеждат срещи, като някои са частни, а други са със свободен достъп. Ако са със свободен достъп, е възможно да участвате в тях (например: да присъствате, ако капацитетът го позволява, да добавяте точки към дневния ред или да коментирате предложенията или решенията на въпросния орган).

Примери: Общо събрание (което заседава веднъж годишно, за да определи чрез гласуване основните насоки на действие на организацията, както и изпълнителните ѝ органи), консултативен съвет по въпросите на равенството (който заседава веднъж на всеки два месеца, за да изготвя предложения за подобряване на взаимоотношенията между половете в организацията), комисия за оценяване (която заседава всеки месец с цел наблюдение на определен процес) или гаранционен орган (който събира данни за инциденти, злоупотреби или предложения за подобряване на процедурите за взимане на решения) — всички те са примери за събрания.

\n" + title: Какво представляват събранията? + log: + value_types: + assembly_presenter: + not_found: 'Събранието не беше намерено в базата данни (Идент. №: %{id})' + assembly_type_presenter: + not_found: 'Типът събрание не бе намерен в базата данни (Идент. №: %{id})' + menu: + assemblies: Събрания + metrics: + assemblies: + description: Брой на създадените събрания + object: събрания + title: Събрания + participatory_processes: + show: + related_assemblies: Свързани събрания + statistics: + assemblies_count: Събрания + layouts: + decidim: + assemblies: + assembly: + more_info: Още информация + take_part: Участвайте + index: + promoted_assemblies: Акцентирани събрания + metadata: + children_item: + one: "%{count} събрание" + other: "%{count} събрания" + order_by_assemblies: + assemblies: + one: "%{count} събрания" + other: "%{count} събрания" + assembly_navigation: + assembly_member_menu_item: Членове diff --git a/decidim-assemblies/config/locales/sq-AL.yml b/decidim-assemblies/config/locales/sq-AL.yml index a4586a5eea6c6..aabf6a42207fb 100644 --- a/decidim-assemblies/config/locales/sq-AL.yml +++ b/decidim-assemblies/config/locales/sq-AL.yml @@ -8,10 +8,13 @@ sq: area_id: Zona assembly_type: Lloji i asamblesë assembly_type_other: Lloji i asamblesë tjetër + banner_image: Imazhi ballor closing_date: Data e mbylljes closing_date_reason: Arsyeja e datës së mbylljes composition: Përbërja copy_categories: Kopjo kategoritë + copy_components: Kopjo komponentet + copy_features: Kopjo veçoritë created_by: Krijuar nga created_by_other: Krijuar nga tjetër creation_date: Data e krijimit @@ -36,6 +39,7 @@ sq: is_transparent: Është transparente local_area: Zona e organizatës parent_id: Asambleja e përgjithshme + participatory_processes_ids: Procese pjesëmarrëse të përafërta participatory_scope: Çfarë u vendos participatory_structure: Si u vendos private_space: Hapësirë private @@ -52,16 +56,336 @@ sq: target: Kush merr pjesë title: Titulli twitter: X + weight: Pozicioni në rradhë youtube: YouTube assembly_member: birthday: Datëlindje birthplace: Vendi i lindjes + ceased_date: Data e përfundimit + designation_date: Data e dezignimit full_name: Emri i plotë gender: Gjinia non_user_avatar: Avatar position: Pozicioni user_id: Perdorues ose grup + weight: Pozicioni në rradhë assembly_user_role: email: Email name: Emri role: Roli + errors: + models: + assembly: + attributes: + document: + allowed_file_content_types: 'Tip i pavlefshëm dokumenti. Lejohen vetëm prapashtesat e listuara: %{types}.' + decidim: + admin: + actions: + import_assembly: Importo + new_assembly: Asamble e re + new_assembly_member: Anëtar i ri asambleje + new_assembly_type: Tip i ri asambleje + new_assembly_user_role: Administrator i ri asambleje + assemblies: + create: + error: Ndodhi një gabim gjatë krijimit të asamblesë. + success: Asambleja u krijua me sukses. + edit: + update: Përditëso + index: + private: Private + public: Publike + published: E publikuar + unpublished: E papublikuar + new: + create: Krijo + title: Asamble e re + update: + error: Ndodhi një gabim gjatë përditësimit të asamblesë. + success: Asambleja u përditësua me sukses. + assemblies_copies: + create: + error: Ndodhi një gabim gjatë duplikimit të asamblesë. + success: Asambleja e duplikua me sukses. + assemblies_types: + create: + error: Ndodhi një gabim gjatë krijimit të tipit të ri të asamblesë. + success: Tipi i asamblesë u krijua me sukses. + destroy: + success: Tipi i asamblesë u fshi me sukses. + new: + create: Krijo + title: Tip i ri asambleje + update: + error: Ndodhi një gabim gjatë përditësimit të tipit të asamblesë. + success: Tipi i asamblesë u përditësua me sukses. + assembly_copies: + new: + copy: Kopjo + select: Zgjidh cilën të dhënë dëshiron të duplikosh + title: Dupliko asamblenë + assembly_imports: + create: + error: Ndodhi një gabim gjatë importimit të asamblesë. + success: Asambleja u importua me sukses. + new: + import: Importo + select: Zgjidh të dhënat që dëshiron të importosh + title: Importo asamblenë + assembly_members: + create: + error: Ndodhi një gabim gjatë shtimit të anëtarit të asamblesë. + success: Anëtari i asamblesl u krijua me sukses. + destroy: + success: Anëtari i asamblesë u fshi me sukses. + edit: + title: Përditëso anëtarin e asamblesë + update: Përditëso + index: + assembly_members_title: Anëtarët e asamblesë + new: + create: Krijo + title: Anëtar i ri asambleje + update: + error: Ndodhi një gabim gjatë përditësimit të anëtarit të asamblesë. + success: Anëtari i asamblesë u përditësuar me sukses. + assembly_publications: + create: + error: Ndodhi një gabim gjatë publikimit të asamblesë. + success: Asambleja u publikua me sukses. + destroy: + error: Ndodhi një gabim gjatë çpublikimit të asamblesë. + success: Asambleja u çpublikua me sukses. + assembly_user_roles: + create: + error: Ndodhi një gabim gjatë shtimit të administratorit të asamblesë. + success: Administratori i asamblesë u shtua me sukses. + destroy: + success: Administratori i asamblesë u hoq me sukses. + edit: + title: Përditëso administratorin e asamblesë + update: Përditëso + index: + assembly_admins_title: Administratorët e asamblesë + new: + create: Krijo + title: Administrator i ri i asamblesë + update: + error: Ndodhi një gabim gjatë përditësimit të administratorit të asamblesë. + success: Administratori i asamblesë u përditësua me sukses. + filters: + ceased_date_not_null: + label: Përfunduar + values: + 'false': E papërfunduar + 'true': Përfunduar + decidim_assemblies_type_id_eq: + label: Tipi i asamblesë + search_placeholder: + full_name_or_user_name_or_user_nickname_cont: Kërko me emër ose nofkë + menu: + assemblies: Asambletë + assemblies_submenu: + assembly_admins: Administratorët e asamblesë + assembly_members: Anëtarët + attachment_collections: Skedarët + attachment_files: Skedat + attachments: Skedat e bashkëlidhura + categories: Kategoritë + components: Komponentet + info: Rreth asamblesë + landing_page: Faqja hyrëse + moderations: Moderimet + private_users: Përdoruesit privatë + see_assembly: Shiko asamblenë + assemblies_types: Tipet e asambleve + models: + assemblies_types: + fields: + created_at: Krijuar më + title: Titulli + assembly: + fields: + actions: Veprimet + created_at: Krijuar më + private: Private + promoted: Në pah + published: E publikuar + title: Titulli + name: Asambleja + assembly_member: + fields: + ceased_date: Data e përfundimit + designation_date: Data e dezignimit + full_name: Emri + position: Pozicioni + name: Anëtar + positions: + other: Tjetër + president: Presidenti/ja + secretary: Sekretari/ja + vice_president: Zëvendës presidenti/ja + assembly_user_role: + fields: + email: Email + name: Emri + role: Roli + name: Administratori/ja i/e asamblesë + roles: + admin: Administrator + collaborator: Bashkëpunëtor/e + moderator: Moderator/e + valuator: Vlerësues/e + titles: + assemblies: Asambletë + assemblies_types: Tipet e asambleve + admin_log: + assembly: + create: "%{user_name} krijoi asamblenë %{resource_name}" + duplicate: "%{user_name} duplikoi asamblenë %{resource_name}" + export: "%{user_name} eksportoi asamblenë %{resource_name}" + import: "%{user_name} importoi asamblenë %{resource_name}" + publish: "%{user_name} publikoi asamblenë %{resource_name}" + unpublish: "%{user_name} çpublikoi asamblenë %{resource_name}" + update: "%{user_name} përditësoi asamblenë %{resource_name}" + assembly_member: + create: "%{user_name} krijoi përdoruesin %{resource_name} në asamblenë %{space_name}" + delete: "%{user_name} hoqi përdoruesin %{resource_name} në asamblenë %{space_name}" + update: "%{user_name} përditësoi përdoruesin %{resource_name} në asamblenë %{space_name}" + assembly_setting: + update: "%{user_name} përditësoi konfigurimet e asamblesë" + assembly_type: + create: "%{user_name} krijoi tipin e asamblesë %{resource_name}" + delete: "%{user_name} hoqi tipin e asamblesë %{resource_name}" + publish: "%{user_name} publikoi tipin e asamblesë %{resource_name}" + unpublish: "%{user_name} çpublikoi tipin e asamblesë %{resource_name}" + update: "%{user_name} përditësoi tipin e asamblesë %{resource_name}" + assembly_user_role: + create: "%{user_name} ftoi %{resource_name} në asamblenë %{space_name}" + delete: "%{user_name} hoqi pjesëmarrësin %{resource_name} nga asambleja %{space_name}" + update: "%{user_name} ndryshoi rolin e %{resource_name} në asamblenë %{space_name}" + assemblies: + admin: + assemblies: + form: + announcement_help: Teksti që vendosni këtu do i shfaqet përdoruesit nën informacionin e asamblesë. + duration: Kohëzgjatja + duration_help: Nëse kohëzgjatja e asamblesë është e kufizuar, zgjidh datën e përfundimit. Përndryshe, do shfaqet si e papërcaktuar. + filters: Filtrat + images: Imazhet + included_at_help: Zgjidh datën e shtimit të asamblesë në platformë. Nuk ka pse të jetë e njejtë me datën e krijimit. + metadata: Metadata + other: Të tjera + select_a_created_by: Zgjidh krijuesin + select_an_area: Zgjidh një sektor + select_an_assembly_type: Zgjidh një tip asambleje + select_parent_assembly: Zgjidh asamblenë prind + slug_help_html: 'Për gjenerimin e URL së kësaj asambleje përdoren URL slugs. Pranohen vetëm gërma, numra dhe viza horizontale, dhe duhet të fillojë me gërmë. Shembull: %{url}' + social_handlers: Rrjete sociale + title: Informacion i përgjithshëm + visibility: Vizibiliteti + assemblies_types: + form: + title: Modifiko tipin e asamblesë + assembly_copies: + form: + slug_help_html: 'Për gjenerimin e URL së kësaj asambleje përdoren URL slugs. Pranohen vetëm gërma, numra dhe viza horizontale, dhe duhet të fillojë me gërmë. Shembull: %{url}' + assembly_imports: + form: + slug_help_html: 'Për gjenerimin e URL së kësaj asambleje përdoren URL slugs. Pranohen vetëm gërma, numra dhe viza horizontale, dhe duhet të fillojë me gërmë. Shembull: %{url}' + assembly_members: + form: + existing_user: Pjesëmarrës ekzistues + explanation: 'Udhëzime për imazhin:' + image_guide: Preferohet imazh me format portret (vertikal) pa tekst. + non_user: Mospjesëmarrës + non_user_avatar_help: Duhet të marrësh pëlqimin e personit para se ta publikosh si anëtar. + select_a_position: Zgjidh një pozicion + select_user: Zgjidh një pjesëmarrës + user_type: Lloji i pjesëmarrësit + content_blocks: + highlighted_assemblies: + max_results: Numri maksimal i elementeve që do shfaqen + new_import: + accepted_types: + json: JSON + assemblies: + description: + area_name: Sektori + closing_date: Data e mbylljes + created_by: Krijuar nga + creation_date: Data e krijimit + data: Të dhënat e asamblesë + developer_group: Grupi promovues + duration: Kohëzgjatja + included_at: Përfshirë në + indefinite_duration: E pacaktuar + local_area: Sektori i organizatës + meta_scope: Fushëveprimi + participatory_scope: Çfarë do vendoset + participatory_structure: Si do vendoset + target: Kush merr pjesë + title: Rreth asamblesë + filters: + type: Tipi + show: + title: Rreth asamblesë + assembly_members: + index: + members: Anëtarët + assembly_types: + commission: Komisioni + consultative_advisory: Këshilluese + executive: Ekzekutive + government: Qeverisja + others: Tjetër + participatory: Pjesëmarrëse + working_group: Grup pune + content_blocks: + children_assemblies: + name: Asambletë + dates_metadata: + name: Metadatat e datave + extra_data: + name: Tipi dhe kohëzgjatja + highlighted_assemblies: + name: Asambletë në pah + related_assemblies: + name: Asambletë e ngjashme + created_by: + city_council: Këshilli bashkiak + others: Të tjerët + public: Publiku + filter: + all: Gjithë tipet + commission: Komisioni + consultative_advisory: Këshilluese + executive: Ekzekutive + government: Qeverisja + help: 'Shfaq:' + others: Të tjera + participatory: Pjesëmarrëse + working_group: Grup pune + index: + title: Asambletë + last_activity: + new_assembly: 'Asamble e re:' + pages: + home: + highlighted_assemblies: + active_spaces: Asambletë aktive + see_all_spaces: Shiko gjithë asambletë + user_profile: + member_of: + member_of: Anëtar i + show: + assembly_type: Tipi i asamblesë + duration: Kohëzgjatja + private_space: Kjo është asamble private + social_networks_title: Vizito asamblenë në + assembly_members: + assembly_member: + designated_on: Caktuar më + index: + title: Anëtarët diff --git a/decidim-assemblies/spec/cells/decidim/assemblies/statistic_cell_spec.rb b/decidim-assemblies/spec/cells/decidim/assemblies/statistic_cell_spec.rb index b748d50e99822..fe1199b4f3d46 100644 --- a/decidim-assemblies/spec/cells/decidim/assemblies/statistic_cell_spec.rb +++ b/decidim-assemblies/spec/cells/decidim/assemblies/statistic_cell_spec.rb @@ -16,11 +16,11 @@ module Decidim::Assemblies end it "renders the stat title" do - expect(subject).to have_css("h3.statistic__title", text: "Participants") + expect(subject).to have_css(".statistic__title", text: "Participants") end it "renders the stat value" do - expect(subject).to have_css("span.statistic__number", text: "123") + expect(subject).to have_css(".statistic__number", text: "123") end end diff --git a/decidim-assemblies/spec/shared/manage_assemblies_examples.rb b/decidim-assemblies/spec/shared/manage_assemblies_examples.rb index 441dc635655df..d0ce27112b77c 100644 --- a/decidim-assemblies/spec/shared/manage_assemblies_examples.rb +++ b/decidim-assemblies/spec/shared/manage_assemblies_examples.rb @@ -6,24 +6,33 @@ let(:image3_path) { Decidim::Dev.asset(image3_filename) } let(:assembly_parent_id_options) { page.find_by_id("assembly_parent_id").find_all("option").map(&:value) } + let(:attributes) { attributes_for(:assembly, :with_content_blocks, organization:, blocks_manifests: [:announcement]) } before do click_on "Configure" end it "updates an assembly" do - fill_in_i18n( - :assembly_title, - "#assembly-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + fill_in_i18n(:assembly_title, "#assembly-title-tabs", **attributes[:title].except("machine_translations")) dynamically_attach_file(:assembly_banner_image, image3_path, remove_before: true) within ".edit_assembly" do expect(assembly_parent_id_options).not_to include(assembly.id) + fill_in_i18n(:assembly_subtitle, "#assembly-subtitle-tabs", **attributes[:subtitle].except("machine_translations")) + fill_in_i18n_editor(:assembly_short_description, "#assembly-short_description-tabs", **attributes[:short_description].except("machine_translations")) + fill_in_i18n_editor(:assembly_description, "#assembly-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_i18n_editor(:assembly_purpose_of_action, "#assembly-purpose_of_action-tabs", **attributes[:purpose_of_action].except("machine_translations")) + fill_in_i18n_editor(:assembly_composition, "#assembly-composition-tabs", **attributes[:composition].except("machine_translations")) + fill_in_i18n_editor(:assembly_internal_organisation, "#assembly-internal_organisation-tabs", **attributes[:internal_organisation].except("machine_translations")) + fill_in_i18n_editor(:assembly_announcement, "#assembly-announcement-tabs", **attributes[:announcement].except("machine_translations")) + fill_in_i18n_editor(:assembly_closing_date_reason, "#assembly-closing_date_reason-tabs", **attributes[:closing_date_reason].except("machine_translations")) + + fill_in_i18n(:assembly_participatory_scope, "#assembly-participatory_scope-tabs", **attributes[:participatory_scope].except("machine_translations")) + fill_in_i18n(:assembly_participatory_structure, "#assembly-participatory_structure-tabs", **attributes[:participatory_structure].except("machine_translations")) + fill_in_i18n(:assembly_meta_scope, "#assembly-meta_scope-tabs", **attributes[:meta_scope].except("machine_translations")) + fill_in_i18n(:assembly_local_area, "#assembly-local_area-tabs", **attributes[:local_area].except("machine_translations")) + fill_in_i18n(:assembly_target, "#assembly-target-tabs", **attributes[:target].except("machine_translations")) fill_in :assembly_creation_date_date, with: nil, fill_options: { clear: :backspace } fill_in :assembly_included_at_date, with: nil, fill_options: { clear: :backspace } @@ -39,13 +48,16 @@ expect(page).to have_admin_callout("successfully") within "[data-content]" do - expect(page).to have_css("input[value='My new title']") + expect(page).to have_css("input[value='#{translated(attributes[:title])}']") expect(page).to have_css("img[src*='#{image3_filename}']") expect(page).to have_field(:assembly_creation_date_date, with: Date.yesterday.strftime("%d/%m/%Y").to_s) expect(page).to have_field(:assembly_included_at_date, with: Date.current.strftime("%d/%m/%Y").to_s) expect(page).to have_field(:assembly_duration_date, with: Date.tomorrow.strftime("%d/%m/%Y").to_s) expect(page).to have_field(:assembly_closing_date_date, with: Date.tomorrow.strftime("%d/%m/%Y").to_s) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} assembly") end end diff --git a/decidim-assemblies/spec/shared/manage_assembly_admins_examples.rb b/decidim-assemblies/spec/shared/manage_assembly_admins_examples.rb index d40fec0c7c91f..b13dfa1dabe57 100644 --- a/decidim-assemblies/spec/shared/manage_assembly_admins_examples.rb +++ b/decidim-assemblies/spec/shared/manage_assembly_admins_examples.rb @@ -2,6 +2,7 @@ shared_examples "manage assembly admins examples" do let(:other_user) { create(:user, organization:, email: "my_email@example.org") } + let(:attributes) { attributes_for(:user, organization:) } let!(:assembly_admin) do create(:assembly_admin, @@ -25,12 +26,12 @@ end end - it "creates a new assembly admin" do + it "creates a new assembly admin", versioning: true do click_on "New assembly admin" within ".new_assembly_user_role" do fill_in :assembly_user_role_email, with: other_user.email - fill_in :assembly_user_role_name, with: "John Doe" + fill_in :assembly_user_role_name, with: attributes[:name] select "Administrator", from: :assembly_user_role_role find("*[type=submit]").click @@ -41,6 +42,9 @@ within "#assembly_admins table" do expect(page).to have_content(other_user.email) end + + visit decidim_admin.root_path + expect(page).to have_content("invited #{other_user.name} to the #{translated(assembly.title)} assembly") end describe "when managing different users" do @@ -49,7 +53,7 @@ visit current_path end - it "updates an assembly admin" do + it "updates an assembly admin", versioning: true do within "#assembly_admins" do within "#assembly_admins tr", text: other_user.email do click_on "Edit" @@ -67,6 +71,8 @@ within "#assembly_admins table" do expect(page).to have_content("Collaborator") end + visit decidim_admin.root_path + expect(page).to have_content("changed the role of #{other_user.name} in the #{translated(assembly.title)} assembly") end it "deletes an assembly_user_role" do diff --git a/decidim-assemblies/spec/shared/manage_assembly_components_examples.rb b/decidim-assemblies/spec/shared/manage_assembly_components_examples.rb index 37b1daaa90867..803c083182491 100644 --- a/decidim-assemblies/spec/shared/manage_assembly_components_examples.rb +++ b/decidim-assemblies/spec/shared/manage_assembly_components_examples.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true shared_examples "manage assembly components" do + let!(:attributes) { attributes_for(:component, participatory_space: assembly) } + before do switch_to_host(organization.host) login_as user, scope: :user @@ -20,9 +22,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My component", - ca: "La meva funcionalitat", - es: "Mi funcionalitat" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -49,12 +49,17 @@ it "is successfully created" do expect(page).to have_admin_callout("successfully") - expect(page).to have_content("My component") + expect(page).to have_content(translated(attributes[:name])) + end + + it "has a successful admin log" do + visit decidim_admin.root_path + expect(page).to have_content("created #{translated(attributes[:name])} in #{translated(assembly.title)}") end context "and then edit it" do before do - within "tr", text: "My component" do + within "tr", text: translated(attributes[:name]) do click_on "Configure" end end @@ -103,9 +108,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My updated component", - ca: "La meva funcionalitat actualitzada", - es: "Mi funcionalidad actualizada" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -120,9 +123,9 @@ end expect(page).to have_admin_callout("successfully") - expect(page).to have_content("My updated component") + expect(page).to have_content(translated(attributes[:name])) - within "tr", text: "My updated component" do + within "tr", text: translated(attributes[:name]) do click_on "Configure" end @@ -133,6 +136,9 @@ within ".default-step-settings" do expect(all("input[type=checkbox]").first).to be_checked end + + visit decidim_admin.root_path + expect(page).to have_content("updated #{translated(attributes[:name])} in #{translated(assembly.title)}") end end diff --git a/decidim-assemblies/spec/shared/manage_assembly_members_examples.rb b/decidim-assemblies/spec/shared/manage_assembly_members_examples.rb index e94821a4c35c8..2688fa4e79a6b 100644 --- a/decidim-assemblies/spec/shared/manage_assembly_members_examples.rb +++ b/decidim-assemblies/spec/shared/manage_assembly_members_examples.rb @@ -12,17 +12,17 @@ context "without existing user" do let!(:assembly_member) { create(:assembly_member, assembly:) } + let(:attributes) { attributes_for(:assembly_member, assembly:) } - it "creates a new assembly member" do + it "creates a new assembly member", versioning: true do click_on "New assembly member" fill_in_datepicker :assembly_member_designation_date_date, with: Time.current.strftime("%d/%m/%Y") within ".new_assembly_member" do - fill_in( - :assembly_member_full_name, - with: "Daisy O'connor" - ) + fill_in(:assembly_member_full_name, with: attributes[:full_name]) + fill_in(:assembly_member_gender, with: attributes[:gender]) + fill_in(:assembly_member_birthplace, with: attributes[:birthplace]) end dynamically_attach_file(:assembly_member_non_user_avatar, Decidim::Dev.asset("avatar.jpg")) do @@ -39,8 +39,11 @@ expect(page).to have_current_path decidim_admin_assemblies.assembly_members_path(assembly) within "#assembly_members table" do - expect(page).to have_content("Daisy O'connor") + expect(page).to have_content(attributes[:full_name]) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{attributes[:full_name]} member") end end @@ -98,6 +101,7 @@ describe "when managing other assembly members" do let!(:assembly_member) { create(:assembly_member, assembly:) } + let(:attributes) { attributes_for(:assembly_member, assembly:) } before do visit current_path @@ -109,16 +113,15 @@ end end - it "updates an assembly member" do + it "updates an assembly member", versioning: true do within "#assembly_members tr", text: assembly_member.full_name do click_on "Edit" end within ".edit_assembly_member" do - fill_in( - :assembly_member_full_name, - with: "Alicia O'connor" - ) + fill_in(:assembly_member_full_name, with: attributes[:full_name]) + fill_in(:assembly_member_gender, with: attributes[:gender]) + fill_in(:assembly_member_birthplace, with: attributes[:birthplace]) find("*[type=submit]").click end @@ -127,8 +130,11 @@ expect(page).to have_current_path decidim_admin_assemblies.assembly_members_path(assembly) within "#assembly_members table" do - expect(page).to have_content("Alicia O'connor") + expect(page).to have_content(attributes[:full_name]) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{assembly_member.full_name} member") end it "deletes the assembly member" do diff --git a/decidim-assemblies/spec/shared/manage_assembly_private_users_examples.rb b/decidim-assemblies/spec/shared/manage_assembly_private_users_examples.rb index aaa2750efca22..8ba29b6152666 100644 --- a/decidim-assemblies/spec/shared/manage_assembly_private_users_examples.rb +++ b/decidim-assemblies/spec/shared/manage_assembly_private_users_examples.rb @@ -35,6 +35,9 @@ within "#private_users table" do expect(page).to have_content(other_user.email) end + + visit decidim_admin.root_path + expect(page).to have_content("invited #{other_user.name} to be a private participant") end describe "when import a batch of private users from csv" do @@ -78,7 +81,6 @@ Decidim::Admin::CreateParticipatorySpacePrivateUser.call( form, - user, assembly ) diff --git a/decidim-assemblies/spec/system/admin/admin_manages_assemblies_spec.rb b/decidim-assemblies/spec/system/admin/admin_manages_assemblies_spec.rb index 5323a2afed1f0..dc36b6e86698b 100644 --- a/decidim-assemblies/spec/system/admin/admin_manages_assemblies_spec.rb +++ b/decidim-assemblies/spec/system/admin/admin_manages_assemblies_spec.rb @@ -45,6 +45,7 @@ let(:image2_filename) { "city2.jpeg" } let(:image2_path) { Decidim::Dev.asset(image2_filename) } + let(:attributes) { attributes_for(:assembly, :with_content_blocks, organization:, blocks_manifests: [:announcement]) } before do click_on "New assembly" @@ -56,36 +57,23 @@ it_behaves_like "having a rich text editor for field", "#closing_date_reason_div", "content" - it "creates a new assembly" do + it "creates a new assembly", versioning: true do within ".new_assembly" do - fill_in_i18n( - :assembly_title, - "#assembly-title-tabs", - en: "My assembly", - es: "Mi proceso participativo", - ca: "El meu procés participatiu" - ) - fill_in_i18n( - :assembly_subtitle, - "#assembly-subtitle-tabs", - en: "Subtitle", - es: "Subtítulo", - ca: "Subtítol" - ) - fill_in_i18n_editor( - :assembly_short_description, - "#assembly-short_description-tabs", - en: "Short description", - es: "Descripción corta", - ca: "Descripció curta" - ) - fill_in_i18n_editor( - :assembly_description, - "#assembly-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:assembly_title, "#assembly-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:assembly_subtitle, "#assembly-subtitle-tabs", **attributes[:subtitle].except("machine_translations")) + fill_in_i18n_editor(:assembly_short_description, "#assembly-short_description-tabs", **attributes[:short_description].except("machine_translations")) + fill_in_i18n_editor(:assembly_description, "#assembly-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_i18n_editor(:assembly_purpose_of_action, "#assembly-purpose_of_action-tabs", **attributes[:purpose_of_action].except("machine_translations")) + fill_in_i18n_editor(:assembly_composition, "#assembly-composition-tabs", **attributes[:composition].except("machine_translations")) + fill_in_i18n_editor(:assembly_internal_organisation, "#assembly-internal_organisation-tabs", **attributes[:internal_organisation].except("machine_translations")) + fill_in_i18n_editor(:assembly_announcement, "#assembly-announcement-tabs", **attributes[:announcement].except("machine_translations")) + fill_in_i18n_editor(:assembly_closing_date_reason, "#assembly-closing_date_reason-tabs", **attributes[:closing_date_reason].except("machine_translations")) + + fill_in_i18n(:assembly_participatory_scope, "#assembly-participatory_scope-tabs", **attributes[:participatory_scope].except("machine_translations")) + fill_in_i18n(:assembly_participatory_structure, "#assembly-participatory_structure-tabs", **attributes[:participatory_structure].except("machine_translations")) + fill_in_i18n(:assembly_meta_scope, "#assembly-meta_scope-tabs", **attributes[:meta_scope].except("machine_translations")) + fill_in_i18n(:assembly_local_area, "#assembly-local_area-tabs", **attributes[:local_area].except("machine_translations")) + fill_in_i18n(:assembly_target, "#assembly-target-tabs", **attributes[:target].except("machine_translations")) fill_in :assembly_slug, with: "slug" fill_in :assembly_hashtag, with: "#hashtag" @@ -103,8 +91,11 @@ within "[data-content]" do expect(page).to have_current_path decidim_admin_assemblies.assemblies_path(q: { parent_id_eq: parent_assembly&.id }) - expect(page).to have_content("My assembly") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} assembly") end end diff --git a/decidim-assemblies/spec/system/admin/admin_manages_assemblies_types_spec.rb b/decidim-assemblies/spec/system/admin/admin_manages_assemblies_types_spec.rb index e41d100a9e702..199753c73e109 100644 --- a/decidim-assemblies/spec/system/admin/admin_manages_assemblies_types_spec.rb +++ b/decidim-assemblies/spec/system/admin/admin_manages_assemblies_types_spec.rb @@ -2,9 +2,10 @@ require "spec_helper" -describe "Admin manages assemblies" do +describe "Admin manages assemblies types" do let(:admin) { create(:user, :admin, :confirmed) } let(:organization) { admin.organization } + let(:attributes) { attributes_for(:assemblies_type) } describe "Managing assemblies types" do before do @@ -13,18 +14,13 @@ visit decidim_admin_assemblies.assemblies_types_path end - it "can create new assemblies types" do + it "can create new assemblies types", versioning: true do within "[data-content]" do click_on "New assembly type" within ".new_assembly_type" do - fill_in_i18n( - :assemblies_type_title, - "#assemblies_type-title-tabs", - en: "My assembly type", - es: "Mi assembly type", - ca: "La meva assembly type" - ) + fill_in_i18n(:assemblies_type_title, "#assemblies_type-title-tabs", **attributes[:title].except("machine_translations")) + find("*[type=submit]").click end end @@ -32,8 +28,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My assembly type") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} assembly type") end context "with existing assemblies types" do @@ -49,23 +48,24 @@ end end - it "can edit them" do + it "can edit them", versioning: true do within "tr", text: translated(assembly_type.title) do click_on "Edit" end within ".edit_assembly_type" do - fill_in_i18n :assemblies_type_title, "#assemblies_type-title-tabs", en: "Another assembly type", - es: "Otra assembly type", - ca: "Una altra assembly type" + fill_in_i18n :assemblies_type_title, "#assemblies_type-title-tabs", **attributes[:title].except("machine_translations") find("*[type=submit]").click end expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Another assembly type") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} assembly type") end it "can delete them" do diff --git a/decidim-assemblies/spec/system/admin/valuator_checks_components_spec.rb b/decidim-assemblies/spec/system/admin/valuator_checks_components_spec.rb index 738681678f534..780df116e22d0 100644 --- a/decidim-assemblies/spec/system/admin/valuator_checks_components_spec.rb +++ b/decidim-assemblies/spec/system/admin/valuator_checks_components_spec.rb @@ -42,4 +42,16 @@ end end end + + context "when visiting the admin" do + before do + visit decidim_admin.root_path + end + + it "can access the participatory space" do + click_on "Assemblies" + click_on translated(assembly.title) + expect(page).to have_link("Components") + end + end end diff --git a/decidim-blogs/config/locales/bg.yml b/decidim-blogs/config/locales/bg.yml index e7ed14e885d1a..64d488a9c893f 100644 --- a/decidim-blogs/config/locales/bg.yml +++ b/decidim-blogs/config/locales/bg.yml @@ -1,5 +1,11 @@ bg: activemodel: + attributes: + post: + body: Основен текст + decidim_author_id: Автор + published_at: Час на публикуване + title: Заглавие models: decidim/blogs/create_post_event: Нова блог публикация activerecord: @@ -10,4 +16,82 @@ bg: decidim: blogs: actions: + author_id: Създаване на публикация като confirm_destroy: Сигурни ли сте, че желаете да изтриете тази публикация? + destroy: Изтрий + edit: Редактирай + new: Нова публикация + title: Активности + admin: + posts: + create: + invalid: Възникна проблем при създаването на тази публикация. + success: Публикацията беше създадена успешно. + destroy: + success: Публикацията беше изтрита успешно. + edit: + save: Актуализация + title: Редактиране на поста + index: + not_published_yet: Не публикувано все още. + title: Публикации + new: + create: Създаване + title: Създай публикация + update: + invalid: Възникна проблем при запазването на публикацията. + success: Публикацията беше запазена успешно. + admin_log: + post: + create: "%{user_name} създаде публикацията в блога %{resource_name} в %{space_name}" + delete: "%{user_name} изтри публикацията в блога %{resource_name} от %{space_name}" + update: "%{user_name} актуализира публикацията в блога %{resource_name} в %{space_name}" + content_blocks: + highlighted_posts: + last_published: Последно публикувано + name: Публикации + see_all: Виж всички публикации + last_activity: + new_post: 'Нова публикация:' + models: + post: + fields: + author: Автор + body: Основен текст + official_blog_post: Официална публикация + published_at: Час на публикуване + title: Заглавие + posts: + index: + count: + one: "%{count} публикация" + other: "%{count} публикации" + empty: Все още няма постове. + components: + blogs: + actions: + comment: Коментар + create: Създаване + destroy: Изтрий + endorse: Подкрепете + update: Актуализация + name: Блог + settings: + global: + announcement: Обявление + comments_enabled: Коментарите са разрешени + comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) + step: + announcement: Обявление + comments_blocked: Коментарите са блокирани + endorsements_blocked: Подкрепата е блокирана + endorsements_enabled: Подкрепата е активирана + events: + blogs: + post_created: + email_intro: Публикацията „%{resource_title}“ е публикувана в(ъв)%{participatory_space_title}“, което следвате. + email_outro: Получавате това известие, защото следвате "%{participatory_space_title}". Може да премахнете следването чрез предходния линк. + email_subject: Публикувана е нова публикация в(ъв) %{participatory_space_title} + notification_title: Публикацията %{resource_title} е публикувана в(ъв) %{participatory_space_title} + statistics: + posts_count: Постове diff --git a/decidim-blogs/spec/shared/manage_posts_examples.rb b/decidim-blogs/spec/shared/manage_posts_examples.rb index 5c4e363393c58..bd4d8518f1deb 100644 --- a/decidim-blogs/spec/shared/manage_posts_examples.rb +++ b/decidim-blogs/spec/shared/manage_posts_examples.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true -shared_examples "manage posts" do +# we really need the audit_check variable, as it seems that a process admin should not be able to see the admin logs +# Therefore, as long we do have the logs checks in this shared example, we need to have the config flag. +shared_examples "manage posts" do |audit_check: true| it_behaves_like "having a rich text editor for field", ".tabs-content[data-tabs-content='post-body-tabs']", "full" do before do within "tr", text: translated(post1.title) do @@ -8,8 +10,9 @@ end end end + let(:attributes) { attributes_for(:post) } - it "updates a post" do + it "updates a post", versioning: true do within "tr", text: translated(post1.title) do click_on "Edit" end @@ -17,20 +20,8 @@ within ".edit_post" do expect(page).to have_select("post_decidim_author_id", selected: translated(author.name)) - fill_in_i18n( - :post_title, - "#post-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) - fill_in_i18n_editor( - :post_body, - "#post-body-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:post_title, "#post-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:post_body, "#post-body-tabs", **attributes[:body].except("machine_translations")) find("*[type=submit]").click end @@ -38,30 +29,22 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My new title") + expect(page).to have_content(translated(attributes[:title])) expect(page).to have_content("Post title 2") expect(page).to have_content(translated(author.name)) end + + if audit_check == true + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} blog post") + end end - it "creates a new post" do + it "creates a new post", versioning: true do click_on "New post" - fill_in_i18n( - :post_title, - "#post-title-tabs", - en: "My post", - es: "Mi post", - ca: "El meu post" - ) - - fill_in_i18n_editor( - :post_body, - "#post-body-tabs", - en: "A description", - es: "Descripción", - ca: "Descripció" - ) + fill_in_i18n(:post_title, "#post-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:post_body, "#post-body-tabs", **attributes[:body].except("machine_translations")) within ".new_post" do find("*[type=submit]").click @@ -70,10 +53,15 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My post") + expect(page).to have_content(translated(attributes[:title])) expect(page).to have_content("Post title 1") expect(page).to have_content("Post title 2") end + + if audit_check == true + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} blog post") + end end describe "deleting a post" do diff --git a/decidim-blogs/spec/system/comments_spec.rb b/decidim-blogs/spec/system/comments_spec.rb new file mode 100644 index 0000000000000..d551198c426f6 --- /dev/null +++ b/decidim-blogs/spec/system/comments_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe "Comments", perform_enqueued: true do + let!(:component) { create(:post_component, organization:) } + let!(:commentable) { create(:post, component:) } + + let(:resource_path) { resource_locator(commentable).path } + + include_examples "comments" + + context "with comments blocked" do + let!(:component) { create(:post_component, participatory_space:, organization:) } + let(:participatory_space) { create(:participatory_process, :with_steps, organization:) } + + include_examples "comments blocked" + end +end diff --git a/decidim-blogs/spec/system/process_admin_manages_post_spec.rb b/decidim-blogs/spec/system/process_admin_manages_post_spec.rb index d87fe5d8051b3..02bd0652dcb0e 100644 --- a/decidim-blogs/spec/system/process_admin_manages_post_spec.rb +++ b/decidim-blogs/spec/system/process_admin_manages_post_spec.rb @@ -10,5 +10,5 @@ include_context "when managing a component as a process admin" - it_behaves_like "manage posts" + it_behaves_like "manage posts", audit_check: false end diff --git a/decidim-budgets/app/packs/stylesheets/budgets.scss b/decidim-budgets/app/packs/stylesheets/budgets.scss index 2db3116ef42e7..a60c974fe03cb 100644 --- a/decidim-budgets/app/packs/stylesheets/budgets.scss +++ b/decidim-budgets/app/packs/stylesheets/budgets.scss @@ -4,12 +4,8 @@ } &-summary { - @apply bg-tertiary; - - box-shadow: 0 4px 6px 0 rgba(211, 211, 211, 0.25); - &__content { - @apply p-4 md:p-0; + @apply bg-tertiary p-4 md:h-full md:p-0; } &__container { @@ -21,7 +17,7 @@ } &__content__header { - @apply col-span-2 text-2xl mb-2; + @apply col-span-2 text-2xl pb-2 mb-2; .ql-editor { @apply inline-block text-2xl; @@ -37,24 +33,20 @@ } &__progressbar { - @apply my-4 relative; + @apply my-0 lg:my-4 relative; .budget-progress { - @apply bg-white rounded; + @apply bg-white rounded h-2; } &--minimum { - @apply absolute; - - .progress-meter--minimum-mark { - @apply h-[20px] ml-auto w-[2px] bg-black block; - } + @apply absolute h-2 bg-gray-3 rounded-s; } &--meter { background-color: var(--success); - @apply h-[20px] rounded; + @apply h-2 rounded-s absolute; } } @@ -71,11 +63,11 @@ } &__progressbar-legend { - @apply text-sm block; + @apply text-xs md:text-sm block; } &__progressbar-legend-strong { - @apply font-bold block; + @apply font-semibold block text-[10px] md:text-sm text-nowrap; } } @@ -231,7 +223,23 @@ } .budget-summary__button-modal { - @apply col-span-12 mb-4 pb-4; + @apply hidden lg:text-secondary lg:block lg:col-span-12 lg:mb-4 lg:pb-4; +} + +.budget-summary__button-dropdown { + @apply col-span-12 text-secondary lg:hidden; + + &_text { + @apply flex gap-4 justify-start; + + svg { + @apply w-5 h-5; + } + } + + p { + @apply text-gray-4 font-normal text-[13px]; + } } .progressbox-fixed-wrapper { @@ -262,7 +270,11 @@ } .budget-summary__button-modal { - @apply col-span-10 col-start-2 justify-start; + @apply hidden lg:text-secondary lg:block lg:col-span-10 lg:col-start-2 lg:justify-start; + } + + .budget-summary__button-dropdown { + @apply block text-secondary col-span-10 col-start-2 justify-start lg:hidden; } .progressbox-fixed-wrapper { diff --git a/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb b/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb index a76b9935f6da5..b8d9d1ba6f3f7 100644 --- a/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb +++ b/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_progressbar_marks_right.html.erb @@ -1,5 +1,4 @@ - <%= t("budget", scope: "decidim.budgets.projects.order_progress") %> <% if current_order.projects_rule? %> <%= current_order.maximum_projects %> @@ -7,4 +6,5 @@ <%= budget_to_currency(budget.total_budget) %> <% end %> + <%= t("budget", scope: "decidim.budgets.projects.order_progress") %> diff --git a/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb b/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb index fb2b429924651..34da1e815715a 100644 --- a/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb +++ b/decidim-budgets/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb @@ -22,30 +22,29 @@
" aria-valuenow="<%= current_order_budget_percent %>" aria-valuetext="<%= current_order_budget_percent %> %" aria-valuemin="0" aria-valuemax="100">
-
- <%= t("assigned", scope: "decidim.budgets.projects.order_progress") %> " class="budget-summary__progressbar-legend-strong"> <%= render partial: "decidim/budgets/projects/order_total_budget" %> + <%= t("assigned", scope: "decidim.budgets.projects.order_progress") %> <% if current_order.minimum_budget > 0 %> - <%= t("minimum", scope: "decidim.budgets.projects.order_progress") %> <%= budget_to_currency(current_order.minimum_budget) %> + <%= t("minimum", scope: "decidim.budgets.projects.order_progress") %> <% end %> <%= render partial: "decidim/budgets/projects/order_progress_progressbar_marks_right" %>
-
+
<% if !current_order_checked_out? && voting_open? %>
+ +
+ + +
diff --git a/decidim-budgets/config/locales/ar.yml b/decidim-budgets/config/locales/ar.yml index 2d65c29a87a2f..065ac4d83c313 100644 --- a/decidim-budgets/config/locales/ar.yml +++ b/decidim-budgets/config/locales/ar.yml @@ -81,7 +81,6 @@ ar: update: "%{user_name} تحديث المشروع %{resource_name} في %{space_name} الفضاء" budget_information_modal: continue: مواصلة - more_information: المزيد من المعلومات budgets_list: budgets: الميزانيات models: diff --git a/decidim-budgets/config/locales/bg.yml b/decidim-budgets/config/locales/bg.yml index b860b043d3ec0..69c5cf2e1fedb 100644 --- a/decidim-budgets/config/locales/bg.yml +++ b/decidim-budgets/config/locales/bg.yml @@ -1,6 +1,387 @@ bg: activemodel: attributes: + budget: + decidim_scope_id: Обхват + description: Описание + title: Заглавие + total_budget: Общ бюджет + weight: Подредба на позиция project: + budget_amount: Бюджетна сума decidim_category_id: Категория decidim_scope_id: Сфера + description: Описание + proposal_ids: Свързани предложения + proposals: Предложения + selected: Избран за изпълнение + title: Заглавие + proposals_import: + scope_id: Обхват + activerecord: + models: + decidim/budgets/budget: + one: Бюджет + other: Бюджети + decidim/budgets/project: + one: Проект + other: Проекти + decidim: + admin: + filters: + projects: + category_id_eq: + label: Категория + scope_id_eq: + label: Обхват + selected_at_null: + label: Избрани + values: + 'false': Избран за изпълнение + 'true': Не избран за изпълнение + budgets: + actions: + attachment_collections: Папки + attachments: Прикачени файлове + confirm_destroy: Сигурни ли сте, че искате да изтриете този проект? + destroy: Изтрий + edit: Редактирай + edit_projects: Обедини проекти + import: Импортиране на предложения в проекти + new_budget: Нов бюджет + new_project: Нов проект + preview: Преглед + send_voting_reminders: Изпращайте напомняния за гласуване + title: Активности + admin: + budgets: + create: + invalid: Възникна проблем при създаването на този бюджет. + success: Бюджетът беше създаден успешно. + destroy: + invalid: Възникна проблем при изтриването на този бюджет. + success: Бюджетът беше изтрит успешно. + edit: + title: Редактиране на бюджет + update: Актуализиране на бюджета + index: + finished_orders: Приключили гласувания + pending_orders: Предстоящи гласувания + title: Бюджети + users_with_finished_orders: Потребители с приключили гласувания + users_with_pending_orders: Потребители с чакащи гласувания + new: + create: Създаване на бюджет + title: Нов бюджет + update: + invalid: Възникна проблем при актуализирането на този бюджет. + success: Бюджетът беше актуализиран успешно. + exports: + projects: Проекти + models: + budget: + name: Бюджет + project: + name: Проект + projects: + create: + invalid: Възникна проблем при създаването на този проект. + success: Проектът беше създаден успешно. + destroy: + success: Проектът беше изтрит успешно. + edit: + title: Редактиране на проект + update: Актуализация + index: + actions: Активности + cancel: Отказ + change_budget: Промяна на бюджета + change_category: Промяна на категория + change_scope: Промяна на обхвата + change_selected: Промяна на избраното състояние + deselect_implementation: Премахване на избора от внедряване + finished_orders: Приключили гласувания + pending_orders: Предстоящи гласувания + select_for_implementation: Избрано за внедряване + selected: Избрани + selected_options: + 'no': 'Не' + 'yes': 'Да' + title: Проекти + update: Актуализация + update_budget_button: Актуализирайте бюджета на проекта + update_scope_button: Актуализиране на обхвата + new: + create: Създаване + title: Нов проект + update: + invalid: Възникна проблем при актуализирането на този проект. + success: Проектът беше актуализиран успешно. + update_budget: + invalid: 'Тези проекти вече са в същия бюджет или техните бюджети са повече от максимално допустимия: %{projects}.' + select_a_project: Моля, изберете проект. + success: 'Проектите са актуализирани успешно до бюджета %{subject_name}: %{projects}.' + update_category: + invalid: 'Тези проекти вече имат категория %{subject_name}: %{projects}.' + select_a_category: Моля, изберете категория. + select_a_project: Моля, изберете проект. + success: 'Проектите са актуализирани успешно до категорията %{subject_name}: %{projects}.' + update_scope: + invalid: 'Тези проекти вече са имали %{subject_name} обхват: %{projects}.' + select_a_project: Моля, изберете проект. + select_a_scope: Моля, изберете обхват. + success: 'Проектите са актуализирани успешно до %{subject_name} обхват: %{projects}.' + update_selected: + invalid: + selected: 'Тези проекти вече бяха селектирани за внедряване: %{projects}.' + unselected: 'Тези проекти вече бяха премахнати от селекцията за внедряване: %{projects}.' + select_a_project: Моля, изберете проект. + select_a_selection: Моля, изберете състояние на внедряване. + success: + selected: 'Тези проекти бяха успешно селектирани за внедряване: %{projects}.' + unselected: 'Тези проекти бяха успешно премахнати от селекцията за внедряване: %{projects}.' + proposals_imports: + create: + invalid: Възникна проблем при импортирането на предложенията в проектите. + success: "%{number} предложения бяха импортирани успешно в проекти." + new: + create: Импортиране на предложения в проекти + default_budget: Бюджет по подразбиране + import_all_accepted_proposals: Импортиране на всички приети предложения + no_components: Няма други компоненти на предложения в това пространство за участие за импортиране на предложенията в проекти. + origin_component_id: Компонент за произход + select_component: Моля, изберете компонент + title: Импортиране на предложения в проекти + reminders: + orders: + description: Потребителите ще получат имейл с връзки към бюджетите, където имат чакащи заявки. + title: + one: На път сте да изпратите напомняне по имейл до %{count} потребител + other: На път сте да изпратите напомняне по имейл до %{count} потребители + admin_log: + budget: + create: "%{user_name} създаде бюджета %{resource_name} в пространството %{space_name}" + delete: "%{user_name} изтри бюджета %{resource_name} в пространството %{space_name}" + update: "%{user_name} актуализира бюджета %{resource_name} в пространството %{space_name}" + project: + create: "%{user_name} създаде проекта %{resource_name} в пространството %{space_name}" + delete: "%{user_name} изтри проекта %{resource_name} в пространството %{space_name}" + update: "%{user_name} актуализира проекта %{resource_name} в пространството %{space_name}" + budget_information_modal: + back_to: Назад към %{component_name} + close_modal: Затвори прозореца + continue: Продължи + more_information: Повече информация относно бюджета + budgets_list: + budgets: Бюджети + cancel_order: + more_than_one: да изтриете гласа си за %{name} и да започнете отначало + only_one: изтрийте гласа си и започнете отначало. + count: + one: "%{count} бюджет" + other: "%{count} бюджети" + empty: Все още няма бюджети + finished_message: Завършихте процеса на гласуване. Благодарим за участието! + highlighted_cta: Гласуване за %{name} + if_change_opinion: Ако сте променили решението си, можете + orders: + highest_cost: Най-висока стойност + label: Подреждане на бюджети по + lowest_cost: Най-ниска стойност + random: Случаен ред + progress: Завършете гласуването + remove_vote: Премахване на гласа + show: Вижте проектите + vote: Гласувай + voted_budgets: Гласувани бюджети + voted_on: Вие гласувахте за %{links}. + last_activity: + new_vote_at: Ново гласуване на бюджета на + limit_announcement: + cant_vote: Не можете да гласувате този бюджет. Опитайте с друг бюджет. + limit_reached: Имате активни гласувания в(ъв) %{links}. За да гласувате за този бюджет, трябва да изтриете гласуването си и да започнете отначало. + models: + budget: + fields: + name: Име + projects_count: Брой проекти + total_budget: Общ бюджет + project: + fields: + category: Категория + id: ID + map: Карта + title: Заглавие + order_summary_mailer: + order_summary: + selected_projects: 'Избраните от Вас проекти са:' + subject: Гласувахте в пространството за участие %{space_name} + voted_on_space: Гласувахте за бюджета %{budget_name} за пространството за участие %{space_name}. + voted_on_space_with_scope: Гласувахте за бюджета %{budget_name} за пространството за участие %{space_name} в(ъв) %{scope_name} (%{scope_type}). + projects: + budget_confirm: + are_you_sure: Ако размислите, може да промените гласа си по-късно. + cancel: Отказ + confirm: Потвърди + description: Това са проектите, които сте избрали да са част от бюджета. + title: Потвърждаване на гласуването + budget_excess: + budget_excess: + description: Този проект надвишава максималния бюджет и не може да бъде добавен. Ако искате, можете да изтриете проект, който вече сте избрали, за да може да се гласува отново, според вашите предпочитания. + title: Максималният бюджет е надвишен + description: Този проект надвишава максималния бюджет и не може да бъде добавен. Ако искате, можете да изтриете проект, който вече сте избрали, за да може да се гласува отново, според вашите предпочитания. + ok: ОК + projects_excess: + description: Този проект надхвърля максималния брой проекти и не може да бъде добавен. Ако искате, можете да изтриете проект, който вече сте избрали, за да можете да гласувате отново според вашите предпочитания. + title: Максималният брой проекти е надвишен + budget_summary: + are_you_sure: Сигурен ли сте, че искате да отмените гласа си? + cancel_order: изтрийте Вашия глас + checked_out: + description: Вие вече гласувахте бюджета. Ако сте променили решението си, можете да изтриете гласа си. + title: Гласуването за бюджета приключи + vote: Гласувайте бюджет + count: + projects_count: + one: 1 проект + other: "%{count} проекти" + empty: Все още няма проекти + exit_modal: + cancel: Върнете се към гласуването + exit: Изход от гласуването + message: Вашият глас не е регистриран, защото все още не сте завършили процеса на гласуване. Сигурни ли сте, че искате да излезете от гласуването? + title: Все още не сте гласували + filters: + category: Категория + scope: Обхват + search: Търсене + status: Статус + status_values: + all: Всички + not_selected: Не селектирано + selected: Селектирано + order_progress: + assigned: Възложен + budget: Бюджет + dynamic_help: + keep_adding_projects: Продължете да добавяте проекти + minimum_reached: Достигнахте минимума, за да можете да гласувате + start_adding_projects: Започнете да добавяте проекти + minimum: Минимум + minimum_projects_rule: + description: Изберете поне %{minimum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета. + projects_rule: + description: Изберете най-малко %{minimum_number}, но не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета. + projects_rule_maximum_only: + description: Изберете не повече от %{maximum_number} желани от Вас проекта и гласувайте, според предпочитанията си за дефиниране на бюджета. + vote_threshold_percent_rule: + description: Присъеденете поне %{minimum_budget} към желаните от вас проекти и гласувайте, според предпочитанията си за дефиниране на бюджета. + orders: + highest_cost: Най-висока стойност + label: Подреждане на проектите по + lowest_cost: Най-ниска стойност + most_voted: Най-гласувани + random: Случаен ред + selected: Селектирано + project: + add: Добавяне на проект %{resource_name} към Вашето гласуване. + remove: Премахване на проекта %{resource_name} от Вашето гласуване. + selected: Селектирано + votes: + one: глас + other: гласове + you_voted: Ти гласува за това + project_budget_button: + add: Добавяне + add_descriptive: Добавяне на проект %{resource_name} към Вашето гласуване. + added: Добавено + added_descriptive: Проектът %{resource_name} е добавен към Вашето гласуване. + project_filter: + added: Добавено + all: Всички + projects_for: Проекти за %{name} + select_projects: Изберете Проекти + show: + budget: Бюджет + prompt: Изберете бюджет + vote_reminder_mailer: + vote_reminder: + email_budgets: 'Области, в които имате незавършено гласуване:' + email_intro: Започнахте гласуването за бюджет на участието, но не сте го завършили. + email_link: Преминете към продължаване на гласуването + email_outro: Моля, не забравяйте да завършите гласуването. За да гласувате, първо трябва да изберете предложението или предложенията, за които искате да гласувате и след това да потвърдите гласа си с бутона „Гласувай“. + email_subject: + one: Имате незавършено гласуване в гласуването за бюджет на участието + other: Имате незавършени гласувания в гласуването за бюджет на участието + components: + budgets: + actions: + comment: Коментар + vote: Гласувай + name: Бюджети + settings: + global: + announcement: Обявление + comments_enabled: Коментарите са активирани + comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) + form: + errors: + budget_voting_rule_only_one: Трябва да бъде активирано само едно правило за гласуване. + budget_voting_rule_required: Изисква се едно правило за гласуване. + geocoding_enabled: Координатите са активирани + landing_page_content: Целева страница на „Бюджети“ + more_information_modal: Диалогов прозорец за повече информация + projects_per_page: Проекти на страница + resources_permissions_enabled: Права за действия могат да се задават за всеки проект + scope_id: Обхват + scopes_enabled: Обхватите са активирани + title: Заглавие + total_budget: Общ бюджет + vote_minimum_budget_projects_number: Минимален брой проекти за гласуване + vote_rule_minimum_budget_projects_enabled: 'Активиране на правило: Минимален брой проекти, за които да се гласува' + vote_rule_selected_projects_enabled: 'Активиране на правило: Минимален и максимален брой проекти за гласуване' + vote_rule_threshold_percent_enabled: 'Активиране на правило: Минимален процент на бюджета' + vote_selected_projects_maximum: Максимален брой проекти за избор + vote_selected_projects_minimum: Минимален брой проекти за избор + vote_threshold_percent: Процент на прага на гласовете + workflow: Работния процес + workflow_choices: + all: 'Гласувайте във всички: позволява на участниците да гласуват във всички бюджети.' + one: 'Гласувайте в един: позволява на участниците да гласуват във всеки бюджет, но само за един.' + step: + announcement: Обявление + comments_blocked: Коментарите са блокирани + highlighted_heading: Акцентирано заглавие + landing_page_content: Целева страница на „Бюджети“ + list_heading: Заглавие на списъка + more_information_modal: Диалогов прозорец за повече информация + show_votes: Показване на гласовете + title: Заглавие + votes: Гласуване + votes_choices: + disabled: Гласуването е деактивирано + enabled: Гласуването е активирано + finished: Гласуването е приключило + events: + budgets: + budget_published: + email_intro: 'Бюджетът %{resource_title} вече е активен за %{participatory_space_title}. Можете да го видите от тази страница:' + email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк. + email_subject: Бюджетът %{resource_title} вече е активен за %{participatory_space_title}. + notification_title: Бюджетът %{resource_title} вече е активен за %{participatory_space_title}. + orders: + checkout: + error: Възникна проблем при обработването на Вашия глас. + success_html:

Вашият глас беше приет успешно.

Можете да разгледате останали бюджети.

+ success_no_left_budgets_html: Вашият глас е приет успешно. + destroy: + error: Възникна проблем при отмяната на вашето гласуване. + success: Вашият глас беше отменен успешно. + resource_links: + included_proposals: + project_proposal: Предложения, включени в този проект + statistics: + orders_count: Подкрепа + projects_count: Проекти + index: + confirmed_orders_count: Брой гласове diff --git a/decidim-budgets/config/locales/ca.yml b/decidim-budgets/config/locales/ca.yml index f2267b6c883c8..89d8100a69508 100644 --- a/decidim-budgets/config/locales/ca.yml +++ b/decidim-budgets/config/locales/ca.yml @@ -171,7 +171,7 @@ ca: back_to: Tornar a %{component_name} close_modal: Tancar el modal continue: Continuar - more_information: Més informació + more_information: Més informació sobre el pressupost budgets_list: budgets: Pressupostos cancel_order: diff --git a/decidim-budgets/config/locales/cs.yml b/decidim-budgets/config/locales/cs.yml index 45849186c5b4c..6c707ba852789 100644 --- a/decidim-budgets/config/locales/cs.yml +++ b/decidim-budgets/config/locales/cs.yml @@ -177,7 +177,6 @@ cs: back_to: Zpět na %{component_name} close_modal: Zavřít okno continue: Pokračovat - more_information: Více informací budgets_list: budgets: Rozpočty cancel_order: diff --git a/decidim-budgets/config/locales/de.yml b/decidim-budgets/config/locales/de.yml index ea6ee48443b0d..bb1972eafe696 100644 --- a/decidim-budgets/config/locales/de.yml +++ b/decidim-budgets/config/locales/de.yml @@ -171,7 +171,7 @@ de: back_to: Zurück zu %{component_name} close_modal: Dialog schließen continue: Weiter - more_information: Mehr Informationen + more_information: Weitere Informationen zum Budget budgets_list: budgets: Budgets cancel_order: diff --git a/decidim-budgets/config/locales/el.yml b/decidim-budgets/config/locales/el.yml index 456cb9e8cd571..8f8c54430433c 100644 --- a/decidim-budgets/config/locales/el.yml +++ b/decidim-budgets/config/locales/el.yml @@ -156,7 +156,6 @@ el: back_to: Πίσω στο %{component_name} close_modal: Κλείσιμο παραθύρου continue: Συνέχεια - more_information: Περισσότερες πληροφορίες budgets_list: cancel_order: more_than_one: διαγράψτε την ψήφο σας στο %{name} και ξεκινήστε από την αρχή diff --git a/decidim-budgets/config/locales/en.yml b/decidim-budgets/config/locales/en.yml index a8f174dfc4aba..ee8f2ac008192 100644 --- a/decidim-budgets/config/locales/en.yml +++ b/decidim-budgets/config/locales/en.yml @@ -172,7 +172,7 @@ en: back_to: Back to %{component_name} close_modal: Close modal continue: Continue - more_information: More information + more_information: More information about budget budgets_list: budgets: Budgets cancel_order: diff --git a/decidim-budgets/config/locales/es-MX.yml b/decidim-budgets/config/locales/es-MX.yml index 94b3c7789e36f..bd601f2de1f7f 100644 --- a/decidim-budgets/config/locales/es-MX.yml +++ b/decidim-budgets/config/locales/es-MX.yml @@ -168,7 +168,7 @@ es-MX: back_to: Volver a %{component_name} close_modal: Cierra el modal continue: Continuar - more_information: Más información + more_information: Más información sobre el presupuesto budgets_list: budgets: Presupuestos cancel_order: diff --git a/decidim-budgets/config/locales/es-PY.yml b/decidim-budgets/config/locales/es-PY.yml index 8b66cca5fd227..b9bd994d79b85 100644 --- a/decidim-budgets/config/locales/es-PY.yml +++ b/decidim-budgets/config/locales/es-PY.yml @@ -171,7 +171,7 @@ es-PY: back_to: Volver a %{component_name} close_modal: Cierra el modal continue: Continuar - more_information: Más información + more_information: Más información sobre el presupuesto budgets_list: budgets: Presupuestos cancel_order: diff --git a/decidim-budgets/config/locales/es.yml b/decidim-budgets/config/locales/es.yml index c1e3da3906fa6..8e42f9fa234e6 100644 --- a/decidim-budgets/config/locales/es.yml +++ b/decidim-budgets/config/locales/es.yml @@ -171,7 +171,7 @@ es: back_to: Volver a %{component_name} close_modal: Cierra el modal continue: Continuar - more_information: Más información + more_information: Más información sobre el presupuesto budgets_list: budgets: Presupuestos cancel_order: diff --git a/decidim-budgets/config/locales/eu.yml b/decidim-budgets/config/locales/eu.yml index bc256e4667d99..a3dae81084f65 100644 --- a/decidim-budgets/config/locales/eu.yml +++ b/decidim-budgets/config/locales/eu.yml @@ -168,7 +168,6 @@ eu: back_to: Itzuli hona %{component_name} close_modal: Itxi modala continue: Jarraitu - more_information: Informazio gehiago budgets_list: budgets: Aurrekontuak cancel_order: diff --git a/decidim-budgets/config/locales/fi-plain.yml b/decidim-budgets/config/locales/fi-plain.yml index 077466c114c59..7d63ea8df06b3 100644 --- a/decidim-budgets/config/locales/fi-plain.yml +++ b/decidim-budgets/config/locales/fi-plain.yml @@ -171,7 +171,6 @@ fi-pl: back_to: Takaisin %{component_name} close_modal: Sulje ikkuna continue: Jatka - more_information: Lisätietoa budgets_list: budgets: Budjetit cancel_order: diff --git a/decidim-budgets/config/locales/fi.yml b/decidim-budgets/config/locales/fi.yml index 76331e29dd541..4a8d02fb96077 100644 --- a/decidim-budgets/config/locales/fi.yml +++ b/decidim-budgets/config/locales/fi.yml @@ -171,7 +171,6 @@ fi: back_to: Takaisin %{component_name} close_modal: Sulje ikkuna continue: Jatka - more_information: Lisätietoa budgets_list: budgets: Budjetit cancel_order: diff --git a/decidim-budgets/config/locales/fr-CA.yml b/decidim-budgets/config/locales/fr-CA.yml index 8fdea68ff3078..c22f9e2a9327b 100644 --- a/decidim-budgets/config/locales/fr-CA.yml +++ b/decidim-budgets/config/locales/fr-CA.yml @@ -171,7 +171,7 @@ fr-CA: back_to: Retour à %{component_name} close_modal: Fermer la fenêtre de dialogue continue: Continuer - more_information: Plus d'information + more_information: Plus d'informations sur le budget budgets_list: budgets: Budgets cancel_order: @@ -185,9 +185,9 @@ fr-CA: highlighted_cta: Voter pour %{name} if_change_opinion: Si vous avez changé d’avis, vous pouvez orders: - highest_cost: Coût le plus élevé - label: Classer les projets par - lowest_cost: Coût le moins élevé + highest_cost: Coût décroissant + label: Trier les budgets par + lowest_cost: Coût croissant random: Ordre aléatoire progress: Terminer le vote remove_vote: Retirer le vote diff --git a/decidim-budgets/config/locales/fr.yml b/decidim-budgets/config/locales/fr.yml index fb5eeecd9e99e..8a32ebc6cd3ef 100644 --- a/decidim-budgets/config/locales/fr.yml +++ b/decidim-budgets/config/locales/fr.yml @@ -171,7 +171,7 @@ fr: back_to: Retour à %{component_name} close_modal: Fermer la fenêtre de dialogue continue: Continuer - more_information: Plus d'information + more_information: Plus d'informations sur le budget budgets_list: budgets: Budgets cancel_order: @@ -185,9 +185,9 @@ fr: highlighted_cta: Voter pour %{name} if_change_opinion: Si vous avez changé d’avis, vous pouvez orders: - highest_cost: Coût le plus élevé - label: Classer les projets par - lowest_cost: Coût le moins élevé + highest_cost: Coût décroissant + label: Trier les budgets par + lowest_cost: Coût croissant random: Ordre aléatoire progress: Terminer le vote remove_vote: Retirer le vote diff --git a/decidim-budgets/config/locales/gl.yml b/decidim-budgets/config/locales/gl.yml index be3afe883f608..3e33d17d943fb 100644 --- a/decidim-budgets/config/locales/gl.yml +++ b/decidim-budgets/config/locales/gl.yml @@ -94,7 +94,6 @@ gl: back_to: Volver a %{component_name} close_modal: Pechar modal continue: Continuar - more_information: Máis información budgets_list: cancel_order: more_than_one: eliminar o teu voto de %{name} e comezar de novo diff --git a/decidim-budgets/config/locales/hu.yml b/decidim-budgets/config/locales/hu.yml index 9f08207fb74d5..e4fd17cc79fab 100644 --- a/decidim-budgets/config/locales/hu.yml +++ b/decidim-budgets/config/locales/hu.yml @@ -164,7 +164,6 @@ hu: back_to: Vissza a(z) %{component_name} komponenshez close_modal: Ablak bezárás continue: Folytatás - more_information: További információk budgets_list: budgets: Költségvetések cancel_order: diff --git a/decidim-budgets/config/locales/it.yml b/decidim-budgets/config/locales/it.yml index 2ef6e4f6d3799..c17668195d746 100644 --- a/decidim-budgets/config/locales/it.yml +++ b/decidim-budgets/config/locales/it.yml @@ -83,7 +83,6 @@ it: back_to: Torna a %{component_name} close_modal: Chiudi modalità continue: Prosegui - more_information: Altre informazioni budgets_list: cancel_order: more_than_one: elimina il tuo voto su %{name} e ricomincia diff --git a/decidim-budgets/config/locales/ja.yml b/decidim-budgets/config/locales/ja.yml index 659cbc175c706..74f4b71e65856 100644 --- a/decidim-budgets/config/locales/ja.yml +++ b/decidim-budgets/config/locales/ja.yml @@ -168,7 +168,6 @@ ja: back_to: '%{component_name} に戻る' close_modal: ウィンドウを閉じる continue: 続行 - more_information: 詳細情報 budgets_list: budgets: 予算 cancel_order: diff --git a/decidim-budgets/config/locales/lb.yml b/decidim-budgets/config/locales/lb.yml index 8e55cf2bfd801..7ae8b7eaab87e 100644 --- a/decidim-budgets/config/locales/lb.yml +++ b/decidim-budgets/config/locales/lb.yml @@ -77,7 +77,6 @@ lb: back_to: Zurück zu %{component_name} close_modal: Dialog schließen continue: Weiter - more_information: Mehr Informationen budgets_list: cancel_order: more_than_one: lösche deine Stimme am %{name} und beginne neu diff --git a/decidim-budgets/config/locales/lt.yml b/decidim-budgets/config/locales/lt.yml index 1c3414b72bc93..9da46c9331601 100644 --- a/decidim-budgets/config/locales/lt.yml +++ b/decidim-budgets/config/locales/lt.yml @@ -160,7 +160,6 @@ lt: back_to: Atgal į %{component_name} close_modal: Uždaryti modalinį langą continue: Tęsti - more_information: Daugiau informacijos budgets_list: budgets: Biudžetai cancel_order: diff --git a/decidim-budgets/config/locales/nl.yml b/decidim-budgets/config/locales/nl.yml index 4b5c751b23546..9db04ed276c00 100644 --- a/decidim-budgets/config/locales/nl.yml +++ b/decidim-budgets/config/locales/nl.yml @@ -119,7 +119,6 @@ nl: back_to: Terug naar %{component_name} close_modal: Sluit venster continue: Doorgaan - more_information: Meer informatie budgets_list: cancel_order: more_than_one: verwijder je stem op %{name} en begin opnieuw diff --git a/decidim-budgets/config/locales/no.yml b/decidim-budgets/config/locales/no.yml index 349ad0c0f6246..3653892e52dc9 100644 --- a/decidim-budgets/config/locales/no.yml +++ b/decidim-budgets/config/locales/no.yml @@ -101,7 +101,6 @@ back_to: Tilbake til %{component_name} close_modal: Lukk dialogboks continue: Fortsett - more_information: Mer informasjon budgets_list: cancel_order: more_than_one: slett stemmen din på %{name} og start på nytt diff --git a/decidim-budgets/config/locales/pl.yml b/decidim-budgets/config/locales/pl.yml index 2402bf6d9d29f..a2f685c4c5776 100644 --- a/decidim-budgets/config/locales/pl.yml +++ b/decidim-budgets/config/locales/pl.yml @@ -167,7 +167,6 @@ pl: back_to: Wróć do %{component_name} close_modal: Zamknij okno continue: Dalej - more_information: Więcej informacji budgets_list: budgets: Budżety cancel_order: diff --git a/decidim-budgets/config/locales/pt-BR.yml b/decidim-budgets/config/locales/pt-BR.yml index ff18855a5bbdd..d90367bea859e 100644 --- a/decidim-budgets/config/locales/pt-BR.yml +++ b/decidim-budgets/config/locales/pt-BR.yml @@ -165,7 +165,6 @@ pt-BR: back_to: Voltar para %{component_name} close_modal: Fechar modal continue: Continuar - more_information: Mais informação budgets_list: cancel_order: more_than_one: exclua seu voto em %{name} e comece de novo diff --git a/decidim-budgets/config/locales/pt.yml b/decidim-budgets/config/locales/pt.yml index 68a8d990dfafb..17fe02b4cfc8c 100644 --- a/decidim-budgets/config/locales/pt.yml +++ b/decidim-budgets/config/locales/pt.yml @@ -83,7 +83,6 @@ pt: back_to: Voltar para %{component_name} close_modal: Fechar o modal continue: Continuar - more_information: Mais informação budgets_list: cancel_order: more_than_one: apague o seu voto em %{name} e comece de novo diff --git a/decidim-budgets/config/locales/ro-RO.yml b/decidim-budgets/config/locales/ro-RO.yml index 0ed57b01398f8..d2a28415f0433 100644 --- a/decidim-budgets/config/locales/ro-RO.yml +++ b/decidim-budgets/config/locales/ro-RO.yml @@ -108,7 +108,6 @@ ro: back_to: Înapoi la %{component_name} close_modal: Închide fereastra continue: Continuă - more_information: Mai multe informații budgets_list: cancel_order: more_than_one: șterge votul tău pentru %{name} și reia procesul diff --git a/decidim-budgets/config/locales/sv.yml b/decidim-budgets/config/locales/sv.yml index d2877fa38b76f..dee10d2a1b480 100644 --- a/decidim-budgets/config/locales/sv.yml +++ b/decidim-budgets/config/locales/sv.yml @@ -110,7 +110,6 @@ sv: back_to: Tillbaka till %{component_name} close_modal: Stäng fönster continue: Fortsätt - more_information: Mer information budgets_list: budgets: Budgetar cancel_order: diff --git a/decidim-budgets/config/locales/tr-TR.yml b/decidim-budgets/config/locales/tr-TR.yml index 66a6fa65b499f..0738534df7f54 100644 --- a/decidim-budgets/config/locales/tr-TR.yml +++ b/decidim-budgets/config/locales/tr-TR.yml @@ -80,12 +80,16 @@ tr: back_to: '%{component_name} öğesine geri dön' close_modal: Pencereyi kapat continue: Devam et - more_information: Daha fazla bilgi budgets_list: cancel_order: more_than_one: '%{name} üzerindeki oyunuzu silin ve baştan başlayın' only_one: oyunuzu silin ve baştan başlayın. highlighted_cta: '%{name} için oy verin' + orders: + highest_cost: En Yüksek Maliyet + label: Bütçeleri Sıralama + lowest_cost: En Düşük Maliyet + random: Rastgele Sıralama limit_announcement: limit_reached: '%{links} alanında aktif oylarınız var. Bu bütçeye oy vermek için oyunuzu silmeli ve baştan başlamalısınız .' models: diff --git a/decidim-budgets/config/locales/zh-CN.yml b/decidim-budgets/config/locales/zh-CN.yml index 70ac7b7404272..ba3f82b2ecf9b 100644 --- a/decidim-budgets/config/locales/zh-CN.yml +++ b/decidim-budgets/config/locales/zh-CN.yml @@ -74,7 +74,6 @@ zh-CN: back_to: 返回 %{component_name} close_modal: 关闭模式 continue: 继续 - more_information: 更多信息 budgets_list: cancel_order: more_than_one: 删除您对 %{name} 的投票并开始 diff --git a/decidim-budgets/config/locales/zh-TW.yml b/decidim-budgets/config/locales/zh-TW.yml index ca3c0573bf25d..45bd7ca3f650e 100644 --- a/decidim-budgets/config/locales/zh-TW.yml +++ b/decidim-budgets/config/locales/zh-TW.yml @@ -154,7 +154,6 @@ zh-TW: back_to: 返回 %{component_name} close_modal: 關閉視窗 continue: 繼續 - more_information: 更多資訊 budgets_list: cancel_order: more_than_one: 刪除您對於 %{name} 的投票並重新開始 diff --git a/decidim-budgets/spec/shared/manage_projects_examples.rb b/decidim-budgets/spec/shared/manage_projects_examples.rb index 869de60dd243e..9f77f84f8095f 100644 --- a/decidim-budgets/spec/shared/manage_projects_examples.rb +++ b/decidim-budgets/spec/shared/manage_projects_examples.rb @@ -139,26 +139,16 @@ end end - it "creates a new project", :slow do + let(:attributes) { attributes_for(:project) } + + it "creates a new project", versioning: true do within ".bulk-actions-budgets" do click_on "New project" end within ".new_project" do - fill_in_i18n( - :project_title, - "#project-title-tabs", - en: "My project", - es: "Mi proyecto", - ca: "El meu projecte" - ) - fill_in_i18n_editor( - :project_description, - "#project-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:project_title, "#project-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:project_description, "#project-description-tabs", **attributes[:description].except("machine_translations")) fill_in :project_budget_amount, with: 22_000_000 select translated(scope.name), from: :project_decidim_scope_id @@ -170,8 +160,10 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My project") + expect(page).to have_content(translated(attributes[:title])) end + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} project") end context "when deleting a project" do @@ -197,20 +189,16 @@ context "when having existing proposals" do let!(:proposal_component) { create(:proposal_component, participatory_space:) } let!(:proposals) { create_list(:proposal, 5, component: proposal_component) } + let(:attributes) { attributes_for(:project) } - it "updates a project" do + it "updates a project", versioning: true do within "tr", text: translated(project.title) do click_on "Edit" end within ".edit_project" do - fill_in_i18n( - :project_title, - "#project-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + fill_in_i18n(:project_title, "#project-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:project_description, "#project-description-tabs", **attributes[:description].except("machine_translations")) tom_select("#proposals_list", option_id: proposals.last(2).map(&:id)) @@ -220,8 +208,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My new title") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} project") end it "removes proposals from project", :slow do diff --git a/decidim-budgets/spec/system/admin_manages_budgets_spec.rb b/decidim-budgets/spec/system/admin_manages_budgets_spec.rb index 346b5ae32a7b2..676bd2ccea57d 100644 --- a/decidim-budgets/spec/system/admin_manages_budgets_spec.rb +++ b/decidim-budgets/spec/system/admin_manages_budgets_spec.rb @@ -3,12 +3,12 @@ require "spec_helper" describe "Admin manages budgets" do - let(:budget) { create(:budget, component: current_component) } + let!(:budget) { create(:budget, component: current_component) } let(:manifest_name) { "budgets" } + let(:attributes) { attributes_for(:budget) } include_context "when managing a component as an admin" before do - budget switch_to_host(organization.host) login_as user, scope: :user visit_component_admin @@ -20,24 +20,13 @@ it_behaves_like "having a rich text editor", "new_budget", "content" end - it "creates a new budget" do + it "creates a new budget", versioning: true do click_on "New budget" within ".new_budget" do - fill_in_i18n( - :budget_title, - "#budget-title-tabs", - en: "My Budget", - es: "Mi Presupuesto", - ca: "El meu Pressupost" - ) - fill_in_i18n_editor( - :budget_description, - "#budget-description-tabs", - en: "Long description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:budget_title, "#budget-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:budget_description, "#budget-description-tabs", **attributes[:description].except("machine_translations")) + fill_in :budget_weight, with: 1 fill_in :budget_total_budget, with: 100_000_00 select translated(scope.name), from: :budget_decidim_scope_id @@ -48,24 +37,22 @@ expect(page).to have_admin_callout("Budget successfully created.") within "table" do - expect(page).to have_content("My Budget") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} budget") end - describe "updating a budget" do + describe "updating a budget", versioning: true do it "updates a budget" do within "tr", text: translated(budget.title) do page.find(".action-icon--edit").click end within ".edit_budget" do - fill_in_i18n( - :budget_title, - "#budget-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + fill_in_i18n(:budget_title, "#budget-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:budget_description, "#budget-description-tabs", **attributes[:description].except("machine_translations")) end click_on "Update budget" @@ -73,8 +60,11 @@ expect(page).to have_admin_callout("Budget successfully updated.") within "table" do - expect(page).to have_content("My new title") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} budget") end end diff --git a/decidim-budgets/spec/system/admin_manages_projects_spec.rb b/decidim-budgets/spec/system/admin_manages_projects_spec.rb index 96feff19e61fe..5d8f895010fa7 100644 --- a/decidim-budgets/spec/system/admin_manages_projects_spec.rb +++ b/decidim-budgets/spec/system/admin_manages_projects_spec.rb @@ -4,14 +4,13 @@ describe "Admin manages projects" do let(:manifest_name) { "budgets" } - let(:budget) { create(:budget, component: current_component) } + let!(:budget) { create(:budget, component: current_component) } let!(:project) { create(:project, budget:) } let!(:destination_budget) { create(:budget, component: current_component) } include_context "when managing a component as an admin" before do - budget switch_to_host(organization.host) login_as user, scope: :user visit_component_admin diff --git a/decidim-budgets/spec/system/comments_spec.rb b/decidim-budgets/spec/system/comments_spec.rb index 00f5b3a48b38b..c0c9e35723e3e 100644 --- a/decidim-budgets/spec/system/comments_spec.rb +++ b/decidim-budgets/spec/system/comments_spec.rb @@ -10,6 +10,13 @@ include_examples "comments" + context "with comments blocked" do + let!(:component) { create(:budgets_component, participatory_space:, organization:) } + let(:participatory_space) { create(:participatory_process, :with_steps, organization:) } + + include_examples "comments blocked" + end + context "when requesting the comments index with a non-XHR request" do it "redirects the user to the correct commentable path" do visit decidim_comments.comments_path(commentable_gid: commentable.to_signed_global_id.to_s) diff --git a/decidim-budgets/spec/system/orders_spec.rb b/decidim-budgets/spec/system/orders_spec.rb index b39a890afa513..b0f288d89502f 100644 --- a/decidim-budgets/spec/system/orders_spec.rb +++ b/decidim-budgets/spec/system/orders_spec.rb @@ -109,7 +109,7 @@ it "displays total budget" do within ".budget-summary", match: :first do - expect(page).to have_content("Budget\n€0") + expect(page).to have_content("€0\nBudget") end end end @@ -129,7 +129,7 @@ expect(page).to have_css ".budget-list__data--added", count: 1 within ".budget-summary__progressbar-marks", match: :first do - expect(page).to have_content(/Assigned\s€25,000,000/) + expect(page).to have_content(/€25,000,000\sAssigned/) end within ".budget__list--header" do expect(page).to have_content(/Added\s1/) @@ -162,7 +162,7 @@ expect(page).to have_css ".budget-list__data--added", count: 1 within ".budget-summary__progressbar-marks", match: :first do - expect(page).to have_content(/Assigned\s€25,000,000/) + expect(page).to have_content(/€25,000,000\sAssigned/) end within ".budget__list--header" do expect(page).to have_content(/Added\s1/) @@ -278,7 +278,7 @@ visit_budget within ".budget-summary__progressbar-marks", match: :first do - expect(page).to have_content(/Assigned\s€25,000,000/) + expect(page).to have_content(/€25,000,000\sAssigned/) end within ".budget__list--header" do expect(page).to have_content(/Added\s1/) @@ -289,7 +289,7 @@ end within ".budget-summary__progressbar-marks", match: :first do - expect(page).to have_content(/Assigned\s€0/) + expect(page).to have_content(/€0\sAssigned/) end within ".budget__list--header" do expect(page).to have_content(/Added\s0/) @@ -671,14 +671,14 @@ end end - context "with supports enabled" do + context "with votes enabled" do let(:proposal_component) do create(:proposal_component, :with_votes_enabled, participatory_space: project.component.participatory_space) end let(:proposals) { create_list(:proposal, 1, :with_votes, component: proposal_component) } - it "does not show the amount of supports" do + it "does not show the amount of votes" do visit_budget click_on translated(project.title) diff --git a/decidim-comments/app/cells/decidim/comments/comments_cell.rb b/decidim-comments/app/cells/decidim/comments/comments_cell.rb index 79cc298661940..af497a65464d2 100644 --- a/decidim-comments/app/cells/decidim/comments/comments_cell.rb +++ b/decidim-comments/app/cells/decidim/comments/comments_cell.rb @@ -27,7 +27,7 @@ def comments_loading def blocked_comments_warning return unless comments_blocked? - return unless user_comments_blocked? + return if user_comments_blocked? render :blocked_comments_warning end diff --git a/decidim-comments/config/locales/bg.yml b/decidim-comments/config/locales/bg.yml index cd320a6d37c3c..96f29917047dc 100644 --- a/decidim-comments/config/locales/bg.yml +++ b/decidim-comments/config/locales/bg.yml @@ -3,4 +3,173 @@ bg: models: decidim/comments/comment_by_followed_user_event: Коментар decidim/comments/comment_created_event: Коментар + decidim/comments/comment_upvoted_event: Коментарът е одобрен decidim/comments/reply_created_event: Отговор на коментар + decidim/comments/user_group_mentioned_event: Споменаване + decidim/comments/user_mentioned_event: Споменаване + activerecord: + models: + decidim/comments/comment: + one: Коментар + other: Коментари + decidim/comments/comment_vote: + one: Глас + other: Гласове + decidim: + comments: + admin: + shared: + availability_fields: + enabled: Коментарите са активирани + end_time: Коментарите са активирани до + start_time: Коментарите са активирани от + comments: + create: + error: Възникна проблем при създаването на коментара. + delete: + error: Коментарът не може да бъде изтрит. + update: + error: Възникна проблем при актуализирането на коментара. + comments_title: Коментар + last_activity: + new_comment: 'Нов коментар:' + votes: + create: + error: Възникна проблем с гласуването за коментара. + components: + add_comment_form: + account_message: Влезте в профила си или се регистрирайте, за да добавите Вашия коментар. + form: + body: + label: Коментар + placeholder: Какво мислите за това? + form_error: Текстът е задължителен и не може да е по-дълъг от %{length} символа. + submit_reply: Публикуване на отговор + submit_root_comment: Публикуване на коментар + user_group_id: + label: Коментирайте като + opinion: + label: Вашето мнение по тази тема + negative: Негативно + negative_selected: Вашето мнение по тази тема е негативно + neutral: Неутрално + neutral_selected: Вашето мнение по тази тема е неутрално + positive: Позитивно + positive_selected: Вашето мнение по тази тема е позитивно + remaining_characters: "Оставащи символи: %{count}" + remaining_characters_1: "%{count} оставащ символ" + title: Добавете Вашия коментар + comment: + alignment: + against: Против + in_favor: Подкрепям + cancel_reply: Отказ от отговор + comment_label: Коментар %{comment_id} + comment_label_reply: Коментар %{comment_id} (отговор на коментар %{parent_comment_id}) + confirm_destroy: Сигурни ли сте, че искате да изтриете този коментар? + controls_label: Контроли за коментари + delete: Изтрий + deleted_at: Коментарът е изтрит на %{date} + deleted_user: Изтрит участник + edit: Редактирай + edited: Редактирано + hide_replies: + one: Скриване на отговора + other: Скриване на %{count} отговора + moderated_at: Коментарът е модериран на %{date} + reply: Отговори + report: + action: Доклад + already_reported: Това съдържание вече е докладвано и ще бъде прегледано от администратор. + close: Затвори + description: Това съдържание неподходящо ли е? + details: Допълнителни коментари + reasons: + does_not_belong: Съдържа незаконна дейност, заплахи за самоубийство, лична информация или нещо друго, което смятате, че не принадлежи на %{organization_name}. + offensive: Съдържа расизъм, сексизъм, злословия, лични атаки, заплахи за смърт, заявки за самоубийство или всякаква форма на омраза. + spam: Съдържа примамка за кликване, реклама, измами или скриптове. + title: Докладване за неподходящо съдържание + show_replies: + one: Показване на отговора + other: Показване на %{count} отговора + single_comment_link_title: Вземете линка + comment_order_selector: + order: + best_rated: С най-висока оценка + most_discussed: Най-обсъждани + older: По-старо + recent: Скорошни + title: 'Подреди по:' + comments: + blocked_comments_for_unauthorized_user_warning: Трябва да сте верифицирани, за да коментирате в този момент, но можете да прочетете предишните. + blocked_comments_for_user_warning: Понастоящем не можете да коментирате, но можете да прочетете предходните коментари. + blocked_comments_warning: Коментарите в момента са деактивирани, но можете да прочетете предишните. + comment_details_title: Детайли за коментара + loading: Коментарите се зареждат... + single_comment_warning: Вижте всички коментари + single_comment_warning_title: Виждате единичен коментар + title: + one: "%{count} коментар" + other: "%{count} коментари" + down_vote_button: + text: Не съм съгласен с този коментар + edit_comment_modal_form: + close: Затвори + form: + body: + label: Коментар + placeholder: Какво мислите за това? + submit: Изпрати + title: Редактирайте Вашия коментар + up_vote_button: + text: Съгласен съм с този коментар + events: + comments: + comment_by_followed_user: + email_intro: "%{author_name} остави коментар в %{resource_title}. Можете да го прочетете на тази страница:" + email_outro: Получихте това известие, защото следвате %{author_name}. Можете да спрете да следвате този потребител от страницата на неговия профил. + email_subject: Има нов коментар от %{author_name} в(ъв) %{resource_title} + notification_title: Има нов коментар от %{author_name} %{author_nickname} в(ъв) %{resource_title}. + comment_by_followed_user_group: + email_intro: 'Групата %{author_name} остави коментар в(ъв) %{resource_title}. Можете да го прочетете на следната страница:' + email_outro: Получавате това известие, защото следвате %{author_name}. Можете да спрете да следвате тази група от страницата на профила ѝ. + email_subject: Има нов коментар от %{author_name} в(ъв) %{resource_title} + notification_title: Има нов коментар от %{author_name} %{author_nickname} в(ъв) %{resource_title}. + comment_created: + email_intro: "%{resource_title} получи коментар. Можете да прочетете коментара на тази страница:" + email_outro: Получавате това известие, защото следвате „%{resource_title}“ или неговия автор. Можете да прекратите следването от предходната връзка. + email_subject: Има нов коментар от %{author_name} по %{resource_title} + notification_title: Има нов коментар от %{author_name} %{author_nickname} по %{resource_title} + comment_downvoted: + email_intro: Вашият коментар в „%{resource_title}“ беше гласуван против. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против. + email_outro: Получихте това известие, защото вие сте авторът на този коментар. + email_subject: Вашият коментар в „%{resource_title}“ беше гласуван против. + notification_title: Вашият коментар в „%{resource_title}“ беше гласуван против. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против. + comment_upvoted: + email_intro: Коментарът ви в „%{resource_title}“ беше гласуван в подкрепа. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против. + email_outro: Получихте това известие, защото вие сте авторът на този коментар. + email_subject: Коментарът ви в „%{resource_title}“ беше гласуван в подкрепа. + notification_title: Вашият коментар в „%{resource_title}“ получи положителен глас. Вече има общо %{upvotes} гласа за и %{downvotes} гласа против. + reply_created: + email_intro: "%{author_name} отговори на вашия коментар в %{resource_title}. Можете да го прочетете на тази страница:" + email_outro: Получавате това известие, защото някой отговори на коментара Ви. + email_subject: "%{author_name} отговори на коментара Ви по %{resource_title}" + notification_title: %{author_name} %{author_nickname} отговори на коментара Ви по %{resource_title} + user_group_mentioned: + email_intro: Група, към която принадлежите, беше спомената + email_outro: Получавате това известие, защото сте член на групата %{group_name}, която беше спомената в(ъв) %{resource_title}. + email_subject: Бяхте споменати в(ъв) %{resource_title} като член на %{group_name} + notification_title: %{author_name} %{author_nickname} Ви спомена в(ъв) %{resource_title} като член на %{group_name} %{group_nickname} + user_mentioned: + email_intro: Бяхте споменати + email_outro: Получавате това известие, защото бяхте споменати в(ъв) %{resource_title}. + email_subject: Бяхте споменати в(ъв) %{resource_title} + notification_title: %{author_name} %{author_nickname} Ви спомена в(ъв) %{resource_title} + metrics: + comments: + description: Брой коментари генерирани от участници + object: коментари + title: Коментари + errors: + messages: + cannot_have_comments: не може да има коментари diff --git a/decidim-comments/config/locales/fr-CA.yml b/decidim-comments/config/locales/fr-CA.yml index 446696785c77e..08e8895dd4905 100644 --- a/decidim-comments/config/locales/fr-CA.yml +++ b/decidim-comments/config/locales/fr-CA.yml @@ -73,6 +73,9 @@ fr-CA: deleted_user: Utilisateur supprimé edit: Modifier edited: Modifié + hide_replies: + one: Masquer la réponse + other: Masquer {count} réponses moderated_at: Commentaire modéré le %{date} reply: Répondre report: diff --git a/decidim-comments/config/locales/fr.yml b/decidim-comments/config/locales/fr.yml index 71ca1ce15a631..ca6996119b67d 100644 --- a/decidim-comments/config/locales/fr.yml +++ b/decidim-comments/config/locales/fr.yml @@ -73,6 +73,9 @@ fr: deleted_user: Utilisateur supprimé edit: Modifier edited: Modifié + hide_replies: + one: Masquer la réponse + other: Masquer {count} réponses moderated_at: Commentaire modéré le %{date} reply: Répondre report: diff --git a/decidim-comments/config/locales/tr-TR.yml b/decidim-comments/config/locales/tr-TR.yml index 0ead7c5058117..86bdef3558fda 100644 --- a/decidim-comments/config/locales/tr-TR.yml +++ b/decidim-comments/config/locales/tr-TR.yml @@ -40,6 +40,9 @@ tr: alignment: against: Karşısında in_favor: Lehine + comment_label: Yorum %{comment_id} + comment_label_reply: Yorum %{comment_id} (Yoruma Yanıt %{parent_comment_id}) + controls_label: Yorum Kontrolü deleted_user: Silinmiş katılımcı reply: Cevapla report: diff --git a/decidim-comments/spec/cells/decidim/comments/comments_cell_spec.rb b/decidim-comments/spec/cells/decidim/comments/comments_cell_spec.rb index b56665b99cc42..4dbcf84c5a802 100644 --- a/decidim-comments/spec/cells/decidim/comments/comments_cell_spec.rb +++ b/decidim-comments/spec/cells/decidim/comments/comments_cell_spec.rb @@ -101,7 +101,7 @@ module Decidim::Comments before do comment # Create the comment before disabling comments allow(commentable).to receive(:accepts_new_comments?).and_return(false) - allow(commentable).to receive(:user_allowed_to_comment?).with(current_user).and_return(false) + allow(commentable).to receive(:user_allowed_to_comment?).with(current_user).and_return(true) end it "renders the comments blocked warning" do diff --git a/decidim-comments/spec/system/comments_spec.rb b/decidim-comments/spec/system/comments_spec.rb index 6f7cd8dfa9397..36e8789643674 100644 --- a/decidim-comments/spec/system/comments_spec.rb +++ b/decidim-comments/spec/system/comments_spec.rb @@ -4,8 +4,7 @@ describe "Comments" do let!(:component) { create(:component, manifest_name: :dummy, organization:) } - let!(:author) { create(:user, :confirmed, organization:) } - let!(:commentable) { create(:dummy_resource, component:, author:) } + let!(:commentable) { create(:dummy_resource, component:) } let(:resource_path) { resource_locator(commentable).path } diff --git a/decidim-comments/spec/system/search_comments_spec.rb b/decidim-comments/spec/system/search_comments_spec.rb index d4a3076c98232..a8fec494560e4 100644 --- a/decidim-comments/spec/system/search_comments_spec.rb +++ b/decidim-comments/spec/system/search_comments_spec.rb @@ -9,10 +9,13 @@ let(:manifest_name) { "dummy" } let!(:commentable) { create(:dummy_resource, component:) } let!(:searchables) { create_list(:comment, 3, commentable:) } - let!(:term) { strip_tags(translated(searchables.first.body)).split.last } + let!(:term) { "FooBar" } let(:hashtag) { "#decidim" } before do + comment = create(:comment, body: "FooBar", commentable:) + searchables << comment + hashtag_comment = create(:comment, body: "A comment with a hashtag #{hashtag}", commentable:) searchables << hashtag_comment end diff --git a/decidim-conferences/app/commands/decidim/conferences/admin/publish_conference_speaker.rb b/decidim-conferences/app/commands/decidim/conferences/admin/publish_conference_speaker.rb new file mode 100644 index 0000000000000..39aeeadd81920 --- /dev/null +++ b/decidim-conferences/app/commands/decidim/conferences/admin/publish_conference_speaker.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +module Decidim + module Conferences + module Admin + # A command with all the business logic that publishes an + # existing conference speaker. + class PublishConferenceSpeaker < Decidim::Command + # Public: Initializes the command. + # + # conference_speaker - Decidim::Conferences::Admin::ConferenceSpeaker + # current_user - the user performing the action + def initialize(conference_speaker, current_user) + @conference_speaker = conference_speaker + @current_user = current_user + end + + # Executes the command. Broadcasts these events: + # + # - :ok when everything is valid. + # - :invalid if the form was not valid and we could not proceed. + # + # Returns nothing. + def call + return broadcast(:invalid) if conference_speaker.published? + + transaction do + publish_conference_speaker + end + + broadcast(:ok, conference_speaker) + end + + private + + attr_reader :conference_speaker, :current_user + + def publish_conference_speaker + @conference_speaker = Decidim.traceability.perform_action!( + :publish, + conference_speaker, + current_user + ) do + conference_speaker.publish! + conference_speaker + end + end + end + end + end +end diff --git a/decidim-conferences/app/commands/decidim/conferences/admin/unpublish_conference_speaker.rb b/decidim-conferences/app/commands/decidim/conferences/admin/unpublish_conference_speaker.rb new file mode 100644 index 0000000000000..0e187278fd8d3 --- /dev/null +++ b/decidim-conferences/app/commands/decidim/conferences/admin/unpublish_conference_speaker.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +module Decidim + module Conferences + module Admin + # A command with all the business logic that unpublishes an + # existing conference speaker. + class UnpublishConferenceSpeaker < Decidim::Command + # Public: Initializes the command. + # + # conference_speaker - Decidim::Conferences::Admin::ConferenceSpeaker + # current_user - the user performing the action + def initialize(conference_speaker, current_user) + @conference_speaker = conference_speaker + @current_user = current_user + end + + # Executes the command. Broadcasts these events: + # + # - :ok when everything is valid. + # - :invalid if the form was not valid and we could not proceed. + # + # Returns nothing. + def call + return broadcast(:invalid) unless conference_speaker.published? + + @conference_speaker = Decidim.traceability.perform_action!( + :unpublish, + conference_speaker, + current_user + ) do + conference_speaker.unpublish! + conference_speaker + end + broadcast(:ok, conference_speaker) + end + + private + + attr_reader :conference_speaker, :current_user + end + end + end +end diff --git a/decidim-conferences/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb b/decidim-conferences/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb index 6513553b7b8a0..a8886ec8db070 100644 --- a/decidim-conferences/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb +++ b/decidim-conferences/app/controllers/decidim/conferences/admin/conference_speakers_controller.rb @@ -74,6 +74,38 @@ def destroy end end + def publish + enforce_permission_to(:update, :conference_speaker, speaker: conference_speaker) + + Decidim::Conferences::Admin::PublishConferenceSpeaker.call(conference_speaker, current_user) do + on(:ok) do + flash[:notice] = I18n.t("conference_speakers.publish.success", scope: "decidim.admin") + redirect_to conference_speakers_path(current_conference) + end + + on(:invalid) do + flash.now[:alert] = I18n.t("conference_speakers.publish.invalid", scope: "decidim.admin") + render action: "index" + end + end + end + + def unpublish + enforce_permission_to(:update, :conference_speaker, speaker: conference_speaker) + + Decidim::Conferences::Admin::UnpublishConferenceSpeaker.call(conference_speaker, current_user) do + on(:ok) do + flash[:notice] = I18n.t("conference_speakers.unpublish.success", scope: "decidim.admin") + redirect_to conference_speakers_path(current_conference) + end + + on(:invalid) do + flash.now[:alert] = I18n.t("conference_speakers.unpublish.invalid", scope: "decidim.admin") + render action: "index" + end + end + end + private def meetings_selected diff --git a/decidim-conferences/app/controllers/decidim/conferences/conference_speakers_controller.rb b/decidim-conferences/app/controllers/decidim/conferences/conference_speakers_controller.rb index 098031484bbc2..2943f711c7b18 100644 --- a/decidim-conferences/app/controllers/decidim/conferences/conference_speakers_controller.rb +++ b/decidim-conferences/app/controllers/decidim/conferences/conference_speakers_controller.rb @@ -16,7 +16,7 @@ def index private def speakers - @speakers ||= current_participatory_space.speakers + @speakers ||= current_participatory_space.speakers.published end alias collection speakers diff --git a/decidim-conferences/app/helpers/decidim/conferences/conference_helper.rb b/decidim-conferences/app/helpers/decidim/conferences/conference_helper.rb index 0a4ddf005d933..475a722f5d46b 100644 --- a/decidim-conferences/app/helpers/decidim/conferences/conference_helper.rb +++ b/decidim-conferences/app/helpers/decidim/conferences/conference_helper.rb @@ -19,7 +19,7 @@ def render_date(conference) # def conference_nav_items(participatory_space) [].tap do |items| - if participatory_space.speakers.exists? + if participatory_space.speakers.published.exists? items << { name: t("layouts.decidim.conferences_nav.conference_speaker_menu_item"), url: decidim_conferences.conference_conference_speakers_path(participatory_space) diff --git a/decidim-conferences/app/models/decidim/conference_speaker.rb b/decidim-conferences/app/models/decidim/conference_speaker.rb index a4f19c4e90660..cf7a7176ccfd3 100644 --- a/decidim-conferences/app/models/decidim/conference_speaker.rb +++ b/decidim-conferences/app/models/decidim/conference_speaker.rb @@ -8,6 +8,7 @@ class ConferenceSpeaker < ApplicationRecord include Decidim::Loggable include Decidim::HasUploadValidations include Decidim::TranslatableResource + include Decidim::Publicable translatable_fields :position, :affiliation, :short_bio @@ -17,6 +18,7 @@ class ConferenceSpeaker < ApplicationRecord has_many :conference_meetings, through: :conference_speaker_conference_meetings, class_name: "Decidim::ConferenceMeeting" default_scope { order(full_name: :asc, created_at: :asc) } + scope :published, -> { where.not(published_at: nil) } has_one_attached :avatar validates_avatar :avatar, uploader: Decidim::AvatarUploader diff --git a/decidim-conferences/app/presenters/decidim/conferences/admin_log/conference_speaker_presenter.rb b/decidim-conferences/app/presenters/decidim/conferences/admin_log/conference_speaker_presenter.rb index 3eb4ea3565210..54da50dd21957 100644 --- a/decidim-conferences/app/presenters/decidim/conferences/admin_log/conference_speaker_presenter.rb +++ b/decidim-conferences/app/presenters/decidim/conferences/admin_log/conference_speaker_presenter.rb @@ -26,7 +26,8 @@ def diff_fields_mapping position: "Decidim::Conferences::AdminLog::ValueTypes::SpeakerPositionPresenter", position_other: :string, weight: :integer, - ceased_date: :date + ceased_date: :date, + published_at: :date } end diff --git a/decidim-conferences/app/views/decidim/conferences/admin/conference_speakers/index.html.erb b/decidim-conferences/app/views/decidim/conferences/admin/conference_speakers/index.html.erb index daac697a5d6e6..d6c614c293aea 100644 --- a/decidim-conferences/app/views/decidim/conferences/admin/conference_speakers/index.html.erb +++ b/decidim-conferences/app/views/decidim/conferences/admin/conference_speakers/index.html.erb @@ -54,6 +54,16 @@ <%= icon_link_to "pencil-line", edit_conference_speaker_path(current_conference, speaker), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> + <% if allowed_to? :update, :conference_speaker, speaker: speaker %> + <% if speaker.published? %> + <%= icon_link_to "close-circle-line", unpublish_conference_speaker_path(current_conference, speaker.id), t("actions.unpublish", scope: "decidim.admin"), method: :put, class: "action-icon--unpublish" %> + <% else %> + <%= icon_link_to "check-line", publish_conference_speaker_path(current_conference, speaker.id), t("actions.publish", scope: "decidim.admin"), method: :put, class: "action-icon--publish" %> + <% end %> + <% else %> + + <% end %> + <% if allowed_to? :destroy, :conference_speaker, speaker: speaker %> <%= icon_link_to "delete-bin-line", conference_speaker_path(current_conference, speaker), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% end %> diff --git a/decidim-conferences/app/views/decidim/conferences/admin/conferences/index.html.erb b/decidim-conferences/app/views/decidim/conferences/admin/conferences/index.html.erb index 457212df9a7c4..66a678c1ddb13 100644 --- a/decidim-conferences/app/views/decidim/conferences/admin/conferences/index.html.erb +++ b/decidim-conferences/app/views/decidim/conferences/admin/conferences/index.html.erb @@ -21,6 +21,8 @@ <% if allowed_to? :update, :conference, conference: conference %> <%= link_to translated_attribute(conference.title), edit_conference_path(conference) %>
+ <% elsif allowed_to? :read, :component, conference: conference %> + <%= link_to translated_attribute(conference.title), components_path(conference) %>
<% else %> <%= translated_attribute(conference.title) %> <% end %> diff --git a/decidim-conferences/config/locales/bg.yml b/decidim-conferences/config/locales/bg.yml index a42eecefff9b2..6a4d07a30618d 100644 --- a/decidim-conferences/config/locales/bg.yml +++ b/decidim-conferences/config/locales/bg.yml @@ -3,10 +3,596 @@ bg: attributes: conference: assemblies_ids: Свързани събрания + available_slots: Налични слотове banner_image: Банер изображение + copy_categories: Копиране на категориите + copy_components: Копиране на компонентите + copy_features: Копиране на функциите + decidim_scope_id: Обхват + description: Описание + end_date: Крайна дата + hashtag: Хаштаг + hero_image: Изображение за начална страница + location: Местоположение + main_logo: Основно лого + objectives: Цели + participatory_processes_ids: Свързани процеси за участие + promoted: Акцентирано + published_at: Публикувано на + registration_terms: Условия за регистрация + registrations_enabled: Регистрациите са активирани + scope_id: Обхват + scopes_enabled: Обхватите са активирани + short_description: Кратко описание + show_statistics: Покажи статистиките + sign_date: Дата на подпис + signature: Подпис + signature_name: Име на подписа + slogan: Девиз + slug: Съкратен URL + start_date: Начална дата + title: Заглавие + weight: Подредба на позиция + conference_media_link: + date: Дата + link: Линк + title: Заглавие + weight: Подредба на позиция + conference_partner: + link: Линк + logo: Лого + name: Име + partner_type: Тип партньор + weight: Подредба на позиция + conference_registration_invite: + email: Имейл + name: Име + registration_type_id: Тип регистрация + user_id: Потребител + conference_registration_type: + description: Описание + price: Цена + title: Заглавие + weight: Подредба на позиция + conference_speaker: + affiliation: Присъединяване + avatar: Аватар + conference_meeting_ids: Свързани срещи + full_name: Пълно име + personal_url: Персонален URL + position: Длъжност + short_bio: Кратка биография + twitter_handle: X манипулатор + user_id: Потребител + conference_user_role: + email: Имейл + name: Име + role: Роля + errors: + models: + conference_registration_invite: + attributes: + email: + already_invited: На този имейл вече е изпратена покана. + activerecord: + models: + decidim/conference: + one: Конференция + other: Конференции + decidim/conference_speaker: + one: Говорител на конференция + other: Говорители на конференция + decidim/conference_user_role: + one: Роля на потребител в конференция + other: Роли на потребители в конференция decidim: + admin: + actions: + confirm: Потвърди + new_conference: Нова конференция + new_conference_user_role: Нов администратор на конференция + new_media_link: Нов медия линк + new_partner: Нов партньор + new_registration_type: Нов тип регистрация + new_speaker: Нов говорител + send_diplomas: Изпращане на сертификати за присъствие + conference_copies: + new: + copy: Копиране + select: Изберете кои данни искате да дублирате + title: Дублиране на конференцията + conference_publications: + create: + error: Възникна проблем при публикуването на тази конференция. + success: Конференцията беше публикувана успешно. + destroy: + error: Възникна проблем при премахването на публикацията на тази конференция. + success: Публикацията на конференцията беше премахната успешно. + conference_registration: + confirm: + error: Възникна проблем при потвърждаването на регистрацията на тази конференция. + success: Регистрацията на конференцията беше потвърдена успешно. + conference_speakers: + create: + error: Възникна проблем при добавянето на говорител към тази конференция. + success: Говорителят на конференцията беше добавен успешно. + destroy: + success: Говорителят на конференцията беше изтрит успешно. + edit: + title: Актуализиране на говорителя на конференцията. + update: Актуализация + index: + conference_speakers_title: Говорители на конференция + new: + create: Създаване + title: Нов говорител на конференция. + publish: + invalid: Възникна проблем при публикуването на този говорител. + success: Лекторът на конференцията е публикуван успешно. + unpublish: + invalid: Възникна проблем при отмяната на публикуването на този говорител. + success: Публикуването на говорител на конференцията бе успешно премахнато. + update: + error: Възникна проблем при актуализирането на този говорител на конференцията. + success: Говорителят на конференцията беше актуализиран успешно. + conference_user_roles: + create: + error: Възникна проблем при добавянето на администратор към тази конференция. + success: Администраторът на конференцията беше добавен успешно. + destroy: + success: Администраторът на конференцията беше премахнат успешно. + edit: + title: Актуализиране на администратора на конференцията. + update: Актуализация + index: + conference_admins_title: Администратори на конференция + new: + create: Създаване + title: Нов администратор на конференция. + update: + error: Възникна проблем при актуализирането на този администратор на конференцията. + success: Администраторът на конференцията беше актуализиран успешно. + conferences: + create: + error: Възникна проблем при създаването на тази конференция. + success: Конференцията беше създадена успешно. + edit: + update: Актуализация + exports: + registrations: Регистрации + form: + title: Основна информация + index: + published: Публикувано + unpublished: Непубликувано + new: + create: Създаване + title: Конференция + update: + error: Възникна проблем при актуализирането на тази конференция. + success: Конференцията беше актуализирана успешно. + conferences_copies: + create: + error: Възникна проблем при дублирането на тази конференция. + success: Конференцията беше дублирана успешно. + media_links: + create: + error: Възникна проблем при създаването на нов медия линк. + success: Медийният линк беше създаден успешно. + destroy: + success: Медийният линк беше изтрит успешно. + edit: + title: Актуализиране на медийния линк. + update: Актуализация + index: + media_links_title: Медийни линкове + new: + create: Създаване + title: Медия линк + update: + error: Възникна проблем при актуализирането на този медия линк. + success: Медийният линк беше актуализиран успешно. + menu: + conferences: Конференции + conferences_submenu: + attachment_collections: Папки + attachment_files: Файлове + attachments: Прикачени файлове + categories: Категории + components: Компоненти + conference_admins: Администратори на конференция + conference_invites: Покани + conference_speakers: Говорители + diploma: Сертификати за присъствие + info: Относно тази конференция + media_links: Медия линкове + moderations: Модерации + partners: Партньори + registration_types: Типове регистрация + registrations: Регистрации + see_conference: Виз конференцията + user_registrations: Потребителска регистрация + models: + conference: + fields: + created_at: Създадено на + published: Публикувано + title: Заглавие + conference_speaker: + fields: + affiliation: Присъединяване + full_name: Пълно име + position: Длъжност + name: Говорител на конференция + conference_user_role: + fields: + email: Имейл + name: Име + role: Роля + name: Администратор на конференция + roles: + admin: Администратор + collaborator: Сътрудник + moderator: Модератор + valuator: Оценител + media_link: + fields: + date: Дата + link: Линк + title: Заглавие + name: Медия линк + partner: + fields: + link: Линк + logo: Лого + name: Име + partner_type: Тип + name: Партньор + types: + collaborator: Сътрудник + main_promotor: Основен популяризатор + registration_type: + fields: + conference_meetings: Конферентни срещи + price: Цена + registrations_count: Брой регистрации + title: Заглавие + weight: Подредба на позиция + name: Тип регистрация + partners: + create: + error: Възникна проблем при добавянето на партньор за тази конференция. + success: Партньорът за конференцията беше добавен успешно. + destroy: + success: Партньорът за конференцията беше премахнат успешно. + edit: + title: Актуализиране на партньора. + update: Актуализация + new: + create: Създаване + title: Нов партньор + update: + error: Възникна проблем при актуализирането на партньор за тази конференция. + success: Партньорът за конференцията беше актуализиран успешно. + registration_type_publications: + create: + error: Възникна проблем при публикуването на този тип регистрация. + success: Типът регистрация беше публикуван успешно. + destroy: + error: Възникна проблем при премахването на публикацията на този тип регистрация. + success: Публикацията на типа регистрация беше премахната успешно. + registration_types: + create: + error: Възникна проблем при добавянето на тип регистрация за тази конференция. + success: Типът регистрация за конференцията беше добавен успешно. + destroy: + success: Типът регистрация за конференцията беше премахнат успешно. + edit: + title: Актуализиране на типа на регистрацията. + update: Актуализация + new: + create: Създаване + title: Нов тип регистрация + update: + error: Възникна проблем при актуализирането на тип регистрация за тази конференция. + success: Типът регистрация за конференцията беше актуализиран успешно. + titles: + conferences: Конференции + admin_log: + conference: + create: "%{user_name} създаде конференцията %{resource_name}" + publish: "%{user_name} публикува конференцията %{resource_name}" + send_conference_diplomas: "%{user_name} изпрати сертификати за присъствие на участниците в конференцията %{resource_name}" + unpublish: "%{user_name} премахна публикацията на конференцията %{resource_name}" + update: "%{user_name} актуализира конференцията %{resource_name}" + update_diploma: "%{user_name} актуализира конфигурацията на сертификатите за присъствие на конференцията %{resource_name}" + conference_speaker: + create: "%{user_name} създаде говорителя %{resource_name} в конференцията %{space_name}" + delete: "%{user_name} премахна говорителя %{resource_name} от конференцията %{space_name}" + update: "%{user_name} актуализира говорителя %{resource_name} в конференцията %{space_name}" + conference_user_role: + create: "%{user_name} покани %{resource_name} в конференцията %{space_name}" + delete: "%{user_name} премахна администратора %{resource_name} от конференцията %{space_name}" + update: "%{user_name} промени ролята на %{resource_name} в конференцията %{space_name}" + conferences: + conference_registration: + confirm: "%{user_name} потвърди регистрация в конференцията %{resource_name}" + partner: + create: "%{user_name} създаде партньора %{resource_name} в конференцията %{space_name}" + delete: "%{user_name} премахна партньора %{resource_name} от конференцията %{space_name}" + update: "%{user_name} актуализира партньора %{resource_name} в конференцията %{space_name}" + registration_type: + create: "%{user_name} създаде типа регистрация %{resource_name} в конференцията %{space_name}" + delete: "%{user_name} премахна типа регистрация %{resource_name} в конференцията %{space_name}" + publish: "%{user_name} публикува типа регистрация %{resource_name} в конференцията %{space_name}" + unpublish: "%{user_name} премахна публикацията на типа регистрация %{resource_name} в конференцията %{space_name}" + update: "%{user_name} актуализира типа регистрация %{resource_name} в конференцията %{space_name}" + media_link: + create: "%{user_name} създаде медия линк %{resource_name} в конференцията %{space_name}" + delete: "%{user_name} премахна медия линка %{resource_name} от конференцията %{space_name}" + update: "%{user_name} актуализира медия линка %{resource_name} в конференцията %{space_name}" + conference_program: + index: + title: Програма + conference_speakers: + index: + title: Говорители conferences: + admin: + conference_copies: + form: + slug_help_html: 'Използват се променливи полета за URL адрес, за да се генерират URL адреси, които водят към тази конференция. Допуска се използването само на букви, цифри и тирета и адресът трябва да започва с буква. Пример: %{url}' + conference_invites: + create: + error: Възникна проблем при изпращането на покана на участника да се присъедини към конференцията. + success: Участникът беше поканен успешно да се присъедини към конференцията. + form: + attendee_type: Тип присъстващ + existing_user: Съществуващ участник + invite_explanation: Участникът ще бъде поканен да се присъедини към конференцията, както и към организацията. + non_user: Несъществуващ участник + select_user: Избор на участник + index: + invite_attendee: Покани участник + invites: Покани + new: + explanation: Участникът ще бъде поканен да се присъедини към конференция. Ако техният имейл не е регистриран, те също ще бъдат поканени в организацията. + invite: Покани + new_invite: Покани участник + conference_registrations: + index: + registrations: Регистрации + conference_speakers: + form: + existing_user: Съществуващ участник + non_user: Не е участник + select_user: Избор на участник + user_type: Тип участник + index: + search: Търсене + conferences: + form: + available_slots_help: Оставете 0, ако разполагате с неограничен брой места. + registrations_count: + one: Осъществена е 1 регистрация. + other: Осъществени са %{count} регистрации. + slug_help_html: 'Използват се променливи полета за URL адрес, за да се генерират URL адреси, които водят към тази конференция. Допуска се използването само на букви, цифри и тирета и адресът трябва да започва с буква. Пример: %{url}' + content_blocks: + highlighted_conferences: + max_results: Максимален брой елементи, които да се показват + diplomas: + edit: + save: Запази + title: Сертификати за присъствие + invite_join_conference_mailer: + invite: + decline: Отказ на поканата за „%{conference_title}“ + invited_existing_user_to_join_a_conference: "%{invited_by} Ви покани да се присъедините към конференция в(ъв) %{application}. Можете да откажете или да приемете чрез връзките по-долу." + invited_user_to_join_a_conference: "%{invited_by} ви покани да се присъедините към конференция в %{application}. Можете да го приемете чрез връзката по-долу." + registration: Регистрация за „%{conference_title}“ + partners: + index: + title: Партньори + registration_types: + form: + select_conference_meetings: Избор на конферентни срещи + index: + title: Типове регистрация + send_conference_diploma_mailer: + diploma: + diploma_html: Ще намерите сертификата за присъствие на конференцията %{title} в прикачените файлове. + diploma_user: + attendance_verified_by: Присъствието е потвърдено от + certificate_of_attendance: Сертификати за присъствие + certificate_of_attendance_description: С настоящото се удостоверява, че %{user} посети и взе участие в(ъв) %{title}, %{location} на %{start} — %{end} + send_diploma: + error: Възникна проблем при изпращането на сертификатите за присъствие на конференцията. + success: Сертификатите за присъствие на конференцията бяха изпратени успешно + conference: + registration_confirm: + cancel: Отказ + confirm: Потвърди + show: + going: Присъствие + no_slots_available: Няма свободни места + registration: Регистрация + conference_program: + show: + program: Програма + conference_registration_mailer: + confirmation: + confirmed_html: Регистрацията Ви за конференцията %{title} беше потвърдена. + details_1: 'Извършихте регистрация от типа %{registration_type} за конференцията. Тя струва %{price}, като можете да посетите следните събития:' + details_2: Ще намерите подробности за конференцията в прикачения файл. + pending_validation: + confirmation_pending: Скоро ще получите потвърждение + details: 'Извършихте регистрация от типа %{registration_type}, която струва %{price}, като можете да посетите следните събития:' + pending_html: Регистрацията Ви за конференцията %{title} изчаква потвърждение. + conference_registrations: + create: + invalid: Възникна проблем при присъединяването към тази конференция. + success: Успешно се присъединихте към конференцията. + unauthorized: Трябва да влезете в акаунта си, преди да се регистрирате за конференцията. + decline_invitation: + invalid: Възникна проблем при отхвърлянето на поканата. + success: Успешно отхвърлихте поканата. + unauthorized: Трябва да влезете в акаунта си, преди да откажете поканата. + destroy: + invalid: Възникна проблем при напускането на тази конференция. + success: Успешно напуснахте конференцията. + conference_speaker: + go_to_twitter: Отидете на X + more_info: още информация + personal_website: Личен уебсайт + show: + more_info: още информация + speaking_at: Говорене на + conference_speaker_cell: + personal_url: + personal_website: Личен уебсайт + conference_speakers: + index: + speakers: + one: Говорител + other: Говорители + conferences: + partners: + collaborators: Партньори + main_promotors: Организатори + show: + already_have_an_account?: Вече имате профил? + are_you_new?: Нов участник? + login_as: Влезли сте като %{name} <%{email}> + make_conference_registration: Регистрирайте се за конференцията + manage_registration: Управление на регистрацията + register: Регистрация + sign_in_description: Влезте в профила си, за да се регистрирате за конференцията + sign_up_description: Създайте си профил в CivilPower, за да се регистрирате за конференцията + content_blocks: + highlighted_conferences: + name: Акцентирани конференции + index: + title: Конференции + mailer: + conference_registration_mailer: + confirmation: + subject: Регистрацията Ви за конференцията е потвърдена. + pending_validation: + subject: Регистрацията Ви за конференцията очаква потвърждение. + invite_join_conference_mailer: + invite: + subject: Покана за присъединяване към конференция + send_conference_diploma_mailer: + diploma: + subject: Сертификатът Ви за присъствие на конференцията е изпратен + models: + conference_invite: + fields: + email: Имейл + name: Име + registration_type: Тип регистрация + sent_at: Изпратено в + status: Статус + status: + accepted: Приета (%{at}) + rejected: Отхвърлена (%{at}) + sent: Изпратено + conference_registration: + fields: + email: Имейл + name: Име + registration_type: Тип регистрация + state: Статус + states: + confirmed: Потвърден + pending: Изчакване pages: home: highlighted_conferences: active_spaces: Активни конференции + see_all_spaces: Вижте всички конференции + registration_types: + index: + choose_an_option: 'Изберете опция за регистрация:' + no_registrations: Няма регистрации + register: Регистрация + title: Типове регистрация + show: + details: Детайли + introduction: Въведение + objectives: Цели + related_assemblies: Свързани събрания + related_participatory_processes: Свързани процеси за участие + events: + conferences: + conference_registration_confirmed: + notification_title: Регистрацията Ви за конференцията %{resource_title} беше потвърдена. + conference_registration_validation_pending: + notification_title: Регистрацията Ви за конференцията %{resource_title} изчаква потвърждение. + conference_registrations_over_percentage: + email_intro: Заетите места за конференцията „%{resource_title}“ надхвърлят %{percentage} %. + email_outro: Получавате това известие, защото сте администратор на пространството за участие на конференцията. + email_subject: Заетите места за конференцията „%{resource_title}“ надхвърлят %{percentage} % + notification_title: Заетите места за конференцията %{resource_title} надхвърлят %{percentage} %. + conference_updated: + email_intro: 'Конференцията „%{resource_title}“ беше актуализирана. Можете да прочетете новата версия на страницата ѝ:' + email_outro: Получавате това известие, защото следвате конференцията „%{resource_title}“. Можете да прекратите следването от предходната връзка. + email_subject: Конференцията „%{resource_title}“ беше актуализирана + notification_title: Конференцията %{resource_title} е актуализирана. + registrations_enabled: + email_intro: 'Приемат се регистрации за конференцията „%{resource_title}“. Можете да се регистрирате на страницата ѝ:' + email_outro: Получавате това известие, защото следвате конференцията „%{resource_title}“. Можете да прекратите следването от предходната връзка. + email_subject: Приемат се регистрации за конференцията „%{resource_title}“. + notification_title: Приемат се регистрации за конференцията %{resource_title}. + role_assigned: + email_intro: Получихте ролята на %{role} за конференцията „%{resource_title}“. + email_outro: Получихте това известие, защото сте %{role} от конференцията „%{resource_title}“. + email_subject: Получихте ролята на %{role} за „%{resource_title}“. + notification_title: Получихте ролята на %{role} за конференцията %{resource_title}. + upcoming_conference: + email_intro: 'Конференцията „%{resource_title}“ ще се състои след 2 дни. Можете да прочетете описанието на страницата ѝ:' + email_outro: Получавате това известие, защото следвате конференцията „%{resource_title}“. Можете да прекратите следването от предходната връзка. + email_subject: Конференцията „%{resource_title}“ наближава! + notification_title: Конференцията %{resource_title} ще се състои след 2 дни. + help: + participatory_spaces: + conferences: + contextual: "

Конференцията е колекция от срещи, подредени в програма, с определен брой хора, поканени като лектори, и други информационни полета, типични за големи конгреси или социални събития (регистрация, списък на организации, които поддържат или спонсорирайте събитието и т.н.).

Примери: Конференцията може да бъде подходящо събитие за организация и нейните членове или да се проведе като част от процес на участие или след консултация.

" + page: "

Конференцията е колекция от срещи, подредени в програма, с определен брой хора, поканени като лектори, и други информационни полета, типични за големи конгреси или социални събития (регистрация, списък на организации, които поддържат или спонсорирайте събитието и т.н.).

Примери: Конференцията може да бъде подходящо събитие за организация и нейните членове или да се проведе като част от процес на участие или след консултация.

" + title: Какво представляват конференциите? + log: + value_types: + conference_presenter: + not_found: 'Конференцията не беше намерена в базата данни (ID: %{id}).' + media: + index: + description: Връзки за тази конференция + title: Медии и връзки + menu: + conferences: Конференции + statistics: + conferences_count: Конференции + devise: + mailer: + join_conference: + subject: Покана за присъединяване към конференция + layouts: + decidim: + conference_hero: + manage_registration: Управление на регистрацията + register: Регистрация + conferences: + conference: + more_info: Още информация + take_part: Участвайте + index: + promoted_conferences: Акцентирани конференции + order_by_conferences: + conferences: + one: "%{count} конференция" + other: "%{count} конференции" + conferences_nav: + conference_partners_menu_item: Партньори + conference_speaker_menu_item: Говорители + media: Медия + venues: Места diff --git a/decidim-conferences/config/locales/ca.yml b/decidim-conferences/config/locales/ca.yml index 006619b3d679b..a14d56977c56f 100644 --- a/decidim-conferences/config/locales/ca.yml +++ b/decidim-conferences/config/locales/ca.yml @@ -126,6 +126,12 @@ ca: new: create: Crear title: Nova ponent de la jornada. + publish: + invalid: S'ha produït un error en publicar aquesta ponent. + success: Ponent de la jornada actualitzada correctament. + unpublish: + invalid: S'ha produït un error en despublicar aquesta ponent. + success: Ponent de la jornada despublicada correctament. update: error: S'ha produït un error en actualitzar la ponent d'aquesta jornada. success: Ponent de la jornada actualitzada correctament. @@ -584,7 +590,7 @@ ca: order_by_conferences: conferences: one: "%{count} jornada" - other: "%{count} jornadas" + other: "%{count} jornades" conferences_nav: conference_partners_menu_item: Col·laboradores conference_speaker_menu_item: Ponents diff --git a/decidim-conferences/config/locales/en.yml b/decidim-conferences/config/locales/en.yml index eb715243cc9a8..4f1a7933c48a4 100644 --- a/decidim-conferences/config/locales/en.yml +++ b/decidim-conferences/config/locales/en.yml @@ -127,6 +127,12 @@ en: new: create: Create title: New conference speaker. + publish: + invalid: There was a problem publishing this speaker. + success: Conference speaker successfully published. + unpublish: + invalid: There was a problem unpublishing this speaker. + success: Conference speaker successfully unpublished. update: error: There was a problem updating this conference speaker. success: Conference speaker successfully updated. diff --git a/decidim-conferences/config/locales/es-MX.yml b/decidim-conferences/config/locales/es-MX.yml index 1ba23b856ee75..37d7930483114 100644 --- a/decidim-conferences/config/locales/es-MX.yml +++ b/decidim-conferences/config/locales/es-MX.yml @@ -126,6 +126,12 @@ es-MX: new: create: Crear title: Nuevo ponente. + publish: + invalid: Se ha producido un error al publicar esta ponente. + success: Ponente de la jornada actualizada correctamente. + unpublish: + invalid: Se ha producido un error al despublicar esta ponente. + success: Ponente de la jornada despublicada correctamente. update: error: Hubo un error al actualizar el ponente en esta conferencia. success: Ponente actualizado con éxito en esta conferencia. diff --git a/decidim-conferences/config/locales/es-PY.yml b/decidim-conferences/config/locales/es-PY.yml index 2bb20b454a9f6..63395a8423839 100644 --- a/decidim-conferences/config/locales/es-PY.yml +++ b/decidim-conferences/config/locales/es-PY.yml @@ -126,6 +126,12 @@ es-PY: new: create: Crear title: Nuevo conferenciante. + publish: + invalid: Se ha producido un error al publicar esta ponente. + success: Ponente de la jornada actualizada correctamente. + unpublish: + invalid: Se ha producido un error al despublicar esta ponente. + success: Ponente de la jornada despublicada correctamente. update: error: Hubo un error al actualizar el altavoz de esta conferencia. success: Altavoz actualizado con éxito para esta conferencia. diff --git a/decidim-conferences/config/locales/es.yml b/decidim-conferences/config/locales/es.yml index 538f3e6271fd2..1f58dc50dabe2 100644 --- a/decidim-conferences/config/locales/es.yml +++ b/decidim-conferences/config/locales/es.yml @@ -126,6 +126,12 @@ es: new: create: Crear title: Nueva ponente de la conferencia. + publish: + invalid: Se ha producido un error al publicar esta ponente. + success: Ponente de la jornada actualizada correctamente. + unpublish: + invalid: Se ha producido un error al despublicar esta ponente. + success: Ponente de la jornada despublicada correctamente. update: error: Se ha producido un error al actualizar la ponente de esta jornada. success: Ponente de la jornada actualizada correctamente. diff --git a/decidim-conferences/config/locales/eu.yml b/decidim-conferences/config/locales/eu.yml index 7f04613c1e74c..d05c01526f2b2 100644 --- a/decidim-conferences/config/locales/eu.yml +++ b/decidim-conferences/config/locales/eu.yml @@ -126,6 +126,12 @@ eu: new: create: Sortu title: Beste hizlari bat. + publish: + invalid: Arazo bat izan zen hizlari hau argitaratzean. + success: Hizlaria behar bezala argitaratua. + unpublish: + invalid: Arazo bat izan da hizlari hau despublikatzean. + success: Hizlaria behar bezala despublikatua. update: error: Arazo bat egon da hizlari hau eguneratzean. success: Hizlaria zuzen eguneratua hitzaldi honetarako. diff --git a/decidim-conferences/config/locales/fr-CA.yml b/decidim-conferences/config/locales/fr-CA.yml index 56a4109a67f20..c7ad0a92009a0 100644 --- a/decidim-conferences/config/locales/fr-CA.yml +++ b/decidim-conferences/config/locales/fr-CA.yml @@ -126,6 +126,12 @@ fr-CA: new: create: Créer title: Nouveau conférencier + publish: + invalid: Il y a eu un problème lors de la publication de cet intervenant. + success: L'intervenant de la conférence a été publié avec succès. + unpublish: + invalid: Il y a eu un problème lors de la dépublication de cet intervenant. + success: L'intervenant de la conférence a été dépublié avec succès. update: error: Une erreur s'est produite lors de la mise à jour du conférencier pour cette conférence. success: Conférencier mis à jour avec succès pour cette conférence. diff --git a/decidim-conferences/config/locales/fr.yml b/decidim-conferences/config/locales/fr.yml index d31f144f8c155..e8e76f108824a 100644 --- a/decidim-conferences/config/locales/fr.yml +++ b/decidim-conferences/config/locales/fr.yml @@ -126,6 +126,12 @@ fr: new: create: Créer title: Nouveau conférencier + publish: + invalid: Il y a eu un problème lors de la publication de cet intervenant. + success: L'intervenant de la conférence a été publié avec succès. + unpublish: + invalid: Il y a eu un problème lors de la dépublication de cet intervenant. + success: L'intervenant de la conférence a été dépublié avec succès. update: error: Une erreur s'est produite lors de la mise à jour du conférencier pour cette conférence. success: Conférencier mis à jour avec succès pour cette conférence. diff --git a/decidim-conferences/config/locales/ja.yml b/decidim-conferences/config/locales/ja.yml index e99137bc021bf..65e1b40517fe8 100644 --- a/decidim-conferences/config/locales/ja.yml +++ b/decidim-conferences/config/locales/ja.yml @@ -123,6 +123,12 @@ ja: new: create: 作成 title: 新しいカンファレンススピーカー。 + publish: + invalid: このスピーカーを公開中に問題が発生しました。 + success: カンファレンスのスピーカーを公開しました。 + unpublish: + invalid: このスピーカーを非公開にする際に問題がありました。 + success: カンファレンスのスピーカーを非公開にしました。 update: error: このカンファレンススピーカーの更新中に問題が発生しました。 success: カンファレンススピーカーが正常に更新されました。 diff --git a/decidim-conferences/config/locales/pl.yml b/decidim-conferences/config/locales/pl.yml index 26972370b4053..9f5d3e1bfae49 100644 --- a/decidim-conferences/config/locales/pl.yml +++ b/decidim-conferences/config/locales/pl.yml @@ -132,6 +132,8 @@ pl: new: create: Utwórz title: Nowy prelegent konferencyjny. + publish: + invalid: Podczas publikowania tego zespołu wystąpił błąd. update: error: Wystąpił błąd podczas aktualizacji prelegenta konferencji. success: Prelegent zaktualizowany pomyślnie. diff --git a/decidim-conferences/config/locales/tr-TR.yml b/decidim-conferences/config/locales/tr-TR.yml index b88acfc65fcb8..c98208d720493 100644 --- a/decidim-conferences/config/locales/tr-TR.yml +++ b/decidim-conferences/config/locales/tr-TR.yml @@ -382,9 +382,13 @@ tr: collaborators: Ortaklar main_promotors: Organizatörler show: + already_have_an_account?: Hesabınız var mı? + are_you_new?: Yeni Katılımcı? login_as: '%{name} <%{email}> olarak giriş yaptınız' manage_registration: Kayıt İşlemini Yönet register: Kayıt olmak + sign_in_description: Konferansa kaydolmak için giriş yapın + sign_up_description: Konferansa kaydolmak için bir hesap oluşturun content_blocks: highlighted_conferences: name: Vurgulanan konferanslar diff --git a/decidim-conferences/db/migrate/20240613095855_add_published_at_to_conference_speakers.rb b/decidim-conferences/db/migrate/20240613095855_add_published_at_to_conference_speakers.rb new file mode 100644 index 0000000000000..83a37b24ea207 --- /dev/null +++ b/decidim-conferences/db/migrate/20240613095855_add_published_at_to_conference_speakers.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddPublishedAtToConferenceSpeakers < ActiveRecord::Migration[7.0] + def change + add_column :decidim_conference_speakers, :published_at, :datetime, index: true + end +end diff --git a/decidim-conferences/lib/decidim/api/conference_type.rb b/decidim-conferences/lib/decidim/api/conference_type.rb index f42c0b1ddc478..60a5e1b4ee9ef 100644 --- a/decidim-conferences/lib/decidim/api/conference_type.rb +++ b/decidim-conferences/lib/decidim/api/conference_type.rb @@ -45,6 +45,10 @@ def hero_image def banner_image object.attached_uploader(:banner_image).path end + + def speakers + object.speakers.published + end end end end diff --git a/decidim-conferences/lib/decidim/conferences/admin_engine.rb b/decidim-conferences/lib/decidim/conferences/admin_engine.rb index 38518779efecf..7e3ffb0a2832e 100644 --- a/decidim-conferences/lib/decidim/conferences/admin_engine.rb +++ b/decidim-conferences/lib/decidim/conferences/admin_engine.rb @@ -18,7 +18,12 @@ class AdminEngine < ::Rails::Engine resources :conferences, param: :slug, except: [:show, :destroy] do resource :publish, controller: "conference_publications", only: [:create, :destroy] resources :copies, controller: "conference_copies", only: [:new, :create] - resources :speakers, controller: "conference_speakers" + resources :speakers, controller: "conference_speakers" do + member do + put :publish + put :unpublish + end + end resources :partners, controller: "partners", except: [:show] resources :media_links, controller: "media_links" resources :registration_types, controller: "registration_types" do diff --git a/decidim-conferences/lib/decidim/conferences/seeds.rb b/decidim-conferences/lib/decidim/conferences/seeds.rb index c783d0c983d06..4b99df3bebeba 100644 --- a/decidim-conferences/lib/decidim/conferences/seeds.rb +++ b/decidim-conferences/lib/decidim/conferences/seeds.rb @@ -84,6 +84,7 @@ def call end, twitter_handle: ::Faker::Twitter.unique.screen_name, personal_url: ::Faker::Internet.url, + published_at: Time.current, conference: ) end diff --git a/decidim-conferences/lib/decidim/conferences/test/factories.rb b/decidim-conferences/lib/decidim/conferences/test/factories.rb index 416f0b17f5883..9bc940224924d 100644 --- a/decidim-conferences/lib/decidim/conferences/test/factories.rb +++ b/decidim-conferences/lib/decidim/conferences/test/factories.rb @@ -165,6 +165,10 @@ skip_injection: evaluator.skip_injection) end end + + trait :published do + published_at { Time.current } + end end factory :conference_speaker_conference_meeting, class: "Decidim::ConferenceSpeakerConferenceMeeting" do diff --git a/decidim-conferences/spec/commands/publish_conference_speaker_spec.rb b/decidim-conferences/spec/commands/publish_conference_speaker_spec.rb new file mode 100644 index 0000000000000..7af292a54877e --- /dev/null +++ b/decidim-conferences/spec/commands/publish_conference_speaker_spec.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +require "spec_helper" +module Decidim + module Conferences + module Admin + describe PublishConferenceSpeaker, type: :command do + let(:organization) { create :organization, available_locales: [:en] } + let(:conference_speaker) { create(:conference_speaker, published_at: nil) } + let(:current_user) { create(:user, :admin, :confirmed, organization:) } + let(:command) { described_class.new(conference_speaker, current_user) } + + describe "call" do + context "when the conference speaker is not already published" do + it "publishes the conference speaker" do + expect(Decidim.traceability).to receive(:perform_action!).with( + :publish, + conference_speaker, + current_user + ).and_call_original + + expect(command).to broadcast(:ok, conference_speaker) + end + end + + context "when the conference speaker is already published" do + before do + conference_speaker.update!(published_at: Time.current) + end + + it "does not publish the conference speaker" do + expect { command.call }.not_to(change { conference_speaker.reload.published_at }) + + expect(command).to broadcast(:invalid) + end + end + end + end + end + end +end diff --git a/decidim-conferences/spec/commands/unpublish_conference_speaker_spec.rb b/decidim-conferences/spec/commands/unpublish_conference_speaker_spec.rb new file mode 100644 index 0000000000000..3f4e06b0a8452 --- /dev/null +++ b/decidim-conferences/spec/commands/unpublish_conference_speaker_spec.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +require "spec_helper" + +module Decidim + module Conferences + module Admin + describe UnpublishConferenceSpeaker, type: :command do + let(:organization) { create :organization, available_locales: [:en] } + let(:conference_speaker) { create(:conference_speaker, published_at: Time.current) } + let(:current_user) { create(:user, :admin, :confirmed, organization:) } + let(:command) { described_class.new(conference_speaker, current_user) } + + describe "call" do + context "when the conference speaker is published" do + it "unpublishes the conference speaker" do + expect(Decidim.traceability).to receive(:perform_action!).with( + :unpublish, + conference_speaker, + current_user + ).and_call_original + + expect(command).to broadcast(:ok, conference_speaker) + end + end + + context "when the conference speaker is not published" do + before do + conference_speaker.update!(published_at: nil) + end + + it "does not unpublish the conference speaker" do + expect { command.call }.not_to(change { conference_speaker.reload.published_at }) + + expect(command).to broadcast(:invalid) + end + end + end + end + end + end +end diff --git a/decidim-conferences/spec/controllers/conference_speakers_controller_spec.rb b/decidim-conferences/spec/controllers/conference_speakers_controller_spec.rb index 820928bb08b4d..a71aac2db73ec 100644 --- a/decidim-conferences/spec/controllers/conference_speakers_controller_spec.rb +++ b/decidim-conferences/spec/controllers/conference_speakers_controller_spec.rb @@ -30,8 +30,8 @@ module Conferences end context "when conference has speakers" do - let!(:speaker1) { create(:conference_speaker, conference:) } - let!(:speaker2) { create(:conference_speaker, conference:) } + let!(:speaker1) { create(:conference_speaker, :published, conference:) } + let!(:speaker2) { create(:conference_speaker, :published, conference:) } let!(:non_speaker) { create(:conference_speaker) } context "when user has permissions" do diff --git a/decidim-conferences/spec/shared/manage_conference_admins_examples.rb b/decidim-conferences/spec/shared/manage_conference_admins_examples.rb index 29d3a9e4f9de7..0dd2d340d3e09 100644 --- a/decidim-conferences/spec/shared/manage_conference_admins_examples.rb +++ b/decidim-conferences/spec/shared/manage_conference_admins_examples.rb @@ -2,6 +2,7 @@ shared_examples "manage conference admins examples" do let(:other_user) { create(:user, organization:, email: "my_email@example.org") } + let(:attributes) { attributes_for(:user, organization:) } let!(:conference_admin) do create(:conference_admin, @@ -25,12 +26,12 @@ end end - it "creates a new conference admin" do + it "creates a new conference admin", versioning: true do click_on "New conference admin" within ".new_conference_user_role" do fill_in :conference_user_role_email, with: other_user.email - fill_in :conference_user_role_name, with: "John Doe" + fill_in :conference_user_role_name, with: attributes[:name] select "Administrator", from: :conference_user_role_role find("*[type=submit]").click @@ -41,6 +42,8 @@ within "#conference_admins table" do expect(page).to have_content(other_user.email) end + visit decidim_admin.root_path + expect(page).to have_content("invited #{other_user.name} to the #{translated(conference.title)} conference") end describe "when managing different users" do @@ -49,7 +52,7 @@ visit current_path end - it "updates a conference admin" do + it "updates a conference admin", versioning: true do within "#conference_admins" do within "#conference_admins tr", text: other_user.email do click_on "Edit" @@ -67,6 +70,8 @@ within "#conference_admins table" do expect(page).to have_content("Collaborator") end + visit decidim_admin.root_path + expect(page).to have_content("changed the role of #{other_user.name} in the #{translated(conference.title)} conference") end it "deletes a conference_user_role" do diff --git a/decidim-conferences/spec/shared/manage_conference_components_examples.rb b/decidim-conferences/spec/shared/manage_conference_components_examples.rb index 043660d545c41..984657311f43c 100644 --- a/decidim-conferences/spec/shared/manage_conference_components_examples.rb +++ b/decidim-conferences/spec/shared/manage_conference_components_examples.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true shared_examples "manage conference components" do + let!(:attributes) { attributes_for(:component, participatory_space: conference) } + before do switch_to_host(organization.host) login_as user, scope: :user @@ -20,9 +22,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My component", - ca: "La meva funcionalitat", - es: "Mi funcionalitat" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -49,12 +49,17 @@ it "is successfully created" do expect(page).to have_admin_callout("successfully") - expect(page).to have_content("My component") + expect(page).to have_content(translated(attributes[:name])) + end + + it "has a successful admin log" do + visit decidim_admin.root_path + expect(page).to have_content("created #{translated(attributes[:name])} in #{translated(conference.title)}") end context "and then edit it" do before do - within "tr", text: "My component" do + within "tr", text: translated(attributes[:name]) do click_on "Configure" end end @@ -103,9 +108,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My updated component", - ca: "La meva funcionalitat actualitzada", - es: "Mi funcionalidad actualizada" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -120,9 +123,9 @@ end expect(page).to have_admin_callout("successfully") - expect(page).to have_content("My updated component") + expect(page).to have_content(translated(attributes[:name])) - within "tr", text: "My updated component" do + within "tr", text: translated(attributes[:name]) do click_on "Configure" end @@ -133,6 +136,9 @@ within ".default-step-settings" do expect(all("input[type=checkbox]").first).to be_checked end + + visit decidim_admin.root_path + expect(page).to have_content("updated #{translated(attributes[:name])} in #{translated(conference.title)}") end end diff --git a/decidim-conferences/spec/shared/manage_conference_speakers_examples.rb b/decidim-conferences/spec/shared/manage_conference_speakers_examples.rb index 40d194a29ed3d..b9cee9a1aab74 100644 --- a/decidim-conferences/spec/shared/manage_conference_speakers_examples.rb +++ b/decidim-conferences/spec/shared/manage_conference_speakers_examples.rb @@ -2,6 +2,7 @@ shared_examples "manage conference speakers examples" do let!(:conference_speaker) { create(:conference_speaker, conference:) } + let(:attributes) { attributes_for(:conference_speaker, conference:) } before do switch_to_host(organization.host) @@ -19,14 +20,14 @@ end context "without existing user" do - it "creates a new conference speaker" do + it "creates a new conference speaker", versioning: true do click_on "New speaker" within ".new_conference_speaker" do - fill_in( - :conference_speaker_full_name, - with: "Daisy O'connor" - ) + fill_in(:conference_speaker_full_name, with: attributes[:full_name]) + fill_in_i18n(:conference_speaker_position, "#conference_speaker-position-tabs", **attributes[:position].except("machine_translations")) + fill_in_i18n(:conference_speaker_affiliation, "#conference_speaker-affiliation-tabs", **attributes[:affiliation].except("machine_translations")) + fill_in_i18n_editor(:conference_speaker_short_bio, "#conference_speaker-short_bio-tabs", **attributes[:short_bio].except("machine_translations")) find("*[type=submit]").click end @@ -35,8 +36,10 @@ expect(page).to have_current_path decidim_admin_conferences.conference_speakers_path(conference) within "#conference_speakers table" do - expect(page).to have_content("Daisy O'connor") + expect(page).to have_content(attributes[:full_name]) end + visit decidim_admin.root_path + expect(page).to have_content("created the #{attributes[:full_name]} speaker in the") end end @@ -67,16 +70,16 @@ visit current_path end - it "updates a conference speaker" do + it "updates a conference speaker", versioning: true do within "#conference_speakers tr", text: conference_speaker.full_name do click_on "Edit" end within ".edit_conference_speaker" do - fill_in( - :conference_speaker_full_name, - with: "Alicia O'connor" - ) + fill_in(:conference_speaker_full_name, with: attributes[:full_name]) + fill_in_i18n(:conference_speaker_position, "#conference_speaker-position-tabs", **attributes[:position].except("machine_translations")) + fill_in_i18n(:conference_speaker_affiliation, "#conference_speaker-affiliation-tabs", **attributes[:affiliation].except("machine_translations")) + fill_in_i18n_editor(:conference_speaker_short_bio, "#conference_speaker-short_bio-tabs", **attributes[:short_bio].except("machine_translations")) find("*[type=submit]").click end @@ -85,8 +88,10 @@ expect(page).to have_current_path decidim_admin_conferences.conference_speakers_path(conference) within "#conference_speakers table" do - expect(page).to have_content("Alicia O'connor") + expect(page).to have_content(attributes[:full_name]) end + visit decidim_admin.root_path + expect(page).to have_content("updated the #{conference_speaker.full_name} speaker in the") end it "deletes the conference speaker" do diff --git a/decidim-conferences/spec/shared/manage_conferences_examples.rb b/decidim-conferences/spec/shared/manage_conferences_examples.rb index a9c53bde41038..27d30fea66a14 100644 --- a/decidim-conferences/spec/shared/manage_conferences_examples.rb +++ b/decidim-conferences/spec/shared/manage_conferences_examples.rb @@ -7,6 +7,7 @@ let(:image2_filename) { "city2.jpeg" } let(:image2_path) { Decidim::Dev.asset(image2_filename) } + let(:attributes) { attributes_for(:conference) } before do click_on "New conference" @@ -17,36 +18,13 @@ end it_behaves_like "having a rich text editor for field", "#conference_registrations_terms", "content" - it "creates a new conference" do + it "creates a new conference", versioning: true do within ".new_conference" do - fill_in_i18n( - :conference_title, - "#conference-title-tabs", - en: "My conference", - es: "Mi proceso participativo", - ca: "El meu procés participatiu" - ) - fill_in_i18n( - :conference_slogan, - "#conference-slogan-tabs", - en: "Slogan", - es: "Eslogan", - ca: "Eslógan" - ) - fill_in_i18n_editor( - :conference_short_description, - "#conference-short_description-tabs", - en: "Short description", - es: "Descripción corta", - ca: "Descripció curta" - ) - fill_in_i18n_editor( - :conference_description, - "#conference-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:conference_title, "#conference-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:conference_slogan, "#conference-slogan-tabs", **attributes[:slogan].except("machine_translations")) + fill_in_i18n_editor(:conference_short_description, "#conference-short_description-tabs", **attributes[:short_description].except("machine_translations")) + fill_in_i18n_editor(:conference_description, "#conference-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_i18n_editor(:conference_objectives, "#conference-objectives-tabs", **attributes[:objectives].except("machine_translations")) fill_in :conference_weight, with: 1 fill_in :conference_slug, with: "slug" @@ -67,14 +45,18 @@ within "[data-content]" do expect(page).to have_current_path decidim_admin_conferences.conferences_path - expect(page).to have_content("My conference") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} conference") end end describe "updating a conference" do let(:image3_filename) { "city3.jpeg" } let(:image3_path) { Decidim::Dev.asset(image3_filename) } + let(:attributes) { attributes_for(:conference) } before do within "tr", text: translated(conference.title) do @@ -82,26 +64,27 @@ end end - it "updates a conference" do - fill_in_i18n( - :conference_title, - "#conference-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + it "updates a conference", versioning: true do dynamically_attach_file(:conference_banner_image, image3_path, remove_before: true) within ".edit_conference" do + fill_in_i18n(:conference_title, "#conference-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:conference_slogan, "#conference-slogan-tabs", **attributes[:slogan].except("machine_translations")) + fill_in_i18n_editor(:conference_short_description, "#conference-short_description-tabs", **attributes[:short_description].except("machine_translations")) + fill_in_i18n_editor(:conference_description, "#conference-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_i18n_editor(:conference_objectives, "#conference-objectives-tabs", **attributes[:objectives].except("machine_translations")) find("*[type=submit]").click end expect(page).to have_admin_callout("successfully") within "[data-content]" do - expect(page).to have_css("input[value='My new title']") + expect(page).to have_css("input[value='#{translated(attributes[:title])}']") expect(page).to have_css("img[src*='#{image3_filename}']") end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} conference") end end diff --git a/decidim-conferences/spec/shared/manage_media_links_examples.rb b/decidim-conferences/spec/shared/manage_media_links_examples.rb index 8612b12dbf2d2..85f849b369afa 100644 --- a/decidim-conferences/spec/shared/manage_media_links_examples.rb +++ b/decidim-conferences/spec/shared/manage_media_links_examples.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true shared_examples "manage media links examples" do + let!(:attributes) { attributes_for(:media_link, conference:) } + before do switch_to_host(organization.host) login_as user, scope: :user @@ -15,16 +17,10 @@ click_on "New media link" end - it "creates a new media link" do + it "creates a new media link", versioning: true do within "[data-content]" do within ".new_media_link" do - fill_in_i18n( - :conference_media_link_title, - "#conference_media_link-title-tabs", - en: "Media Link en", - es: "Media Link es", - ca: "Media Link ca" - ) + fill_in_i18n(:conference_media_link_title, "#conference_media_link-title-tabs", **attributes[:title].except("machine_translations")) fill_in :conference_media_link_link, with: "https://decidim.org" fill_in :conference_media_link_weight, with: 2 @@ -38,8 +34,11 @@ within "[data-content]" do expect(page).to have_current_path decidim_admin_conferences.conference_media_links_path(conference) - expect(page).to have_content("Media Link en") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} media link") end end @@ -56,19 +55,13 @@ end end - it "updates a conference media links" do + it "updates a conference media links", versioning: true do within "#media_links tr", text: translated(media_link.title) do click_on "Edit" end within ".edit_media_link" do - fill_in_i18n( - :conference_media_link_title, - "#conference_media_link-title-tabs", - en: "Media Link update en", - es: "Media Link update es", - ca: "Media Link update ca" - ) + fill_in_i18n(:conference_media_link_title, "#conference_media_link-title-tabs", **attributes[:title].except("machine_translations")) fill_in :conference_media_link_link, with: "https://decidim.org" fill_in :conference_media_link_weight, with: 2 @@ -81,8 +74,10 @@ expect(page).to have_current_path decidim_admin_conferences.conference_media_links_path(conference) within "#media_links table" do - expect(page).to have_content("Media Link update en") + expect(page).to have_content(translated(attributes[:title])) end + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(media_link.title)} media link") end it "deletes the conference media link" do diff --git a/decidim-conferences/spec/shared/manage_partners_examples.rb b/decidim-conferences/spec/shared/manage_partners_examples.rb index f3c618a917225..192c08de9b23a 100644 --- a/decidim-conferences/spec/shared/manage_partners_examples.rb +++ b/decidim-conferences/spec/shared/manage_partners_examples.rb @@ -2,6 +2,7 @@ shared_examples "manage partners examples" do let!(:conference_partner) { create(:partner, conference:) } + let!(:attributes) { attributes_for(:partner, conference:) } before do switch_to_host(organization.host) @@ -19,20 +20,42 @@ end describe "when managing other conference partners" do + let(:image1_filename) { "city.jpeg" } + let(:image1_path) { Decidim::Dev.asset(image1_filename) } + before do visit current_path end - it "updates a conference partners" do + it "creates a conference partner", versioning: true do + click_on "New partner" + dynamically_attach_file(:conference_partner_logo, image1_path) + + within ".new_partner" do + fill_in(:conference_partner_name, with: attributes[:name]) + + select("Collaborator", from: :conference_partner_partner_type) + + find("*[type=submit]").click + end + expect(page).to have_admin_callout("successfully") + expect(page).to have_current_path decidim_admin_conferences.conference_partners_path(conference) + + within "#partners table" do + expect(page).to have_content(attributes[:name]) + expect(page).to have_content("Collaborator") + end + visit decidim_admin.root_path + expect(page).to have_content("created the partner #{attributes[:name]}") + end + + it "updates a conference partners", versioning: true do within "#partners tr", text: conference_partner.name do click_on "Edit" end within ".edit_partner" do - fill_in( - :conference_partner_name, - with: "Partner name" - ) + fill_in(:conference_partner_name, with: attributes[:name]) select( "Collaborator", @@ -46,9 +69,11 @@ expect(page).to have_current_path decidim_admin_conferences.conference_partners_path(conference) within "#partners table" do - expect(page).to have_content("Partner name") + expect(page).to have_content(attributes[:name]) expect(page).to have_content("Collaborator") end + visit decidim_admin.root_path + expect(page).to have_content("updated the partner #{conference_partner.name}") end context "when the partner type is already a Collaborator" do diff --git a/decidim-conferences/spec/shared/manage_registration_types_examples.rb b/decidim-conferences/spec/shared/manage_registration_types_examples.rb index 9f6963e6c61b1..b032e1d393a45 100644 --- a/decidim-conferences/spec/shared/manage_registration_types_examples.rb +++ b/decidim-conferences/spec/shared/manage_registration_types_examples.rb @@ -2,6 +2,7 @@ shared_examples "manage registration types examples" do let!(:registration_type) { create(:registration_type, conference:) } + let(:attributes) { attributes_for(:registration_type, conference:) } before do switch_to_host(organization.host) @@ -23,19 +24,37 @@ visit current_path end + it "creates a conference registration types", versioning: true do + click_on "New registration type" + + within ".new_registration_type" do + fill_in_i18n(:conference_registration_type_title, "#conference_registration_type-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:conference_registration_type_description, "#conference_registration_type-description-tabs", **attributes[:description].except("machine_translations")) + + fill_in(:conference_registration_type_weight, with: 4) + + find("*[type=submit]").click + end + + expect(page).to have_admin_callout("successfully") + expect(page).to have_current_path decidim_admin_conferences.conference_registration_types_path(conference) + + within "#registration_types table" do + expect(page).to have_content(translated(attributes[:title])) + end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} registration type") + end + it "updates a conference registration types" do within "#registration_types tr", text: translated(registration_type.title) do click_on "Edit" end within ".edit_registration_type" do - fill_in_i18n( - :conference_registration_type_title, - "#conference_registration_type-title-tabs", - en: "Registration type title", - es: "Registration type title es", - ca: "Registration type title ca" - ) + fill_in_i18n(:conference_registration_type_title, "#conference_registration_type-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:conference_registration_type_description, "#conference_registration_type-description-tabs", **attributes[:description].except("machine_translations")) find("*[type=submit]").click end @@ -44,8 +63,11 @@ expect(page).to have_current_path decidim_admin_conferences.conference_registration_types_path(conference) within "#registration_types table" do - expect(page).to have_content("Registration type title") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(registration_type.title)} registration type") end it "deletes the conference registration type" do diff --git a/decidim-conferences/spec/system/admin/valuator_checks_components_spec.rb b/decidim-conferences/spec/system/admin/valuator_checks_components_spec.rb index 8e3cf8629de69..1aae1552e585c 100644 --- a/decidim-conferences/spec/system/admin/valuator_checks_components_spec.rb +++ b/decidim-conferences/spec/system/admin/valuator_checks_components_spec.rb @@ -42,4 +42,16 @@ end end end + + context "when visiting the admin" do + before do + visit decidim_admin.root_path + end + + it "can access the participatory space" do + click_on "Conferences" + click_on translated(conference.title) + expect(page).to have_link("Components") + end + end end diff --git a/decidim-conferences/spec/system/conference_speakers_spec.rb b/decidim-conferences/spec/system/conference_speakers_spec.rb index d693fafd863cf..d1371b336d394 100644 --- a/decidim-conferences/spec/system/conference_speakers_spec.rb +++ b/decidim-conferences/spec/system/conference_speakers_spec.rb @@ -31,7 +31,7 @@ end context "when there are some published conference speakers" do - let!(:conference_speakers) { create_list(:conference_speaker, 2, conference:) } + let!(:conference_speakers) { create_list(:conference_speaker, 2, :published, conference:) } before do visit decidim_conferences.conference_conference_speakers_path(conference) @@ -60,4 +60,74 @@ end end end + + describe "publication of conference speakers" do + let!(:speaker1) { create(:conference_speaker, :published, conference:) } + let!(:speaker2) { create(:conference_speaker, conference:) } + let!(:speaker3) { create(:conference_speaker, conference:) } + let!(:user) { create(:user, :admin, :confirmed, organization:) } + + before do + login_as user, scope: :user + visit decidim_conferences.conference_conference_speakers_path(conference) + end + + context "when there are some unpublished speakers" do + it "is not shown in the public list" do + within "#conference_speakers-grid" do + expect(page).to have_css("[data-conference-speaker]", count: 1) + end + end + + it "publishes the speaker" do + visit decidim_admin.root_path + click_on "Conferences" + click_on "conference_title" + click_on "Speakers" + + within all(".table-list__actions").first do + expect(page).to have_link("Publish") + click_link_or_button "Publish" + end + + visit decidim_conferences.conference_conference_speakers_path(conference) + + within "#conference_speakers-grid" do + expect(page).to have_css("[data-conference-speaker]", count: 2) + end + end + end + + context "when there are some published speakers" do + before do + speaker2.update!(published_at: Time.current) + speaker3.update!(published_at: Time.current) + visit decidim_conferences.conference_conference_speakers_path(conference) + end + + it "is shown in the public list" do + within "#conference_speakers-grid" do + expect(page).to have_css("[data-conference-speaker]", count: 3) + end + end + + it "unpublishes the speaker" do + visit decidim_admin.root_path + click_on "Conferences" + click_on "conference_title" + click_on "Speakers" + + within all(".table-list__actions").first do + expect(page).to have_link("Unpublish") + click_link_or_button "Unpublish" + end + + visit decidim_conferences.conference_conference_speakers_path(conference) + + within "#conference_speakers-grid" do + expect(page).to have_css("[data-conference-speaker]", count: 2) + end + end + end + end end diff --git a/decidim-conferences/spec/types/conference_type_spec.rb b/decidim-conferences/spec/types/conference_type_spec.rb index 61ae43ec9a490..c4fa20fe80e0d 100644 --- a/decidim-conferences/spec/types/conference_type_spec.rb +++ b/decidim-conferences/spec/types/conference_type_spec.rb @@ -11,6 +11,8 @@ module Conferences include_context "with a graphql class type" let(:model) { create(:conference) } + let!(:published_speaker) { create(:conference_speaker, :published, conference: model) } + let!(:unpublished_speaker) { create(:conference_speaker, conference: model) } include_examples "attachable interface" include_examples "categories container interface" @@ -190,6 +192,14 @@ module Conferences expect(response["registrationTerms"]["translation"]).to eq(model.registration_terms["en"]) end end + + describe "speakers" do + let(:query) { " { speakers { fullName } } " } + + it "returns the list of published speakers" do + expect(response["speakers"].count).to eq(1) + end + end end end end diff --git a/decidim-core/README.md b/decidim-core/README.md index 0d754711bfd57..0595238f1c445 100644 --- a/decidim-core/README.md +++ b/decidim-core/README.md @@ -28,7 +28,7 @@ User authentication is set up with [`Devise`](https://github.com/plataformatec/d Core implements an Amendment feature that can be activated in the components. As of now, it is only implemented in the proposal component. -This feature makes it possible for anyone to edit the text of an amendable resource and create a child resource as an amendment. This child resource may receive support and the author of the amendable resource may accept or reject the amendment (or child proposal). In case of rejection, the author of the rejected emendation may raise the child resource to an independent resource. +This feature makes it possible for anyone to edit the text of an amendable resource and create a child resource as an amendment. This child resource may receive votes and the author of the amendable resource may accept or reject the amendment (or child proposal). In case of rejection, the author of the rejected emendation may raise the child resource to an independent resource. ### Key artifacts for Amendments diff --git a/decidim-core/app/cells/decidim/attachments_file_tab/show.erb b/decidim-core/app/cells/decidim/attachments_file_tab/show.erb new file mode 100644 index 0000000000000..05bf98426f02e --- /dev/null +++ b/decidim-core/app/cells/decidim/attachments_file_tab/show.erb @@ -0,0 +1,3 @@ +
+ <%= form.upload :file, button_class: "button button__sm button__transparent-secondary" %> +
diff --git a/decidim-core/app/cells/decidim/attachments_file_tab_cell.rb b/decidim-core/app/cells/decidim/attachments_file_tab_cell.rb new file mode 100644 index 0000000000000..08f193427b314 --- /dev/null +++ b/decidim-core/app/cells/decidim/attachments_file_tab_cell.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Decidim + class AttachmentsFileTabCell < Decidim::ViewModel + alias form model + + def show + render :show + end + end +end diff --git a/decidim-core/app/cells/decidim/attachments_link_tab/show.erb b/decidim-core/app/cells/decidim/attachments_link_tab/show.erb new file mode 100644 index 0000000000000..9e3c0655ba393 --- /dev/null +++ b/decidim-core/app/cells/decidim/attachments_link_tab/show.erb @@ -0,0 +1,12 @@ +
+ <%= form.text_field :link, aria: { label: :url }, type: :text %> + +
+ <%= explanation %> +
    + <% help_messages.each do |message| %> +
  • <%= message %>
  • + <% end %> +
+
+
diff --git a/decidim-core/app/cells/decidim/attachments_link_tab_cell.rb b/decidim-core/app/cells/decidim/attachments_link_tab_cell.rb new file mode 100644 index 0000000000000..3dadc0f242e12 --- /dev/null +++ b/decidim-core/app/cells/decidim/attachments_link_tab_cell.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Decidim + class AttachmentsLinkTabCell < Decidim::ViewModel + alias form model + + def show + render :show + end + + private + + def explanation + I18n.t("decidim.forms.attachment_link.explanation") + end + + def help_messages + I18n.t("decidim.forms.attachment_link.help_messages") + end + end +end diff --git a/decidim-core/app/cells/decidim/card/show.erb b/decidim-core/app/cells/decidim/card/show.erb index da2c196b91c3b..21229dd5bf124 100644 --- a/decidim-core/app/cells/decidim/card/show.erb +++ b/decidim-core/app/cells/decidim/card/show.erb @@ -1,5 +1,5 @@
- <%= title %> + <%= decidim_html_escape(title) %>
<% metadata.first(4).each do |item| %>
diff --git a/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents/content.erb b/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents/content.erb index d00aeb371aac4..5a8fe403f40fd 100644 --- a/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents/content.erb +++ b/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents/content.erb @@ -2,4 +2,4 @@

<%= t("decidim.application.documents.related_documents") %>

-<%= cell "decidim/documents_panel", resource %> +<%= cell "decidim/documents_panel", resource, components_collections: %> diff --git a/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb b/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb index 6bfe45f0a363b..45e925b5882fa 100644 --- a/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb +++ b/decidim-core/app/cells/decidim/content_blocks/participatory_space_documents_cell.rb @@ -2,6 +2,22 @@ module Decidim module ContentBlocks - class ParticipatorySpaceDocumentsCell < BaseCell; end + class ParticipatorySpaceDocumentsCell < BaseCell + COMPONENTS_WITH_DOCUMENTS_COLLECTIONS = [:meetings].freeze + + def components_collections + components = resource.try(:components) + + return [] if components.blank? + + components = components.where(manifest_name: COMPONENTS_WITH_DOCUMENTS_COLLECTIONS).published + + include_component_name = components.count > 1 + + components.map do |component| + Decidim::ComponentAttachmentCollectionPresenter.new(component, include_component_name:) + end + end + end end end diff --git a/decidim-core/app/cells/decidim/documents_panel/show.erb b/decidim-core/app/cells/decidim/documents_panel/show.erb index e308ee08e4e75..6195c7a81b78b 100644 --- a/decidim-core/app/cells/decidim/documents_panel/show.erb +++ b/decidim-core/app/cells/decidim/documents_panel/show.erb @@ -1 +1,5 @@ <%= render partial: "decidim/application/documents", formats: [:html], locals: { documents: } %> + +<% components_collections.each do |collection| %> + <%= render partial: "decidim/application/component_documents", formats: [:html], locals: { collection: } %> +<% end %> diff --git a/decidim-core/app/cells/decidim/documents_panel_cell.rb b/decidim-core/app/cells/decidim/documents_panel_cell.rb index 809adba0f6da9..fe31ff925cfcd 100644 --- a/decidim-core/app/cells/decidim/documents_panel_cell.rb +++ b/decidim-core/app/cells/decidim/documents_panel_cell.rb @@ -22,7 +22,7 @@ class DocumentsPanelCell < Decidim::ViewModel alias resource model def show - return if documents.blank? + return if blank? render end @@ -30,5 +30,13 @@ def show def documents @documents ||= resource.try(:documents) end + + def components_collections + @components_collections ||= options[:components_collections] || [] + end + + def blank? + documents.blank? && components_collections.blank? + end end end diff --git a/decidim-core/app/cells/decidim/notification/show.erb b/decidim-core/app/cells/decidim/notification/show.erb index 33fe182d678f6..f48f1c03ba669 100644 --- a/decidim-core/app/cells/decidim/notification/show.erb +++ b/decidim-core/app/cells/decidim/notification/show.erb @@ -6,6 +6,11 @@ <% if notification.display_resource_text? %>
<%= notification.resource_text %>
<% end %> + <% if action_cell %> +
+ <%= cell(action_cell, model) %> +
+ <% end %>
<%= link_to model, remote: true, method: :delete, class: "notification__button", data: { "notification-read": "" } do %> diff --git a/decidim-core/app/cells/decidim/notification_actions/base_cell.rb b/decidim-core/app/cells/decidim/notification_actions/base_cell.rb new file mode 100644 index 0000000000000..bbe07d838effd --- /dev/null +++ b/decidim-core/app/cells/decidim/notification_actions/base_cell.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require "cell/partial" + +module Decidim + module NotificationActions + class BaseCell < Decidim::NotificationCell + def data + model&.event_class_instance&.action_data + end + end + end +end diff --git a/decidim-core/app/cells/decidim/notification_actions/buttons/show.erb b/decidim-core/app/cells/decidim/notification_actions/buttons/show.erb new file mode 100644 index 0000000000000..241d797dd0544 --- /dev/null +++ b/decidim-core/app/cells/decidim/notification_actions/buttons/show.erb @@ -0,0 +1,5 @@ +
+ <% buttons.each do |button| %> + <%= link_to *button %> + <% end %> +
diff --git a/decidim-core/app/cells/decidim/notification_actions/buttons_cell.rb b/decidim-core/app/cells/decidim/notification_actions/buttons_cell.rb new file mode 100644 index 0000000000000..7c45ec7573096 --- /dev/null +++ b/decidim-core/app/cells/decidim/notification_actions/buttons_cell.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +require "cell/partial" + +module Decidim + module NotificationActions + class ButtonsCell < BaseCell + def show + return unless data.present? && data.respond_to?(:map) + + render :show + end + + def buttons + @buttons ||= data.map do |item| + [ + label_for(item), + item[:url], + { + class: "button button__sm #{class_for(item)}", + remote: true, + data: { "notification-action" => "button" } + } + ].tap do |button| + button[2][:method] = item[:method] if item[:method].in?(%w(get patch put delete post)) + end + end + end + + private + + def label_for(item) + "#{item[:label].presence || I18n.t(item[:i18n_label])}#{icon(item[:icon]) if item[:icon].present?}" + end + + def class_for(item) + (item[:class].presence || "button__transparent-secondary") + end + end + end +end diff --git a/decidim-core/app/cells/decidim/notification_cell.rb b/decidim-core/app/cells/decidim/notification_cell.rb index 0a48964d7660c..ac35bc9af4250 100644 --- a/decidim-core/app/cells/decidim/notification_cell.rb +++ b/decidim-core/app/cells/decidim/notification_cell.rb @@ -30,6 +30,14 @@ def participatory_space_link ) end + def action_class + @action ||= ("#{notification.event_class_instance.action_cell.camelize}Cell" if notification.event_class_instance.action_cell) + end + + def action_cell + @action_cell ||= (notification.event_class_instance.action_cell if action_class&.safe_constantize) + end + private def notification diff --git a/decidim-core/app/cells/decidim/progress_bar/show.erb b/decidim-core/app/cells/decidim/progress_bar/show.erb index 91f460fec3c2c..2a099ae79b66e 100644 --- a/decidim-core/app/cells/decidim/progress_bar/show.erb +++ b/decidim-core/app/cells/decidim/progress_bar/show.erb @@ -4,11 +4,13 @@ <%= content_tag :span, total if total != 0 %> - <%= content_tag :div, units_name_text, class: "progress-bar__units" if units_name %> +
+ <%= content_tag :div, units_name_text, class: "progress-bar__units" if units_name %> - <% if total != 0 %> -
" aria-valuenow="<%= number_with_precision(percentage, separator: ".", precision: 2) %>" aria-valuemin="0" aria-valuemax="100" aria-valuetext="<%= number_to_percentage(percentage, precision: 2) %>"> -
-
- <% end %> + <% if total != 0 %> +
" aria-valuenow="<%= number_with_precision(percentage, separator: ".", precision: 2) %>" aria-valuemin="0" aria-valuemax="100" aria-valuetext="<%= number_to_percentage(percentage, precision: 2) %>"> +
+
+ <% end %> +
diff --git a/decidim-core/app/cells/decidim/statistic/show.erb b/decidim-core/app/cells/decidim/statistic/show.erb index 57c427d5e54ca..f7a336e1d7dd4 100644 --- a/decidim-core/app/cells/decidim/statistic/show.erb +++ b/decidim-core/app/cells/decidim/statistic/show.erb @@ -1,7 +1,7 @@
-

+ <%= stat_title %> -

+ <%= stat_number %> diff --git a/decidim-core/app/cells/decidim/tab_panels/show.erb b/decidim-core/app/cells/decidim/tab_panels/show.erb index 8dd1444e11614..77aa9a7eca1dd 100644 --- a/decidim-core/app/cells/decidim/tab_panels/show.erb +++ b/decidim-core/app/cells/decidim/tab_panels/show.erb @@ -3,7 +3,7 @@
<% end %> diff --git a/decidim-core/app/commands/decidim/amendable/withdraw.rb b/decidim-core/app/commands/decidim/amendable/withdraw.rb index 7a9d5c3d5f63b..837d40d3c18d6 100644 --- a/decidim-core/app/commands/decidim/amendable/withdraw.rb +++ b/decidim-core/app/commands/decidim/amendable/withdraw.rb @@ -18,7 +18,7 @@ def initialize(amendment, current_user) # Executes the command. Broadcasts these events: # # - :ok when everything is valid, together with the resource. - # - :invalid if the resource already has supports or does not belong to current user. + # - :invalid if the resource already has votes or does not belong to current user. # # Returns nothing. def call diff --git a/decidim-core/app/commands/decidim/invite_user_to_group.rb b/decidim-core/app/commands/decidim/invite_user_to_group.rb index dfa4c53820519..1886b99c91d8a 100644 --- a/decidim-core/app/commands/decidim/invite_user_to_group.rb +++ b/decidim-core/app/commands/decidim/invite_user_to_group.rb @@ -23,16 +23,16 @@ def call return broadcast(:ok) if user_belongs_to_group? transaction do - invite_user + @invitation = invite_user send_notification end broadcast(:ok) end - private + attr_reader :form, :user_group, :invitation - attr_reader :form, :user_group + private def invite_user Decidim::UserGroupMembership.create!( @@ -50,7 +50,8 @@ def send_notification affected_users: [form.user], extra: { user_group_name: user_group.name, - user_group_nickname: user_group.nickname + user_group_nickname: user_group.nickname, + membership_id: invitation.id } ) end diff --git a/decidim-core/app/controllers/concerns/decidim/devise_controllers.rb b/decidim-core/app/controllers/concerns/decidim/devise_controllers.rb index f31da6a7422fb..15ba751a8cc13 100644 --- a/decidim-core/app/controllers/concerns/decidim/devise_controllers.rb +++ b/decidim-core/app/controllers/concerns/decidim/devise_controllers.rb @@ -34,6 +34,7 @@ module DeviseControllers helper Decidim::CacheHelper helper Decidim::SocialShareButtonHelper helper Decidim::SanitizeHelper + helper Decidim::ApplicationHelper layout "layouts/decidim/application" diff --git a/decidim-core/app/controllers/decidim/group_invites_controller.rb b/decidim-core/app/controllers/decidim/group_invites_controller.rb index 3498477dc9242..0e42e4b0b00ae 100644 --- a/decidim-core/app/controllers/decidim/group_invites_controller.rb +++ b/decidim-core/app/controllers/decidim/group_invites_controller.rb @@ -34,16 +34,29 @@ def create def update enforce_permission_to :accept, :user_group_invitations - AcceptGroupInvitation.call(inviting_user_group, current_user) do on(:ok) do - flash[:notice] = t("group_invites.accept.success", scope: "decidim") - redirect_to profile_groups_path(current_user.nickname) + respond_to do |format| + format.json do + render json: { message: t("group_invites.accept.success", scope: "decidim") } + end + format.all do + flash[:notice] = t("group_invites.accept.success", scope: "decidim") + redirect_to profile_groups_path(current_user.nickname) + end + end end on(:invalid) do - flash[:alert] = t("group_invites.accept.error", scope: "decidim") - redirect_to profile_groups_path(current_user.nickname) + respond_to do |format| + format.json do + render json: { message: t("group_invites.accept.error", scope: "decidim") }, status: :unprocessable_entity + end + format.all do + flash[:alert] = t("group_invites.accept.error", scope: "decidim") + redirect_to profile_groups_path(current_user.nickname) + end + end end end end @@ -53,13 +66,27 @@ def destroy RejectGroupInvitation.call(inviting_user_group, current_user) do on(:ok) do - flash[:notice] = t("group_invites.reject.success", scope: "decidim") - redirect_to profile_groups_path(current_user.nickname) + respond_to do |format| + format.json do + render json: { message: t("group_invites.reject.success", scope: "decidim") } + end + format.all do + flash[:notice] = t("group_invites.reject.success", scope: "decidim") + redirect_to profile_groups_path(current_user.nickname) + end + end end on(:invalid) do - flash[:alert] = t("group_invites.reject.error", scope: "decidim") - redirect_to profile_groups_path(current_user.nickname) + respond_to do |format| + format.json do + render json: { message: t("group_invites.reject.error", scope: "decidim") }, status: :unprocessable_entity + end + format.all do + flash[:alert] = t("group_invites.reject.error", scope: "decidim") + redirect_to profile_groups_path(current_user.nickname) + end + end end end end diff --git a/decidim-core/app/events/decidim/invited_to_group_event.rb b/decidim-core/app/events/decidim/invited_to_group_event.rb index 5bc85ddab4e52..6e2163b2f885e 100644 --- a/decidim-core/app/events/decidim/invited_to_group_event.rb +++ b/decidim-core/app/events/decidim/invited_to_group_event.rb @@ -29,5 +29,34 @@ def user_group_nickname def user_group_name extra["user_group_name"] end + + def membership_id + extra["membership_id"] + end + + def invitation + @invitation ||= UserGroupMembership.find_by(user:, id: membership_id, role: "invited") + end + + def action_cell + "decidim/notification_actions/buttons" if invitation + end + + def action_data + [ + { + url: url_helpers.group_invite_path(user_group_nickname, membership_id, format: :json), + icon: "check-line", + method: "patch", + i18n_label: "decidim.group_invites.accept_invitation" + }, + { + url: url_helpers.group_invite_path(user_group_nickname, membership_id, format: :json), + icon: "close-circle-line", + method: "delete", + i18n_label: "decidim.group_invites.reject_invitation" + } + ] + end end end diff --git a/decidim-core/app/helpers/decidim/application_helper.rb b/decidim-core/app/helpers/decidim/application_helper.rb index a61aed8eeb55a..29ee5ca911078 100644 --- a/decidim-core/app/helpers/decidim/application_helper.rb +++ b/decidim-core/app/helpers/decidim/application_helper.rb @@ -105,5 +105,13 @@ def cell(name, model, options = {}, &) def prevent_timeout_seconds 0 end + + def text_initials(name) + name.split(/[\s.]+/).map(&:chr).slice(0, 2).join.upcase + end + + def add_body_classes(*class_names) + content_for :body_class, class_names.map { |class_name| " #{class_name.strip}" }.join + end end end diff --git a/decidim-core/app/models/decidim/attachment.rb b/decidim-core/app/models/decidim/attachment.rb index 5d3d8c22d9345..4d4c58d6ef0b2 100644 --- a/decidim-core/app/models/decidim/attachment.rb +++ b/decidim-core/app/models/decidim/attachment.rb @@ -9,6 +9,7 @@ class Attachment < ApplicationRecord include Traceable before_save :set_content_type_and_size, if: :attached? + before_validation :set_link_content_type_and_size, if: :link? translatable_fields :title, :description belongs_to :attachment_collection, class_name: "Decidim::AttachmentCollection", optional: true @@ -61,15 +62,33 @@ def document? !photo? end + # Whether this attachment is a link or not. + # + # Returns Boolean. + def link? + link.present? + end + # Which kind of file this is. # # Returns String. def file_type - url&.split(".")&.last&.downcase + if file? + url&.split(".")&.last&.downcase + elsif link? + "link" + end end + # The URL that points to the attachment + # + # Returns String. def url - attached_uploader(:file).path + if file? + attached_uploader(:file).path + elsif link? + link + end end # The URL to download the thumbnail of the file. Only works with images. @@ -95,6 +114,11 @@ def set_content_type_and_size self.file_size = file.byte_size end + def set_link_content_type_and_size + self.content_type = "text/uri-list" + self.file_size = 0 + end + def self.log_presenter_class_for(_log) Decidim::AdminLog::AttachmentPresenter end diff --git a/decidim-core/app/packs/src/decidim/abide_form_validator_fixer.js b/decidim-core/app/packs/src/decidim/abide_form_validator_fixer.js index ef2679406092b..642b355b48977 100644 --- a/decidim-core/app/packs/src/decidim/abide_form_validator_fixer.js +++ b/decidim-core/app/packs/src/decidim/abide_form_validator_fixer.js @@ -1,3 +1,10 @@ +/** + * This script modifies the behavior of Abide form validation to address the issue of form validation errors + * appearing prematurely in input fields. + * + * The primary goal is to hide error messages until the input field loses focus. + */ + document.addEventListener("DOMContentLoaded", () => { const validatorFixer = new AbideFormValidatorFixer(); validatorFixer.initialize(); diff --git a/decidim-core/app/packs/src/decidim/attachments/file_or_link_tabs.js b/decidim-core/app/packs/src/decidim/attachments/file_or_link_tabs.js new file mode 100644 index 0000000000000..23a7bbbbe951f --- /dev/null +++ b/decidim-core/app/packs/src/decidim/attachments/file_or_link_tabs.js @@ -0,0 +1,55 @@ +/** + * This file controls the behavior of the |File| and |Link| tabs in the + * attachment form. It disables the |File| tab when a link is present and + * vice versa. + */ + +const getFileButton = (container) => + container.querySelector("button#trigger-file"); +const getLinkButton = (container) => + container.querySelector("button#trigger-link"); +const getLinkInput = (container) => + container.querySelector("input#attachment_link"); +const getUploadsContainer = (container) => + container.querySelector("div[data-active-uploads]"); + +const hasUploads = (container) => container.querySelectorAll("div").length > 0; + +const updateTabsState = (container) => { + const fileButton = getFileButton(container); + const linkButton = getLinkButton(container); + const linkInput = getLinkInput(container); + const uploadsContainer = getUploadsContainer(container); + + const disableFileButton = Boolean(linkInput?.value); + const disableLinkButton = hasUploads(uploadsContainer); + + fileButton.disabled = disableFileButton; + linkButton.disabled = disableLinkButton; +}; + +const initializeTabs = (container) => { + const linkInput = getLinkInput(container); + const uploadsContainer = getUploadsContainer(container); + + linkInput.addEventListener("change", () => { + updateTabsState(container); + }); + + uploadsContainer.addEventListener("DOMSubtreeModified", () => { + updateTabsState(container); + console.log("DOMSubtreeModified"); + }); + + updateTabsState(container); +}; + +document.addEventListener("DOMContentLoaded", () => { + const tabs = document.querySelectorAll( + "div[data-file-or-link-tabs-controller]" + ); + + tabs.forEach((container) => { + initializeTabs(container); + }); +}); diff --git a/decidim-core/app/packs/src/decidim/attachments/index.js b/decidim-core/app/packs/src/decidim/attachments/index.js new file mode 100644 index 0000000000000..b0b86be4babc1 --- /dev/null +++ b/decidim-core/app/packs/src/decidim/attachments/index.js @@ -0,0 +1 @@ +import "src/decidim/attachments/file_or_link_tabs" diff --git a/decidim-core/app/packs/src/decidim/datepicker/form_datepicker.js b/decidim-core/app/packs/src/decidim/datepicker/form_datepicker.js index 3e6e34d0a5975..8e671a77625de 100644 --- a/decidim-core/app/packs/src/decidim/datepicker/form_datepicker.js +++ b/decidim-core/app/packs/src/decidim/datepicker/form_datepicker.js @@ -1,5 +1,5 @@ /* eslint-disable require-jsdoc */ -import { WcDatepicker } from "wc-datepicker/dist/components/wc-datepicker"; +import { defineCustomElements } from "wc-datepicker/dist/loader"; import generateDatePicker from "src/decidim/datepicker/generate_datepicker"; import generateTimePicker from "src/decidim/datepicker/generate_timepicker"; import { formatInputDate, formatInputTime } from "src/decidim/datepicker/datepicker_functions"; @@ -14,7 +14,7 @@ export default function formDatePicker(input) { const formats = { order: i18nDate.order, separator: i18nDate.separator, time: i18nTime.clock_format || 24 } if (!customElements.get("wc-datepicker")) { - customElements.define("wc-datepicker", WcDatepicker); + defineCustomElements(); }; if (!input.id) { diff --git a/decidim-core/app/packs/src/decidim/datepicker/generate_datepicker.js b/decidim-core/app/packs/src/decidim/datepicker/generate_datepicker.js index a7be1a8644adf..b1a5baa68fa26 100644 --- a/decidim-core/app/packs/src/decidim/datepicker/generate_datepicker.js +++ b/decidim-core/app/packs/src/decidim/datepicker/generate_datepicker.js @@ -17,6 +17,7 @@ export default function generateDatePicker(input, row, formats) { const calendar = document.createElement("button"); calendar.innerHTML = icon("calendar-line"); calendar.setAttribute("class", "datepicker__calendar-button"); + calendar.setAttribute("type", "button"); dateColumn.appendChild(date); dateColumn.appendChild(calendar); @@ -35,11 +36,13 @@ export default function generateDatePicker(input, row, formats) { const closeCalendar = document.createElement("button"); closeCalendar.innerText = i18n.close; closeCalendar.setAttribute("class", "datepicker__close-calendar button button__transparent-secondary button__xs"); + closeCalendar.setAttribute("type", "button"); const pickCalendar = document.createElement("button"); pickCalendar.innerText = i18n.select; pickCalendar.setAttribute("class", "datepicker__pick-calendar button button__secondary button__xs"); pickCalendar.setAttribute("disabled", true); + pickCalendar.setAttribute("type", "button"); datePickerContainer.appendChild(pickCalendar); datePickerContainer.appendChild(closeCalendar); diff --git a/decidim-core/app/packs/src/decidim/datepicker/generate_timepicker.js b/decidim-core/app/packs/src/decidim/datepicker/generate_timepicker.js index d0ef1c71dbd7c..68dff92cbacff 100644 --- a/decidim-core/app/packs/src/decidim/datepicker/generate_timepicker.js +++ b/decidim-core/app/packs/src/decidim/datepicker/generate_timepicker.js @@ -17,6 +17,7 @@ export default function generateTimePicker(input, row, formats) { const clock = document.createElement("button"); clock.innerHTML = icon("time-line") clock.setAttribute("class", "datepicker__clock-button"); + clock.setAttribute("type", "button"); timeColumn.appendChild(time); timeColumn.appendChild(clock); @@ -34,10 +35,12 @@ export default function generateTimePicker(input, row, formats) { const hourUp = document.createElement("button"); hourUp.setAttribute("class", "datepicker__hour-up"); hourUp.innerHTML = icon("arrow-drop-up-line", {class: "w-10 h-6 pr-1"}); + hourUp.setAttribute("type", "button"); const hourDown = document.createElement("button"); hourDown.setAttribute("class", "datepicker__hour-down"); hourDown.innerHTML = icon("arrow-drop-down-line", {class: "w-10 h-6 pr-1"}); + hourDown.setAttribute("type", "button"); hourColumn.appendChild(hours); hourColumn.appendChild(hourUp); @@ -54,10 +57,12 @@ export default function generateTimePicker(input, row, formats) { const minuteUp = document.createElement("button"); minuteUp.setAttribute("class", "datepicker__minute-up"); minuteUp.innerHTML = icon("arrow-drop-up-line", {class: "w-10 h-6 pr-1"}); + minuteUp.setAttribute("type", "button"); const minuteDown = document.createElement("button"); minuteDown.setAttribute("class", "datepicker__minute-down"); minuteDown.innerHTML = icon("arrow-drop-down-line", {class: "w-10 h-6 pr-1"}); + minuteDown.setAttribute("type", "button"); minuteColumn.appendChild(minutes); minuteColumn.appendChild(minuteUp); @@ -140,14 +145,17 @@ export default function generateTimePicker(input, row, formats) { const closeClock = document.createElement("button"); closeClock.innerText = i18n.close; closeClock.setAttribute("class", "datepicker__close-clock button button__transparent-secondary button__xs"); + closeClock.setAttribute("type", "button"); const resetClock = document.createElement("button"); resetClock.innerText = i18n.reset; resetClock.setAttribute("class", "datepicker__reset-clock button button__xs button__text-secondary"); + resetClock.setAttribute("type", "button"); const selectClock = document.createElement("button"); selectClock.innerText = i18n.select; selectClock.setAttribute("class", "datepicker__select-clock button button__secondary button__xs"); + selectClock.setAttribute("type", "button"); timePicker.appendChild(resetClock); timePicker.appendChild(selectClock); diff --git a/decidim-core/app/packs/src/decidim/index.js b/decidim-core/app/packs/src/decidim/index.js index a0810b6963adf..2077d6cb82dc5 100644 --- a/decidim-core/app/packs/src/decidim/index.js +++ b/decidim-core/app/packs/src/decidim/index.js @@ -49,6 +49,8 @@ import "src/decidim/direct_uploads/upload_field" import "src/decidim/data_consent" import "src/decidim/abide_form_validator_fixer" import "src/decidim/sw" +import "src/decidim/sticky_header" +import "src/decidim/attachments" // local deps that require initialization import formDatePicker from "src/decidim/datepicker/form_datepicker" @@ -63,6 +65,7 @@ import addInputEmoji, { EmojiButton } from "src/decidim/input_emoji" import FocusGuard from "src/decidim/focus_guard" import backToListLink from "src/decidim/back_to_list" import markAsReadNotifications from "src/decidim/notifications" +import handleNotificationActions from "src/decidim/notifications_actions" import RemoteModal from "src/decidim/remote_modal" import selectActiveIdentity from "src/decidim/identity_selector_dialog" import createTooltip from "src/decidim/tooltips" @@ -170,6 +173,7 @@ const initializer = (element = document) => { backToListLink(element.querySelectorAll(".js-back-to-list")); markAsReadNotifications(element) + handleNotificationActions(element) scrollToLastChild(element) diff --git a/decidim-core/app/packs/src/decidim/notifications_actions.js b/decidim-core/app/packs/src/decidim/notifications_actions.js new file mode 100644 index 0000000000000..10ed9822ceec3 --- /dev/null +++ b/decidim-core/app/packs/src/decidim/notifications_actions.js @@ -0,0 +1,40 @@ +/** + * This file handles the interactions of actions in notifications (if any) + * @param {HTMLElement} node target node + * @returns {void} + */ +export default function(node = document) { + const actions = node.querySelectorAll("[data-notification-action]") + if (!actions.length) { + return; + } + + const extractMessage = (detail) => { + return detail && detail.message || detail[0] && detail[0].message + }; + + const resolvePanel = (panel, message, klass) => { + panel.classList.remove("spinner-container"); + if (message) { + panel.innerHTML = `
${message}
`; + } else { + panel.innerHTML = ""; + } + }; + + actions.forEach((action) => { + const panel = action.closest(".notification__snippet-actions") + action.addEventListener("ajax:beforeSend", () => { + panel.classList.add("spinner-container"); + panel.querySelectorAll("[data-notification-action]").forEach((el) => { + el.disabled = true; + }); + }); + action.addEventListener("ajax:success", (event) => { + resolvePanel(panel, extractMessage(event.detail), "success"); + }); + action.addEventListener("ajax:error", (event) => { + resolvePanel(panel, extractMessage(event.detail) || window.Decidim.config.get("notifications").action_error, "alert"); + }); + }); +} diff --git a/decidim-core/app/packs/src/decidim/sticky_header.js b/decidim-core/app/packs/src/decidim/sticky_header.js new file mode 100644 index 0000000000000..57459ed94d4ba --- /dev/null +++ b/decidim-core/app/packs/src/decidim/sticky_header.js @@ -0,0 +1,54 @@ +// This script implements the sticky header and the sticky buttons. The sticky header hides when participants scroll down and shows when they scroll up. +// Sticky headers allow users to quickly access the navigation, search, and utility-navigation elements without scrolling up to the top of the page. They increase the discoverability of the elements in the header. +// The sticky buttons in the other hand, those are some of the main Call to Actions (CTAs) that remain accessible on the screen as the user scrolls through the detailed view of the Meetings, Proposals, Surveys, and Budgets components. + +let prevScroll = window.scrollY; +const stickyHeader = document.querySelector("[data-sticky-header]"); +const footer = document.querySelector("footer"); +const stickyButtons = document.querySelectorAll("[data-sticky-buttons]"); + +const isElementInViewport = (element) => { + const rect = element.getBoundingClientRect(); + return rect.top >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight); +}; + +const adjustCtasButtons = () => { + if (!stickyButtons || !stickyButtons.length) { + return; + } + + let visibleButtons = Array.from(stickyButtons).filter(isElementInViewport); + + if (visibleButtons.length > 0) { + const marginBottom = Math.max(...visibleButtons.map((ctasButton) => ctasButton.offsetHeight)); + footer.style.marginBottom = `${marginBottom}px`; + } else { + footer.style.marginBottom = 0; + } +}; + +if (stickyHeader) { + document.addEventListener("scroll", () => { + // if a subelement is not visible it has no offsetParent + const header = document.getElementById("main-bar").offsetParent; + if (header && window.getComputedStyle(stickyHeader).position === "fixed") { + let currentScroll = window.scrollY; + let goingDown = prevScroll > currentScroll; + let change = Math.abs(prevScroll - currentScroll); + if (change > 5) { + if (goingDown || currentScroll < stickyHeader.offsetHeight) { + stickyHeader.style.top = 0; + } else { + stickyHeader.style.top = `-${stickyHeader.offsetHeight}px`; + } + prevScroll = currentScroll; + } + + adjustCtasButtons(); + } + }); + + document.addEventListener("on:toggle", () => { + adjustCtasButtons(); + }); +}; diff --git a/decidim-core/app/packs/stylesheets/decidim/_dropdown.scss b/decidim-core/app/packs/stylesheets/decidim/_dropdown.scss index 0abad4127dbfa..4b51717ba15f7 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_dropdown.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_dropdown.scss @@ -33,6 +33,24 @@ } } +[data-target*="dropdown-menu-language-chooser"] { + & > span { + @apply block font-semibold text-black text-xs; + } + + > svg { + @apply w-5 h-6 flex-none text-xs font-normal text-black fill-current; + } + + & > ul { + @apply w-6 bg-gray; + + > li { + @apply w-6 bg-gray; + } + } +} + .dropdown { @apply absolute border-2 border-gray-3 rounded min-w-max p-4 drop-shadow-md text-left z-10; diff --git a/decidim-core/app/packs/stylesheets/decidim/_filters.scss b/decidim-core/app/packs/stylesheets/decidim/_filters.scss index 3756ca805a46e..db8b5bbd7f3e0 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_filters.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_filters.scss @@ -69,7 +69,7 @@ } &-search { - @apply w-full relative; + @apply w-full relative bg-gray; input { @apply w-full; diff --git a/decidim-core/app/packs/stylesheets/decidim/_flash.scss b/decidim-core/app/packs/stylesheets/decidim/_flash.scss index be68d8d442071..1c02977fafbfa 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_flash.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_flash.scss @@ -12,7 +12,7 @@ } &__message { - @apply text-black font-medium text-md; + @apply text-black font-medium text-md flex-col; a { @apply underline text-secondary; diff --git a/decidim-core/app/packs/stylesheets/decidim/_footer.scss b/decidim-core/app/packs/stylesheets/decidim/_footer.scss index 68a714cb93918..619e8b42798ce 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_footer.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_footer.scss @@ -1,11 +1,9 @@ footer { - @apply mb-16 lg:mb-0; - .main-footer { @apply bg-gray-4; &__top { - @apply flex flex-col lg:flex-row gap-8 container py-10; + @apply hidden flex flex-col lg:flex-row lg:block gap-8 container py-10; } &__down { diff --git a/decidim-core/app/packs/stylesheets/decidim/_forms.scss b/decidim-core/app/packs/stylesheets/decidim/_forms.scss index a2882e35c0974..1a0e7f8778714 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_forms.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_forms.scss @@ -1,3 +1,11 @@ +#form-search-mobile { + @apply py-1.5 px-4 bg-gray-5 rounded-sm; + + input[type="text"] { + @apply bg-gray-5; + } +} + .form-defaults { /* text-like inputs */ input[type="date"], diff --git a/decidim-core/app/packs/stylesheets/decidim/_header.scss b/decidim-core/app/packs/stylesheets/decidim/_header.scss index f59787d67585c..d103411c1339b 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_header.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_header.scss @@ -20,8 +20,30 @@ header { } } + #flash-messages-container { + @apply mt-28 md:mt-0; + } + + #menu-bar-container { + @apply mt-24 md:mt-0; + } + + &.with-admin-bar { + #flash-messages-container { + @apply mt-40 md:mt-0; + } + + #menu-bar-container { + @apply mt-[140px] md:mt-0; + } + } + + #sticky-header-container { + @apply fixed w-full top-0 shadow-lg z-40 bg-white md:relative transition-top duration-300; + } + .main-bar { - @apply container grid grid-cols-4 md:grid-cols-8 lg:grid-cols-12 gap-4 items-center py-5; + @apply container grid grid-cols-4 md:grid-cols-8 lg:grid-cols-12 gap-4 items-center py-5 h-24; &__container { @apply relative w-full; @@ -31,6 +53,14 @@ header { @apply col-span-3 xl:col-span-2 prose prose-img:max-h-16 prose-img:my-0; } + &__logo-desktop { + @apply hidden lg:block; + } + + &__logo-mobile { + @apply lg:hidden; + } + &__search { @apply hidden md:block col-span-2 col-start-5 xl:col-start-4; @@ -61,6 +91,10 @@ header { &-wrapper { @apply flex gap-x-4 xl:gap-x-6; } + + &-account { + @apply w-6 h-6 flex items-center justify-center bg-secondary text-white rounded-full text-xs font-bold mr-2; + } } /* overwrite default dropdown styles */ @@ -81,10 +115,10 @@ header { @apply fixed bottom-0 left-0 z-40 bg-white w-full px-4 py-3 flex justify-between text-secondary shadow-[0_-4px_6px_rgba(198,198,198,0.25)]; &__trigger { - @apply flex flex-col items-center text-secondary cursor-pointer p-2; + @apply flex flex-col items-center text-secondary cursor-pointer pl-4 border-l border-gray-3; svg { - @apply w-5 h-5 fill-current; + @apply w-6 h-6 fill-current; } span { @@ -96,6 +130,10 @@ header { @apply absolute top-full left-0 z-30 bg-white; } + &__dropdown-before { + @apply before:block before:absolute before:-top-10 before:right-12 before:content-[""] before:bg-white before:w-24 before:h-12 before:-mt-8; + } + &__account { @apply fixed top-0 left-0 w-full h-full z-30 bg-white; @@ -118,46 +156,33 @@ header { .main-bar__avatar { @apply w-12 h-12; } - } - - &__search { - @apply fixed top-0 left-0 w-full h-full z-30 bg-white; - &-block { - @apply container h-full flex flex-col justify-center; + .main-bar__avatar-name { + @apply w-12 h-12 text-2xl; } - .main-bar { - @apply border-b border-gray; + .account-container { + @apply before:block before:absolute before:top-16 before:right-14 before:content-[""] before:bg-white before:w-2 before:h-12 before:-mt-8; } + } - label { - @apply block mb-4 text-black; - } + &__item { + @apply relative; + } - form { - @apply relative; - } + &__search { + @apply fixed top-0 left-0 w-full h-full z-30 bg-white; } - &__item { - @apply w-1/4 flex flex-col items-center relative; + &__login { + @apply w-20 h-full flex flex-row items-center relative text-secondary gap-1; svg { - @apply w-8 h-8 fill-current; + @apply w-8 h-6 fill-current; } svg + span { - @apply text-sm first-letter:uppercase; - } - - /* overwrite default dropdown styles */ - &[data-target*="dropdown"] { - @apply p-0 gap-0; - - > span { - @apply block font-normal text-sm first-letter:uppercase; - } + @apply text-sm first-letter:uppercase pr-4; } } } @@ -179,11 +204,11 @@ header { } &__notification { - @apply w-2.5 h-2.5 rounded-full block absolute -top-0.5 right-0 bg-primary; + @apply w-2.5 h-2.5 rounded-full block absolute -top-0.5 right-1.5 bg-primary; } &__avatar { - @apply block w-8 h-8 rounded-full border border-secondary overflow-hidden; + @apply block w-6 h-6 rounded-full border border-secondary overflow-hidden mr-2; span { @apply w-full h-full rounded-full overflow-hidden; @@ -194,6 +219,10 @@ header { } } + &__avatar-name { + @apply w-6 h-6 flex items-center justify-center bg-secondary text-white rounded-full text-xs font-bold mr-2; + } + /* overwrite default dropdown styles */ [id*="dropdown-menu"] { @apply py-0 mx-0 w-full; @@ -202,14 +231,10 @@ header { @apply md:hidden; } } - - [data-target*="dropdown"] { - @apply last-of-type:[&>svg]:block; - } } .menu-bar { - @apply container h-full flex justify-between items-center lg:relative; + @apply container h-full flex justify-between items-center lg:relative last-of-type:[&>svg]:hidden; &__container { @apply bg-primary relative h-14; @@ -342,6 +367,10 @@ header { } } + &__language-chooser { + @apply absolute top-full left-0 bg-white rounded w-full bg-gray-5; + } + &__main-dropdown { @apply bg-white divide-y divide-gray-3 rounded-b shadow-lg text-black w-full lg:w-[1280px]; @@ -349,15 +378,6 @@ header { &__top { @apply flex flex-col md:flex-row justify-between p-4 md:p-8 gap-x-8; - &-left { - @apply w-full md:w-1/2; - - /* Overwrite default size */ - .card__highlight-text { - @apply text-md; - } - } - &-right { @apply hidden md:block md:w-1/2; } diff --git a/decidim-core/app/packs/stylesheets/decidim/_layout.scss b/decidim-core/app/packs/stylesheets/decidim/_layout.scss index d268b413691ea..7dbdf4614ff76 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_layout.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_layout.scss @@ -105,3 +105,16 @@ .layout-main__buttons { @apply flex gap-x-1 items-center; } + +.layout-aside__ctas-buttons { + @apply fixed md:relative inset-x-0 bottom-0 z-30 md:z-0 flex flex-row-reverse md:flex-col items-center md:items-stretch last:[&>button]:font-semibold first:[&>button]:text-lg justify-around bg-white md:bg-transparent gap-4 md:gap-0 p-4 md:p-0 shadow-inner md:shadow-none first:[&>*]:grow md:first:[&>*]:grow-0 last:[&>*]:w-1/2 md:last:[&>*]:w-auto h-20 md:h-fit first:[&>button]:py-3; + + .meeting__aside-progress, + .proposals__aside-progress { + @apply flex flex-col-reverse md:flex-col md:w-auto; + } +} + +.survey-section-buttons { + @apply flex-row last:[&>button]:font-semibold md:[&>button]:font-normal last:[&>button]:text-lg md:last:[&>button]:text-sm md:first:[&>button]:text-sm last:[&>button]:py-3 md:last:[&>button]:py-1.5 md:first:[&>button]:py-1.5; +} diff --git a/decidim-core/app/packs/stylesheets/decidim/_modal_update.scss b/decidim-core/app/packs/stylesheets/decidim/_modal_update.scss index 87a8a982e4593..f5e0b50d70b04 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_modal_update.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_modal_update.scss @@ -7,7 +7,7 @@ } &-container { - @apply mt-4 md:mt-12 space-y-4; + @apply space-y-4; } &-placeholder { diff --git a/decidim-core/app/packs/stylesheets/decidim/_notifications.scss b/decidim-core/app/packs/stylesheets/decidim/_notifications.scss index f6e2d67a5e539..181a2f17fe73b 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_notifications.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_notifications.scss @@ -20,6 +20,10 @@ @apply prose-a:font-semibold hover:prose-a:underline prose-a:text-secondary; } + &-actions { + @apply pt-4; + } + &-resource { @apply text-sm text-gray-2 flex items-center gap-1; diff --git a/decidim-core/app/packs/stylesheets/decidim/_tabs_x.scss b/decidim-core/app/packs/stylesheets/decidim/_tabs_x.scss index bb5f748f64093..3a9ec688f4aa6 100644 --- a/decidim-core/app/packs/stylesheets/decidim/_tabs_x.scss +++ b/decidim-core/app/packs/stylesheets/decidim/_tabs_x.scss @@ -6,13 +6,17 @@ } &[aria-expanded="true"], - &:hover { + &:hover[disabled="false"] { @apply text-secondary border-secondary; svg { @apply text-secondary; } } + + &[disabled] { + @apply opacity-50 cursor-not-allowed; + } } .tabs-1 { diff --git a/decidim-core/app/presenters/decidim/admin_log/organization_presenter.rb b/decidim-core/app/presenters/decidim/admin_log/organization_presenter.rb index 569f73572f062..48b45e01c255b 100644 --- a/decidim-core/app/presenters/decidim/admin_log/organization_presenter.rb +++ b/decidim-core/app/presenters/decidim/admin_log/organization_presenter.rb @@ -26,7 +26,7 @@ def diff_fields_mapping def settings_attributes_mapping { - name: :string, + name: :i18n, default_locale: :locale, reference_prefix: :string, twitter_handler: :string, diff --git a/decidim-core/app/presenters/decidim/component_attachment_collection_presenter.rb b/decidim-core/app/presenters/decidim/component_attachment_collection_presenter.rb new file mode 100644 index 0000000000000..f3a489ac4eed2 --- /dev/null +++ b/decidim-core/app/presenters/decidim/component_attachment_collection_presenter.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +module Decidim + # + # Decorator attachments of a component acting as an attachment collection + # + class ComponentAttachmentCollectionPresenter < SimpleDelegator + include Decidim::TranslatableAttributes + + def initialize(resource, opts = {}) + super(resource) + + @include_component_name = opts[:include_component_name] + end + + def attachments + @attachments ||= if [resource_model_name, resource_table_name].all?(&:present?) + base_query = Decidim::Attachment.joins(resource_join.join_sources) + .where(resource_table_name => { decidim_component_id: __getobj__.id }) + if resource_model&.include?(Decidim::Publicable) + base_query.where.not(resource_table_name => { published_at: nil }) + else + base_query + end + else + Decidim::Attachment.none + end + end + + def documents + @documents ||= attachments.with_attached_file.order(:weight).select(&:document?) + end + + def documents_visible_for(user) + return documents unless resource_model.respond_to?(:visible_for) + + attachments.merge(resource_model.visible_for(user)).with_attached_file.order(:weight).select(&:document?) + end + + def unused? + documents.blank? + end + + def id + "component-#{__getobj__.id}" + end + + def name + base_name = I18n.t(manifest_name, scope: "decidim.application.documents.component_documents") + + return base_name unless @include_component_name + + "#{base_name} - #{translated_attribute(__getobj__.name)}" + end + + def description; end + + private + + def resource_join + resource_table = Arel::Table.new(resource_table_name) + attachments_table = Decidim::Attachment.arel_table + attachments_table.join(resource_table).on( + resource_table[:id].eq(attachments_table[:attached_to_id]), + attachments_table[:attached_to_type].eq(resource_model_name) + ) + end + + def resource_model_name + @resource_model_name ||= Decidim.resource_registry.find(manifest_name)&.model_class_name + end + + def resource_model + @resource_model ||= resource_model_name&.safe_constantize + end + + def resource_table_name + @resource_table_name ||= resource_model&.table_name + end + end +end diff --git a/decidim-core/app/presenters/decidim/home_stats_presenter.rb b/decidim-core/app/presenters/decidim/home_stats_presenter.rb index aedab9312323a..3fcfb0e07fabb 100644 --- a/decidim-core/app/presenters/decidim/home_stats_presenter.rb +++ b/decidim-core/app/presenters/decidim/home_stats_presenter.rb @@ -45,7 +45,7 @@ def component_stats(conditions) stats = {} Decidim.component_manifests.flat_map do |component| component - .stats.except([:supports_count]) + .stats.except([:votes_count]) .filter(conditions) .with_context(published_components) .each do |name, data| diff --git a/decidim-core/app/presenters/decidim/log/resource_presenter.rb b/decidim-core/app/presenters/decidim/log/resource_presenter.rb index 5b6fc8fb6f1f9..3b0584ecee139 100644 --- a/decidim-core/app/presenters/decidim/log/resource_presenter.rb +++ b/decidim-core/app/presenters/decidim/log/resource_presenter.rb @@ -10,6 +10,8 @@ module Log # overwrite `BasePresenter#resource_presenter` to return your custom resource presenter. # The only requirement for custom renderers is that they should respond to `present`. class ResourcePresenter + include Decidim::SanitizeHelper + # Public: Initializes the presenter. # # resource - An instance of a model that can be located by @@ -65,7 +67,11 @@ def resource_path # # Returns an HTML-safe String. def present_resource_name - h.translated_attribute extra["title"] + if resource.present? && resource.respond_to?(:presenter) && resource.presenter.respond_to?(:title) + resource.presenter.title(html_escape: true) + else + decidim_escape_translated(extra["title"]).html_safe + end end end end diff --git a/decidim-core/app/services/decidim/log/diff_changeset_calculator.rb b/decidim-core/app/services/decidim/log/diff_changeset_calculator.rb index c1fee50e771df..4846e0ab0579c 100644 --- a/decidim-core/app/services/decidim/log/diff_changeset_calculator.rb +++ b/decidim-core/app/services/decidim/log/diff_changeset_calculator.rb @@ -86,7 +86,7 @@ def generate_i18n_changeset(attribute, values, type) locales.flat_map do |locale| previous_value = values.first.try(:[], locale) new_value = values.last.try(:[], locale) - if previous_value == new_value + if previous_value == new_value || (previous_value.nil? && new_value.blank?) nil else label = generate_label(attribute, locale) diff --git a/decidim-core/app/views/decidim/application/_collection.html.erb b/decidim-core/app/views/decidim/application/_collection.html.erb index 997bfa7c075b2..caaab2be4ee86 100644 --- a/decidim-core/app/views/decidim/application/_collection.html.erb +++ b/decidim-core/app/views/decidim/application/_collection.html.erb @@ -12,7 +12,9 @@ diff --git a/decidim-core/app/views/layouts/decidim/_application.html.erb b/decidim-core/app/views/layouts/decidim/_application.html.erb index 673502a4b9dc0..23d5819d3210a 100644 --- a/decidim-core/app/views/layouts/decidim/_application.html.erb +++ b/decidim-core/app/views/layouts/decidim/_application.html.erb @@ -6,7 +6,7 @@ <%= render partial: "layouts/decidim/head" %> - + <%= link_to t("skip_button", scope: "decidim.accessibility"), "#content", class: "layout-container__skip" %> <%= cell("decidim/data_consent", current_organization) %> diff --git a/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb b/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb index 52bd2d9ea9f35..43b73d0ed5a92 100644 --- a/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb +++ b/decidim-core/app/views/layouts/decidim/_js_configuration.html.erb @@ -12,6 +12,9 @@ js_configs = { date: I18n.t("date"), time: I18n.t("time") }, + notifications: { + action_error: I18n.t("decidim.notifications.action_error") + }, external_domain_allowlist: [current_organization.host] + current_organization.external_domain_allowlist, consent_cookie_name: Decidim.consent_cookie_name, sign_out_path: decidim.destroy_user_session_path diff --git a/decidim-core/app/views/layouts/decidim/_logo_mobile.html.erb b/decidim-core/app/views/layouts/decidim/_logo_mobile.html.erb new file mode 100644 index 0000000000000..066c8529aac23 --- /dev/null +++ b/decidim-core/app/views/layouts/decidim/_logo_mobile.html.erb @@ -0,0 +1,11 @@ +<% if organization %> + <%= link_to decidim.root_url(host: organization.host), "aria-label": t("front_page_link", scope: "decidim.accessibility") do %> + <% if organization.favicon.attached? %> + <%= image_tag organization.attached_uploader(:favicon).variant_path(:medium), alt: t("logo", scope: "decidim.accessibility", organization: current_organization_name) %> + <% else %> + <%= current_organization_name %> + <% end %> + <% end %> +<% else %> + <%= Decidim.application_name %> +<% end %> diff --git a/decidim-core/app/views/layouts/decidim/_wrapper.html.erb b/decidim-core/app/views/layouts/decidim/_wrapper.html.erb index ff3d79e5a88e7..655dbb34b68b7 100644 --- a/decidim-core/app/views/layouts/decidim/_wrapper.html.erb +++ b/decidim-core/app/views/layouts/decidim/_wrapper.html.erb @@ -11,15 +11,19 @@ end %>
-
- <%= render partial: "layouts/decidim/admin_links" if current_user&.admin %> - <%= render partial: "layouts/decidim/header/main" %> - <% if display_flash_messages.present? %> -
- <%= display_flash_messages %> -
- <% end %> - <%= render partial: "layouts/decidim/header/menu" unless controller_name == "homepage" %> +
> +
+ <%= render partial: "layouts/decidim/admin_links" if current_user&.admin %> + <%= render partial: "layouts/decidim/header/main" %> +
+
diff --git a/decidim-core/app/views/layouts/decidim/footer/_main.html.erb b/decidim-core/app/views/layouts/decidim/footer/_main.html.erb index 80677a7c19d09..c3dced8b48ef2 100644 --- a/decidim-core/app/views/layouts/decidim/footer/_main.html.erb +++ b/decidim-core/app/views/layouts/decidim/footer/_main.html.erb @@ -11,7 +11,7 @@ - diff --git a/decidim-core/app/views/layouts/decidim/footer/_main_social_media_links.html.erb b/decidim-core/app/views/layouts/decidim/footer/_main_social_media_links.html.erb index 7e6a8e52cfaf4..643ea23cdee38 100644 --- a/decidim-core/app/views/layouts/decidim/footer/_main_social_media_links.html.erb +++ b/decidim-core/app/views/layouts/decidim/footer/_main_social_media_links.html.erb @@ -1,4 +1,4 @@ -
    +
      <% if current_organization.twitter_handler.present? %>
    • diff --git a/decidim-core/app/views/layouts/decidim/header/_main.html.erb b/decidim-core/app/views/layouts/decidim/header/_main.html.erb index 0d0c0af4e4fb7..4cf396e05394c 100644 --- a/decidim-core/app/views/layouts/decidim/header/_main.html.erb +++ b/decidim-core/app/views/layouts/decidim/header/_main.html.erb @@ -1,7 +1,12 @@
      - <%# Main dropdown mobile %> - +
      + <%# Main dropdown mobile %> + - + - <%# Sticky menu mobile %> - <%# Overlay menus mobile %> - <%= render partial: "layouts/decidim/header/main_links_mobile_search" %> <%= render partial: "layouts/decidim/header/main_links_mobile_account" if current_user %>
      diff --git a/decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb b/decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb index 38c4e3a331555..715d694a3065f 100644 --- a/decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb +++ b/decidim-core/app/views/layouts/decidim/header/_main_links_desktop.html.erb @@ -5,8 +5,10 @@
      <%= render partial: "layouts/decidim/header/menu_breadcrumb_items" %> diff --git a/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown.html.erb b/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_desktop.html.erb similarity index 100% rename from decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown.html.erb rename to decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_desktop.html.erb diff --git a/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb b/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb new file mode 100644 index 0000000000000..e21a90b2d4140 --- /dev/null +++ b/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_main_dropdown_mobile.html.erb @@ -0,0 +1,17 @@ + diff --git a/decidim-core/app/views/layouts/decidim/header/_menu_form_search_mobile.html.erb b/decidim-core/app/views/layouts/decidim/header/_menu_form_search_mobile.html.erb new file mode 100644 index 0000000000000..c70feb1f28b91 --- /dev/null +++ b/decidim-core/app/views/layouts/decidim/header/_menu_form_search_mobile.html.erb @@ -0,0 +1,16 @@ +<%= form_tag(decidim.search_path, method: :get, id: "form-search-mobile", class: "filter-search") do %> + <%= text_field_tag( + :term, + nil, + id: "input-search-mobile", + class: "reset-defaults outline-none", + value: params[:term] || params.dig(:filter, :term), + placeholder: t("decidim.search.term_input_placeholder"), + title: t("decidim.search.term_input_placeholder"), + "aria-label": t("decidim.search.term_input_placeholder"), + tabindex: "0" + ) %> + +<% end %> diff --git a/decidim-core/app/views/layouts/decidim/header/_mobile_language_choose.html.erb b/decidim-core/app/views/layouts/decidim/header/_mobile_language_choose.html.erb new file mode 100644 index 0000000000000..75b789cfeee07 --- /dev/null +++ b/decidim-core/app/views/layouts/decidim/header/_mobile_language_choose.html.erb @@ -0,0 +1,25 @@ +<% if available_locales.length > 1 %> +
      + + +
      +<% end %> diff --git a/decidim-core/app/views/layouts/decidim/shared/_layout_item.html.erb b/decidim-core/app/views/layouts/decidim/shared/_layout_item.html.erb index f6a66330e48f0..4e30185912e42 100644 --- a/decidim-core/app/views/layouts/decidim/shared/_layout_item.html.erb +++ b/decidim-core/app/views/layouts/decidim/shared/_layout_item.html.erb @@ -7,20 +7,6 @@ <%= render partial: "layouts/decidim/shared/linked_resource" %> <% end %> - <% if local_assigns.has_key?(:prev_path) %> - <%= link_to prev_path, class: "layout-item__arrow prev", title: t(".prev") do %> - <%= icon "arrow-left-s-line" %> - %<%= t(".prev") %> - <% end %> - <% end %> - - <% if local_assigns.has_key?(:next_path) %> - <%= link_to next_path, class: "layout-item__arrow next", title: t(".next") do %> - <%= icon "arrow-right-s-line" %> - <%= t(".next") %> - <% end %> - <% end %> - <%= yield %>
+ +
+

<%= t(".multiselect") %>

+ +
+

<%= t(".multiselect_description_html") %>

+ + +
+
diff --git a/decidim-design/config/locales/bg.yml b/decidim-design/config/locales/bg.yml index d0e375da96f10..a987ae5701ddd 100644 --- a/decidim-design/config/locales/bg.yml +++ b/decidim-design/config/locales/bg.yml @@ -1 +1,309 @@ +--- bg: + decidim: + design: + components: + accordions: + content_panel: Съдържание на панела + demo: Демо + demo_description: В цялото приложение "акордеоните" се използват главно за показване/скриване на съдържание в раздели или за сгъване/разгъване на видими текстове. + description_accordions_html: '"Акордеоните" са функция на javascript, достъпна благодарение на външна библиотека, наречена %{link_code} a11y-accordion-component.' + github_source_html: Изходен код в GitHub %{github_link} + panel: Панел + title: '"Акордеони"' + trigger: Задействане + usage: Употреба + usage_p: '"Акордеонът" изисква поне три елемента' + usage_p_1_html: 1. Обвивка div, с атрибута на данните data-component="accordion", над всички налични задействащи елементи и панели. + usage_p_2_html: 2. Задействащ елемент, с който потребителят може да действа (като бутон), сочещ към сгъваемия елемент чрез data-controls="panel", където panel е id на панела. + usage_p_3_html: 3. Елемент с възможност за скриване, чийто id съвпада със стойността на контролите на данните, към която препраща задействащия елемент. + activities: + activities: Активности + address: + title: Адрес + announcement: + iam_an_announcement: Аз съм известие + this_is_the_body: Това е основното съдържание + this_is_the_title: Това е заглавието + title: Обявление + author: + title: Автор + buttons: + description_html: 'Бутоните се създават с помощта на различни комбинации от CSS класове: клас button, размер и цвят.' + title: Бутони + cards: + title: Карти + dialogs: + dialog_demo_description_html: Диалоговите прозорци или модалните компоненти се имплементират чрез помощника decidim_modal. + dialogs_description_html: Диалозите са функция на javascript, достъпна благодарение на външна библиотека, наречена a11y-dialog-component . + tips_description: 'За да покажете сложен модал, съответстващ на стиловете, направете следното маркиране:' + tips_description_html: Обърнете внимание на data-attributes и ids. Например идентификаторът на [data-dialog-title] започва с dialog-title плюс modal id. + title: Диалогови прозорци + usage_description: Един диалогов прозорец изисква два елемента + usage_description_2_html: 2. Модален елемент, чийто id съвпада с целевата стойност на данните, към която препраща тригерът. + usage_description_html: 1. Елемент с действие от страна на потребителя с атрибут на данни data-dialog-open="example", където example е id на модала. + follow: + title: Последване + forms: + disabled: Деактивирано + emojis: Емоджита + emojis_description: Работи само за текстово поле + errors: Грешки + errors_description: Не важи за избран + header_alert: Тази страница идва от наследен изглед. Съдържанието е остаряло. + help_texts: Помощни текстове + html_regular_inputs: HTML редовни входни данни + min_max_length: Мин/Макс дължина + min_max_length_description: Работи само за input type='text' и текстова област + multiselect: Мултиселекция + multiselect_description_html: Мултиселекциите са функция на javascript, достъпна благодарение на външна библиотека, наречена Tom Select. + regular_inputs_description: 'Показва само общи типове, пълен наличен списък: дата, datetime-local, имейл, месец, номер, парола, търсене, телефон, текст, час, url, седмица' + textarea_required: задължителна текстова област + title: Форми + report: + title: Доклад + share: + title: Сподели + tab_panels: + title: Табове панели + tooltips: + demo: Демо + demo_description: За да работи този компонент, участникът трябва да задържи курсора на мишката върху елемента. + description: Подсказката е компонент, върху който потребителите могат да задържат курсора на мишката, за да получат допълнителна информация за него. + github_source_html: Изходен код в GitHub %{github_link} + title: Подсказка + usage: Употреба + usage_p: 'Подсказка изисква използването на помощника `with_tooltip` с три аргумента:' + usage_p_1_html: 1. Низ със стойността на подсказката. В примера на тази страница е "Hello world". + usage_p_2_html: 2. Незадължителен клас със символ за мястото, където ще се показва подсказката. Възможните стойности са :top, :bottom, :right или :left. + usage_p_3_html: 3. Блок с низа, който потребителят трябва да задържи, за да се покаже. + foundations: + accessibility: + accessibility_labels: Етикети за достъпност + accessibility_labels_paragraph: Когато дефинирате елементи, винаги се уверявайте, че имат смисъл за потребителите на екранни четци. + accessibility_title: Достъпност + adjacent_links: Съседни линкове + adjacent_links_header: Съседни връзки за един и същ ресурс + adjacent_links_paragraph: Ако един и същ ресурс има множество съседни линкове, сочещи към него, за такива потребители е трудно да прегледат страницата, тъй като може да се наложи да преминат през множество връзки, за да стигнат до следващия ресурс. + color_contrast: Цветови контраст + color_contrast_paragraph: Когато създавате потребителски интерфейси или променяте цветовете, винаги се уверявайте, че не нарушавате достъпността с вашите промени. Можете да използвате инструмента за проверка на цветовия контраст, за да се уверите, че вашите цветове имат достатъчен контраст спрямо цвета на фона, на който се показват. + decidim_follows_html: Civil Power следва Указанията за достъпност на уеб съдържанието (WCAG) 2.1 + dynamic_changes_header: Динамичната функционалност променя контекста на страницата неинтуитивно + dynamic_changes_paragraph: Промените във формуляра не трябва автоматично да променят контекста на страницата. + elements_hidden: Елементите са скрити + elements_hidden_header: Елементи, скрити от API за достъпност + elements_hidden_paragraph: За да скриете елемент от помощни технологии, използвайте атрибута aria-hidden="true" върху него. + heading_on: Заглавие на важни раздели + here_link: тук + illogical_heading_order: Нелогичен ред на заглавията + illogical_heading_paragraph: Всяка страница трябва да има логичен ред на заглавията, когато се използват елементите на заглавието

,

,

,

,

и
. + important_sections_heading: Заглавие на важни раздели + important_sections_paragraph: Изключително важно е всеки важен раздел на страницата да има заглавие, за да можете по-лесно да разберете какви важни раздели има на страницата, просто като разглеждате заглавията. + links_and_buttons: Линкове и бутони + links_and_buttons_paragraph: Елементите (anchor) за "закотвяне" (т.е. линкове) са предназначени да свързват към различни страници или да закотвят позиции в страницата. Ако елементът трябва да, например, отворите някакъв скрит елемент на тази страница, вместо това трябва да използвате елемента @@ -14,7 +14,7 @@ **confirm_data ) %> <% else %> - diff --git a/decidim-forms/app/cells/decidim/forms/step_navigation_cell.rb b/decidim-forms/app/cells/decidim/forms/step_navigation_cell.rb index ea56612047b5d..324bb684ee05b 100644 --- a/decidim-forms/app/cells/decidim/forms/step_navigation_cell.rb +++ b/decidim-forms/app/cells/decidim/forms/step_navigation_cell.rb @@ -43,7 +43,8 @@ def current_step_dom_id def confirm_data { data: { confirm: t("decidim.forms.step_navigation.show.are_you_sure"), - disable: true + disable: true, + data: "survey-buttons" } } end end diff --git a/decidim-forms/app/commands/decidim/forms/answer_questionnaire.rb b/decidim-forms/app/commands/decidim/forms/answer_questionnaire.rb index 235fbdedad569..51505e144bfff 100644 --- a/decidim-forms/app/commands/decidim/forms/answer_questionnaire.rb +++ b/decidim-forms/app/commands/decidim/forms/answer_questionnaire.rb @@ -4,15 +4,15 @@ module Decidim module Forms # This command is executed when the user answers a Questionnaire. class AnswerQuestionnaire < Decidim::Command + delegate :current_user, to: :form include ::Decidim::MultipleAttachmentsMethods # Initializes a AnswerQuestionnaire Command. # # form - The form from which to get the data. # questionnaire - The current instance of the questionnaire to be answered. - def initialize(form, current_user, questionnaire) + def initialize(form, questionnaire) @form = form - @current_user = current_user @questionnaire = questionnaire end @@ -34,7 +34,7 @@ def call end end - attr_reader :form, :questionnaire, :current_user + attr_reader :form, :questionnaire private @@ -82,7 +82,7 @@ def answer_questionnaire Answer.transaction(requires_new: true) do form.responses_by_step.flatten.select(&:display_conditions_fulfilled?).each do |form_answer| answer = Answer.new( - user: @current_user, + user: current_user, questionnaire: @questionnaire, question: form_answer.question, body: form_answer.body, diff --git a/decidim-forms/app/controllers/decidim/forms/concerns/has_questionnaire.rb b/decidim-forms/app/controllers/decidim/forms/concerns/has_questionnaire.rb index 87721b46135ff..9b6a5da9edd6d 100644 --- a/decidim-forms/app/controllers/decidim/forms/concerns/has_questionnaire.rb +++ b/decidim-forms/app/controllers/decidim/forms/concerns/has_questionnaire.rb @@ -30,7 +30,7 @@ def answer @form = form(Decidim::Forms::QuestionnaireForm).from_params(params, session_token:, ip_hash:) - Decidim::Forms::AnswerQuestionnaire.call(@form, current_user, questionnaire) do + Decidim::Forms::AnswerQuestionnaire.call(@form, questionnaire) do on(:ok) do # i18n-tasks-use t("decidim.forms.questionnaires.answer.success") flash[:notice] = I18n.t("answer.success", scope: i18n_flashes_scope) diff --git a/decidim-forms/app/forms/decidim/forms/answer_form.rb b/decidim-forms/app/forms/decidim/forms/answer_form.rb index 6bc50204a3af9..bdefe0f8a43d2 100644 --- a/decidim-forms/app/forms/decidim/forms/answer_form.rb +++ b/decidim-forms/app/forms/decidim/forms/answer_form.rb @@ -108,9 +108,9 @@ def grouped_choices def max_choices if matrix? - errors.add(:choices, :too_many) if grouped_choices.any? { |choices| choices.count > question.max_choices } + errors.add(:choices, :too_many, count: question.max_choices) if grouped_choices.any? { |choices| choices.count > question.max_choices } elsif selected_choices.size > question.max_choices - errors.add(:choices, :too_many) + errors.add(:choices, :too_many, count: question.max_choices) end end diff --git a/decidim-forms/config/locales/ar.yml b/decidim-forms/config/locales/ar.yml index b88be4b5efc54..dfd42e1a43e03 100644 --- a/decidim-forms/config/locales/ar.yml +++ b/decidim-forms/config/locales/ar.yml @@ -15,7 +15,6 @@ ar: attributes: choices: missing: ليست كاملة - too_many: كثير جدا decidim: forms: admin: diff --git a/decidim-forms/config/locales/bg.yml b/decidim-forms/config/locales/bg.yml index ad31e28a4ef66..e3dfa53525562 100644 --- a/decidim-forms/config/locales/bg.yml +++ b/decidim-forms/config/locales/bg.yml @@ -3,12 +3,195 @@ bg: attributes: answer: body: Отговор + choices: Възможности + selected_choices: Избрани възможности question: max_choices: Максимален брой възможности question_type: Тип + questionnaire_question: + mandatory: Задължително + max_characters: Ограничение на знаците (оставете 0, за неограничено) + errors: + models: + answer: + attributes: + add_documents: + needs_to_be_reattached: Необходимо е да се прикачи отново + body: + too_long: твърде дълъг + choices: + missing: не са завършени + too_many: Можете да изберете максимум %{count}. + questionnaire: + request_invalid: Възникна грешка при обработката на заявката. Моля, опитайте отново. decidim: forms: + admin: + models: + components: + description: Описание + tos: Условия за ползване + questionnaires: + actions: + back: Назад към въпросите + show: Показване на отговорите + answer_option: + answer_option: Възможност за отговор + free_text: Свободен текст + remove: Премахни + statement: Изявление + answers: + actions: + back: Назад към отговорите + export: Експортиране + next: Следваща › + previous: "‹ Предна" + show: Показване на отговорите + empty: Все още няма отговори + export: + answer: + title: 'Отговор № %{number}' + export_response: + title: survey_user_answers_%{token} + index: + title: "Общ брой отговори: %{total}" + show: + title: 'Отговор № %{number}' + display_condition: + answer_option: Възможност за отговор + condition_question: Въпрос + condition_type: Условие + condition_types: + answered: Отговорено + equal: Равно + match: Включва текст + not_answered: Неотговорено + not_equal: Не е равно + condition_value: Включен текст + display_condition: Условие за показване + mandatory: Това условие винаги трябва да бъде удовлетворено, независимо от състоянието на другите условия + remove: Премахни + save_warning: Не забравяйте да запазите формуляра, преди да конфигурирате условията за показване + select_answer_option: Изберете вариант за отговор + select_condition_question: Изберете въпрос + select_condition_type: Изберете тип условие + edit: + save: Запази + title: Редактиране на въпросника + form: + add_question: Добавяне на въпрос + add_separator: Добавяне на разделител + add_title_and_description: Добавете заглавие и описание + already_answered_warning: Няколко потребители вече са попълнили въпросника, поради което не можете да промените въпросите в него. + collapse: Свиване на всички въпроси + expand: Разгъване на всички въпроси + preview: Преглед + title: Редактирайте формуляра за %{questionnaire_for} + unpublished_warning: Формулярът не е публикуван. Можете да промените въпросите в него, но така ще се изтрият текущите въпроси. + matrix_row: + matrix_row: Ред + remove: Премахни + statement: Изявление + question: + add_answer_option: Добавяне на възможност за отговор + add_display_condition: Добавяне на условие за показване + add_display_condition_info: Запазете формуляра, за да конфигурирате условията за показване + add_matrix_row: Добавяне на ред + any: Някой + collapse: Свий + description: Описание + down: Надолу + expand: Разтваряне + question: Въпрос + remove: Премахни + statement: Изявление + up: Горе + separator: + down: Долу + remove: Премахни + separator: Разделител + up: Горе + title_and_description: + collapse: Свий + description: Описание + down: Долу + expand: Разтваряне + remove: Премахни + title: Заглавие + title_and_description: Заглавие и описание + up: Горе + update: + invalid: Възникна проблем при запазването на формуляра. + success: Формулярите бяха запазени успешно. + admin_log: + questionnaire: + update: "%{user_name} актуализира въпросника %{resource_name}" + errors: + answer: + body: Основният текст не може да бъде празен + images: + dimensions: "%{width} x %{height} пиксела" + processors: + resize_and_pad: Това изображение ще бъде преоразмерено и уплътнено до %{dimensions}. + resize_to_fit: Това изображение ще бъде преоразмерено и уплътнено до %{dimensions}. + question_types: + files: Файлове + long_answer: Дълъг отговор + matrix_multiple: Матрица (множество опции) + matrix_single: Матрица (единична опция) + multiple_option: Множество опции + short_answer: Кратък отговор + single_option: Единична опция + sorting: Сортиране + title_and_description: Заглавие и описание + questionnaire_answer_presenter: + download_attachment: Изтегляне на прикачени файлове + questionnaires: + answer: + invalid: Възникна проблем при попълването на отговорите във формуляра. + max_choices_alert: Избрани са прекалено много варианти + success: Отговорите са попълнени успешно във формуляра. + question: + max_choices: 'Максимален брой избрани варианти: %{n}' + show: + answer_questionnaire: + already_have_an_account?: Вече имате профил? + are_you_new?: Нов потребител? + sign_in_description: Влезте, за да участвате в анкетата + sign_up_description: Създайте акаунт на участник, за да участвате в анкетата + title: Попълване на отговори във формуляра + current_step: Стъпка %{step} + empty: Все още няма конфигурирани въпроси за този формуляр. + of_total_steps: от %{total_steps} + questionnaire_answered: + body: Вече сте попълнили отговорите в този формуляр. + title: Вече сте отговорили + questionnaire_closed: + body: Формулярът е затворен и не можете да попълните отговорите си. + title: Формулярът е затворен + questionnaire_for_private_users: + body: Формулярът е налице само за частни потребители + title: Формулярът е затворен + questionnaire_js_disabled: + body: Някои от функциите на формуляра ще бъдат деактивирани. За да подобрите практическата си работа, моля, активирайте JavaScript в браузъра си. + title: JavaScript е деактивиран + questionnaire_not_published: + body: Този формуляр все още не е публикуван. + tos_agreement: С участието си приемате Условията на ползване step_navigation: show: are_you_sure: Това действие не може да се отмени и Вие не можете да редактирате отговорите си. Сигурни ли сте? + back: Назад + continue: Продължи submit: Изпрати + user_answers_serializer: + body: Отговор + completion: Завършване + created_at: Отговорено на + id: ID на отговора + ip_hash: IP хеширане + question: Въпрос + registered: Регистриран + session_token: Идентификатор на потребителя + unregistered: Нерегистриран + user_status: Статус на потребителя diff --git a/decidim-forms/config/locales/ca.yml b/decidim-forms/config/locales/ca.yml index 47ad8371df37b..61146568db07d 100644 --- a/decidim-forms/config/locales/ca.yml +++ b/decidim-forms/config/locales/ca.yml @@ -21,7 +21,7 @@ ca: too_long: és massa llarg choices: missing: no estan complets - too_many: en són masses + too_many: Pots triar un màxim de %{count} opcions. questionnaire: request_invalid: Hi ha hagut un problema gestionant la petició. Si us plau, torna-ho a provar. decidim: diff --git a/decidim-forms/config/locales/cs.yml b/decidim-forms/config/locales/cs.yml index 566895db41dba..c7f4976c2c11a 100644 --- a/decidim-forms/config/locales/cs.yml +++ b/decidim-forms/config/locales/cs.yml @@ -21,7 +21,6 @@ cs: too_long: je příliš dlouhý choices: missing: nejsou úplné - too_many: jsou příliš mnoho questionnaire: request_invalid: Při zpracování požadavku došlo k chybě. Zkuste to prosím znovu. decidim: diff --git a/decidim-forms/config/locales/de.yml b/decidim-forms/config/locales/de.yml index 7f14a83c427d5..9176c26c0a016 100644 --- a/decidim-forms/config/locales/de.yml +++ b/decidim-forms/config/locales/de.yml @@ -21,7 +21,7 @@ de: too_long: ist zu lang choices: missing: sind nicht vollständig - too_many: sind zu viele + too_many: Sie können ein Maximum von %{count} auswählen. questionnaire: request_invalid: Beim Bearbeiten der Anfrage ist ein Fehler aufgetreten. Bitte versuchen Sie es nochmal. decidim: diff --git a/decidim-forms/config/locales/el.yml b/decidim-forms/config/locales/el.yml index 9e0b4c35ce6fb..725886d848e91 100644 --- a/decidim-forms/config/locales/el.yml +++ b/decidim-forms/config/locales/el.yml @@ -21,7 +21,6 @@ el: too_long: είναι πολύ μεγάλο choices: missing: δεν έχουν ολοκληρωθεί - too_many: είναι πάρα πολλά questionnaire: request_invalid: Παρουσιάστηκε σφάλμα κατά τον χειρισμό του αιτήματος. Παρακαλώ δοκιμάστε ξανά. decidim: diff --git a/decidim-forms/config/locales/en.yml b/decidim-forms/config/locales/en.yml index 8690cb53fc5e8..2f59f12d0fb1a 100644 --- a/decidim-forms/config/locales/en.yml +++ b/decidim-forms/config/locales/en.yml @@ -22,7 +22,7 @@ en: too_long: is too long choices: missing: are not complete - too_many: are too many + too_many: You can choose a maximum of %{count}. questionnaire: request_invalid: There was an error handling the request. Please try again. decidim: diff --git a/decidim-forms/config/locales/es-MX.yml b/decidim-forms/config/locales/es-MX.yml index bc4246e2ca134..3b6476d4d2eec 100644 --- a/decidim-forms/config/locales/es-MX.yml +++ b/decidim-forms/config/locales/es-MX.yml @@ -21,7 +21,7 @@ es-MX: too_long: es demasiado largo choices: missing: no están completos - too_many: son demasiados + too_many: Puedes elegir un máximo de %{count} opciones. questionnaire: request_invalid: Ha ocurrido un error al enviar tu solicitud. Por favor, Inténtalo de nuevo. decidim: diff --git a/decidim-forms/config/locales/es-PY.yml b/decidim-forms/config/locales/es-PY.yml index 37271588d93f6..07689a708265a 100644 --- a/decidim-forms/config/locales/es-PY.yml +++ b/decidim-forms/config/locales/es-PY.yml @@ -21,7 +21,7 @@ es-PY: too_long: es demasiado largo choices: missing: no están completos - too_many: son demasiados + too_many: Puedes elegir un máximo de %{count} opciones. questionnaire: request_invalid: Ha ocurrido un error al enviar tu solicitud. Por favor, Inténtalo de nuevo. decidim: diff --git a/decidim-forms/config/locales/es.yml b/decidim-forms/config/locales/es.yml index ac62e2c70e7e8..22cf93d57e906 100644 --- a/decidim-forms/config/locales/es.yml +++ b/decidim-forms/config/locales/es.yml @@ -21,7 +21,7 @@ es: too_long: es demasiado largo choices: missing: no están completos - too_many: son demasiados + too_many: Puedes elegir un máximo de %{count} opciones. questionnaire: request_invalid: Ha ocurrido un error al enviar tu solicitud. Por favor, Inténtalo de nuevo. decidim: diff --git a/decidim-forms/config/locales/eu.yml b/decidim-forms/config/locales/eu.yml index 8eb2a05499073..865ad5eb444b9 100644 --- a/decidim-forms/config/locales/eu.yml +++ b/decidim-forms/config/locales/eu.yml @@ -21,7 +21,7 @@ eu: too_long: luzeegia da choices: missing: ez dira osatu - too_many: gehiegi dira + too_many: Gehienez, %{count} aukeratu ahal duzu. questionnaire: request_invalid: Errore bat egon da eskaera bidaltzean. Mesedez, saiatu berriro. decidim: diff --git a/decidim-forms/config/locales/fi-plain.yml b/decidim-forms/config/locales/fi-plain.yml index a7cac8cef3bdd..91c166fc3945a 100644 --- a/decidim-forms/config/locales/fi-plain.yml +++ b/decidim-forms/config/locales/fi-plain.yml @@ -21,7 +21,6 @@ fi-pl: too_long: liian pitkä choices: missing: ovat puutteellisia - too_many: liian monta questionnaire: request_invalid: Pyynnön käsittely ei onnistunut. Yritä uudestaan myöhemmin. decidim: diff --git a/decidim-forms/config/locales/fi.yml b/decidim-forms/config/locales/fi.yml index 8ee9829155338..19cffce57ba4b 100644 --- a/decidim-forms/config/locales/fi.yml +++ b/decidim-forms/config/locales/fi.yml @@ -21,7 +21,6 @@ fi: too_long: liian pitkä choices: missing: ovat puutteellisia - too_many: liian monta questionnaire: request_invalid: Pyynnön käsittely ei onnistunut. Yritä uudestaan myöhemmin. decidim: diff --git a/decidim-forms/config/locales/fr-CA.yml b/decidim-forms/config/locales/fr-CA.yml index 334552d2467f0..27c70b698f7a8 100644 --- a/decidim-forms/config/locales/fr-CA.yml +++ b/decidim-forms/config/locales/fr-CA.yml @@ -21,7 +21,7 @@ fr-CA: too_long: est trop long choices: missing: ne sont pas complets - too_many: sont trop nombreux + too_many: Vous pouvez choisir un maximum de %{count}. questionnaire: request_invalid: Une erreur s'est produite. Veuillez réessayer. decidim: diff --git a/decidim-forms/config/locales/fr.yml b/decidim-forms/config/locales/fr.yml index 232dc709a8d63..b47b67aab2b32 100644 --- a/decidim-forms/config/locales/fr.yml +++ b/decidim-forms/config/locales/fr.yml @@ -21,7 +21,7 @@ fr: too_long: est trop long choices: missing: ne sont pas complets - too_many: sont trop nombreux + too_many: Vous pouvez choisir un maximum de %{count}. questionnaire: request_invalid: Une erreur s'est produite. Veuillez réessayer. decidim: diff --git a/decidim-forms/config/locales/gl.yml b/decidim-forms/config/locales/gl.yml index f6700a0522ea6..935f036a1a1b3 100644 --- a/decidim-forms/config/locales/gl.yml +++ b/decidim-forms/config/locales/gl.yml @@ -14,7 +14,6 @@ gl: attributes: choices: missing: non están completos - too_many: son demasiados decidim: forms: admin: diff --git a/decidim-forms/config/locales/hu.yml b/decidim-forms/config/locales/hu.yml index 17b6d2b0cf68e..0b0fb81fea3d5 100644 --- a/decidim-forms/config/locales/hu.yml +++ b/decidim-forms/config/locales/hu.yml @@ -14,7 +14,6 @@ hu: attributes: choices: missing: nem teljesek - too_many: túl sok decidim: forms: admin: diff --git a/decidim-forms/config/locales/id-ID.yml b/decidim-forms/config/locales/id-ID.yml index e56e5c90ba685..a27a8ebac7ad7 100644 --- a/decidim-forms/config/locales/id-ID.yml +++ b/decidim-forms/config/locales/id-ID.yml @@ -14,7 +14,6 @@ id: attributes: choices: missing: tidak lengkap - too_many: terlalu banyak decidim: forms: admin: diff --git a/decidim-forms/config/locales/it.yml b/decidim-forms/config/locales/it.yml index 29afe5846324c..515752fea3cc0 100644 --- a/decidim-forms/config/locales/it.yml +++ b/decidim-forms/config/locales/it.yml @@ -21,7 +21,6 @@ it: too_long: è troppo lungo choices: missing: non sono completi - too_many: sono troppi decidim: forms: admin: diff --git a/decidim-forms/config/locales/ja.yml b/decidim-forms/config/locales/ja.yml index 62f6727ba71bc..4037616b21373 100644 --- a/decidim-forms/config/locales/ja.yml +++ b/decidim-forms/config/locales/ja.yml @@ -21,7 +21,7 @@ ja: too_long: 長すぎます choices: missing: は完全ではありません - too_many: 多すぎます + too_many: 最大 %{count} 個まで選択できます。 questionnaire: request_invalid: リクエストの処理中にエラーが発生しました。もう一度やり直してください。 decidim: diff --git a/decidim-forms/config/locales/lb.yml b/decidim-forms/config/locales/lb.yml index 8fc3ccb1627ee..4b9ba2aee58fe 100644 --- a/decidim-forms/config/locales/lb.yml +++ b/decidim-forms/config/locales/lb.yml @@ -21,7 +21,6 @@ lb: too_long: ist zu lang choices: missing: sind nicht vollständig - too_many: sind zu viele decidim: forms: admin: diff --git a/decidim-forms/config/locales/lt.yml b/decidim-forms/config/locales/lt.yml index 3d428cfa4c7a4..dffaada45763a 100644 --- a/decidim-forms/config/locales/lt.yml +++ b/decidim-forms/config/locales/lt.yml @@ -21,7 +21,6 @@ lt: too_long: per ilgas choices: missing: nepilnas - trūksta elementų - too_many: per daug questionnaire: request_invalid: Tvarkant prašymą įvyko klaida. Bandykite dar kartą. decidim: diff --git a/decidim-forms/config/locales/lv.yml b/decidim-forms/config/locales/lv.yml index 6349ee0e353cc..6110b54876e30 100644 --- a/decidim-forms/config/locales/lv.yml +++ b/decidim-forms/config/locales/lv.yml @@ -14,7 +14,6 @@ lv: attributes: choices: missing: nav pabeigti - too_many: ir par daudz decidim: forms: admin: diff --git a/decidim-forms/config/locales/nl.yml b/decidim-forms/config/locales/nl.yml index 79d284d28bef6..0a5713ff5cd14 100644 --- a/decidim-forms/config/locales/nl.yml +++ b/decidim-forms/config/locales/nl.yml @@ -16,7 +16,6 @@ nl: attributes: choices: missing: zijn niet compleet - too_many: zijn te veel decidim: forms: admin: diff --git a/decidim-forms/config/locales/no.yml b/decidim-forms/config/locales/no.yml index 3c84eafbe733b..77edd63b5e971 100644 --- a/decidim-forms/config/locales/no.yml +++ b/decidim-forms/config/locales/no.yml @@ -21,7 +21,6 @@ too_long: er for lang choices: missing: er ikke fullstendig - too_many: er for mange decidim: forms: admin: diff --git a/decidim-forms/config/locales/pl.yml b/decidim-forms/config/locales/pl.yml index 82cbe471c2dda..605e65ba77750 100644 --- a/decidim-forms/config/locales/pl.yml +++ b/decidim-forms/config/locales/pl.yml @@ -21,7 +21,6 @@ pl: too_long: jest zbyt długie choices: missing: nie są kompletne - too_many: jest zbyt wiele questionnaire: request_invalid: Wystąpił błąd podczas obsługi żądania. Spróbuj ponownie. decidim: diff --git a/decidim-forms/config/locales/pt-BR.yml b/decidim-forms/config/locales/pt-BR.yml index f173bf9115c0f..1ba8e81affd2d 100644 --- a/decidim-forms/config/locales/pt-BR.yml +++ b/decidim-forms/config/locales/pt-BR.yml @@ -21,7 +21,6 @@ pt-BR: too_long: é longo demais choices: missing: não estão completos - too_many: são muitos decidim: forms: admin: diff --git a/decidim-forms/config/locales/pt.yml b/decidim-forms/config/locales/pt.yml index ee9c7f495ae52..1702699f00cf8 100644 --- a/decidim-forms/config/locales/pt.yml +++ b/decidim-forms/config/locales/pt.yml @@ -21,7 +21,6 @@ pt: too_long: é demasiado longo choices: missing: não estão completos - too_many: são demasiados decidim: forms: admin: diff --git a/decidim-forms/config/locales/ro-RO.yml b/decidim-forms/config/locales/ro-RO.yml index a836c809b5ccf..a207c6d20ac4e 100644 --- a/decidim-forms/config/locales/ro-RO.yml +++ b/decidim-forms/config/locales/ro-RO.yml @@ -21,7 +21,6 @@ ro: too_long: este prea lung choices: missing: nu sunt completate - too_many: sunt prea multe questionnaire: request_invalid: A apărut o eroare la procesarea cererii. Te rugăm să încerci din nou. decidim: diff --git a/decidim-forms/config/locales/sk.yml b/decidim-forms/config/locales/sk.yml index 32cdabdc78aeb..94129a4741c36 100644 --- a/decidim-forms/config/locales/sk.yml +++ b/decidim-forms/config/locales/sk.yml @@ -14,7 +14,6 @@ sk: attributes: choices: missing: nie je kompletné - too_many: je príliš veľa decidim: forms: admin: diff --git a/decidim-forms/config/locales/sv.yml b/decidim-forms/config/locales/sv.yml index 99823cbcae2b5..f646e849d5239 100644 --- a/decidim-forms/config/locales/sv.yml +++ b/decidim-forms/config/locales/sv.yml @@ -21,7 +21,6 @@ sv: too_long: är för långt choices: missing: är inte fullständiga - too_many: är för många decidim: forms: admin: diff --git a/decidim-forms/config/locales/tr-TR.yml b/decidim-forms/config/locales/tr-TR.yml index fa82e86072264..2cba291665471 100644 --- a/decidim-forms/config/locales/tr-TR.yml +++ b/decidim-forms/config/locales/tr-TR.yml @@ -16,7 +16,6 @@ tr: attributes: choices: missing: tamamlanmadı - too_many: çok fazla decidim: forms: admin: @@ -125,6 +124,7 @@ tr: answer_questionnaire: title: Formu cevapla current_step: '%{step} adım' + empty: Bu form için henüz hazırlanmış bir soru yok. of_total_steps: '%{total_steps}' questionnaire_answered: body: Bu formu zaten cevapladınız. diff --git a/decidim-forms/config/locales/zh-CN.yml b/decidim-forms/config/locales/zh-CN.yml index d7a399a78ff61..68a3144abaeac 100644 --- a/decidim-forms/config/locales/zh-CN.yml +++ b/decidim-forms/config/locales/zh-CN.yml @@ -16,7 +16,6 @@ zh-CN: attributes: choices: missing: 不完成 - too_many: 太多了 decidim: forms: admin: diff --git a/decidim-forms/config/locales/zh-TW.yml b/decidim-forms/config/locales/zh-TW.yml index 639bc672ffe09..6640fcd79fdb0 100644 --- a/decidim-forms/config/locales/zh-TW.yml +++ b/decidim-forms/config/locales/zh-TW.yml @@ -21,7 +21,6 @@ zh-TW: too_long: 太長 choices: missing: 尚未完成 - too_many: 太多了 questionnaire: request_invalid: 處理請求時發生錯誤。請再試一次。 decidim: diff --git a/decidim-forms/spec/commands/decidim/forms/answer_questionnaire_spec.rb b/decidim-forms/spec/commands/decidim/forms/answer_questionnaire_spec.rb index a07a5c51a43cc..05a4766f1c4a5 100644 --- a/decidim-forms/spec/commands/decidim/forms/answer_questionnaire_spec.rb +++ b/decidim-forms/spec/commands/decidim/forms/answer_questionnaire_spec.rb @@ -5,12 +5,13 @@ module Decidim module Forms describe AnswerQuestionnaire do - let(:command) { described_class.new(form, current_user, questionnaire) } + let(:command) { described_class.new(form, questionnaire) } let(:form) do QuestionnaireForm.from_params( form_params ).with_context( current_organization:, + current_user:, session_token:, ip_hash: ) @@ -228,7 +229,7 @@ def tokenize(id) "tos_agreement" => "1" } end - let(:command) { described_class.new(form, current_user, questionnaire_conditioned) } + let(:command) { described_class.new(form, questionnaire_conditioned) } it "broadcasts ok" do expect { command.call }.to broadcast(:ok) diff --git a/decidim-generators/Gemfile.lock b/decidim-generators/Gemfile.lock index b996480a605dc..6a426ed26422e 100644 --- a/decidim-generators/Gemfile.lock +++ b/decidim-generators/Gemfile.lock @@ -475,7 +475,7 @@ GEM mime-types-data (3.2023.1205) mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.5) + mini_portile2 (2.8.7) minitest (5.22.2) msgpack (1.4.5) multi_xml (0.6.0) @@ -492,7 +492,7 @@ GEM net-smtp (0.3.4) net-protocol nio4r (2.7.0) - nokogiri (1.16.2) + nokogiri (1.16.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) oauth (1.1.0) @@ -559,7 +559,7 @@ GEM public_suffix (5.0.4) puma (6.4.2) nio4r (~> 2.0) - racc (1.7.3) + racc (1.8.0) rack (2.2.8.1) rack-attack (6.7.0) rack (>= 1.0, < 4) diff --git a/decidim-generators/lib/decidim/generators/component_templates/github/ci.yml.erb b/decidim-generators/lib/decidim/generators/component_templates/github/ci.yml.erb index b2354c9ed4481..447178ec7e873 100644 --- a/decidim-generators/lib/decidim/generators/component_templates/github/ci.yml.erb +++ b/decidim-generators/lib/decidim/generators/component_templates/github/ci.yml.erb @@ -39,19 +39,19 @@ jobs: DATABASE_PASSWORD: postgres DATABASE_HOST: localhost steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: ruby/setup-ruby@v1 with: bundler-cache: true - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Get npm cache directory path id: npm-cache-dir-path run: echo "dir=$(npm get cache)-<%= component_name %>" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: npm-cache with: path: ${{ steps.npm-cache-dir-path.outputs.dir }} @@ -68,8 +68,8 @@ jobs: working-directory: ./spec/decidim_dummy_app/ - run: bundle exec rspec name: RSpec - - uses: codecov/codecov-action@v3 - - uses: actions/upload-artifact@v3 + - uses: codecov/codecov-action@v4 + - uses: actions/upload-artifact@v4 if: always() with: name: screenshots diff --git a/decidim-initiatives/config/locales/bg.yml b/decidim-initiatives/config/locales/bg.yml index 054a03cdb2030..463a7af0455a3 100644 --- a/decidim-initiatives/config/locales/bg.yml +++ b/decidim-initiatives/config/locales/bg.yml @@ -2,22 +2,612 @@ bg: activemodel: attributes: initiative: + answer: Отговор + answer_url: URL на отговора + area_id: Област + decidim_scope_id: Обхват decidim_user_group_id: Автор description: Описание + hashtag: Хаштаг offline_votes: Лични подписи + offline_votes_for_scope: Лични подписи за %{scope_name} + scope_id: Обхват + signature_end_date: Край на периода на събиране на подписи + signature_start_date: Начало на периода на събиране на подписи + signature_type: Тип събиране на подписи + signature_type_values: + any: Смесено + offline: Лично + online: Онлайн + state: Статус + title: Заглавие + type_id: Тип + initiatives_committee_member: + user: Член на комисията + initiatives_settings: + initiatives_order: Ред + initiatives_type: + area_enabled: Разрешаване на авторите да избират областта за инициативата си + attachments_enabled: Разрешете прикачените файлове + banner_image: Изображение на банера + child_scope_threshold_enabled: Активиране на подписи за подобхват + collect_user_extra_fields: Събиране на личните данни на участниците при подписване + comments_enabled: Включване на коментиране + custom_signature_end_date_enabled: Разрешаване на авторите да избират края на периода на събиране на подписи + description: Описание + document_number_authorization_handler: Разрешение за потвърждаване на номера на документа при подписване + extra_fields_legal_information: Правна информация относно събирането на лични данни + minimum_committee_members: Минимален брой членове на комисията + online_signature_enabled: Разрешено подписване онлайн + only_global_scope_enabled: Разрешете само създаването на инициативи за глобален обхват + promoting_committee_enabled: Разрешаване на комисия за популяризиране + signature_type: Тип подпис + title: Заглавие + undo_online_signatures_enabled: Разрешаване на участниците да премахват подписите си, положени онлайн + validate_sms_code_on_votes: Добавяне на стъпка за потвърждение чрез код от SMS към процеса на подписване + initiatives_type_scope: + decidim_scopes_id: Обхвати + supports_required: Необходима е подкрепа + initiatives_vote: + date_of_birth: Дата на раждане + document_number: Номер на документ + name_and_surname: Име и фамилия + postal_code: Пощенски код + organization_data: + address: Адрес + id_document: Документ за самоличност + name: Пълно име + errors: + models: + initiative: + attributes: + attachment: + file: Файлът е невалиден + needs_to_be_reattached: Необходимо е да се прикачи отново + title: Заглавието не трябва да е празно activerecord: models: decidim/initiative: one: Инициатива other: Инициативи + decidim/initiative_comittee: + one: Комитет + other: Комитети + decidim/initiative_vote: + one: Подпис + other: Подписи decidim: + admin: + actions: + new_initiative_type: Нов тип инициатива + new_initiative_type_scope: Обхват на нов тип инициатива + filters: + initiatives: + decidim_area_id_eq: + label: Област + state_eq: + label: Състояние + values: + accepted: Достатъчно подписи + created: Създаден + discarded: Отхвърлено + published: Публикувано + rejected: Няма достатъчно подписи + validating: Техническа проверка + type_id_eq: + label: Тип + search_placeholder: + title_or_description_or_id_string_or_author_name_or_author_nickname_cont: Търсете в %{collection} по заглавие, описание, идент. № или име на автора. + initiatives_settings: + update: + error: Възникна грешка. + success: Настройките на инициативите са актуализирани успешно. + menu: + attachments: Прикачени файлове + committee_members: Членове на комитета + information: Информация + initiative_type_scopes: Обхвати на типа инициатива + initiatives: Инициативи + initiatives_menu: + see_initiative: Вижте инициативата + initiatives_settings: Настройки + initiatives_submenu: + info: Относно тази инициатива + initiatives_types: Типове инициативи + moderations: Модерации + models: + initiatives: + fields: + created_at: Създадено на + id: ID + published_at: Публикувано на + state: Статус + supports_count: Подписи + title: Инициативи + initiatives_type_scope: + fields: + scope: Обхват + supports_required: Необходими подписи + name: Обхват на типа инициатива + initiatives_types: + fields: + created_at: Създадено на + title: Типове инициативи + name: Тип инициатива + initiatives_votes: + fields: + date_of_birth: Дата на раждане + document_number: Номер на документ + hash: Хаш + initiative_end_date: Крайна дата + initiative_id: ID на инициативата + initiative_signatures_count: Брой подписи + initiative_start_date: Начална дата + initiative_title: Заглавие на инициативата + name_and_surname: Име и фамилия + postal_code: Пощенски код + scope: Обхват + time_and_date: Време и дата + timestamp: Времево клеймо + titles: + initiatives: Инициативи + initiatives_types: Типове инициативи + events: + initiatives: + admin: + initiative_sent_to_technical_validation: + email_intro: Инициативата „%{resource_title}“ е изпратена за техническа проверка. Вижте повече в администраторския панел + email_outro: Получавате това известие, защото сте администратор на платформата. + email_subject: Инициативата „%{resource_title}“ беше изпратена за техническа проверка. + notification_title: Инициативата „%{resource_title}“ е изпратена за техническа проверка. Вижте повече в администраторския панел + initiative_extended: + email_intro: Крайната дата за подписите на инициативата %{resource_title} беше удължена! + email_outro: Получавате това известие, защото следвате %{resource_title}. Може да прекратите известията чрез предната връзка. + email_subject: Крайната дата за подписите на инициативата е удължена! + notification_title: Крайната дата за подписите на инициативата %{resource_title} беше удължена. + initiative_sent_to_technical_validation: + email_intro: Инициативата „%{resource_title}“ е изпратена за техническа проверка. Вижте повече в администраторския панел + email_outro: Получавате това известие, защото сте администратор на платформата. + email_subject: Инициативата „%{resource_title}“ беше изпратена за техническа проверка. + notification_title: Инициативата „%{resource_title}“ е изпратена за техническа проверка. Вижте повече в администраторския панел + milestone_completed: + affected_user: + email_intro: Инициативата Ви %{resource_title} събра %{percentage} % подписи! + email_outro: Получавате това известие, защото сте авторът на инициативата %{resource_title}. + email_subject: Достигнат е нов важен етап! + notification_title: Инициативата Ви %{resource_title} събра %{percentage} % подписи. + follower: + email_intro: Инициативата %{resource_title} събра %{percentage} % подписи! + email_outro: Получавате това известие, защото следвате %{resource_title}. Може да прекратите известията чрез предната връзка. + email_subject: Достигнат е нов важен етап! + notification_title: Инициативата %{resource_title} събра %{percentage} % подписи. + support_threshold_reached: + email_intro: Инициативата %{resource_title} е достигнала прага на подписите + email_outro: Получавате това известие, защото сте администратор на платформата. + email_subject: Достигнат е прагът на подписите + notification_title: Инициативата %{resource_title} достигна прага на подписите + gamification: + badges: + initiatives: + conditions: + - Отидете в пространството за участие на Инициативи + - Следвайте стъпките, за да създадете нова инициатива + description: Тази значка се предоставя, когато стартирате нови инициативи, като си партнирате с други, за да ги изпълните. + description_another: Този участник е публикувал %{score} инициативи. + description_own: Имате %{score} публикувани инициативи. + name: Публикувани инициативи + next_level_in: Публикувайте още %{score} инициативи, за да достигнете следващото ниво! + unearned_another: Този участник все още не е публикувал нито една инициатива. + unearned_own: Все още не сте публикували нито една инициатива. + help: + participatory_spaces: + initiatives: + contextual: "

Една инициатива е предложение, което може да бъде популяризирано от всеки по негова собствена инициатива (независимо от други канали или пространства за участие) чрез събиране на (цифрови) подписи за организацията за извършване на конкретна действие (промяна на наредба, иницииране на проект, промяна на името на отдел или улица и т.н.).

Организаторите на дадена инициатива могат да дефинират нейните цели, да събират подкрепа, да обсъждат, да я разпространяват и да дефинират места за срещи, където могат да се събират подписи от присъстващите или дебати, отворени за други участници.

Примери: Инициатива може да събира подписи за свикване на консултация между всички хора на дадена организация или за създаване или свикване на събрание , или да инициирате процес на увеличаване на бюджета за територия или област на организацията. По време на процеса на събиране на подписи повече хора могат да добавят към това искане и да го продължат в организацията.

" + page: "

Една инициатива е предложение, което може да бъде популяризирано от всеки по негова собствена инициатива (независимо от други канали или пространства за участие) чрез събиране на (цифрови) подписи за организацията за извършване на конкретна действие (промяна на наредба, иницииране на проект, промяна на името на отдел или улица и т.н.).

Организаторите на дадена инициатива могат да дефинират нейните цели, да събират подкрепа, да обсъждат, да я разпространяват и да дефинират места за срещи, където могат да се събират подписи от присъстващите или дебати, отворени за други участници.

Примери: Инициатива може да събира подписи за свикване на консултация между всички хора на дадена организация или за създаване или свикване на събрание , или да инициирате процес на увеличаване на бюджета за територия или област на организацията. По време на процеса на събиране на подписи повече хора могат да добавят към това искане и да го продължат в организацията.

" + title: Какво представляват инициативите? initiatives: + actions: + answer: Отговор + admin: + answers: + edit: + answer: Отговор + title: Отговор за %{title} + info_initiative: + created_at: Създадено на + description: Описание + initiative_votes_count: Брой гласове + initiatives: Инициативи + state: Състояние + committee_requests: + index: + approve: Одобряване + confirm_revoke: Сигурни ли сте? + invite_to_committee_help: Споделете този линк, за да поканите други участници в промоторския комитет. + no_members_yet: Няма участници в промоторския комитет. + revoke: Отмени + title: Членове на комитета + content_blocks: + highlighted_initiatives: + max_results: Максимален брой елементи, които да се показват + order: + default: По подразбиране (Най-скорошен) + label: 'Подредете елемента по:' + most_recent: Най-скорошни + exports: + initiatives: Инициативи + initiatives: + edit: + accept: Приемане на инициативата + confirm: Сигурни ли сте? + confirm_send_to_technical_validation: Сигурни ли сте? + discard: Премахване на инициативата + export_pdf_signatures: Експортиране на подписите като файл във формат PDF + export_votes: Експортиране на подписите + reject: Отхвърляне на инициативата + send_to_technical_validation: Изпращане за техническа проверка + success: Инициативата е изпратена за техническа валидация. + update: Актуализация + form: + settings: Настройки + title: Обща информация + index: + actions_title: Действие + preview: Преглед + print: Принтиране + initiative_attachments: + documents: Документи + edit: Редактирай + new: Ново + photos: Снимки + update: + error: Възникна грешка. + success: Инициативата беше актуализирана успешно. + initiatives_settings: + edit: + update: Актуализация + form: + comments: Най-коментирани + date: Най-скорошни + publication_date: Най-скоро публикувани + random: Произволно + signatures: С най-много подписи + title: Настройки за инициативи + initiatives_type_scopes: + create: + error: Възникна грешка. + success: Създаден е нов обхват за дадения тип инициатива. + destroy: + success: Обхватът беше премахнат успешно. + edit: + title: Редактиране на обхвата на типа инициатива + update: Актуализация + new: + create: Създаване + title: Създаване на обхват на типа инициатива + update: + error: Възникна грешка. + success: Обхватът беше актуализиран успешно. + initiatives_types: + create: + error: Възникна грешка. + success: Успешно е създаден нов тип инициатива. + destroy: + success: Типът инициатива беше премахнат успешно. + edit: + update: Актуализация + form: + authorizations: Настройки за оторизация + child_scope_threshold_enabled_help_html: 'Този конфигурационен флаг не поддържа офлайн гласуване. Той позволява подобхвати и работи с манипулатор на оторизация, който свързва обхват с потребителя. Уверете се, че сте избрали тази оторизация по-долу в настройките за разрешение. За да работи, обхватите трябва да бъдат конфигурирани по йерархичен начин: 1 родител - N дете. За повече информация как работи тази конфигурация вижте страницата с документация за администратор на инициативи.' + only_global_scope_enabled_help_html: Поставете отметка върху този флаг, ако сте активирали „Подпис на обхват на дете“ и сте конфигурирали глобалния обхват като родителски обхват. Като активирате това, изборът на тип инициатива ще бъде пропуснат в съветника за създаване на инициатива. За повече информация как работи тази конфигурация вижте тази връзка. + options: Опции + initiative_type_scopes: + title: Обхвати за типа инициатива + new: + create: Създаване + title: Нов тип инициатива + update: + error: Възникна грешка. + success: Типът инициатива беше актуализиран успешно. + admin_log: + initiative: + publish: "%{user_name} публикува инициативата %{resource_name}" + send_to_technical_validation: "%{user_name} изпрати инициативата %{resource_name} за техническа проверка" + unpublish: "%{user_name} премахна инициативата %{resource_name}" + update: "%{user_name} актуализира инициативата %{resource_name}" + initiatives_settings: + update: "%{user_name} актуализира настройките на инициативите" + initiatives_type: + create: "%{user_name} създаде типа инициатива %{resource_name}" + delete: "%{user_name} изтри типа инициативи %{resource_name}" + update: "%{user_name} актуализира типа инициативи %{resource_name}" + admin_states: + accepted: Достатъчно подписи + created: Създаден + discarded: Отхвърлено + published: Публикувано + rejected: Няма достатъчно подписи + validating: Техническа проверка application_helper: filter_state_values: + accepted: Достатъчно подписи + all: Всички + answered: Отговорено closed: Затворен open: Отворен + rejected: Няма достатъчно подписи + filter_type_values: + all: Всички + committee_requests: + approve: + success: Заявката е одобрена. + new: + continue: Продължи + help_text: На път сте да заявите членство в промоторския комитет на тази инициатива. + revoke: + success: Искането е отменено. + spawn: + success: Заявката Ви беше изпратена до автора на инициативата. + content_blocks: + highlighted_initiatives: + name: Акцентирани инициативи + create_initiative: + fill_data: + back: Назад + continue: Продължи + fill_data_help: "" + more_information: "(Още информация)" + select_area: Изберете област + select_scope: Избор на обхват + finish: + back: Назад + back_to_initiatives: Назад към инициативите + callout_text: Поздравления! Гражданската Ви инициатива беше създадена успешно. + confirm: Ще изпратите инициативата на администратор да я прегледа и публикува. След публикуване няма да можете да го редактирате. Сигурен ли си? + edit_my_initiative: Редактиране на моята инициатива + go_to_my_initiatives: Към моите инициативи + more_information: "(Още информация)" + send_my_initiative: Изпратете моята инициатива за техническо валидиране + finish_help: + publish_helper_text: Не забравяйте, че за да бъде публикувана вашата инициатива, трябва да попълните необходимата информация и да я изпратите на техническо валидиране, за да може администратор да я прегледа. + previous_form: + back: Назад + continue: Продължи + promotal_committee: + individual_help_text: Този вид инициатива изисква комисия за насърчаване, състояща се от поне %{committee_size} души (атестатори). Трябва да споделите следната връзка с другите хора, които са част от тази инициатива. Когато вашите контакти получат тази връзка, те ще трябва да следват посочените стъпки. + more_information: "(Още информация)" + select_initiative_type: + back: Назад + choose_html: Искам да създам %{title} + more_information: Още информация + new: Създаване на нова инициатива + select: Искам да популяризирам тази инициатива + select_initiative_type_help: Гражданските инициативи са средствa, чрез които гражданите могат да се намесят, така че градската управа да предприеме действия в защита на общия интерес, които попадат в юрисдикцията ѝ. Коя инициатива искате да стартирате? + verification_required: Потвърдете акаунта си, за да промотирате тази инициатива + share_committee_link: + invite_to_committee_help: Връзка, с която да поканите хора да участват в комисията за популяризиране + edit: + accept: Приемане на инициативата + back: Назад + confirm: Сигурни ли сте? + discard: Премахване на инициативата + export_pdf_signatures: Експортиране на подписите като файл във формат PDF + export_votes: Експортиране на подписите + reject: Отхвърляне на инициативата + title: Редактиране на инициативата + update: Актуализация + events: + approve_membership_request: + email_intro: "%{author_nickname} прие вашата кандидатура да станете част от промоторския комитет за инициативата %{resource_title}." + email_outro: 'Получихте това известие, защото кандидатствахте за тази инициатива: %{resource_title}' + email_subject: "%{author_nickname} прие кандидатурата ви в комитета на промоутъра" + notification_title: %{author_nickname} прие вашата кандидатура да бъде част от комитета на промоторите за следната инициатива %{resource_title}. + create_initiative_event: + email_intro: "%{author_name} %{author_nickname}, когото следвате, създаде нова инициатива, разгледайте я и допринесете:" + email_outro: Получихте това известие, защото следвате %{author_nickname}. Можете да спрете да получавате известия, като последвате предходния линк. + email_subject: Нова инициатива на %{author_nickname} + notification_title: Инициативата %{resource_title} беше създадена от %{author_name} %{author_nickname}. + endorse_initiative_event: + email_intro: "%{author_name} %{author_nickname}, когото следвате, подкрепи следната инициатива; може би бихте искали да допринесете към дискусията:" + email_outro: Получихте това известие, защото следвате %{author_nickname}. Можете да спрете да получавате известия, като последвате предходния линк. + email_subject: Инициативата е подкрепена от %{author_nickname} + notification_title: Инициативата %{resource_title} беше подкрепена от %{author_name} %{author_nickname}. + revoke_membership_request: + email_intro: "%{author_nickname} отхвърли кандидатурата ви да станете част от комитета на промоторите за следната инициатива %{resource_title}." + email_outro: 'Получихте това известие, защото кандидатствахте за тази инициатива: %{resource_title}.' + email_subject: "%{author_nickname} отхвърли кандидатурата ви до промоутърската комисия" + notification_title: %{author_nickname} отхвърли кандидатурата ви да бъде част от комитета на промоторите за следната инициатива %{resource_title}. + spawn_committee_request_event: + email_intro: "%{applicant_nickname} кандидатства за промоторския комитет на вашата инициатива %{resource_title}. За да приемете или отхвърлите кандидатурата, отидете на формата за редактиране на вашата инициатива." + email_outro: 'Получихте това известие, защото сте авторът на тази инициатива: %{resource_title}' + email_subject: "%{applicant_nickname} иска да се присъедини към вашата инициатива" + notification_title: %{applicant_nickname} кандидатства за промоторския комитет на вашата инициатива %{resource_title}. За да приемете или отхвърлите, щракнете тук. + form: + add_documents: Добавяне на документи + add_image: Добавяне на изображение + attachment_legend: "(Незадължително) Добавяне на прикачен файл" + edit_documents: Редактиране на документ + edit_image: Редактиране на изображение + image_legend: "(По избор) Добавяне на изображение" + index: + uninitialized: Инициативите все още не са конфигурирани от администратор. + initiative_signatures: + fill_personal_data: + continue: Продължи + help: Моля, попълнете личните си данни в следните полета, за да подпишете инициативата. + finish: + back_to_initiative: Назад към инициативата + sms_code: + continue: Проверете кода и продължете + help: Проверете съобщението, което получихте на телефона си чрез SMS + sms_phone_number: + continue: Изпратете ми SMS + help: Попълнете потвърдения си телефонен номер във формуляра, за да заявите вашия код за потвърждение. + initiative_votes: + create: + error: Имаше проблем с подписването на инициативата. + invalid: Предоставената информация за подписване на инициативата не е валидна. + success_html: Поздравления! Подписахте успешно инициативата %{title}. + personal_data: + invalid: Личната информация не отговаря на предоставените данни за удостоверяване. + sms_code: + invalid: Кодът Ви за потвърждение не съвпада с нашия. Моля, проверете отново съобщението, което Ви изпратихме със SMS. + sms_phone: + invalid: Телефонният номер е невалиден или изчаква удостоверяване. Моля, проверете удостоверенията си. + initiatives: + author_list: + hidden_authors_count: + one: и още 1 човек + other: и още %{count} души + committee_members: + approve: Одобряване + confirm_approve: Сигурни ли сте, че искате да одобрите този член? + confirm_revoke: Сигурни ли сте, че искате да отмените този член? + invite_to_committee_help: Споделете тази връзка, за да поканите други участници в промотутърския комитет. + link: Линк + no_members_yet: Няма участници в промоутърския комитет. + revoke: Отмени + title: Членове на комитета + count: + title: + one: "%{count} инициатива" + other: "%{count} инициативи" + filters: + any: Някой + area: Област + author: Автор + myself: Моите инициативи + scope: Обхват + state: Статус + type: Тип + index_header: + new_initiative: Нова инициатива + initiatives: + closed_initiatives_warning: В момента няма отворени инициативи, но тук можете да намерите всички изброени затворени инициативи. + no_initiatives_warning: Няма инициативи, които да съответстват на критериите Ви за търсене. + interactions: + comments_count: + count: + one: Коментар + other: Коментари + orders: + label: 'Сортиране на инициативите по:' + most_commented: Най-коментирани + most_voted: С най-много подписи + random: Произволно + recent: Най-скорошни + recently_published: Най-скоро публикувани + print: + address: Адрес + author_title: Автор на инициативата + city: Град + email: Имейл + full_name: Пълно име + general_title: Заявление за допускане на инициатива + id_number: ID номер + initiative: + attachments: Приложена документация (моля, напишете името на всеки документ по-долу) + description: 'Описание:' + title: 'Заглавие:' + type: Тип инициатива + legal_text: Събраните лични данни ще бъдат включени и третирани поверително от организацията, съгласно действащото законодателство. + members_header: Членове на промоторския комитет на инициативата + phone_number: Телефонен номер + place_date: Място, дата + postal_code: Пощенски код (ПК) + print: Принтиране + province: Район/Област + section: 'При поискване от организацията, моля, отпечатайте и попълнете този формуляр, за да го изпратите, където е посочено:' + signature: Подпис + result: + answer_title: На тази инициатива е отговорено. + initiative_rejected_reason: Тази инициатива е отхвърлена поради липса на подписи. + show: + area: Област + before_send_to_technical_validation_announcement: 'Преди да изпратите инициативата си за техническо валидиране, трябва да добавите още %{count} членове към комитета на организаторите.

Споделете тази връзка с хората, които искате да бъдат част от вашия комитет: %{href}' + confirm: Ще изпратите инициативата на администратор да я прегледа и публикува. След публикуване няма да можете да го редактирате. Сигурен ли си? + edit: Редактирай + initiative_data: Данни за инициативата + scope: Обхват + send_to_technical_validation: Изпращане за техническа проверка + send_to_technical_validation_announcement: Ако всичко изглежда наред, щракнете върху „Изпращане до техническа проверка“, за да може администратор да прегледа и публикува вашата инициатива + signature_collection: Събиране на подписи + state: Състояние + type: Тип + signatures_count: + one: " подпис" + other: " подписи" + vote_cabin: + already_voted: Вече подписани + verification_required: Потвърдете профила си, за да подпишете инициативата + vote: Подписване + votes_blocked: Подписването е деактивирано + votes_count: + count: + one: Подпис + other: Подписи + initiatives_mailer: + creation_subject: Инициативата Ви „%{title}“ беше създадена + initiative_link: + check_initiative_details: Можете да видите подробностите за инициативата + here: тук + more_information: Тук можете да намерите повече информация за процеса за създаване на инициатива. + progress_report_body_for: Инициативата %{title} събра %{percentage} % от необходимите подписи. + progress_report_for: 'Обобщение на инициативата: %{title}' + promotal_committee_help: Не забравяйте, че трябва да поканите най-малко %{member_count} души в комисията за популяризиране. Препратете следната връзка, да поканите хора в комисията за популяризиране + status_change_body_for: 'Инициативата %{title} промени статуса си на: %{state}' + status_change_for: Състоянието на инициативата %{title} беше променено + last_activity: + new_initiative: 'Нова инициатива:' modal: not_authorized: authorizations_page: Преглед на оторизациите explanation: Трябва да преминете проверка, за да създадете нова инициатива. title: Изисква се оторизация + pages: + home: + highlighted_initiatives: + active_spaces: Активни инициативи + see_all_spaces: Вижте всички инициативи + show: + badge_name: + accepted: Достатъчно подписи + created: Създаден + discarded: Отхвърлено + published: Публикувано + rejected: Няма достатъчно подписи + validating: Техническа проверка + states: + accepted: Прието + expired: Изтекло + unavailable_scope: Недостъпен обхват + update: + error: Възникна грешка. + success: Инициативата беше актуализирана успешно. + menu: + initiatives: Инициативи + resources: + initiative: + actions: + comment: Коментар + initiatives_type: + actions: + create: Създаване + title: Активности + vote: Подписване + layouts: + decidim: + initiative_creation_header: + fill_data: Създаване + finish: Край + promotal_committee: Комитет за популяризиране + select_initiative_type: Изберете + initiative_signature_creation_header: + fill_personal_data: Попълнете данните си + finish: Край + sms_code: Проверка с SMS код + sms_phone_number: Номер на мобилен телефон + title: Подписване на %{initiative_title} + initiatives: + no_initiatives_yet: + no_initiatives_yet: Все още няма инициативи! diff --git a/decidim-initiatives/spec/system/admin/admin_manages_initiative_components_spec.rb b/decidim-initiatives/spec/system/admin/admin_manages_initiative_components_spec.rb index 65642e05ec19a..16b359f5d451f 100644 --- a/decidim-initiatives/spec/system/admin/admin_manages_initiative_components_spec.rb +++ b/decidim-initiatives/spec/system/admin/admin_manages_initiative_components_spec.rb @@ -7,6 +7,7 @@ let(:user) { create(:user, :admin, :confirmed, organization:) } let!(:initiative) { create(:initiative, organization:) } + let!(:attributes) { attributes_for(:component, participatory_space: initiative) } before do switch_to_host(organization.host) @@ -28,9 +29,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My component", - ca: "El meu component", - es: "Mi componente" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -57,12 +56,17 @@ it "is successfully created" do expect(page).to have_admin_callout("Component created successfully.") - expect(page).to have_content("My component") + expect(page).to have_content(translated(attributes[:name])) + end + + it "has a successful admin log" do + visit decidim_admin.root_path + expect(page).to have_content("created #{translated(attributes[:name])} in #{translated(initiative.title)}") end context "and then edit it" do before do - within "tr", text: "My component" do + within "tr", text: translated(attributes[:name]) do page.find(".action-icon--configure").click end end @@ -111,9 +115,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My updated component", - ca: "El meu component actualitzat", - es: "Mi componente actualizado" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -128,9 +130,9 @@ end expect(page).to have_admin_callout("The component was updated successfully.") - expect(page).to have_content("My updated component") + expect(page).to have_content(translated(attributes[:name])) - within "tr", text: "My updated component" do + within "tr", text: translated(attributes[:name]) do page.find(".action-icon--configure").click end @@ -141,6 +143,9 @@ within ".default-step-settings" do expect(all("input[type=checkbox]").first).to be_checked end + + visit decidim_admin.root_path + expect(page).to have_content("updated #{translated(attributes[:name])} in #{translated(initiative.title)}") end end diff --git a/decidim-initiatives/spec/system/admin/admin_manages_initiatives_types_spec.rb b/decidim-initiatives/spec/system/admin/admin_manages_initiatives_types_spec.rb index efa95147ac580..6d6c8cdc7408b 100644 --- a/decidim-initiatives/spec/system/admin/admin_manages_initiatives_types_spec.rb +++ b/decidim-initiatives/spec/system/admin/admin_manages_initiatives_types_spec.rb @@ -6,6 +6,7 @@ let(:organization) { create(:organization) } let(:user) { create(:user, :admin, :confirmed, organization:) } let!(:initiatives_type) { create(:initiatives_type, organization:) } + let(:attributes) { attributes_for(:initiatives_type) } before do switch_to_host(organization.host) @@ -26,13 +27,13 @@ fill_in_i18n( :initiatives_type_title, "#initiatives_type-title-tabs", - en: "My initiative type" + **attributes[:title].except("machine_translations") ) fill_in_i18n_editor( :initiatives_type_description, "#initiatives_type-description-tabs", - en: "A longer description" + **attributes[:description].except("machine_translations") ) select("Online", from: "Signature type") @@ -42,6 +43,9 @@ click_on "Create" expect(page).to have_admin_callout("A new initiative type has been successfully created") + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} initiatives type") end end @@ -54,7 +58,12 @@ fill_in_i18n( :initiatives_type_title, "#initiatives_type-title-tabs", - en: "My updated initiative type" + **attributes[:title].except("machine_translations") + ) + fill_in_i18n_editor( + :initiatives_type_description, + "#initiatives_type-description-tabs", + **attributes[:description].except("machine_translations") ) select("Mixed", from: "Signature type") @@ -67,6 +76,9 @@ click_on "Update" expect(page).to have_admin_callout("The initiative type has been successfully updated") + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} initiatives type") end end diff --git a/decidim-initiatives/spec/system/admin/update_initiative_spec.rb b/decidim-initiatives/spec/system/admin/update_initiative_spec.rb index 818fa051fad54..e91811eaa037a 100644 --- a/decidim-initiatives/spec/system/admin/update_initiative_spec.rb +++ b/decidim-initiatives/spec/system/admin/update_initiative_spec.rb @@ -15,6 +15,8 @@ def submit_and_validate context "when initiative update" do context "and user is admin" do + let(:attributes) { attributes_for(:initiative, organization:) } + before do switch_to_host(organization.host) login_as user, scope: :user @@ -29,6 +31,25 @@ def submit_and_validate submit_and_validate end + it "updates the initiative" do + page.find(".action-icon--edit").click + + fill_in_i18n( + :initiative_title, + "#initiative-title-tabs", + **attributes[:title].except("machine_translations") + ) + fill_in_i18n_editor( + :initiative_description, + "#initiative-description-tabs", + **attributes[:description].except("machine_translations") + ) + submit_and_validate + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} initiative") + end + context "when initiative is in created state" do before do initiative.created! diff --git a/decidim-meetings/app/cells/decidim/meetings/join_meeting_button/remaining_slots.erb b/decidim-meetings/app/cells/decidim/meetings/join_meeting_button/remaining_slots.erb index 8eb54a7eac221..5f481154a7b24 100644 --- a/decidim-meetings/app/cells/decidim/meetings/join_meeting_button/remaining_slots.erb +++ b/decidim-meetings/app/cells/decidim/meetings/join_meeting_button/remaining_slots.erb @@ -1,4 +1,5 @@
<%= t("remaining_slots", scope: "decidim.meetings.meetings.show", count: model.remaining_slots) %> + <%= model.remaining_slots %> / <%= model.available_slots %>
diff --git a/decidim-meetings/app/cells/decidim/meetings/question_responses/show.erb b/decidim-meetings/app/cells/decidim/meetings/question_responses/show.erb index 1df4b465a74b3..b608da1969303 100644 --- a/decidim-meetings/app/cells/decidim/meetings/question_responses/show.erb +++ b/decidim-meetings/app/cells/decidim/meetings/question_responses/show.erb @@ -1,7 +1,11 @@ <% answer_options_with_percentages.each do |(answer_option_body, answer_percentage)| %> -
-
<%= answer_percentage %>
-
+
+
+
+
+ <%= translated_attribute(answer_option_body) %> + <%= answer_percentage %> +
<% end %> diff --git a/decidim-meetings/app/commands/decidim/meetings/admin/update_questionnaire.rb b/decidim-meetings/app/commands/decidim/meetings/admin/update_questionnaire.rb index 34ef576514947..1c5c68098d30f 100644 --- a/decidim-meetings/app/commands/decidim/meetings/admin/update_questionnaire.rb +++ b/decidim-meetings/app/commands/decidim/meetings/admin/update_questionnaire.rb @@ -25,10 +25,7 @@ def call Decidim::Meetings::Questionnaire.transaction do create_questionnaire_for create_questionnaire - if @questionnaire.questions_editable? - update_questionnaire_questions - delete_answers - end + update_questionnaire_questions @questionnaire end end @@ -48,10 +45,25 @@ def create_questionnaire def update_questionnaire_questions @form.questions.each do |form_question| - update_questionnaire_question(form_question) + if form_question.editable? + update_questionnaire_question(form_question) + else + update_questionnaire_question_position(form_question) + end end end + def update_questionnaire_question_position(form_question) + record = @questionnaire.questions.find_by(id: form_question.id) + return if record.blank? + + position = form_question.position + + return if position == record.position + + record.update!(position:) + end + def update_questionnaire_question(form_question) question_attributes = { body: form_question.body, @@ -86,10 +98,6 @@ def update_nested_model(form, attributes, parent_association) record.save! end end - - def delete_answers - @questionnaire.answers.destroy_all - end end end end diff --git a/decidim-meetings/app/commands/decidim/meetings/create_answer.rb b/decidim-meetings/app/commands/decidim/meetings/create_answer.rb index 1ce46716fc460..a654e87676b5f 100644 --- a/decidim-meetings/app/commands/decidim/meetings/create_answer.rb +++ b/decidim-meetings/app/commands/decidim/meetings/create_answer.rb @@ -41,7 +41,7 @@ def answer_question form.selected_choices.each do |choice| answer.choices.build( - body: choice.body, + body: choice.body || translated_attribute(AnswerOption.find_by(id: choice.answer_option_id)&.body), decidim_answer_option_id: choice.answer_option_id ) end diff --git a/decidim-meetings/app/commands/decidim/meetings/join_meeting.rb b/decidim-meetings/app/commands/decidim/meetings/join_meeting.rb index 3516e5ab2f8a8..80fa4927022c5 100644 --- a/decidim-meetings/app/commands/decidim/meetings/join_meeting.rb +++ b/decidim-meetings/app/commands/decidim/meetings/join_meeting.rb @@ -4,16 +4,15 @@ module Decidim module Meetings # This command is executed when the user joins a meeting. class JoinMeeting < Decidim::Command + delegate :current_user, to: :form # Initializes a JoinMeeting Command. # # meeting - The current instance of the meeting to be joined. - # user - The user joining the meeting. - # registration_form - A form object with params; can be a questionnaire. - def initialize(meeting, user, registration_form) + # form - A form object with params; can be a questionnaire. + def initialize(meeting, form) @meeting = meeting - @user = user - @user_group = Decidim::UserGroup.find_by(id: registration_form.user_group_id) - @registration_form = registration_form + @user_group = Decidim::UserGroup.find_by(id: form.user_group_id) + @form = form end # Creates a meeting registration if the meeting has registrations enabled @@ -22,7 +21,7 @@ def initialize(meeting, user, registration_form) # Broadcasts :ok if successful, :invalid otherwise. def call return broadcast(:invalid) unless can_join_meeting? - return broadcast(:invalid_form) unless registration_form.valid? + return broadcast(:invalid_form) unless form.valid? return broadcast(:invalid) if answer_questionnaire == :invalid meeting.with_lock do @@ -39,16 +38,16 @@ def call private - attr_reader :meeting, :user, :user_group, :registration, :registration_form + attr_reader :meeting, :user_group, :registration, :form def accept_invitation - meeting.invites.find_by(user:)&.accept! + meeting.invites.find_by(user: current_user)&.accept! end def answer_questionnaire return unless questionnaire? - Decidim::Forms::AnswerQuestionnaire.call(registration_form, user, meeting.questionnaire) do + Decidim::Forms::AnswerQuestionnaire.call(form, meeting.questionnaire) do on(:ok) do return :valid end @@ -62,19 +61,19 @@ def answer_questionnaire def create_registration @registration = Decidim::Meetings::Registration.create!( meeting:, - user:, + user: current_user, user_group:, - public_participation: registration_form.public_participation + public_participation: form.public_participation ) end def can_join_meeting? meeting.registrations_enabled? && meeting.has_available_slots? && - !meeting.has_registration_for?(user) + !meeting.has_registration_for?(current_user) end def send_email_confirmation - Decidim::Meetings::RegistrationMailer.confirmation(user, meeting, registration).deliver_later + Decidim::Meetings::RegistrationMailer.confirmation(current_user, meeting, registration).deliver_later end def send_notification_confirmation @@ -82,7 +81,7 @@ def send_notification_confirmation event: "decidim.events.meetings.meeting_registration_confirmed", event_class: Decidim::Meetings::MeetingRegistrationNotificationEvent, resource: @meeting, - affected_users: [@user], + affected_users: [current_user], extra: { registration_code: @registration.code } @@ -113,17 +112,17 @@ def send_notification_over(percentage) end def increment_score - Decidim::Gamification.increment_score(user, :attended_meetings) + Decidim::Gamification.increment_score(current_user, :attended_meetings) end def follow_meeting - Decidim::CreateFollow.call(follow_form, user) + Decidim::CreateFollow.call(follow_form, current_user) end def follow_form Decidim::FollowForm .from_params(followable_gid: meeting.to_signed_global_id.to_s) - .with_context(current_user: user) + .with_context(current_user:) end def occupied_slots_over?(percentage) @@ -131,7 +130,7 @@ def occupied_slots_over?(percentage) end def questionnaire? - registration_form.model_name == "questionnaire" + form.model_name == "questionnaire" end end end diff --git a/decidim-meetings/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb b/decidim-meetings/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb index 0df613b980715..52f082f3733a9 100644 --- a/decidim-meetings/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb +++ b/decidim-meetings/app/controllers/decidim/meetings/admin/meetings_poll_controller.rb @@ -23,8 +23,20 @@ def edit def update enforce_permission_to(:update, :poll, meeting:, poll:) + current_questions_forms = form(Admin::QuestionnaireForm).from_model(questionnaire).questions @form = form(Admin::QuestionnaireForm).from_params(params) + # Although the question values (except the position) will be ignored if they are not editable, + # its information is completed so that if any update failure occurs, the form is rendered again + # with the full data for the disabled questions. + @form.questions = @form.questions.map do |question_form| + next question_form if question_form.editable? + + full_question_form = current_questions_forms.find { |form| form.id.to_s == question_form.id.to_s } + full_question_form.position = question_form.position + full_question_form + end + Admin::UpdateQuestionnaire.call(@form, questionnaire) do on(:ok) do # i18n-tasks-use t("decidim.forms.admin.questionnaires.update.success") diff --git a/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb b/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb index 29c1d638204d2..48c5e9fb951ad 100644 --- a/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb +++ b/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb @@ -15,7 +15,7 @@ class MeetingsController < Decidim::Meetings::ApplicationController helper Decidim::ShortLinkHelper include Decidim::AttachmentsHelper - helper_method :meetings, :meeting, :registration, :search, :nav_paths, :tab_panel_items + helper_method :meetings, :meeting, :registration, :search, :tab_panel_items before_action :add_additional_csp_directives, only: [:show] @@ -110,36 +110,6 @@ def meeting @meeting ||= Meeting.not_hidden.where(component: current_component).find_by(id: params[:id]) end - def next_meeting - return if search_collection.size < 2 - - search_collection.order(:start_time, :id).where( - Decidim::Meetings::Meeting.arel_table[:start_time].gt(meeting.start_time).or( - Decidim::Meetings::Meeting.arel_table[:start_time].eq(meeting.start_time).and( - Decidim::Meetings::Meeting.arel_table[:id].gt(meeting.id) - ) - ) - ).first - end - - def prev_meeting - return if search_collection.size < 2 - - search_collection.order(:start_time, :id).where( - Decidim::Meetings::Meeting.arel_table[:start_time].lt(meeting.start_time).or( - Decidim::Meetings::Meeting.arel_table[:start_time].eq(meeting.start_time).and( - Decidim::Meetings::Meeting.arel_table[:id].lt(meeting.id) - ) - ) - ).last - end - - def nav_paths - return {} if meeting.blank? - - { prev_path: prev_meeting, next_path: next_meeting }.compact_blank.transform_values { |meeting| meeting_path(meeting) } - end - def meetings is_past_meetings = params.dig("filter", "with_any_date")&.include?("past") @meetings ||= paginate(search.result.order(start_time: is_past_meetings ? :desc : :asc)) diff --git a/decidim-meetings/app/controllers/decidim/meetings/polls/answers_controller.rb b/decidim-meetings/app/controllers/decidim/meetings/polls/answers_controller.rb index cc55a55478340..c4abd850e8b9f 100644 --- a/decidim-meetings/app/controllers/decidim/meetings/polls/answers_controller.rb +++ b/decidim-meetings/app/controllers/decidim/meetings/polls/answers_controller.rb @@ -9,6 +9,14 @@ class AnswersController < Decidim::Meetings::ApplicationController helper_method :question + def admin + enforce_permission_to(:update, :poll, meeting:) + end + + def index + enforce_permission_to(:reply_poll, :meeting, meeting:) + end + def create enforce_permission_to(:create, :answer, question:) @form = form(AnswerForm).from_params(params.merge(question:, current_user:)) diff --git a/decidim-meetings/app/controllers/decidim/meetings/registrations_controller.rb b/decidim-meetings/app/controllers/decidim/meetings/registrations_controller.rb index e391d0da83c4a..b9582ebf49c64 100644 --- a/decidim-meetings/app/controllers/decidim/meetings/registrations_controller.rb +++ b/decidim-meetings/app/controllers/decidim/meetings/registrations_controller.rb @@ -11,7 +11,7 @@ def answer @form = form(Decidim::Forms::QuestionnaireForm).from_params(params, session_token:) - JoinMeeting.call(meeting, current_user, @form) do + JoinMeeting.call(meeting, @form) do on(:ok) do flash[:notice] = I18n.t("registrations.create.success", scope: "decidim.meetings") redirect_to after_answer_path @@ -32,9 +32,9 @@ def answer def create enforce_permission_to(:register, :meeting, meeting:) - @form = JoinMeetingForm.from_params(params) + @form = JoinMeetingForm.from_params(params).with_context(current_user:) - JoinMeeting.call(meeting, current_user, @form) do + JoinMeeting.call(meeting, @form) do on(:ok) do flash[:notice] = I18n.t("registrations.create.success", scope: "decidim.meetings") redirect_after_path diff --git a/decidim-meetings/app/forms/decidim/meetings/admin/question_form.rb b/decidim-meetings/app/forms/decidim/meetings/admin/question_form.rb index fd91c47c02692..f5f24bdfa8820 100644 --- a/decidim-meetings/app/forms/decidim/meetings/admin/question_form.rb +++ b/decidim-meetings/app/forms/decidim/meetings/admin/question_form.rb @@ -18,10 +18,10 @@ class QuestionForm < Decidim::Form translatable_attribute :description, String validates :position, numericality: { greater_than_or_equal_to: 0 } - validates :question_type, inclusion: { in: Decidim::Meetings::Question::QUESTION_TYPES } - validates :max_choices, numericality: { only_integer: true, greater_than: 1, less_than_or_equal_to: ->(form) { form.number_of_options } }, allow_blank: true + validates :question_type, inclusion: { in: Decidim::Meetings::Question::QUESTION_TYPES }, if: :editable? + validates :max_choices, numericality: { only_integer: true, greater_than: 1, less_than_or_equal_to: ->(form) { form.number_of_options } }, allow_blank: true, if: :editable? validates :body, translatable_presence: true, if: :requires_body? - validates :answer_options, presence: true + validates :answer_options, presence: true, if: :editable? def to_param return id if id.present? @@ -29,6 +29,10 @@ def to_param "questionnaire-question-id" end + def editable? + @editable ||= id.blank? || Decidim::Meetings::Question.unpublished.unanswered.exists?(id:) + end + def number_of_options answer_options.size end @@ -36,7 +40,7 @@ def number_of_options private def requires_body? - !deleted + editable? && !deleted end end end diff --git a/decidim-meetings/app/forms/decidim/meetings/answer_form.rb b/decidim-meetings/app/forms/decidim/meetings/answer_form.rb index 4a2056e328ecf..81ca12355f71f 100644 --- a/decidim-meetings/app/forms/decidim/meetings/answer_form.rb +++ b/decidim-meetings/app/forms/decidim/meetings/answer_form.rb @@ -24,8 +24,8 @@ def answer @answer ||= Decidim::Meetings::Answer.find_by(decidim_user_id: current_user.id, decidim_question_id: question_id) if current_user end - def label(idx) - base = "#{idx + 1}. #{translated_attribute(question.body)}" + def label + base = translated_attribute(question.body) base += " (#{max_choices_label})" if question.max_choices base end @@ -43,13 +43,13 @@ def map_model(model) end def selected_choices - choices.select(&:body) + choices.select(&:answer_option_id) end private def max_choices - errors.add(:choices, :too_many) if selected_choices.size > question.max_choices + errors.add(:choices, :too_many, count: question.max_choices) if selected_choices.size > question.max_choices end def mandatory_label diff --git a/decidim-meetings/app/models/decidim/meetings/meeting.rb b/decidim-meetings/app/models/decidim/meetings/meeting.rb index 22001216f0405..99b6f02d613e2 100644 --- a/decidim-meetings/app/models/decidim/meetings/meeting.rb +++ b/decidim-meetings/app/models/decidim/meetings/meeting.rb @@ -171,7 +171,7 @@ def self.log_presenter_class_for(_log) end def can_be_joined_by?(user) - !closed? && registrations_enabled? && can_participate?(user) + !started? && registrations_enabled? && can_participate?(user) end def can_register_invitation?(user) @@ -183,6 +183,10 @@ def closed? closed_at.present? end + def started? + start_time < Time.current + end + def past? end_time < Time.current end diff --git a/decidim-meetings/app/models/decidim/meetings/poll.rb b/decidim-meetings/app/models/decidim/meetings/poll.rb index 9f68f180c8f21..57c620f41e731 100644 --- a/decidim-meetings/app/models/decidim/meetings/poll.rb +++ b/decidim-meetings/app/models/decidim/meetings/poll.rb @@ -14,6 +14,14 @@ class Poll < Meetings::ApplicationRecord delegate :organization, to: :meeting QUESTION_TYPES = %w(single_option multiple_option).freeze + + def has_questions? + questionnaire&.questions&.exists? + end + + def has_open_questions? + has_questions? && questionnaire.questions.not_closed.exists? + end end end end diff --git a/decidim-meetings/app/models/decidim/meetings/question.rb b/decidim-meetings/app/models/decidim/meetings/question.rb index acfb7a379c14e..543ef9bef60a7 100644 --- a/decidim-meetings/app/models/decidim/meetings/question.rb +++ b/decidim-meetings/app/models/decidim/meetings/question.rb @@ -28,6 +28,7 @@ class Question < Meetings::ApplicationRecord validates :question_type, inclusion: { in: QUESTION_TYPES } scope :visible, -> { where(status: [:published, :closed]) } + scope :unanswered, -> { where.missing(:answers) } def multiple_choice? %w(single_option multiple_option).include?(question_type) diff --git a/decidim-meetings/app/models/decidim/meetings/questionnaire.rb b/decidim-meetings/app/models/decidim/meetings/questionnaire.rb index ad498500e85bc..9d6a91b78ff01 100644 --- a/decidim-meetings/app/models/decidim/meetings/questionnaire.rb +++ b/decidim-meetings/app/models/decidim/meetings/questionnaire.rb @@ -11,12 +11,6 @@ class Questionnaire < Meetings::ApplicationRecord has_many :questions, -> { order(:position) }, class_name: "Question", foreign_key: "decidim_questionnaire_id", dependent: :destroy has_many :answers, class_name: "Answer", foreign_key: "decidim_questionnaire_id", dependent: :destroy - # Public: returns whether the questionnaire questions can be modified or not. - def questions_editable? - has_component = questionnaire_for.meeting.respond_to? :component - (has_component && !questionnaire_for.meeting.component.published?) || answers.empty? - end - def all_questions_unpublished? questions.all?(&:unpublished?) end diff --git a/decidim-meetings/app/packs/src/decidim/meetings/meetings_polls.js b/decidim-meetings/app/packs/src/decidim/meetings/meetings_polls.js index 167c561f00ed5..eb9988a52e3b1 100644 --- a/decidim-meetings/app/packs/src/decidim/meetings/meetings_polls.js +++ b/decidim-meetings/app/packs/src/decidim/meetings/meetings_polls.js @@ -9,6 +9,8 @@ $(() => { if ($container.length) { const poll = new MeetingsPollComponent($container, $container.data("decidim-meetings-poll"), $counter); + poll.mountComponent(); + $(".meeting-polls__action-list").on("click", (event) => { event.preventDefault(); @@ -29,6 +31,9 @@ $(() => { if ($adminContainer.length) { const adminPoll = new MeetingsPollComponent($adminContainer, $adminContainer.data("decidim-admin-meetings-poll")); + + adminPoll.mountComponent(); + $(".meeting-polls__action-administrate").on("click", (event) => { event.preventDefault(); diff --git a/decidim-meetings/app/packs/src/decidim/meetings/poll.component.js b/decidim-meetings/app/packs/src/decidim/meetings/poll.component.js index f38ae905bec90..beb9bd4a0ffed 100644 --- a/decidim-meetings/app/packs/src/decidim/meetings/poll.component.js +++ b/decidim-meetings/app/packs/src/decidim/meetings/poll.component.js @@ -24,9 +24,11 @@ export default class PollComponent { this.$element = $element; this.$counter = $counter; this.questionsUrl = config.questionsUrl; - this.pollingInterval = config.pollingInterval || 5000; + this.pollingInterval = config.pollingInterval || 10000; this.mounted = false; this.questions = {}; + this.questionsStatuses = {}; + this.answersStatuses = {}; } /** @@ -66,6 +68,8 @@ export default class PollComponent { * @returns {Void} - Returns nothing */ _fetchQuestions() { + $("#content").addClass("spinner-container") + // Store current questions state (open / closed) before overwriting them with the Ajax call // response. this._storeQuestionState(this.$element); @@ -79,6 +83,8 @@ export default class PollComponent { this._setQuestionsState(this.$element); this._pollQuestions(); this._addValidations(); + + $("#content").removeClass("spinner-container") }); } @@ -92,6 +98,12 @@ export default class PollComponent { $("[data-question]", $parent).each((_i, el) => { const $el = $(el); const questionId = $el.data("question"); + const elForm = $el.find("form"); + + this.questionsStatuses[questionId] = $el.data("status"); + if (elForm.length > 0) { + this.answersStatuses[questionId] = Object.fromEntries(new FormData(elForm[0])); + } if ($el[0].open === true) { this.questions[questionId] = OPEN; } else { @@ -124,12 +136,28 @@ export default class PollComponent { const questionId = $el.data("question"); // Current question state const state = this.questions[questionId]; + const questionStatus = this.questionsStatuses[questionId]; + const answersStatuses = this.answersStatuses[questionId]; + // New questions have a special class if (!state) { $el.addClass("is-new"); } else if (state === OPEN) { $el.prop(OPEN, true); } + + if ($el.data("status") === CLOSED && $el.data("status") !== questionStatus) { + $el.data("status", `${CLOSED}-new`); + document.getElementById(`closed-announcement-${questionId}`).hidden = false; + } + + if (answersStatuses) { + for (const [key, value] of Object.entries(answersStatuses)) { + if (key.includes("[choices]")) { + $el.find(`[name='${key}'][value='${value}']`).prop("checked", true); + } + } + } } /** @@ -177,7 +205,7 @@ export default class PollComponent { }); }); - $.unique($(".js-check-box-collection").parents(".answer")).each((idx, el) => { + $.unique($(".js-check-box-collection").parents("[data-max-choices]")).each((idx, el) => { const maxChoices = $(el).data("max-choices"); if (maxChoices) { createMaxChoicesAlertComponent({ diff --git a/decidim-meetings/app/packs/stylesheets/decidim/meetings/_item.scss b/decidim-meetings/app/packs/stylesheets/decidim/meetings/_item.scss index 99833b3ffbe35..b2009e1c1f254 100644 --- a/decidim-meetings/app/packs/stylesheets/decidim/meetings/_item.scss +++ b/decidim-meetings/app/packs/stylesheets/decidim/meetings/_item.scss @@ -125,13 +125,17 @@ } &::-webkit-progress-bar { - @apply bg-white; + @apply bg-gray lg:bg-white; } &::-moz-progress-bar { @apply bg-success; } } + + &-label { + @apply text-sm font-bold lg:hidden; + } } &-block { @@ -175,3 +179,107 @@ } } } + +// layout reset stuff +.meeting-poll__layout { + header, + main h1, + footer { + @apply hidden md:block; + } + + .layout-1col { + padding: 0; + } +} + +.meeting-polls { + @apply m-0 md:mt-10 md:mb-24; + + counter-reset: question; + + &__question { + @apply bg-white; + + summary { + @apply p-4 font-normal text-black text-md transition bg-background cursor-pointer marker:text-secondary; + + transition: background-color 0.2s ease-in-out; + + & > span:first-child::after { + counter-increment: question; + content: "#" counter(question); + } + + & > span:last-child:not(:only-child) { + @apply text-sm font-semibold float-right; + } + + & + * { + @apply mt-4 mb-8 md:mb-16 pr-4 pl-[calc(1rem+14px)] md:px-0 space-y-6; + } + } + + &[open] summary { + @apply bg-secondary md:bg-background marker:text-white md:marker:text-secondary text-white md:text-black; + } + + &.is-new { + animation: animateHighlight 5s ease-in-out forwards; + } + + & + & { + @apply mt-4; + } + + @keyframes animateHighlight { + 0%, + 80% { + background-color: rgba(var(--warning-rgb), 0.1); + } + } + } + + &__answer { + label { + @apply block p-4 ring-4 ring-background rounded transition; + + &:not(:has([disabled])) { + @apply hover:ring-tertiary hover:cursor-pointer; + } + } + + label + label, + & + & { + @apply mt-4; + } + + &--value { + @apply flex gap-2 justify-between text-gray-2 text-lg; + + > *:last-child { + @apply w-1/6 flex-none text-gray text-right; + } + } + + &--bar { + @apply w-full h-2.5 overflow-hidden rounded bg-background; + + > * { + @apply bg-success h-full rounded; + } + } + } + + &__admin-action { + @apply py-4 grid grid-cols-2 gap-x-4 gap-y-8 border-t border-t-gray [&>*:nth-child(2)]:ml-auto [&>*:nth-child(3)]:col-span-2; + } + + &__topbar { + @apply my-4 md:my-0 px-4 md:px-0 py-2 md:py-10 flex justify-between gap-4 bg-background md:bg-transparent; + + &.is-admin { + @apply mt-0 bg-tertiary md:bg-transparent text-black; + } + } +} diff --git a/decidim-meetings/app/packs/stylesheets/decidim/meetings/_live_event.scss b/decidim-meetings/app/packs/stylesheets/decidim/meetings/_live_event.scss index db2628cb1c30c..f27c8fb201286 100644 --- a/decidim-meetings/app/packs/stylesheets/decidim/meetings/_live_event.scss +++ b/decidim-meetings/app/packs/stylesheets/decidim/meetings/_live_event.scss @@ -18,8 +18,6 @@ &__aside { @apply flex-none bg-background-2; - counter-reset: question; - &.is-open { @apply w-1/5 [&+div]:w-4/5; @@ -33,96 +31,4 @@ } } } - - &__question { - @apply bg-white; - - summary { - @apply p-4 cursor-pointer font-bold text-secondary text-md transition border-b border-b-background hover:bg-background; - - transition: background-color 0.2s ease-in-out; - - &::after { - counter-increment: question; - content: "#" counter(question); - } - - & ~ * { - @apply p-4; - - // dynamic content - > :first-child { - @apply font-bold; - } - - label { - @apply flex items-baseline cursor-pointer; - } - - label + label { - @apply mt-4; - } - // end dynamic content - } - } - - &[open] .meeting-polls__answer--bar > * { - opacity: 1; - transform: translateX(0); - } - - &.is-new { - animation: animateHighlight 5s ease-in-out forwards; - } - - @keyframes animateHighlight { - 0%, - 80% { - background-color: rgba(var(--warning-rgb), 0.1); - } - } - } - - &__question--admin { - summary ~ * { - @apply border-t border-t-background p-4 bg-background-2; - - a { - @apply my-4 block text-sm underline; - } - - > :first-child { - @apply font-normal; - } - } - } - - &__answer { - @apply flex items-center gap-2; - - &--value { - @apply w-1/5 font-bold; - } - - &--bar { - @apply w-4/5 h-2.5 overflow-hidden; - - > * { - @apply bg-primary h-full opacity-0; - } - } - } - - // vertical flow - label + &__answer + label { - @apply mt-6; - } - - &__admin-label { - @apply p-4 bg-secondary text-white font-bold text-sm; - } - - &__admin-action { - @apply py-2 flex items-center border-t-background [&>*]:flex-none first:[&>*]:w-2/5 last:[&>*]:w-3/5; - } } diff --git a/decidim-meetings/app/permissions/decidim/meetings/permissions.rb b/decidim-meetings/app/permissions/decidim/meetings/permissions.rb index 4b5fff02751de..14c8ac57c77e4 100644 --- a/decidim-meetings/app/permissions/decidim/meetings/permissions.rb +++ b/decidim-meetings/app/permissions/decidim/meetings/permissions.rb @@ -39,6 +39,13 @@ def permissions toggle_allow(can_close_meeting?) when :register toggle_allow(can_register_invitation_meeting?) + when :reply_poll + toggle_allow(can_reply_poll?) + end + when :poll + case permission_action.action + when :update + toggle_allow(can_update_poll?) end else return permission_action @@ -112,6 +119,19 @@ def can_register_invitation_meeting? authorized?(:register, resource: meeting) end + def can_reply_poll? + meeting.present? && + meeting.poll.present? && + authorized?(:reply_poll, resource: meeting) + end + + def can_update_poll? + user.present? && + user.admin? && + meeting.present? && + meeting.poll.present? + end + def can_answer_question? question.present? && user.present? && !question.answered_by?(user) end diff --git a/decidim-meetings/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb b/decidim-meetings/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb index f8ee82dc73b98..1feb2202166f4 100644 --- a/decidim-meetings/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb +++ b/decidim-meetings/app/presenters/decidim/meetings/admin_log/meeting_presenter.rb @@ -15,10 +15,6 @@ module AdminLog class MeetingPresenter < Decidim::Log::BasePresenter private - def resource_presenter - @resource_presenter ||= Decidim::Meetings::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"]) - end - def diff_fields_mapping { address: :string, diff --git a/decidim-meetings/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb b/decidim-meetings/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb index 77e8ab7466707..02694535b0d5e 100644 --- a/decidim-meetings/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb +++ b/decidim-meetings/app/presenters/decidim/meetings/admin_log/value_types/meeting_title_description_presenter.rb @@ -10,7 +10,7 @@ class MeetingTitleDescriptionPresenter < Decidim::Log::ValueTypes::DefaultPresen def present return unless value - renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.translated_attribute(value)) + renderer = Decidim::ContentRenderers::HashtagRenderer.new(h.decidim_escape_translated(value)) renderer.render(links: false).html_safe end end diff --git a/decidim-meetings/app/presenters/decidim/meetings/log/resource_presenter.rb b/decidim-meetings/app/presenters/decidim/meetings/log/resource_presenter.rb deleted file mode 100644 index 4ee659a923284..0000000000000 --- a/decidim-meetings/app/presenters/decidim/meetings/log/resource_presenter.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module Decidim - module Meetings - module Log - class ResourcePresenter < Decidim::Log::ResourcePresenter - private - - # Private: Presents resource name. - # - # Returns an HTML-safe String. - def present_resource_name - Decidim::Meetings::MeetingPresenter.new(resource).title - end - end - end - end -end diff --git a/decidim-meetings/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb index 66b765e453e5f..061d6f4e9b227 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/poll/_answer_option_template.html.erb @@ -2,6 +2,6 @@ diff --git a/decidim-meetings/app/views/decidim/meetings/admin/poll/_form.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/poll/_form.html.erb index a9b9bed194f23..c74cc0016772f 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/poll/_form.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/poll/_form.html.erb @@ -4,19 +4,24 @@ - <% if questionnaire.questions_editable? %> - <%= fields_for "questionnaire[questions][#{blank_question.to_param}]", blank_question do |question_form| %> - - <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-dummy" %> - <% end %> - <% else %> - <%= cell("decidim/announcement", t("already_answered_warning", scope: "decidim.forms.admin.questionnaires.form"), callout_class: "warning" ) %> + <% announcement_body = capture do %> + + <% end %> + <%= cell("decidim/announcement", { body: announcement_body }, callout_class: "info") %> + + <%= fields_for "questionnaire[questions][#{blank_question.to_param}]", blank_question do |question_form| %> + + <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: true, template_id: "answer-option-template-dummy" %> <% end %>
@@ -25,24 +30,20 @@ <%= render "decidim/meetings/admin/poll/question", form: question_form, id: tabs_id_for_question(question), - editable: questionnaire.questions_editable?, + editable: question.editable?, answer_option_template_selector: "#answer-option-template-#{index}" %> - <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: questionnaire.questions_editable?, template_id: "answer-option-template-#{index}" %> + <%= render "decidim/meetings/admin/poll/answer_option_template", form: question_form, editable: question.editable?, template_id: "answer-option-template-#{index}" %> <% end %> <% end %>
- <% if questionnaire.questions_editable? %> - - <% end %> + <%= append_javascript_pack_tag "decidim_forms_admin" %> -<% if questionnaire.questions_editable? %> - -<% end %> + diff --git a/decidim-meetings/app/views/decidim/meetings/admin/poll/_question.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/poll/_question.html.erb index b2f1a681499e3..6f09f7decb53d 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/poll/_question.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/poll/_question.html.erb @@ -7,6 +7,8 @@ <% if editable %> <%== icon("drag-move-2-fill") %> + <% else %> + <%== icon("lock-line") %> <% end %> <%= dynamic_title(translated_attribute(question.body), class: "question-title-statement", max_length: 50, omission: "...", placeholder: t("question", scope: "decidim.forms.admin.questionnaires.question")) %> @@ -22,17 +24,17 @@ - <% if editable %> - + - + + <% if editable %> @@ -66,17 +68,17 @@ <% if question.persisted? %> - <%= form.hidden_field :id, disabled: !editable %> + <%= form.hidden_field :id %> <% end %> - <%= form.hidden_field :position, value: question.position || 0, disabled: !editable %> + <%= form.hidden_field :position, value: question.position || 0 %> <%= form.hidden_field :deleted, disabled: !editable %> -
+
" data-template="<%= answer_option_template_selector %>">
<% question.answer_options.each do |answer_option| %> <%= fields_for "questionnaire[questions][#{question.to_param}][answer_options][]", answer_option do |answer_option_form| %> - <%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question:, editable: %> + <%= render "decidim/meetings/admin/poll/answer_option", form: answer_option_form, question:, editable: question.editable? %> <% end %> <% end %>
@@ -87,7 +89,7 @@ <% end %>
-
+
"> <%= form.select( :max_choices, diff --git a/decidim-meetings/app/views/decidim/meetings/admin/poll/edit.html.erb b/decidim-meetings/app/views/decidim/meetings/admin/poll/edit.html.erb index 586fa04500650..46fac68bff57e 100644 --- a/decidim-meetings/app/views/decidim/meetings/admin/poll/edit.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/admin/poll/edit.html.erb @@ -17,13 +17,11 @@ <%= decidim_form_for(@form, url: update_url, method: :put, html: { class: "form-defaults form edit_questionnaire" }) do |form| %> <%= render partial: "decidim/meetings/admin/poll/form", object: form %> - <% if questionnaire.questions_editable? %> -
-
- <%= form.submit t("save", scope: "decidim.forms.admin.questionnaires.edit"), class: "button button__sm button__secondary" %> -
+
+
+ <%= form.submit t("save", scope: "decidim.forms.admin.questionnaires.edit"), class: "button button__sm button__secondary" %>
- <% end %> +
<% end %>
diff --git a/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb b/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb index 3fdfdd81ef623..bb8ee92d06493 100644 --- a/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/layouts/live_event.html.erb @@ -14,18 +14,6 @@ <%= render partial: "layouts/decidim/timeout_modal" %>
- <% if current_user && poll %> -
- - - <% if admin_allowed_to?(:update, :poll, meeting: meeting, poll: poll) %> - - <% end %> -
- <% end %> -
<%= current_organization_name %> / <%= present(meeting).title(links: true, html_escape: true ) %>
@@ -43,8 +31,6 @@
- - <%= yield %>
diff --git a/decidim-meetings/app/views/decidim/meetings/meetings/_meeting.html.erb b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting.html.erb index e79589613f174..cd8ef12bbe738 100644 --- a/decidim-meetings/app/views/decidim/meetings/meetings/_meeting.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting.html.erb @@ -1,8 +1,9 @@ -<%= render layout: "layouts/decidim/shared/layout_item", locals: nav_paths do %> +<%= render layout: "layouts/decidim/shared/layout_item" do %>

<%= present(meeting).title(links: true, html_escape: true ) %>

<%= cell "decidim/meetings/dates_and_map", meeting %> + <%= render partial: "meeting_poll_actions", locals: { mobile: true } %>
<%= cell "decidim/author", author_presenter_for(meeting.normalized_author), from: meeting, context_actions: nil, layout: :compact %> diff --git a/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_aside.html.erb b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_aside.html.erb index 1c7ae2d529ed5..8e9a2c828d07c 100644 --- a/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_aside.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_aside.html.erb @@ -1,5 +1,7 @@ +<%= render partial: "meeting_poll_actions" %> + <% if meeting.can_be_joined_by?(current_user) || meeting.on_different_platform? %> -
+
<%= cell "decidim/meetings/join_meeting_button", meeting, show_remaining_slots: true %>
<% end %> diff --git a/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_poll_actions.html.erb b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_poll_actions.html.erb new file mode 100644 index 0000000000000..90d8bfae5376b --- /dev/null +++ b/decidim-meetings/app/views/decidim/meetings/meetings/_meeting_poll_actions.html.erb @@ -0,0 +1,15 @@ +<% extra_classes = local_assigns.fetch(:mobile, false) ? " block md:hidden" : " hidden md:block" %> +<% if meeting.poll&.has_questions? %> +
+ <%= action_authorized_link_to :reply_poll, meeting_polls_answers_path(meeting), class: "button button__xl button__secondary w-full", data: { "redirect_url" => meeting_polls_answers_path(meeting) }, resource: meeting do %> + + <%= meeting.poll.has_open_questions? ? t("reply_poll", scope: "decidim.meetings.meetings.meeting") : t("view_poll", scope: "decidim.meetings.meetings.meeting") %> + + <% end %> + <% if !allowed_to?(:reply_poll, :meeting, meeting:) && allowed_to?(:update, :poll, meeting:) %> + <%= link_to admin_meeting_polls_answers_path(meeting), class: "button button__sm button__transparent-secondary w-full" do %> + <%= t("administrate", scope: "decidim.meetings.polls.answers.index") %> + <% end %> + <% end %> +
+<% end %> diff --git a/decidim-meetings/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb index 03d697942f5e6..8de24f50f2abd 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/answers/_multiple_option.html.erb @@ -2,16 +2,12 @@ <% question.answer_options.each_with_index do |answer_option, idx| %> <% choice = answer.choices.find { |choice| choice.decidim_answer_option_id == answer_option.id } if answer %> -
- <%= label_tag do %> - <%= check_box_tag "answer[choices][#{idx}][body]", - translated_attribute(answer_option.body), - choice.present?, disabled: %> + <%= label_tag "answer[choices][#{answer_option.id}][answer_option_id]", nil, class: "js-collection-input" do %> + <%= check_box_tag "answer[choices][#{answer_option.id}][answer_option_id]", + answer_option.id, + choice.present?, disabled: %> - <%= translated_attribute(answer_option.body) %> - - <%= hidden_field_tag "answer[choices][#{idx}][answer_option_id]", answer_option.id, disabled: %> - <% end %> -
+ <%= translated_attribute(answer_option.body) %> + <% end %> <% end %>
diff --git a/decidim-meetings/app/views/decidim/meetings/polls/answers/_single_option.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/answers/_single_option.html.erb index 9a87910774285..b9b1595ccbb92 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/answers/_single_option.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/answers/_single_option.html.erb @@ -3,17 +3,11 @@ <% question.answer_options.each_with_index do |answer_option, idx| %> <% choice_id = "#{field_id}_choices_#{idx}" %> - <%= label_tag "#{choice_id}_body" do %> - <%= radio_button_tag "answer[choices][#{question.id}][body]", - translated_attribute(answer_option.body), + <%= label_tag "#{choice_id}_answer_option" do %> + <%= radio_button_tag "answer[choices][#{question.id}][answer_option_id]", + answer_option.id, answer_option.id == choice.try(:decidim_answer_option_id), - id: "#{choice_id}_body", disabled: %> - + id: "#{choice_id}_answer_option", disabled: %> <%= translated_attribute(answer_option.body) %> - - <%= hidden_field_tag "answer[choices][#{question.id}][answer_option_id]", - answer_option.id, - id: "#{choice_id}_answer_option", - disabled: %> <% end %> <% end %> diff --git a/decidim-meetings/app/views/decidim/meetings/polls/answers/admin.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/answers/admin.html.erb new file mode 100644 index 0000000000000..e72b89ad5b57d --- /dev/null +++ b/decidim-meetings/app/views/decidim/meetings/polls/answers/admin.html.erb @@ -0,0 +1,34 @@ +<% add_decidim_meta_tags({ + title: present(meeting).title, + description: present(meeting).description, + url: meeting_url(meeting.id) + }) %> + +<%= append_javascript_pack_tag "decidim_meetings" %> +<%= append_stylesheet_pack_tag "decidim_meetings" %> +<%= append_javascript_pack_tag "decidim_forms" %> + +<% add_body_classes "meeting-poll__layout" %> + +<%= render layout: "layouts/decidim/shared/layout_center" do %> +
+ <%= link_to meeting_path(meeting), class: "button button__sm button__text md:button__text-secondary" do %> + <%= icon "arrow-left-line" %> + <%= t("back_to_meeting", scope: "decidim.meetings.polls.answers.index_admin") %> + <% end %> + + <%= action_authorized_link_to :reply_poll, meeting_polls_answers_path(meeting), class: "button button__sm button__secondary", data: { "redirect_url" => meeting_polls_answers_path(meeting) }, resource: meeting do %> + <%= t("view_poll", scope: "decidim.meetings.polls.answers.index_admin") %> + <% end %> +
+ +
+

+ <%= t("title", scope: "decidim.meetings.polls.answers.index_admin") %> +

+
+ +
+ <%= render partial: "decidim/meetings/polls/questions/index_admin", locals: { open_question: nil } %> +
+<% end %> diff --git a/decidim-meetings/app/views/decidim/meetings/polls/answers/index.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/answers/index.html.erb new file mode 100644 index 0000000000000..08c57d2284a14 --- /dev/null +++ b/decidim-meetings/app/views/decidim/meetings/polls/answers/index.html.erb @@ -0,0 +1,36 @@ +<% add_decidim_meta_tags({ + title: present(meeting).title, + description: present(meeting).description, + url: meeting_url(meeting.id) + }) %> + +<%= append_javascript_pack_tag "decidim_meetings" %> +<%= append_stylesheet_pack_tag "decidim_meetings" %> +<%= append_javascript_pack_tag "decidim_forms" %> + +<% add_body_classes "meeting-poll__layout" %> + +<%= render layout: "layouts/decidim/shared/layout_center" do %> +
+ <%= link_to meeting_path(meeting), class: "button button__sm button__text-secondary" do %> + <%= icon "arrow-left-line" %> + <%= t("back_to_meeting", scope: "decidim.meetings.polls.answers.index_admin") %> + <% end %> + + <% if admin_allowed_to?(:update, :poll, meeting: meeting, poll: poll) %> + <%= link_to admin_meeting_polls_answers_path(meeting), class: "button button__sm button__primary" do %> + <%= t("administrate", scope: "decidim.meetings.polls.answers.index") %> + <% end %> + <% end %> +
+ +
+

+ <%= t("title", scope: "decidim.meetings.polls.answers.index") %> +

+
+ +
+ <%= render partial: "decidim/meetings/polls/questions/index" %> +
+<% end %> diff --git a/decidim-meetings/app/views/decidim/meetings/polls/questions/_closed_question.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/questions/_closed_question.html.erb index 9d17a170e5951..c6d54634b0df4 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/questions/_closed_question.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/questions/_closed_question.html.erb @@ -1,7 +1,13 @@ -<%= t(".question_results") %> + + <%= t(".question") %> + <%= t(".question_results") %> +
-

<%= translated_attribute(question.body) %>

+

<%= translated_attribute(question.body) %>

+ " hidden> + <%= cell "decidim/announcement", t("announcement", scope: "decidim.meetings.polls.questions.closed_question"), callout_class: "warning" %> + <%= cell "decidim/meetings/question_responses", question %>
diff --git a/decidim-meetings/app/views/decidim/meetings/polls/questions/_index_admin.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/questions/_index_admin.html.erb index 4483b8becbeb4..9251299bc78a6 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/questions/_index_admin.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/questions/_index_admin.html.erb @@ -1,40 +1,43 @@ -
<%= t(".admin_dashboard") %>
- <% questionnaire.questions.includes([:questionnaire]).each do |question| %>
> - <%= t(".question") %> + + <%= t(".question") %> + <%= t(question.status, scope: "decidim.meetings.polls.questions.index_admin.statuses") %> + <%= form_tag(meeting_polls_question_path(meeting, question), method: :patch, remote: true) do %> -
-

<%= translated_attribute(question.body) %>

+

<%= translated_attribute(question.body) %>

- <%= link_to t(".edit"), Decidim::EngineRouter.admin_proxy(meeting.component).edit_meeting_poll_path(meeting), target: "_blank", rel: "noopener noreferrer" %> + <% if question.unpublished? %> + <%= link_to( + t(".edit"), + Decidim::EngineRouter.admin_proxy(meeting.component).edit_meeting_poll_path(meeting), + class: "button button__xs button__secondary mr-auto mt-2", + target: "_blank", + rel: "noopener noreferrer" + ) %> + <% end %> +
-
<%= t(".question") %>
-
- <% if question.unpublished? %> - - <% else %> -
<%= t(".sent") %>
-
<%= pluralize(question.answers_count, t(".received_answer"), t(".received_answers")) %>
- <% end %> -
+
<%= t(".question") %><%= " · " + t(".sent") if question.published? %>
+ + <% if question.unpublished? %> + + <% else %> +
<%= pluralize(question.answers_count, t(".received_answer"), t(".received_answers")) %>
+ <% end %>
+
-
<%= t(".results") %>
+
<%= t(".results") %>
+ + +
<% unless question.unpublished? %> <%= cell "decidim/meetings/question_responses", question %> <% end %> - - <% if question.unpublished? %> - - <% elsif question.published? %> - - <% elsif question.closed? %> -
<%= t(".sent") %>
- <% end %>
diff --git a/decidim-meetings/app/views/decidim/meetings/polls/questions/_published_question.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/questions/_published_question.html.erb index 288b6a11c120d..ac1e46df11343 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/questions/_published_question.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/questions/_published_question.html.erb @@ -1,11 +1,15 @@ -<%= t(".question") %> + + <%= t(".question") %> +
-

<%= translated_attribute(question.body) %>

<% @form = form || Decidim::Meetings::AnswerForm.new(question_id: question.id, current_user:) %> - <%= decidim_form_for(@form, url: meeting_polls_answers_path(meeting), method: :post, remote: true, html: { class: "form-defaults mt-4" }, data: { "safe-path" => meeting_live_event_path(meeting) }) do |form| %> -
+ +

<%= @form.label %>

+ + <%= decidim_form_for(@form, url: meeting_polls_answers_path(meeting), method: :post, remote: true, html: { class: "form-defaults" }, data: { "safe-path" => meeting_live_event_path(meeting) }) do |form| %> +

<%= t(".max_choices_alert") %>

<%= render partial: "decidim/meetings/polls/answers/#{question.question_type}", locals: { answer: @form.answer, question:, answer_form: form, disabled: question.answered_by?(current_user), field_id: question.id } %> @@ -15,13 +19,12 @@ <% @form.errors.full_messages.each do |msg| %> <%= msg %> <% end %> + + <% if question.answered_by?(current_user) %> + <%= cell("decidim/announcement", t(".question_replied"), callout_class: "success" ) %> + <% else %> + + <% end %>
- <% if question.answered_by?(current_user) %> - <%= cell("decidim/announcement", t(".question_replied"), callout_class: "success" ) %> - <% else %> -
- -
- <% end %> <% end %>
diff --git a/decidim-meetings/app/views/decidim/meetings/polls/questions/_question.html.erb b/decidim-meetings/app/views/decidim/meetings/polls/questions/_question.html.erb index 0ae73574f3d21..82b940203d318 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/questions/_question.html.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/questions/_question.html.erb @@ -1,4 +1,4 @@ -
> +
> <% if question.published? %> <%= render partial: "decidim/meetings/polls/questions/published_question", locals: { question:, form: local_assigns.fetch(:form, nil) } %> <% elsif question.closed? %> diff --git a/decidim-meetings/app/views/decidim/meetings/polls/questions/index.js.erb b/decidim-meetings/app/views/decidim/meetings/polls/questions/index.js.erb index c0e5e2e65b34e..77d86677794b5 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/questions/index.js.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/questions/index.js.erb @@ -1,5 +1,5 @@ -var $aside = $("#meeting-poll-aside"); +var $meetingPoll = $("[data-decidim-meetings-poll]"); -if($aside.length){ - $aside.html('<%= j(render partial: "decidim/meetings/polls/questions/index").strip.html_safe %>'); +if($meetingPoll.length){ + $meetingPoll.html('<%= j(render partial: "decidim/meetings/polls/questions/index").strip.html_safe %>'); } diff --git a/decidim-meetings/app/views/decidim/meetings/polls/questions/index_admin.js.erb b/decidim-meetings/app/views/decidim/meetings/polls/questions/index_admin.js.erb index 701aec97f83a7..f90335453dc52 100644 --- a/decidim-meetings/app/views/decidim/meetings/polls/questions/index_admin.js.erb +++ b/decidim-meetings/app/views/decidim/meetings/polls/questions/index_admin.js.erb @@ -1,5 +1,5 @@ -var $aside = $("#admin-meeting-poll-aside"); +var $adminMeetingPoll = $("[data-decidim-admin-meetings-poll]"); -if($aside.length){ - $aside.html('<%= j(render partial: "decidim/meetings/polls/questions/index_admin", locals: { open_question: }).strip.html_safe %>'); +if($adminMeetingPoll.length){ + $adminMeetingPoll.html('<%= j(render partial: "decidim/meetings/polls/questions/index_admin", locals: { open_question: }).strip.html_safe %>'); } diff --git a/decidim-meetings/config/locales/ar.yml b/decidim-meetings/config/locales/ar.yml index f04fb05b68c70..d054a107720f2 100644 --- a/decidim-meetings/config/locales/ar.yml +++ b/decidim-meetings/config/locales/ar.yml @@ -383,16 +383,13 @@ ar: iframe_embed_type: embed_in_meeting_page: تضمين في صفحة الاجتماع none: بلا - open_in_live_event_page: فتح في صفحة الحدث المباشر (مع استطلاعات الرأي الاختيارية) open_in_new_tab: فتح عنوان الرابط URL في تبويب جديد last_activity: meeting_updated: 'تم تحديث الاجتماع:' new_meeting: 'اجتماع جديد:' layouts: live_event: - administrate: إدارة close: إغلاق - questions: الأسئلة mailer: invite_join_meeting_mailer: invite: @@ -529,12 +526,9 @@ ar: title: عنوان polls: questions: - closed_question: - question_results: نتائج السؤال index: empty_questions: خلال هذا الاجتماع، سيتم إرسال بعض الأسئلة وسوف تتمكن من الإجابة عليها. سيتم عرضها هنا. index_admin: - admin_dashboard: لوحة المدراء edit: تحرير في لوحة المدراء question: سؤال received_answer: الإجابة المتلقاة diff --git a/decidim-meetings/config/locales/bg.yml b/decidim-meetings/config/locales/bg.yml index b089c458af434..462d128085827 100644 --- a/decidim-meetings/config/locales/bg.yml +++ b/decidim-meetings/config/locales/bg.yml @@ -1,8 +1,690 @@ bg: + activemodel: + attributes: + close_meeting: + attendees_count: Брой на присъстващите + attending_organizations: Списък на присъствалите организации + audio_url: URL адрес на аудиото + closing_report: Минути + closing_visible: Е видимо + contributions_count: Брой приноси + proposal_ids: Предложения, създадени по време на срещата + video_url: Видео URL + meeting: + address: Адрес + available_slots: Налични места за тази среща + customize_registration_email: Персонализирайте имейла за регистрация + decidim_category_id: Категория + decidim_scope_id: Обхват + decidim_user_group_id: Потребителскa групa + description: Описание + end_time: Крайно време + id: ID + iframe_access_level: Ниво на достъп до iframe + iframe_embed_type: Iframe вграден шрифт + iframe_embed_type_html: Само няколко услуги позволяват „Вграждане в страница за среща“ или „Отваряне в страница за събитие на живо“. Имайте предвид, че с опцията „Вграждане в страницата на срещата“ на мобилни телефони, тъй като екранът наследява различни измерения, той всъщност ще работи като „Отваряне в страница за събитие на живо“. + location: Местоположение + location_hints: Подсказки за местоположението + online_meeting_url: URL адрес на онлайн среща + organizer_gid: Създаване като + organizer_id: Организатор + private_meeting: Частна среща + registration_email_custom_content: Регистрационен имейл с персонализирано съдържание + registration_form_enabled: Формулярът за регистрация е активиран + registration_terms: Условия за регистрация + registration_type: Тип регистрация + registration_url: URL за регистрация + registrations_enabled: Регистрациите са активирани + reserved_slots: Запазени места за тази среща + start_time: Начален час + title: Заглавие + transparent: Прозрачно + type_of_meeting: Тип + meeting_agenda: + title: Заглавие + visible: Видимо + meeting_agenda_items: + description: Описание + duration: Продължителност + title: Заглавие + meeting_registration_invite: + email: Имейл + name: Име + validate_registration_code: + code: Код + errors: + models: + meeting: + attributes: + iframe_embed_type: + not_embeddable: Този URL адрес не може да бъде вграден в страница за среща или събитие на живо. + online_meeting_url: + url_format: Трябва да е валиден URL + meeting_agenda: + attributes: + base: + too_many_minutes: Продължителността на точките надвишава продължителността на срещата с(ъс) %{count} минути. + too_many_minutes_child: Продължителността на подточките надвишава продължителността на точката от дневния ред „%{parent_title}“ с(ъс) %{count} минути. + meeting_registration_invite: + attributes: + email: + already_invited: На този имейл вече е изпратена покана. + models: + decidim/meetings/close_meeting_event: Срещата е затворена + decidim/meetings/create_meeting_event: Среща + decidim/meetings/meeting_registrations_enabled_event: Регистрациите са активирани + decidim/meetings/meeting_registrations_over_percentage_event: Ограничение на регистрациите + decidim/meetings/upcoming_meeting_event: Предстояща среща + decidim/meetings/update_meeting_event: Срещата е актуализирана + activerecord: + models: + decidim/meetings/meeting: + one: Среща + other: Срещи + decidim/meetings/minutes: + one: Минута + other: Минути + decidim/meetings/registration: + one: Регистрация + other: Регистрации decidim: + admin: + filters: + accepted_at_not_null: + label: Прието + values: + 'false': Не се приема + 'true': Прието + meetings: + category_id_eq: + label: Категория + closed_at_present: + label: Състояние + values: + 'false': Отворен + 'true': Затворен + is_upcoming_true: + label: Дата + values: + 'false': Минали + 'true': Предстоящо + scope_id_eq: + label: Обхват + with_any_origin: + label: Произход + values: + official: Официални + participants: Участник + user_group: Потребителски групи + with_any_type: + label: Тип на срещата + values: + hybrid: Хибрид + in_person: Лично + online: Онлайн + rejected_at_not_null: + label: Отхвърлено + values: + 'false': Не е отхвърлено + 'true': Отхвърлено + search_placeholder: + user_name_or_user_email_cont: Търси по име или имейл + sent_at_not_null: + label: Изпратено + values: + 'false': Не е изпратено + 'true': Изпратено + meeting_copies: + create: + error: Възникна проблем при дублирането на тази среща. + success: Срещата беше дублирана успешно. + new: + copy: Копиране + title: Дублиране на срещата + components: + meetings: + actions: + comment: Коментар + join: Присъединяване + reply_poll: Отговор на анкета + name: Срещи + settings: + global: + announcement: Обявление + comments_enabled: Коментарите са активирани + comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) + creation_enabled_for_participants: Участниците могат да създават срещи + default_registration_terms: Условия за регистрация по подразбиране + enable_pads_creation: Активирай създаване на бележки + maps_enabled: Картите са активирани + registration_code_enabled: Регистрационният код е активиран + resources_permissions_enabled: Разрешенията за действия могат да се задават за всяка среща + scope_id: Обхват + scopes_enabled: Обхватите са активирани + terms_and_conditions_url_for_meeting_creators: URL адрес за правила и условия за създатели на срещи + step: + announcement: Обявление + comments_blocked: Коментарите са блокирани + creation_enabled_for_participants: Създаването на срещи от участници е разрешено + creation_enabled_for_user_groups: Създаването на срещи от потребителски групи е разрешено + events: + meetings: + meeting_closed: + affected_user: + email_intro: 'Срещата Ви „%{resource_title}“ беше затворена. Можете да прочетете заключенията на страницата за нея:' + email_outro: Получавате това известие, защото организирахте срещата „%{resource_title}“. + email_subject: Срещата „%{resource_title}“ беше затворена + notification_title: Срещата %{resource_title} беше затворена. + follower: + email_intro: 'Срещата „%{resource_title}“ беше затворена. Можете да прочетете заключенията на страницата за нея:' + email_outro: Получавате това известие, защото следвате срещата „%{resource_title}“. Можете да прекратите следването от предходната връзка. + email_subject: Срещата „%{resource_title}“ беше затворена + notification_title: Срещата %{resource_title} беше затворена. + meeting_created: + button_text: Регистрирайте се за срещата + email_intro: Срещата „%{resource_title}“ беше добавена към пространството за участие „%{participatory_space_title}“, което следвате. + email_outro: Получавате това известие, защото следвате "%{participatory_space_title}". Може да премахнете следването чрез предходния линк. + email_subject: Беше добавена нова среща в(ъв) %{participatory_space_title} + notification_title: Срещата %{resource_title} беше добавена в(ъв) %{participatory_space_title} + meeting_registration_confirmed: + notification_title: Регистрацията Ви за срещата %{resource_title} беше потвърдена. Регистрационният Ви код е %{registration_code}. + meeting_registrations_over_percentage: + email_intro: Предоставените места за срещата „%{resource_title}“ са над %{percentage} %. + email_outro: Получавате това известие, защото сте администратор на пространството за участие на срещата. + email_subject: Предоставените места за срещата „%{resource_title}“ са над %{percentage} % + notification_title: Предоставените места за срещата %{resource_title} са над %{percentage} %. + meeting_updated: + email_intro: 'Срещата „%{resource_title}“ беше актуализирана. Можете да прочетете новата версия на страницата ѝ:' + email_outro: Получавате това известие, защото следвате срещата „%{resource_title}“. Можете да прекратите следването от предходната връзка. + email_subject: Срещата „%{resource_title}“ беше актуализирана + notification_title: Срещата %{resource_title} беше актуализирана. + registration_code_validated: + email_intro: Регистрационният Ви код „{registration_code}“ за срещата „%{resource_title}“ беше валидиран. + email_outro: Получавате това известие, защото регистрационният Ви код за срещата „%{resource_title}“ беше валидиран. + email_subject: Регистрационният Ви код „{registration_code}“ за срещата „%{resource_title}“ беше валидиран + notification_title: Регистрационният Ви код „%{registration_code}“ за срещата %{resource_title} беше валидиран. + registrations_enabled: + email_intro: 'Приемат се регистрации за срещата „%{resource_title}“. Можете да се регистрирате на страницата ѝ:' + email_outro: Получавате това известие, защото следвате срещата „%{resource_title}“. Можете да прекратите следването от предходната връзка. + email_subject: Приемат се регистрации за срещата „%{resource_title}“. + notification_title: Приемат се регистрации за срещата %{resource_title}. + upcoming_meeting: + email_intro: Срещата „%{resource_title}“ ще започне след по-малко от 48 ч. + email_outro: Получавате това известие, защото следвате срещата „%{resource_title}“. Можете да прекратите следването от предходната връзка. + email_subject: Срещата „%{resource_title}“ ще започне след по-малко от 48 ч. + notification_title: Срещата %{resource_title} ще започне след по-малко от 48 ч. + forms: + meetings: + attendees_count_help_text: Не забравяйте да включите общия брой присъстващи на вашата среща, независимо дали те присъстват лично, онлайн или хибридно. + gamification: + badges: + attended_meetings: + conditions: + - Регистрирайте се за срещите, които искате да посетите + description: Тази значка се предоставя, когато посетите няколко срещи на живо. + description_another: Този участник е посетил %{score} срещи. + description_own: Посетили сте %{score} срещи. + name: Посетени срещи + next_level_in: Посетете още %{score} срещи, за да достигнете следващото ниво! + unearned_another: Този участник все още не е присъствал на никоя среща. + unearned_own: Все още не сте присъствали на никоя среща. meetings: actions: + agenda: Дневен ред + attachment_collections: Папки + attachments: Прикачени файлове + close: Затвори + confirm_destroy: Наистина ли искате да изтриете тази среща? + destroy: Изтрий + edit: Редактирай invalid_destroy: proposals_count: one: 'Срещата не може да бъде премахната, понеже има %{count} участник свързан с нея:' other: 'Срещата не може да бъде премахната, понеже има %{count} участника свързани с нея:' + manage_poll: Управление на анкетата + new_meeting: Нова среща + preview: Преглед + registrations: Регистрации + title: Активности + admin: + agenda: + agenda_item: + add_agenda_item_child: Добавяне на подточка от дневния ред + agenda_item: Точка от дневния ред + agenda_item_children: Подточки от дневния ред + down: Долу + remove: Премахни + up: Горе + agenda_item_child: + agenda_item_child: Подточка от дневния ред + down: Долу + remove: Премахни + up: Горе + create: + invalid: Възникна проблем при създаването на този дневен ред. + success: Дневният ред беше създаден успешно. + edit: + title: Редактиране на дневния ред + update: Актуализация + form: + add_agenda_item: Добавяне на точка от дневния ред + agenda_items: Точки от дневния ред + end_date: Крайна дата + start_date: Начална дата + new: + create: Създаване + title: Нов дневен ред + update: + invalid: Възникна проблем при актуализирането на този дневен ред. + success: Дневният ред беше актуализиран успешно. + exports: + answers: Отговори + meeting_comments: Коментари + meetings: Срещи + registrations: + invite_join_meeting_mailer: + invite: + decline: Откажи поканата + invited_you_to_join_a_meeting: "%{invited_by} Ви покани да се присъедините към среща в(ъв) %{application}. Можете да откажете или да приемете чрез връзките по-долу." + join: Присъединяване към срещата „%{meeting_title}“ + invites: + create: + error: Възникна проблем при изпращането на покана на участника да се присъедини към срещата. + success: Участникът беше поканен успешно да се присъедини към срещата. + form: + attendee_type: Тип присъстващ + existing_user: Съществуващ участник + invite: Покани + invite_explanation: Участникът ще бъде поканен да се присъедини към срещата, както и към организацията. + non_user: Несъществуващ участник + select_user: Избор на участник + index: + invite_attendee: Изпращане на покана на участника + invites: Покани + registrations_disabled: Не можете да поканите участник, защото регистрациите са изключени. + meeting_closes: + edit: + close: Затвори + title: Затваряне на срещата + meetings: + close: + invalid: Възникна проблем при закриването на тази среща. + success: Срещата беше закрита успешно. + create: + invalid: Възникна проблем при създаването на тази среща. + success: Срещата е създадена успешно. Забележете, че това все още не е публикувано, трябва да го публикувате ръчно. + destroy: + invalid: + proposals_count: + one: Срещата не може да бъде премахната, понеже има %{count} участник свързан с нея. + other: Срещата не може да бъде премахната, понеже има %{count} участника свързани с нея. + success: Срещата беше изтрита успешно + edit: + title: Редактиране на срещата + update: Актуализация + form: + address_help: 'Адрес: използва се от инструмента за геокодиране за намиране на местоположението' + disclaimer: 'Отказ от отговорност: Използвайки външна система за регистрация, вие сте наясно, че организаторите на %{organization} не носят отговорност за данните, предоставени от потребителите на външната услуга.' + iframe_embed_type_html: 'Само няколко услуги позволяват вграждане в среща или събитие на живо от следните домейни: %{domains}' + location_help: 'Местоположение: съобщение за потребителите, подсказващо мястото на срещата' + location_hints_help: 'Съвети за местоположение: допълнителна информация. Пример: етажът на сградата, ако е лична среща, или паролата за среща, ако е онлайн среща с ограничен достъп.' + online_meeting_url_help: 'Връзка: позволява на участниците да се свързват директно с вашата среща' + registration_url_help: 'Линк: позволете на участниците да отидат на външната услуга, която използвате за регистрации' + select_a_meeting_type: Моля, изберете тип среща + select_a_registration_type: Моля, изберете тип регистрация + select_an_iframe_access_level: Моля, изберете ниво на достъп до iframe + index: + title: Срещи + new: + create: Създаване + title: Създаване на среща + publish: + invalid: Възникна проблем при публикуването на тази среща. + success: Срещата беше публикувана успешно. + service: + description: Описание + down: Долу + remove: Премахни + service: Услуга + title: Заглавие + up: Горе + services: + add_service: Добавяне на услуга + services: Услуги + unpublish: + invalid: Възникна проблем при отмяната на публикуването на тази среща. + success: Публикуването на срещата беше успешно отменено. + update: + invalid: Възникна проблем при актуализирането на тази среща. + success: Срещата беше актуализирана успешно. + meetings_poll: + form: + title: Редактиране на анкетния въпросник за %{questionnaire_for} + update: + invalid: Възникна проблем при актуализирането на тази анкета за среща. + success: Анкетата за среща бе актуализирана успешно. + poll: + form: + announcement_html: + - Когато даден въпрос получи отговори или бъде публикуван/затворен, той вече не може да бъде редактиран. + - Можете да добавите въпрос по всяко време. + - Анкетата ще бъде затворена, когато резултатите от всички създадени въпроси бъдат публикувани. + - Посетете страницата за администриране на анкетата, за да изпратите въпроси и да публикувате резултати. + registrations: + edit: + save: Запази + validate: Потвърди + validate_registration_code: Валидиране на регистрационния код + form: + available_slots_help: Оставете 0, ако разполагате с неограничен брой места. + invites: Покани + recommendation_message: От съображения за поверителност Ви препоръчваме да изтриете този формуляр за участие, когато вече нямате нужда от него. По подразбиране срокът е 3 месеца след приключването на срещата. + registration_email_help: Този текст ще се появи в средата на имейла за потвърждение на регистрацията. Точно след регистрационния код. + registration_form: Формуляр за регистрация + registrations_count: + one: Осъществена е %{count} регистрация. + other: Осъществени са %{count} регистрации. + reserved_slots_help: Оставете 0, ако не разполагате с резервирани места. + reserved_slots_less_than: Броят трябва да е по-малък или равен на %{count} + title: Регистрации + update: + invalid: Възникна проблем при запазването на настройките за регистрация. + success: Настройките за регистрация бяха запазени успешно. + validate_registration_code: + invalid: Регистрационният код е невалиден. + success: Регистрационният код беше валидиран успешно. + admin_log: + invite: + create: "%{user_name} покани %{attendee_name} да се присъедини към срещата %{resource_name} в пространството %{space_name}" + deleted: "%{user_name} отмени поканата на %{attendee_name} да се присъедини към срещата %{resource_name} в пространството %{space_name}" + update: "%{user_name} покани %{attendee_name} да се присъедини към срещата %{resource_name} в пространството %{space_name}" + meeting: + close: "%{user_name} затвори срещата %{resource_name} в пространството %{space_name}" + create: "%{user_name} създаде срещата %{resource_name} в пространството %{space_name}" + delete: "%{user_name} изтри срещата %{resource_name} в пространството %{space_name}" + export_registrations: "%{user_name} експортира регистрациите за срещата %{resource_name} в пространството %{space_name}" + update: "%{user_name} актуализира срещата %{resource_name} в пространството %{space_name}" + value_types: + organizer_presenter: + not_found: 'Организаторът не беше намерен в базата данни (Идент. №: %{id})' + questionnaire: + update: "%{user_name} актуализира въпросника за срещата %{meeting_name}" + application_helper: + filter_category_values: + all: Всички + filter_meeting_space_values: + all: Всички + calendar: + meeting_to_event: + read_more: Прочетете повече за тази среща + calendar_modal: + calendar_url: URL на календар + copy_calendar_url: Копиране + copy_calendar_url_clarification: Копирайте URL адреса на календара в клипборда + copy_calendar_url_copied: Копирано! + copy_calendar_url_description: Можете да видите всички публикувани срещи във вашето календарно приложение или доставчик. Копирайте и поставете този URL адрес в календара си, като използвате опцията „Добавяне на нов календар от URL адрес“. + copy_calendar_url_explanation: Моля, обърнете внимание, че експортирате селекция от срещи, тъй като има активни филтри. Ако искате да ги експортирате всички, първо нулирайте всички филтри. + copy_calendar_url_message: URL адресът бе успешно копиран в клипборда. + export_calendar: Експортиране на календара + close_meeting_reminder_mailer: + close_meeting_reminder: + body: Срещата "%{meeting_title}" предстои да бъде затворена. Моля, добавете отчет за срещата, като използвате бутона "Затвори срещата". + greetings: Поздрав,
%{organization_name}
%{organization_url} + hello: Здравейте %{username}, + subject: Вече можете да затворите срещата „%{meeting_title}“ с доклад + conference_venues: Места за провеждане на конференции + content_blocks: + upcoming_meetings: + name: Предстоящи срещи + directory: + meetings: + index: + meetings: Срещи + space_type: Пространство за участници + iframe_access_level: + all: Всички посетители + registered: Регистрирани участници в тази среща + signed_in: Само регистрирани участници + iframe_embed_type: + embed_in_meeting_page: Вграждане в страницата на срещата + none: Няма + open_in_live_event_page: Отваряне в страницата на събитието на живо + open_in_new_tab: Отваряне в страницата на събитието на живо + last_activity: + meeting_updated: 'Срещата е актуализирана:' + new_meeting: 'Нова среща:' + layouts: + live_event: + close: затваряне + mailer: + invite_join_meeting_mailer: + invite: + subject: Покана за присъединяване към среща + registration_mailer: + confirmation: + subject: Регистрацията Ви за срещата е потвърдена + meeting: + not_allowed: Нямате разрешение да разглеждате тази среща. + meeting_closes: + edit: + back: Назад + close: Затваряне на срещата + title: Затваряне на срещата + meetings: + calendar_modal: + add_to_calendar: Добавяне в календара + apple: Добавете към календара на Apple + full_details_html: За пълни подробности посетете %{link} + google: Добави към Google календар + outlook: Добавяне към календара на Outlook + count: + meetings_count: + one: "%{count} среща" + other: "%{count} срещи" + create: + invalid: Възникна проблем при създаването на тази среща. + success: Създадохте успешно срещата. + edit: + back: Назад + title: Редактиране на срещата Ви + update: Актуализация + filters: + activity: Моята дейност + all: Всички + category: Категория + date: Дата + date_values: + all: Всички + past: Минали + upcoming: Предстоящо + my_meetings: Моите срещи + origin: Произход + origin_values: + all: Всички + official: Официални + participants: Участници + user_group: Групи + search: Търсене + type: Тип + type_values: + all: Всички + hybrid: Хибрид + in_person: Лично + online: Онлайн + form: + address_help: 'Адрес: използва се от инструмента за геокодиране за намиране на местоположението' + available_slots_help: Оставете 0, ако разполагате с неограничен брой места + create_as: Създаване на среща като + disclaimer: 'Отказ от отговорност: Използвайки външна система за регистрация, вие сте наясно, че организаторите на %{organization} не носят отговорност за данните, предоставени от потребителите на външната услуга.' + iframe_embed_type_html: 'Само няколко услуги позволяват вграждане в среща или събитие на живо от следните домейни: %{domains}' + location_help: 'Местоположение: съобщение за потребителите, подсказващо мястото на срещата' + location_hints_help: 'Съвети за местоположение: допълнителна информация. Пример: етажът на сградата, ако е лична среща, или паролата за среща, ако е онлайн среща с ограничен достъп.' + online_meeting_url_help: 'Връзка: позволява на участниците да се свързват директно с вашата среща' + registration_url_help: 'Линк: позволете на участниците да отидат на външната услуга, която използвате за регистрации' + select_a_category: Моля, изберете категория + select_a_meeting_type: Моля, изберете тип среща + select_a_registration_type: Моля, изберете тип регистрация + select_an_iframe_access_level: Моля, изберете ниво на достъп до iframe + index: + click_here: Виж всички срещи + new_meeting: Нова среща + see_all: Виж всички срещи + see_all_withdrawn: Вижте всички оттеглени срещи + text_banner: Разглеждате списъка с оттеглени от авторите срещи. %{go_back_link}. + meeting: + close_meeting: Затваряне на срещата + edit_close_meeting: Редактиране на отчета за срещата + edit_meeting: Редактиране на срещата + join_meeting: Присъединяване към срещата + reply_poll: Отговор на анкета + view_poll: Вижте анкетата + meetings: + no_meetings_warning: Няма срещи, които отговарят на вашите критерии за търсене или няма насрочена среща. + upcoming_meetings_warning: Понастоящем няма насрочени срещи, но тук можете да намерите изброени всички минали срещи. + new: + back: Назад + create: Създаване + title: Създайте среща + registration_confirm: + cancel: Отказ + confirm: Потвърждаване + show: + attendees: Брой участници + contributions: Брой приноси + join: Регистър + leave: Отменете регистрацията си + leave_confirmation: Сигурни ли сте, че искате да отмените регистрацията си за тази среща? + link_available_soon: Връзката ще бъде достъпна скоро + link_closed: Връзката за присъединяване към срещата ще бъде достъпна няколко минути преди нейното начало + live_event: Тази среща се провежда в момента + meeting_minutes: Протокол за срещата + micro_camera_permissions_warning: Когато щракнете върху бутона по-долу, ще бъдете помолени за разрешения за микрофон и/или камера и ще се присъедините към видеоконференцията + no_slots_available: Няма свободни места + organizations: Присъстващи организации + registration_code_help_text: Вашият регистрационен код + registration_state: + validated: ВАЛИДИРАНО + validation_pending: ОЧАКВА ВАЛИДИРАНЕ + remaining_slots: + one: "%{count} оставащо място" + other: "%{count} оставащи места" + visit_finished: Вижте миналата среща + withdraw_btn_hint: Можете да отмените срещата си, ако промените решението си. Срещата не се изтрива, тя ще се появи в списъка с оттеглени срещи. + withdraw_confirmation_html: Сигурни ли сте, че искате да отмените тази среща?

Това действие не може да бъде отменено! + withdraw_meeting: Оттегляне на срещата + update: + invalid: Възникна проблем при актуализирането на срещата. + success: Актуализирахте успешно срещата. + models: + invite: + fields: + email: Имейл + name: Име + sent_at: Изпратено в + status: Статус + status: + accepted: Приета (%{at}) + rejected: Отхвърлена (%{at}) + sent: Изпратено + meeting: + fields: + closed: Затворен + end_time: Крайна дата + id: ID + map: Карта + official_meeting: Официална среща + start_time: Начална дата + title: Заглавие + polls: + answers: + index: + administrate: Администриране + title: Анкета + index_admin: + back_to_meeting: Назад към срещата + title: Администриране на анкета + view_poll: Вижте анкетата + questions: + closed_question: + announcement: Отговорите на този въпрос са затворени. + question: Въпрос + question_results: Резултати + index: + empty_questions: По време на тази среща ще бъдат изпратени някои въпроси и вие ще можете да отговорите на тях. Те ще бъдат показани тук. + index_admin: + edit: Редактирайте в админ панела + question: Въпрос + received_answer: получен отговор + received_answers: получени отговори + results: Резултати + send: Изпрати + sent: Изпратено + statuses: + closed: Резултатите са изпратени (затворено) + published: Изпратено (отворено) + unpublished: Чака изпращане + published_question: + max_choices_alert: Избрани са прекалено много варианти + question: Въпрос + question_replied: Въпросът е отговорен + reply_question: Отговорете на въпроса + public_participants_list: + attending_organizations: Организации + attending_participants: Участници + hidden_participants_count: + one: и още %{count} човек + other: и още %{count} души + read_more: "(прочетете повече)" + registration_mailer: + confirmation: + confirmed_html: Регистрацията Ви за срещата %{title} беше потвърдена. + details: Ще намерите подробности за срещата в прикачения файл. + registration_code: Вашият регистрационен код е %{code}. + registration_type: + on_different_platform: На различна платформа + on_this_platform: На тази платформа + registration_disabled: Регистрацията е деактивирана + registrations: + create: + invalid: Имаше проблем с присъединяването към тази среща. + success: Присъединихте се към срещата успешно. Тъй като сте се регистрирали за тази среща, ще бъдете уведомени, ако има актуализации за нея. + decline_invitation: + invalid: Възникна проблем при отхвърлянето на поканата. + success: Отхвърлихте успешно поканата. + destroy: + invalid: Възникна проблем при напускането на тази среща. + success: Напуснахте успешно срещата. + type_of_meeting: + hybrid: Хибрид + in_person: Лично + online: Онлайн + types: + private_meeting: Частна среща + transparent: Прозрачно + withdraw: Оттеглено + withdraw: + error: Възникна грешка при оттеглянето на срещата. + success: Срещата е оттеглена успешно. + metrics: + meetings: + description: Брой създадени срещи + object: срещи + title: Срещи + participatory_spaces: + highlighted_meetings: + past_meetings: Минали срещи + see_all: Виж всички срещи + upcoming_meetings: Предстоящи срещи + resource_links: + meetings_through_proposals: + meeting_result: 'Свързани резултати:' + result_meeting: 'Свързани срещи:' + proposals_from_meeting: + meeting_proposal: 'Свързани предложения:' + proposal_meeting: 'Свързани срещи:' + statistics: + meetings_count: Срещи + devise: + mailer: + join_meeting: + subject: Покана за присъединяване към среща diff --git a/decidim-meetings/config/locales/ca.yml b/decidim-meetings/config/locales/ca.yml index 72b250cb8ecec..6c83962ad479b 100644 --- a/decidim-meetings/config/locales/ca.yml +++ b/decidim-meetings/config/locales/ca.yml @@ -146,6 +146,7 @@ ca: actions: comment: Comentar join: Inscriu-t'hi + reply_poll: Respondre el sondeig/consulta en directe name: Trobades settings: global: @@ -362,6 +363,13 @@ ca: update: invalid: Hi ha hagut un problema en actualitzar aquesta enquesta. success: Enquesta actualitzada correctament. + poll: + form: + announcement_html: + - Quan una pregunta rep respostes o està publicada/tancada, ja no es pot seguir editant. + - Pots afegir una pregunta en qualsevol moment. + - El sondeig/la consulta en directe es tancarà quan es publiquin els resultats de totes les preguntes creades. + - Visita la pàgina d'administració d'enquestes per enviar preguntes i publicar resultats. registrations: edit: save: Desa @@ -440,16 +448,14 @@ ca: iframe_embed_type: embed_in_meeting_page: Incrustar a la pàgina de la trobada none: Cap - open_in_live_event_page: Obrir a la pàgina de l'esdeveniment en directe (amb opció d'enquestes) + open_in_live_event_page: Obrir a la pàgina de l'esdeveniment en directe open_in_new_tab: Obrir en una nova pestanya last_activity: meeting_updated: 'Trobada actualitzada:' new_meeting: 'Nova trobada:' layouts: live_event: - administrate: Administrar close: tancar - questions: Preguntes mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ ca: edit_close_meeting: Editar l'informe de la trobada edit_meeting: Editar la trobada join_meeting: Unir-se a la trobada + reply_poll: Respondre sondeig/consulta + view_poll: Veure sondeig/consulta meetings: no_meetings_warning: No hi ha trobades que coincideixin amb la teva cerca o no hi ha cap trobada programada. upcoming_meetings_warning: Actualment no hi ha trobades programades, però pots veure les anteriors. @@ -588,13 +596,22 @@ ca: start_time: Data d'inici title: Títol polls: + answers: + index: + administrate: Administrar + title: Sondeig/Consulta en directe + index_admin: + back_to_meeting: Tornar a la trobada + title: Administrar sondeig/consulta en directe + view_poll: Veure sondeig/consulta questions: closed_question: - question_results: Resultats de la pregunta + announcement: S'han tancat les respostes a aquesta pregunta. + question: Pregunta + question_results: Resultats index: empty_questions: Al llarg d'aquesta trobada, s'enviaran algunes preguntes i podràs respondre-les. Es mostraran aquí. index_admin: - admin_dashboard: Panell d'administració edit: Editar al panell d'administració question: Pregunta received_answer: resposta rebuda @@ -602,6 +619,10 @@ ca: results: Resultats send: Enviar sent: Enviades + statuses: + closed: Resultats enviats (tancats) + published: Enviada (oberta) + unpublished: Pendent d'enviar published_question: max_choices_alert: Hi ha massa opcions seleccionades question: Pregunta diff --git a/decidim-meetings/config/locales/cs.yml b/decidim-meetings/config/locales/cs.yml index e3900a40906f0..673891500f366 100644 --- a/decidim-meetings/config/locales/cs.yml +++ b/decidim-meetings/config/locales/cs.yml @@ -452,16 +452,13 @@ cs: iframe_embed_type: embed_in_meeting_page: Vložit do stránky schůzky none: Žádný - open_in_live_event_page: Otevřít na stránce živé události (s volitelnými anketami) open_in_new_tab: Otevřít URL v nové kartě last_activity: meeting_updated: 'Schůze aktualizována:' new_meeting: 'Nová schůze:' layouts: live_event: - administrate: Spravovat close: zavřít - questions: Otázky mailer: invite_join_meeting_mailer: invite: @@ -605,12 +602,9 @@ cs: title: Titul polls: questions: - closed_question: - question_results: Výsledky otázek index: empty_questions: Během této schůzky budou zaslány některé dotazy a vy na ně budete moci odpovědět. Zobrazí se zde. index_admin: - admin_dashboard: Řídicí panel administrace edit: Upravit v panelu administrace question: Otázka received_answer: přijatá odpověď diff --git a/decidim-meetings/config/locales/de.yml b/decidim-meetings/config/locales/de.yml index 03c925fd5e21d..394c130189772 100644 --- a/decidim-meetings/config/locales/de.yml +++ b/decidim-meetings/config/locales/de.yml @@ -146,6 +146,7 @@ de: actions: comment: Kommentar join: Beitreten + reply_poll: Umfrage beantworten name: Meetings settings: global: @@ -362,6 +363,13 @@ de: update: invalid: Beim Aktualisieren der Veranstaltungsumfrage ist ein Problem aufgetreten. success: Veranstaltungsumfrage erfolgreich aktualisiert. + poll: + form: + announcement_html: + - Wenn eine Frage Antworten erhalten hat oder veröffentlicht/geschlossen wird, kann sie nicht mehr bearbeitet werden. + - Sie können jederzeit eine neue Frage hinzufügen. + - Die Umfrage wird geschlossen, wenn die Ergebnisse aller erstellten Fragen veröffentlicht wurden. + - Besuchen Sie die Umfrageverwaltungsseite um Fragen zu versenden oder Ergebnisse zu veröffentlichen. registrations: edit: save: Speichern @@ -440,16 +448,14 @@ de: iframe_embed_type: embed_in_meeting_page: In Meeting-Seite einbetten none: Keiner - open_in_live_event_page: In Live-Event-Seite öffnen (mit optionalen Umfragen) + open_in_live_event_page: Auf laufender Veranstaltungsseite öffnen open_in_new_tab: Link in neuem Tab öffnen last_activity: meeting_updated: 'Veranstaltung aktualisiert:' new_meeting: 'Neue Veranstaltung:' layouts: live_event: - administrate: Administrativ close: Schließen - questions: Fragen mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ de: edit_close_meeting: Veranstaltungsbericht bearbeiten edit_meeting: Veranstaltung bearbeiten join_meeting: Veranstaltung beitreten + reply_poll: Umfrage beantworten + view_poll: Umfrage ansehen meetings: no_meetings_warning: Keine Veranstaltungen entsprechen Ihren Suchkriterien oder es ist keine Besprechung geplant. upcoming_meetings_warning: Momentan gibt es keine geplanten Besprechungen, aber hier finden Sie alle aufgelisteten Besprechungen. @@ -588,13 +596,22 @@ de: start_time: Anfangsdatum title: Titel polls: + answers: + index: + administrate: Bearbeiten + title: Umfrage + index_admin: + back_to_meeting: Zurück zur Veranstaltung + title: Umfrage bearbeiten + view_poll: Umfrage ansehen questions: closed_question: - question_results: Umfrageergebnisse + announcement: Die Beantwortung dieser Frage wurde beendet. + question: Frage + question_results: Resultate index: empty_questions: Während dieses Treffens werden einige Fragen gesendet und Sie werden sie beantworten können. Sie werden hier angezeigt. index_admin: - admin_dashboard: Administrations-Dashboard edit: Im Adminbereich bearbeiten question: Frage received_answer: Antwort erhalten @@ -602,6 +619,10 @@ de: results: Ergebnisse send: Senden sent: Gesendet + statuses: + closed: Ergebnisse gesendet (geschlossen) + published: Gesendet (offen) + unpublished: Ausstehender Versand published_question: max_choices_alert: Es wurden zu viele Auswahlmöglichkeiten ausgewählt question: Frage diff --git a/decidim-meetings/config/locales/el.yml b/decidim-meetings/config/locales/el.yml index dbfb01e88c870..e6d29d0e1988c 100644 --- a/decidim-meetings/config/locales/el.yml +++ b/decidim-meetings/config/locales/el.yml @@ -411,16 +411,13 @@ el: iframe_embed_type: embed_in_meeting_page: Ενσωμάτωση στη σελίδα συνάντησης none: Κανένας - open_in_live_event_page: Άνοιγμα σε σελίδα ζωντανής εκδήλωσης (με προαιρετικές δημοσκοπήσεις) open_in_new_tab: Άνοιγμα URL σε νέα καρτέλα last_activity: meeting_updated: 'Η συνάντηση ενημερώθηκε:' new_meeting: 'Νέα συνάντηση:' layouts: live_event: - administrate: Διαχειριστείτε close: κλείσιμο - questions: Ερωτήσεις mailer: invite_join_meeting_mailer: invite: @@ -553,12 +550,9 @@ el: title: Τίτλος polls: questions: - closed_question: - question_results: Αποτελέσματα ερωτήσεων index: empty_questions: Κατά τη διάρκεια αυτής της συνάντησης, ορισμένες ερωτήσεις θα σταλούν και θα είστε σε θέση να τις απαντήσετε. Θα εμφανιστούν εδώ. index_admin: - admin_dashboard: Πίνακας διαχείρισης edit: Επεξεργασία στον πίνακα διαχείρισης question: Ερώτηση received_answer: έλαβε απάντηση diff --git a/decidim-meetings/config/locales/en.yml b/decidim-meetings/config/locales/en.yml index f11cbd53b0258..56dfd5bfb1249 100644 --- a/decidim-meetings/config/locales/en.yml +++ b/decidim-meetings/config/locales/en.yml @@ -147,6 +147,7 @@ en: actions: comment: Comment join: Join + reply_poll: Reply poll name: Meetings settings: global: @@ -363,6 +364,13 @@ en: update: invalid: There was a problem updating this meeting poll. success: Meeting poll successfully updated. + poll: + form: + announcement_html: + - When a question receives answers or is published/closed, it can no longer be edited. + - You can add a question at any time. + - The poll will be closed when the results of all created questions have been published. + - Visit the poll administration page to send questions and publish results. registrations: edit: save: Save @@ -441,16 +449,14 @@ en: iframe_embed_type: embed_in_meeting_page: Embed in meeting page none: None - open_in_live_event_page: Open in live event page (with optional polls) + open_in_live_event_page: Open in live event page open_in_new_tab: Open URL in a new tab last_activity: meeting_updated: 'Meeting updated:' new_meeting: 'New meeting:' layouts: live_event: - administrate: Administrate close: close - questions: Questions mailer: invite_join_meeting_mailer: invite: @@ -531,6 +537,8 @@ en: edit_close_meeting: Edit meeting report edit_meeting: Edit meeting join_meeting: Join meeting + reply_poll: Reply poll + view_poll: View poll meetings: no_meetings_warning: No meetings match your search criteria or there is not any meeting scheduled. upcoming_meetings_warning: Currently, there are no scheduled meetings, but here you can find all the past meetings listed. @@ -589,13 +597,22 @@ en: start_time: Start date title: Title polls: + answers: + index: + administrate: Administrate + title: Poll + index_admin: + back_to_meeting: Back to meeting + title: Administrate poll + view_poll: View poll questions: closed_question: - question_results: Question results + announcement: The replies for this question have been closed. + question: Question + question_results: Results index: empty_questions: Throughout this meeting, some questions will be sent and you will be able to answer them. They will be displayed here. index_admin: - admin_dashboard: Administrator dashboard edit: Edit in the admin panel question: Question received_answer: received answer @@ -603,6 +620,10 @@ en: results: Results send: Send sent: Sent + statuses: + closed: Results sent (closed) + published: Sent (open) + unpublished: Pending to be sent published_question: max_choices_alert: There are too many choices selected question: Question diff --git a/decidim-meetings/config/locales/es-MX.yml b/decidim-meetings/config/locales/es-MX.yml index ca85e3ce07734..ecf450dfbb75c 100644 --- a/decidim-meetings/config/locales/es-MX.yml +++ b/decidim-meetings/config/locales/es-MX.yml @@ -146,6 +146,7 @@ es-MX: actions: comment: Comentar join: Unirse + reply_poll: Responder al sondeo/consulta en directo name: Encuentros settings: global: @@ -362,6 +363,13 @@ es-MX: update: invalid: Se ha producido un error al actualizar esta encuesta. success: Encuesta actualizada correctamente. + poll: + form: + announcement_html: + - Cuando una pregunta recibe respuestas o está publicada/cerrada, ya no se puede editar. + - Puedes añadir una pregunta en cualquier momento. + - El sondeo/consulta en directo se cerrará cuando se hayan publicado los resultados de todas las preguntas creadas. + - Visita la página de administración de encuestas para enviar preguntas y publicar resultados. registrations: edit: save: Guardar @@ -440,16 +448,14 @@ es-MX: iframe_embed_type: embed_in_meeting_page: Incrustar en la página del encuentro none: Ninguno - open_in_live_event_page: Abrir en la página del evento en directo (con encuestas opcionales) + open_in_live_event_page: Abrir en la página del evento en directo open_in_new_tab: Abrir en nueva pestaña last_activity: meeting_updated: 'Encuentro actualizado:' new_meeting: 'Nuevo encuentro:' layouts: live_event: - administrate: Administrar close: cerrar - questions: Preguntas mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ es-MX: edit_close_meeting: Editar el informe del encuentro edit_meeting: Editar el encuentro join_meeting: Unirse al encuentro + reply_poll: Responder sondeo/consulta + view_poll: Ver sondeo/consulta meetings: no_meetings_warning: No hay encuentros que coincidan con tu búsqueda o no hay ningún encuentro programado. upcoming_meetings_warning: Actualmente no hay encuentros programados, pero puedes ver los encuentros anteriores. @@ -588,13 +596,22 @@ es-MX: start_time: Fecha de inicio title: Título polls: + answers: + index: + administrate: Administrar + title: Sondeo/Consulta en directo + index_admin: + back_to_meeting: Volver al encuentro + title: Administrar sondeo/consulta en directo + view_poll: Ver sondeo/consulta questions: closed_question: - question_results: Resultados de la pregunta + announcement: Se han cerrado las respuestas a esta pregunta. + question: Pregunta + question_results: Resultados index: empty_questions: A lo largo de este encuentro, se enviarán algunas preguntas y podrás responderlas. Se mostrarán aquí. index_admin: - admin_dashboard: Panel de administración edit: Editar en el panel de administración question: Pregunta received_answer: respuesta recibida @@ -602,6 +619,10 @@ es-MX: results: Resultados send: Enviar sent: Enviada + statuses: + closed: Resultados enviados (cerrados) + published: Enviada (abierta) + unpublished: Pendiente de enviar published_question: max_choices_alert: Hay demasiadas opciones seleccionadas question: Pregunta diff --git a/decidim-meetings/config/locales/es-PY.yml b/decidim-meetings/config/locales/es-PY.yml index 6ff0c308be00a..9f3c335d06d07 100644 --- a/decidim-meetings/config/locales/es-PY.yml +++ b/decidim-meetings/config/locales/es-PY.yml @@ -146,6 +146,7 @@ es-PY: actions: comment: Comentar join: Unirse + reply_poll: Responder al sondeo/consulta en directo name: Encuentros settings: global: @@ -362,6 +363,13 @@ es-PY: update: invalid: Se ha producido un error al actualizar esta encuesta. success: Encuesta actualizada correctamente. + poll: + form: + announcement_html: + - Cuando una pregunta recibe respuestas o está publicada/cerrada, ya no se puede editar. + - Puedes añadir una pregunta en cualquier momento. + - El sondeo/consulta en directo se cerrará cuando se hayan publicado los resultados de todas las preguntas creadas. + - Visita la página de administración de encuestas para enviar preguntas y publicar resultados. registrations: edit: save: Guardar @@ -440,16 +448,14 @@ es-PY: iframe_embed_type: embed_in_meeting_page: Incrustar en la página del encuentro none: Ninguno - open_in_live_event_page: Abrir en la página del evento en directo (con encuestas opcionales) + open_in_live_event_page: Abrir en la página del evento en directo open_in_new_tab: Abrir en nueva pestaña last_activity: meeting_updated: 'Encuentro actualizado:' new_meeting: 'Nuevo encuentro:' layouts: live_event: - administrate: Administrar close: cerrar - questions: Preguntas mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ es-PY: edit_close_meeting: Editar el informe del encuentro edit_meeting: Editar el encuentro join_meeting: Unirse al encuentro + reply_poll: Responder sondeo/consulta + view_poll: Ver sondeo/consulta meetings: no_meetings_warning: No hay encuentros que coincidan con tu búsqueda o no hay ningún encuentro programado. upcoming_meetings_warning: Actualmente no hay encuentros programados, pero puedes ver los encuentros anteriores. @@ -588,13 +596,22 @@ es-PY: start_time: Fecha de inicio title: Título polls: + answers: + index: + administrate: Administrar + title: Sondeo/Consulta en directo + index_admin: + back_to_meeting: Volver al encuentro + title: Administrar sondeo/consulta en directo + view_poll: Ver sondeo/consulta questions: closed_question: - question_results: Resultados de la pregunta + announcement: Se han cerrado las respuestas a esta pregunta. + question: Pregunta + question_results: Resultados index: empty_questions: A lo largo de este encuentro, se enviarán algunas preguntas y podrás responderlas. Se mostrarán aquí. index_admin: - admin_dashboard: Panel de administración edit: Editar en el panel de administración question: Pregunta received_answer: respuesta recibida @@ -602,6 +619,10 @@ es-PY: results: Resultados send: Enviar sent: Enviada + statuses: + closed: Resultados enviados (cerrados) + published: Enviada (abierta) + unpublished: Pendiente de enviar published_question: max_choices_alert: Hay demasiadas opciones seleccionadas question: Pregunta diff --git a/decidim-meetings/config/locales/es.yml b/decidim-meetings/config/locales/es.yml index c0d6446cb2c44..1918a16d3c06d 100644 --- a/decidim-meetings/config/locales/es.yml +++ b/decidim-meetings/config/locales/es.yml @@ -146,6 +146,7 @@ es: actions: comment: Comentar join: Unirse + reply_poll: Responder al sondeo/consulta en directo name: Encuentros settings: global: @@ -362,6 +363,13 @@ es: update: invalid: Se ha producido un error al actualizar esta encuesta. success: Encuesta actualizada correctamente. + poll: + form: + announcement_html: + - Cuando una pregunta recibe respuestas o está publicada/cerrada, ya no se puede editar. + - Puedes añadir una pregunta en cualquier momento. + - El sondeo/consulta en directo se cerrará cuando se hayan publicado los resultados de todas las preguntas creadas. + - Visita la página de administración de encuestas para enviar preguntas y publicar resultados. registrations: edit: save: Guardar @@ -440,16 +448,14 @@ es: iframe_embed_type: embed_in_meeting_page: Incrustar en la página del encuentro none: Ninguno - open_in_live_event_page: Abrir en la página del evento en directo (con encuestas opcionales) + open_in_live_event_page: Abrir en la página del evento en directo open_in_new_tab: Abrir en nueva pestaña last_activity: meeting_updated: 'Encuentro actualizado:' new_meeting: 'Nuevo encuentro:' layouts: live_event: - administrate: Administrar close: cerrar - questions: Preguntas mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ es: edit_close_meeting: Editar el informe del encuentro edit_meeting: Editar el encuentro join_meeting: Unirse al encuentro + reply_poll: Responder sondeo/consulta + view_poll: Ver sondeo/consulta meetings: no_meetings_warning: No hay encuentros que coincidan con tu búsqueda o no hay ningún encuentro programado. upcoming_meetings_warning: Actualmente no hay encuentros programados, pero puedes ver los anteriores. @@ -588,13 +596,22 @@ es: start_time: Fecha de inicio title: Título polls: + answers: + index: + administrate: Administrar + title: Sondeo/Consulta en directo + index_admin: + back_to_meeting: Volver al encuentro + title: Administrar sondeo/consulta en directo + view_poll: Ver sondeo/consulta questions: closed_question: - question_results: Resultados de la pregunta + announcement: Se han cerrado las respuestas a esta pregunta. + question: Pregunta + question_results: Resultados index: empty_questions: A lo largo de este encuentro, se enviarán algunas preguntas y podrás responderlas. Se mostrarán aquí. index_admin: - admin_dashboard: Panel de administración edit: Editar en el panel de administración question: Pregunta received_answer: respuesta recibida @@ -602,6 +619,10 @@ es: results: Resultados send: Enviar sent: Enviada + statuses: + closed: Resultados enviados (cerrados) + published: Enviada (abierta) + unpublished: Pendiente de enviar published_question: max_choices_alert: Hay demasiadas opciones seleccionadas question: Pregunta diff --git a/decidim-meetings/config/locales/eu.yml b/decidim-meetings/config/locales/eu.yml index 9982724e5076b..3a493be6917e8 100644 --- a/decidim-meetings/config/locales/eu.yml +++ b/decidim-meetings/config/locales/eu.yml @@ -146,6 +146,7 @@ eu: actions: comment: Iruzkina join: Parte hartu + reply_poll: Erantzun inkesta name: Topaketak settings: global: @@ -362,6 +363,13 @@ eu: update: invalid: Arazo bat egon da topaketa-inkesta hau eguneratzean. success: Topaketaren inkesta zuzen eguneratua. + poll: + form: + announcement_html: + - Galdera batek erantzunak jasotzen dituenean edo argitaratuta/itxita dagoenean, jada ezin da editatu. + - Edozein unetan gehitu ahal duzu galdera bat. + - Inkesta itxi egingo da sortutako galdera guztien emaitzak argitaratzen direnean. + - Bisitatu inkestak administratzeko orria , galderak bidali eta emaitzak argitaratzeko. registrations: edit: save: Gorde @@ -440,16 +448,14 @@ eu: iframe_embed_type: embed_in_meeting_page: Topaketa-orrian txertatuta none: Bat ere ez - open_in_live_event_page: Ireki zuzeneko ekitaldi-orrian (inkesta aukeratuekin) + open_in_live_event_page: Ireki zuzeneko ekitaldiaren orrian open_in_new_tab: Ireki URL fitxa berri batean last_activity: meeting_updated: 'Topaketa eguneratua:' new_meeting: 'Beste topaketa bat:' layouts: live_event: - administrate: Administratu close: itxi - questions: Galderak mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ eu: edit_close_meeting: Editatu topaketaren txostena edit_meeting: Editatu topaketa join_meeting: Izena eman + reply_poll: Erantzun inkesta + view_poll: Ikusi inkesta meetings: no_meetings_warning: Ez dago bilaketa-irizpidearekin bat datorren topaketarik, edo ez dago topaketa programaturik. upcoming_meetings_warning: Orain ez dago topaketa programaturik, baina aurreko topaketak ikus ditzakezu. @@ -588,13 +596,22 @@ eu: start_time: Hasiera-data title: Titulua polls: + answers: + index: + administrate: Administratu + title: Inkesta + index_admin: + back_to_meeting: Itzuli topaketara + title: Administratu inkesta + view_poll: Ikusi inkesta questions: closed_question: - question_results: Galderaren emaitzak + announcement: Galdera honetarako erantzunak itxi egin dira. + question: Galdera + question_results: Emaitzak index: empty_questions: Topaketa honetan zehar, galdera batzuk bidaliko dira eta erantzun ahal izango dituzu. Hemen erakutsiko dira. index_admin: - admin_dashboard: Administrazio-panela edit: Editatu administrazio-panelean question: Galdera received_answer: jasotako erantzuna @@ -602,6 +619,10 @@ eu: results: Emaitzak send: Bidali sent: Bidalita + statuses: + closed: Emaitzak bidalita (itxita) + published: Bidalita (zabalik) + unpublished: Bidaltzeko zain published_question: max_choices_alert: Aukera gehiegi hautatuta da question: Galdera diff --git a/decidim-meetings/config/locales/fi-plain.yml b/decidim-meetings/config/locales/fi-plain.yml index 4ffe6e37612a5..b6f6400d1e701 100644 --- a/decidim-meetings/config/locales/fi-plain.yml +++ b/decidim-meetings/config/locales/fi-plain.yml @@ -440,16 +440,13 @@ fi-pl: iframe_embed_type: embed_in_meeting_page: Upota tapaamisen sivulle none: Ei mitään - open_in_live_event_page: Avaa upotus tapahtuman sivulla reaaliajassa (liitä vapaaehtoisia mielipidekyselyjä) open_in_new_tab: Avaa uudessa välilehdessä last_activity: meeting_updated: 'Tapaamista on päivitetty:' new_meeting: 'Uusi tapaaminen:' layouts: live_event: - administrate: Hallinnoi close: sulje - questions: Kysymykset mailer: invite_join_meeting_mailer: invite: @@ -589,12 +586,9 @@ fi-pl: title: Otsikko polls: questions: - closed_question: - question_results: Kysymyksen tulokset index: empty_questions: Tämän tapaamisen aikana esitetään kysymyksiä, joihin voit vastata. Kysymykset näytetään tässä. index_admin: - admin_dashboard: Hallintapaneeli edit: Muokkaa hallintapaneelissa question: Kysymys received_answer: vastaus diff --git a/decidim-meetings/config/locales/fi.yml b/decidim-meetings/config/locales/fi.yml index e0c8dc8875847..98fb012ffe5bf 100644 --- a/decidim-meetings/config/locales/fi.yml +++ b/decidim-meetings/config/locales/fi.yml @@ -440,16 +440,13 @@ fi: iframe_embed_type: embed_in_meeting_page: Upota tapaamisen sivulle none: Ei mitään - open_in_live_event_page: Avaa upotus tapahtuman sivulla reaaliajassa (liitä vapaaehtoisia mielipidekyselyjä) open_in_new_tab: Avaa uudessa välilehdessä last_activity: meeting_updated: 'Tapaamista on päivitetty:' new_meeting: 'Uusi tapaaminen:' layouts: live_event: - administrate: Hallinnoi close: sulje - questions: Kysymykset mailer: invite_join_meeting_mailer: invite: @@ -589,12 +586,9 @@ fi: title: Otsikko polls: questions: - closed_question: - question_results: Kysymyksen tulokset index: empty_questions: Tämän tapaamisen aikana esitetään kysymyksiä, joihin voit vastata. Kysymykset näytetään tässä. index_admin: - admin_dashboard: Hallintapaneeli edit: Muokkaa hallintapaneelissa question: Kysymys received_answer: vastaus diff --git a/decidim-meetings/config/locales/fr-CA.yml b/decidim-meetings/config/locales/fr-CA.yml index b365de65be782..c952f5d3f1338 100644 --- a/decidim-meetings/config/locales/fr-CA.yml +++ b/decidim-meetings/config/locales/fr-CA.yml @@ -146,6 +146,7 @@ fr-CA: actions: comment: Commenter join: Rejoindre + reply_poll: Répondre au sondage name: Rencontres settings: global: @@ -362,6 +363,13 @@ fr-CA: update: invalid: Une erreur s'est produite lors de la mise à jour du sondage de la rencontre. success: Sondage de rencontre mis à jour avec succès. + poll: + form: + announcement_html: + - Lorsqu'une question reçoit des réponses ou est publiée/fermée, elle ne peut plus être modifiée. + - Vous pouvez ajouter une question à tout moment. + - Le sondage sera fermé lorsque les résultats de toutes les questions créées auront été publiés. + - Visitez la page d'administration du sondage pour envoyer des questions et publier des résultats. registrations: edit: save: Sauvegarder @@ -423,7 +431,7 @@ fr-CA: body: La réunion "%{meeting_title}" est en attente de fermeture. Veuillez ajouter un compte-rendu de la réunion en utilisant le bouton "Fermer la réunion". greetings: Cordialement,
%{organization_name}
%{organization_url} hello: Bonjour %{username}, - subject: Vous pouvez maintenant fermer la réunion "%{meeting_title}" et y ajouter un compte rendu + subject: Vous pouvez maintenant fermer la rencontre "%{meeting_title}" et y ajouter un compte rendu conference_venues: Salles de conférence content_blocks: upcoming_meetings: @@ -440,16 +448,14 @@ fr-CA: iframe_embed_type: embed_in_meeting_page: Intégrer à la page de la rencontre none: Aucun - open_in_live_event_page: Ouvrir dans la page de l'événement en direct (avec sondages facultatifs) + open_in_live_event_page: Ouvrir dans la page de l'événement en direct open_in_new_tab: Ouvrir le lien dans un nouvel onglet last_activity: meeting_updated: 'Rencontre mise à jour :' new_meeting: 'Nouvelle rencontre :' layouts: live_event: - administrate: Administrer close: fermer - questions: Questions mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ fr-CA: edit_close_meeting: Modifier le compte-rendu de la rencontre edit_meeting: Modifier la rencontre join_meeting: Participer à la rencontre + reply_poll: Répondre au sondage + view_poll: Voir le sondage meetings: no_meetings_warning: Aucune rencontre ne correspond à vos critères de recherche ou aucune rencontre n'a été créée. upcoming_meetings_warning: À l'heure actuelle, il n'y a pas de rencontres planifiées. Ici vous trouverez une liste de toutes les rencontres passées. @@ -588,13 +596,22 @@ fr-CA: start_time: Date de début title: Titre polls: + answers: + index: + administrate: Administrer + title: Sondage + index_admin: + back_to_meeting: Revenir à la rencontre + title: Administrer le sondage + view_poll: Voir le sondage questions: closed_question: - question_results: Résultats de l'élection + announcement: Les réponses à cette question sont closes. + question: Question + question_results: Résultats index: empty_questions: Tout au long de cette rencontre, certaines questions seront envoyées et vous pourrez y répondre. Elles seront affichées ici. index_admin: - admin_dashboard: Tableau de bord d'administration edit: Modifier dans le panneau d'administration question: Question received_answer: réponse reçue @@ -602,6 +619,10 @@ fr-CA: results: Résultats send: Envoyer sent: Envoyée + statuses: + closed: Résultats envoyés (fermés) + published: Envoyé (ouvert) + unpublished: En attente d'être envoyé published_question: max_choices_alert: Il y a trop de choix sélectionnés question: Question diff --git a/decidim-meetings/config/locales/fr.yml b/decidim-meetings/config/locales/fr.yml index 1048fdadedc61..aa89ef2cc044d 100644 --- a/decidim-meetings/config/locales/fr.yml +++ b/decidim-meetings/config/locales/fr.yml @@ -146,6 +146,7 @@ fr: actions: comment: Commenter join: Rejoindre + reply_poll: Répondre au sondage name: Rencontres settings: global: @@ -362,6 +363,13 @@ fr: update: invalid: Une erreur s'est produite lors de la mise à jour du sondage de la rencontre. success: Sondage de rencontre mis à jour avec succès. + poll: + form: + announcement_html: + - Lorsqu'une question reçoit des réponses ou est publiée/fermée, elle ne peut plus être modifiée. + - Vous pouvez ajouter une question à tout moment. + - Le sondage sera fermé lorsque les résultats de toutes les questions créées auront été publiés. + - Visitez la page d'administration du sondage pour envoyer des questions et publier des résultats. registrations: edit: save: Sauvegarder @@ -423,7 +431,7 @@ fr: body: La réunion "%{meeting_title}" est en attente de fermeture. Veuillez ajouter un compte-rendu de la réunion en utilisant le bouton "Fermer la réunion". greetings: Cordialement,
%{organization_name}
%{organization_url} hello: Bonjour %{username}, - subject: Vous pouvez maintenant fermer la réunion "%{meeting_title}" et y ajouter un compte rendu + subject: Vous pouvez maintenant fermer la rencontre "%{meeting_title}" et y ajouter un compte rendu conference_venues: Salles de conférence content_blocks: upcoming_meetings: @@ -440,16 +448,14 @@ fr: iframe_embed_type: embed_in_meeting_page: Intégrer à la page de la rencontre none: Aucun - open_in_live_event_page: Ouvrir dans la page de l'événement en direct (avec sondages facultatifs) + open_in_live_event_page: Ouvrir dans la page de l'événement en direct open_in_new_tab: Ouvrir le lien dans un nouvel onglet last_activity: meeting_updated: 'Rencontre mise à jour :' new_meeting: 'Nouvelle rencontre :' layouts: live_event: - administrate: Administrer close: fermer - questions: Questions mailer: invite_join_meeting_mailer: invite: @@ -530,6 +536,8 @@ fr: edit_close_meeting: Modifier le compte-rendu de la rencontre edit_meeting: Modifier la rencontre join_meeting: Participer à la rencontre + reply_poll: Répondre au sondage + view_poll: Voir le sondage meetings: no_meetings_warning: Aucune rencontre ne correspond à vos critères de recherche ou aucune rencontre n'a été créée. upcoming_meetings_warning: À l'heure actuelle, il n'y a pas de rencontres planifiées. Ici vous trouverez une liste de toutes les rencontres passées. @@ -588,13 +596,22 @@ fr: start_time: Date de début title: Titre polls: + answers: + index: + administrate: Administrer + title: Sondage + index_admin: + back_to_meeting: Revenir à la rencontre + title: Administrer le sondage + view_poll: Voir le sondage questions: closed_question: - question_results: Résultats du sondage + announcement: Les réponses à cette question sont closes. + question: Question + question_results: Résultats index: empty_questions: Tout au long de cette rencontre, certaines questions seront envoyées et vous pourrez y répondre. Elles seront affichées ici. index_admin: - admin_dashboard: Administration du sondage edit: Modifier dans le panneau d'administration question: Question received_answer: réponse reçue @@ -602,6 +619,10 @@ fr: results: Résultats send: Publier sent: Publiée + statuses: + closed: Résultats envoyés (fermés) + published: Envoyé (ouvert) + unpublished: En attente d'être envoyé published_question: max_choices_alert: Vous avez sélectionné trop de choix question: Question diff --git a/decidim-meetings/config/locales/ga-IE.yml b/decidim-meetings/config/locales/ga-IE.yml index 39936593aec94..11c9866cef1fb 100644 --- a/decidim-meetings/config/locales/ga-IE.yml +++ b/decidim-meetings/config/locales/ga-IE.yml @@ -110,7 +110,6 @@ ga: layouts: live_event: close: dún - questions: Ceisteanna meeting_closes: edit: back: Ar Ais diff --git a/decidim-meetings/config/locales/gl.yml b/decidim-meetings/config/locales/gl.yml index c251d2d89dbb2..7180e58694d6d 100644 --- a/decidim-meetings/config/locales/gl.yml +++ b/decidim-meetings/config/locales/gl.yml @@ -277,9 +277,7 @@ gl: open_in_new_tab: Abrir ligazón nunha nova lapela layouts: live_event: - administrate: Administrar close: pechar - questions: Preguntas mailer: invite_join_meeting_mailer: invite: diff --git a/decidim-meetings/config/locales/hu.yml b/decidim-meetings/config/locales/hu.yml index c5af7a8fdee88..5d45aa85e5365 100644 --- a/decidim-meetings/config/locales/hu.yml +++ b/decidim-meetings/config/locales/hu.yml @@ -353,13 +353,10 @@ hu: iframe_embed_type: embed_in_meeting_page: Beágyazás az értekezlet oldalába none: Nincs - open_in_live_event_page: Megnyitás az élő esemény oldalán (opcionális szavazásokkal) open_in_new_tab: Megnyitás új fülön layouts: live_event: - administrate: Admin close: bezár - questions: Kérdések mailer: invite_join_meeting_mailer: invite: diff --git a/decidim-meetings/config/locales/it.yml b/decidim-meetings/config/locales/it.yml index d9e59ce6e0ee6..f6295009e9ba5 100644 --- a/decidim-meetings/config/locales/it.yml +++ b/decidim-meetings/config/locales/it.yml @@ -315,9 +315,7 @@ it: space_type: Spazio partecipativo layouts: live_event: - administrate: Amministra close: chiudi - questions: Domande mailer: invite_join_meeting_mailer: invite: @@ -436,12 +434,9 @@ it: title: Titolo polls: questions: - closed_question: - question_results: Risultati della domanda index: empty_questions: Durante questa riunione, alcune domande saranno inviate e sarete in grado di rispondere. Verranno visualizzate qui. index_admin: - admin_dashboard: Pannello di amministrazione question: Domanda received_answer: risposta ricevuta received_answers: risposte ricevute diff --git a/decidim-meetings/config/locales/ja.yml b/decidim-meetings/config/locales/ja.yml index cc96f7d3078e1..32f0ce0cc33ef 100644 --- a/decidim-meetings/config/locales/ja.yml +++ b/decidim-meetings/config/locales/ja.yml @@ -143,6 +143,7 @@ ja: actions: comment: コメント join: 参加する + reply_poll: 投票 name: ミーティング settings: global: @@ -357,6 +358,13 @@ ja: update: invalid: このミーティングの投票の更新に問題がありました. success: ミーティングの投票を更新しました。 + poll: + form: + announcement_html: + - 質問が回答を受信または公開/閉じた場合、編集できなくなります。 + - 質問はいつでも追加できます。 + - 作成されたすべての質問の結果が公開されると、投票は終了します。 + - 質問を送信し、結果を公開するには、 投票管理ページ にアクセスしてください。 registrations: edit: save: 保存 @@ -434,16 +442,14 @@ ja: iframe_embed_type: embed_in_meeting_page: ミーティングページに埋め込む none: なし - open_in_live_event_page: 配信イベントページで開く (オプションの投票付き) + open_in_live_event_page: ライブイベントページで開く open_in_new_tab: URLを新しいタブで開く last_activity: meeting_updated: '更新されたミーティング:' new_meeting: '新しいミーティング:' layouts: live_event: - administrate: 管理 close: 閉じる - questions: 質問 mailer: invite_join_meeting_mailer: invite: @@ -523,6 +529,8 @@ ja: edit_close_meeting: ミーティングレポートを編集 edit_meeting: ミーティングを編集 join_meeting: ミーティングに参加 + reply_poll: 投票 + view_poll: 投票を表示 meetings: no_meetings_warning: 検索条件に一致するミーティングがないか,予定されているミーティングがありません. upcoming_meetings_warning: 現在、スケジュールされたミーティングはありませんが、ここではリストされた過去のミーティングをすべて見つけることができます。 @@ -580,13 +588,22 @@ ja: start_time: 開始日 title: タイトル polls: + answers: + index: + administrate: 管理 + title: 投票 + index_admin: + back_to_meeting: ミーティングに戻る + title: 投票を管理 + view_poll: 投票を表示 questions: closed_question: - question_results: 質問の結果 + announcement: この質問への回答はクローズされました。 + question: 質問 + question_results: 結果 index: empty_questions: このミーティングを通じて、いくつかの質問が送信され、回答することができます。質問はここに表示されます。 index_admin: - admin_dashboard: 管理者ダッシュボード edit: 管理画面で編集 question: 質問 received_answer: 受理した回答 @@ -594,6 +611,10 @@ ja: results: 結果 send: 送信 sent: 送信済み + statuses: + closed: 結果送信済(終了) + published: 送信済 (受付中) + unpublished: 送信待ち published_question: max_choices_alert: 選択された選択肢が多すぎます question: 質問 diff --git a/decidim-meetings/config/locales/lb.yml b/decidim-meetings/config/locales/lb.yml index d82182c566908..fe5b15a153325 100644 --- a/decidim-meetings/config/locales/lb.yml +++ b/decidim-meetings/config/locales/lb.yml @@ -255,7 +255,6 @@ lb: layouts: live_event: close: schließen - questions: Fragen mailer: invite_join_meeting_mailer: invite: diff --git a/decidim-meetings/config/locales/lt.yml b/decidim-meetings/config/locales/lt.yml index 8b28c3c666588..927397b577c2e 100644 --- a/decidim-meetings/config/locales/lt.yml +++ b/decidim-meetings/config/locales/lt.yml @@ -427,16 +427,13 @@ lt: iframe_embed_type: embed_in_meeting_page: Integruoti į susirinkimo puslapį none: Nėra - open_in_live_event_page: Atidaryti renginio puslapyje (pasirinktinai - su apklausomis) open_in_new_tab: Atidaryti naujame skirtuke last_activity: meeting_updated: 'Susitikimas atnaujintas:' new_meeting: 'Naujas susitikimas:' layouts: live_event: - administrate: Administruoti close: uždaryti - questions: Klausimai mailer: invite_join_meeting_mailer: invite: @@ -579,12 +576,9 @@ lt: title: Pavadinimas polls: questions: - closed_question: - question_results: Klausimų rezultatai index: empty_questions: Viso šio susitikimo metu bus siunčiami klausimai ir galėsite į juos atsakyti. Jie bus rodomi čia. index_admin: - admin_dashboard: Administratoriaus skydelis edit: Redaguoti administratoriaus skydelyje question: Klausimas received_answer: gautas atsakymas diff --git a/decidim-meetings/config/locales/nl.yml b/decidim-meetings/config/locales/nl.yml index 6ae9dcf0c9250..4388b77e089b6 100644 --- a/decidim-meetings/config/locales/nl.yml +++ b/decidim-meetings/config/locales/nl.yml @@ -346,13 +346,10 @@ nl: iframe_embed_type: embed_in_meeting_page: Insluiten in vergaderpagina none: Geen - open_in_live_event_page: Open in live event pagina (met optionele polls) open_in_new_tab: Open link in een nieuw tabblad layouts: live_event: - administrate: Beheer close: sluit - questions: Vragen mailer: invite_join_meeting_mailer: invite: @@ -481,12 +478,9 @@ nl: title: Titel polls: questions: - closed_question: - question_results: Resultaten vraag index: empty_questions: Tijdens deze vergadering worden er enkele vragen verzonden en je kan ze beantwoorden. Ze zullen hier worden weergegeven. index_admin: - admin_dashboard: Beheer Dashboard edit: Bewerk in admin question: Vraag received_answer: antwoord ontvangen diff --git a/decidim-meetings/config/locales/no.yml b/decidim-meetings/config/locales/no.yml index 048bc6eb37915..66e8a335fd235 100644 --- a/decidim-meetings/config/locales/no.yml +++ b/decidim-meetings/config/locales/no.yml @@ -327,12 +327,9 @@ iframe_embed_type: embed_in_meeting_page: Bygg inn på møteside none: Ingen - open_in_live_event_page: Åpne på siden for direktearrangement (med valgfri meningsmåling) layouts: live_event: - administrate: Administrere close: lukk - questions: Spørsmål mailer: invite_join_meeting_mailer: invite: @@ -437,12 +434,9 @@ title: Tittel polls: questions: - closed_question: - question_results: Resultat av spørsmål index: empty_questions: Gjennom dette møtet stilles noen spørsmål, og du vil kunne svare på dem. De vil bli vist her. index_admin: - admin_dashboard: Administrators dashbord question: Spørsmål received_answer: mottatt svar received_answers: mottatt svar diff --git a/decidim-meetings/config/locales/pl.yml b/decidim-meetings/config/locales/pl.yml index 11b3d97eb45e1..1d0578091ea78 100644 --- a/decidim-meetings/config/locales/pl.yml +++ b/decidim-meetings/config/locales/pl.yml @@ -427,16 +427,13 @@ pl: iframe_embed_type: embed_in_meeting_page: Osadź na stronie spotkania none: Żaden - open_in_live_event_page: Otwórz stronę wydarzenia na żywo (z opcjonalnymi ankietami) open_in_new_tab: Otwórz odnośnik w nowej zakładce last_activity: meeting_updated: 'Spotkanie zaktualizowane:' new_meeting: 'Nowe spotkanie:' layouts: live_event: - administrate: Administruj close: zamknij - questions: Pytania mailer: invite_join_meeting_mailer: invite: @@ -566,8 +563,6 @@ pl: title: Tytuł polls: questions: - closed_question: - question_results: Wyniki wyborów index_admin: edit: Edytuj w panelu administratora question: Pytanie diff --git a/decidim-meetings/config/locales/pt-BR.yml b/decidim-meetings/config/locales/pt-BR.yml index 2654fcc3405ca..0a57b42c2b011 100644 --- a/decidim-meetings/config/locales/pt-BR.yml +++ b/decidim-meetings/config/locales/pt-BR.yml @@ -439,16 +439,13 @@ pt-BR: iframe_embed_type: embed_in_meeting_page: Incorporar na página da reunião none: Nenhum - open_in_live_event_page: Abrir na página de eventos ao vivo (com enquetes opcionais) open_in_new_tab: Abrir URL em uma nova aba last_activity: meeting_updated: 'Reunião atualizada:' new_meeting: 'Nova reunião:' layouts: live_event: - administrate: Administrar close: fechar - questions: Perguntas mailer: invite_join_meeting_mailer: invite: @@ -588,12 +585,9 @@ pt-BR: title: Título polls: questions: - closed_question: - question_results: Resultados das perguntas index: empty_questions: Durante esta reunião, algumas perguntas serão enviadas e você poderá respondê-las. Elas serão exibidas aqui. index_admin: - admin_dashboard: Painel de administração edit: Editar no painel de administração question: Pergunta received_answer: resposta recebida diff --git a/decidim-meetings/config/locales/pt.yml b/decidim-meetings/config/locales/pt.yml index 2b109c2f94de9..99b999a3e120a 100644 --- a/decidim-meetings/config/locales/pt.yml +++ b/decidim-meetings/config/locales/pt.yml @@ -315,9 +315,7 @@ pt: space_type: Espaço participativo layouts: live_event: - administrate: Administradores close: Fechar - questions: Pergunta mailer: invite_join_meeting_mailer: invite: @@ -435,12 +433,9 @@ pt: title: Título polls: questions: - closed_question: - question_results: Resultados das questões index: empty_questions: Durante esta reunião irão ser-lhe enviadas algumas questões e poderá responder-lhes. Serão exibidas aqui. index_admin: - admin_dashboard: Painel de controlo de administrador question: Questão received_answer: resposta recebida received_answers: respostas recebidas diff --git a/decidim-meetings/config/locales/ro-RO.yml b/decidim-meetings/config/locales/ro-RO.yml index 8d2a024449698..3b2577697500a 100644 --- a/decidim-meetings/config/locales/ro-RO.yml +++ b/decidim-meetings/config/locales/ro-RO.yml @@ -378,16 +378,13 @@ ro: iframe_embed_type: embed_in_meeting_page: Incorporează în pagina de şedinţe none: Niciunul - open_in_live_event_page: Deschide în pagina de evenimente live (cu sondaje opționale) open_in_new_tab: Deschideți în filă nouă last_activity: meeting_updated: 'Ședință actualizată:' new_meeting: 'Ședință nouă:' layouts: live_event: - administrate: Administrează close: închide - questions: Întrebări mailer: invite_join_meeting_mailer: invite: @@ -516,12 +513,9 @@ ro: title: Titlu polls: questions: - closed_question: - question_results: Rezultatele întrebării index: empty_questions: Pe parcursul acestei întâlniri, vor fi trimise câteva întrebări și vei putea răspunde la acestea. Acestea vor fi afișate aici. index_admin: - admin_dashboard: Panou de administrare edit: Editează în panoul de administrare question: Întrebare received_answer: răspuns primit diff --git a/decidim-meetings/config/locales/sv.yml b/decidim-meetings/config/locales/sv.yml index 2cebb9d2868fb..adaf0d1b8cbe8 100644 --- a/decidim-meetings/config/locales/sv.yml +++ b/decidim-meetings/config/locales/sv.yml @@ -350,15 +350,12 @@ sv: iframe_embed_type: embed_in_meeting_page: Bädda in på mötessidan none: Ingen - open_in_live_event_page: Öppna i live event sida (med valfria omröstningar) open_in_new_tab: Öppna länk i ny flik last_activity: new_meeting: 'Nytt möte:' layouts: live_event: - administrate: Administrera close: stäng - questions: Frågor mailer: invite_join_meeting_mailer: invite: @@ -490,12 +487,9 @@ sv: title: Titel polls: questions: - closed_question: - question_results: Resultat index: empty_questions: Under hela mötet kommer några frågor att skickas och du kommer kunna svara på dem. De kommer att visas här. index_admin: - admin_dashboard: Adminpanel question: Fråga received_answer: mottaget svar received_answers: mottagna svar diff --git a/decidim-meetings/config/locales/tr-TR.yml b/decidim-meetings/config/locales/tr-TR.yml index 1c6451ffb786f..0f69bd9a2be79 100644 --- a/decidim-meetings/config/locales/tr-TR.yml +++ b/decidim-meetings/config/locales/tr-TR.yml @@ -268,6 +268,9 @@ tr: value_types: organizer_presenter: not_found: 'Organizatör veritabanında bulunamadı (ID: %{id})' + calendar: + meeting_to_event: + read_more: Bu toplantı hakkında daha fazlasını okuyun calendar_modal: calendar_url: Takvim URL'si export_calendar: Takvimi dışa aktar diff --git a/decidim-meetings/config/locales/zh-TW.yml b/decidim-meetings/config/locales/zh-TW.yml index 3dfe2d772e8b3..6a5865cbaafc5 100644 --- a/decidim-meetings/config/locales/zh-TW.yml +++ b/decidim-meetings/config/locales/zh-TW.yml @@ -407,16 +407,13 @@ zh-TW: iframe_embed_type: embed_in_meeting_page: 嵌入會議頁面 none: 沒有 - open_in_live_event_page: 在直播活動頁面開啟(附加投票選項) open_in_new_tab: 在新頁籤中開啟 URL last_activity: meeting_updated: '會議已更新:' new_meeting: '新會議:' layouts: live_event: - administrate: 管理員 close: 關閉 - questions: 問題 mailer: invite_join_meeting_mailer: invite: @@ -547,12 +544,9 @@ zh-TW: title: 標題 polls: questions: - closed_question: - question_results: 問題結果 index: empty_questions: 在本次會議期間,您將收到一些問題並且您可以回答這些問題。這些問題將會在此顯示。 index_admin: - admin_dashboard: 管理員儀表板 edit: 在管理面板中編輯 question: 問題 received_answer: 收到回答 diff --git a/decidim-meetings/lib/decidim/meetings/component.rb b/decidim-meetings/lib/decidim/meetings/component.rb index 78c4466b6c1b1..6cf5d6b08fdef 100644 --- a/decidim-meetings/lib/decidim/meetings/component.rb +++ b/decidim-meetings/lib/decidim/meetings/component.rb @@ -19,7 +19,7 @@ resource.template = "decidim/meetings/meetings/linked_meetings" resource.card = "decidim/meetings/meeting" resource.reported_content_cell = "decidim/meetings/reported_content" - resource.actions = %w(join comment) + resource.actions = %w(join comment reply_poll) resource.searchable = true end diff --git a/decidim-meetings/lib/decidim/meetings/engine.rb b/decidim-meetings/lib/decidim/meetings/engine.rb index 47566b594096c..7e91fa02774f6 100644 --- a/decidim-meetings/lib/decidim/meetings/engine.rb +++ b/decidim-meetings/lib/decidim/meetings/engine.rb @@ -32,7 +32,11 @@ class Engine < ::Rails::Engine resource :live_event, only: :show namespace :polls do resources :questions, only: [:index, :update] - resources :answers, only: [:index, :create] + resources :answers, only: [:index, :create] do + collection do + get :admin + end + end end end scope "/meetings" do diff --git a/decidim-meetings/spec/commands/join_meeting_spec.rb b/decidim-meetings/spec/commands/join_meeting_spec.rb index bfb9aa1cea3bf..37a5973d4f7d2 100644 --- a/decidim-meetings/spec/commands/join_meeting_spec.rb +++ b/decidim-meetings/spec/commands/join_meeting_spec.rb @@ -4,7 +4,7 @@ module Decidim::Meetings describe JoinMeeting do - subject { described_class.new(meeting, user, registration_form) } + subject { described_class.new(meeting, form) } let(:organization) { create(:organization) } let(:participatory_process) { create(:participatory_process, organization:) } @@ -24,7 +24,23 @@ module Decidim::Meetings let(:user) { create(:user, :confirmed, organization:, notifications_sending_frequency: "none") } - let(:registration_form) { Decidim::Meetings::JoinMeetingForm.new } + let(:command) { described_class.new(form) } + + let(:user_group) { create(:user_group) } + + let(:form_params) do + { + user_group_id: user_group.id + } + end + + let(:form) do + Decidim::Meetings::JoinMeetingForm.from_params( + form_params + ).with_context( + current_user: user + ) + end let(:badge_notification) { hash_including(event: "decidim.events.gamification.badge_earned") } let(:user_notification) do @@ -63,7 +79,7 @@ module Decidim::Meetings context "when the form has public_participation set to true" do before do - registration_form.public_participation = true + form.public_participation = true end it "creates a registration for the meeting and the user with public participation" do @@ -252,7 +268,7 @@ module Decidim::Meetings let!(:questionnaire) { create(:questionnaire) } let!(:question) { create(:questionnaire_question, questionnaire:) } let(:session_token) { "some-token" } - let(:registration_form) { Decidim::Forms::QuestionnaireForm.from_model(questionnaire).with_context(session_token:) } + let(:form) { Decidim::Forms::QuestionnaireForm.from_model(questionnaire).with_context(session_token:, current_user: user) } context "and the registration form is invalid" do it "broadcast invalid_form" do @@ -262,8 +278,8 @@ module Decidim::Meetings context "and everything is ok" do before do - registration_form.tos_agreement = true - registration_form.responses.first.body = "My answer response" + form.tos_agreement = true + form.responses.first.body = "My answer response" end it "broadcasts ok" do @@ -288,9 +304,9 @@ module Decidim::Meetings context "when the form has public_participation set to true" do before do - registration_form.tos_agreement = true - registration_form.responses.first.body = "My answer response" - registration_form.public_participation = true + form.tos_agreement = true + form.responses.first.body = "My answer response" + form.public_participation = true end it "creates a registration for the meeting and the user with public participation" do diff --git a/decidim-meetings/spec/models/decidim/meetings/questionnaire_spec.rb b/decidim-meetings/spec/models/decidim/meetings/questionnaire_spec.rb index 7a6622fc50839..ceb4c7ccba3a1 100644 --- a/decidim-meetings/spec/models/decidim/meetings/questionnaire_spec.rb +++ b/decidim-meetings/spec/models/decidim/meetings/questionnaire_spec.rb @@ -34,13 +34,6 @@ module Meetings expect(questionnaire.questionnaire_for).to eq(questionable) end - describe "#questions_editable?" do - it "returns false when questionnaire has already answers" do - create(:meetings_poll_answer, questionnaire:) - expect(subject.reload).not_to be_questions_editable - end - end - describe "#all_questions_unpublished?" do it "returns true when all questionnaire questions are in unpublished state" do subject.questions << create(:meetings_poll_question, :unpublished) diff --git a/decidim-meetings/spec/system/admin/admin_manages_meetings_polls_spec.rb b/decidim-meetings/spec/system/admin/admin_manages_meetings_polls_spec.rb index 8167f3e0d4099..a27985ba0ef66 100644 --- a/decidim-meetings/spec/system/admin/admin_manages_meetings_polls_spec.rb +++ b/decidim-meetings/spec/system/admin/admin_manages_meetings_polls_spec.rb @@ -8,7 +8,7 @@ let(:current_component) { create(:component, participatory_space: participatory_process, manifest_name: "meetings") } let(:manifest_name) { "meetings" } let!(:meeting) { create(:meeting, scope:, services: [], component: current_component) } - let(:poll) { create(:poll) } + let(:poll) { create(:poll, meeting:) } let(:questionnaire) { create(:meetings_poll_questionnaire, questionnaire_for: poll) } let(:body) do { @@ -31,7 +31,7 @@ include_context "when managing a component as an admin" - context "when the questionnaire is not already answered" do + context "when the questionnaire has unpublished questions" do before do visit questionnaire_edit_path end @@ -239,15 +239,134 @@ end end - context "when the questionnaire is already answered" do - let!(:question) { create(:meetings_poll_question, questionnaire:, body:, question_type: "multiple_option") } - let!(:answer) { create(:meetings_poll_answer, questionnaire:, question:) } + context "when the questionnaire includes published and closed questions" do + let!(:unpublished_question) { create(:meetings_poll_question, :unpublished, questionnaire:, question_type: "single_option", position: 0) } + let!(:published_question) { create(:meetings_poll_question, :published, questionnaire:, question_type: "single_option", position: 1) } + let!(:closed_question) { create(:meetings_poll_question, :closed, questionnaire:, question_type: "single_option", position: 2) } - it "can modify questionnaire questions" do + it "displays all questions with inputs disabled for not unpublished questions" do + visit questionnaire_edit_path + + expand_all_questions + + expect(page).to have_css("input[value='#{translated_attribute(unpublished_question.body)}']:not([disabled])") + expect(page).to have_css("input[value='#{translated_attribute(published_question.body)}'][disabled='disabled']") + expect(page).to have_css("input[value='#{translated_attribute(closed_question.body)}'][disabled='disabled']") + end + + it "can create new questions" do + visit questionnaire_edit_path + + click_on "Add question" + + expand_all_questions + + within ".questionnaire-question:last-of-type" do + fill_in find_nested_form_field_locator("body_en"), with: "New question title" + page.all(".questionnaire-question-answer-option").each_with_index do |question_answer_option, answer_option_idx| + within question_answer_option do + fill_in find_nested_form_field_locator("body_en"), with: "New question answer option #{answer_option_idx + 1}" + end + end + end + click_on "Save" + + expect(page).to have_admin_callout("successfully") + + visit_questionnaire_edit_path_and_expand_all + + expect(page).to have_css("input[value='New question title']") + expect(page).to have_css("input[value='New question answer option 1']") + expect(page).to have_css("input[value='New question answer option 2']") + end + + it "can modify questionnaire open questions" do visit questionnaire_edit_path expect(page).to have_content("Add question") - expect(page).to have_no_content("Remove") + expand_all_questions + within "#questionnaire_question_#{unpublished_question.id}-field" do + expect(page).to have_content("Remove") + expect(page).to have_content("Add answer option") + fill_in find_nested_form_field_locator("body_en"), with: "Changed title" + page.all(".questionnaire-question-answer-option").each_with_index do |question_answer_option, answer_option_idx| + within question_answer_option do + fill_in find_nested_form_field_locator("body_en"), with: "Changed answer option #{answer_option_idx + 1}" + end + end + end + + click_on "Save" + + expect(page).to have_admin_callout("successfully") + + visit_questionnaire_edit_path_and_expand_all + + expect(page).to have_css("input[value='Changed title']") + expect(page).to have_css("input[value='Changed answer option 1']") + expect(page).to have_css("input[value='Changed answer option 2']") + expect(page).to have_css("input[value='Changed answer option 3']") + end + + context "when there are validation errors" do + before do + visit questionnaire_edit_path + click_on "Add question" + click_on "Save" + end + + it "keeps the content of blocked questions" do + expect(page).to have_content("There was a problem updating this meeting poll") + expand_all_questions + + expect(page).to have_css("input[value='#{translated_attribute(unpublished_question.body)}']:not([disabled])") + expect(page).to have_css("input[value='#{translated_attribute(published_question.body)}'][disabled='disabled']") + expect(page).to have_css("input[value='#{translated_attribute(closed_question.body)}'][disabled='disabled']") + end + end + + it "can reorder published or closed questions" do + visit questionnaire_edit_path + within "#questionnaire_question_#{unpublished_question.id}-field" do + expect(page).to have_content("Remove") + expect(page).to have_content("Down") + expect(page).to have_no_content("Up") + end + + within "#questionnaire_question_#{published_question.id}-field" do + expect(page).to have_no_content("Remove") + expect(page).to have_content("Down") + expect(page).to have_content("Up") + end + + within "#questionnaire_question_#{closed_question.id}-field" do + expect(page).to have_no_content("Remove") + expect(page).to have_no_content("Down") + expect(page).to have_content("Up") + end + + within "#questionnaire_question_#{closed_question.id}-field" do + click_on "Up" + click_on "Up" + end + + within "#questionnaire_question_#{unpublished_question.id}-field" do + click_on "Down" + end + + click_on "Save" + + expand_all_questions + + within ".questionnaire-question:last-of-type" do + expect(page).to have_css("#questionnaire_question_#{unpublished_question.id}-button") + end + within ".questionnaire-question:first-of-type" do + expect(page).to have_css("#questionnaire_question_#{closed_question.id}-button") + end + expect(unpublished_question.reload.position).to eq(2) + expect(published_question.reload.position).to eq(1) + expect(closed_question.reload.position).to eq(0) end end diff --git a/decidim-meetings/spec/system/admin/admin_manages_meetings_spec.rb b/decidim-meetings/spec/system/admin/admin_manages_meetings_spec.rb index 0ecaf464bcb4f..65479cd3a2838 100644 --- a/decidim-meetings/spec/system/admin/admin_manages_meetings_spec.rb +++ b/decidim-meetings/spec/system/admin/admin_manages_meetings_spec.rb @@ -15,6 +15,7 @@ let(:meeting_start_time) { base_date.utc.strftime("%H:%M") } let(:meeting_end_date) { ((base_date + 2.days) + 1.month).strftime("%d/%m/%Y") } let(:meeting_end_time) { (base_date + 4.hours).strftime("%H:%M") } + let(:attributes) { attributes_for(:meeting, component: current_component) } include_context "when managing a component as an admin" @@ -156,13 +157,12 @@ end within ".edit_meeting" do - fill_in_i18n( - :meeting_title, - "#meeting-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + fill_in_i18n(:meeting_title, "#meeting-title-tabs", **attributes[:title].except("machine_translations")) + + fill_in_i18n(:meeting_location, "#meeting-location-tabs", **attributes[:location].except("machine_translations")) + fill_in_i18n(:meeting_location_hints, "#meeting-location_hints-tabs", **attributes[:location_hints].except("machine_translations")) + fill_in_i18n_editor(:meeting_description, "#meeting-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_geocoding :meeting_address, with: address find("*[type=submit]").click @@ -171,8 +171,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My new title") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} meeting on the") end it "sets registration enabled to true when registration type is on this platform" do @@ -269,37 +272,13 @@ it "creates a new meeting", :serves_geocoding_autocomplete do click_on "New meeting" - fill_in_i18n( - :meeting_title, - "#meeting-title-tabs", - en: "My meeting", - es: "Mi meeting", - ca: "El meu meeting" - ) + fill_in_i18n(:meeting_title, "#meeting-title-tabs", **attributes[:title].except("machine_translations")) select "In person", from: :meeting_type_of_meeting - fill_in_i18n( - :meeting_location, - "#meeting-location-tabs", - en: "Location", - es: "Location", - ca: "Location" - ) - fill_in_i18n( - :meeting_location_hints, - "#meeting-location_hints-tabs", - en: "Location hints", - es: "Location hints", - ca: "Location hints" - ) - fill_in_i18n_editor( - :meeting_description, - "#meeting-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:meeting_location, "#meeting-location-tabs", **attributes[:location].except("machine_translations")) + fill_in_i18n(:meeting_location_hints, "#meeting-location_hints-tabs", **attributes[:location_hints].except("machine_translations")) + fill_in_i18n_editor(:meeting_description, "#meeting-description-tabs", **attributes[:description].except("machine_translations")) fill_in_geocoding :meeting_address, with: address fill_in_services @@ -321,8 +300,11 @@ expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My meeting") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} meeting on the") end context "when using the front-end geocoder", :serves_geocoding_autocomplete do diff --git a/decidim-meetings/spec/system/comments_spec.rb b/decidim-meetings/spec/system/comments_spec.rb index faa0350899bba..5198ef191b8c6 100644 --- a/decidim-meetings/spec/system/comments_spec.rb +++ b/decidim-meetings/spec/system/comments_spec.rb @@ -20,4 +20,11 @@ let(:resource_path) { resource_locator(commentable).path } include_examples "comments" + + context "with comments blocked" do + let!(:component) { create(:component, manifest_name: :meetings, participatory_space:, organization:) } + let(:participatory_space) { create(:participatory_process, :with_steps, organization:) } + + include_examples "comments blocked" + end end diff --git a/decidim-meetings/spec/system/live_meeting_admin_questions_spec.rb b/decidim-meetings/spec/system/meeting_questions_administrate_spec.rb similarity index 72% rename from decidim-meetings/spec/system/live_meeting_admin_questions_spec.rb rename to decidim-meetings/spec/system/meeting_questions_administrate_spec.rb index 7fe64d349a523..d28a9192f9b0e 100644 --- a/decidim-meetings/spec/system/live_meeting_admin_questions_spec.rb +++ b/decidim-meetings/spec/system/meeting_questions_administrate_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "Meeting live event poll administration" do +describe "Meeting poll administration" do include_context "when managing a component" do let(:component_organization_traits) { admin_component_organization_traits } end @@ -24,7 +24,7 @@ let(:manifest_name) { "meetings" } - let(:meeting) { create(:meeting, :published, :online, :live, component:) } + let(:meeting) { create(:meeting, :published, component:) } let(:meeting_path) do decidim_participatory_process_meetings.meeting_path( participatory_process_slug: participatory_process.slug, @@ -32,13 +32,6 @@ id: meeting.id ) end - let(:meeting_live_event_path) do - decidim_participatory_process_meetings.meeting_live_event_path( - participatory_process_slug: participatory_process.slug, - component_id: component.id, - meeting_id: meeting.id - ) - end let(:body_multiple_option_question) do { en: "This is the first question", @@ -56,17 +49,24 @@ let!(:poll) { create(:poll, meeting:) } let!(:questionnaire) { create(:meetings_poll_questionnaire, questionnaire_for: poll) } - before do - visit meeting_live_event_path - click_on "Administrate" - end - context "when all questions are unpublished" do let!(:question_multiple_option) { create(:meetings_poll_question, :unpublished, questionnaire:, body: body_multiple_option_question, question_type: "multiple_option") } let!(:question_single_option) { create(:meetings_poll_question, :unpublished, questionnaire:, body: body_single_option_question, question_type: "single_option") } + before do + visit meeting_path + within("[aria-label='aside']") do + click_link_or_button "Reply poll" + end + click_link_or_button "Administrate" + end + it "list the questions in the Administrate section" do - expect(page.all(".meeting-polls__question--admin").size).to eq(2) + expect(page.all(".meeting-polls__question--admin:not([disabled])", visible: :visible).size).to eq(2) + end + + it "shows the status of each question" do + expect(page).to have_content("Pending to be sent", count: 2) end it "allows to edit a question in the administrator" do @@ -82,12 +82,14 @@ it "allows to publish an unpublished question" do open_first_question + expect(page).to have_css(".meeting-polls__admin-action-question:not([disabled])", visible: :visible) within ".meeting-polls__admin-action-question" do click_on "Send" expect(page).to have_content("Sent") expect(page).to have_content("0 received answers") end + expect(page).to have_css("[data-question='#{question_multiple_option.id}']", text: "Sent (open)") end end @@ -100,6 +102,15 @@ let!(:answer_choice_user1) { create(:meetings_poll_answer_choice, answer: answer_user1, answer_option: question_multiple_option.answer_options.first) } let!(:answer_choice_user2) { create(:meetings_poll_answer_choice, answer: answer_user2, answer_option: question_multiple_option.answer_options.first) } + before do + visit meeting_path + within("[aria-label='aside']") do + click_link_or_button "Reply poll" + end + + click_link_or_button "Administrate" + end + it "allows to see question answers" do open_first_question @@ -107,8 +118,13 @@ expect(page).to have_content("100%") end + it "shows the status of each question" do + expect(page).to have_content("Sent (open)", count: 1) + end + it "allows to close a published question" do open_first_question + expect(page).to have_css(".meeting-polls__admin-action-results:not([disabled])", visible: :visible) within ".meeting-polls__admin-action-results" do click_on "Send" @@ -117,6 +133,7 @@ question_multiple_option.reload expect(question_multiple_option).to be_closed + expect(page).to have_css("[data-question='#{question_multiple_option.id}']", text: "Results sent (closed)") end end @@ -127,6 +144,8 @@ def questionnaire_edit_path end def open_first_question - page.first(".meeting-polls__question--admin").click + expect(page).to have_css(".meeting-polls__question--admin:not([disabled])", visible: :visible) + sleep(2) + find(".meeting-polls__question--admin", match: :first).click end end diff --git a/decidim-meetings/spec/system/live_meeting_answer_questions_spec.rb b/decidim-meetings/spec/system/meeting_questions_reply_poll_spec.rb similarity index 68% rename from decidim-meetings/spec/system/live_meeting_answer_questions_spec.rb rename to decidim-meetings/spec/system/meeting_questions_reply_poll_spec.rb index 81af649d72128..87cdd4cf3383b 100644 --- a/decidim-meetings/spec/system/live_meeting_answer_questions_spec.rb +++ b/decidim-meetings/spec/system/meeting_questions_reply_poll_spec.rb @@ -2,22 +2,22 @@ require "spec_helper" -describe "Meeting live event poll answer" do +describe "Meeting poll answer" do include_context "with a component" let(:manifest_name) { "meetings" } - let(:user2) do + let(:user) do create(:user, :confirmed, organization:) end let(:meeting) { create(:meeting, :published, :online, :live, component:) } - let(:meeting_live_event_path) do - decidim_participatory_process_meetings.meeting_live_event_path( + let(:meeting_path) do + decidim_participatory_process_meetings.meeting_path( participatory_process_slug: participatory_process.slug, component_id: component.id, - meeting_id: meeting.id + id: meeting.id ) end let(:body_multiple_option_question) do @@ -37,9 +37,13 @@ let!(:poll) { create(:poll, meeting:) } let!(:questionnaire) { create(:meetings_poll_questionnaire, questionnaire_for: poll) } - before do - login_as user, scope: :user - visit meeting_live_event_path + context "when there are no questions" do + it "does not show a link to reply poll" do + login_as user, scope: :user + visit meeting_path + + expect(page).to have_no_content("Reply poll") + end end context "when all questions are unpublished" do @@ -47,12 +51,16 @@ let!(:question_single_option) { create(:meetings_poll_question, :unpublished, questionnaire:, body: body_single_option_question, question_type: "single_option") } before do - visit meeting_live_event_path + login_as user, scope: :user + visit meeting_path + within("[aria-label='aside']") do + click_link_or_button "Reply poll" + end end it "does not list any question" do - click_on "Questions (0)" expect(page.all(".meeting-polls__question--admin").size).to eq(0) + expect(page).to have_content("some questions will be sent") end end @@ -61,12 +69,16 @@ let!(:question_single_option) { create(:meetings_poll_question, :published, questionnaire:, body: body_single_option_question, question_type: "single_option") } before do - visit meeting_live_event_path + login_as user, scope: :user + visit meeting_path + within("[aria-label='aside']") do + click_link_or_button "Reply poll" + end end it "allows to reply a question" do - click_on "Questions (2)" open_first_question + expect(page).to have_css("details[data-question='#{question_multiple_option.id}'] input[type='checkbox']:not([disabled])", visible: :visible, count: 3) check question_multiple_option.answer_options.first.body["en"] click_on "Reply question" @@ -75,8 +87,10 @@ end it "does not allow selecting two single options" do - click_on "Questions (2)" + expect(page).to have_css("details[data-question='#{question_single_option.id}']:not([disabled])", visible: :visible) + sleep(2) find("details[data-question='#{question_single_option.id}']").click + expect(page).to have_css("details[data-question='#{question_single_option.id}'] input[type='radio']:not([disabled])", visible: :visible, count: 3) choose question_single_option.answer_options.first.body["en"] choose question_single_option.answer_options.second.body["en"] @@ -88,14 +102,15 @@ end it "does not allow selecting more than the maximum choices for multiple options" do - click_on "Questions (2)" open_first_question + expect(page).to have_css("details[data-question='#{question_multiple_option.id}'] input[type='checkbox']:not([disabled])", visible: :visible, count: 3) check question_multiple_option.answer_options.first.body["en"] check question_multiple_option.answer_options.second.body["en"] check question_multiple_option.answer_options.third.body["en"] - expect(page).to have_content("There are too many choices selected") + click_on "Reply question" + expect(page).to have_content("You can choose a maximum of 2.") end end @@ -105,11 +120,14 @@ let!(:answer_choice_user1) { create(:meetings_poll_answer_choice, answer: answer_user1) } before do - visit meeting_live_event_path + login_as user, scope: :user + visit meeting_path + within("[aria-label='aside']") do + click_link_or_button "View poll" + end end it "shows the responses" do - click_on "Questions (1)" open_first_question expect(page).to have_content("0%") @@ -124,6 +142,8 @@ def questionnaire_edit_path end def open_first_question - page.first(".meeting-polls__question").click + expect(page).to have_css(".meeting-polls__question:not([disabled])", visible: :visible) + sleep(2) + find(".meeting-polls__question", match: :first).click end end diff --git a/decidim-meetings/spec/system/meeting_registrations_spec.rb b/decidim-meetings/spec/system/meeting_registrations_spec.rb index 90cd57f1f94ae..e6035ec03cab7 100644 --- a/decidim-meetings/spec/system/meeting_registrations_spec.rb +++ b/decidim-meetings/spec/system/meeting_registrations_spec.rb @@ -156,6 +156,18 @@ def questionnaire_public_path login_as user, scope: :user end + context "and the meeting is happening now" do + before do + meeting.update!(start_time: 1.hour.ago, end_time: 1.hour.from_now) + end + + it "does not show the registration button" do + visit_meeting + + expect(page).to have_no_css(".button", text: "Register") + end + end + context "and they ARE NOT part of a verified user group" do it "they can join the meeting and automatically follow it" do visit_meeting diff --git a/decidim-meetings/spec/system/user_creates_meeting_spec.rb b/decidim-meetings/spec/system/user_creates_meeting_spec.rb index 80b7fbbcefe85..4305479514216 100644 --- a/decidim-meetings/spec/system/user_creates_meeting_spec.rb +++ b/decidim-meetings/spec/system/user_creates_meeting_spec.rb @@ -228,7 +228,7 @@ expect(page).to have_content(meeting_address) expect(page).to have_content(meeting_start_time) expect(page).to have_content(meeting_end_time) - expect(page).to have_css(".button", text: "Register") + expect(page).to have_no_css(".button", text: "Register") expect(page).to have_css("[data-author]", text: user_group.name) end end diff --git a/decidim-pages/config/locales/bg.yml b/decidim-pages/config/locales/bg.yml index f705f6908c98d..5cf8493d0f576 100644 --- a/decidim-pages/config/locales/bg.yml +++ b/decidim-pages/config/locales/bg.yml @@ -28,3 +28,5 @@ bg: update: invalid: Възникна проблем при запазване на страницата. success: Страницата е успешно съхранена. + show: + empty: Все още няма съдържание на тази страница. diff --git a/decidim-pages/config/locales/tr-TR.yml b/decidim-pages/config/locales/tr-TR.yml index 9a8e0165aa28e..046c6f6d147e0 100644 --- a/decidim-pages/config/locales/tr-TR.yml +++ b/decidim-pages/config/locales/tr-TR.yml @@ -28,3 +28,5 @@ tr: update: invalid: Sayfa kaydedilirken bir sorun oluştu. success: Sayfa başarıyla kaydedildi. + show: + empty: Bu sayfada henüz içerik bulunmamaktadır. diff --git a/decidim-pages/spec/system/admin_spec.rb b/decidim-pages/spec/system/admin_spec.rb index 004f1614680ac..18279e561e0c2 100644 --- a/decidim-pages/spec/system/admin_spec.rb +++ b/decidim-pages/spec/system/admin_spec.rb @@ -21,17 +21,13 @@ visit_component_admin end - it_behaves_like "having a rich text editor for field", ".tabs-content[data-tabs-content='page-body-tabs']", "full" + let!(:attributes) { attributes_for(:static_page) } - it "updates the page" do - new_body = { - en: "

New body

", - ca: "

Nou cos

", - es: "

Nuevo cuerpo

" - } + it_behaves_like "having a rich text editor for field", ".tabs-content[data-tabs-content='page-body-tabs']", "full" + it "updates the page", versioning: true do within "form.edit_page" do - fill_in_i18n_editor(:page_body, "#page-body-tabs", new_body) + fill_in_i18n_editor(:page_body, "#page-body-tabs", **attributes[:content].except("machine_translations")) find("*[type=submit]").click end @@ -39,7 +35,10 @@ visit_component - expect(page).to have_content("New body") + expect(page).to have_content(translated(component.name)) + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(component.name)} page") end end diff --git a/decidim-participatory_processes/app/queries/decidim/participatory_processes/stats_participants_count.rb b/decidim-participatory_processes/app/queries/decidim/participatory_processes/stats_participants_count.rb index b19749e13dd7e..ab97796bf3e54 100644 --- a/decidim-participatory_processes/app/queries/decidim/participatory_processes/stats_participants_count.rb +++ b/decidim-participatory_processes/app/queries/decidim/participatory_processes/stats_participants_count.rb @@ -22,9 +22,9 @@ def query debates_query, meetings_query, endorsements_query, - project_supports_query, + project_votes_query, proposals_query, - proposal_supports_query, + proposal_votes_query, survey_answer_query ].flatten.uniq.count end @@ -93,7 +93,7 @@ def proposals_query .uniq end - def proposal_supports_query + def proposal_votes_query return [] unless Decidim.module_installed?(:proposals) Decidim::Proposals::ProposalVote @@ -105,7 +105,7 @@ def proposal_supports_query .uniq end - def project_supports_query + def project_votes_query return [] unless Decidim.module_installed?(:budgets) Decidim::Budgets::Order.joins(budget: [:component]) diff --git a/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb b/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb index 142b3866662b1..829ded669fe09 100644 --- a/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb +++ b/decidim-participatory_processes/app/views/decidim/participatory_processes/admin/participatory_processes/index.html.erb @@ -34,6 +34,8 @@ <% end %> <% if allowed_to? :update, :process, process: process %> <%= link_to translated_attribute(process.title), edit_participatory_process_path(process) %>
+ <% elsif allowed_to? :read, :component, process: process %> + <%= link_to translated_attribute(process.title), components_path(process) %>
<% else %> <%= translated_attribute(process.title) %> <% end %> diff --git a/decidim-participatory_processes/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb b/decidim-participatory_processes/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb index 700054c4efc2b..e1e09fe134738 100644 --- a/decidim-participatory_processes/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb +++ b/decidim-participatory_processes/app/views/decidim/participatory_processes/participatory_process_groups/show.html.erb @@ -10,11 +10,11 @@ ) %> -
+
<% active_content_blocks.each do |content_block| %> <% next unless content_block.manifest %> <%= cell content_block.manifest.cell, content_block %> <% end %> -
+ <%= append_javascript_pack_tag "decidim_participatory_processes" %> diff --git a/decidim-participatory_processes/config/locales/bg.yml b/decidim-participatory_processes/config/locales/bg.yml index 9e37c1915215b..2c2a235df2a94 100644 --- a/decidim-participatory_processes/config/locales/bg.yml +++ b/decidim-participatory_processes/config/locales/bg.yml @@ -11,9 +11,514 @@ bg: decidim_area_id: Район description: Описание developer_group: Група за популяризиране + document: Документ domain: Домейн end_date: Крайна дата hashtag: Хаштаг hero_image: Изображение за начална страница + import_attachments: Импортиране на прикачени файлове + import_categories: Импортиране на категории + import_components: Импортиране на компоненти + import_steps: Стъпки за импортиране local_area: Район на организацията meta_scope: Метаданни сфера + participatory_process_group_id: Група процеси + participatory_process_type_id: Тип на процесите + participatory_scope: Какво е решено + participatory_structure: Как е решено + private_space: Частен процес + promoted: Промотирано + published_at: Публикувано на + related_process_ids: Свързани процеси + scope_id: Обхват + scope_type_max_depth_id: Дълбочина на филтъра за обхвата + scopes_enabled: Обхватите са активирани + short_description: Кратко описание + show_metrics: Показване на показатели + show_statistics: Покажи статистиките + slug: Съкратен URL + start_date: Начална дата + subtitle: Подзаглавие + target: Кой участва + title: Заглавие + weight: Подредба на позиция + participatory_process_group: + description: Описание + developer_group: Група за популяризиране + group_url: Уебсайт + hashtag: Хаштаг + hero_image: Изображение + local_area: Област на организацията + meta_scope: Метаданни за обхвата + participatory_process_ids: Свързани процеси + participatory_scope: Какво е решено + participatory_structure: Как е решено + target: Кой участва + title: Заглавие + participatory_process_step: + cta_path: Път на фразата, подтикваща към действие + cta_text: Текст на призива към действие + description: Описание + end_date: Крайна дата + short_description: Кратко описание + start_date: Начална дата + title: Заглавие + participatory_process_type: + title: Заглавие + participatory_process_user_role: + email: Имейл + name: Име + role: Роля + errors: + models: + participatory_process: + attributes: + document: + allowed_file_content_types: 'Невалиден файлов формат. Позволени са само файлове със следните разширения: %{types}' + models: + decidim/participatory_process_step_activated_event: Фазата е активирана + decidim/participatory_process_step_changed_event: Променена фаза + activerecord: + models: + decidim/participatory_process: + one: Процес на участие + other: Процеси на участие + decidim/participatory_process_group: + one: Група на процеса за участие + other: Групи на процеса за участие + decidim/participatory_process_step: + one: Фаза + other: Фази + decidim: + admin: + actions: + activate: Активиране + configure: Конфигуриране + confirm_destroy: Потвърждаване за изтриване + destroy: Изтрий + duplicate: Дубликирай + edit: Редактирай + import_process: Импортиране + moderate: Модериране + new_process: Нов процес + new_process_group: Нова група на процеса + new_process_step: Нова фаза + new_process_type: Нов тип процес + new_process_user_role: Нов администратор на процес + preview: Преглед + publish: Публикувай + resend_invitation: Изпратете отново покана + see_process: Вижте процеса + unpublish: Отмяна на публикуването + filters: + decidim_participatory_process_group_id_eq: + label: По група на процеса + menu: + participatory_process_groups: Групи процеси + participatory_process_groups_submenu: + info: Информация + landing_page: Целева страница + participatory_process_types: Типове процеси + participatory_processes: Процеси + participatory_processes_submenu: + attachment_collections: Папки + attachment_files: Файлове + attachments: Прикачени файлове + categories: Категории + components: Компоненти + info: Относно този процес + landing_page: Целева страница + moderations: Модерации + private_users: Частни участници + process_admins: Администратори на процеси + steps: Фази + models: + participatory_process: + fields: + actions: Активности + created_at: Създадено на + private: Частни + published: Публикувано + title: Заглавие + name: Процес на участие + participatory_process_group: + fields: + title: Заглавие + name: Група на процеса + participatory_process_step: + fields: + end_date: Крайна дата + start_date: Начална дата + title: Заглавие + name: Фаза на процес на участие + participatory_process_type: + fields: + created_at: Създадено на + title: Заглавие + name: Вид на процеса + participatory_process_user_role: + fields: + email: Имейл + name: Име + role: Роля + name: Администратор на процес на участие + roles: + admin: Администратор + collaborator: Сътрудник + moderator: Модератор + valuator: Оценител + user: + fields: + invitation_accepted_at: 'Поканата е приета на:' + invitation_sent_at: Поканата е изпратена на + participatory_process_copies: + new: + copy: Копиране + select: Изберете кои данни искате да дублирате + title: Дублиране на процеси на участие + participatory_process_groups: + destroy: + error: Възникна грешка при премахването на групата на процеса на участие. + success: Групата на процеса на участие беше изтрита успешно. + edit: + title: Редактиране на групата на процеса + update: Актуализация + new: + create: Създаване + title: Нова група на процеса + update: + error: Възникна проблем при актуализирането на тази група на процеса на участие. + success: Групата на процеса на участие беше актуализирана успешно. + participatory_process_imports: + create: + error: Възникна проблем при импортирането на този процес на участие. + success: Процесът на участие беше импортиран успешно. + new: + import: Импортиране + select: Изберете кои данни искате да импортирате + title: Импортиране на процес на участие + participatory_process_publications: + create: + error: Възникна проблем при публикуването на този процес на участие. + success: Процесът на участие беше публикуван успешно. + destroy: + error: Възникна проблем при премахването на публикацията на този процес на участие. + success: Публикацията на процеса на участие беше премахната успешно. + participatory_process_step_activations: + create: + error: Възникна проблем при активирането на този етап на процеса на участие. + success: Групата на процеса на участие беше активирана успешно. + participatory_process_steps: + create: + error: Възникна проблем при създаването на нов етап на процеса на участие. + success: Етапът на процеса на участие беше създаден успешно. + default_title: Въведение + destroy: + error: + active_step: Не може да се изтрие активна фаза. + last_step: Не може да се изтрие последната фаза от процес. + success: Етапът на процеса на участие беше изтрит успешно. + edit: + cta_deprecated: + body_html: |- + Конфигурирането на CTA през фазата на процеса на участие е отхвърлено с новия дизайн. + Сега това се прави в целевата страница, като се използва блокът за съдържание герой и изображение. + Оставихме го тук, за да можете да мигрирате CTA, от които се нуждаете. Полетата Call to action path и + Текстът на подканващата фраза ще бъде премахнат в следващата версия. + title: CTA е остарял + title: Редактиране на етап на процес на участие + update: Актуализация + index: + steps_title: Етапи + new: + create: Създаване + title: Нов етап на процес на участие + ordering: + error: Възникна проблем при промяната на реда на тези етапи на процеса на участие. + update: + error: Възникна проблем при актуализирането на тази фаза от процеса на участие. + success: Фазата на участие е актуализирана успешно. + participatory_process_types: + create: + error: Възникна проблем при създаването на нов тип процес. + success: Типът процес е създаден успешно. + destroy: + success: Типът процес е изтрит успешно. + edit: + title: Редактиране на типа процес + update: Актуализация + new: + create: Създаване + title: Нов тип процес + update: + error: Възникна проблем при актуализирането на този тип процес. + success: Типът процес е актуализиран успешно. + participatory_process_user_roles: + create: + error: Възникна проблем при добавянето на участник за този процес на участие. + success: Администраторът успешно е добавен към този процес на участие. + destroy: + success: Администраторът успешно премахнат от този процес на участие. + edit: + title: Актуализиране на администратора на процеса на участие + update: Актуализация + index: + process_admins_title: Администратори на процес на участие + new: + create: Създаване + title: Нов администратор на процес на участие + update: + error: Възникна проблем при актуализирането на администратор за този процес на участие. + success: Администраторът беше актуализиран успешно за този процес на участие. + participatory_processes: + create: + error: Възникна проблем при създаването на нов процес на участие. + success: Процесът на участие е създаден успешно. Конфигурирайте сега неговите фази. + edit: + update: Актуализация + index: + private: Частни + public: Публично + published: Публикувано + unpublished: Непубликувано + new: + create: Създаване + title: Нов процес на участие + update: + error: Възникна проблем при актуализирането на този процес на участие. + success: Процесът на участие беше актуализиран успешно. + participatory_processes_copies: + create: + error: Възникна проблем при дублирането на този процес на участие. + success: Процесът на участие беше дублиран успешно. + participatory_processes_group: + create: + error: Възникна проблем при създаването на нова група на процеса на участие. + success: Групата на процеса на участие беше създадена успешно. + titles: + participatory_process_groups: Групи на процеса за участие + participatory_process_types: Типове процеси на участие + participatory_processes: Процеси на участие + users: + resend_invitation: + error: Възникна проблем при повторното изпращане на поканата. + success: Поканата беше изпратена повторно успешно. + admin_log: + participatory_process: + create: "%{user_name} създаде процеса на участие %{resource_name}" + duplicate: "%{user_name} дублира процеса на участие %{resource_name}" + export: "%{user_name} експортира процеса на участие %{resource_name}" + import: "%{user_name} импортира процеса на участие %{resource_name}" + publish: "%{user_name} публикува процеса на участие %{resource_name}" + unpublish: "%{user_name} премахна публикацията на процеса на участие %{resource_name}" + update: "%{user_name} актуализира процеса на участие %{resource_name}" + participatory_process_group: + create: "%{user_name} създаде групата на процеса на участие %{resource_name}" + update: "%{user_name} актуализира групата на процеса на участие %{resource_name}" + participatory_process_step: + activate: "%{user_name} активира етапа %{resource_name} в процеса на участие %{space_name}" + create: "%{user_name} създаде етапа %{resource_name} в процеса на участие %{space_name}" + delete: "%{user_name} изтри фазата %{resource_name} в процеса на участие %{space_name}" + update: "%{user_name} актуализира фазата %{resource_name} в процеса на участие %{space_name}" + participatory_process_type: + create: "%{user_name} създаде %{resource_name} тип процес на участие" + delete: "%{user_name} изтри типа процес на участие %{resource_name}" + update: "%{user_name} актуализира %{resource_name} тип процес на участие" + participatory_process_user_role: + create: "%{user_name} покани участника %{resource_name} в процеса на участие %{space_name}" + delete: "%{user_name} премахна участника %{resource_name} от процеса на участие %{space_name}" + update: "%{user_name} промени ролята на участника %{resource_name} в процеса на участие %{space_name}" + events: + participatory_process: + role_assigned: + email_intro: Назначени сте като %{role} за процес на участие „%{resource_title}“. + email_outro: Получавате това известие, защото сте %{role} на процеса на участие „%{resource_title}“. + email_subject: Назначени сте като %{role} за „%{resource_title}“. + notification_title: Назначени сте като %{role} за процес на участие %{resource_title}. + step_activated: + email_intro: 'Фазата %{resource_title} вече е активна за %{participatory_space_title}. Можете да го видите от тази страница:' + email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк. + email_subject: Актуализиране на %{participatory_space_title} + notification_title: Фазата %{resource_title} вече е активна за %{participatory_space_title} + step_changed: + email_intro: 'Фазата %{resource_title} вече е активна за %{participatory_space_title}:' + email_outro: Датите за фазата %{resource_title} в %{participatory_space_title} са актуализирани. Можете да го видите от тази страница. + email_subject: Актуализация на %{participatory_space_title} + notification_title: Датите за фазата %{resource_title} в %{participatory_space_title} са актуализирани. + help: + participatory_spaces: + participatory_processes: + contextual: "

Процесът на участие е поредица от дейности на участие (напр. първо попълване на анкета, след това даване на предложения, обсъждането им на лични или виртуални срещи и накрая приоритизирането им) с цел за дефиниране и вземане на решение по конкретна тема.

Примери за процеси на участие са: процес на избиране на членове на комисия (където кандидатурите първо се представят, след това се обсъждат и накрая се избира кандидатура), бюджети на участието (където се правят предложения, оценяват се икономически и се гласува с наличните пари), процес на стратегическо планиране, съвместно изготвяне на регламент или норма, проектиране на градско пространство или изготвяне на план за обществена политика.

" + page: "

Процесът на участие е поредица от дейности на участие (напр. първо попълване на анкета, след това даване на предложения, обсъждането им на лични или виртуални срещи и накрая приоритизирането им) с цел за дефиниране и вземане на решение по конкретна тема.

Примери за процеси на участие са: процес на избиране на членове на комисия (където кандидатурите първо се представят, след това се обсъждат и накрая се избира кандидатура), бюджети на участието (където се правят предложения, оценяват се икономически и се гласува с наличните пари), процес на стратегическо планиране, съвместно изготвяне на регламент или норма, проектиране на градско пространство или изготвяне на план за обществена политика.

" + title: Какво е процес на участие? + log: + value_types: + participatory_process_type_presenter: + not_found: 'Типът процес не е намерен в базата данни (ID: %{id}).' + menu: + processes: Процеси + metrics: + participatory_processes: + description: Брой на процесите на участие в тази организация + object: процеси на участие + title: Процеси на участие + participatory_process_groups: + content_blocks: + extra_data: + developer_group: Промотирано от + name: Метаданни + participatory_scope: Какво е решено + participatory_structure: Как е решено + target: Кой участва + html: + name: HTML блок + html_1: + name: Първи HTML блок + html_2: + name: Втори HTML блок + html_3: + name: Трети HTML блок + main_data: + name: Заглавие и описание + participatory_processes: + active: Активни процеси на участие + name: Процеси на участие + stats: + name: Статистики + title: + meta_scope: Обхват + participatory_processes: + one: 1 процес + other: "%{count} процеса" + show: + title: Групи на процеса за участие + participatory_process_steps: + index: + process_steps: Фази на процеса + participatory_processes: + admin: + content_blocks: + highlighted_processes: + active: Активно + all: Всички + max_results: Максимален брой елементи, които да се показват + selection_criteria: Критерии за подбор + new_import: + accepted_types: + json: JSON + participatory_process_copies: + form: + slug_help_html: 'Съкратените URL се използват за генериране на URL адреси, които сочат към този процес. Приема само букви, цифри и тирета и трябва да започва с буква. Пример: %{url}' + participatory_process_groups: + form: + metadata: Метаданни + title: Относно този процес + visibility: Видимост + participatory_process_imports: + form: + document_legend: Добавяне на документ + slug_help_html: 'Съкратените URL се използват за генериране на URL адреси, които сочат към този процес. Приема само букви, цифри и тирета и трябва да започва с буква. Пример: %{url}' + participatory_process_steps: + form: + cta_path_help_html: 'Използвайте частични пътища, а не пълни URL адреси тук. Приема букви, цифри, тирета и наклонени черти и трябва да започва с буква. Ако не е зададено, бутонът няма да се показва. Пример: %{url}' + cta_text_help: Ако не бъде настроен, бутонът няма да се показва. + participatory_processes: + form: + announcement_help: Текстът, който въведете тук, ще се показва на потребителите под информацията за процеса. + duration: Продължителност + filters: Филтри + images: Изображения + metadata: Метаданни + other: Друго + related_processes: Свързани процеси + scope_type_max_depth_help: Ограничете дълбочината на филтъра за обхвата; Филтърът ще извежда данни от общото положение до избрания тип обхват. + select_an_area: Изберете област + select_participatory_process_type: Изберете тип процес + select_process_group: Изберете група на процеса + slug_help_html: 'Съкратените URL се използват за генериране на URL адреси, които сочат към този процес. Приема само букви, цифри и тирета и трябва да започва с буква. Пример: %{url}' + title: Основна информация + visibility: Видимост + content_blocks: + extra_data: + name: Фаза и продължителност + hero: + name: Профилно изображение и бутон "Призив към действие" + highlighted_processes: + name: Акцентирани процеси + related_processes: + name: Свързани процеси + index: + title: Процеси на участие + last_activity: + new_participatory_process: Нов процес на участие + pages: + home: + highlighted_processes: + active_spaces: Активни процеси + see_all_spaces: Вижте всички процеси + participatory_process_steps: + index: + back_to_process: Назад към страницата на процеса + participatory_processes: + description: + area_name: Област + data: Данни за процеса + developer_group: Група за популяризиране + local_area: Област на организацията + meta_scope: Обхват + participatory_scope: Какво е решено + participatory_structure: Как е решено + target: Кой участва + title: Относно този процес + filters: + all_types: Всички типове + counters: + active: + one: 1 активен процес + other: "%{count} активни процеса" + all: + one: 1 процес + other: "%{count} процеса" + past: + one: 1 предишен процес + other: "%{count} предишни процеси" + upcoming: + one: 1 предстоящ процес + other: "%{count} предстоящи процеса" + date: Дата + explanations: + no_active: Няма активни процеси. + no_active_nor_upcoming: Няма активни или предстоящи процеси. + no_active_nor_upcoming_callout: Няма активни или предстоящи процеси. Тук можете да намерите списък на миналите такива. + filter_by: Покажи + names: + active: Активно + all: Всички + past: Минали + upcoming: Предстоящо + see: Виж + type: Тип + show: + title: Относно този процес + show: + belongs_to_group: Този процес принадлежи на + private_space: Това е частен процес + related_processes: Свързани процеси + statistics: + processes_count: Процеси + layouts: + decidim: + participatory_process_groups: + participatory_process_group: + browse: Разглеждане + browse_resource: Разглеждане на група на процеса %{resource_name} + processes_count: 'Процеса:' + participatory_processes: + index: + promoted_processes: Акцентирани процеси + participatory_process: + active_step: Текуща фаза + more_info: Повече информация + more_info_about: Повече информация за процеса %{resource_name} + take_part: Участвайте + take_part_in: Участвайте в процеса %{resource_name} diff --git a/decidim-participatory_processes/db/migrate/20240529161054_add_link_to_decidim_attachments.rb b/decidim-participatory_processes/db/migrate/20240529161054_add_link_to_decidim_attachments.rb new file mode 100644 index 0000000000000..e744b1497a2c6 --- /dev/null +++ b/decidim-participatory_processes/db/migrate/20240529161054_add_link_to_decidim_attachments.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddLinkToDecidimAttachments < ActiveRecord::Migration[6.1] + def change + add_column :decidim_attachments, :link, :string + end +end diff --git a/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb b/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb index 4fdd6459d397d..4e04a9c4edb11 100644 --- a/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb +++ b/decidim-participatory_processes/lib/decidim/participatory_processes/test/factories.rb @@ -141,6 +141,7 @@ end title { generate_localized_title(:participatory_process_step_title, skip_injection:) } description { generate_localized_description(:participatory_process_step_description, skip_injection:) } + cta_text { generate_localized_description(:participatory_process_step_cta_text, skip_injection:) } start_date { 1.month.ago } end_date { 2.months.from_now } position { nil } diff --git a/decidim-participatory_processes/spec/shared/manage_participatory_process_private_users_examples.rb b/decidim-participatory_processes/spec/shared/manage_participatory_process_private_users_examples.rb index 2d645ff4a029d..c2ca65cb049a4 100644 --- a/decidim-participatory_processes/spec/shared/manage_participatory_process_private_users_examples.rb +++ b/decidim-participatory_processes/spec/shared/manage_participatory_process_private_users_examples.rb @@ -35,6 +35,9 @@ within "#private_users table" do expect(page).to have_content(other_user.email) end + + visit decidim_admin.root_path + expect(page).to have_content("invited #{other_user.name} to be a private participant") end describe "when import a batch of private users from csv" do @@ -78,7 +81,6 @@ Decidim::Admin::CreateParticipatorySpacePrivateUser.call( form, - user, participatory_process ) diff --git a/decidim-participatory_processes/spec/shared/manage_process_admins_examples.rb b/decidim-participatory_processes/spec/shared/manage_process_admins_examples.rb index 552797fd16f3e..deecc7c943672 100644 --- a/decidim-participatory_processes/spec/shared/manage_process_admins_examples.rb +++ b/decidim-participatory_processes/spec/shared/manage_process_admins_examples.rb @@ -2,6 +2,7 @@ shared_examples "manage process admins examples" do let(:other_user) { create(:user, organization:, email: "my_email@example.org") } + let(:attributes) { attributes_for(:user, organization:) } let!(:process_admin) do create(:process_admin, @@ -25,12 +26,12 @@ end end - it "creates a new process admin" do + it "creates a new process admin", versioning: true do click_on "New process admin" within ".new_participatory_process_user_role" do fill_in :participatory_process_user_role_email, with: other_user.email - fill_in :participatory_process_user_role_name, with: "John Doe" + fill_in :participatory_process_user_role_name, with: attributes[:name] select "Administrator", from: :participatory_process_user_role_role find("*[type=submit]").click @@ -41,6 +42,9 @@ within "#process_admins table" do expect(page).to have_content(other_user.email) end + + visit decidim_admin.root_path + expect(page).to have_content("invited the participant #{other_user.name} to the #{translated(participatory_process.title)} participatory process") end describe "when managing different users" do @@ -50,7 +54,7 @@ visit current_path end - it "updates a process admin" do + it "updates a process admin", versioning: true do within "#process_admins" do within "#process_admins tr", text: other_user.email do click_on "Edit" @@ -68,6 +72,9 @@ within "#process_admins table" do expect(page).to have_content("Administrator") end + + visit decidim_admin.root_path + expect(page).to have_content("changed the role of the participant #{other_user.name} in the #{translated(participatory_process.title)} participatory process") end it "deletes a participatory_process_user_role" do diff --git a/decidim-participatory_processes/spec/shared/manage_process_components_examples.rb b/decidim-participatory_processes/spec/shared/manage_process_components_examples.rb index df456b953f346..72143a25b03dc 100644 --- a/decidim-participatory_processes/spec/shared/manage_process_components_examples.rb +++ b/decidim-participatory_processes/spec/shared/manage_process_components_examples.rb @@ -4,6 +4,8 @@ let!(:participatory_process) do create(:participatory_process, :with_steps, organization:) end + let!(:attributes) { attributes_for(:component, participatory_space: participatory_process) } + let(:step_id) { participatory_process.steps.first.id } before do @@ -30,9 +32,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My component", - ca: "La meva funcionalitat", - es: "Mi funcionalitat" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -59,12 +59,17 @@ it "is successfully created" do expect(page).to have_admin_callout("successfully") - expect(page).to have_content("My component") + expect(page).to have_content(translated(attributes[:name])) + end + + it "has a successful admin log" do + visit decidim_admin.root_path + expect(page).to have_content("created #{translated(attributes[:name])} in #{translated(participatory_process.title)}") end context "and then edit it" do before do - within "tr", text: "My component" do + within "tr", text: translated(attributes[:name]) do click_on "Configure" end end @@ -194,9 +199,7 @@ fill_in_i18n( :component_name, "#component-name-tabs", - en: "My updated component", - ca: "La meva funcionalitat actualitzada", - es: "Mi funcionalidad actualizada" + **attributes[:name].except("machine_translations") ) within ".global-settings" do @@ -211,9 +214,9 @@ end expect(page).to have_admin_callout("successfully") - expect(page).to have_content("My updated component") + expect(page).to have_content(translated(attributes[:name])) - within "tr", text: "My updated component" do + within "tr", text: translated(attributes[:name]) do click_on "Configure" end @@ -224,6 +227,9 @@ within "#panel-step_settings" do expect(all("input[type=checkbox]").first).to be_checked end + + visit decidim_admin.root_path + expect(page).to have_content("updated #{translated(attributes[:name])} in #{translated(participatory_process.title)}") end context "when the process does not have active steps" do diff --git a/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb b/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb index 9bbb31ec8f95f..7d0f349456489 100644 --- a/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb +++ b/decidim-participatory_processes/spec/shared/manage_process_steps_examples.rb @@ -9,6 +9,7 @@ active: ) end + let(:attributes) { attributes_for(:participatory_process_step, participatory_process:) } before do switch_to_host(organization.host) @@ -23,23 +24,20 @@ before { click_on "New phase" } end - it "creates a new participatory_process" do + it "creates a new participatory_process", versioning: true do click_on "New phase" fill_in_i18n( :participatory_process_step_title, "#participatory_process_step-title-tabs", - en: "My participatory process step", - es: "Mi fase de proceso participativo", - ca: "La meva fase de procés participatiu" + **attributes[:title].except("machine_translations") ) fill_in_i18n_editor( :participatory_process_step_description, "#participatory_process_step-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" + **attributes[:description].except("machine_translations") ) + fill_in_i18n(:participatory_process_step_cta_text, "#participatory_process_step-cta_text-tabs", **attributes[:cta_text].except("machine_translations")) find_by_id("participatory_process_step_start_date_date").click @@ -55,13 +53,15 @@ expect(page).to have_admin_callout("successfully") within "#steps table" do - expect(page).to have_content("My participatory process step") + expect(page).to have_content(translated(attributes[:title])) expect(page).to have_content("#{Time.new.utc.day},") expect(page).to have_content("#{(Time.new.utc + 2.days).day},") end + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} phase in") end - it "updates a participatory_process_step" do + it "updates a participatory_process_step", versioning: true do within "#steps" do within "tr", text: translated(process_step.title) do click_on "Edit" @@ -69,13 +69,9 @@ end within ".edit_participatory_process_step" do - fill_in_i18n( - :participatory_process_step_title, - "#participatory_process_step-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + fill_in_i18n(:participatory_process_step_title, "#participatory_process_step-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_step_description, "#participatory_process_step-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_i18n(:participatory_process_step_cta_text, "#participatory_process_step-cta_text-tabs", **attributes[:cta_text].except("machine_translations")) find("*[type=submit]").click end @@ -83,9 +79,12 @@ expect(page).to have_admin_callout("successfully") within "#steps table" do - expect(page).to have_content("My new title") - click_on("My new title") + expect(page).to have_content(translated(attributes[:title])) + click_on(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} phase in") end context "when deleting a participatory process step" do diff --git a/decidim-participatory_processes/spec/shared/manage_processes_examples.rb b/decidim-participatory_processes/spec/shared/manage_processes_examples.rb index 92575cdad7b5b..2cce418a348d3 100644 --- a/decidim-participatory_processes/spec/shared/manage_processes_examples.rb +++ b/decidim-participatory_processes/spec/shared/manage_processes_examples.rb @@ -85,6 +85,7 @@ def filter_by_group(group_title) context "when updating a participatory process" do let(:image3_filename) { "city3.jpeg" } let(:image3_path) { Decidim::Dev.asset(image3_filename) } + let(:attributes) { attributes_for(:participatory_process, organization:) } before do within "tr", text: translated(participatory_process.title) do @@ -97,13 +98,18 @@ def filter_by_group(group_title) end it "updates a participatory_process" do - fill_in_i18n( - :participatory_process_title, - "#participatory_process-title-tabs", - en: "My new title", - es: "Mi nuevo título", - ca: "El meu nou títol" - ) + fill_in_i18n(:participatory_process_title, "#participatory_process-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:participatory_process_subtitle, "#participatory_process-subtitle-tabs", **attributes[:subtitle].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_short_description, "#participatory_process-short_description-tabs", **attributes[:short_description].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_description, "#participatory_process-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_announcement, "#participatory_process-announcement-tabs", **attributes[:announcement].except("machine_translations")) + fill_in_i18n(:participatory_process_developer_group, "#participatory_process-developer_group-tabs", **attributes[:developer_group].except("machine_translations")) + fill_in_i18n(:participatory_process_local_area, "#participatory_process-local_area-tabs", **attributes[:local_area].except("machine_translations")) + fill_in_i18n(:participatory_process_meta_scope, "#participatory_process-meta_scope-tabs", **attributes[:meta_scope].except("machine_translations")) + fill_in_i18n(:participatory_process_target, "#participatory_process-target-tabs", **attributes[:target].except("machine_translations")) + fill_in_i18n(:participatory_process_participatory_scope, "#participatory_process-participatory_scope-tabs", **attributes[:participatory_scope].except("machine_translations")) + fill_in_i18n(:participatory_process_participatory_structure, "#participatory_process-participatory_structure-tabs", **attributes[:participatory_structure].except("machine_translations")) + dynamically_attach_file(:participatory_process_banner_image, image3_path, remove_before: true) fill_in_datepicker :participatory_process_end_date_date, with: Time.new.utc.strftime("%d/%m/%Y") @@ -115,9 +121,12 @@ def filter_by_group(group_title) expect(page).to have_admin_callout("successfully") within "[data-content]" do - expect(page).to have_css("input[value='My new title']") + expect(page).to have_css("input[value='#{translated(attributes[:title])}']") expect(page).to have_css("img[src*='#{image3_filename}']") end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} participatory process") end end diff --git a/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_groups_spec.rb b/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_groups_spec.rb index e5063b1671490..b376ea97dd3ea 100644 --- a/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_groups_spec.rb +++ b/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_groups_spec.rb @@ -8,7 +8,7 @@ let!(:participatory_processes) do create_list(:participatory_process, 3, organization:) end - + let(:attributes) { attributes_for(:participatory_process_group, organization:) } let(:image1_filename) { "city.jpeg" } let(:image1_path) { Decidim::Dev.asset(image1_filename) } @@ -26,35 +26,18 @@ end end - it "creates a new participatory process group" do + it "creates a new participatory process group", versioning: true do within "div.process-title" do click_on "New process group" end within ".new_participatory_process_group" do - fill_in_i18n( - :participatory_process_group_title, - "#participatory_process_group-title-tabs", - en: "My group", - es: "Mi grupo", - ca: "El meu grup" - ) - fill_in_i18n_editor( - :participatory_process_group_description, - "#participatory_process_group-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:participatory_process_group_title, "#participatory_process_group-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:participatory_process_group_developer_group, "#participatory_process_group-developer_group-tabs", **attributes[:developer_group].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_group_description, "#participatory_process_group-description-tabs", **attributes[:description].except("machine_translations")) + fill_in :participatory_process_group_hashtag, with: "hashtag" fill_in :participatory_process_group_group_url, with: "http://example.org" - fill_in_i18n( - :participatory_process_group_developer_group, - "#participatory_process_group-developer_group-tabs", - en: "X corporation", - es: "La corporación X", - ca: "La corporació X" - ) select participatory_processes.first.title["en"], from: :participatory_process_group_participatory_process_ids end @@ -65,12 +48,17 @@ end expect(page).to have_admin_callout("successfully") - expect(page).to have_field(:participatory_process_group_title_en, with: "My group") + expect(page).to have_field(:participatory_process_group_title_en, with: translated(attributes[:title])) expect(page).to have_field(:participatory_process_group_hashtag, with: "hashtag") expect(page).to have_field(:participatory_process_group_group_url, with: "http://example.org") - expect(page).to have_field(:participatory_process_group_developer_group_en, with: "X corporation") + expect(page).to have_field(:participatory_process_group_developer_group_en, with: translated(attributes[:developer_group])) expect(page).to have_select("Related processes", selected: participatory_processes.first.title["en"]) expect(page).to have_css("img[src*='#{image1_filename}']") + + expect(page).to have_admin_callout("successfully") + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} participatory process group") end context "with existing groups" do @@ -90,29 +78,13 @@ end within ".edit_participatory_process_group" do - fill_in_i18n( - :participatory_process_group_title, - "#participatory_process_group-title-tabs", - en: "My old group", - es: "Mi grupo antiguo", - ca: "El meu grup antic" - ) - fill_in_i18n_editor( - :participatory_process_group_description, - "#participatory_process_group-description-tabs", - en: "New description", - es: "Nueva descripción", - ca: "Nova descripció" - ) + fill_in_i18n(:participatory_process_group_title, "#participatory_process_group-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_group_description, "#participatory_process_group-description-tabs", **attributes[:description].except("machine_translations")) + fill_in :participatory_process_group_hashtag, with: "new_hashtag" fill_in :participatory_process_group_group_url, with: "http://new-example.org" - fill_in_i18n( - :participatory_process_group_developer_group, - "#participatory_process_group-developer_group-tabs", - en: "Z corporation", - es: "La corporación Z", - ca: "La corporació Z" - ) + fill_in_i18n(:participatory_process_group_developer_group, "#participatory_process_group-developer_group-tabs", **attributes[:developer_group].except("machine_translations")) + select participatory_processes.last.title["en"], from: :participatory_process_group_participatory_process_ids end @@ -123,13 +95,16 @@ end expect(page).to have_admin_callout("successfully") - expect(page).to have_field(:participatory_process_group_title_en, with: "My old group") - expect(page).to have_content("New description") + expect(page).to have_field(:participatory_process_group_title_en, with: translated(attributes[:title])) + expect(page).to have_content(strip_tags(translated(attributes[:description])).strip) expect(page).to have_field(:participatory_process_group_hashtag, with: "new_hashtag") expect(page).to have_field(:participatory_process_group_group_url, with: "http://new-example.org") - expect(page).to have_field(:participatory_process_group_developer_group_en, with: "Z corporation") + expect(page).to have_field(:participatory_process_group_developer_group_en, with: translated(attributes[:developer_group])) expect(page).to have_select("Related processes", selected: participatory_processes.last.title["en"]) expect(page).to have_css("img[src*='#{image2_filename}']") + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} participatory process group") end it "validates the group attributes" do @@ -162,7 +137,7 @@ end click_on "Remove" - click_on "Next" + click_on "Save" click_on "Update" diff --git a/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_types_spec.rb b/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_types_spec.rb index 3b3408fb22a4a..85d1a7d2c6150 100644 --- a/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_types_spec.rb +++ b/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_process_types_spec.rb @@ -8,6 +8,7 @@ let!(:participatory_processes) do create_list(:participatory_process, 3, organization:) end + let(:attributes) { attributes_for(:participatory_process_type, organization:) } describe "Managing participatory process types" do before do @@ -16,25 +17,23 @@ visit decidim_admin_participatory_processes.participatory_process_types_path end - it "can create new participatory process types" do + it "can create new participatory process types", versioning: true do click_on "New process type" within ".new_participatory_process_type" do - fill_in_i18n( - :participatory_process_type_title, - "#participatory_process_type-title-tabs", - en: "My participatory process type", - es: "Mi tipo de proceso participativo", - ca: "El meu tipus de procés participatiu " - ) + fill_in_i18n(:participatory_process_type_title, "#participatory_process_type-title-tabs", **attributes[:title].except("machine_translations")) + find("*[type=submit]").click end expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("My participatory process type") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} participatory process type") end context "with existing participatory process types" do @@ -56,21 +55,19 @@ end within ".edit_participatory_process_type" do - fill_in_i18n( - :participatory_process_type_title, - "#participatory_process_type-title-tabs", - en: "Another participatory process type", - es: "Otro tipo de proceso participativo", - ca: "Un altre tipus de procés participatiu" - ) + fill_in_i18n(:participatory_process_type_title, "#participatory_process_type-title-tabs", **attributes[:title].except("machine_translations")) + find("*[type=submit]").click end expect(page).to have_admin_callout("successfully") within "table" do - expect(page).to have_content("Another participatory process type") + expect(page).to have_content(translated(attributes[:title])) end + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} participatory process type") end it "can delete them" do diff --git a/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_processes_spec.rb b/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_processes_spec.rb index f68eb327e5c1c..72f13d67ffe65 100644 --- a/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_processes_spec.rb +++ b/decidim-participatory_processes/spec/system/admin/admin_manages_participatory_processes_spec.rb @@ -55,6 +55,7 @@ let(:image2_filename) { "city2.jpeg" } let(:image2_path) { Decidim::Dev.asset(image2_filename) } + let(:attributes) { attributes_for(:participatory_process, organization:) } before do click_on "New process" @@ -66,34 +67,18 @@ it "creates a new participatory process" do within ".new_participatory_process" do - fill_in_i18n( - :participatory_process_title, - "#participatory_process-title-tabs", - en: "My participatory process", - es: "Mi proceso participativo", - ca: "El meu procés participatiu" - ) - fill_in_i18n( - :participatory_process_subtitle, - "#participatory_process-subtitle-tabs", - en: "Subtitle", - es: "Subtítulo", - ca: "Subtítol" - ) - fill_in_i18n_editor( - :participatory_process_short_description, - "#participatory_process-short_description-tabs", - en: "Short description", - es: "Descripción corta", - ca: "Descripció curta" - ) - fill_in_i18n_editor( - :participatory_process_description, - "#participatory_process-description-tabs", - en: "A longer description", - es: "Descripción más larga", - ca: "Descripció més llarga" - ) + fill_in_i18n(:participatory_process_title, "#participatory_process-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:participatory_process_subtitle, "#participatory_process-subtitle-tabs", **attributes[:subtitle].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_short_description, "#participatory_process-short_description-tabs", **attributes[:short_description].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_description, "#participatory_process-description-tabs", **attributes[:description].except("machine_translations")) + fill_in_i18n_editor(:participatory_process_announcement, "#participatory_process-announcement-tabs", **attributes[:announcement].except("machine_translations")) + + fill_in_i18n(:participatory_process_developer_group, "#participatory_process-developer_group-tabs", **attributes[:developer_group].except("machine_translations")) + fill_in_i18n(:participatory_process_local_area, "#participatory_process-local_area-tabs", **attributes[:local_area].except("machine_translations")) + fill_in_i18n(:participatory_process_meta_scope, "#participatory_process-meta_scope-tabs", **attributes[:meta_scope].except("machine_translations")) + fill_in_i18n(:participatory_process_target, "#participatory_process-target-tabs", **attributes[:target].except("machine_translations")) + fill_in_i18n(:participatory_process_participatory_scope, "#participatory_process-participatory_scope-tabs", **attributes[:participatory_scope].except("machine_translations")) + fill_in_i18n(:participatory_process_participatory_structure, "#participatory_process-participatory_structure-tabs", **attributes[:participatory_structure].except("machine_translations")) group_title = participatory_process_groups.first.title["en"] select group_title, from: :participatory_process_participatory_process_group_id @@ -117,6 +102,9 @@ expect(page).to have_content("Phases") expect(page).to have_content("Introduction") end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} participatory process") end end diff --git a/decidim-participatory_processes/spec/system/admin/valuator_checks_components_spec.rb b/decidim-participatory_processes/spec/system/admin/valuator_checks_components_spec.rb index 15c45bcd5a9e9..7d520deeb0234 100644 --- a/decidim-participatory_processes/spec/system/admin/valuator_checks_components_spec.rb +++ b/decidim-participatory_processes/spec/system/admin/valuator_checks_components_spec.rb @@ -37,4 +37,16 @@ end end end + + context "when visiting the admin" do + before do + visit decidim_admin.root_path + end + + it "can access the participatory space" do + click_on "Process" + click_on translated(participatory_process.title) + expect(page).to have_link("Components") + end + end end diff --git a/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb b/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb index 6de4e2bc2c9a3..b0b6f39c5b9b8 100644 --- a/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb +++ b/decidim-participatory_processes/spec/system/participatory_process_groups_spec.rb @@ -158,6 +158,8 @@ expect(page).to have_css("[data-process-hero]") end end + + it_behaves_like "accessible page" end context "when the proposals block is enabled" do diff --git a/decidim-participatory_processes/spec/system/participatory_processes_spec.rb b/decidim-participatory_processes/spec/system/participatory_processes_spec.rb index 15dc2d9879903..becf639cd5f18 100644 --- a/decidim-participatory_processes/spec/system/participatory_processes_spec.rb +++ b/decidim-participatory_processes/spec/system/participatory_processes_spec.rb @@ -361,11 +361,13 @@ end context "and the process statistics are enabled" do - let(:blocks_manifests) { [:stats] } + let(:blocks_manifests) { [:hero, :stats] } it "the stats for those components are visible" do expect(page).to have_css("[data-statistic]", count: 3) end + + it_behaves_like "accessible page" end context "and the process statistics are not enabled" do diff --git a/decidim-participatory_processes/spec/types/participatory_process_step_type_spec.rb b/decidim-participatory_processes/spec/types/participatory_process_step_type_spec.rb index 0bc1762bec8b0..572730f148463 100644 --- a/decidim-participatory_processes/spec/types/participatory_process_step_type_spec.rb +++ b/decidim-participatory_processes/spec/types/participatory_process_step_type_spec.rb @@ -80,7 +80,7 @@ module ParticipatoryProcesses let(:query) { '{ callToActionText { locales translation(locale:"en") } }' } it "returns the step's call to action text" do - expect(response["callToActionText"]["locales"]).to include(*model.cta_text.keys) + expect(response["callToActionText"]["locales"]).to include(*model.cta_text.except("machine_translations").keys) expect(response["callToActionText"]["translation"]).to eq(model.cta_text["en"]) end end diff --git a/decidim-proposals/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb b/decidim-proposals/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb index 438e91754b511..e554d188f3adf 100644 --- a/decidim-proposals/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb +++ b/decidim-proposals/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb @@ -35,24 +35,26 @@ def call def assign_proposals transaction do form.proposals.flat_map do |proposal| - find_assignment(proposal) || assign_proposal(proposal) + form.valuator_roles.each do |valuator_role| + find_assignment(proposal, valuator_role) || assign_proposal(proposal, valuator_role) + end end end end - def find_assignment(proposal) + def find_assignment(proposal, valuator_role) Decidim::Proposals::ValuationAssignment.find_by( proposal:, - valuator_role: form.valuator_role + valuator_role: ) end - def assign_proposal(proposal) + def assign_proposal(proposal, valuator_role) Decidim.traceability.create!( Decidim::Proposals::ValuationAssignment, form.current_user, proposal:, - valuator_role: form.valuator_role + valuator_role: ) end end diff --git a/decidim-proposals/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb b/decidim-proposals/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb index b1877f734c1d9..720cd62b767ef 100644 --- a/decidim-proposals/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb +++ b/decidim-proposals/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb @@ -33,16 +33,18 @@ def call def unassign_proposals transaction do form.proposals.flat_map do |proposal| - assignment = find_assignment(proposal) - unassign(assignment) if assignment + form.valuator_roles.each do |valuator_role| + assignment = find_assignment(proposal, valuator_role) + unassign(assignment) if assignment + end end end end - def find_assignment(proposal) + def find_assignment(proposal, valuator_role) Decidim::Proposals::ValuationAssignment.find_by( proposal:, - valuator_role: form.valuator_role + valuator_role: ) end diff --git a/decidim-proposals/app/commands/decidim/proposals/vote_proposal.rb b/decidim-proposals/app/commands/decidim/proposals/vote_proposal.rb index 4f9d2ee0a1957..673707ae11be5 100644 --- a/decidim-proposals/app/commands/decidim/proposals/vote_proposal.rb +++ b/decidim-proposals/app/commands/decidim/proposals/vote_proposal.rb @@ -20,7 +20,7 @@ def initialize(proposal, current_user) # # Returns nothing. def call - return broadcast(:invalid) if @proposal.maximum_votes_reached? && !@proposal.can_accumulate_supports_beyond_threshold + return broadcast(:invalid) if @proposal.maximum_votes_reached? && !@proposal.can_accumulate_votes_beyond_threshold build_proposal_vote return broadcast(:invalid) unless vote.valid? diff --git a/decidim-proposals/app/commands/decidim/proposals/withdraw_proposal.rb b/decidim-proposals/app/commands/decidim/proposals/withdraw_proposal.rb index 2ccf9d2a69cb5..479a976919c61 100644 --- a/decidim-proposals/app/commands/decidim/proposals/withdraw_proposal.rb +++ b/decidim-proposals/app/commands/decidim/proposals/withdraw_proposal.rb @@ -16,11 +16,11 @@ def initialize(proposal, current_user) # Executes the command. Broadcasts these events: # # - :ok when everything is valid, together with the proposal. - # - :has_supports if the proposal already has supports or does not belong to current user. + # - :has_votes if the proposal already has votes or does not belong to current user. # # Returns nothing. def call - return broadcast(:has_supports) if @proposal.votes.any? + return broadcast(:has_votes) if @proposal.votes.any? transaction do @proposal.withdraw! diff --git a/decidim-proposals/app/controllers/concerns/decidim/proposals/orderable.rb b/decidim-proposals/app/controllers/concerns/decidim/proposals/orderable.rb index fc13ef5f9069c..99d11be89e7cc 100644 --- a/decidim-proposals/app/controllers/concerns/decidim/proposals/orderable.rb +++ b/decidim-proposals/app/controllers/concerns/decidim/proposals/orderable.rb @@ -35,7 +35,7 @@ def default_order def fetch_default_order default_order = current_settings.default_sort_order.presence || component_settings.default_sort_order - return order_by_default if default_order == "default" + return order_by_default if default_order == "automatic" possible_orders.include?(default_order) ? default_order : order_by_default end diff --git a/decidim-proposals/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb b/decidim-proposals/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb index eb69d6a749ad2..e83e6b448ca79 100644 --- a/decidim-proposals/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +++ b/decidim-proposals/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb @@ -35,6 +35,25 @@ def update end end + def update_multiple_answers + enforce_permission_to(:create, :proposal_answer) + + if missing_cost_data?(proposals) + flash[:alert] = t("proposals.answer.missing_cost_data", scope: "decidim.proposals.admin") + redirect_to EngineRouter.admin_proxy(current_component).root_path + + return + end + + proposals.each do |proposal| + enforce_permission_to(:create, :proposal_answer, proposal:) + ProposalAnswerJob.perform_later(proposal.id, bulk_answer_form(proposal).attributes, current_component) + end + + flash[:notice] = I18n.t("proposals.answer.success_bulk_update", scope: "decidim.proposals.admin") + redirect_to EngineRouter.admin_proxy(current_component).root_path + end + private def skip_manage_component_permission @@ -44,6 +63,42 @@ def skip_manage_component_permission def proposal @proposal ||= Proposal.where(component: current_component).find(params[:id]) end + + def proposals + @proposals ||= Proposal.where(component: current_component).where(id: params[:proposal_ids]) + end + + def template + @template ||= Decidim::Templates::Template.find(params[:template][:template_id]) + end + + def bulk_answer_form(proposal) + @bulk_answer_form ||= form(ProposalAnswerForm).from_params(prepare_answer_form_params(template, proposal, current_user)) + end + + def prepare_answer_form_params(template, proposal, current_user) + answer_form_params = { + answer: translated_attribute(template.description), + internal_state: Decidim::Proposals::ProposalState.find(template.field_values["proposal_state_id"]).token, + current_user: + } + + if current_component.current_settings.answers_with_costs? + [:cost, :cost_report, :execution_period].each do |field| + value = proposal.send(field) + answer_form_params[field] = translated_attribute(value) if value.present? + end + end + + answer_form_params + end + + def missing_cost_data?(proposals) + proposals.each do |proposal| + return true if bulk_answer_form(proposal).costs_required? && proposal.cost.blank? + end + false + end end end end diff --git a/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb b/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb index 481fc6ee6be1b..17047b6755d41 100644 --- a/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb +++ b/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb @@ -14,6 +14,10 @@ class ProposalsController < Admin::ApplicationController helper_method :proposals, :query, :form_presenter, :proposal, :proposal_ids helper Proposals::Admin::ProposalBulkActionsHelper + before_action :check_admin_session_filters, only: [:index] + + def index; end + def show @notes_form = form(ProposalNoteForm).instance @answer_form = form(Admin::ProposalAnswerForm).from_model(proposal) diff --git a/decidim-proposals/app/controllers/decidim/proposals/admin/valuation_assignments_controller.rb b/decidim-proposals/app/controllers/decidim/proposals/admin/valuation_assignments_controller.rb index b3f8f268584df..e82596ad909e1 100644 --- a/decidim-proposals/app/controllers/decidim/proposals/admin/valuation_assignments_controller.rb +++ b/decidim-proposals/app/controllers/decidim/proposals/admin/valuation_assignments_controller.rb @@ -5,10 +5,12 @@ module Proposals module Admin class ValuationAssignmentsController < Admin::ApplicationController def create - enforce_permission_to :assign_to_valuator, :proposals - @form = form(Admin::ValuationAssignmentForm).from_params(params) + @form.proposals.each do |proposal| + enforce_permission_to :assign_to_valuator, :proposals, proposal: + end + Admin::AssignProposalsToValuator.call(@form) do on(:ok) do |_proposal| flash[:notice] = I18n.t("valuation_assignments.create.success", scope: "decidim.proposals.admin") @@ -23,9 +25,11 @@ def create end def destroy - @form = form(Admin::ValuationAssignmentForm).from_params(destroy_params) + @form = form(Admin::ValuationAssignmentForm).from_params(params) - enforce_permission_to :unassign_from_valuator, :proposals, valuator: @form.valuator_user + @form.valuator_roles.each do |valuator_role| + enforce_permission_to :unassign_from_valuator, :proposals, valuator: valuator_role.user + end Admin::UnassignProposalsFromValuator.call(@form) do on(:ok) do |_proposal| @@ -42,13 +46,6 @@ def destroy private - def destroy_params - { - id: params.dig(:valuator_role, :id) || params[:id], - proposal_ids: params[:proposal_ids] || [params[:proposal_id]] - } - end - def skip_manage_component_permission true end diff --git a/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb b/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb index 7518efa8aa3ba..fd50675d8d021 100644 --- a/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb +++ b/decidim-proposals/app/controllers/decidim/proposals/proposals_controller.rb @@ -188,8 +188,8 @@ def withdraw flash[:notice] = I18n.t("proposals.update.success", scope: "decidim") redirect_to Decidim::ResourceLocatorPresenter.new(@proposal).path end - on(:has_supports) do - flash[:alert] = I18n.t("proposals.withdraw.errors.has_supports", scope: "decidim") + on(:has_votes) do + flash[:alert] = I18n.t("proposals.withdraw.errors.has_votes", scope: "decidim") redirect_to Decidim::ResourceLocatorPresenter.new(@proposal).path end end diff --git a/decidim-proposals/app/forms/decidim/proposals/admin/proposal_answer_form.rb b/decidim-proposals/app/forms/decidim/proposals/admin/proposal_answer_form.rb index b322dd7ef23c0..39b21e7c7eb28 100644 --- a/decidim-proposals/app/forms/decidim/proposals/admin/proposal_answer_form.rb +++ b/decidim-proposals/app/forms/decidim/proposals/admin/proposal_answer_form.rb @@ -26,21 +26,21 @@ class ProposalAnswerForm < Decidim::Form alias state internal_state def costs_required? - costs_enabled? && state == "accepted" + costs_enabled? && state.start_with?("accepted") end def publish_answer? - current_component.current_settings.publish_answers_immediately? + component.current_settings.publish_answers_immediately? end private def proposal_states - Decidim::Proposals::ProposalState.where(component: current_component).pluck(:token).map(&:to_s) + ["not_answered"] + Decidim::Proposals::ProposalState.where(component:).pluck(:token).map(&:to_s) + ["not_answered"] end def costs_enabled? - current_component.current_settings.answers_with_costs? + component.current_settings.answers_with_costs? end end end diff --git a/decidim-proposals/app/forms/decidim/proposals/admin/proposals_fork_form.rb b/decidim-proposals/app/forms/decidim/proposals/admin/proposals_fork_form.rb index 5c7c04962fee9..d17479ef10924 100644 --- a/decidim-proposals/app/forms/decidim/proposals/admin/proposals_fork_form.rb +++ b/decidim-proposals/app/forms/decidim/proposals/admin/proposals_fork_form.rb @@ -39,7 +39,7 @@ def mergeable_to_same_component proposals.each do |proposal| errors_set << :not_official unless proposal.official? - errors_set << :supported if proposal.votes.any? || proposal.endorsements.any? + errors_set << :voted if proposal.votes.any? || proposal.endorsements.any? end errors_set.each { |error| errors.add(:base, error) } if errors_set.any? diff --git a/decidim-proposals/app/forms/decidim/proposals/admin/valuation_assignment_form.rb b/decidim-proposals/app/forms/decidim/proposals/admin/valuation_assignment_form.rb index ee7ca890750f0..42f8ad420953b 100644 --- a/decidim-proposals/app/forms/decidim/proposals/admin/valuation_assignment_form.rb +++ b/decidim-proposals/app/forms/decidim/proposals/admin/valuation_assignment_form.rb @@ -4,32 +4,30 @@ module Decidim module Proposals module Admin class ValuationAssignmentForm < Decidim::Form - mimic :valuator_role - attribute :id, Integer attribute :proposal_ids, Array + attribute :valuator_role_ids, Array - validates :valuator_role, :proposals, :current_component, presence: true + validates :valuator_roles, :proposals, :current_component, presence: true validate :same_participatory_space def proposals @proposals ||= Decidim::Proposals::Proposal.where(component: current_component, id: proposal_ids).uniq end - def valuator_role - @valuator_role ||= current_component.participatory_space.user_roles(:valuator).find_by(id:) - end - - def valuator_user - return unless valuator_role - - @valuator_user ||= valuator_role.user + def valuator_roles + @valuator_roles ||= current_component.participatory_space.user_roles(:valuator).where(id: valuator_role_ids) end def same_participatory_space - return if !valuator_role || !current_component - - errors.add(:id, :invalid) if current_component.participatory_space != valuator_role.participatory_space + return if valuator_roles.empty? || !current_component + + valuator_roles.each do |valuator_role| + if current_component.participatory_space != valuator_role.participatory_space + errors.add(:id, :invalid) + break + end + end end end end diff --git a/decidim-proposals/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb b/decidim-proposals/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb index 5cba913d74fc1..395e21c18ea76 100644 --- a/decidim-proposals/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb +++ b/decidim-proposals/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb @@ -8,26 +8,40 @@ def proposal_find(id) Decidim::Proposals::Proposal.find(id) end - # Public: Generates a select field with the valuators of the given participatory space. + # Public: Generates a select field with the templates of the given component. # - # participatory_space - A participatory space instance. + # component - A component instance. # prompt - An i18n string to show as prompt # # Returns a String. - def bulk_valuators_select(participatory_space, prompt) - options_for_select = find_valuators_for_select(participatory_space) - select(:valuator_role, :id, options_for_select, prompt:) + def bulk_templates_select(component, prompt, id: nil) + options_for_select = find_templates_for_select(component) + select(:template, :template_id, options_for_select, prompt:, id:) end - # Internal: A method to cache to queries to find the valuators for the - # current space. - def find_valuators_for_select(participatory_space) - return @valuators_for_select if @valuators_for_select + def find_templates_for_select(component) + return @templates_for_select if @templates_for_select + templates = Decidim::Templates::Template.where( + target: :proposal_answer, + templatable: component + ).order(:templatable_id) + + @templates_for_select = templates.map do |template| + [translated_attribute(template.name), template.id] + end + end + + # find the valuators for the current space. + def find_valuators_for_select(participatory_space, current_user) valuator_roles = participatory_space.user_roles(:valuator) valuators = Decidim::User.where(id: valuator_roles.pluck(:decidim_user_id)).to_a - @valuators_for_select = valuator_roles.map do |role| + filtered_valuator_roles = valuator_roles.filter do |role| + role.decidim_user_id != current_user.id + end + + filtered_valuator_roles.map do |role| valuator = valuators.find { |user| user.id == role.decidim_user_id } [valuator.name, role.id] diff --git a/decidim-proposals/app/helpers/decidim/proposals/application_helper.rb b/decidim-proposals/app/helpers/decidim/proposals/application_helper.rb index 9ab1b045c328a..c9cfacf252e8e 100644 --- a/decidim-proposals/app/helpers/decidim/proposals/application_helper.rb +++ b/decidim-proposals/app/helpers/decidim/proposals/application_helper.rb @@ -150,7 +150,7 @@ def show_voting_rules? return true if vote_limit_enabled? return true if threshold_per_proposal_enabled? return true if proposal_limit_enabled? - return true if can_accumulate_supports_beyond_threshold? + return true if can_accumulate_votes_beyond_threshold? return true if minimum_votes_per_user_enabled? end diff --git a/decidim-proposals/app/helpers/decidim/proposals/proposal_votes_helper.rb b/decidim-proposals/app/helpers/decidim/proposals/proposal_votes_helper.rb index 73ad73f405963..ba76bd972d455 100644 --- a/decidim-proposals/app/helpers/decidim/proposals/proposal_votes_helper.rb +++ b/decidim-proposals/app/helpers/decidim/proposals/proposal_votes_helper.rb @@ -39,8 +39,8 @@ def threshold_per_proposal # Public: Checks if can accumulate more than maximum is enabled # # Returns true if enabled, false otherwise. - def can_accumulate_supports_beyond_threshold? - component_settings.can_accumulate_supports_beyond_threshold + def can_accumulate_votes_beyond_threshold? + component_settings.can_accumulate_votes_beyond_threshold end # Public: Checks if voting is enabled in this step. diff --git a/decidim-proposals/app/jobs/decidim/proposals/admin/proposal_answer_job.rb b/decidim-proposals/app/jobs/decidim/proposals/admin/proposal_answer_job.rb new file mode 100644 index 0000000000000..fdba255b858f2 --- /dev/null +++ b/decidim-proposals/app/jobs/decidim/proposals/admin/proposal_answer_job.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module Decidim + module Proposals + module Admin + class ProposalAnswerJob < ApplicationJob + queue_as :default + + def perform(proposal_id, answer_form_params, current_component) + proposal = Decidim::Proposals::Proposal.find(proposal_id) + answer_form = ProposalAnswerForm.from_params(answer_form_params).with_context(current_component:, current_organization: current_component.organization) + + Admin::AnswerProposal.call(answer_form, proposal) do + on(:ok) { Rails.logger.info "Proposal #{proposal.id} answered successfully." } + on(:invalid) { Rails.logger.error "Proposal ID #{proposal.id} could not be updated. Errors: #{answer_form.errors.full_messages}" } + end + end + end + end + end +end diff --git a/decidim-proposals/app/models/decidim/proposals/proposal.rb b/decidim-proposals/app/models/decidim/proposals/proposal.rb index 546883ecc67a9..2ef4f434843a7 100644 --- a/decidim-proposals/app/models/decidim/proposals/proposal.rb +++ b/decidim-proposals/app/models/decidim/proposals/proposal.rb @@ -355,8 +355,8 @@ def maximum_votes_reached? # Public: Can accumulate more votes than maximum for this proposal. # # Returns true if can accumulate, false otherwise - def can_accumulate_supports_beyond_threshold - component.settings.can_accumulate_supports_beyond_threshold + def can_accumulate_votes_beyond_threshold + component.settings.can_accumulate_votes_beyond_threshold end # Checks whether the user can edit the given proposal. diff --git a/decidim-proposals/app/models/decidim/proposals/proposal_state.rb b/decidim-proposals/app/models/decidim/proposals/proposal_state.rb index 81b0b790f2617..03f702fd0bdab 100644 --- a/decidim-proposals/app/models/decidim/proposals/proposal_state.rb +++ b/decidim-proposals/app/models/decidim/proposals/proposal_state.rb @@ -38,7 +38,7 @@ def self.colors protected def generate_token - self.token = ensure_unique_token(translated_attribute(title).parameterize(separator: "_")) + self.token = ensure_unique_token(token || translated_attribute(title).parameterize(separator: "_")) end def ensure_unique_token(token) diff --git a/decidim-proposals/app/packs/entrypoints/participatory_texts_admin.js b/decidim-proposals/app/packs/entrypoints/participatory_texts_admin.js new file mode 100644 index 0000000000000..8e909080c296b --- /dev/null +++ b/decidim-proposals/app/packs/entrypoints/participatory_texts_admin.js @@ -0,0 +1,2 @@ +require.context("../images", true) +import "stylesheets/decidim/proposals/admin/participatory_texts.scss" diff --git a/decidim-proposals/app/packs/src/decidim/proposals/admin/proposals.js b/decidim-proposals/app/packs/src/decidim/proposals/admin/proposals.js index b07b231f49222..622d8375cd3c5 100644 --- a/decidim-proposals/app/packs/src/decidim/proposals/admin/proposals.js +++ b/decidim-proposals/app/packs/src/decidim/proposals/admin/proposals.js @@ -2,6 +2,8 @@ /* eslint no-unused-vars: 0 */ /* eslint id-length: ["error", { "exceptions": ["e"] }] */ +import TomSelect from "tom-select/dist/cjs/tom-select.popular"; + $(() => { const selectedProposalsCount = function() { return $(".table-list .js-check-all-proposal:checked").length @@ -11,11 +13,19 @@ $(() => { return $(".table-list [data-published-state=false] .js-check-all-proposal:checked").length } + const selectedProposalsAllowsAnswerCount = function() { + return $(".table-list [data-allow-answer=true] .js-check-all-proposal:checked").length + } + const selectedProposalsCountUpdate = function() { const selectedProposals = selectedProposalsCount(); const selectedProposalsNotPublishedAnswer = selectedProposalsNotPublishedAnswerCount(); + const allowAnswerProposals = selectedProposalsAllowsAnswerCount(); + if (selectedProposals === 0) { $("#js-selected-proposals-count").text("") + $("#js-assign-proposals-to-valuator-actions").addClass("hide"); + $("#js-unassign-proposals-from-valuator-actions").addClass("hide"); } else { $("#js-selected-proposals-count").text(selectedProposals); } @@ -32,6 +42,13 @@ $(() => { } else { $('button[data-action="publish-answers"]').parent().hide(); } + + if (allowAnswerProposals > 0) { + $('button[data-action="change-answer-status"]').parent().show(); + $("#js-form-change-answer-status-number").text(allowAnswerProposals); + } else { + $('button[data-action="change-answer-status"]').parent().hide(); + } } const showBulkActionsButton = function() { @@ -80,20 +97,36 @@ $(() => { hideBulkActionForms(); $("#js-bulk-actions-button").addClass("hide"); - $("#js-bulk-actions-dropdown ul li button").click(function(e) { - e.preventDefault(); + $("#js-bulk-actions-dropdown ul li button").click(function (e) { + $("#js-bulk-actions-dropdown").removeClass("is-open"); + hideBulkActionForms(); + let action = $(e.target).data("action"); + const panelActions = [ + "assign-proposals-to-valuator", + "unassign-proposals-from-valuator" + ]; + + if (!action) { + return; + } - if (action) { - $(`#js-form-${action}`).submit(function() { + if (panelActions.includes(action)) { + $(`#js-form-${action}`).submit(function () { $(".layout-content > div[data-callout-wrapper]").html(""); - }) + }); + + $(`#js-${action}-actions`).removeClass("hide"); + } else { + $(`#js-form-${action}`).submit(function () { + $(".layout-content > div[data-callout-wrapper]").html(""); + }); $(`#js-${action}-actions`).removeClass("hide"); hideBulkActionsButton(true); hideOtherActionsButtons(); } - }) + }); // select all checkboxes $(".js-check-all").change(function() { @@ -148,3 +181,18 @@ $(() => { }); } }); + +document.addEventListener("DOMContentLoaded", () => { + const valuatorMultiselectContainers = document.querySelectorAll( + ".js-valuator-multiselect" + ); + + valuatorMultiselectContainers.forEach((container) => { + const config = { + plugins: ["remove_button", "dropdown_input"], + allowEmptyOption: true + }; + + return new TomSelect(container, config); + }); +}); diff --git a/decidim-proposals/app/packs/stylesheets/decidim/proposals/admin/participatory_texts.scss b/decidim-proposals/app/packs/stylesheets/decidim/proposals/admin/participatory_texts.scss new file mode 100644 index 0000000000000..863cea2550e3d --- /dev/null +++ b/decidim-proposals/app/packs/stylesheets/decidim/proposals/admin/participatory_texts.scss @@ -0,0 +1,23 @@ +#participatory-text { + li { + @apply py-4 hover:cursor-move; + + a { + @apply font-bold flex; + + > svg { + @apply text-2xl fill-black; + } + + &[aria-expanded="true"] { + & > svg { + @apply rotate-90 transition-transform; + } + } + + span { + @apply ml-auto; + } + } + } +} diff --git a/decidim-proposals/app/packs/stylesheets/decidim/proposals/proposals.scss b/decidim-proposals/app/packs/stylesheets/decidim/proposals/proposals.scss index 8d27a9a3a8f1e..01eb0e88cfe87 100644 --- a/decidim-proposals/app/packs/stylesheets/decidim/proposals/proposals.scss +++ b/decidim-proposals/app/packs/stylesheets/decidim/proposals/proposals.scss @@ -24,7 +24,7 @@ &__aside { &-vote { - @apply flex flex-row-reverse md:flex-col gap-4 items-center md:items-stretch justify-between first:[&>*]:grow last:[&>*]:w-1/4 md:last:[&>*]:w-auto; + @apply flex flex-row-reverse md:flex-col gap-4 items-center md:items-stretch justify-around md:last:[&>*]:w-auto; } } diff --git a/decidim-proposals/app/permissions/decidim/proposals/admin/permissions.rb b/decidim-proposals/app/permissions/decidim/proposals/admin/permissions.rb index 356d3bded6530..8581ecd0caf35 100644 --- a/decidim-proposals/app/permissions/decidim/proposals/admin/permissions.rb +++ b/decidim-proposals/app/permissions/decidim/proposals/admin/permissions.rb @@ -13,9 +13,9 @@ def permissions if valuator_assigned_to_proposal? can_create_proposal_note? can_create_proposal_answer? + can_assign_valuator_to_proposal? end can_export_proposals? - valuator_can_unassign_valuator_from_proposals? return permission_action end @@ -49,7 +49,7 @@ def permissions allow! if permission_action.subject == :proposals && permission_action.action == :split # Every user allowed by the space can assign proposals to a valuator - allow! if permission_action.subject == :proposals && permission_action.action == :assign_to_valuator + can_assign_valuator_to_proposal? # Every user allowed by the space can unassign a valuator from proposals can_unassign_valuator_from_proposals? @@ -149,8 +149,8 @@ def can_unassign_valuator_from_proposals? allow! if permission_action.subject == :proposals && permission_action.action == :unassign_from_valuator end - def valuator_can_unassign_valuator_from_proposals? - can_unassign_valuator_from_proposals? if user == context.fetch(:valuator, nil) + def can_assign_valuator_to_proposal? + allow! if permission_action.subject == :proposals && permission_action.action == :assign_to_valuator end def can_export_proposals? diff --git a/decidim-proposals/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb b/decidim-proposals/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb index d679d8038edaf..a8e88721ee939 100644 --- a/decidim-proposals/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +++ b/decidim-proposals/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb @@ -15,13 +15,9 @@ module AdminLog class ProposalPresenter < Decidim::Log::BasePresenter private - def resource_presenter - @resource_presenter ||= Decidim::Proposals::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"]) - end - def diff_fields_mapping { - title: "Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter", + title: :i18n, body: "Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter", state: "Decidim::Proposals::AdminLog::ValueTypes::ProposalStatePresenter", answered_at: :date, diff --git a/decidim-proposals/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb b/decidim-proposals/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb index 4048dcc7f4b96..0ef814386db18 100644 --- a/decidim-proposals/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb +++ b/decidim-proposals/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb @@ -5,12 +5,10 @@ module Proposals module AdminLog module ValueTypes class ProposalTitleBodyPresenter < Decidim::Log::ValueTypes::DefaultPresenter - include Decidim::TranslatableAttributes - def present return unless value - translated_value = translated_attribute(value) + translated_value = h.decidim_escape_translated(value) return if translated_value.blank? renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_value) diff --git a/decidim-proposals/app/presenters/decidim/proposals/log/resource_presenter.rb b/decidim-proposals/app/presenters/decidim/proposals/log/resource_presenter.rb deleted file mode 100644 index fbacf6cacd083..0000000000000 --- a/decidim-proposals/app/presenters/decidim/proposals/log/resource_presenter.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module Decidim - module Proposals - module Log - class ResourcePresenter < Decidim::Log::ResourcePresenter - private - - # Private: Presents resource name. - # - # Returns an HTML-safe String. - def present_resource_name - if resource.present? - Decidim::Proposals::ProposalPresenter.new(resource).title - else - super - end - end - end - end - end -end diff --git a/decidim-proposals/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb b/decidim-proposals/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb index 01f4ad0681876..bcad1f8180ff9 100644 --- a/decidim-proposals/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb +++ b/decidim-proposals/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb @@ -11,7 +11,7 @@ class ValuationAssignmentPresenter < Decidim::Log::ResourcePresenter # Returns an HTML-safe String. def present_resource_name if resource.present? - Decidim::Proposals::ProposalPresenter.new(resource.proposal).title + resource.proposal.presenter.title(html_escape: true) else super end diff --git a/decidim-proposals/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb b/decidim-proposals/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb index 49df64cef4b48..83d0e26a5407c 100644 --- a/decidim-proposals/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb +++ b/decidim-proposals/app/queries/decidim/proposals/metrics/proposal_participants_metric_measure.rb @@ -5,7 +5,7 @@ module Proposals module Metrics # Searches for Participants in the following actions # - Create a proposal (Proposals) - # - Give support to a proposal (Proposals) + # - Vote to a proposal (Proposals) # - Endorse (Proposals) class ProposalParticipantsMetricMeasure < Decidim::MetricMeasure def valid? diff --git a/decidim-proposals/app/views/decidim/proposals/admin/participatory_texts/index.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/participatory_texts/index.html.erb index 6ab1e4da0a276..42f1edb828f61 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/participatory_texts/index.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/participatory_texts/index.html.erb @@ -1,4 +1,5 @@ <% add_decidim_page_title(t(".title")) %> +<%= append_stylesheet_pack_tag "participatory_texts_admin" %>

@@ -15,6 +16,7 @@

<%= t(".info_1") %>

    <% proposal = @drafts[prop_form.index] %> -
  • " data-accordion-item draggable="true"> - <%= preview_participatory_text_section_title(proposal) %> +
  • + + <%= icon "arrow-right-s-line" %> + <%= preview_participatory_text_section_title(proposal) %> <%= icon "menu-line", class: "fill-black" %> -
    +
    <%= render "article-preview", { form: prop_form, proposal: } %>
  • diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb index 1fcbc96db2f7a..51ffaf641cd8a 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb @@ -30,6 +30,5 @@ <%= render partial: "decidim/proposals/admin/proposals/bulk_actions/scope-change" %> <%= render partial: "decidim/proposals/admin/proposals/bulk_actions/merge" %> <%= render partial: "decidim/proposals/admin/proposals/bulk_actions/split" %> -<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/assign_to_valuator" %> -<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/unassign_from_valuator" %> <%= render partial: "decidim/proposals/admin/proposals/bulk_actions/publish_answers" %> +<%= render partial: "decidim/proposals/admin/proposals/bulk_actions/change_answer_status" %> diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb index 5265a2ee46da0..ab77ab38fc54c 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb @@ -1,4 +1,6 @@ -> +> <%= check_box_tag "proposal_ids_s[]", proposal.id, false, class: "js-check-all-proposal js-proposal-list-check js-proposal-id-#{proposal.id}" %>
    @@ -56,7 +58,7 @@ - <%= proposal.valuation_assignments.size %> + <%= proposal.valuation_assignments_count %> diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_assign_to_valuator.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_assign_to_valuator.html.erb index a052574ad5903..fce0d2c52d74c 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_assign_to_valuator.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_assign_to_valuator.html.erb @@ -1,15 +1,19 @@ -
    - <%= form_tag(valuation_assignment_path, method: :post, id: "js-form-assign-proposals-to-valuator", class: "form form-defaults flex items-center gap-x-2") do %> +
    + <%= form_tag(valuation_assignment_path, method: :post, id: "js-form-assign-proposals-to-valuator", class: "form form-defaults w-full") do %>
    <% proposals.each do |proposal| %> <%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %> <% end %>
    - <%= bulk_valuators_select(current_participatory_space, t("decidim.proposals.admin.proposals.index.assign_to_valuator")) %> + - <%= submit_tag(t("decidim.proposals.admin.proposals.index.assign_to_valuator_button"), id: "js-submit-assign-proposals-to-valuator", class: "button button__sm button__secondary small button--simple float-left") %> - - +
    + <%= submit_tag(t("decidim.proposals.admin.proposals.index.assign_to_valuator_button"), id: "js-submit-assign-proposals-to-valuator", class: "button button__sm button__secondary small button--simple float-left") %> + +
    <% end %>
    diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_change_answer_status.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_change_answer_status.html.erb new file mode 100644 index 0000000000000..ffa13f63193bb --- /dev/null +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_change_answer_status.html.erb @@ -0,0 +1,16 @@ +
    + <%= form_tag(update_multiple_answers_proposals_path, method: :post, id: "js-form-change-answer-status", class: "form form-defaults flex items-center gap-x-2") do %> +
    + <% proposals.each do |proposal| %> + <%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %> + <% end %> +
    + <%= hidden_field_tag :template_id %> + + <%= bulk_templates_select(current_component, t("change_answer_status", scope: "decidim.proposals.admin.proposals.index"), id: "template_id_select") %> + + <%= submit_tag(t("decidim.proposals.admin.proposals.index.update"), id: "js-submit-change-answer-status", class: "button button__sm button__secondary small button--simple float-left") %> + + + <% end %> +
    diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb index 3c9b5171a77dd..b558b4e26e888 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_dropdown.html.erb @@ -42,9 +42,16 @@ <%= t("decidim.proposals.admin.proposals.index.assign_to_valuator") %> + <% if allowed_to? :unassign_from_valuator, :proposals, valuator: current_user %> +
  • + +
  • + <% end %>
  • -
  • diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb index 57931a265475d..00731d96d9f36 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_unassign_from_valuator.html.erb @@ -1,15 +1,19 @@ -
    - <%= form_tag(valuation_assignment_path, method: :delete, id: "js-form-unassign-proposals-from-valuator", class: "form form-defaults flex items-center gap-x-2") do %> +
    + <%= form_tag(valuation_assignment_path, method: :delete, id: "js-form-unassign-proposals-from-valuator", class: "form form-defaults w-full") do %>
    <% proposals.each do |proposal| %> <%= check_box_tag "proposal_ids[]", proposal.id, false, class: "js-check-all-proposal js-proposal-id-#{proposal.id}" %> <% end %>
    - <%= bulk_valuators_select(current_participatory_space, t("decidim.proposals.admin.proposals.index.unassign_from_valuator")) %> + - <%= submit_tag(t("decidim.proposals.admin.proposals.index.unassign_from_valuator_button"), id: "js-submit-unassign-proposals-from-valuator", class: "button button__sm button__secondary small button--simple float-left") %> - - +
    + <%= submit_tag(t("decidim.proposals.admin.proposals.index.unassign_from_valuator_button"), id: "js-submit-unassign-proposals-from-valuator", class: "button button__sm button__secondary small button--simple float-left") %> + +
    <% end %>
    diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_valuators_picker.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_valuators_picker.html.erb new file mode 100644 index 0000000000000..5c8e9eb8bd912 --- /dev/null +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/bulk_actions/_valuators_picker.html.erb @@ -0,0 +1,12 @@ +<%= append_stylesheet_pack_tag "decidim_proposals", media: "all" %> + + diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb index 81f166c7a9f44..3b669a08b517c 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb @@ -1,18 +1,23 @@ <% add_decidim_page_title(t(".title")) %>
    -
    +

    <%= t(".title") %> ">
    - <%= render partial: "bulk-actions" %> - <%= link_to t(".statuses"), proposal_states_path, class: "button button__sm button__secondary" %> - <%= render partial: "decidim/admin/components/resource_action" %> +
    + <%= render partial: "bulk-actions" %> + <%= link_to t(".statuses"), proposal_states_path, class: "button button__sm button__secondary" %> + <%= render partial: "decidim/admin/components/resource_action" %> +

    + + <%= render partial: "decidim/proposals/admin/proposals/bulk_actions/assign_to_valuator" %> + <%= render partial: "decidim/proposals/admin/proposals/bulk_actions/unassign_from_valuator" %>
    - <%= admin_filter_selector(:proposals) %> -
    + <%= admin_filter_selector(filter_prefix_key) %> +
    diff --git a/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb b/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb index 2ae1c8c6d1e50..29812c40d0cde 100644 --- a/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/admin/proposals/show.html.erb @@ -1,6 +1,7 @@ <% add_decidim_page_title(translated_attribute(proposal.title)) %>
    + <%= render partial: "decidim/admin/shared/adjacent_navigation", locals: { adjacent_paths: filtered_adjacent_paths(proposal, :proposal_path) } %>

    <%= decidim_html_escape(present(proposal).title).html_safe %> @@ -111,7 +112,7 @@ <% end %>
    -
    +
    <%= t ".votes_count" %>
    <%= icon "service-line", class: "fill-gray" %> @@ -217,7 +218,7 @@ <% if allowed_to? :unassign_from_valuator, :proposals, valuator: assignment.valuator %> <%= icon_link_to( "delete-bin-line", - proposal_valuation_assignment_path(proposal, assignment.valuator_role), + valuation_assignment_path(proposal_ids: [proposal.id], valuator_role_ids: [assignment.valuator_role.id]), t(".remove_assignment"), method: :delete, data: { confirm: t(".remove_assignment_confirmation") }, diff --git a/decidim-proposals/app/views/decidim/proposals/proposals/_proposal_aside.html.erb b/decidim-proposals/app/views/decidim/proposals/proposals/_proposal_aside.html.erb index 9ae3dfc11e4d3..edabd6b229d0f 100644 --- a/decidim-proposals/app/views/decidim/proposals/proposals/_proposal_aside.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/proposals/_proposal_aside.html.erb @@ -1,6 +1,6 @@ <% if current_settings.votes_enabled? && (show_endorsements_card? || current_user) %>
    -
    +
    <%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } unless @proposal.withdrawn? %> <%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %>
    diff --git a/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb b/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb index 0b7eb379aa7c8..48c09783b82be 100644 --- a/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb @@ -35,7 +35,7 @@ <%= decidim_html_escape(present(proposal).title) %> <% end %> <% else %> - <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_supports_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %> + <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %> <%= content_tag :button, t("decidim.proposals.proposals.vote_button.maximum_votes_reached"), class: button_classes, disabled: true %> <% else %> <% if vote_limit_enabled? && remaining_votes_count_for(current_user) == 0 %> diff --git a/decidim-proposals/app/views/decidim/proposals/proposals/_voting_rules.html.erb b/decidim-proposals/app/views/decidim/proposals/proposals/_voting_rules.html.erb index ff4f97935e7cc..456ebd407a2aa 100644 --- a/decidim-proposals/app/views/decidim/proposals/proposals/_voting_rules.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/proposals/_voting_rules.html.erb @@ -14,8 +14,8 @@
  • <%= t(".threshold_per_proposal.description", limit: threshold_per_proposal) %>
  • <% end %> - <% if can_accumulate_supports_beyond_threshold? %> -
  • <%= t(".can_accumulate_supports_beyond_threshold.description", limit: threshold_per_proposal) %>
  • + <% if can_accumulate_votes_beyond_threshold? %> +
  • <%= t(".can_accumulate_votes_beyond_threshold.description", limit: threshold_per_proposal) %>
  • <% end %> <% if minimum_votes_per_user_enabled? %> @@ -24,7 +24,7 @@ <% if votes_given >= minimum_votes_per_user %> <%= t(".minimum_votes_per_user.given_enough_votes") %> <% else %> - <%= t(".minimum_votes_per_user.supports_remaining", remaining_votes: minimum_votes_per_user - votes_given) %> + <%= t(".minimum_votes_per_user.votes_remaining", remaining_votes: minimum_votes_per_user - votes_given) %> <% end %> <% end %> diff --git a/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb b/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb index f39e59de6fe64..e9527ab93316a 100644 --- a/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_vote_button.html.erb @@ -33,7 +33,7 @@ <%= decidim_html_escape(present(proposal).title) %> <% end %> <% else %> - <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_supports_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %> + <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %> <%= content_tag :span, t("decidim.proposals.proposals.vote_button.maximum_votes_reached"), class: "column button light button--sc disabled", disabled: true %> <% else %> <% if vote_limit_enabled? && remaining_votes_count_for(current_user) == 0 %> diff --git a/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb b/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb index 13cf233a69682..6641749bfca69 100644 --- a/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb +++ b/decidim-proposals/app/views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb @@ -17,7 +17,7 @@ <%= proposal.proposal_votes_count || 0 %> <% else %> - <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_supports_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %> + <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %> diff --git a/decidim-proposals/config/assets.rb b/decidim-proposals/config/assets.rb index efbc18cb7dbdb..b48de1fc91a58 100644 --- a/decidim-proposals/config/assets.rb +++ b/decidim-proposals/config/assets.rb @@ -5,5 +5,6 @@ Decidim::Webpacker.register_path("#{base_path}/app/packs") Decidim::Webpacker.register_entrypoints( decidim_proposals: "#{base_path}/app/packs/entrypoints/decidim_proposals.js", + participatory_texts_admin: "#{base_path}/app/packs/entrypoints/participatory_texts_admin.js", decidim_proposals_admin: "#{base_path}/app/packs/entrypoints/decidim_proposals_admin.js" ) diff --git a/decidim-proposals/config/locales/ar.yml b/decidim-proposals/config/locales/ar.yml index a99c9d164b553..7b544194c69e2 100644 --- a/decidim-proposals/config/locales/ar.yml +++ b/decidim-proposals/config/locales/ar.yml @@ -60,12 +60,10 @@ ar: attributes: base: not_official: غير رسمية - supported: قد تلقى الدعم أو المصادقة proposals_split: attributes: base: not_official: غير رسمية - supported: قد تلقى الدعم أو المصادقة models: decidim/proposals/admin/update_proposal_category_event: تم تغيير فئة الاقتراح decidim/proposals/admin/update_proposal_scope_event: تم تغيير نطاق الاقتراح @@ -97,13 +95,6 @@ ar: few: ملاحظات many: ملاحظات other: ملاحظات - decidim/proposals/proposal_vote: - zero: الدعم - one: الدعم - two: الدعم - few: الدعم - many: الدعم - other: الدعم decidim: admin: filters: @@ -137,7 +128,7 @@ ar: comment: تعليق create: إنشاء endorse: تأييد - vote: الدعم + vote: تصويت vote_comment: التصويت على التعليق withdraw: سحب name: اقتراحات @@ -148,23 +139,18 @@ ar: amendments_wizard_help_text: نص مساعدة معالج التعديلات announcement: إعلان attachments_allowed: السماح للمرفقات - can_accumulate_supports_beyond_threshold: يمكن أن تتراكم الدعم وراء العتبة collaborative_drafts_enabled: تم تمكين المسودات التعاونية comments_enabled: تم تمكين التعليقات comments_max_length: الحد الأقصى لطول التعليقات (اترك 0 لاستعمال القيمة الافتراضية) default_sort_order: التصنيف الافتراضي للاقتراح - default_sort_order_help: الافتراضي يعني أنه إذا تم تمكين الدعم، سيتم عرض المقترحات عشوائياً، وإذا تم حظر الدعم، فسيتم فرزها حسب الأكثر دعم. default_sort_order_options: - default: الافتراضي most_commented: صاحبة الأكثر تعليقات most_endorsed: صاحبة أكثر تأييدات most_followed: صاحبة أكثر متابعات - most_voted: صاحبة أكثر دعم random: عشوائي recent: الأخيرة with_more_authors: مع المزيد من المؤلفين geocoding_enabled: تم تمكين الترميز الجغرافي - minimum_votes_per_user: الحد الأدنى من الدعم لكل مستخدم new_proposal_body_template: نموذج جديد لمحتوى المُقتَرَح new_proposal_body_template_help: يمكنكم تعريف النص المعبأ مسبقاً الذي سيدرج في المقترحات الجديدة new_proposal_help_text: نص مساعدة اقتراح جديد @@ -184,7 +170,6 @@ ar: scope_id: نطاق scopes_enabled: النطاقات مفعلة threshold_per_proposal: عتبة لكل اقتراح - vote_limit: حد الدعم لكل مشارك step: amendment_creation_enabled: إنشاء التعديلات مُفعّلة amendment_creation_enabled_help: يمكن للمشارِك إدخال تعديلات على المقتَرَحات. @@ -204,13 +189,10 @@ ar: creation_enabled: يمكن للمشارِكين إنشاء اقتراحات creation_enabled_readonly: يتم تعطيل هذا الإعداد عند تفعيل وظيفة النصوص التشاركية. لتحميل الاقتراحات كنص تشاركي، يرجى النقر على زر النصوص التشاركية واتباع التعليمات. default_sort_order: التصنيف الافتراضي للاقتراح - default_sort_order_help: الافتراضي يعني أنه إذا تم تمكين الدعم، سيتم عرض المقترحات عشوائياً، وإذا تم حظر الدعم، فسيتم فرزها حسب الأكثر دعم. default_sort_order_options: - default: الافتراضي most_commented: صاحبة الأكثر تعليقات most_endorsed: صاحبة أكثر تأييدات most_followed: صاحبة أكثر متابعات - most_voted: صاحبة أكثر دعم random: عشوائي recent: الأخيرة with_more_authors: مع المزيد من المؤلفين @@ -219,9 +201,6 @@ ar: proposal_answering_enabled: تم تمكين الرد على الاقتراح publish_answers_immediately: نشر إجابات الاقتراح على الفور suggested_hashtags: اقترح علامات التصنيف للمشاركين لتقديم مقترحات جديدة - votes_blocked: يدعم المحظورة - votes_enabled: يدعم تمكين - votes_hidden: يدعم مخفي (إذا تم تمكين الدعم ، سيؤدي تحديد هذا إلى إخفاء عدد الدعم) events: proposals: admin: @@ -291,10 +270,7 @@ ar: email_subject: تم تحديث نطاق الاقتراح %{resource_title} notification_title: نطاق الاقتراح %{resource_title} تم تحديثه من قبل مدير. voting_enabled: - email_intro: 'يمكنك دعم المقترحات في %{participatory_space_title}! ابدأ المشاركة في هذه الصفحة:' email_outro: لقد تلقيت هذا الإشعار لأنك تتابع %{participatory_space_title}. يمكنك إيقاف تلقي الإخطارات باتباع الرابط السابق. - email_subject: بدأ دعم الاقتراح لمدة %{participatory_space_title} - notification_title: يمكنك الآن بدء دعم المقترحات في %{participatory_space_title} gamification: badges: accepted_proposals: @@ -311,13 +287,7 @@ ar: proposal_votes: conditions: - تصفح وقضاء بعض الوقت في قراءة اقتراحات الآخرين - - قدم الدعم للمقترحات التي تحبها أو تجدها مثيرة للاهتمام - description: تُمنح هذه الشارة عند دعم اقتراحات الآخرين. - description_another: قدم هذا المشارك الدعم إلى %{score} مقترحات. - description_own: لقد قدمت الدعم إلى %{score} مقترحات. - name: يدعم الاقتراح - next_level_in: تقديم الدعم ل %{score} مقترحات أخرى للوصول إلى المستوى التالي! - unearned_own: لقد قدمت الدعم لأية مقترحات حتى الآن. + - proposals: conditions: - اختر مساحة المشاركة التي تهمك مع تمكين تقديم المقترحات @@ -342,9 +312,7 @@ ar: object: اقتراحات title: اقتراحات votes: - description: عدد الدعم للمقترحات - object: الدعم - title: الدعم + object: أصوات participatory_spaces: highlighted_proposals: see_all: شاهد الكل (%{count}) @@ -494,7 +462,6 @@ ar: remove_assignment: إزالة التعيين remove_assignment_confirmation: هل أنت متأكد من أنك تريد إزالة المُقيِّم من هذا الاقتراح؟ valuators: المُقيِّمون - votes_count: يدعم العد update_category: invalid: 'هذه الاقتراحات تحتوي بالفعل على فئة %{subject_name}: %{proposals}.' success: 'تم تحديث الاقتراحات بنجاح إلى فئة %{subject_name}: %{proposals}.' @@ -675,9 +642,6 @@ ar: buttons: amend: تعديل comment: تعليق - proposal_votes: - create: - error: كانت هناك مشكلة في دعم الاقتراح. proposals: dynamic_map_instructions: description: سيتم تحديث الإحداثيات لدى النقر على زر "السابق". غير أن العنوان لن يتغير. @@ -707,7 +671,6 @@ ar: search: بحث state: الحالة type: نوع - voted: أيد index: click_here: عرض جميع الاقتراحات collaborative_drafts_list: الوصول إلى المسودات التعاونية @@ -730,7 +693,6 @@ ar: most_commented: الأكثر تعليقًا عليها most_endorsed: التي تحصلت على أكبر دعم most_followed: الأكثر متابَعة - most_voted: التي تحصلت على أكبر دعم random: عشوائية recent: الأخيرة with_more_authors: مع المزيد من المؤلفين @@ -770,38 +732,15 @@ ar: proposal_accepted_reason: 'تم قبول هذا الاقتراح بسبب:' proposal_in_evaluation_reason: هذا الاقتراح قيد التقييم proposal_rejected_reason: 'تم رفض هذا الاقتراح بسبب:' - withdraw_btn_hint: يمكنك سحب اقتراحك إذا غيرت رأيك ، طالما أنك لم تتلق أي دعم. لم يتم حذف الاقتراح ، وسوف يظهر في قائمة المقترحات المسحوبة. withdraw_confirmation_html: هل أنت متأكد من أنك تريد سحب هذا الاقتراح؟

    لا يمكن إلغاء هذا الإجراء! withdraw_proposal: سحب الاقتراح update: title: تحديث الإقتراح vote_button: - already_voted: معتمد بالفعل - already_voted_hover: سحب الدعم - maximum_votes_reached: تم الوصول إلى حد الدعم - no_votes_remaining: لا يدعم المتبقية - vote: الدعم - votes_blocked: يدعم المعوقين - votes_count: - count: - zero: يدعم - one: الدعم - two: يدعم - few: يدعم - many: يدعم - other: يدعم + vote: صوِّت voting_rules: - can_accumulate_supports_beyond_threshold: - description: كل اقتراح يمكن أن تتراكم أكثر من %{limit} يدعم - minimum_votes_per_user: - description: يجب عليك توزيع ما لا يقل عن %{votes} دعما بين المقترحات المختلفة. - supports_remaining: يجب عليك دعم %{remaining_votes} مقترحات أخرى ليتم أخذها في الاعتبار. proposal_limit: description: يمكنك إنشاء ما يصل إلى %{limit} مقترحات. - title: 'الدعامات تخضع للقواعد التالية:' - vote_limit: - description: يمكنك دعم ما يصل إلى %{limit} مقترحات. - votes: الدعم wizard_aside: back: الى الخلف back_from_step_1: العودة إلى الاقتراحات @@ -836,4 +775,4 @@ ar: statistics: proposals_accepted: الاقتراحات الموافق عليها proposals_count: الاقتراحات - supports_count: الدعم + votes_count: الأصوات diff --git a/decidim-proposals/config/locales/bg.yml b/decidim-proposals/config/locales/bg.yml index 670b189ada943..329a8e745dac0 100644 --- a/decidim-proposals/config/locales/bg.yml +++ b/decidim-proposals/config/locales/bg.yml @@ -74,12 +74,12 @@ bg: attributes: base: not_official: Не са официални - supported: Получили са подкрепа или одобрения + voted: Получили са гласове или одобрения proposals_split: attributes: base: not_official: Не са официални - supported: Получили са подкрепа или одобрения + voted: Получили са гласове или одобрения models: decidim/proposals/admin/update_proposal_category_event: Категорията на предложението е променена decidim/proposals/admin/update_proposal_scope_event: Сферата на предложението е променена @@ -100,8 +100,8 @@ bg: one: Бележка other: Бележки decidim/proposals/proposal_vote: - one: Поддръжка - other: Поддръжки + one: Глас + other: Гласове decidim: admin: filters: @@ -143,7 +143,7 @@ bg: comment: Коментар create: Създай endorse: Одобри - vote: Поддръжка + vote: Глас vote_comment: Оцени коментара withdraw: Оттегляне name: Предложения @@ -154,23 +154,24 @@ bg: amendments_wizard_help_text: Помощен текст на съветника за изменения announcement: Обявление attachments_allowed: Позволи прикачвания - can_accumulate_supports_beyond_threshold: Може да събира поддръжка над прага + attachments_allowed_help: Като активирате тази опция, предложенията ще бъдат в режим на мрежа по подразбиране и първото изображение ще се появи на картата. + can_accumulate_votes_beyond_threshold: Може да натрупва гласове над прага collaborative_drafts_enabled: Съвместните чернови са разрешени comments_enabled: Коментарите са разрешени comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране) default_sort_order: Сортиране на предложения по подразбиране - default_sort_order_help: '"По подразбиране" означава, че ако подрепата е активирана, предложенията ще се показват сортирани по произволен ред, а ако подкрепата е блокирана, тогава те ще бъдат сортирани по най-подкрепяни.' + default_sort_order_help: Автоматично означава, че ако гласовете са активирани, предложенията ще се показват сортирани на случаен принцип, а ако гласовете са блокирани, тогава те ще бъдат сортирани по най-гласуваните. default_sort_order_options: - default: По подразбиране + automatic: Автоматично most_commented: Най-коментирани most_endorsed: Най-препоръчвани most_followed: Най-следвани - most_voted: Най-подкрепяни + most_voted: Най-гласувани random: Произволно recent: Скорошни with_more_authors: С повече автори geocoding_enabled: Координатите са разрешени - minimum_votes_per_user: Минимална поддръжка за потребител + minimum_votes_per_user: Минимален брой гласове на потребител new_proposal_body_template: Шаблон за основен текст на предложение new_proposal_body_template_help: Можете да зададете текст по подразбиране за нови предложения new_proposal_help_text: Нов помощен текст на предложение @@ -191,7 +192,7 @@ bg: scope_id: Обхват scopes_enabled: Обхватите са активирани threshold_per_proposal: Праг за предложенията - vote_limit: Максимален брой поддръжки на участник + vote_limit: Лимит за гласуване на участник step: amendment_creation_enabled: Създаване на поправки разрешено amendment_creation_enabled_help: Участникът може да изменя предложенията. @@ -211,13 +212,13 @@ bg: creation_enabled: Участниците могат да създават предложения creation_enabled_readonly: Тази настройка е деактивирана, когато активирате функцията "Текстове за участие". За да качите предложения като текст за участие, щракнете върху бутона "Текстове за участие" и следвайте инструкциите. default_sort_order: Сортиране на предложения по подразбиране - default_sort_order_help: '"По подразбиране" означава, че ако подрепата е активирана, предложенията ще се показват сортирани по произволен ред, а ако подкрепата е блокирана, тогава те ще бъдат сортирани по най-подкрепяни.' + default_sort_order_help: Автоматично означава, че ако гласовете са активирани, предложенията ще се показват сортирани на случаен принцип, а ако гласовете са блокирани, тогава те ще бъдат сортирани по най-гласуваните. default_sort_order_options: - default: По подразбиране + automatic: Автоматично most_commented: Най-коментирани most_endorsed: Най-препоръчвани most_followed: Най-следвани - most_voted: Най-подкрепяни + most_voted: Най-гласувани random: Произволно recent: Скорошни with_more_authors: С повече автори @@ -227,9 +228,9 @@ bg: publish_answers_immediately: Публикувай отговорите на предложения незабавно publish_answers_immediately_help_html: 'Имайте предвид, че ако отговорите на някое предложение, без тази активация, ще трябва да го публикувате ръчно, като го изберете и използвате действието за публикуване. За повече информация как работи това вижте страницата с документация за отговорите на предложенията.' suggested_hashtags: Предлагай хаштаг на участниците когато създават предложения - votes_blocked: Поддържането блокирано - votes_enabled: Поддържането разрешено - votes_hidden: Поддръжките са скрити (ако поддръжките са активирани, тази опция ще скрие броя на поддръжките) + votes_blocked: Гласовете са блокирани + votes_enabled: Гласовете са активирани + votes_hidden: Скрити гласове (ако гласовете са активирани, отметката ще скрие броя на гласовете) events: proposals: admin: @@ -316,10 +317,10 @@ bg: email_subject: Обхватът на предложението %{resource_title} беше актуализиран notification_title: Обхватът на предложението %{resource_title} беше актуализиран от администратор. voting_enabled: - email_intro: 'Можете да подкрепяте нови предложения в(ъв) %{participatory_space_title}! Започнете да участвате на следната страница:' + email_intro: 'Можете да гласувате за предложения в %{participatory_space_title}! Започнете да участвате в тази страница:' email_outro: Получавате това известие, защото следвате %{participatory_space_title}. Може да прекратите известията чрез предходния линк. - email_subject: Предоставянето на подкрепа за предложения започна за %{participatory_space_title} - notification_title: Вече можете да започнете да подкрепяте предложения в(ъв) %{participatory_space_title} + email_subject: Започна гласуването на предложения за %{participatory_space_title} + notification_title: Вече можете да започнете гласуване на предложения в %{participatory_space_title} gamification: badges: accepted_proposals: @@ -336,14 +337,14 @@ bg: proposal_votes: conditions: - Разгледайте и прекарайте известно време, за да се запознаете с предложенията на други хора - - Подкрепете предложенията, които харесвате или намирате за интересни - description: Тази значка се предоставя, когато подкрепяте предложения на други хора. - description_another: Този участник е подкрепил %{score} предложения. - description_own: Подкрепили сте %{score} предложения. - name: Подкрепяния на предложение - next_level_in: Подкрепете още %{score} предложения, за да достигнете следващото ниво! - unearned_another: Този участник все още не е подкрепил нито едно предложение. - unearned_own: Все още не сте подкрепили нито едно предложение. + - Гласувайте за предложенията, които харесвате или намирате за интересни + description: Тази значка се предоставя, когато гласувате за предложения на други хора. + description_another: Този участник е гласувал за %{score} предложения. + description_own: Вие гласувахте за %{score} предложения. + name: Гласове за предложения + next_level_in: Гласувайте за още %{score} предложения, за да достигнете следващото ниво! + unearned_another: Този участник все още не е гласувал за нито едно предложение. + unearned_own: Все още не сте гласували за нито едно предложение. proposals: conditions: - Изберете пространството за участие, което ви интересува, с подаване на активни предложения @@ -369,9 +370,9 @@ bg: object: предложения title: Предложения votes: - description: Брой на подкрепяния за предложения - object: подкрепа - title: Подкрепа + description: Брой гласове за предложения + object: гласове + title: Гласове participatory_spaces: highlighted_proposals: last: Позледни предложения @@ -554,7 +555,7 @@ bg: remove_assignment: Премахване на възлагане remove_assignment_confirmation: Наистина ли искате да премахнете оценителя от това предложение? valuators: Оценители - votes_count: Брой подкрепяния + votes_count: Брой гласове update_category: invalid: 'Тези предложения вече имат категорията %{subject_name}: %{proposals}.' select_a_category: Моля, изберете категория. @@ -727,13 +728,81 @@ bg: create: error: Възникна проблем при запазването на предложението. success: Предложението беше създадено успешно. Запазено като чернова. + destroy_draft: + error: Възникна проблем при изтриването на съвместната чернова. + success: Черновата на предложението беше изтрита успешно. + last_activity: + new_proposal: 'Ново предложение:' + proposal_updated: 'Предложението е обновено:' + models: + proposal: + fields: + category: Категория + comments: Коментари + id: ID + notes: Бележки + official_proposal: Официално предложение + published_answer: Публикуван отговор + published_at: Публикувано на + scope: Обхват + state: Статус + title: Заглавие + valuator: Оценител + valuators: Оценители + votes: Гласове + proposal_state: + css_class: CSS-клас + title: Статус + new: + limit_reached: Не можете да създавате нови предложения, тъй като сте превишили ограничението. + participatory_text_proposal: + alternative_title: Понастоящем няма текстове за участие + buttons: + amend: Изменение + comment: Коментар + proposal_votes: + create: + error: Имаше проблем с гласуването на предложението. proposals: + dynamic_map_instructions: + description: Координатите ще бъдат актуализирани, когато щракнете върху бутона "преглед". Адресът обаче не се променя. + instructions: Можете да преместите точката на картата. + edit: + add_documents: Добавяне на документи + attachment_legend: "(Незадължително) Добавяне на прикачен файл" + back: Назад + edit_documents: Редактиране на документ + select_a_category: Моля, изберете категория + send: Изпрати + title: Редактиране на предложение + edit_draft: + discard: Отхвърляне на черновата + discard_confirmation: Наистина ли искате да отхвърлите черновата на това предложение? + send: Преглед + title: Редактиране на черновата на предложението + edit_form_fields: + marker_added: Маркерът е добавен към картата. + filters: + activity: Моята дейност + all: Всички + amendment_type: Тип + category: Категория + my_proposals: Моите предложения + origin: Произход + related_to: Свързано с + scope: Обхват + search: Търсене + state: Статус + type: Тип + voted: Гласувано index: click_here: Виж всички предложения collaborative_drafts_list: Достъп до съвместни чернови count: one: "%{count} предложение" other: "%{count} предложения" + grid_mode: Режим на мрежата + list_mode: Режим на списък new_proposal: Ново предложение see_all: Виж всички предложения see_all_withdrawn: Вижте всички оттеглени предложения @@ -746,7 +815,7 @@ bg: most_commented: Най-коментирани most_endorsed: Най-препоръчвани most_followed: Най-следвани - most_voted: Най-подкрепяни + most_voted: Най-гласувани random: Произволно recent: Скорошни with_more_authors: С повече автори @@ -758,3 +827,101 @@ bg: preview: announcement_body: Вашето предложение е запазено като чернова. Трябва да се публикува, за да се появи на сайта. announcement_title: Вашето предложение все още не е публикувано + modify: Промяна на предложението + proposal_edit_before_minutes: + one: Ще можете да редактирате това предложение в рамките на една минута, след като бъде публикувано. След като този времеви прозорец изтече, повече няма да можете да редактирате предложението. + other: Ще можете да редактирате това предложение в рамките на %{count} минути, след като бъде публикувано. След като този времеви прозорец изтече, повече няма да можете да редактирате предложението. + publish: Публикувай + title: Публикувайте предложението си + proposals: + empty: Все още няма предложения. + empty_filters: Няма предложения с тези критерии. + show: + answer: Отговор + changes_at_title: Изменение на „%{title}“ + edit_proposal: Редактиране на предложение + estimated_cost: Предвидени разходи + hidden_endorsers_count: + one: и още %{count} човек + other: и още %{count} души + link_to_collaborative_draft_help_text: Това предложение е резултат от съвместна чернова. Прегледайте хронологията + link_to_collaborative_draft_text: Вижте съвместната чернова + link_to_promoted_emendation_help_text: Това предложение е допринасяща поправка + link_to_promoted_emendation_text: Вижте отхвърлената поправка. + link_to_proposal_from_emendation_help_text: Това е отхвърлена поправка + link_to_proposal_from_emendation_text: Вижте предложението + proposal_accepted_reason: 'Това предложение е прието, защото:' + proposal_in_evaluation_reason: Това предложение е в процес на оценяване + proposal_rejected_reason: 'Това предложение е отхвърлено, защото:' + withdraw_btn_hint: Там можете да оттеглите предложението си, ако промените решението си, стига да не сте получили нито един глас. Предложението не се изтрива, то ще се появи в списъка с оттеглени предложения. беше проблем с гласуването на предложението. + withdraw_confirmation_html: Наистина ли искате да оттеглите това предложение?

    Това действие не може да се отмени! + withdraw_proposal: Оттегляне на предложението + update: + title: Актуализиране на предложението + vote_button: + already_voted: Вече гласувано + already_voted_hover: Оттегляне на гласа + maximum_votes_reached: Лимитът за гласуване е достигнат + no_votes_remaining: Няма останали гласове + vote: Глас + votes_blocked: Гласуването е деактивирано + votes_count: + count: + one: Глас + other: Гласове + voting_rules: + can_accumulate_votes_beyond_threshold: + description: Всяко предложение може да събере повече от %{limit} гласа + minimum_votes_per_user: + description: Трябва да разпределите минимум %{votes} гласа между различните предложения. + given_enough_votes: Дадохте достатъчно гласове. + votes_remaining: Трябва да гласувате за още %{remaining_votes} предложения, за да бъдат взети под внимание вашите гласове. + proposal_limit: + description: Можете да създадете до %{limit} предложения. + threshold_per_proposal: + description: За да бъдат валидирани, предложенията трябва да достигнат %{limit} гласа. + title: 'За гласуването се прилагат следните правила:' + vote_limit: + description: Можете да гласувате до %{limit} предложения. + votes: Оставащи %{number} гласа + wizard_aside: + back: Назад + back_from_step_1: Назад към предложенията + back_from_step_2: Назад към редактирането + wizard_steps: + current_step: Текуща стъпка + step_1: Създайте Ваше предложение + step_2: Публикувайте предложението си + title: Стъпки за създаване на предложение + proposals_picker: + choose_proposals: Избор на предложения + no_proposals: Няма предложения, отговарящи на вашите критерии за търсене или няма предложения. + publish: + error: Възникна проблем при публикуването на предложението. + success: Предложението беше публикувано успешно. + publish_answers: + success: Отговорите на предложението бяха публикувани успешно. + update: + error: Възникна проблем при запазването на предложението. + success: Предложението беше актуализирано успешно. + update_draft: + error: Възникна проблем при запазването на съвместната чернова. + success: Черновата на предложението беше актуализирана успешно. + versions: + index: + title: Версии + withdraw: + errors: + has_votes: Това предложение не може да бъде оттеглено, защото вече има гласове. + resource_links: + copied_from_component: + proposal_proposal: Свързани предложения + included_projects: + project_result: 'Резултати, които се показват в този проект:' + included_proposals: + proposal_project: 'Предложение, което се показва в тези проекти:' + proposal_result: 'Предложение, което се показва в тези резултати:' + statistics: + proposals_accepted: Приети предложения + proposals_count: Предложения + votes_count: Гласове diff --git a/decidim-proposals/config/locales/ca.yml b/decidim-proposals/config/locales/ca.yml index 10c153c097792..3d810edfd0780 100644 --- a/decidim-proposals/config/locales/ca.yml +++ b/decidim-proposals/config/locales/ca.yml @@ -74,12 +74,12 @@ ca: attributes: base: not_official: No son oficials - supported: Han rebut suports o adhesions + voted: Han rebut suports o adhesions proposals_split: attributes: base: not_official: No son oficials - supported: Han rebut suports o adhesions + voted: Han rebut suports o adhesions models: decidim/proposals/admin/update_proposal_category_event: S'ha canviat la categoria de la proposta decidim/proposals/admin/update_proposal_scope_event: Àmbit de la proposta modificat @@ -100,7 +100,7 @@ ca: one: Nota other: Notes decidim/proposals/proposal_vote: - one: Suport + one: Donar suport other: Suports decidim: admin: @@ -154,14 +154,15 @@ ca: amendments_wizard_help_text: Text d'ajuda al crear una nova esmena announcement: Avís attachments_allowed: Permetre adjunts - can_accumulate_supports_beyond_threshold: Pot acumular suports més enllà del llindar + attachments_allowed_help: En activar aquesta opció, les propostes es mostraran en mode de quadrícula per defecte i la primera imatge apareixerà a la targeta. + can_accumulate_votes_beyond_threshold: Pot acumular suports més enllà del llindar collaborative_drafts_enabled: Esborranys col·laboratius habilitats comments_enabled: Comentaris habilitats comments_max_length: Longitud màxima dels comentaris (deixa 0 si vols mantenir la configuració per defecte) default_sort_order: Ordre de propostes per defecte default_sort_order_help: '''Per defecte'' vol dir que si els suports estan habilitats, les propostes es mostraran aleatòriament, i si els suports estan bloquejats, aleshores es mostraran de més a menys suports.' default_sort_order_options: - default: Per defecte + automatic: Per defecte most_commented: Més comentades most_endorsed: Amb més adhesions most_followed: Amb més seguidores @@ -170,7 +171,7 @@ ca: recent: Recents with_more_authors: Amb més autores geocoding_enabled: Geocodificació habilitada - minimum_votes_per_user: Suports mínims per participant + minimum_votes_per_user: Suports mínims per usuari new_proposal_body_template: Plantilla pel text de nova proposta new_proposal_body_template_help: Pots definir el text predefinit que hauria de tenir una nova proposta new_proposal_help_text: Text d'ajuda al crear una nova proposta @@ -191,7 +192,7 @@ ca: scope_id: Àmbit scopes_enabled: Àmbits habilitats threshold_per_proposal: Llindar per proposta - vote_limit: Límit de suports per participant + vote_limit: Límit de propostes per participant step: amendment_creation_enabled: Creació d'esmenes habilitada amendment_creation_enabled_help: Les participants poden esmenar les propostes. @@ -213,7 +214,7 @@ ca: default_sort_order: Ordre per defecte de propostes default_sort_order_help: '''Per defecte'' vol dir que si els suports estan habilitats, les propostes es mostraran aleatòriament, i si els suports estan bloquejats, aleshores es mostraran de més a menys suports.' default_sort_order_options: - default: Per defecte + automatic: Per defecte most_commented: Més comentades most_endorsed: Amb més adhesions most_followed: Amb més seguidores @@ -229,7 +230,7 @@ ca: suggested_hashtags: Hashtags suggerits a les participants per a noves propostes votes_blocked: Suports bloquejats votes_enabled: Suports habilitats - votes_hidden: Suports ocults (si els suports estan habilitats, marcant aquesta opció s'amagarà el nombre de suports) + votes_hidden: Suports ocults (si els suports estan habilitats, marcant aquesta opció amagarà el nombre de suports) events: proposals: admin: @@ -316,9 +317,9 @@ ca: email_subject: S'ha actualitzat l'àmbit de la proposta %{resource_title} notification_title: L'àmbit de la proposta %{resource_title} ha estat actualitzat per una administradora. voting_enabled: - email_intro: 'Pots començar a donar suports a les propostes de %{participatory_space_title}! Comença a participar en aquesta pàgina:' + email_intro: 'Pots començar a donar suports a les propostes de %{participatory_space_title}. Comença a participar a aquesta pàgina:' email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior. - email_subject: El recolzament a propostes ha començat per a l'espai "%{participatory_space_title}" + email_subject: La recollida de suports a les propostes recollides a "%{participatory_space_title}" ha començat notification_title: Ja pots començar a donar suports a propostes a %{participatory_space_title} gamification: badges: @@ -336,12 +337,12 @@ ca: proposal_votes: conditions: - Navega i passa un temps llegint les propostes d'altres persones - - Dóna suport a les propostes amb les que estiguis d'acord o trobis interessants - description: Aquest distintiu es concedeix quan dones suport a propostes d'altres persones. + - Dona suport a les propostes amb què estiguis d'acord o trobis interessants + description: Aquesta ensenya es concedeix quan dones suport a propostes d'altres persones. description_another: Aquesta participant ha donat suport a %{score} propostes. description_own: Has donat suport a %{score} propostes. name: Suports a propostes - next_level_in: Dóna suport a %{score} propostes més per arribar al següent nivell! + next_level_in: Dona suport a %{score} propostes més per arribar al següent nivell! unearned_another: Aquesta participant encara no ha donat suport a cap proposta. unearned_own: Encara no has donat suport a cap proposta. proposals: @@ -609,13 +610,13 @@ ca: withdrawn: Retirada application_helper: filter_origin_values: - all: Totes + all: Tots meetings: Trobades official: Oficial participants: Participants user_groups: Grups filter_state_values: - all: Totes + all: Tots not_answered: No resposta filter_type_values: all: Totes @@ -651,7 +652,7 @@ ca: empty: Encara no hi ha cap esborrany col·laboratiu empty_filters: No hi ha cap esborrany col·laboratiu amb aquest criteri filters: - all: Todas + all: Tots amendment: Esmenes category: Categoria open: Obert @@ -783,7 +784,7 @@ ca: marker_added: Marcador afegit al mapa. filters: activity: La meva activitat - all: Tots + all: Totes amendment_type: Tipus category: Categoria my_proposals: Les meves propostes @@ -800,6 +801,8 @@ ca: count: one: "%{count} proposta" other: "%{count} propostes" + grid_mode: Vista en quadrícula + list_mode: Vista en llista new_proposal: Nova proposta see_all: Veure totes les propostes see_all_withdrawn: Veure totes les propostes retirades @@ -812,7 +815,7 @@ ca: most_commented: Més comentades most_endorsed: Amb més adhesions most_followed: Amb més seguidores - most_voted: Amb més suports + most_voted: Ha rebut més suports random: Aleatori recent: Recent with_more_authors: Amb més autores @@ -857,26 +860,26 @@ ca: title: Actualitzar la proposta vote_button: already_voted: Ja li has donat suport - already_voted_hover: Retira suport + already_voted_hover: Retirar el suport maximum_votes_reached: S'ha arribat al límit de suports no_votes_remaining: No hi ha suports restants - vote: Dona suport - votes_blocked: Suports deshabilitats + vote: Donar suport + votes_blocked: Recollida de suports desactivada votes_count: count: one: Suport other: Suports voting_rules: - can_accumulate_supports_beyond_threshold: + can_accumulate_votes_beyond_threshold: description: Cada proposta pot acumular més de %{limit} suports minimum_votes_per_user: description: Has de distribuir un mínim de %{votes} suports entre diferents propostes. given_enough_votes: Has donat suports suficients. - supports_remaining: Has de donar %{remaining_votes} suport/s més a propostes per a que els teus suports siguin tinguts en compte. + votes_remaining: Has de donar %{remaining_votes} suport/s més a propostes perquè els teus suports siguin tinguts en compte. proposal_limit: description: Pots crear fins a %{limit} propostes. threshold_per_proposal: - description: Perquè les propostes siguin validades han d'arribar a un mínim de %{limit} suports. + description: Per ser validades, les propostes han d'arribar a %{limit} suports. title: 'La selecció de propostes es regeix per les següents normes:' vote_limit: description: Pots donar suport a %{limit} propostes. @@ -909,7 +912,7 @@ ca: title: Versions withdraw: errors: - has_supports: Aquesta proposta no es pot retirar perquè ja compta amb suports. + has_votes: Aquesta proposta no es pot retirar perquè ja compta amb suports. resource_links: copied_from_component: proposal_proposal: Propostes relacionades @@ -921,4 +924,4 @@ ca: statistics: proposals_accepted: Propostes acceptades proposals_count: Propostes - supports_count: Suports + votes_count: Vots diff --git a/decidim-proposals/config/locales/cs.yml b/decidim-proposals/config/locales/cs.yml index a33c9d33513ad..7658463ca05b7 100644 --- a/decidim-proposals/config/locales/cs.yml +++ b/decidim-proposals/config/locales/cs.yml @@ -74,12 +74,10 @@ cs: attributes: base: not_official: Nejsou oficiální - supported: Obdrželi podporu nebo potvrzení proposals_split: attributes: base: not_official: Nejsou oficiální - supported: Obdrželi podporu nebo potvrzení models: decidim/proposals/admin/update_proposal_category_event: Kategorie nabídky se změnila decidim/proposals/admin/update_proposal_scope_event: Rozsah návrhu se změnil @@ -105,11 +103,6 @@ cs: few: Poznámky many: Poznámky other: Poznámky - decidim/proposals/proposal_vote: - one: Hlasování - few: Hlasy - many: Hlasy - other: Hlasy decidim: admin: filters: @@ -151,7 +144,6 @@ cs: comment: Komentář create: Vytvořit endorse: Schválit - vote: Hlasování vote_comment: Komentář hlasování withdraw: Ustoupit name: Návrhy @@ -162,23 +154,18 @@ cs: amendments_wizard_help_text: Nápověda průvodce k Pozměňovacím návrhům announcement: Oznámení attachments_allowed: Povolit přílohy - can_accumulate_supports_beyond_threshold: Mohou hromadit podpory za prahem collaborative_drafts_enabled: Společné koncepty povoleny comments_enabled: Komentáře povoleny comments_max_length: Maximální délka komentáře (ponechte 0 pro výchozí hodnotu) default_sort_order: Výchozí řazení návrhu - default_sort_order_help: Výchozí znamená, že pokud jsou podporované funkce povoleny, budou návrhy zobrazeny náhodně, a pokud jsou podpory blokovány, pak budou seřazeny podle nejpodporovanější. default_sort_order_options: - default: Výchozí most_commented: Nejvíce komentované most_endorsed: Nejvíce schvalované most_followed: Nejvíce sledované - most_voted: Nejvíce podporované random: Náhodně recent: Nedávné with_more_authors: S více autory geocoding_enabled: Geokódování povoleno - minimum_votes_per_user: Minimální počet hlasů na uživatele new_proposal_body_template: Šablona těla nového návrhu new_proposal_body_template_help: Můžete definovat předem vyplněný text, který budou mít nové návrhy new_proposal_help_text: Nový text nápovědy návrhu @@ -198,7 +185,6 @@ cs: scope_id: Oblast působnosti scopes_enabled: Oblasti působnosti povoleny threshold_per_proposal: Prah na návrh - vote_limit: Počet hlasů na uživatele step: amendment_creation_enabled: Umožnit pozměnění a doplnění amendment_creation_enabled_help: Účastníci mohou pozměňovat návrhy. @@ -218,13 +204,10 @@ cs: creation_enabled: Účastníci mohou vytvářet návrhy creation_enabled_readonly: Toto nastavení je zakázáno, když aktivujete funkci Participativní texty. Chcete-li návrhy nahrát jako participativní text, klikněte na tlačítko Participativní texty a postupujte podle pokynů. default_sort_order: Výchozí řazení návrhu - default_sort_order_help: Ve výchozím nastavení to znamená, že pokud jsou podpory povoleny, budou návrhy zobrazeny náhodně seřazené, a pokud jsou podpory blokovány, budou seřazeny podle nejvíce podporovaných. default_sort_order_options: - default: Výchozí most_commented: Nejvíce komentované most_endorsed: Nejvíce schvalované most_followed: Nejvíce sledované - most_voted: Nejvíce podporované random: Náhodně recent: Nedávné with_more_authors: S více autory @@ -234,9 +217,6 @@ cs: publish_answers_immediately: Okamžitě publikovat odpovědi návrhu publish_answers_immediately_help_html: 'Mějte na paměti, že pokud odpovíte na jakýkoli návrh bez tohoto povolení, budete je muset publikovat ručně jejich výběrem a použitím publikační akce. Více informací o tom, jak to funguje, naleznete na stránce odpovědi návrhů.' suggested_hashtags: Hashtagy navržené uživatelům pro nové návrhy - votes_blocked: Hlasování bylo blokováno - votes_enabled: Hlasování povoleno - votes_hidden: Hlasy skryté (pokud jsou povoleny hlasy, při kontrole se skryje počet hlasů) events: proposals: admin: @@ -323,10 +303,7 @@ cs: email_subject: Rámec návrhu %{resource_title} byl aktualizován notification_title: Rozsah návrhu %{resource_title} byl aktualizován správcem. voting_enabled: - email_intro: 'Můžete hlasovat návrhy v %{participatory_space_title}! Začněte se účastnit této stránky:' email_outro: Toto oznámení jste obdrželi, protože jste sledovali %{participatory_space_title}. Po předchozím propojení můžete přestat přijímat oznámení. - email_subject: Hlasování návrhů bylo zahájeno na úrovni %{participatory_space_title} - notification_title: Nyní můžete zahájit hlasování v %{participatory_space_title} gamification: badges: accepted_proposals: @@ -343,14 +320,7 @@ cs: proposal_votes: conditions: - Procházejte a strávte nějaký čas čtením nápadů jiných lidí - - Podpořte návrhy, které se vám líbí nebo které jsou zajímavé - description: Tento odznak je udělen při podpoře návrhů jiných lidí. - description_another: Tento uživatel podpořil %{score} návrhů. - description_own: Podpořili jste %{score} návrhů. - name: Podpora návrhů - next_level_in: Poskytněte podporu %{score} dalších návrhů, abyste dosáhli další úrovně! - unearned_another: Tento uživatel zatím nepodpořil žádné návrhy. - unearned_own: Zatím jste nepodpořili žádné návrhy. + - proposals: conditions: - Zvolte participační prostor pro účast vašeho zájmu s povoleným podáním návrhů @@ -375,10 +345,6 @@ cs: description: Počet vytvořených návrhů object: návrhy title: Návrhy - votes: - description: Počet hlasů vygenerovaných v návrzích uživatelů - object: hlasů - title: Hlasy participatory_spaces: highlighted_proposals: last: Poslední návrhy @@ -567,7 +533,6 @@ cs: remove_assignment: Odstranit přiřazení remove_assignment_confirmation: Jste si jisti, že chcete odstranit hodnotitele z tohoto návrhu? valuators: Hodnotitelé - votes_count: Počet hlasů update_category: invalid: 'Tyto návrhy se již jmenují %{subject_name} v kategorii: %{proposals}.' select_a_category: Vyberte kategorii. @@ -776,9 +741,6 @@ cs: buttons: amend: Pozměnit comment: Komentář - proposal_votes: - create: - error: Při hlasování o návrhu došlo k chybám. proposals: dynamic_map_instructions: description: Souřadnice budou aktualizovány po kliknutí na tlačítko 'náhled'. Adresa se však nemění. @@ -810,7 +772,6 @@ cs: search: Vyhledávání state: Stav type: Typ - voted: Hlasoval index: click_here: Zobrazit všechny návrhy collaborative_drafts_list: Přístup ke konceptům spolupráce @@ -831,7 +792,6 @@ cs: most_commented: Nejvíce komentované most_endorsed: Nejvíce schválené most_followed: Nejvíce sledované - most_voted: Nejvíce podporované random: Náhodně recent: Nedávné with_more_authors: S více autory @@ -873,39 +833,13 @@ cs: proposal_accepted_reason: 'Tento návrh byl přijat, protože:' proposal_in_evaluation_reason: Tento návrh se hodnotí proposal_rejected_reason: 'Tento návrh byl zamítnut, protože:' - withdraw_btn_hint: Pokud změníte názor, můžete svůj návrh stáhnout, pokud jste nedostali žádnou podporu. Návrh není zrušen, objeví se v seznamu stažených návrhů. withdraw_confirmation_html: Jste si jisti, že chcete stáhnout tento návrh?

    Tuto akci nelze zrušit! withdraw_proposal: Návrh stáhnout update: title: Aktualizovat návrh - vote_button: - already_voted: Již bylo hlasováno - already_voted_hover: Zavolejte - maximum_votes_reached: Dosáhla se omezení hlasování - no_votes_remaining: Žádné zbývající hlasy - vote: Hlasování - votes_blocked: Hlasování je zakázáno - votes_count: - count: - one: Podpora - few: Podpory - many: Podpor - other: Podpor voting_rules: - can_accumulate_supports_beyond_threshold: - description: Každý návrh může akumulovat více než %{limit} podpor - minimum_votes_per_user: - description: Musíte rozdělit minimálně %{votes} hlasů mezi různé návrhy. - given_enough_votes: Poskytli jste dostatek podpor. - supports_remaining: Musíte hlasovat o dalších %{remaining_votes} návrzích, aby se vaše hlasy zohlednily. proposal_limit: description: Můžete vytvořit až %{limit} návrhů. - threshold_per_proposal: - description: Aby mohly být návrhy potvrzeny, musí dosáhnout %{limit} podpor. - title: 'Hlasování podléhá těmto pravidlům:' - vote_limit: - description: Můžete hlasovat až pro %{limit} návrhů. - votes: Hlasy wizard_aside: back: Zadní back_from_step_1: Zpět k návrhům @@ -932,9 +866,6 @@ cs: versions: index: title: Verze - withdraw: - errors: - has_supports: Tento návrh nemůže být stažen, protože již získal hlasy pro. resource_links: copied_from_component: proposal_proposal: Související návrhy @@ -946,4 +877,4 @@ cs: statistics: proposals_accepted: Přijaté návrhy proposals_count: Návrhy - supports_count: Podpory + votes_count: Hlasy diff --git a/decidim-proposals/config/locales/de.yml b/decidim-proposals/config/locales/de.yml index be23b77ff72a3..12f7294eeb315 100644 --- a/decidim-proposals/config/locales/de.yml +++ b/decidim-proposals/config/locales/de.yml @@ -74,12 +74,12 @@ de: attributes: base: not_official: Sind nicht offiziell - supported: Haben Stimmen oder Unterstützung erhalten + voted: Haben Stimmen oder Unterstützung erhalten proposals_split: attributes: base: not_official: Sind nicht offiziell - supported: Haben Stimmen oder Unterstützung erhalten + voted: Haben Stimmen oder Unterstützung erhalten models: decidim/proposals/admin/update_proposal_category_event: Vorschlagskategorie geändert decidim/proposals/admin/update_proposal_scope_event: Vorschlagsumfang geändert @@ -100,8 +100,8 @@ de: one: Anmerkung other: Anmerkungen decidim/proposals/proposal_vote: - one: Unterstützung - other: Unterstützer + one: Abstimmung + other: Abstimmungen decidim: admin: filters: @@ -143,7 +143,7 @@ de: comment: Kommentieren create: Erstellen endorse: Unterstützung - vote: Abstimmung + vote: Abstimmen vote_comment: Kommentar bewerten withdraw: Zurückziehen name: Vorschläge @@ -154,23 +154,24 @@ de: amendments_wizard_help_text: Hilfetext für Änderungsassistent announcement: Ankündigung attachments_allowed: Anhänge zulassen - can_accumulate_supports_beyond_threshold: Kann Unterstützungen über den Schwellenwert hinaus ansammeln + attachments_allowed_help: Durch Aktivieren dieser Option werden Vorschläge standardmäßig im Rastermodus angezeigt und das erste Bild wird auf der Karte angezeigt. + can_accumulate_votes_beyond_threshold: Stimmen können nach Erreichen des Schwellwerts weiter gesammelt werden collaborative_drafts_enabled: Kollaborative Entwürfe aktiviert comments_enabled: Kommentare aktiviert comments_max_length: Maximale Länge der Kommentare (0 für Standardwert) default_sort_order: Standardsortierung für Vorschläge - default_sort_order_help: Standardmäßig bedeutet, dass, wenn Vorschläge unterstützt werden können, sie nach Zufall sortiert werden, und wenn die Unterstützung blockiert werden, sie nach den meist unterstützten sortiert werden. + default_sort_order_help: Standardmäßig bedeutet, dass bei aktivierten Stimmensammlung die Vorschläge nach Zufall und bei deaktivierter Stimmensammlung nach den meist gewählten Vorschläge sortiert werden. default_sort_order_options: - default: Standard + automatic: Automatisch most_commented: Am häufigsten kommentiert most_endorsed: Am häufigsten befürwortet most_followed: Am häufigsten gefolgt - most_voted: Am meisten unterstützt + most_voted: Am meisten gewählt random: Zufällig recent: Neueste with_more_authors: Mit mehr Autoren geocoding_enabled: Geocoding aktiviert - minimum_votes_per_user: Mindeststimmen pro Nutzer + minimum_votes_per_user: Minimal erforderliche Anzahl Stimmen eines Abstimmenden new_proposal_body_template: Textvorlage für neuen Vorschlag new_proposal_body_template_help: Sie können den vorgefüllten Text der neuen Vorschläge bestimmen new_proposal_help_text: Hilfetext für neue Vorschläge @@ -191,7 +192,7 @@ de: scope_id: Bereich scopes_enabled: Bereiche aktiviert threshold_per_proposal: Schwellenwert pro Vorschlag - vote_limit: Unterstützungslimit pro Benutzer + vote_limit: Maximal mögliche Anzahl Stimmen eines Abstimmenden step: amendment_creation_enabled: Ergänzungserstellung aktiviert amendment_creation_enabled_help: Teilnehmer kann Vorschläge ergänzen. @@ -211,13 +212,13 @@ de: creation_enabled: Teilnehmer können Vorschläge erstellen creation_enabled_readonly: Diese Einstellung ist deaktiviert, wenn Sie die Funktion "Partizipative Texte" aktivieren. Um Vorschläge als partizipativen Text hochzuladen, klicken Sie "Partizipative Texte" und folgen Sie den Anweisungen. default_sort_order: Standardsortierung für Vorschläge - default_sort_order_help: Standardmäßig bedeutet, dass, wenn Vorschläge unterstützt werden können, sie nach Zufall sortiert werden, und wenn die Unterstützung blockiert werden, sie nach den meist unterstützten sortiert werden. + default_sort_order_help: Standardmäßig bedeutet, dass bei aktivierten Stimmensammlung die Vorschläge nach Zufall und bei deaktivierter Stimmensammlung nach den meist gewählten Vorschläge sortiert werden. default_sort_order_options: - default: Standard + automatic: Automatisch most_commented: Am meisten kommentiert most_endorsed: Am meisten befürwortet most_followed: Am häufigsten gefolgt - most_voted: Am häufigsten unterstützt + most_voted: Am meisten gewählt random: Zufällig recent: Neueste with_more_authors: Mit mehr Autoren @@ -227,9 +228,9 @@ de: publish_answers_immediately: Vorschlagsantworten sofort veröffentlichten publish_answers_immediately_help_html: 'Wenn Sie einen Vorschlag ohne diese Option beantworten, müssen Sie die Antwort manuell veröffentlichen, indem Sie den Vorschlag auswählen und über «Aktionen» im Menü veröffentlichen. Weitere Informationen darüber finden Sie auf der Dokumentationsseite zur Vorschlagsbeantwortung.' suggested_hashtags: Hashtags schlug Benutzern neue Vorschläge vor - votes_blocked: Abstimmung blockiert - votes_enabled: Abstimmung aktiviert - votes_hidden: Abstimmungen ausgeblendet (wenn Abstimmungen aktiviert sind, wird dies die Anzahl der Abstimmungen verbergen) + votes_blocked: Stimmensammlung deaktiviert + votes_enabled: Stimmensammlung aktiviert + votes_hidden: Stimmenanzahl ausgeblendet (falls die Stimmensammlung aktiviert ist, wird die Anzahl Stimmen nicht angezeigt) events: proposals: admin: @@ -316,10 +317,10 @@ de: email_subject: Der Bereich des Vorschlags %{resource_title} wurde aktualisiert notification_title: Der Bereich des Vorschlags %{resource_title} wurde von einem Administrator aktualisiert. voting_enabled: - email_intro: 'Sie können für Vorschläge in %{participatory_space_title} abstimmen! Beteiligen Sie sich auf dieser Seite:' + email_intro: 'Sie können über Vorschläge in %{participatory_space_title} abstimmen! Jetzt auf dieser Seite abstimmen:' email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie %{participatory_space_title} folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link. - email_subject: In %{participatory_space_title} ist es jetzt möglich, für Vorschläge abzustimmen - notification_title: Sie können jetzt für Vorschläge in %{participatory_space_title} abstimmen + email_subject: Eine Abstimmung über Vorschläge hat für %{participatory_space_title} begonnen + notification_title: Sie können jetzt auf %{participatory_space_title} über Vorschläge abstimmen gamification: badges: accepted_proposals: @@ -336,14 +337,14 @@ de: proposal_votes: conditions: - Stöbern Sie und verbringen Sie etwas Zeit, die Vorschläge anderer Leute zu lesen - - Unterstützen Sie die Vorschläge, die Sie mögen oder interessant finden - description: Dieses Abzeichen wird gewährt, wenn Sie Vorschläge anderer Personen unterstützen. - description_another: Dieser Benutzer hat %{score} Vorschläge unterstützt. - description_own: Sie haben %{score} Vorschläge unterstützt. - name: Vorschlag unterstützt - next_level_in: Unterstütze %{score} weitere Vorschläge, um das nächste Level zu erreichen! - unearned_another: Dieser Teilnehmer hat bisher noch keine Vorschläge unterstützt. - unearned_own: Sie haben noch keine Vorschläge unterstützt. + - Geben Sie Ihre Stimme den Vorschlägen, die Sie mögen oder interessant finden + description: Dieses Abzeichen wird gewährt, wenn Sie über Vorschläge anderer Personen abgestimmt haben. + description_another: Dieser Teilnehmende hat über %{score} Vorschläge abgestimmt. + description_own: Sie haben über %{score} Vorschläge abgestimmt. + name: Stimmen über Vorschläge + next_level_in: Stimmen Sie noch über %{score} weitere Vorschläge ab, um das nächste Level zu erreichen! + unearned_another: Dieser Teilnehmende hat noch über keine Vorschläge abgestimmt. + unearned_own: Sie haben noch über keine Vorschläge abgestimmt. proposals: conditions: - Wählen Sie den Bereich für die Teilnahme Ihrer Interessen mit der Einreichung von Vorschlägen aktiviert @@ -369,9 +370,9 @@ de: object: Vorschläge title: Vorschläge votes: - description: Anzahl der Unterstützungen zu Vorschlägen - object: Unterstützer - title: Unterstützer + description: Anzahl Stimmen über Vorschläge + object: Stimmen + title: Abstimmungen participatory_spaces: highlighted_proposals: last: Letzte Vorschläge @@ -554,7 +555,7 @@ de: remove_assignment: Zuweisung entfernen remove_assignment_confirmation: Sind Sie sicher, diesen Schätzer von diesem Vorschlag zurückzuziehen? valuators: Schätzer - votes_count: Anzahl der Unterstützungen + votes_count: Anzahl Stimmen update_category: invalid: 'Diese Vorschläge gehörten bereits zur Kategorie %{subject_name}: %{proposals}.' select_a_category: Bitte wählen Sie eine Kategorie aus. @@ -761,7 +762,7 @@ de: comment: Kommentar proposal_votes: create: - error: Es gab Fehler bei der Abstimmung des Vorschlags. + error: Bei der Abstimmung zum Vorschlag ist ein Problem aufgetreten. proposals: dynamic_map_instructions: description: Die Koordinaten werden aktualisiert, wenn Sie auf "Vorschau" klicken. Die angegebene Adresse wird sich jedoch nicht ändern. @@ -800,6 +801,8 @@ de: count: one: "%{count} Vorschlag" other: "%{count} Vorschläge" + grid_mode: Raster-Ansicht + list_mode: Listen-Ansicht new_proposal: Neuer Vorschlag see_all: Alle Vorschläge ansehen see_all_withdrawn: Sehen Sie sich alle zurückgezogenen Vorschläge an @@ -812,7 +815,7 @@ de: most_commented: Am meisten kommentiert most_endorsed: Am meisten befürwortet most_followed: Am meisten gefolgt - most_voted: Am meisten unterstützt + most_voted: Am meisten gewählt random: Zufällig recent: Kürzlich hinzugefügt with_more_authors: Mit mehr Autoren @@ -850,37 +853,37 @@ de: proposal_accepted_reason: 'Dieser Vorschlag wurde angenommen, weil:' proposal_in_evaluation_reason: Dieser Vorschlag wird evaluiert proposal_rejected_reason: 'Dieser Vorschlag wurde abgelehnt, weil:' - withdraw_btn_hint: Sie können Ihren Vorschlag zurückziehen, wenn Sie es sich anders überlegen, solange Sie keine Unterstützung erhalten haben. Der Vorschlag wird nicht gelöscht, er erscheint in der Liste der zurückgezogenen Vorschläge. + withdraw_btn_hint: Sie können Ihren Vorschlag zurückziehen, wenn Sie es sich anders überlegen, solange Sie keine Stimme erhalten haben. Der Vorschlag wird nicht gelöscht, er erscheint in der Liste der zurückgezogenen Vorschläge. withdraw_confirmation_html: Sind Sie sicher, dass Sie diesen Vorschlag zurückziehen möchten?

    Diese Aktion kann nicht abgebrochen werden! withdraw_proposal: Vorschlag zurückziehen update: title: Vorschlag aktualisieren vote_button: - already_voted: Bereits unterstützt - already_voted_hover: Unterstützung zurückziehen - maximum_votes_reached: Unterstützungslimit erreicht - no_votes_remaining: Keine verbleibenden Unterstützungen - vote: Unterstützen - votes_blocked: Unterstützungen deaktiviert + already_voted: Bereits abgestimmt + already_voted_hover: Stimme zurückziehen + maximum_votes_reached: Maximal mögliche Anzahl Stimmen erteilt + no_votes_remaining: Keine verbleibenden Stimmen + vote: Abstimmen + votes_blocked: Abstimmung deaktiviert votes_count: count: - one: UNTERSTÜTZUNG - other: UNTERSTÜTZUNGEN + one: Stimme + other: Stimmen voting_rules: - can_accumulate_supports_beyond_threshold: - description: Jeder Vorschlag kann mehr als %{limit} Unterstützungen sammeln + can_accumulate_votes_beyond_threshold: + description: Jeder Vorschlag kann mehr als %{limit} Stimmen sammeln minimum_votes_per_user: - description: Sie müssen mindestens %{votes} Stimmen auf verschiedene Vorschläge verteilen. - given_enough_votes: Sie haben ausreichend Unterstützungen vergeben. - supports_remaining: Sie müssen %{remaining_votes} weitere Vorschläge abgeben, damit Ihre Stimmen berücksichtigt werden. + description: Sie müssen mindestens %{votes} Stimmen auf unterschiedliche Vorschläge erteilen. + given_enough_votes: Sie haben ausreichend Stimmen erteilt. + votes_remaining: Wählen Sie %{remaining_votes} weitere Vorschläge, damit Ihre Auswahl Stimmen gewertet werden kann. proposal_limit: description: Sie können bis zu %{limit} Vorschläge erstellen. threshold_per_proposal: - description: Um validiert zu werden, müssen die Vorschläge %{limit} Unterstützungen erreichen. + description: Vorschläge müssen %{limit} Stimmen erreichen, um berücksichtigt zu werden. title: 'Die Abstimmung unterliegt folgenden Regeln:' vote_limit: - description: Sie können bis zu %{limit} Vorschläge abstimmen. - votes: Stimmen + description: Sie können bis zu %{limit} Vorschläge auswählen. + votes: '%{number} Stimmen verbleibend' wizard_aside: back: Zurück back_from_step_1: Zurück zu Vorschlägen @@ -909,7 +912,7 @@ de: title: Versionen withdraw: errors: - has_supports: Dieser Vorschlag kann nicht zurückgezogen werden, da er bereits unterstützt wird. + has_votes: Dieser Vorschlag kann nicht zurückgezogen werden, da er bereits unterstützt wird. resource_links: copied_from_component: proposal_proposal: Ähnliche Vorschläge @@ -921,4 +924,4 @@ de: statistics: proposals_accepted: Akzeptierte Vorschläge proposals_count: Vorschläge - supports_count: Unterstützungen + votes_count: Stimmen diff --git a/decidim-proposals/config/locales/el.yml b/decidim-proposals/config/locales/el.yml index fedb4920ac6d2..5423fb6386076 100644 --- a/decidim-proposals/config/locales/el.yml +++ b/decidim-proposals/config/locales/el.yml @@ -61,12 +61,10 @@ el: attributes: base: not_official: Δεν είναι επίσημο - supported: Έχουν λάβει υποστήριξη ή εγκρίσεις proposals_split: attributes: base: not_official: Δεν είναι επίσημο - supported: Έχουν λάβει υποστήριξη ή εγκρίσεις models: decidim/proposals/admin/update_proposal_category_event: Η κατηγορία πρότασης άλλαξε decidim/proposals/admin/update_proposal_scope_event: Το πεδίο εφαρμογής της πρότασης άλλαξε @@ -86,9 +84,6 @@ el: decidim/proposals/proposal_note: one: Σημείωση other: Σημειώσεις - decidim/proposals/proposal_vote: - one: Υποστήριξη - other: Υποστηρίξεις decidim: admin: filters: @@ -128,7 +123,6 @@ el: comment: Σχόλιο create: Δημιουργία endorse: Επιδοκιμασία - vote: Υποστήριξη vote_comment: Ψηφίστε το σχόλιο withdraw: Απόσυρση name: Προτάσεις @@ -139,23 +133,18 @@ el: amendments_wizard_help_text: Κείμενο βοήθειας για τον Οδηγό τροποποιήσεων announcement: Ανακοίνωση attachments_allowed: Να επιτρέπονται τα συνημμένα - can_accumulate_supports_beyond_threshold: Μπορεί να συσσωρεύσει υποστηρίξεις πέραν του ορίου collaborative_drafts_enabled: Τα προσχέδια συνεργασίας ενεργοποιήθηκαν comments_enabled: Τα σχόλια ενεργοποιήθηκαν comments_max_length: Μέγιστο μέγεθος σχολίων (Αφήστε το 0 για την προκαθορισμένη τιμή) default_sort_order: Προεπιλεγμένη ταξινόμηση προτάσεων - default_sort_order_help: Προεπιλογή σημαίνει ότι αν η υποστήριξη είναι ενεργοποιημένη, οι προτάσεις θα εμφανίζονται ταξινομημένες τυχαία, και αν η υποστήριξη είναι μπλοκαρισμένη, θα ταξινομούνται με βάση την περισσότερη υποστήριξη. default_sort_order_options: - default: Προεπιλογή most_commented: Πιο σχολιασμένες most_endorsed: Με τις περισσότερες επιδοκιμασίες most_followed: Με τους περισσότερους ακολούθους - most_voted: Με τις περισσότερες υποστηρίξεις random: Τυχαία recent: Πρόσφατη with_more_authors: Με περισσότερους συντάκτες geocoding_enabled: Το Geocoding ενεργοποιήθηκε - minimum_votes_per_user: Ελάχιστες υποστηρίξεις ανά χρήστη new_proposal_body_template: Πρότυπο σώματος νέας πρότασης new_proposal_body_template_help: Μπορείτε να ορίσετε το προσυμπληρωμένο κείμενο που θα έχουν οι νέες Προτάσεις new_proposal_help_text: Κείμενο βοήθειας νέας πρότασης @@ -175,7 +164,6 @@ el: scope_id: Πεδίο εφαρμογής scopes_enabled: Τα πεδία εφαρμογής ενεργοποιήθηκαν threshold_per_proposal: Όριο ανά πρόταση - vote_limit: Όριο υποστηρίξεων ανά συμμετέχοντα step: amendment_creation_enabled: Η δημιουργία τροποποίησης ενεργοποιήθηκε amendment_creation_enabled_help: Ο συμμετέχων μπορεί να τροποποιήσει προτάσεις. @@ -195,13 +183,10 @@ el: creation_enabled: Οι συμμετέχοντες μπορούν να δημιουργήσουν προτάσεις creation_enabled_readonly: Αυτή η ρύθμιση είναι απενεργοποιημένη όταν ενεργοποιείτε τη λειτουργία Συμμετοχικών Κειμένων. Για να ανεβάσετε προτάσεις ως συμμετοχικό κείμενο κάντε κλικ στο κουμπί Συμμετοχικά Κείμενα και ακολουθήστε τις οδηγίες. default_sort_order: Προεπιλεγμένη ταξινόμηση προτάσεων - default_sort_order_help: Προεπιλογή σημαίνει ότι αν η υποστήριξη είναι ενεργοποιημένη, οι προτάσεις θα εμφανίζονται ταξινομημένες τυχαία, και αν η υποστήριξη είναι μπλοκαρισμένη, θα ταξινομούνται με βάση την περισσότερη υποστήριξη. default_sort_order_options: - default: Προεπιλογή most_commented: Πιο σχολιασμένες most_endorsed: Με τις περισσότερες επιδοκιμασίες most_followed: Με τους περισσότερους ακολούθους - most_voted: Με τις περισσότερες υποστηρίξεις random: Τυχαία recent: Πρόσφατη with_more_authors: Με περισσότερους συντάκτες @@ -211,9 +196,6 @@ el: publish_answers_immediately: Άμεση δημοσίευση των απαντήσεων πρότασης publish_answers_immediately_help_html: 'Έχετε υπόψη ότι αν απαντήσετε σε οποιαδήποτε πρόταση χωρίς αυτό ενεργοποιημένο, θα πρέπει να τα δημοσιεύσετε χειροκίνητα επιλέγοντάς τα και χρησιμοποιώντας την ενέργεια για δημοσίευση. Για περισσότερες πληροφορίες σχετικά με το πώς λειτουργεί αυτό, ανατρέξτε στη σελίδα τεκμηρίωσης απαντήσεων .' suggested_hashtags: Προτάθηκαν hashtag σε συμμετέχοντες για νέες προτάσεις - votes_blocked: Οι υποστηρίξεις αποκλείστηκαν - votes_enabled: Οι υποστηρίξεις ενεργοποιήθηκαν - votes_hidden: Οι υποστηρίξεις αποκρύφτηκαν (εάν είναι ενεργοποιημένες οι υποστηρίξεις, με την επιλογή αυτή θα αποκρυφτεί ο αριθμός των υποστηρίξεων) events: proposals: admin: @@ -289,10 +271,7 @@ el: email_subject: Το πεδίο εφαρμογής της πρότασης %{resource_title} ενημερώθηκε notification_title: Το πεδίο εφαρμογής της πρότασης %{resource_title} ενημερώθηκε από έναν διαχειριστή. voting_enabled: - email_intro: 'Μπορείτε να υποστηρίξετε προτάσεις στον χώρο συμμετοχής %{participatory_space_title}! Ξεκινήστε να συμμετέχετε σε αυτήν τη σελίδα:' email_outro: Λάβατε αυτήν την ειδοποίηση επειδή ακολουθείτε τον χώρο συμμετοχής %{participatory_space_title}. Μπορείτε να διακόψετε τη λήψη ειδοποιήσεων ακολουθώντας τον προηγούμενο σύνδεσμο. - email_subject: Έχει ξεκινήσει η υποστήριξη προτάσεων για τον χώρο συμμετοχής %{participatory_space_title} - notification_title: Μπορείτε τώρα να ξεκινήσετε την υποστήριξη προτάσεων στον χώρο συμμετοχής %{participatory_space_title} gamification: badges: accepted_proposals: @@ -309,14 +288,7 @@ el: proposal_votes: conditions: - Περιηγηθείτε και αφιερώστε λίγο χρόνο διαβάζοντας τις προτάσεις άλλων ατόμων - - Υποστηρίξτε τις προτάσεις που σας αρέσουν ή βρίσκετε ενδιαφέρουσες - description: Αυτό το έμβλημα χορηγείται όταν υποστηρίζετε τις προτάσεις άλλων ατόμων. - description_another: Αυτός ο συμμετέχων έχει υποστηρίξει %{score} προτάσεις. - description_own: Έχετε υποστηρίξει %{score} προτάσεις. - name: Υποστηρίξεις προτάσεων - next_level_in: Υποστηρίξτε %{score} ακόμη προτάσεις για να φτάσετε στο επόμενο επίπεδο! - unearned_another: Αυτός ο συμμετέχων δεν έχει υποστηρίξει ακόμα καμία πρόταση. - unearned_own: Δεν έχετε υποστηρίξει καμία πρόταση ακόμη. + - proposals: conditions: - Επιλέξτε τον χώρο συμμετοχής που σας ενδιαφέρει με ενεργοποιημένη την υποβολή προτάσεων @@ -341,10 +313,6 @@ el: description: Αριθμός προτάσεων object: προτάσεις title: Προτάσεις - votes: - description: Αριθμός υποστηρίξεων σε προτάσεις - object: υποστηρίξεις - title: Υποστηρίξεις participatory_spaces: highlighted_proposals: see_all: Δείτε όλες τις προτάσεις (%{count}) @@ -496,7 +464,6 @@ el: remove_assignment: Κατάργηση εκχώρησης remove_assignment_confirmation: Είστε βέβαιοι ότι θέλετε να καταργήσετε τον εκτιμητή από αυτήν την πρόταση; valuators: Εκτιμητές - votes_count: Πλήθος υποστηρίξεων update_category: invalid: 'Αυτές οι προτάσεις είχαν ήδη την κατηγορία %{subject_name}: %{proposals}.' select_a_category: Παρακαλώ επιλέξτε μια κατηγορία. @@ -691,9 +658,6 @@ el: buttons: amend: Τροποποίηση comment: Σχόλιο - proposal_votes: - create: - error: Υπήρξε ένα πρόβλημα κατά την υποστήριξη της πρότασης. proposals: dynamic_map_instructions: description: Οι συντεταγμένες θα ενημερώνονται όταν κάνετε κλικ στο κουμπί 'προεπισκόπηση'. Ωστόσο, η διεύθυνση δεν αλλάζει. @@ -723,7 +687,6 @@ el: search: Αναζήτηση state: Κατάσταση type: Τύπος - voted: Υποστηρίζεται index: click_here: Δείτε όλες τις προτάσεις collaborative_drafts_list: Πρόσβαση σε προσχέδια συνεργασίας @@ -742,7 +705,6 @@ el: most_commented: Με τα περισσότερα σχόλια most_endorsed: Με τις περισσότερες επιδοκιμασίες most_followed: Με τους περισσότερους ακολούθους - most_voted: Με τις περισσότερες υποστηρίξεις random: Τυχαία recent: Πρόσφατα with_more_authors: Με περισσότερους συντάκτες @@ -777,37 +739,13 @@ el: proposal_accepted_reason: 'Αυτή η πρόταση έγινε αποδεκτή επειδή:' proposal_in_evaluation_reason: Αυτή η πρόταση αξιολογείται proposal_rejected_reason: 'Αυτή η πρόταση απορρίφθηκε επειδή:' - withdraw_btn_hint: Μπορείτε να αποσύρετε την πρότασή σας εάν αλλάξετε γνώμη, εφόσον δεν έχετε λάβει υποστήριξη. Η πρόταση δεν διαγράφεται, θα εμφανιστεί στη λίστα των αποσυρμένων προτάσεων. withdraw_confirmation_html: Είστε σίγουροι ότι θέλετε να αποσύρετε αυτή την πρόταση;

    Αυτή η ενέργεια δεν ακυρώνεται! withdraw_proposal: Απόσυρση πρότασης update: title: Ενημέρωση πρότασης - vote_button: - already_voted: Υποστηρίζεται ήδη - already_voted_hover: Απόσυρση υποστήριξης - maximum_votes_reached: Το όριο υποστήριξης συμπληρώθηκε - no_votes_remaining: Δεν απομένουν υποστηρίξεις - vote: Υποστήριξη - votes_blocked: Οι υποστηρίξεις απενεργοποιήθηκαν - votes_count: - count: - one: Υποστήριξη - other: Υποστηρίξεις voting_rules: - can_accumulate_supports_beyond_threshold: - description: Κάθε πρόταση μπορεί να συγκεντρώσει περισσότερες από %{limit} υποστηρίξεις - minimum_votes_per_user: - description: Πρέπει να κατανείμετε τουλάχιστον %{votes} υποστηρίξεις μεταξύ διαφορετικών προτάσεων. - given_enough_votes: Έχετε δώσει αρκετές υποστηρίξεις. - supports_remaining: Πρέπει να υποστηρίξετε %{remaining_votes} ακόμη προτάσεις, προκειμένου οι υποστηρίξεις σας να ληφθούν υπόψη. proposal_limit: description: Μπορείτε να δημιουργήσετε έως και %{limit} προτάσεις. - threshold_per_proposal: - description: Για να επικυρωθούν οι προτάσεις πρέπει να φτάσουν σε %{limit} υποστηρίξεις. - title: 'Οι υποστηρίξεις υπόκεινται στους ακόλουθους κανόνες:' - vote_limit: - description: Μπορείτε να υποστηρίξετε έως και %{limit} προτάσεις. - votes: Υποστηρίξεις wizard_aside: back: Πίσω back_from_step_1: Πίσω στις προτάσεις @@ -832,9 +770,6 @@ el: versions: index: title: Εκδόσεις - withdraw: - errors: - has_supports: Αυτή η πρόταση δεν μπορεί να αποσυρθεί, διότι έχει ήδη υποστηρίξεις. resource_links: copied_from_component: proposal_proposal: Σχετικές προτάσεις @@ -846,4 +781,4 @@ el: statistics: proposals_accepted: Προτάσεις που έγιναν δεκτές proposals_count: Προτάσεις - supports_count: Υποστηρίξεις + votes_count: Ψήφοι diff --git a/decidim-proposals/config/locales/en.yml b/decidim-proposals/config/locales/en.yml index 3249a4f99a02b..b4026a6d7a30a 100644 --- a/decidim-proposals/config/locales/en.yml +++ b/decidim-proposals/config/locales/en.yml @@ -75,12 +75,12 @@ en: attributes: base: not_official: Are not official - supported: Have received support or endorsements + voted: Have received votes or endorsements proposals_split: attributes: base: not_official: Are not official - supported: Have received support or endorsements + voted: Have received votes or endorsements models: decidim/proposals/admin/update_proposal_category_event: Proposal category changed decidim/proposals/admin/update_proposal_scope_event: Proposal scope changed @@ -101,8 +101,8 @@ en: one: Note other: Notes decidim/proposals/proposal_vote: - one: Support - other: Supports + one: Vote + other: Votes decidim: admin: filters: @@ -144,7 +144,7 @@ en: comment: Comment create: Create endorse: Endorse - vote: Support + vote: Vote vote_comment: Vote comment withdraw: Withdraw name: Proposals @@ -156,18 +156,18 @@ en: announcement: Announcement attachments_allowed: Allow attachments attachments_allowed_help: By enabling this option, proposals will default to grid mode, and the first image will appear on the card. - can_accumulate_supports_beyond_threshold: Can accumulate supports beyond threshold + can_accumulate_votes_beyond_threshold: Can accumulate votes beyond threshold collaborative_drafts_enabled: Collaborative drafts enabled comments_enabled: Comments enabled comments_max_length: Comments max length (Leave 0 for default value) default_sort_order: Default proposal sorting - default_sort_order_help: Default means that if the supports are enabled, the proposals will be shown sorted by random, and if the supports are blocked, then they will be sorted by the most supported. + default_sort_order_help: Automatic means that if the votes are enabled, the proposals will be shown sorted by random, and if the votes are blocked, then they will be sorted by the most voted. default_sort_order_options: - default: Default + automatic: Automatic most_commented: Most commented most_endorsed: Most endorsed most_followed: Most followed - most_voted: Most supported + most_voted: Most voted random: Random recent: Recent with_more_authors: With more authors @@ -177,7 +177,7 @@ en: hours: Hours minutes: Minutes geocoding_enabled: Geocoding enabled - minimum_votes_per_user: Minimum supports per user + minimum_votes_per_user: Minimum votes per user new_proposal_body_template: New proposal body template new_proposal_body_template_help: You can define prefilled text that the new Proposals will have new_proposal_help_text: New proposal help text @@ -201,7 +201,7 @@ en: scope_id: Scope scopes_enabled: Scopes enabled threshold_per_proposal: Threshold per proposal - vote_limit: Support limit per participant + vote_limit: Vote limit per participant step: amendment_creation_enabled: Amendment creation enabled amendment_creation_enabled_help: Participant can amend proposals. @@ -221,13 +221,13 @@ en: creation_enabled: Participants can create proposals creation_enabled_readonly: This setting is disabled when you activate the Participatory Texts functionality. To upload proposals as participatory text click on the Participatory Texts button and follow the instructions. default_sort_order: Default proposal sorting - default_sort_order_help: Default it means that if the supports are enabled, the proposals will be shown sorted by random, and if the supports are blocked, then they will be sorted by the most supported. + default_sort_order_help: Automatic means that if the votes are enabled, the proposals will be shown sorted by random, and if the votes are blocked, then they will be sorted by the most voted. default_sort_order_options: - default: Default + automatic: Automatic most_commented: Most commented most_endorsed: Most endorsed most_followed: Most followed - most_voted: Most supported + most_voted: Most voted random: Random recent: Recent with_more_authors: With more authors @@ -237,9 +237,9 @@ en: publish_answers_immediately: Publish proposal answers immediately publish_answers_immediately_help_html: Mind that if you answer any proposal without this enabled, you will need to publish them manually by selecting them and using the action for publication. For more info on how this works, see proposals' answers documentation page. suggested_hashtags: Hashtags suggested to participants for new proposals - votes_blocked: Supports blocked - votes_enabled: Supports enabled - votes_hidden: Supports hidden (if supports are enabled, checking this will hide the number of supports) + votes_blocked: Votes blocked + votes_enabled: Votes enabled + votes_hidden: Votes hidden (if votes are enabled, checking this will hide the number of votes) events: proposals: admin: @@ -326,10 +326,10 @@ en: email_subject: The %{resource_title} proposal scope has been updated notification_title: The %{resource_title} proposal scope has been updated by an admin. voting_enabled: - email_intro: 'You can support proposals in %{participatory_space_title}! Start participating in this page:' + email_intro: 'You can vote proposals in %{participatory_space_title}! Start participating in this page:' email_outro: You have received this notification because you are following %{participatory_space_title}. You can stop receiving notifications following the previous link. - email_subject: Proposal support has started for %{participatory_space_title} - notification_title: You can now start supporting proposals in %{participatory_space_title} + email_subject: Proposal voting has started for %{participatory_space_title} + notification_title: You can now start voting proposals in %{participatory_space_title} gamification: badges: accepted_proposals: @@ -346,14 +346,14 @@ en: proposal_votes: conditions: - Browse and spend some time reading other people's proposals - - Give support to the proposals you like or find interesting - description: This badge is granted when you support other people's proposals. - description_another: This participant has given support to %{score} proposals. - description_own: You have given support to %{score} proposals. - name: Proposal supports - next_level_in: Give support to %{score} more proposals to reach the next level! - unearned_another: This participant has not given support to any proposals yet. - unearned_own: You have given support to no proposals yet. + - Vote to the proposals you like or find interesting + description: This badge is granted when you vote other people's proposals. + description_another: This participant has voted to %{score} proposals. + description_own: You have voted to %{score} proposals. + name: Proposal votes + next_level_in: Vote to %{score} more proposals to reach the next level! + unearned_another: This participant has not voted to any proposals yet. + unearned_own: You have voted to no proposals yet. proposals: conditions: - Choose the participation space of your interest with submission for proposals enabled @@ -379,9 +379,9 @@ en: object: proposals title: Proposals votes: - description: Number of supports to proposals - object: supports - title: Supports + description: Number of votes to proposals + object: votes + title: Votes participatory_spaces: highlighted_proposals: last: Last proposals @@ -506,7 +506,9 @@ en: proposals: answer: invalid: There has been a problem answering this proposal. + missing_cost_data: Please fill in the required cost field for all selected proposals. success: Proposal successfully answered. + success_bulk_update: The proposals have been queued for answer update. create: invalid: There has been a problem creating this proposal. success: Proposal successfully created. @@ -524,6 +526,7 @@ en: assign_to_valuator: Assign to valuator assign_to_valuator_button: Assign cancel: Cancel + change_answer_status: Change status and answer change_category: Change category change_scope: Change scope merge: Merge into a new one @@ -531,6 +534,7 @@ en: publish: Publish publish_answers: Publish answers select_component: Select a component + select_valuators: Select one or more valuators selected: selected split: Split proposals split_button: Split @@ -564,7 +568,7 @@ en: remove_assignment: Remove assignment remove_assignment_confirmation: Are you sure you want to remove the valuator from this proposal? valuators: Valuators - votes_count: Supports count + votes_count: Votes count update_category: invalid: 'These proposals already had the %{subject_name} category: %{proposals}.' select_a_category: Please select a category. @@ -771,7 +775,7 @@ en: comment: Comment proposal_votes: create: - error: There was a problem supporting the proposal. + error: There was a problem voting the proposal. proposals: dynamic_map_instructions: description: The coordinates will be updated when clicking on 'preview' button. However, the address does not change. @@ -803,7 +807,7 @@ en: search: Search state: Status type: Type - voted: Supported + voted: Voted index: click_here: See all proposals collaborative_drafts_list: Access collaborative drafts @@ -824,7 +828,7 @@ en: most_commented: Most commented most_endorsed: Most endorsed most_followed: Most followed - most_voted: Most supported + most_voted: Most voted random: Random recent: Recent with_more_authors: With more authors @@ -862,37 +866,37 @@ en: proposal_accepted_reason: 'This proposal has been accepted because:' proposal_in_evaluation_reason: This proposal is being evaluated proposal_rejected_reason: 'This proposal has been rejected because:' - withdraw_btn_hint: You can withdraw your proposal if you change your mind, as long as you have not received any support. The proposal is not deleted, it will appear in the list of withdrawn proposals. + withdraw_btn_hint: You can withdraw your proposal if you change your mind, as long as you have not received any vote. The proposal is not deleted, it will appear in the list of withdrawn proposals. withdraw_confirmation_html: Are you sure you want to withdraw this proposal?

    This action cannot be cancelled! withdraw_proposal: Withdraw proposal update: title: Update proposal vote_button: - already_voted: Already supported - already_voted_hover: Withdraw support - maximum_votes_reached: Support limit reached - no_votes_remaining: No supports remaining - vote: Support - votes_blocked: Supports disabled + already_voted: Already voted + already_voted_hover: Withdraw vote + maximum_votes_reached: Vote limit reached + no_votes_remaining: No votes remaining + vote: Vote + votes_blocked: Voting disabled votes_count: count: - one: Support - other: Supports + one: Vote + other: Votes voting_rules: - can_accumulate_supports_beyond_threshold: - description: Each proposal can accumulate more than %{limit} supports + can_accumulate_votes_beyond_threshold: + description: Each proposal can accumulate more than %{limit} votes minimum_votes_per_user: - description: You must distribute a minimum of %{votes} supports among different proposals. - given_enough_votes: You have given enough supports. - supports_remaining: You have to support %{remaining_votes} more proposals for your supports to be taken into account. + description: You must distribute a minimum of %{votes} votes among different proposals. + given_enough_votes: You have given enough votes. + votes_remaining: You have to vote %{remaining_votes} more proposals for your votes to be taken into account. proposal_limit: description: You can create up to %{limit} proposals. threshold_per_proposal: - description: In order to be validated proposals need to reach %{limit} supports. - title: 'Supports are subject to the following rules:' + description: In order to be validated proposals need to reach %{limit} votes. + title: 'Votes are subject to the following rules:' vote_limit: - description: You can support up to %{limit} proposals. - votes: Remaining %{number} supports + description: You can vote up to %{limit} proposals. + votes: Remaining %{number} votes wizard_aside: back: Back back_from_step_1: Back to proposals @@ -921,7 +925,7 @@ en: title: Versions withdraw: errors: - has_supports: This proposal cannot be withdrawn because it already has supports. + has_votes: This proposal cannot be withdrawn because it already has votes. resource_links: copied_from_component: proposal_proposal: Related proposals @@ -933,4 +937,4 @@ en: statistics: proposals_accepted: Accepted Proposals proposals_count: Proposals - supports_count: Supports + votes_count: Votes diff --git a/decidim-proposals/config/locales/es-MX.yml b/decidim-proposals/config/locales/es-MX.yml index fa28a9cdc6b3f..969e1a84ef4fe 100644 --- a/decidim-proposals/config/locales/es-MX.yml +++ b/decidim-proposals/config/locales/es-MX.yml @@ -74,12 +74,12 @@ es-MX: attributes: base: not_official: No son oficiales - supported: Han recibido apoyos o adhesiones + voted: Han recibido apoyos o adhesiones proposals_split: attributes: base: not_official: No son oficiales - supported: No han recibido apoyos ni adhesiones + voted: Han recibido apoyos o adhesiones models: decidim/proposals/admin/update_proposal_category_event: La categoría de la propuesta ha cambiado decidim/proposals/admin/update_proposal_scope_event: Ámbito de propuesta cambiado @@ -154,14 +154,15 @@ es-MX: amendments_wizard_help_text: Asistente de ayuda de las enmiendas announcement: "Aviso\n" attachments_allowed: Permitir archivos adjuntos - can_accumulate_supports_beyond_threshold: Puede acumular apoyos más allá del umbral + attachments_allowed_help: Al activar esta opción, las propuestas se mostrarán en modo de cuadrícula por defecto y la primera imagen aparecerá en la tarjeta. + can_accumulate_votes_beyond_threshold: Puede acumular apoyos más allá del umbral collaborative_drafts_enabled: Habilitar borradores colaborativos comments_enabled: Comentarios habilitados comments_max_length: Longitud máxima de los comentarios (deja 0 si quieres mantener la configuración por defecto) default_sort_order: Ordenación por defecto de propuestas - default_sort_order_help: Por defecto significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán por las más apoyadas. + default_sort_order_help: '''Por defecto'' significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán de más a menos apoyos.' default_sort_order_options: - default: Por defecto + automatic: Por defecto most_commented: Más comentadas most_endorsed: Con más adhesiones most_followed: Más seguidas @@ -191,7 +192,7 @@ es-MX: scope_id: Ámbito scopes_enabled: Ámbitos habilitados threshold_per_proposal: Umbral por propuesta - vote_limit: Límite de apoyos por usuario + vote_limit: Límite de apoyos por participante step: amendment_creation_enabled: Creación de enmienda activada amendment_creation_enabled_help: La participante puede modificar las propuestas. @@ -211,9 +212,9 @@ es-MX: creation_enabled: Las participantes pueden crear propuestas creation_enabled_readonly: Esta opción se desactiva cuando activas la funcionalidad de Textos Participativos. Para subir propuestas como texto participativo haz clic en el botón Textos Participativos y sigue las instrucciones. default_sort_order: Orden predeterminado de propuestas - default_sort_order_help: Por defecto significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán por las más apoyadas. + default_sort_order_help: '''Por defecto'' significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán de más a menos apoyos.' default_sort_order_options: - default: Por defecto + automatic: Por defecto most_commented: Más comentadas most_endorsed: Con más adhesiones most_followed: Más seguidas @@ -227,8 +228,8 @@ es-MX: publish_answers_immediately: Publicar respuestas a las propuestas inmediatamente publish_answers_immediately_help_html: 'Ten en cuenta que si respondes a alguna propuesta sin que esto esté habilitado, tendrás que publicarlas manualmente seleccionándolas y utilizando la acción de publicar. Para más información sobre el funcionamiento, consulta la página de documentación de respuestas a las propuestas.' suggested_hashtags: Hashtags sugeridos a los usuarios para nuevas propuestas. - votes_blocked: Votación deshabilitada - votes_enabled: Votación habilitada + votes_blocked: Apoyos bloqueados + votes_enabled: Apoyos habilitados votes_hidden: Votos ocultos (si los votos están habilitados, marcando esta opción ocultará el número de votos) events: proposals: @@ -318,7 +319,7 @@ es-MX: voting_enabled: email_intro: '¡Puedes votar propuestas en %{participatory_space_title}! Empieza a participar en esta página:' email_outro: Recibiste esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. - email_subject: La posibilidad de dar apoyo a las propuestas ha comenzado para %{participatory_space_title} + email_subject: La recogida de apoyos a las propuestas recogidas en "%{participatory_space_title}" ha empezado notification_title: Ya puedes empezar a apoyar propuestas en %{participatory_space_title} gamification: badges: @@ -336,10 +337,10 @@ es-MX: proposal_votes: conditions: - Navega y dedica un tiempo leyendo las propuestas de otras personas - - Da apoyo a las propuestas con las que estés de acuerdo o encuentres interesantes - description: Este distintivo se otorga cuando apoyas propuestas de otras personas. - description_another: Este usuario ha dado soporte a %{score} propuestas. - description_own: Has dado soporte a %{score} propuestas. + - Apoya a las propuestas con las que estés de acuerdo o encuentres interesantes + description: Esta insignia se concede cuando se apoyan propuestas de otras personas. + description_another: Esta participante ha apoyado %{score} propuestas. + description_own: Has dado apoyo a %{score} propuestas. name: Apoyos a propuestas next_level_in: '¡Apoya %{score} propuestas más para alcanzar el siguiente nivel!' unearned_another: Esta participante aún no ha apoyado ninguna propuesta. @@ -369,7 +370,7 @@ es-MX: object: propuestas title: Propuestas votes: - description: Número de apoyos generados en las propuestas por los usuarios + description: Número de apoyos a propuestas object: votos title: Votos participatory_spaces: @@ -761,7 +762,7 @@ es-MX: comment: Comentario proposal_votes: create: - error: Ha habido errores al apoyar la propuesta. + error: Se ha producido un error al apoyar la propuesta. proposals: dynamic_map_instructions: description: Las coordenadas se actualizarán cuando hagas clic en el botón 'previsualizar'. Sin embargo, la dirección no cambia. @@ -800,6 +801,8 @@ es-MX: count: one: "%{count} propuesta" other: "%{count} propuestas" + grid_mode: Vista en cuadrícula + list_mode: Vista en listado new_proposal: Nueva propuesta see_all: Ver todas las propuestas see_all_withdrawn: Ver todas las propuestas retiradas @@ -850,37 +853,37 @@ es-MX: proposal_accepted_reason: 'Esta propuesta ha sido aceptada porque:' proposal_in_evaluation_reason: Esta propuesta está siendo evaluada proposal_rejected_reason: 'Esta propuesta ha sido rechazada porque:' - withdraw_btn_hint: Puedes retirar tu propuesta si cambias de opinión, siempre que no haya recibido ningún soporte. La propuesta no se eliminará, aparecerá en la lista de propuestas retiradas. + withdraw_btn_hint: Puedes retirar tu propuesta si cambias de opinión, siempre que no haya recibido ningún apoyo. La propuesta no se eliminará, aparecerá en la lista de propuestas retiradas. withdraw_confirmation_html: '¿Seguro que quieres retirar esta propuesta?

    Esta acción no se puede deshacer!' withdraw_proposal: Retirar propuesta update: title: Actualizar propuesta vote_button: already_voted: Ya has dado tu apoyo - already_voted_hover: Retirar tu apoyo + already_voted_hover: Retirar el apoyo maximum_votes_reached: Límite de apoyos alcanzado no_votes_remaining: No hay votos restantes vote: Dar apoyo votes_blocked: Apoyos desactivados votes_count: count: - one: APOYO - other: APOYOS + one: Apoyo + other: Apoyos voting_rules: - can_accumulate_supports_beyond_threshold: + can_accumulate_votes_beyond_threshold: description: Cada propuesta puede acumular más de %{limit} apoyos minimum_votes_per_user: description: Debes distribuir un mínimo de %{votes} apoyos entre las diferentes propuestas. given_enough_votes: Has dado apoyos suficientes. - supports_remaining: Tienes que apoyar %{remaining_votes} propuestas más para que tus apoyos se tengan en cuenta. + votes_remaining: Has de dar %{remaining_votes} apoyo/s más a propuestas para que tus apoyos sean tenidos en cuenta. proposal_limit: description: Puedes crear hasta %{limit} propuestas. threshold_per_proposal: - description: Para que las propuestas sean validadas necesitan alcanzar un mínimo de %{limit} apoyos. + description: Para que una propuesta se valide, debe recibir %{limit} apoyos. title: 'La recogida de apoyos se rige por las siguientes normas:' vote_limit: description: Puedes apoyar hasta %{limit} propuestas. - votes: Apoyos + votes: Queda/n %{number} apoyo/s wizard_aside: back: Volver back_from_step_1: Volver a propuestas @@ -909,7 +912,7 @@ es-MX: title: Versiones withdraw: errors: - has_supports: Esta propuesta no puede ser retirada porque ya tiene apoyos. + has_votes: Esta propuesta no puede ser retirada porque ya tiene apoyos. resource_links: copied_from_component: proposal_proposal: Propuestas relacionadas @@ -921,4 +924,4 @@ es-MX: statistics: proposals_accepted: Propuestas aceptadas proposals_count: Propuestas - supports_count: Apoyos + votes_count: Votos diff --git a/decidim-proposals/config/locales/es-PY.yml b/decidim-proposals/config/locales/es-PY.yml index 6a0e61df7bade..8725cfe104e39 100644 --- a/decidim-proposals/config/locales/es-PY.yml +++ b/decidim-proposals/config/locales/es-PY.yml @@ -74,12 +74,12 @@ es-PY: attributes: base: not_official: No son oficiales - supported: Han recibido apoyos o adhesiones + voted: Han recibido apoyos o adhesiones proposals_split: attributes: base: not_official: No son oficiales - supported: No han recibido apoyos ni adhesiones + voted: Han recibido apoyos o adhesiones models: decidim/proposals/admin/update_proposal_category_event: La categoría de la propuesta ha cambiado decidim/proposals/admin/update_proposal_scope_event: Ámbito de propuesta cambiado @@ -154,14 +154,15 @@ es-PY: amendments_wizard_help_text: Asistente de ayuda de las enmiendas announcement: Anuncio attachments_allowed: Permitir archivos adjuntos - can_accumulate_supports_beyond_threshold: Puede acumular apoyos más allá del umbral + attachments_allowed_help: Al activar esta opción, las propuestas se mostrarán en modo de cuadrícula por defecto y la primera imagen aparecerá en la tarjeta. + can_accumulate_votes_beyond_threshold: Puede acumular apoyos más allá del umbral collaborative_drafts_enabled: Habilitar borradores colaborativos comments_enabled: Comentarios habilitados comments_max_length: Longitud máxima de los comentarios (deja 0 si quieres mantener la configuración por defecto) default_sort_order: Ordenación por defecto de propuestas - default_sort_order_help: Por defecto significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán por las más apoyadas. + default_sort_order_help: '''Por defecto'' significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán de más a menos apoyos.' default_sort_order_options: - default: Por defecto + automatic: Por defecto most_commented: Más comentadas most_endorsed: Con más adhesiones most_followed: Más seguidas @@ -191,7 +192,7 @@ es-PY: scope_id: Ámbito scopes_enabled: Ámbitos habilitados threshold_per_proposal: Umbral por propuesta - vote_limit: Límite de voto por usuario + vote_limit: Límite de apoyos por participante step: amendment_creation_enabled: Creación de enmienda activada amendment_creation_enabled_help: La participante puede modificar las propuestas. @@ -211,9 +212,9 @@ es-PY: creation_enabled: Las participantes pueden crear propuestas creation_enabled_readonly: Esta opción se desactiva cuando activas la funcionalidad de Textos Participativos. Para subir propuestas como texto participativo haz clic en el botón Textos Participativos y sigue las instrucciones. default_sort_order: Orden predeterminado de propuestas - default_sort_order_help: Por defecto significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán por las más apoyadas. + default_sort_order_help: '''Por defecto'' significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán de más a menos apoyos.' default_sort_order_options: - default: Por defecto + automatic: Por defecto most_commented: Más comentadas most_endorsed: Con más adhesiones most_followed: Más seguidas @@ -227,8 +228,8 @@ es-PY: publish_answers_immediately: Publicar respuestas a las propuestas inmediatamente publish_answers_immediately_help_html: 'Ten en cuenta que si respondes a alguna propuesta sin que esto esté habilitado, tendrás que publicarlas manualmente seleccionándolas y utilizando la acción de publicar. Para más información sobre el funcionamiento, consulta la página de documentación de respuestas a las propuestas.' suggested_hashtags: Hashtags sugeridos a los usuarios para nuevas propuestas. - votes_blocked: Votación bloqueada - votes_enabled: Votación habilitada + votes_blocked: Apoyos bloqueados + votes_enabled: Votos habilitados votes_hidden: Votos ocultos (si los votos están habilitados, marcar esto ocultará el número de votos) events: proposals: @@ -318,7 +319,7 @@ es-PY: voting_enabled: email_intro: '¡Puedes votar propuestas en %{participatory_space_title}! Comienza a participar en esta página:' email_outro: Recibiste esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. - email_subject: La posibilidad de dar apoyo a las propuestas ha comenzado para %{participatory_space_title} + email_subject: La recogida de apoyos a las propuestas recogidas en "%{participatory_space_title}" ha empezado notification_title: Ahora puedes comenzar apoyar propuestas en %{participatory_space_title} gamification: badges: @@ -336,10 +337,10 @@ es-PY: proposal_votes: conditions: - Navega y pasa un tiempo leyendo las propuestas de otras personas. - - Da soporte a las propuestas que te gusten o encuentres interesantes. - description: Este distintivo se otorga cuando apoyas las propuestas de otras personas. - description_another: Este usuario ha dado soporte a %{score} propuestas. - description_own: Has dado soporte a %{score} propuestas. + - Apoya a las propuestas con las que estés de acuerdo o encuentres interesantes + description: Esta insignia se concede cuando se apoyan propuestas de otras personas. + description_another: Esta participante ha apoyado %{score} propuestas. + description_own: Has dado apoyo a %{score} propuestas. name: Apoyos a propuestas next_level_in: '¡Apoya %{score} propuestas más para alcanzar el siguiente nivel!' unearned_another: Esta participante aún no ha apoyado ninguna propuesta. @@ -369,7 +370,7 @@ es-PY: object: propuestas title: Propuestas votes: - description: Número de votos generados en las propuestas por los usuarios. + description: Número de apoyos a propuestas object: votos title: Votos participatory_spaces: @@ -554,7 +555,7 @@ es-PY: remove_assignment: Deshacer asignación remove_assignment_confirmation: '¿Seguro que quieres desasignar a la evaluadora de esta propuesta?' valuators: Evaluadoras - votes_count: Número de votos + votes_count: Número de apoyos update_category: invalid: 'Estas propuestas ya tenían la categoría %{subject_name}: %{proposals}.' select_a_category: Por favor, selecciona una categoría. @@ -761,7 +762,7 @@ es-PY: comment: Comentario proposal_votes: create: - error: Ha habido errores al votar la propuesta. + error: Se ha producido un error al apoyar la propuesta. proposals: dynamic_map_instructions: description: Las coordenadas se actualizarán cuando hagas clic en el botón 'previsualizar'. Sin embargo, la dirección no cambia. @@ -800,6 +801,8 @@ es-PY: count: one: "%{count} propuesta" other: "%{count} propuestas" + grid_mode: Vista en cuadrícula + list_mode: Vista en listado new_proposal: Nueva propuesta see_all: Ver todas las propuestas see_all_withdrawn: Ver todas las propuestas retiradas @@ -850,37 +853,37 @@ es-PY: proposal_accepted_reason: 'Esta propuesta ha sido aceptada porque:' proposal_in_evaluation_reason: Esta propuesta está siendo evaluada proposal_rejected_reason: 'Esta propuesta ha sido rechazada porque:' - withdraw_btn_hint: Puedes retirar tu propuesta si cambias de opinión, siempre que no haya recibido ningún soporte. La propuesta no se elimina, aparecerá en la lista de propuestas retiradas. + withdraw_btn_hint: Puedes retirar tu propuesta si cambias de opinión, siempre que no haya recibido ningún apoyo. La propuesta no se eliminará, aparecerá en la lista de propuestas retiradas. withdraw_confirmation_html: '¿Seguro que quieres retirar esta propuesta?

    Esta acción no se puede deshacer!' withdraw_proposal: Retirar propuesta update: title: Actualizar propuesta vote_button: already_voted: Ya votado - already_voted_hover: Retirar voto + already_voted_hover: Retirar el apoyo maximum_votes_reached: Límite de votos alcanzado no_votes_remaining: No hay votos restantes vote: Dar apoyo votes_blocked: Votación desactivada votes_count: count: - one: APOYO - other: APOYOS + one: Apoyo + other: Apoyos voting_rules: - can_accumulate_supports_beyond_threshold: + can_accumulate_votes_beyond_threshold: description: Cada propuesta puede acumular más de %{limit} apoyos minimum_votes_per_user: description: Debes distribuir un mínimo de %{votes} votos entre las diferentes propuestas. given_enough_votes: Has dado apoyos suficientes. - supports_remaining: Tienes que votar %{remaining_votes} propuestas más para que tus votos sean tomados en cuenta. + votes_remaining: Has de dar %{remaining_votes} apoyo/s más a propuestas para que tus apoyos sean tenidos en cuenta. proposal_limit: description: Puedes crear hasta %{limit} propuestas. threshold_per_proposal: - description: Para que las propuestas sean validadas necesitan alcanzar un mínimo de %{limit} apoyos. - title: 'La votación se rige por las siguientes normas:' + description: Para que una propuesta se valide, debe recibir %{limit} apoyos. + title: 'La recogida de apoyos se rige por las siguientes normas:' vote_limit: description: Puedes votar hasta %{limit} propuestas. - votes: Votos + votes: Queda/n %{number} apoyo/s wizard_aside: back: Volver back_from_step_1: Volver a propuestas @@ -909,7 +912,7 @@ es-PY: title: Versiones withdraw: errors: - has_supports: Esta propuesta no puede ser retirada porque ya tiene apoyos. + has_votes: Esta propuesta no puede ser retirada porque ya tiene apoyos. resource_links: copied_from_component: proposal_proposal: Propuestas relacionadas @@ -921,4 +924,4 @@ es-PY: statistics: proposals_accepted: Propuestas aceptadas proposals_count: Propuestas - supports_count: Apoyos + votes_count: Votos diff --git a/decidim-proposals/config/locales/es.yml b/decidim-proposals/config/locales/es.yml index 52fcf9abe4973..ba843d0aabd48 100644 --- a/decidim-proposals/config/locales/es.yml +++ b/decidim-proposals/config/locales/es.yml @@ -74,12 +74,12 @@ es: attributes: base: not_official: No son oficiales - supported: Han recibido apoyos o adhesiones + voted: Han recibido apoyos o adhesiones proposals_split: attributes: base: not_official: No son oficiales - supported: No han recibido apoyos ni adhesiones + voted: Han recibido apoyos o adhesiones models: decidim/proposals/admin/update_proposal_category_event: Categoría de la propuesta cambiada decidim/proposals/admin/update_proposal_scope_event: Ámbito de propuesta cambiado @@ -101,7 +101,7 @@ es: other: Notas decidim/proposals/proposal_vote: one: Apoyo - other: Apoyos + other: Apoyo decidim: admin: filters: @@ -143,7 +143,7 @@ es: comment: Comentar create: Crear endorse: Adherirse - vote: Dar apoyo + vote: Apoyar vote_comment: Votar comentario withdraw: Retirar name: Propuestas @@ -154,14 +154,15 @@ es: amendments_wizard_help_text: Asistente de ayuda de las enmiendas announcement: Aviso attachments_allowed: Permitir adjuntos - can_accumulate_supports_beyond_threshold: Puede acumular apoyos más allá del umbral + attachments_allowed_help: Al activar esta opción, las propuestas se mostrarán en modo de cuadrícula por defecto y la primera imagen aparecerá en la tarjeta. + can_accumulate_votes_beyond_threshold: Puede acumular apoyos más allá del umbral collaborative_drafts_enabled: Borradores colaborativos habilitados comments_enabled: Comentarios habilitados comments_max_length: Longitud máxima de los comentarios (deja 0 si quieres mantener la configuración por defecto) default_sort_order: Ordenación por defecto de propuestas - default_sort_order_help: Por defecto significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán por las más apoyadas. + default_sort_order_help: '''Por defecto'' significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán de más a menos apoyos.' default_sort_order_options: - default: Por defecto + automatic: Por defecto most_commented: Más comentadas most_endorsed: Con más adhesiones most_followed: Más seguidas @@ -170,7 +171,7 @@ es: recent: Recientes with_more_authors: Con más autoras geocoding_enabled: Geocodificación habilitada - minimum_votes_per_user: Apoyos mínimos por participante + minimum_votes_per_user: Votos mínimos por usuario new_proposal_body_template: Plantilla para el texto de nueva propuesta new_proposal_body_template_help: Puede definir el texto predefinido que tendrán las nuevas propuestas new_proposal_help_text: Texto de ayuda al crear una propuesta @@ -211,9 +212,9 @@ es: creation_enabled: Las participantes pueden crear propuestas creation_enabled_readonly: Esta opción se desactiva cuando activas la funcionalidad de Textos Participativos. Para subir propuestas como texto participativo haz clic en el botón Textos Participativos y sigue las instrucciones. default_sort_order: Orden predeterminado de propuestas - default_sort_order_help: Por defecto significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán por las más apoyadas. + default_sort_order_help: '''Por defecto'' significa que si los apoyos están habilitados, las propuestas se mostrarán en orden aleatorio, y si los apoyos están bloqueados, se ordenarán de más a menos apoyos.' default_sort_order_options: - default: Por defecto + automatic: Por defecto most_commented: Más comentadas most_endorsed: Con más adhesiones most_followed: Más seguidas @@ -229,7 +230,7 @@ es: suggested_hashtags: Hashtags sugeridos a las participantes para nuevas propuestas votes_blocked: Apoyos bloqueados votes_enabled: Apoyos habilitados - votes_hidden: Apoyos ocultos (si los apoyos están habilitados, marcando esta opción ocultarás el número de apoyos) + votes_hidden: Votos ocultos (si los votos están habilitados, marcando esta opción ocultará el número de votos) events: proposals: admin: @@ -316,9 +317,9 @@ es: email_subject: El ámbito de la propuesta %{resource_title} ha sido actualizado notification_title: El ámbito de la propuesta %{resource_title} ha sido actualizado por una administradora. voting_enabled: - email_intro: '¡Puedes apoyar propuestas en %{participatory_space_title}! Empieza a participar en esta página:' + email_intro: '¡Puedes votar propuestas en %{participatory_space_title}! Empieza a participar en esta página:' email_outro: Recibiste esta notificación porque estás siguiendo %{participatory_space_title}. Puedes dejar de recibir notificaciones siguiendo el enlace anterior. - email_subject: El apoyo a propuestas ha comenzado para %{participatory_space_title} + email_subject: La recogida de apoyos a las propuestas recogidas en "%{participatory_space_title}" ha empezado notification_title: Ya puedes empezar a apoyar propuestas en %{participatory_space_title} gamification: badges: @@ -336,8 +337,8 @@ es: proposal_votes: conditions: - Navega y dedica un tiempo leyendo las propuestas de otras personas - - Da apoyo a las propuestas con las que estés de acuerdo o encuentres interesantes - description: Este distintivo se otorga cuando apoyas propuestas de otras personas. + - Apoya a las propuestas con las que estés de acuerdo o encuentres interesantes + description: Esta insignia se concede cuando se apoyan propuestas de otras personas. description_another: Esta participante ha apoyado %{score} propuestas. description_own: Has dado apoyo a %{score} propuestas. name: Apoyos a propuestas @@ -369,9 +370,9 @@ es: object: propuestas title: Propuestas votes: - description: Número de apoyos a las propuestas - object: apoyos - title: Apoyos + description: Número de apoyos a propuestas + object: votos + title: Votos participatory_spaces: highlighted_proposals: last: Propuestas más recientes @@ -609,13 +610,13 @@ es: withdrawn: Retirada application_helper: filter_origin_values: - all: Todas + all: Todos meetings: Encuentros official: Oficial participants: Participantes user_groups: Grupos filter_state_values: - all: Todas + all: Todos not_answered: No contestada filter_type_values: all: Todas @@ -793,13 +794,15 @@ es: search: Buscar state: Estado type: Tipo - voted: Has dado apoyo + voted: Apoyadas index: click_here: Ver todas las propuestas collaborative_drafts_list: Acceder a borradores colaborativos count: one: "%{count} propuesta" other: "%{count} propuestas" + grid_mode: Vista en cuadrícula + list_mode: Vista en listado new_proposal: Nueva propuesta see_all: Ver todas las propuestas see_all_withdrawn: Ver todas las propuestas retiradas @@ -857,26 +860,26 @@ es: title: Actualizar propuesta vote_button: already_voted: Ya has dado tu apoyo - already_voted_hover: Retirar tu apoyo + already_voted_hover: Retirar el apoyo maximum_votes_reached: Límite de apoyos alcanzado - no_votes_remaining: No quedan apoyos + no_votes_remaining: No hay votos restantes vote: Dar apoyo - votes_blocked: Apoyos deshabilitados + votes_blocked: Apoyos desactivados votes_count: count: one: Apoyo other: Apoyos voting_rules: - can_accumulate_supports_beyond_threshold: + can_accumulate_votes_beyond_threshold: description: Cada propuesta puede acumular más de %{limit} apoyos minimum_votes_per_user: description: Debes distribuir un mínimo de %{votes} apoyos entre las diferentes propuestas. given_enough_votes: Has dado apoyos suficientes. - supports_remaining: Debes apoyar %{remaining_votes} propuestas más para que tus apoyos sean tenidos en cuenta. + votes_remaining: Has de dar %{remaining_votes} apoyo/s más a propuestas para que tus apoyos sean tenidos en cuenta. proposal_limit: description: Puedes crear hasta %{limit} propuestas. threshold_per_proposal: - description: Para que las propuestas sean validadas necesitan alcanzar un mínimo de %{limit} apoyos. + description: Para que una propuesta se valide, debe recibir %{limit} apoyos. title: 'La recogida de apoyos se rige por las siguientes normas:' vote_limit: description: Puedes apoyar hasta %{limit} propuestas. @@ -909,7 +912,7 @@ es: title: Versiones withdraw: errors: - has_supports: Esta propuesta no puede ser retirada porque ya tiene apoyos. + has_votes: Esta propuesta no puede ser retirada porque ya tiene apoyos. resource_links: copied_from_component: proposal_proposal: Propuestas relacionadas @@ -921,4 +924,4 @@ es: statistics: proposals_accepted: Propuestas aceptadas proposals_count: Propuestas - supports_count: Apoyos + votes_count: Votos diff --git a/decidim-proposals/config/locales/eu.yml b/decidim-proposals/config/locales/eu.yml index bfedd0a04dccf..e841806342e2c 100644 --- a/decidim-proposals/config/locales/eu.yml +++ b/decidim-proposals/config/locales/eu.yml @@ -74,12 +74,12 @@ eu: attributes: base: not_official: Ez dira ofizialak - supported: Laguntza edo basesak jaso izana + voted: Botoak edo atxikimenduak jaso izana proposals_split: attributes: base: not_official: Ez dira ofizialak - supported: Laguntza edo basesak jaso izana + voted: Botoak edo atxikimenduak jaso izana models: decidim/proposals/admin/update_proposal_category_event: Proposamen kategoria aldatu da decidim/proposals/admin/update_proposal_scope_event: Proposamen-eremua aldatuta @@ -99,9 +99,6 @@ eu: decidim/proposals/proposal_note: one: Ohar other: Oharrak - decidim/proposals/proposal_vote: - one: Bozka - other: Bozkak decidim: admin: filters: @@ -143,7 +140,7 @@ eu: comment: Iruzkina create: Sortu endorse: Atxikitu - vote: Bozkatu + vote: Eman botoa vote_comment: Bozkatu iruzkina withdraw: Kendu name: Proposamenak @@ -154,23 +151,24 @@ eu: amendments_wizard_help_text: Zuzenketen testu-laguntzailea announcement: Jakinarazpena attachments_allowed: Onartu eranskinak - can_accumulate_supports_beyond_threshold: Babesak metatu ditzake atalasetik haratago + attachments_allowed_help: Aukera hori gaituta, proposamenak lehenetsita lauki moduan erakutsiko dira, eta lehen irudia txartelean agertuko da. + can_accumulate_votes_beyond_threshold: Botoak metatu ditzake atalasetik haratago collaborative_drafts_enabled: Lankidetza zirriborroak gaituta comments_enabled: Iruzkinak gaituta comments_max_length: Iruzkinen gehieneko luzera (utzi 0 lehenetsita konfigurazioa mantendu nahi baduzu) default_sort_order: Proposamenen hurrenkera lehenetsia - default_sort_order_help: Lehenetsita, esan nahi du euskarriak aktibatuta badaude, proposamenak ausaz ordenatuta erakutsiko direla, eta euskarriak blokeatuta badaude, euskarririk euskarrienaren arabera ordenatuko direla. + default_sort_order_help: Automatikoak esan nahi du, botoak gaituta badaude, proposamenak ausaz ordenatuta agertuko direla, eta botoak blokeatuta badaude, bozkatuenaren arabera ordenatuko direla. default_sort_order_options: - default: Lehenetsita + automatic: Automatikoa most_commented: Iruzkin gehien dituztenak most_endorsed: Aldeko boto gehien dituztenak most_followed: Jarraitzaile gehien dituztenak - most_voted: Aldeko boto gehien dituztenak + most_voted: Bozkatuenak random: Ausazkoa recent: Azkenak with_more_authors: Egile gehiagorekin geocoding_enabled: Geokodifikazioa gaituta dago - minimum_votes_per_user: Erabiltzaile bakoitzeko gutxieneko botoak + minimum_votes_per_user: Gutxieneko botoak erabiltzaile bakoitzeko new_proposal_body_template: Plantilla proposamen berriaren testurako new_proposal_body_template_help: Proposamen berriek izango duten testu aurredefinitua zehaztu ahal duzu new_proposal_help_text: Proposamen berriaren laguntza testua @@ -191,7 +189,7 @@ eu: scope_id: Esparrua scopes_enabled: Esparruak gaituta threshold_per_proposal: Proposamen bakoitzeko atalasea - vote_limit: Partaide bakoitzeko botoen muga + vote_limit: Botoen muga partaide bakoitzeko step: amendment_creation_enabled: Zuzenketa sortzea aktibatuta amendment_creation_enabled_help: Parte-hartzaileak proposamenak alda ditzake. @@ -211,13 +209,13 @@ eu: creation_enabled: Parte-hartzaileek eztabaidak sor ditzakete creation_enabled_readonly: Aukera hori desaktibatu egiten da Testuen Parte-hartzaile funtzionaltasuna aktibatzean. Testu parte-hartzaile gisa proposamenak kargatzeko, egin klik Testu parte-hartzaileak botoian eta jarraitu jarraibideak. default_sort_order: Proposamenen hurrenkera lehenetsia - default_sort_order_help: Besterik adierazi ezean, botoak gaituta badaude, proposamenak ausaz ordenatuta agertuko dira, eta botoak blokeatuta badaude, bozkatuenaren arabera ordenatuko dira. + default_sort_order_help: Automatikoak esan nahi du, botoak gaituta badaude, proposamenak ausaz ordenatuta agertuko direla, eta botoak blokeatuta badaude, bozkatuenaren arabera ordenatuko direla. default_sort_order_options: - default: Lehenetsita + automatic: Automatikoa most_commented: Iruzkin gehien dituztenak most_endorsed: Aldeko boto gehien dituztenak most_followed: Jarraitzaile gehien dituztenak - most_voted: Aldeko boto gehien dituztenak + most_voted: Bozkatuenak random: Ausazkoa recent: Berrienak with_more_authors: Egile gehiagorekin @@ -227,9 +225,9 @@ eu: publish_answers_immediately: Argitaratu berehala proposamen erantzunak publish_answers_immediately_help_html: 'Kontuz, proposamenen bati erantzuten badiozu hau gabe, eskuz argitaratu beharko dituzu, aukeratuz eta argitaratzeko ekintza erabiliz. Nola funtzionatzen duen jakiteko, ikus proposals'' answers documentation pageproposamenen erantzunen dokumentazio-orria.' suggested_hashtags: Traolek erabiltzaileei proposamen berriak proposatu dizkie - votes_blocked: Botoak blokeatuta - votes_enabled: Botoak gaituta - votes_hidden: Botoak ezkutatuta (bozkak gaituta badadaude, hau egiaztatuz bozka kopurua ezkutatuko da) + votes_blocked: Botoiak blokeatuta + votes_enabled: Botoiak gaituta + votes_hidden: Boto ezkutuak (botoak gaituta badaude, hau markatuz boto kopurua ezkutuan geratuko da) events: proposals: admin: @@ -316,10 +314,10 @@ eu: email_subject: '%{resource_title} proposamenaren esparrua eguneratu egin da' notification_title: %{resource_title} proposamenaren eremua administratzaile batek eguneratu du. voting_enabled: - email_intro: 'Proposamenak bozkatu ditzakezu %{participatory_space_title}-n! Hasi parte hartzen ondorengo orrian:' + email_intro: 'Proposamenak bozkatu ditzakezuhemen: % {participatory_space_title} Hasi orri honetan parte hartzen:' email_outro: Jakinarazpen hau jaso duzu %{participatory_space_title} jarraitzen duzulako. Jakinarazpenak jasotzeari uti ahal diozu aurreko estekan. - email_subject: Proposamenetarako bozketak hasi dira hemen %{participatory_space_title} - notification_title: Orain has dezakezu bozka-proposamena hemen: %{participatory_space_title} + email_subject: 'Proposamenak bozkatzen hasi dira hemen: % {partizipatory_space_title}' + notification_title: 'Orain has zaitezke proposamena bozkatzen hemen: s in %{participatory_space_title}' gamification: badges: accepted_proposals: @@ -336,14 +334,14 @@ eu: proposal_votes: conditions: - Nabigatu eta irakurri besteen proposamenak - - Eman babesa gustatzen zaizkizun edo interesgarriak iruditzen zaizkizun proposamenei - description: Garaikur hori beste pertsona batzuen proposamenak bozkatzen dituzunean ematen da. - description_another: Erabiltzaile honek %{score} proposamen onartu ditu. - description_own: '%{score} proposameni man diezu babesa.' - name: Proposamenaren aldeko botoak - next_level_in: Eman babesa % {score} proposamen gehiagori hurrengo mailara iristeko! - unearned_another: Parte-hartzaile honek oraindik ez dio babesik eman proposamen bati ere. - unearned_own: Oraindik ez duzu proposamen bat ere babestu. + - Bozkatu gustuko dituzun edo interesgarriak iruditzen zaizkizun proposamenak + description: Bereizgarri hau ematen da beste pertsona batzuen proposmenak bozkatzen dituzunean. + description_another: Parte-hartzaile honek %{score} proposamen bozkatu ditu. + description_own: '%{score} proposamen bozkatu dituzu.' + name: Proposamenak bozkatuak + next_level_in: Bozkatu %{score} proposamen gehiago hurrengo mailara iristeko! + unearned_another: Parte-hartzaile honek oraindik ez du proposamenik bozkatu. + unearned_own: Oraindik ez duzu proposamenik bozkatu. proposals: conditions: - Aukeratu zure interesekoa den parte hartzeko gunea, gaitutako proposamenak aurkeztuta @@ -369,9 +367,9 @@ eu: object: proposamenak title: Proposamenak votes: - description: Proposamenen babes kopurua + description: Zenbat boto proposamenei object: botoak - title: Babesak + title: Botoak participatory_spaces: highlighted_proposals: last: Azken proposamenak @@ -555,7 +553,7 @@ eu: remove_assignment: Desegin esleipena remove_assignment_confirmation: Ziur zaude proposamen honen ebaluatzailea desesleitu nahi duzula? valuators: Ebaluatzaileak - votes_count: Botoen zenbaketa + votes_count: Boto kopurua update_category: invalid: 'Proposamen hauek bazuten %{subject_name}: %{proposals} kategoria.' select_a_category: Mesedez, hautatu kategoria bat. @@ -801,6 +799,8 @@ eu: count: one: "%{count} proposamen" other: "%{count} proposamen" + grid_mode: Lauki-forma modua + list_mode: Zerrenda modua new_proposal: Beste proposamen bat see_all: Ikusi proposamen guztiak see_all_withdrawn: Ikusi erretiratutako proposamen guztiak @@ -813,7 +813,7 @@ eu: most_commented: Iruzkin gehien dituztenak most_endorsed: Aldeko boto gehien dituztenak most_followed: Jarraitzaile gehien dituztenak - most_voted: Aldeko boto gehien dituztenak + most_voted: Bozkatuenak random: Ausazko ordena recent: Berrienak with_more_authors: Egile gehiagorekin @@ -851,37 +851,33 @@ eu: proposal_accepted_reason: 'Proposamen hau onartu da arrazoi hauengatik:' proposal_in_evaluation_reason: Proposamen hau ebaluatzen ari da proposal_rejected_reason: 'Proposamen hau baztertu da arrazoi hauengatik:' - withdraw_btn_hint: Zure proposamena atzera bota dezakezu iritziz aldatzen baduzu, babesik jaso ez duzun bitartean. Proposamena ez da ezabatzen, baztertutako proposamenen zerrendan agertuko da. + withdraw_btn_hint: Zure proposamena atzera bota dezakezu iritziz aldatzen baduzu, botorik jaso ez baduzu. Proposamena ez da ezabatzen, baztertutako proposamenen zerrendan agertuko da. withdraw_confirmation_html: Ziur zaude proposamen hau kendu nahi duzula?

    Ekintza hau ezin da desegin! withdraw_proposal: Ezabatu proposamena update: title: Eguneratu proposamena vote_button: already_voted: Bozkatuta duzu - already_voted_hover: Bozka kendu - maximum_votes_reached: Bozken mugara iritsi da - no_votes_remaining: Ez da botorik gelditzen + already_voted_hover: Kendu botoa + maximum_votes_reached: Botoen muga lortua + no_votes_remaining: Ez da gelditzen botorik vote: Proiektuaren alde egin votes_blocked: Bozketa desaktibatu da - votes_count: - count: - one: Eman babesa - other: Babesak voting_rules: - can_accumulate_supports_beyond_threshold: - description: Proposamen bakoitzak %{limit} babes baino gehiago jaso dezake + can_accumulate_votes_beyond_threshold: + description: Proposamen bakoitzak %{limit} boto baino gehiago jaso dezake minimum_votes_per_user: - description: Gutxienez %{votes} babes banatu behar dituzu proposamen desberdinen artean. - given_enough_votes: Nahiko babes eman dituzu. - supports_remaining: '%{remaining_votes} boto gehiago proposatu behar dituzu zure botoak kontuan hartzeko.' + description: Gutxienez %{votes} boto banatu behar dituzu proposamen desberdinen artean. + given_enough_votes: Boto gehiegi eman dituzu. + votes_remaining: '%{remaining_votes} boto gehiago eman behar dizkiezu proposamenei zure botoak kontuan har daitezen.' proposal_limit: description: '%{limit} proposamen sortu ditzakezu.' threshold_per_proposal: - description: Proposamenak baliozkotu ahal izateko, %{limit} babesetara iritsi behar da. - title: 'Babesek arau hauek bete behar dituzte:' + description: Proposamenak baliagarriak izan daitezen, %{limit} boto izatera iritsi behar da. + title: 'Botoek arau hauek bete behar dituzte:' vote_limit: - description: '%{limit} proposameni eman ahal diozu babesa.' - votes: Babesak + description: Gehienez, %{limit} proposamen bozkatu ahal dituzu. + votes: Gainerako % {kopurua} boto wizard_aside: back: Atzera back_from_step_1: Itzuli proposamenetara @@ -910,7 +906,7 @@ eu: title: Bertsioak withdraw: errors: - has_supports: Proposamen hau ezin da bertan behera utzi, dagoeneko babesa duelako. + has_votes: Proposamen hau ezin da kendu dagoeneko botoak duelako. resource_links: copied_from_component: proposal_proposal: Lotutako proposamenak @@ -922,4 +918,4 @@ eu: statistics: proposals_accepted: Onartutako proposamenak proposals_count: Proposamenak - supports_count: Aldeko botoak + votes_count: Botoak diff --git a/decidim-proposals/config/locales/fi-plain.yml b/decidim-proposals/config/locales/fi-plain.yml index 4ccf4d3758377..2bb8c3a8d7af2 100644 --- a/decidim-proposals/config/locales/fi-plain.yml +++ b/decidim-proposals/config/locales/fi-plain.yml @@ -74,12 +74,12 @@ fi-pl: attributes: base: not_official: Ehdotukset eivät ole virallisia ehdotuksia - supported: Ehdotukset eivät ole saaneet kannatuksia tai suosituksia + voted: On vastaanottanut ääniä tai suosituksia proposals_split: attributes: base: not_official: Ehdotukset eivät ole virallisia ehdotuksia - supported: Ehdotukset eivät ole saaneet kannatuksia tai suosituksia + voted: On vastaanottanut ääniä tai suosituksia models: decidim/proposals/admin/update_proposal_category_event: Ehdotuksen aihepiiri muutettu decidim/proposals/admin/update_proposal_scope_event: Ehdotuksen teema muutettu @@ -154,18 +154,17 @@ fi-pl: amendments_wizard_help_text: Muutoksen luonnin ohjeteksti announcement: Ilmoitus attachments_allowed: Salli liitteet - can_accumulate_supports_beyond_threshold: Voi kerätä kannatuksia yli kynnysarvon + attachments_allowed_help: Ottamalla tämän asetuksen käyttöön, ehdotukset näytetään oletuksena ruudukkonäkymässä ja ensimmäinen ehdotukseen liitetty kuva näytetään ehdotuskortilla. + can_accumulate_votes_beyond_threshold: Voi kerätä ääniä yli kynnysarvon collaborative_drafts_enabled: Yhteistyöluonnokset ovat käytössä comments_enabled: Kommentit käytössä comments_max_length: Kommenttien maksimipituus (jätä arvoksi 0 käyttääksesi oletusarvoa) default_sort_order: Ehdotuksen oletusjärjestys - default_sort_order_help: Oletus tarkoittaa, että mikäli kannatukset ovat käytössä, ehdotukset näytetään satunnaisessa järjestyksessä ja mikäli kannatukset on estetty, niin ehdotukset järjestetään eniten kannatuksia saaneet ensin. default_sort_order_options: - default: Oletus most_commented: Eniten kommentoidut most_endorsed: Eniten suositellut most_followed: Eniten seuratut - most_voted: Eniten kannatuksia saaneet + most_voted: Eniten ääniä saaneet ensin random: Satunnainen recent: Viimeisimmät with_more_authors: Eniten tekijöitä @@ -191,7 +190,7 @@ fi-pl: scope_id: Teema scopes_enabled: Teemat käytössä threshold_per_proposal: Ehdotusten äänten määrän kynnysarvo - vote_limit: Käytettävissä olevien äänien määrä käyttäjää kohden + vote_limit: Käytettävissä olevien äänten määrä käyttäjää kohden step: amendment_creation_enabled: Muutosten luonti on käytössä amendment_creation_enabled_help: Osallistuja voi muuttaa ehdotuksia. @@ -211,13 +210,11 @@ fi-pl: creation_enabled: Osallistujat voivat luoda ehdotuksia creation_enabled_readonly: Tämä asetus on pois päältä, kun olet ottanut ehdotusaineistot käyttöön. Voit ladata uusia ehdotusaineistoja siirtymällä ehdotusaineistot-osioon ja seuraamalla kyseisen osion ohjeistusta. default_sort_order: Ehdotuksen oletusjärjestys - default_sort_order_help: Oletus tarkoittaa, että mikäli kannatukset ovat käytössä, ehdotukset näytetään satunnaisessa järjestyksessä ja mikäli kannatukset on estetty, niin ehdotukset järjestetään eniten kannatuksia saaneet ensin. default_sort_order_options: - default: Oletus most_commented: Eniten kommentoidut most_endorsed: Eniten suositellut most_followed: Eniten seuratut - most_voted: Eniten kannatuksia saaneet + most_voted: Eniten ääniä saaneet ensin random: Satunnainen recent: Viimeisimmät with_more_authors: Eniten tekijöitä @@ -227,8 +224,8 @@ fi-pl: publish_answers_immediately: Julkaise ehdotusten vastaukset heti publish_answers_immediately_help_html: 'Huomioithan, että jos vastaat mihin tahansa ehdotukseen ilman tätä asetusta, sinun on julkaistava vastaukset manuaalisesti valitsemalla vastaukset sisältävät ehdotukset ja käyttämällä julkaisutoimintoa. Lisätietoja, miten tämä toimii, löytyy dokumentaation osiosta ehdotuksiin vastaaminen.' suggested_hashtags: Käyttäjille ehdotettavat hashtagit uusille ehdotuksille - votes_blocked: Äänestys estetty - votes_enabled: Äänestys käytössä + votes_blocked: Äänet ovat tukossa + votes_enabled: Äänet käytössä votes_hidden: Piilotetut äänet (jos äänet ovat käytössä, tämä valitseminen piilottaa äänimäärän) events: proposals: @@ -336,14 +333,14 @@ fi-pl: proposal_votes: conditions: - Selaa muiden ihmisten ehdotuksia ja käytä aikaa tutustumalla niihin - - Tue ehdotuksia, joita pidät tai jotka kiinnostavat sinua - description: Tämä kunniamerkki myönnetään, kun tuet muiden ihmisten ehdotuksia. - description_another: Tämä käyttäjä on kannattanut %{score} ehdotusta. - description_own: Olet kannattanut %{score} ehdotusta. - name: Ehdotusten kannatukset - next_level_in: Kannata %{score} ehdotusta noustaksesi seuraavalle tasolle! - unearned_another: Tämä käyttäjä ei ole vielä kannattanut yhtään ehdotusta. - unearned_own: Et ole vielä kannattanut ehdotuksia. + - Äänestä ehdotuksia, joista pidät tai jotka kiinnostavat sinua + description: Tämä kunniamerkki myönnetään niille, jotka ovat äänestäneet muiden ehdotuksia. + description_another: Tämä käyttäjä on äänestänyt %{score} ehdotusta. + description_own: Olet äänestänyt %{score} ehdotusta. + name: Ehdotusten äänet + next_level_in: Äänestä vielä %{score} ehdotusta noustaksesi seuraavalle tasolle! + unearned_another: Tämä käyttäjä ei ole vielä äänestänyt yhtään ehdotusta. + unearned_own: Et ole vielä äänestänyt ehdotuksia. proposals: conditions: - Valitse kiinnostuksesi mukaan osallisuustila, jossa ehdotusten jättäminen on mahdollista @@ -760,7 +757,7 @@ fi-pl: comment: Kommentti proposal_votes: create: - error: Äänestettäessä ehdotusta tapahtui virhe. + error: Ehdotuksen äänestäminen epäonnistui. proposals: dynamic_map_instructions: description: Koordinaatit päivitetään, kun painat Esikatsele-painiketta. Osoitetekstiä ei muuteta. @@ -799,6 +796,8 @@ fi-pl: count: one: "%{count} ehdotus" other: "%{count} ehdotusta" + grid_mode: Ruudukkonäkymä + list_mode: Listanäkymä new_proposal: Uusi ehdotus see_all: Näytä kaikki ehdotukset see_all_withdrawn: Näytä kaikki peruutetut ehdotukset @@ -849,37 +848,37 @@ fi-pl: proposal_accepted_reason: 'Tämä ehdotus on hyväksytty, koska:' proposal_in_evaluation_reason: Tämä ehdotus on arvioitavana proposal_rejected_reason: 'Tämä ehdotus on hylätty, koska:' - withdraw_btn_hint: Jos muutat mieltäsi, voit perua ehdotuksesi, mikäli se ei ole saanut kannatusta. Ehdotusta ei poisteta, se näkyy peruutettujen ehdotusten luettelossa. + withdraw_btn_hint: Voit peruuttaa ehdotuksesi, jos muutat mieltäsi ja ehdotus ei ole vielä saanut ääniä. Ehdotusta ei poisteta, vaan se näkyy peruutettujen ehdotusten luettelossa. withdraw_confirmation_html: Haluatko varmasti peruuttaa tämän ehdotuksen?

    Tätä toimintoa ei voi peruuttaa! withdraw_proposal: Peruuta ehdotus update: title: Muokkaa ehdotusta vote_button: already_voted: Jo äänestetty - already_voted_hover: Peru äänesi + already_voted_hover: Peruuta ääni maximum_votes_reached: Kaikki äänet käytetty no_votes_remaining: Ei ääniä jäljellä vote: Äänestä votes_blocked: Äänestys estetty votes_count: count: - one: ÄÄNI - other: ÄÄNTÄ + one: Ääni + other: Ääntä voting_rules: - can_accumulate_supports_beyond_threshold: - description: Jokainen ehdotus voi kerätä yli %{limit} kannatusta + can_accumulate_votes_beyond_threshold: + description: Jokainen ehdotus voi kerätä yli %{limit} ääntä minimum_votes_per_user: description: Sinun on annettava vähintään %{votes} ääntä eri ehdotuksille. - given_enough_votes: Olet kannattanut tarpeeksi monta ehdotusta. - supports_remaining: Sinun on äänestettävä %{remaining_votes} ehdotusta lisää, jotta äänesi otetaan huomioon. + given_enough_votes: Olet äänestänyt tarpeeksi monta ehdotusta. + votes_remaining: Sinun on äänestettävä vielä %{remaining_votes} ehdotusta, jotta äänesi otetaan huomioon. proposal_limit: description: Voit luoda enintään %{limit} ehdotusta. threshold_per_proposal: - description: Jotta ehdotukset vahvistettaisiin, niiden on saavutettava %{limit} kannatusta. + description: Jotta ehdotukset vahvistettaisiin, niiden on saavutettava %{limit} ääntä. title: 'Äänestykseen sovelletaan seuraavia sääntöjä:' vote_limit: description: Voit äänestää enintään %{limit} ehdotusta. - votes: Ääntä + votes: 'Käytettävissä olevien äänten määrä: %{number}' wizard_aside: back: Takaisin back_from_step_1: Takaisin ehdotuksiin @@ -908,7 +907,7 @@ fi-pl: title: Versiot withdraw: errors: - has_supports: Tätä ehdotusta ei voi peruuttaa, koska sitä on jo tuettu. + has_votes: Tätä ehdotusta ei voi peruuttaa, koska se on saanut jo ääniä. resource_links: copied_from_component: proposal_proposal: Liittyvät ehdotukset @@ -920,4 +919,4 @@ fi-pl: statistics: proposals_accepted: Hyväksyttyä ehdotusta proposals_count: Ehdotusta - supports_count: Kannatusta + votes_count: Ääntä diff --git a/decidim-proposals/config/locales/fi.yml b/decidim-proposals/config/locales/fi.yml index 4198b83861563..da9ce33af6c18 100644 --- a/decidim-proposals/config/locales/fi.yml +++ b/decidim-proposals/config/locales/fi.yml @@ -74,12 +74,12 @@ fi: attributes: base: not_official: Ehdotukset eivät ole virallisia ehdotuksia - supported: Ehdotukset eivät ole saaneet kannatuksia tai suosituksia + voted: On vastaanottanut ääniä tai suosituksia proposals_split: attributes: base: not_official: Ehdotukset eivät ole virallisia ehdotuksia - supported: Ehdotukset eivät ole saaneet kannatuksia tai suosituksia + voted: On vastaanottanut ääniä tai suosituksia models: decidim/proposals/admin/update_proposal_category_event: Ehdotuksen aihepiiri muutettu decidim/proposals/admin/update_proposal_scope_event: Ehdotuksen teema muutettu @@ -100,8 +100,8 @@ fi: one: Huomautus other: Huomautuksia decidim/proposals/proposal_vote: - one: Kannatus - other: Kannatukset + one: Ääni + other: Äänet decidim: admin: filters: @@ -143,7 +143,7 @@ fi: comment: Kommentoi create: Luo endorse: Suosittele - vote: Kannata + vote: Äänestä vote_comment: Äänestä kommenttia withdraw: Peru name: Ehdotukset @@ -154,23 +154,22 @@ fi: amendments_wizard_help_text: Muutoksen luonnin ohjeteksti announcement: Ilmoitus attachments_allowed: Salli liitteet - can_accumulate_supports_beyond_threshold: Voi kerätä kannatuksia yli kynnysarvon + attachments_allowed_help: Ottamalla tämän asetuksen käyttöön, ehdotukset näytetään oletuksena ruudukkonäkymässä ja ensimmäinen ehdotukseen liitetty kuva näytetään ehdotuskortilla. + can_accumulate_votes_beyond_threshold: Voi kerätä ääniä yli kynnysarvon collaborative_drafts_enabled: Yhteistyöluonnokset ovat käytössä comments_enabled: Kommentit käytössä comments_max_length: Kommenttien maksimipituus (jätä arvoksi 0 käyttääksesi oletusarvoa) default_sort_order: Ehdotuksen oletusjärjestys - default_sort_order_help: Oletus tarkoittaa, että mikäli kannatukset ovat käytössä, ehdotukset näytetään satunnaisessa järjestyksessä ja mikäli kannatukset on estetty, niin ehdotukset järjestetään eniten kannatuksia saaneet ensin. default_sort_order_options: - default: Oletus most_commented: Eniten kommentoidut most_endorsed: Eniten suositellut most_followed: Eniten seuratut - most_voted: Eniten kannatuksia saaneet + most_voted: Eniten ääniä saaneet ensin random: Satunnainen recent: Viimeisimmät with_more_authors: Eniten tekijöitä geocoding_enabled: Geokoodaus käytössä - minimum_votes_per_user: Kannatusten vähimmäismäärä käyttäjää kohden + minimum_votes_per_user: Vähimmäisäänimäärä käyttäjää kohden new_proposal_body_template: Uuden ehdotuksen leipätekstin mallipohja new_proposal_body_template_help: Voit määritellä esitäytetyn oletustekstin, joka uusille ehdotuksille näytetään automaattisesti new_proposal_help_text: Uuden ehdotuksen ohjeteksti @@ -191,7 +190,7 @@ fi: scope_id: Teema scopes_enabled: Teemat käytössä threshold_per_proposal: Ehdotusten kannatusten määrän kynnysarvo - vote_limit: Käytettävissä olevien kannatusten määrä käyttäjää kohden + vote_limit: Käytettävissä olevien äänten määrä käyttäjää kohden step: amendment_creation_enabled: Muutosten luonti käytössä amendment_creation_enabled_help: Osallistujat voivat lisätä muutoksia ehdotuksiin. @@ -211,13 +210,11 @@ fi: creation_enabled: Osallistujat voivat luoda ehdotuksia creation_enabled_readonly: Tämä asetus on pois päältä, kun olet ottanut ehdotusaineistot käyttöön. Voit ladata uusia ehdotusaineistoja siirtymällä ehdotusaineistot-osioon ja seuraamalla kyseisen osion ohjeistusta. default_sort_order: Ehdotuksen oletusjärjestys - default_sort_order_help: Oletus tarkoittaa, että mikäli kannatukset ovat käytössä, ehdotukset näytetään satunnaisessa järjestyksessä ja mikäli kannatukset on estetty, niin ehdotukset järjestetään eniten kannatuksia saaneet ensin. default_sort_order_options: - default: Oletus most_commented: Eniten kommentoidut most_endorsed: Eniten suositellut most_followed: Eniten seuratut - most_voted: Eniten kannatuksia saaneet + most_voted: Eniten ääniä saaneet ensin random: Satunnainen recent: Viimeisimmät with_more_authors: Eniten tekijöitä @@ -227,9 +224,9 @@ fi: publish_answers_immediately: Julkaise ehdotusten vastaukset heti publish_answers_immediately_help_html: 'Huomioithan, että jos vastaat mihin tahansa ehdotukseen ilman tätä asetusta, sinun on julkaistava vastaukset manuaalisesti valitsemalla vastaukset sisältävät ehdotukset ja käyttämällä julkaisutoimintoa. Lisätietoja, miten tämä toimii, löytyy dokumentaation osiosta ehdotuksiin vastaaminen.' suggested_hashtags: Käyttäjille ehdotettavat aihetunnisteet (hashtag) uusille ehdotuksille - votes_blocked: Kannatukset estetty - votes_enabled: Kannatukset käytössä - votes_hidden: Piilota kannatusmäärät (jos kannatukset ovat käytössä, tämä valitseminen piilottaa kannatusmäärän) + votes_blocked: Äänet ovat tukossa + votes_enabled: Äänet käytössä + votes_hidden: Piilotetut äänet (jos äänet ovat käytössä, tämä valitseminen piilottaa äänimäärän) events: proposals: admin: @@ -316,10 +313,10 @@ fi: email_subject: Ehdotuksen %{resource_title} teema on päivitetty notification_title: Hallintakäyttäjä on päivittänyt ehdotuksen %{resource_title} teeman. voting_enabled: - email_intro: 'Voit kannattaa ehdotuksia kohteessa %{participatory_space_title}! Osallistu tällä sivulla:' + email_intro: 'Voit äänestää ehdotuksia kohteessa %{participatory_space_title}! Aloita osallistuminen tällä sivulla:' email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat kohdetta %{participatory_space_title}. Voit lopettaa ilmoitusten vastaanottamisen edellä esitetyn linkin kautta. - email_subject: Ehdotusten kannattaminen on alkanut kohteessa %{participatory_space_title} - notification_title: Voit nyt kannattaa ehdotuksia kohteessa %{participatory_space_title} + email_subject: Ehdotusten äänestäminen on alkanut kohteessa %{participatory_space_title} + notification_title: Voit nyt aloittaa ehdotusten äänestämisen kohteessa %{participatory_space_title} gamification: badges: accepted_proposals: @@ -336,14 +333,14 @@ fi: proposal_votes: conditions: - Selaa muiden ihmisten ehdotuksia ja käytä aikaa tutustumalla niihin - - Tue ehdotuksia, joita pidät tai jotka kiinnostavat sinua - description: Tämä kunniamerkki myönnetään, kun tuet muiden ihmisten ehdotuksia. - description_another: Tämä käyttäjä on kannattanut %{score} ehdotusta. - description_own: Olet kannattanut %{score} ehdotusta. - name: Ehdotusten kannatukset - next_level_in: Kannata %{score} ehdotusta noustaksesi seuraavalle tasolle! - unearned_another: Tämä käyttäjä ei ole vielä kannattanut yhtään ehdotusta. - unearned_own: Et ole vielä kannattanut ehdotuksia. + - Äänestä ehdotuksia, joista pidät tai jotka kiinnostavat sinua + description: Tämä kunniamerkki myönnetään niille, jotka ovat äänestäneet muiden ehdotuksia. + description_another: Tämä käyttäjä on äänestänyt %{score} ehdotusta. + description_own: Olet äänestänyt %{score} ehdotusta. + name: Ehdotusten äänet + next_level_in: Äänestä vielä %{score} ehdotusta noustaksesi seuraavalle tasolle! + unearned_another: Tämä käyttäjä ei ole vielä äänestänyt yhtään ehdotusta. + unearned_own: Et ole vielä äänestänyt ehdotuksia. proposals: conditions: - Valitse kiinnostuksesi mukaan osallistumistila, jossa ehdotusten jättäminen on mahdollista @@ -369,9 +366,9 @@ fi: object: ehdotukset title: Ehdotukset votes: - description: Ehdotuksiin kohdistuneiden kannatusten määrä - object: kannatukset - title: Kannatukset + description: Ehdotuksiin kohdistuneiden äänten määrä + object: äänet + title: Äänet participatory_spaces: highlighted_proposals: last: Viimeisimmät ehdotukset @@ -553,7 +550,7 @@ fi: remove_assignment: Poista tehtävä arvioijalta remove_assignment_confirmation: Haluatko varmasti poistaa arvioijan tältä ehdotukselta? valuators: Arvioijat - votes_count: Kannatusten määrä + votes_count: Äänten määrä update_category: invalid: 'Näillä ehdotuksilla oli jo aihepiiri %{subject_name}: %{proposals}.' select_a_category: Valitse aihepiiri. @@ -760,7 +757,7 @@ fi: comment: Kommentti proposal_votes: create: - error: Ehdotuksen kannattaminen epäonnistui. + error: Ehdotuksen äänestäminen epäonnistui. proposals: dynamic_map_instructions: description: Koordinaatit päivitetään, kun painat Esikatsele-painiketta. Osoitetekstiä ei muuteta. @@ -792,13 +789,15 @@ fi: search: Haku state: Tila type: Tyyppi - voted: Kannatettu + voted: Äänestetty index: click_here: Näytä kaikki ehdotukset collaborative_drafts_list: Mene yhteistyöluonnoksiin count: one: "%{count} ehdotus" other: "%{count} ehdotusta" + grid_mode: Ruudukkonäkymä + list_mode: Listanäkymä new_proposal: Uusi ehdotus see_all: Näytä kaikki ehdotukset see_all_withdrawn: Näytä kaikki peruutetut ehdotukset @@ -811,7 +810,7 @@ fi: most_commented: Eniten kommentoidut most_endorsed: Eniten suositellut most_followed: Eniten seuratut - most_voted: Eniten kannatuksia saaneet + most_voted: Eniten ääniä saaneet random: Satunnainen recent: Viimeisimmät with_more_authors: Eniten laatijoita @@ -849,37 +848,37 @@ fi: proposal_accepted_reason: 'Tämä ehdotus on hyväksytty, koska:' proposal_in_evaluation_reason: Tämä ehdotus on arvioitavana proposal_rejected_reason: 'Tämä ehdotus on hylätty, koska:' - withdraw_btn_hint: Jos muutat mieltäsi, voit perua ehdotuksesi, mikäli se ei ole saanut kannatusta. Ehdotusta ei poisteta, se näkyy peruutettujen ehdotusten luettelossa. + withdraw_btn_hint: Voit peruuttaa ehdotuksesi, jos muutat mieltäsi ja ehdotus ei ole vielä saanut ääniä. Ehdotusta ei poisteta, vaan se näkyy peruutettujen ehdotusten luettelossa. withdraw_confirmation_html: Haluatko varmasti peruuttaa tämän ehdotuksen?

    Tätä toimintoa ei voi peruuttaa! withdraw_proposal: Peruuta ehdotus update: title: Muokkaa ehdotusta vote_button: - already_voted: Jo kannatettu - already_voted_hover: Peru kannatuksesi - maximum_votes_reached: Kaikki kannatukset käytetty - no_votes_remaining: Ei kannatuksia jäljellä - vote: Kannata - votes_blocked: Kannatus poissa käytöstä + already_voted: Jo äänestetty + already_voted_hover: Peruuta ääni + maximum_votes_reached: Kaikki äänet käytetty + no_votes_remaining: Ei ääniä jäljellä + vote: Äänestä + votes_blocked: Äänestys estetty votes_count: count: - one: Kannatus - other: Kannatukset + one: Ääni + other: Ääntä voting_rules: - can_accumulate_supports_beyond_threshold: - description: Jokainen ehdotus voi kerätä yli %{limit} kannatusta + can_accumulate_votes_beyond_threshold: + description: Jokainen ehdotus voi kerätä yli %{limit} ääntä minimum_votes_per_user: - description: Sinun on annettava vähintään %{votes} kannatusta eri ehdotuksille. - given_enough_votes: Olet kannattanut tarpeeksi monta ehdotusta. - supports_remaining: Sinun on kannatettava %{remaining_votes} ehdotusta lisää, jotta äänesi otetaan huomioon. + description: Sinun on annettava vähintään %{votes} ääntä eri ehdotuksille. + given_enough_votes: Olet äänestänyt tarpeeksi monta ehdotusta. + votes_remaining: Sinun on äänestettävä vielä %{remaining_votes} ehdotusta, jotta äänesi otetaan huomioon. proposal_limit: description: Voit luoda enintään %{limit} ehdotusta. threshold_per_proposal: - description: Jotta ehdotukset vahvistettaisiin, niiden on saavutettava %{limit} kannatusta. - title: 'Kannatukseen sovelletaan seuraavia sääntöjä:' + description: Jotta ehdotukset vahvistettaisiin, niiden on saavutettava %{limit} ääntä. + title: 'Äänestykseen sovelletaan seuraavia sääntöjä:' vote_limit: - description: Voit kannattaa enintään %{limit} ehdotusta. - votes: 'Käytettävissä olevien kannatusten määrä: %{number}' + description: Voit äänestää enintään %{limit} ehdotusta. + votes: 'Käytettävissä olevien äänten määrä: %{number}' wizard_aside: back: Takaisin back_from_step_1: Takaisin ehdotuksiin @@ -908,7 +907,7 @@ fi: title: Versiot withdraw: errors: - has_supports: Tätä ehdotusta ei voi peruuttaa, koska sitä on jo tuettu. + has_votes: Tätä ehdotusta ei voi peruuttaa, koska se on saanut jo ääniä. resource_links: copied_from_component: proposal_proposal: Liittyvät ehdotukset @@ -920,4 +919,4 @@ fi: statistics: proposals_accepted: Hyväksyttyä ehdotusta proposals_count: Ehdotusta - supports_count: Kannatusta + votes_count: Ääntä diff --git a/decidim-proposals/config/locales/fr-CA.yml b/decidim-proposals/config/locales/fr-CA.yml index 340f7d7850bbd..12a96363b58ec 100644 --- a/decidim-proposals/config/locales/fr-CA.yml +++ b/decidim-proposals/config/locales/fr-CA.yml @@ -74,12 +74,12 @@ fr-CA: attributes: base: not_official: Non officiels - supported: Avoir reçu des soutiens ou des approbations + voted: A reçu des votes ou des soutiens proposals_split: attributes: base: not_official: Non officiels - supported: A reçu des soutiens ou des approbations + voted: A reçu des votes ou des soutiens models: decidim/proposals/admin/update_proposal_category_event: Catégorie de proposition modifiée decidim/proposals/admin/update_proposal_scope_event: La portée de la proposition a été modifiée @@ -154,18 +154,19 @@ fr-CA: amendments_wizard_help_text: Texte d'aide de l'assistant announcement: Annonce attachments_allowed: Autoriser les pièces jointes - can_accumulate_supports_beyond_threshold: Peut accumuler des supports au-delà du seuil + attachments_allowed_help: En activant cette option, les propositions seront en mode grille par défaut, et la première image liée à la proposition apparaîtra sur la carte. + can_accumulate_votes_beyond_threshold: Peut accumuler des votes au-delà du seuil collaborative_drafts_enabled: Brouillons collaboratifs activés comments_enabled: Activer le module de commentaire comments_max_length: Longueur maximum (en caractères) des commentaires (laisser 0 pour la valeur par défaut) default_sort_order: Tri des propositions par défaut - default_sort_order_help: Par défaut, si l’es aides sont activés, les propositions seront affichées par ordre aléatoire, et si les aides sont bloqués, alors ils seront triés par l’aide le plus soutenu. + default_sort_order_help: Automatique signifie que si les votes sont activés, les propositions seront affichées par ordre aléatoire, et si les votes sont bloqués, elles seront triées par ordre décroissant des votes. default_sort_order_options: - default: Défaut + automatic: Automatique most_commented: Les plus commentées most_endorsed: Les plus approuvées most_followed: Les plus suivies - most_voted: Les plus soutenues + most_voted: Les plus votées random: Aléatoire recent: Les plus récents with_more_authors: Avec le plus d'auteurs @@ -186,7 +187,7 @@ fr-CA: proposal_length: Nombre maximum de caractères du corps de la proposition proposal_limit: Limite de proposition par utilisateur proposal_wizard_step_1_help_text: Texte d'aide à l'étape "Créer" de la création de proposition - proposal_wizard_step_2_help_text: Texte d'aide à l'étape "Publier" de l'assistant de proposition + proposal_wizard_step_2_help_text: Texte d'aide à l'étape "Publier" de la création de proposition resources_permissions_enabled: Les autorisations d'actions peuvent être définies pour chaque proposition scope_id: Secteur scopes_enabled: Secteurs activés @@ -211,9 +212,9 @@ fr-CA: creation_enabled: Les participants peuvent créer des propositions creation_enabled_readonly: Ce paramètre est désactivé lorsque vous activez la fonctionnalité Textes participatifs. Pour télécharger des propositions sous forme de texte participatif, cliquez sur le bouton Textes participatifs et suivez les instructions. default_sort_order: Tri des propositions par défaut - default_sort_order_help: Par défaut, si les aides sont activés, les propositions seront affichées par ordre aléatoire, et si les aides sont bloqués, alors ils seront triés par l’aide le plus soutenu. + default_sort_order_help: Automatique signifie que si les votes sont activés, les propositions seront affichées par ordre aléatoire, et si les votes sont bloqués, elles seront triées par ordre décroissant des votes. default_sort_order_options: - default: Par défaut + automatic: Automatique most_commented: Les plus commentées most_endorsed: Les plus soutenues most_followed: Les plus suivies @@ -227,7 +228,7 @@ fr-CA: publish_answers_immediately: Publier immédiatement les réponses à la proposition publish_answers_immediately_help_html: "Notez que si vous répondez à une proposition sans que cette case soit activée, vous devrez publier la réponse manuellement en sélectionnant la proposition et en utilisant l'action de publication.\nPour plus d'informations sur le fonctionnement de cette action, voir la page de documentation sur les réponses aux propositions." suggested_hashtags: Hashtags suggérés aux utilisateurs pour de nouvelles propositions - votes_blocked: Bloquer les votes + votes_blocked: Votes bloqués votes_enabled: Activer le module de vote simple votes_hidden: Cacher les votes (si le module de votes est activé, le décompte des votes sera caché) events: @@ -318,7 +319,7 @@ fr-CA: voting_enabled: email_intro: 'Vous pouvez soutenir les propositions de %{participatory_space_title} ! Participez ici :' email_outro: Vous avez reçu cette notification car vous suivez %{participatory_space_title}. Vous pouvez arrêter de recevoir des notifications en suivant le lien précédent. - email_subject: Vous pouvez désormais voter les propositions dans %{participatory_space_title} + email_subject: Vous pouvez désormais voter pour les propositions dans %{participatory_space_title} notification_title: Vous pouvez maintenant commencer à voter pour les propositions de %{participatory_space_title} gamification: badges: @@ -336,14 +337,14 @@ fr-CA: proposal_votes: conditions: - Parcourir et passer du temps à lire les propositions d'autres personnes - - Soutenez les propositions que vous aimez ou trouvez intéressantes - description: Ce badge est attribué lorsque vous soutenez les propositions d'autres personnes. - description_another: Cet utilisateur a soutenu %{score} propositions. - description_own: Vous avez soutenu %{score} propositions. - name: Soutiens de proposition - next_level_in: Soutenir %{score} propositions supplémentaires pour atteindre le niveau supérieur! + - Votez pour les propositions que vous aimez ou trouvez intéressantes + description: Ce badge est attribué lorsque vous votez pour les propositions d'autres personnes. + description_another: Cet utilisateur a voté pour %{score} propositions. + description_own: Vous avez voté pour %{score} propositions. + name: Votes de proposition + next_level_in: Votez pour %{score} proposition(s) supplémentaire(s) pour atteindre le niveau supérieur ! unearned_another: Cet utilisateur n'a voté pour aucune proposition pour le moment. - unearned_own: Vous n'avez soutenu aucune proposition pour le moment. + unearned_own: Vous n'avez voté pour aucune proposition pour le moment. proposals: conditions: - Choisissez l'espace de participation qui vous intéresse avec la soumission des propositions activée @@ -369,7 +370,7 @@ fr-CA: object: propositions title: Propositions votes: - description: Nombre de votes générés dans les propositions par les utilisateurs + description: Nombre de votes sur des propositions object: votes title: Votes participatory_spaces: @@ -761,7 +762,7 @@ fr-CA: comment: Commentaire proposal_votes: create: - error: Des erreurs se sont produites lors du soutien de la proposition. + error: Il y a eu un problème lors du vote de la proposition. proposals: dynamic_map_instructions: description: Les coordonnées seront mises à jour en cliquant sur le bouton 'Aperçu'. Cependant, l'adresse ne change pas. @@ -800,6 +801,8 @@ fr-CA: count: one: "%{count} proposition" other: "%{count} propositions" + grid_mode: Vue grille + list_mode: Vue liste new_proposal: Nouvelle proposition see_all: Voir toutes les propositions see_all_withdrawn: Voir toutes les propositions retirées @@ -850,7 +853,7 @@ fr-CA: proposal_accepted_reason: 'Cette proposition a été retenue parce que :' proposal_in_evaluation_reason: Cette proposition est en cours d'évaluation proposal_rejected_reason: 'Cette proposition n''a pas été retenue parce que :' - withdraw_btn_hint: Si vous changez d'avis et tant que votre proposition n'a pas reçu de vote, commentaire et/ou soutien, vous pouvez toujours la retirer. Cette dernière ne sera pas supprimée mais elle apparaîtra dans la liste des propositions retirées. + withdraw_btn_hint: Si vous changez d'avis et tant que votre proposition n'a pas reçu de vote, vous pouvez toujours la retirer. Cette dernière ne sera pas supprimée, mais elle apparaîtra dans la liste des propositions retirées. withdraw_confirmation_html: Êtes-vous sûr de vouloir retirer cette proposition ?

    Cette action ne peut pas être annulée ! withdraw_proposal: Retirer la proposition update: @@ -860,27 +863,27 @@ fr-CA: already_voted_hover: Retirer le vote maximum_votes_reached: Nombre maximum de votes atteint no_votes_remaining: Aucun vote restant - vote: Voter + vote: Soutenir votes_blocked: Votes désactivés votes_count: count: - one: VOTE - other: VOTES + one: Vote + other: Votes voting_rules: - can_accumulate_supports_beyond_threshold: - description: Chaque proposition doit rassembler plus de %{limit} votes + can_accumulate_votes_beyond_threshold: + description: Chaque proposition peut accumuler plus de %{limit} votes minimum_votes_per_user: description: Vous devez répartir un minimum de %{votes} voix entre différentes propositions. given_enough_votes: Vous avez attribué suffisamment de votes. - supports_remaining: Vous devez voter %{remaining_votes} proposition supplémentaire pour que vos votes soient pris en compte. + votes_remaining: Vous devez voter pour %{remaining_votes} propositions supplémentaires pour que vos votes soient pris en compte. proposal_limit: description: Vous pouvez créer jusqu'à %{limit} propositions. threshold_per_proposal: description: Pour être acceptées, les propositions doivent atteindre %{limit} votes. - title: 'Le vote est soumis aux règles suivantes :' + title: 'Les votes sont soumis aux règles suivantes :' vote_limit: description: Vous pouvez voter pour %{limit} propositions au maximum. - votes: Votes + votes: '%{number} votes restants' wizard_aside: back: Retour back_from_step_1: Retour aux propositions @@ -909,7 +912,7 @@ fr-CA: title: Versions withdraw: errors: - has_supports: Cette proposition ne peut pas être retirée car elle comporte déjà des votes. + has_votes: Cette proposition ne peut pas être retirée, car elle a déjà reçu des votes. resource_links: copied_from_component: proposal_proposal: Propositions associées @@ -921,4 +924,4 @@ fr-CA: statistics: proposals_accepted: Propositions acceptées proposals_count: Propositions - supports_count: Votes + votes_count: Votes diff --git a/decidim-proposals/config/locales/fr.yml b/decidim-proposals/config/locales/fr.yml index 1a6f472e915c3..a782a1f0133b4 100644 --- a/decidim-proposals/config/locales/fr.yml +++ b/decidim-proposals/config/locales/fr.yml @@ -74,12 +74,12 @@ fr: attributes: base: not_official: Non officiels - supported: A reçu des votes ou des soutiens + voted: A reçu des votes ou des soutiens proposals_split: attributes: base: not_official: Non officiels - supported: A reçu des votes ou des soutiens + voted: A reçu des votes ou des soutiens models: decidim/proposals/admin/update_proposal_category_event: Catégorie de proposition modifiée decidim/proposals/admin/update_proposal_scope_event: La portée de la proposition a été modifiée @@ -154,14 +154,15 @@ fr: amendments_wizard_help_text: Texte d'aide de l'assistant announcement: Annonce attachments_allowed: Autoriser les pièces jointes - can_accumulate_supports_beyond_threshold: Peut accumuler des votes au-delà du seuil + attachments_allowed_help: En activant cette option, les propositions seront en mode grille par défaut, et la première image liée à la proposition apparaîtra sur la carte. + can_accumulate_votes_beyond_threshold: Peut accumuler des votes au-delà du seuil collaborative_drafts_enabled: Brouillons collaboratifs activés comments_enabled: Activer le module de commentaire comments_max_length: Longueur maximum (en caractères) des commentaires (laisser 0 pour la valeur par défaut) default_sort_order: Tri des propositions par défaut - default_sort_order_help: L'option par défaut signifie que si les votes sont activés, les propositions seront affichées par ordre aléatoire, et si les votes sont bloqués, alors elles seront triées par nombre de votes. + default_sort_order_help: Automatique signifie que si les votes sont activés, les propositions seront affichées par ordre aléatoire, et si les votes sont bloqués, elles seront triées par ordre décroissant des votes. default_sort_order_options: - default: Par défaut + automatic: Automatique most_commented: Les plus commentées most_endorsed: Les plus soutenues most_followed: Les plus suivies @@ -186,7 +187,7 @@ fr: proposal_length: Nombre maximum de caractères du corps de la proposition proposal_limit: Limite de proposition par utilisateur proposal_wizard_step_1_help_text: Texte d'aide à l'étape "Créer" de la création de proposition - proposal_wizard_step_2_help_text: Texte d'aide à l'étape "Publier" de l'assistant de proposition + proposal_wizard_step_2_help_text: Texte d'aide à l'étape "Publier" de la création de proposition resources_permissions_enabled: Les autorisations d'actions peuvent être définies pour chaque proposition scope_id: Secteur scopes_enabled: Secteurs activés @@ -211,9 +212,9 @@ fr: creation_enabled: Les participants peuvent créer des propositions creation_enabled_readonly: Ce paramètre est désactivé lorsque vous activez la fonctionnalité Textes participatifs. Pour télécharger des propositions sous forme de texte participatif, cliquez sur le bouton Textes participatifs et suivez les instructions. default_sort_order: Tri des propositions par défaut - default_sort_order_help: L'option par défaut signifie que si les votes sont activés, les propositions seront affichées par ordre aléatoire, et si les votes sont bloqués, alors elles seront triées par nombre de votes. + default_sort_order_help: Automatique signifie que si les votes sont activés, les propositions seront affichées par ordre aléatoire, et si les votes sont bloqués, elles seront triées par ordre décroissant des votes. default_sort_order_options: - default: Par défaut + automatic: Automatique most_commented: Les plus commentées most_endorsed: Les plus soutenues most_followed: Les plus suivies @@ -227,7 +228,7 @@ fr: publish_answers_immediately: Publier immédiatement les réponses à la proposition publish_answers_immediately_help_html: "Notez que si vous répondez à une proposition sans que cette case soit activée, vous devrez publier la réponse manuellement en sélectionnant la proposition et en utilisant l'action de publication.\nPour plus d'informations sur le fonctionnement de cette action, voir la page de documentation sur les réponses aux propositions." suggested_hashtags: Hashtags suggérés aux utilisateurs pour de nouvelles propositions - votes_blocked: Bloquer les votes + votes_blocked: Votes bloqués votes_enabled: Activer le module de vote simple votes_hidden: Cacher les votes (si le module de votes est activé, le décompte des votes sera caché) events: @@ -316,9 +317,9 @@ fr: email_subject: La portée de la proposition %{resource_title} a été mise à jour notification_title: La portée de la proposition %{resource_title} a été mise à jour par un administrateur. voting_enabled: - email_intro: 'Vous pouvez voter pour les propositions de %{participatory_space_title} ! Participez ici :' + email_intro: 'Vous pouvez soutenir les propositions de %{participatory_space_title} ! Participez ici :' email_outro: Vous avez reçu cette notification car vous suivez %{participatory_space_title}. Si vous souhaitez vous désabonner des notifications, connectez-vous à la plateforme, puis rendez-vous dans l'onglet “Mon compte” > “Paramètres des notifications”. - email_subject: Vous pouvez désormais voter les propositions dans %{participatory_space_title} + email_subject: Vous pouvez désormais voter pour les propositions dans %{participatory_space_title} notification_title: Vous pouvez maintenant commencer à voter pour les propositions de %{participatory_space_title} gamification: badges: @@ -369,7 +370,7 @@ fr: object: propositions title: Propositions votes: - description: Nombre de votes générés dans les propositions par les utilisateurs + description: Nombre de votes sur des propositions object: votes title: Votes participatory_spaces: @@ -761,7 +762,7 @@ fr: comment: Commentaire proposal_votes: create: - error: Des erreurs se sont produites lors du vote pour la proposition. + error: Il y a eu un problème lors du vote de la proposition. proposals: dynamic_map_instructions: description: Les coordonnées seront mises à jour en cliquant sur le bouton 'Aperçu'. Cependant, l'adresse ne change pas. @@ -800,6 +801,8 @@ fr: count: one: "%{count} proposition" other: "%{count} propositions" + grid_mode: Vue grille + list_mode: Vue liste new_proposal: Nouvelle proposition see_all: Voir toutes les propositions see_all_withdrawn: Voir toutes les propositions retirées @@ -850,7 +853,7 @@ fr: proposal_accepted_reason: 'Cette proposition a été retenue parce que :' proposal_in_evaluation_reason: Cette proposition est en cours d'évaluation proposal_rejected_reason: 'Cette proposition n''a pas été retenue parce que :' - withdraw_btn_hint: Si vous changez d'avis et tant que votre proposition n'a pas reçu de vote, commentaire et/ou soutien, vous pouvez toujours la retirer. Cette dernière ne sera pas supprimée mais elle apparaîtra dans la liste des propositions retirées. + withdraw_btn_hint: Si vous changez d'avis et tant que votre proposition n'a pas reçu de vote, vous pouvez toujours la retirer. Cette dernière ne sera pas supprimée, mais elle apparaîtra dans la liste des propositions retirées. withdraw_confirmation_html: Êtes-vous sûr de vouloir retirer cette proposition ?

    Cette action ne peut pas être annulée ! withdraw_proposal: Retirer la proposition update: @@ -860,24 +863,24 @@ fr: already_voted_hover: Retirer le vote maximum_votes_reached: Nombre maximum de votes atteint no_votes_remaining: Aucun vote restant - vote: Voter + vote: Soutenir votes_blocked: Votes désactivés votes_count: count: - one: VOTE - other: VOTES + one: Vote + other: Votes voting_rules: - can_accumulate_supports_beyond_threshold: - description: Chaque proposition doit rassembler plus de %{limit} votes + can_accumulate_votes_beyond_threshold: + description: Chaque proposition peut accumuler plus de %{limit} votes minimum_votes_per_user: description: Vous devez répartir un minimum de %{votes} voix entre différentes propositions. given_enough_votes: Vous avez attribué suffisamment de votes. - supports_remaining: Vous devez voter pour %{remaining_votes} proposition(s) supplémentaire(s) pour que vos votes soient pris en compte. + votes_remaining: Vous devez voter pour %{remaining_votes} propositions supplémentaires pour que vos votes soient pris en compte. proposal_limit: description: Vous pouvez créer jusqu'à %{limit} propositions. threshold_per_proposal: description: Pour être acceptées, les propositions doivent atteindre %{limit} votes. - title: 'La participation est soumise aux règles suivantes :' + title: 'Les votes sont soumis aux règles suivantes :' vote_limit: description: Vous pouvez voter pour %{limit} propositions au maximum. votes: '%{number} votes restants' @@ -909,7 +912,7 @@ fr: title: Versions withdraw: errors: - has_supports: Cette proposition ne peut pas être retirée car elle comporte déjà des votes. + has_votes: Cette proposition ne peut pas être retirée, car elle a déjà reçu des votes. resource_links: copied_from_component: proposal_proposal: Propositions associées @@ -921,4 +924,4 @@ fr: statistics: proposals_accepted: Propositions acceptées proposals_count: Propositions - supports_count: Votes + votes_count: Votes diff --git a/decidim-proposals/config/locales/ga-IE.yml b/decidim-proposals/config/locales/ga-IE.yml index a975adc5aa564..024233e9b276a 100644 --- a/decidim-proposals/config/locales/ga-IE.yml +++ b/decidim-proposals/config/locales/ga-IE.yml @@ -53,7 +53,6 @@ ga: comment: Tabhair Trácht create: Cruthaigh endorse: Formhuinigh - vote: Tacaigh le name: Moltaí settings: global: @@ -74,9 +73,6 @@ ga: proposals: object: moltaí title: Moltaí - votes: - object: tacaíochtaí - title: Tacaíochtaí proposals: actions: title: Gníomhartha @@ -215,11 +211,6 @@ ga: publish: Foilsigh show: answer: Freagra - vote_button: - vote: Tacaigh le - voting_rules: - vote_limit: - votes: Tacaíochtaí wizard_aside: back: Ar Ais versions: @@ -227,4 +218,4 @@ ga: title: Leaganacha statistics: proposals_count: Moltaí - supports_count: Tacaíochtaí + votes_count: Vótaí diff --git a/decidim-proposals/config/locales/gl.yml b/decidim-proposals/config/locales/gl.yml index 976b4c94bbd03..a949fcfdb59a9 100644 --- a/decidim-proposals/config/locales/gl.yml +++ b/decidim-proposals/config/locales/gl.yml @@ -56,12 +56,10 @@ gl: attributes: base: not_official: Non é oficial - supported: Recibiron soporte ou apoios proposals_split: attributes: base: not_official: Non é oficial - supported: Recibiron soporte ou apoios models: decidim/proposals/admin/update_proposal_category_event: Modificouse a categoría de proposta decidim/proposals/admin/update_proposal_scope_event: Mudouse o ámbito da proposta @@ -81,9 +79,6 @@ gl: decidim/proposals/proposal_note: one: Nota other: Notas - decidim/proposals/proposal_vote: - one: Vota - other: Votos decidim: admin: filters: @@ -113,7 +108,6 @@ gl: comment: Comentario create: Crear endorse: Endosar - vote: Vota vote_comment: Votar comentario withdraw: Retirar name: Propostas @@ -122,22 +116,17 @@ gl: amendments_enabled: Modificacións habilitadas announcement: Anuncio attachments_allowed: Permitir anexos - can_accumulate_supports_beyond_threshold: Pode acumular soportes máis aló do limiar collaborative_drafts_enabled: Esquemas colaborativos habilitados comments_enabled: Comentarios habilitados default_sort_order: Orde predefinido das propostas - default_sort_order_help: Predefinido significa que se os apoios están activos, as propostas amosaranse ordenadas ao chou e se están bloqueados, entón serán ordenados de máis a menos apoios. default_sort_order_options: - default: Predefinida most_commented: Máis comentadas most_endorsed: Máis apoios most_followed: Máis seguidas - most_voted: Máis apoios random: Ao chou recent: Máis recentes with_more_authors: Con máis autores geocoding_enabled: Geocoding habilitado - minimum_votes_per_user: Votos mínimos por usuario new_proposal_help_text: Nova proposta de axuda de texto official_proposals_enabled: Propostas oficiais habilitadas participatory_texts_enabled: Permitir textos participativos @@ -150,20 +139,16 @@ gl: scope_id: Ámbito scopes_enabled: Ámbitos habilitados threshold_per_proposal: Umbral por proposta - vote_limit: Límite de voto por usuario step: announcement: Anuncio automatic_hashtags: Hashtags engadido a todas as propostas comments_blocked: Comentarios bloqueados creation_enabled: Os participantes poden crear propostas default_sort_order: Orde predefinido das propostas - default_sort_order_help: Predefinido significa que se os apoios están activos, as propostas amosaranse ordenadas ao chou e se están bloqueados, entón serán ordenados de máis a menos apoios. default_sort_order_options: - default: Predefinida most_commented: Máis comentadas most_endorsed: Máis apoios most_followed: Máis seguidas - most_voted: Máis apoios random: Ao chou recent: Recentes with_more_authors: Con máis autores @@ -171,9 +156,8 @@ gl: endorsements_enabled: Aprobacións habilitadas proposal_answering_enabled: Contestando a proposta habilitada suggested_hashtags: Hashtags suxeriu aos usuarios novas propostas - votes_blocked: Voto bloqueado - votes_enabled: Votación habilitada - votes_hidden: Votos ocultos (se os votos están habilitados, a comprobación ocultará o número de votos) + votes_blocked: Votos bloqueados + votes_enabled: Votos habilitados events: proposals: collaborative_draft_access_accepted: @@ -223,10 +207,7 @@ gl: proposal_update_scope: email_outro: Recibiches esta notificación porque es o autor da proposta. voting_enabled: - email_intro: 'Podes votar propostas en %{participatory_space_title}. Comezar a participar nesta páxina:' email_outro: Recibiches esta notificación porque estás seguindo %{participatory_space_title}. Podes deixar de recibir notificacións seguindo a ligazón anterior. - email_subject: A votación das propostas comezou para %{participatory_space_title} - notification_title: Agora podes comezar propostas de voto en %{participatory_space_title} gamification: badges: accepted_proposals: @@ -243,13 +224,7 @@ gl: proposal_votes: conditions: - Busque e pase un tempo a ler as propostas doutras persoas - - Dea soporte ás propostas que che gustan ou que che resulten interesantes - description: Este distintivo concedeuse cando apoias as propostas doutras persoas. - description_another: Este usuario deu soporte a %{score} propostas. - description_own: Vostede deu apoio a %{score} propostas. - name: A proposta é compatible - next_level_in: Dea soporte a máis de %{score} propostas para alcanzar o seguinte nivel! - unearned_own: Xa deu soporte a ningunha proposta aínda. + - proposals: conditions: - Escolle o espazo de participación do teu interese coa presentación de propostas habilitadas @@ -273,10 +248,6 @@ gl: description: Número de propostas xeradas object: propostas title: Propostas - votes: - description: Número de votos xerados nas propostas dos usuarios - object: votos - title: Votos participatory_spaces: highlighted_proposals: see_all: Ver todos (%{count}) @@ -382,7 +353,6 @@ gl: related_meetings: Xuntanzas relacionadas remove_assignment_confirmation: Estás seguro de que desexas eliminar este avaliador/a da proposta? valuators: Avaliadores/as - votes_count: Reconto de votos proposals_imports: new: create: Propostas de importación @@ -539,9 +509,6 @@ gl: buttons: amend: Modificar comment: Comentario - proposal_votes: - create: - error: Houbo erros ao votar a proposta. proposals: dynamic_map_instructions: instructions: Podes mover o punto no mapa. @@ -570,7 +537,6 @@ gl: search: Busca state: Estado type: Tipo - voted: Votado index: click_here: Ver todas as propostas collaborative_drafts_list: Acceda a borradores colaborativos @@ -588,7 +554,6 @@ gl: most_commented: Máis comentadas most_endorsed: Con máis adhesións most_followed: Con máis seguidores - most_voted: A maioría votada random: Aleatorio recent: Recentes with_more_authors: Con máis autores @@ -614,31 +579,10 @@ gl: proposal_accepted_reason: 'Esta proposta foi aceptada porque:' proposal_in_evaluation_reason: Esta proposta está a ser avaliada proposal_rejected_reason: 'Esta proposta foi rexeitada porque:' - withdraw_btn_hint: Pode retirar a súa proposta se cambia de opinión, sempre que non teña recibido ningún apoio. A proposta non se elimina, aparecerá na lista de propostas retiradas. withdraw_proposal: Retire a proposta - vote_button: - already_voted: Xa votou - already_voted_hover: Unvocar - maximum_votes_reached: Límite de voto alcanzado - no_votes_remaining: Non hai votos restantes - vote: Vota - votes_blocked: Votación desactivada - votes_count: - count: - one: VOTAR - other: VOTOS voting_rules: - can_accumulate_supports_beyond_threshold: - description: Cada proposta pode acumular máis de %{limit} apoios - minimum_votes_per_user: - description: Debes distribuír un mínimo de %{votes} votos entre diferentes propostas. - supports_remaining: Tes que votar máis %{remaining_votes} propostas para que os teus votos sexan tidos en conta. proposal_limit: description: Podes crear ata %{limit} propostas. - title: 'A votación está suxeita ás seguintes regras:' - vote_limit: - description: Podes votar ata %{limit} propostas. - votes: Votos wizard_aside: back: De volta wizard_steps: @@ -666,4 +610,4 @@ gl: statistics: proposals_accepted: Propostas aceptadas proposals_count: Propostas - supports_count: Apoios + votes_count: Votos diff --git a/decidim-proposals/config/locales/hu.yml b/decidim-proposals/config/locales/hu.yml index d8492907d88ff..9f99873576b62 100644 --- a/decidim-proposals/config/locales/hu.yml +++ b/decidim-proposals/config/locales/hu.yml @@ -68,7 +68,7 @@ hu: one: Megjegyzés other: Megjegyzések decidim/proposals/proposal_vote: - one: Támogatás + one: Szavazás other: Szavazások decidim: admin: @@ -108,7 +108,7 @@ hu: amend: Módosítás create: Létrehozás endorse: Támogatás - vote: Támogatás + vote: Szavazás withdraw: Visszalépés name: Javaslatok settings: @@ -118,15 +118,13 @@ hu: amendments_wizard_help_text: Módosítások Varázsló súgószöveg announcement: Közlemény attachments_allowed: Mellékletek engedélyezése - can_accumulate_supports_beyond_threshold: Képes átlépni a támogatás küszöb-értékét collaborative_drafts_enabled: Közös vázlatok engedélyezve comments_enabled: Megjegyzések engedélyezve default_sort_order: Alapértelmezett javaslat rendezés - default_sort_order_help: Az alapértelmezett azt jelenti, hogy ha a támogatások engedélyezettek, a javaslatok véletlenszerűség szerint rendezve fog megjelenni, és ha a támogatások blokkolva vannak, akkor a leginkább támogatottak szerint lesznek rendezve. default_sort_order_options: most_endorsed: Legtámogatottabb geocoding_enabled: Geokódolás engedélyezve - minimum_votes_per_user: Minimális támogatás felhasználónként + minimum_votes_per_user: Minimális szavazatok felhasználónként new_proposal_body_template: Új javaslat szövegtörzse new_proposal_body_template_help: Előre meghatározott szöveg beállítása, amelyet az új Javaslatok használnak new_proposal_help_text: Új javaslat súgószöveg @@ -144,7 +142,6 @@ hu: proposal_wizard_step_1_help_text: Javaslat varázsló "Létrehozás" gomb súgójának szövege resources_permissions_enabled: Egyes javaslatokhoz műveleti engedélyeket állíthatsz be threshold_per_proposal: Küszöbérték javaslatonként - vote_limit: Támogatási limit felhasználónként step: amendment_creation_enabled: A módosítás létrehozása engedélyezett amendment_creation_enabled_help: A résztvevő módosíthatja a javaslatokat. @@ -164,7 +161,6 @@ hu: creation_enabled: A résztvevők létrehozhatnak javaslatokat creation_enabled_readonly: Ez a beállítás le van tiltva, ha aktiválja a Részvételi Szövegek funkciót. A javaslatok részvételi szövegekként való feltöltéséhez kattintson a Részvételi Szövegek gombra és kövesse az utasításokat. default_sort_order: Alapértelmezett javaslat rendezés - default_sort_order_help: Az alapértelmezett azt jelenti, hogy ha a támogatások engedélyezettek, a javaslatok véletlenszerűség szerint rendezve fog megjelenni, és ha a támogatások blokkolva vannak, akkor a leginkább támogatottak szerint lesznek rendezve. default_sort_order_options: most_endorsed: Legtámogatottabb endorsements_blocked: Jóváhagyások letiltva @@ -173,8 +169,8 @@ hu: publish_answers_immediately: Javaslati válaszok azonnali közzététele publish_answers_immediately_help_html: 'Ne feledje, hogy ennek engedélyezése nélkül bármely javaslatot, kiválasztva őket, a művelet használatával manuálisan kell közzétennie. További információért arról, hogyan működik ez, lásd proposals'' answers documentation page.' suggested_hashtags: Hashtagek javasolva a felhasználóknak új javaslatokra - votes_blocked: Szavazás letiltva - votes_enabled: Szavazás engedélyezve + votes_blocked: Szavazások letiltva + votes_enabled: Szavazások engedélyezve votes_hidden: Szavazatok elrejtése (ha a szavazás engedélyezett, ez elrejti a szavazatok számát) events: proposals: @@ -241,7 +237,6 @@ hu: voting_enabled: email_intro: 'Szavazhatsz a javaslatokról itt: %{participatory_space_title}! Láss munkának ezen az oldalon:' email_outro: 'Ezt az értesítést azért kaptad, mert ezt követed: "%{participatory_space_title}". Az értesítéseket a következő linkre kattintva kapcsolhatod ki.' - email_subject: 'Javaslatokról való szavazás kezdődött itt: %{participatory_space_title}' notification_title: 'Mostantól tehetsz szavazási javaslatokat ehhez: %{participatory_space_title}' gamification: badges: @@ -259,14 +254,7 @@ hu: proposal_votes: conditions: - Böngésszen és töltsön el egy ideig mások javaslatainak olvasását - - Támogatja a kedvelt javaslatokat, vagy érdekesnek találja azokat - description: Ezt a jelvényt akkor kapja meg, ha más emberek javaslatait támogatja. - description_another: A felhasználó %{score} javaslatot támogatott. - description_own: Eddig %{score} javaslatot támogattál. - name: Javaslat támogatói - next_level_in: Támogatja a %{score} további javaslatot a következő szint eléréséhez! - unearned_another: A felhasználó még nem támogatott egy javaslatot sem. - unearned_own: Még nem támogattál egyetlen javaslatot sem. + - proposals: conditions: - Válassza ki az Ön érdeklődési körének részvételi területét a beküldött pályázati ajánlatokkal @@ -292,9 +280,8 @@ hu: object: javaslatok title: javaslatok votes: - description: A felhasználók által benyújtott szavazatok száma - object: szavazatok - title: Szavazatok + object: szavazat + title: szavazatok participatory_spaces: highlighted_proposals: last: Legutóbbi javaslatok @@ -439,7 +426,6 @@ hu: remove_assignment: Hozzárendelés eltávolítsa remove_assignment_confirmation: Biztosan eltávolítja az értékelőt ebből a javaslatból? valuators: Értékelők - votes_count: Támogatók száma update_category: invalid: 'Ezeknek a javaslatoknak már megvolt a(z) %{subject_name} kategóriája: %{proposals}.' select_a_proposal: Kérjük, válasszon egy javaslatot. @@ -609,9 +595,6 @@ hu: buttons: amend: Módosítás comment: Megjegyzés - proposal_votes: - create: - error: Hiba történt a javaslatra való szavazás során. proposals: edit: add_documents: Dokumentum hozzáadása @@ -683,31 +666,18 @@ hu: proposal_accepted_reason: 'Ezt a javaslatot elfogadták, mert:' proposal_in_evaluation_reason: Javaslat értékelése folyamatban proposal_rejected_reason: 'Ezt a javaslatot elutasították, mert:' - withdraw_btn_hint: Ha meggondoltad magad, az első támogatás megszerzéséig bármikor visszavonhatod a javaslatod. A javaslat nem törlődik automatikusan, hanem a visszavont javaslatok listájára kerül. withdraw_proposal: Javaslat visszavonása vote_button: already_voted: Már szavazott - already_voted_hover: Szavazat visszavonása maximum_votes_reached: Szavazási határon túl no_votes_remaining: Nincs több szavazat vote: Szavazás votes_blocked: Szavazás letiltva - votes_count: - count: - one: SZAVAZAT - other: SZAVAZATOK voting_rules: - can_accumulate_supports_beyond_threshold: - description: Az egyes javaslatok több mint %{limit} támogatást szerezhetnek - minimum_votes_per_user: - description: A különböző javaslatok között legalább %{votes} szavazatot kell elosztania. - supports_remaining: Meg kell szavaznod %{remaining_votes} további javaslatot hogy a szavazataid figyelembe vételre kerüljenek. proposal_limit: description: Legfeljebb %{limit} javaslatot készíthetsz. - title: 'A szavazásra ezen szabályok vonatkoznak:' vote_limit: description: Legfeljebb %{limit} javaslatról szavazhatsz. - votes: Szavazatok wizard_aside: back: Vissza wizard_steps: @@ -739,3 +709,4 @@ hu: proposal_result: 'Az eredményekben megjelenő javaslat:' statistics: proposals_count: Javaslatok + votes_count: Szavazások diff --git a/decidim-proposals/config/locales/id-ID.yml b/decidim-proposals/config/locales/id-ID.yml index 868b057662e23..c337d3e51425a 100644 --- a/decidim-proposals/config/locales/id-ID.yml +++ b/decidim-proposals/config/locales/id-ID.yml @@ -56,15 +56,12 @@ id: other: Proposal decidim/proposals/proposal_note: other: Catatan - decidim/proposals/proposal_vote: - other: Suara decidim: components: proposals: actions: create: Membuat endorse: Mengesahkan - vote: Memilih withdraw: Menarik name: Proposal settings: @@ -72,11 +69,9 @@ id: amendments_enabled: Amandemen diaktifkan announcement: Pengumuman attachments_allowed: Izinkan lampiran - can_accumulate_supports_beyond_threshold: Dapat mengumpulkan dukungan di luar ambang batas collaborative_drafts_enabled: Draf kolaboratif diaktifkan comments_enabled: Komentar diaktifkan geocoding_enabled: Geocoding diaktifkan - minimum_votes_per_user: Suara minimum per pengguna new_proposal_help_text: Teks bantuan proposal baru official_proposals_enabled: Proposal resmi diaktifkan participatory_texts_enabled: Teks partisipatif diaktifkan @@ -87,7 +82,6 @@ id: proposal_wizard_step_1_help_text: Panduan proposal "Buat" teks bantuan langkah resources_permissions_enabled: Izin tindakan dapat diatur untuk setiap proposal threshold_per_proposal: Ambang batas per proposal - vote_limit: Batas suara per pengguna step: announcement: Pengumuman automatic_hashtags: Hashtag ditambahkan ke semua proposal @@ -96,9 +90,6 @@ id: endorsements_enabled: Pengesahan diaktifkan proposal_answering_enabled: Pengangkatan proposal diaktifkan suggested_hashtags: Hashtag disarankan kepada pengguna untuk proposal baru - votes_blocked: Voting diblokir - votes_enabled: Voting diaktifkan - votes_hidden: Memberi suara tersembunyi (jika suara diaktifkan, memeriksa ini akan menyembunyikan jumlah suara) events: proposals: collaborative_draft_access_accepted: @@ -148,10 +139,7 @@ id: proposal_update_scope: email_outro: Anda telah menerima pemberitahuan ini karena Anda adalah penulis proposal. voting_enabled: - email_intro: 'Anda dapat memilih proposal dalam %{participatory_space_title}! Mulai berpartisipasi di halaman ini:' email_outro: Anda telah menerima pemberitahuan ini karena Anda mengikuti %{participatory_space_title}. Anda dapat berhenti menerima notifikasi mengikuti tautan sebelumnya. - email_subject: Proposal voting telah dimulai untuk %{participatory_space_title} - notification_title: Anda sekarang dapat memulai proposal voting dalam %{participatory_space_title} gamification: badges: accepted_proposals: @@ -168,13 +156,7 @@ id: proposal_votes: conditions: - Jelajahi dan habiskan waktu untuk membaca proposal orang lain - - Berikan dukungan pada proposal yang Anda sukai atau temukan menarik - description: Lencana ini diberikan saat Anda mendukung proposal orang lain. - description_another: Pengguna ini telah memberikan dukungan untuk %{score} proposal. - description_own: Anda telah memberikan dukungan untuk %{score} proposal. - name: Dukungan proposal - next_level_in: Berikan dukungan untuk %{score} lebih banyak proposal untuk mencapai level berikutnya! - unearned_own: Anda telah memberi dukungan untuk belum ada proposal. + - proposals: conditions: - Pilih ruang partisipasi yang Anda minati dengan penyerahan agar proposal diaktifkan @@ -198,10 +180,6 @@ id: description: Jumlah proposal yang dihasilkan object: proposal title: Proposal - votes: - description: Jumlah suara yang dihasilkan dalam proposal oleh pengguna - object: suara - title: Suara participatory_spaces: highlighted_proposals: see_all: Lihat semua (%{count}) @@ -284,7 +262,6 @@ id: title: Buat proposal show: body: Tubuh - votes_count: Suara menghitung proposals_imports: new: create: Mengimpor proposal @@ -431,9 +408,6 @@ id: buttons: amend: Merubah comment: Komentar - proposal_votes: - create: - error: Ada kesalahan saat memilih proposal. proposals: edit: attachment_legend: "(Opsional) Tambahkan lampiran" @@ -455,7 +429,6 @@ id: search: Pencarian state: Negara type: Mengetik - voted: Dipilih index: collaborative_drafts_list: Akses draf kolaboratif count: @@ -466,7 +439,6 @@ id: send: Terus orders: label: 'Memesan proposal dengan:' - most_voted: Sebagian besar memilih random: Acak recent: Baru preview: @@ -485,30 +457,10 @@ id: proposal_accepted_reason: 'Proposal ini telah diterima karena:' proposal_in_evaluation_reason: Proposal ini sedang dievaluasi proposal_rejected_reason: 'Proposal ini telah ditolak karena:' - withdraw_btn_hint: Anda dapat menarik proposal Anda jika Anda berubah pikiran, selama Anda belum menerima dukungan apa pun. Proposal tidak dihapus, itu akan muncul dalam daftar proposal yang ditarik. withdraw_proposal: Tarik proposal - vote_button: - already_voted: Sudah memilih - already_voted_hover: Batalkan suara - maximum_votes_reached: Batas suara tercapai - no_votes_remaining: Tidak ada suara yang tersisa - vote: Memilih - votes_blocked: Voting dinonaktifkan - votes_count: - count: - other: SUARA voting_rules: - can_accumulate_supports_beyond_threshold: - description: Setiap proposal dapat mengumpulkan lebih dari %{limit} dukungan - minimum_votes_per_user: - description: Anda harus mendistribusikan minimal %{votes} suara di antara proposal yang berbeda. - supports_remaining: Anda harus memilih %{remaining_votes} proposal lagi agar suara Anda dipertimbangkan. proposal_limit: description: Anda dapat membuat hingga %{limit} proposal. - title: 'Voting tunduk pada aturan berikut:' - vote_limit: - description: Anda dapat memilih hingga %{limit} proposal. - votes: Suara wizard_aside: back: Kembali wizard_steps: diff --git a/decidim-proposals/config/locales/is-IS.yml b/decidim-proposals/config/locales/is-IS.yml index 1e8676fe0761b..0486e39d7ad06 100644 --- a/decidim-proposals/config/locales/is-IS.yml +++ b/decidim-proposals/config/locales/is-IS.yml @@ -26,7 +26,6 @@ is-IS: global: announcement: Tilkynning attachments_allowed: Leyfa viðhengi - can_accumulate_supports_beyond_threshold: Getur safnað stuðning fyrirfram þröskuld comments_enabled: Athugasemdir virkt geocoding_enabled: Geocoding virkt new_proposal_help_text: Ný tillaga hjálpartexta @@ -175,11 +174,8 @@ is-IS: proposal_accepted_reason: 'Þessi tillaga hefur verið samþykkt vegna þess að:' proposal_in_evaluation_reason: Þessi tillaga er metin proposal_rejected_reason: 'Þessi tillaga hefur verið hafnað vegna þess að:' - withdraw_btn_hint: Þú getur afturkallað tillöguna þína ef þú skiptir um skoðun, svo lengi sem þú hefur ekki fengið stuðning. Tillagan er ekki eytt, hún mun birtast á lista yfir afturkallað tillögur. withdraw_proposal: Afturkalla tillögu voting_rules: - can_accumulate_supports_beyond_threshold: - description: Hver tillaga getur safnast meira en %{limit} styður proposal_limit: description: Þú getur búið til allt að %{limit} tillögur. wizard_aside: diff --git a/decidim-proposals/config/locales/it.yml b/decidim-proposals/config/locales/it.yml index 84a259203fd7a..bbae6bef5fc01 100644 --- a/decidim-proposals/config/locales/it.yml +++ b/decidim-proposals/config/locales/it.yml @@ -79,9 +79,6 @@ it: decidim/proposals/proposal_note: one: Nota other: Gli appunti - decidim/proposals/proposal_vote: - one: Supporto - other: Supporti decidim: admin: filters: @@ -115,7 +112,6 @@ it: comment: Commento create: Crea endorse: Sostieni - vote: Vota vote_comment: Vota per il commento withdraw: Ritirare name: Proposte @@ -126,7 +122,6 @@ it: amendments_wizard_help_text: Creazione guidata emendamenti announcement: Annuncio attachments_allowed: Consenti allegati - can_accumulate_supports_beyond_threshold: Può accumulare supporti oltre la soglia collaborative_drafts_enabled: Bozze collaborative abilitate comments_enabled: Commenti abilitati comments_max_length: Lunghezza massima dei commenti (Lasciare 0 per il valore predefinito) @@ -134,7 +129,6 @@ it: random: Casuale recent: Recenti geocoding_enabled: Geocoding abilitato - minimum_votes_per_user: Voti minimi per utente new_proposal_body_template: Nuovo modello di testo della proposta new_proposal_body_template_help: È possibile definire un testo precompilato che le nuove proposte avranno new_proposal_help_text: Nuovo testo di aiuto per la proposta @@ -154,7 +148,6 @@ it: scope_id: Ambito scopes_enabled: Ambiti abilitati threshold_per_proposal: Voti necessari per l'approvazione della proposta - vote_limit: Limite di voto per utente step: amendment_creation_enabled: Creazione di emendamenti abilitata amendment_creation_enabled_help: I partecipanti possono modificare le proposte. @@ -177,9 +170,8 @@ it: proposal_answering_enabled: Risposta alla proposta abilitata publish_answers_immediately: Pubblica immediatamente le risposte proposte suggested_hashtags: Gli hashtag hanno suggerito agli utenti nuove proposte - votes_blocked: Votazione bloccata - votes_enabled: Voto abilitato - votes_hidden: Voti nascosti (se i voti sono abilitati, controllando questo si nasconderà il numero di voti) + votes_blocked: Voti bloccati + votes_enabled: Voti abilitati events: proposals: admin: @@ -237,10 +229,7 @@ it: email_subject: L'ambito della proposta %{resource_title} è stato aggiornato notification_title: L'ambito della proposta %{resource_title} è stato aggiornato da un amministratore. voting_enabled: - email_intro: 'Puoi votare le proposte in %{participatory_space_title}! Inizia a partecipare a questa pagina:' email_outro: Hai ricevuto questa notifica perché stai seguendo %{participatory_space_title}. È possibile interrompere la ricezione di notifiche facendo clich su pulsante Smetti di seguire nella pagina del processo o del contenuto che stai seguendo. - email_subject: Il voto delle proposte è iniziato per %{participatory_space_title} - notification_title: Ora puoi iniziare proposte di voto in %{participatory_space_title} gamification: badges: accepted_proposals: @@ -257,13 +246,7 @@ it: proposal_votes: conditions: - Naviga e passa un po 'di tempo a leggere le proposte di altre persone - - Dare supporto alle proposte che ti piacciono o che ti interessano - description: Questo badge è concesso quando supporti le proposte di altre persone. - description_another: Questo utente ha fornito supporto a %{score} proposte. - description_own: Hai dato supporto a %{score} proposte. - name: Supporti della proposta - next_level_in: Dare supporto a %{score} ulteriori proposte per raggiungere il livello successivo! - unearned_own: Hai dato supporto a proposte. + - proposals: conditions: - Scegli lo spazio di partecipazione di tuo interesse con l'invio per le proposte abilitate @@ -287,10 +270,6 @@ it: description: Numero di proposte generate object: proposte title: proposte - votes: - description: Numero di voti generati nelle proposte degli utenti - object: voti - title: Voti participatory_spaces: highlighted_proposals: see_all: Vedi tutto (%{count}) @@ -401,7 +380,6 @@ it: remove_assignment: Rimuovi assegnazione remove_assignment_confirmation: Sei sicuro di voler rimuovere il valutatore da questa proposta? valuators: Valutatori - votes_count: Contare i voti update_category: invalid: 'Queste proposte avevano già la categoria %{subject_name} %{proposals}.' success: 'Proposte aggiornate con successo alla categoria %{subject_name}: %{proposals}.' @@ -566,9 +544,6 @@ it: buttons: amend: emendare comment: Commento - proposal_votes: - create: - error: Ci sono stati errori durante la votazione della proposta. proposals: dynamic_map_instructions: description: Le coordinate verranno aggiornate quando si fa clic sul pulsante 'Anteprima'. Tuttavia, l'indirizzo non cambia. @@ -643,34 +618,19 @@ it: proposal_accepted_reason: 'Questa proposta è stata accettata perché:' proposal_in_evaluation_reason: Questa proposta è in fase di valutazione proposal_rejected_reason: 'Questa proposta è stata rifiutata perché:' - withdraw_btn_hint: Puoi ritirare la tua proposta se cambi idea, purché non abbia ricevuto alcun supporto. La proposta non viene cancellata, apparirà nell'elenco delle proposte ritirate. withdraw_confirmation_html: Sei sicuro di voler ritirare questa proposta?

    Questa azione non può essere annullata! withdraw_proposal: Ritirare la proposta update: title: Aggiorna proposta vote_button: already_voted: Già votata - already_voted_hover: Ritira il supporto maximum_votes_reached: Hai raggiunto il limite di voti no_votes_remaining: Sono finite le votazioni possibili - vote: Vota + vote: Votazione votes_blocked: Votazioni disabilitate - votes_count: - count: - one: VOTO - other: VOTI voting_rules: - can_accumulate_supports_beyond_threshold: - description: Ogni proposta può accumulare più di %{limit} supporti - minimum_votes_per_user: - description: Devi distribuire un minimo di %{votes} voti tra diverse proposte. - supports_remaining: Devi votare %{remaining_votes} altre proposte per i tuoi voti da prendere in considerazione. proposal_limit: description: Puoi creare fino a %{limit} proposte. - title: 'Il voto è soggetto alle seguenti regole:' - vote_limit: - description: Puoi votare fino a %{limit} proposte. - votes: Voti wizard_aside: back: Indietro back_from_step_1: Torna alle proposte @@ -705,4 +665,4 @@ it: statistics: proposals_accepted: Proposte accettate proposals_count: Proposte - supports_count: Sostegni + votes_count: Voti diff --git a/decidim-proposals/config/locales/ja.yml b/decidim-proposals/config/locales/ja.yml index e5c40c3663576..577be8fbcddaf 100644 --- a/decidim-proposals/config/locales/ja.yml +++ b/decidim-proposals/config/locales/ja.yml @@ -74,12 +74,12 @@ ja: attributes: base: not_official: 公式ではありません - supported: サポートまたはオススメを受けました + voted: 投票またはオススメを受けました proposals_split: attributes: base: not_official: 公式ではありません - supported: サポートまたはオススメを受けました + voted: 投票またはオススメを受けました models: decidim/proposals/admin/update_proposal_category_event: 提案カテゴリが変更されました decidim/proposals/admin/update_proposal_scope_event: 提案範囲が変更されました @@ -97,7 +97,7 @@ ja: decidim/proposals/proposal_note: other: メモ decidim/proposals/proposal_vote: - other: サポート + other: 投票 decidim: admin: filters: @@ -139,7 +139,7 @@ ja: comment: コメント create: 作成 endorse: オススメする - vote: サポート + vote: 投票 vote_comment: コメントに投票 withdraw: 撤回する name: 提案 @@ -150,23 +150,24 @@ ja: amendments_wizard_help_text: 修正ウィザードのヘルプテキスト announcement: お知らせ attachments_allowed: 添付ファイルを許可 - can_accumulate_supports_beyond_threshold: しきい値を超えてサポートを蓄積可能 + attachments_allowed_help: このオプションを有効にすると、提案はデフォルトでグリッドモードになり、最初の画像がカードに表示されるようになります。 + can_accumulate_votes_beyond_threshold: しきい値以上の票を集めることができます collaborative_drafts_enabled: 共同草稿を有効にする comments_enabled: コメントを有効にする comments_max_length: コメント最大長 (デフォルト値は 0 のまま) default_sort_order: デフォルトの提案の並べ替え - default_sort_order_help: デフォルトは、サポートが有効な場合、提案がランダムでソートされることを意味します。サポートがブロックされている場合は、最もサポートされている順にソートされます。 + default_sort_order_help: '「自動」にすると、投票が有効になっている間、提案はランダムにソートされます。 投票がブロックされると、最も投票数が多い順に並べられます' default_sort_order_options: - default: デフォルト + automatic: 自動 most_commented: コメントの多い順 most_endorsed: オススメの多い順 most_followed: フォローの多い順 - most_voted: サポートの多い順 + most_voted: 得票数順 random: ランダム recent: 新しい順 with_more_authors: 起案者の多い順 geocoding_enabled: ジオコーディングが有効 - minimum_votes_per_user: 参加者一人あたりの最低サポート数 + minimum_votes_per_user: ユーザーあたりの最小投票数 new_proposal_body_template: 新しい提案本文テンプレート new_proposal_body_template_help: 新しい提案に含まれる予定のテキストを定義することができます。 new_proposal_help_text: 新しい提案ヘルプテキスト @@ -187,7 +188,7 @@ ja: scope_id: スコープ scopes_enabled: スコープが有効 threshold_per_proposal: 提案ごとのしきい値 - vote_limit: 参加者一人あたりのサポート数制限 + vote_limit: 参加者ごとの投票制限 step: amendment_creation_enabled: 修正の作成は有効です amendment_creation_enabled_help: 参加者は提案を修正できます。 @@ -207,13 +208,13 @@ ja: creation_enabled: 参加者は提案を作成できます creation_enabled_readonly: 参加テキスト機能を有効にするとこの設定は無効になります。 参加テキストとして提案をアップロードするには、参加テキストボタンをクリックし、指示に従ってください。 default_sort_order: デフォルトの提案の並べ替え - default_sort_order_help: デフォルトは、サポートが有効な場合、提案がランダムでソートされることを意味します。サポートがブロックされている場合は、最もサポートされている順にソートされます。 + default_sort_order_help: '「自動」にすると、投票が有効になっている間、提案はランダムにソートされます。 投票がブロックされると、最も投票数が多い順に並べられます' default_sort_order_options: - default: デフォルト + automatic: 自動 most_commented: コメントの多い順 most_endorsed: オススメの多い順 most_followed: フォローの多い順 - most_voted: サポートの多い順 + most_voted: 得票数順 random: ランダム recent: 新しい順 with_more_authors: 起案者の多い順 @@ -223,9 +224,9 @@ ja: publish_answers_immediately: 提案の回答をすぐに公開 publish_answers_immediately_help_html: 'これを有効にせずに提案に回答する場合、選択して公開アクションを使用して、手動で公開する必要があります。これがどのように機能するかの詳細については、提案の回答に関するドキュメントページを参照してください。' suggested_hashtags: 提案作成時に参加者に提案するハッシュタグ - votes_blocked: サポートをブロック - votes_enabled: サポートを有効にする - votes_hidden: サポート非表示(サポートが有効な場合、チェックを入れるとサポート数が非表示になります) + votes_blocked: 投票をブロックしました + votes_enabled: 投票を有効にしました + votes_hidden: 投票を非表示にしました (投票が有効な場合、チェックを入れると投票数が非表示になります) events: proposals: admin: @@ -312,10 +313,10 @@ ja: email_subject: '%{resource_title} の提案範囲が更新されました' notification_title: %{resource_title} の提案スコープが管理者によって更新されました。 voting_enabled: - email_intro: 'あなたは %{participatory_space_title}で提案をサポートすることができます! このページに参加してください:' + email_intro: 'あなたは %{participatory_space_title} で提案に投票することができます! このページへの参加を開始します:' email_outro: '%{participatory_space_title}をフォローしているため、この通知を受け取りました。前のリンクに続く通知の受信を停止することができます。' - email_subject: '%{participatory_space_title} の提案サポートが開始されました' - notification_title: supporting proposition in %{participatory_space_title} + email_subject: '%{participatory_space_title} の提案の投票が開始されました' + notification_title: 提案の投票%{participatory_space_title} で開始されました gamification: badges: accepted_proposals: @@ -332,14 +333,14 @@ ja: proposal_votes: conditions: - 閲覧し、他の人の提案を読んでいくつかの時間を過ごします - - あなたが好きな提案をサポートするか、興味深いものを見つけましょう - description: このバッジは、あなたが他の人の提案を支持するときに付与されます。 - description_another: この参加者は %{score} の提案をサポートしています。 - description_own: '%{score} の提案をサポートしました。' - name: 提案サポート - next_level_in: さらに %{score} の提案をサポートして次のレベルに到達しましょう! - unearned_another: この参加者はまだどの提案にもサポートしていません。 - unearned_own: まだ提案がありません。 + - 気に入った提案に投票するか、興味深いものを見つけてください + description: このバッジは、他の人の提案に投票するときに付与されます。 + description_another: この参加者は %{score} の提案に投票しました。 + description_own: '%{score} の提案に投票しました。' + name: 提案の投票 + next_level_in: 次のレベルに到達するには、 %{score} の提案に投票してください! + unearned_another: この参加者はまだどの提案にも投票していません。 + unearned_own: あなたはまだ提案に投票していません。 proposals: conditions: - 提出物を有効にして、興味のある参加スペースを選択してください @@ -365,9 +366,9 @@ ja: object: 提案 title: 提案 votes: - description: 提案へのサポート数 - object: サポート - title: サポート + description: 提案への投票数 + object: 投票 + title: 投票 participatory_spaces: highlighted_proposals: last: 最近の提案 @@ -547,7 +548,7 @@ ja: remove_assignment: 課題を削除 remove_assignment_confirmation: この提案から評価者を削除してもよろしいですか? valuators: 評価者 - votes_count: サポート数 + votes_count: 投票数 update_category: invalid: 'これらの提案は既に %{subject_name} カテゴリ: %{proposals} を持っています。' select_a_category: カテゴリを選択してください。 @@ -752,7 +753,7 @@ ja: comment: コメント proposal_votes: create: - error: その提案を支持するのに問題があった。 + error: 提案への投票中に問題が発生しました。 proposals: dynamic_map_instructions: description: '「プレビュー」ボタンをクリックすると座標が更新されますが、アドレスは変更されません。' @@ -784,12 +785,14 @@ ja: search: 検索 state: ステータス type: タイプ - voted: サポート + voted: 投票 index: click_here: すべての提案を見る collaborative_drafts_list: 共同草案にアクセスする count: other: "%{count} の提案" + grid_mode: グリッドモード + list_mode: リストモード new_proposal: 新しい提案 see_all: すべての提案を見る see_all_withdrawn: すべての撤回された提案を見る @@ -802,7 +805,7 @@ ja: most_commented: コメントの多い順 most_endorsed: オススメの多い順 most_followed: フォローの多い順 - most_voted: サポートの多い順 + most_voted: 得票数順 random: ランダム recent: 新しい順 with_more_authors: 起案者の多い順 @@ -838,36 +841,36 @@ ja: proposal_accepted_reason: 'この提案は以下の理由により承認されました:' proposal_in_evaluation_reason: この提案は評価されています proposal_rejected_reason: 'この提案は以下の理由により拒否されました:' - withdraw_btn_hint: サポートを受けていない限り、気が変わった場合は提案を撤回することができます。 提案は削除されず、撤回された提案のリストに表示されます。 + withdraw_btn_hint: 投票を受けていない限り、提案を取り消すことができます。 提案は削除されず、撤回された提案のリストに表示されます。 withdraw_confirmation_html: この提案を撤回してもよろしいですか?

    この操作はキャンセルできません! withdraw_proposal: 提案を撤回する update: title: 提案を更新 vote_button: - already_voted: サポート済みです - already_voted_hover: サポートを撤回する - maximum_votes_reached: サポートの上限に達しました - no_votes_remaining: サポートがありません - vote: サポート - votes_blocked: サポートは無効です + already_voted: すでに投票済みです + already_voted_hover: 投票を撤回する + maximum_votes_reached: 投票上限に達しました + no_votes_remaining: 残りの投票はありません + vote: 投票 + votes_blocked: 投票は無効です votes_count: count: - other: サポート + other: 投票 voting_rules: - can_accumulate_supports_beyond_threshold: - description: 各提案は %{limit} 以上のサポートを蓄積できます + can_accumulate_votes_beyond_threshold: + description: 各提案は %{limit} 票を超えることができます minimum_votes_per_user: - description: 異なる提案に最低 %{votes} のサポートを配布する必要があります。 - given_enough_votes: 十分なサポートがあります。 - supports_remaining: サポートを考慮するためには、あと %{remaining_votes} 件の提案をサポートする必要があります。 + description: 異なる提案には、 %{votes} 票以上の票を配布する必要があります。 + given_enough_votes: 十分な投票を行いました。 + votes_remaining: あなたの投票が考慮されるためには、あと %{remaining_votes} 件の提案に投票する必要があります。 proposal_limit: description: 最大 %{limit} 件の提案を作成できます。 threshold_per_proposal: - description: 検証されるためには、 %{limit} 件のサポートを受ける必要があります。 - title: 'サポートは以下のルールに従います:' + description: 提案が検証されるためには、 %{limit} 票に到達する必要があります。 + title: '投票は以下のルールに従います:' vote_limit: - description: 最大 %{limit} 件の提案をサポートできます。 - votes: サポート + description: '%{limit} 件までの提案に投票できます。' + votes: 残り %{number} 票 wizard_aside: back: 戻る back_from_step_1: 提案に戻る @@ -896,7 +899,7 @@ ja: title: バージョン withdraw: errors: - has_supports: この提案はすでにサポートされているため撤回できません。 + has_votes: この提案はすでに投票されているため撤回できません。 resource_links: copied_from_component: proposal_proposal: 関連する提案 @@ -908,4 +911,4 @@ ja: statistics: proposals_accepted: 承認された提案 proposals_count: 提案 - supports_count: サポート + votes_count: 投票 diff --git a/decidim-proposals/config/locales/lb.yml b/decidim-proposals/config/locales/lb.yml index bc78ce2cf0cc6..67ef3a6712f8b 100644 --- a/decidim-proposals/config/locales/lb.yml +++ b/decidim-proposals/config/locales/lb.yml @@ -33,3 +33,4 @@ lb: proposals: Virschléi statistics: proposals_count: Virschléi + votes_count: Stimmen diff --git a/decidim-proposals/config/locales/lt.yml b/decidim-proposals/config/locales/lt.yml index 6da783fcede53..9a71bb3dd73dc 100644 --- a/decidim-proposals/config/locales/lt.yml +++ b/decidim-proposals/config/locales/lt.yml @@ -61,12 +61,10 @@ lt: attributes: base: not_official: Nėra oficialūs - supported: Gavo palaikymo ar pritarimo proposals_split: attributes: base: not_official: Nėra oficialūs - supported: Gavo palaikymo ar pritarimo models: decidim/proposals/admin/update_proposal_category_event: Pasiūlymo kategorija pakeista decidim/proposals/admin/update_proposal_scope_event: Pasiūlymo sritis pakeista @@ -92,11 +90,6 @@ lt: few: Užrašai many: Užrašai other: Užrašai - decidim/proposals/proposal_vote: - one: Palaikymas - few: Palaikymai - many: Palaikymai - other: Palaikymai decidim: admin: filters: @@ -136,7 +129,6 @@ lt: comment: Komentuoti create: Sukurti endorse: Palaikyti - vote: Paremti vote_comment: Balsuoti už komentarą withdraw: Atsiimti name: Pasiūlymai @@ -147,23 +139,18 @@ lt: amendments_wizard_help_text: Pakeitimų vedlio pagalbos tekstas announcement: Pranešimas attachments_allowed: Leisti failų prisegimus - can_accumulate_supports_beyond_threshold: Gali kaupti paramą virš numatytos ribos collaborative_drafts_enabled: Bendri projektai įjungti comments_enabled: Komentarai įjungti comments_max_length: Maksimalus komentarų ilgis (Palikite 0 kaip numatytą vertę) default_sort_order: Numatytas pasiūlymų rikiavimas - default_sort_order_help: Numatytasis reiškia, kad įjungus paramą, pasiūlymai bus surūšiuotjami atsitiktine tvarka, o jeigu paramos blokuojamos – pagal labiausiai palaikomus. default_sort_order_options: - default: Numatytasis most_commented: Labiausiai komentuojamas most_endorsed: Labiausiai pritarta most_followed: Labiausiai sekė - most_voted: Labiausiai parėmė random: Atsitiktinai recent: Naujausi with_more_authors: Turintys daugiausia autorių geocoding_enabled: Geokodavimas įjungtas - minimum_votes_per_user: Mažiausia parama vienam naudotojui new_proposal_body_template: Naujo pasiūlymo pagrindinės dalies šablonas new_proposal_body_template_help: Galite nustatyti naujiuose pasiūlymuose būsimą iš anksto užpildytą tekstą new_proposal_help_text: Naujo pasiūlymo pagalbos tekstas @@ -183,7 +170,6 @@ lt: scope_id: Apimtis scopes_enabled: Sritys įjungtos threshold_per_proposal: Vienam pasiūlymui nustatyta riba - vote_limit: Paramos riba vienam dalyviui step: amendment_creation_enabled: Pataisų kūrimas leidžiamas amendment_creation_enabled_help: Dalyvis gali pataisyti pasiūlymus. @@ -203,13 +189,10 @@ lt: creation_enabled: Dalyviai gali kurti pasiūlymus creation_enabled_readonly: Šis nustatymas išjungiamas, kai suaktyvinate Dalyvaujančių Tekstų funkciją. Norėdami įkelti pasiūlymus kaip dalyvaujamąjį tekstą, spustelėkite mygtuką Dalyvaujantys Tekstai ir vadovaukitės instrukcijomis. default_sort_order: Numatytasis pasiūlymų rūšiavimas - default_sort_order_help: Numatytasis reiškia, kad įjungus palaikymus pasiūlymai bus rodomi surūšiuoti atsitiktine tvarka, o jei palaikymai yra blokuojami – pagal labiausiai palaikomus. default_sort_order_options: - default: Numatytasis most_commented: Labiausiai komentuojamas most_endorsed: Labiausiai pritarta most_followed: Labiausiai sekamas - most_voted: Labiausiai paremtas random: Atsitiktinis recent: Naujausi with_more_authors: Turintys daug autorių @@ -219,9 +202,6 @@ lt: publish_answers_immediately: Skelbti atsakymus į pasiūlymius nedelsiant publish_answers_immediately_help_html: 'Atminkite, kad jei atsakysite į bet kurį pasiūlymą neįjungę šio funkcijos, turėsite atsakymus paskelbti rankiniu būdu, pasirinkdami ir naudodami paskelbimo veiksmą. Norėdami gauti daugiau informacijos apie tai, kaip tai veikia, aplankykite pasiūlymų atsakymų dokumentacijos puslapį.' suggested_hashtags: Dalyviams pasiūlytos grotažymės naujiems pasiūlymams - votes_blocked: Blokuoti balsai - votes_enabled: Parama aktyvuota - votes_hidden: Balsai paslėpti (jei balsavimo funkcija įjungta, pažymėjus šį pasirinkimą, balsų kiekis bus paslėptas) events: proposals: admin: @@ -297,10 +277,7 @@ lt: email_subject: '%{resource_title} pasiūlymo apimtis buvo atnaujinta' notification_title: Administratorius atnaujino %{resource_title} pasiūlymo apimtį. voting_enabled: - email_intro: 'Galite paremti pasiūlymus %{participatory_space_title} erdvėje! Prisidėkite šiame puslapyje:' email_outro: Šį pranešimą gavote dėl to, kad sekate %{participatory_space_title}. Jeigu nebenorite gauti pranešimų, spustelėkite ankstesnę nuorodą. - email_subject: Balsavimas %{participatory_space_title} prasidėjo - notification_title: Dabar galite pradėti balsuoti už pasiūlymus %{participatory_space_title}erdvėje gamification: badges: accepted_proposals: @@ -317,14 +294,7 @@ lt: proposal_votes: conditions: - Naršykite ir praleiskite šiek tiek laiko skaitydami kitų žmonių pasiūlymus - - Palaikykite pasiūlymus, kurie jums patinka arba kurie jums atrodo įdomūs - description: Šis ženklelis suteikiamas, kai paremiate kitų žmonių pasiūlymus. - description_another: Šis dalyvis parėmė %{score} pasiūlymus (-ų). - description_own: Jūs parėmėte %{score} pasiūlymus (-ų). - name: Pasiūlymą palaiko - next_level_in: Paremkite dar %{score} pasiūlymus (-ų) ir pasiekite kitą lygį! - unearned_another: Šis dalyvis dar neparėmė jokių pasiūlymų. - unearned_own: Jūs dar neparėmėte jokių pasiūlymų. + - proposals: conditions: - Pasirinkite jus dominančią dalyvavimo erdvę, kurioje įjungta pasiūlymų teikimo funkcija @@ -349,10 +319,6 @@ lt: description: Pasiūlymų skaičius object: pasiūlymai title: Pasiūlymai - votes: - description: Paramos pasiūlymams skaičius - object: balsai - title: Balsai participatory_spaces: highlighted_proposals: last: Paskutiniai pasiūlymai @@ -512,7 +478,6 @@ lt: remove_assignment: Pašalinti užduotį remove_assignment_confirmation: Ar tikrai norite nušalinti vertintoją nuo šio pasiūlymo? valuators: Vertintojai - votes_count: Balsų skaičius update_category: invalid: 'Šie pasiūlymai jau priskirti kategorijai %{subject_name}: %{proposals}.' select_a_category: Pasirinkite kategoriją. @@ -717,9 +682,6 @@ lt: buttons: amend: Pakeisti comment: Komentuoti - proposal_votes: - create: - error: Išreiškiant paramą pasiūlymui įvyko klaidų. proposals: dynamic_map_instructions: description: Koordinatės bus atnaujintos paspaudus mygtuką „Peržiūrėti“. Tačiau adresas nesikeičia. @@ -749,7 +711,6 @@ lt: search: Ieškoti state: Būsena type: Tipas - voted: Balsuota index: click_here: Žiūrėti visus pasiūlymus collaborative_drafts_list: Prieiga prie bendrų projektų (juodraščių) @@ -770,7 +731,6 @@ lt: most_commented: Labiausiai komentuojamas most_endorsed: Labiausiai paremtas most_followed: Labiausiai sekamas - most_voted: Labiausiai balsuotas random: Atsitiktinai recent: Naujausi with_more_authors: Turintys daug autorių @@ -812,39 +772,13 @@ lt: proposal_accepted_reason: 'Šis pasiūlymas buvo priimtas, nes:' proposal_in_evaluation_reason: Šis pasiūlymas šiuo metu vertinamas proposal_rejected_reason: 'Šis pasiūlymas buvo atmestas, nes:' - withdraw_btn_hint: Persigalvoję galėsite atsiimti savo pasiūlymą, jeigu niekas už jį dar nebalsavo. Pasiūlymas nepašalinamas. Jis bus rodomas atsiimtų pasiūlymų sąraše. withdraw_confirmation_html: Ar tikrai norite atsiimti šį pasiūlymą?

    Šio veiksmo atšaukti negalima! withdraw_proposal: Atsiimti pasiūlymą update: title: Atnaujinti pasiūlymą - vote_button: - already_voted: Jau balsuota - already_voted_hover: Atsiimti balsą - maximum_votes_reached: Pasiektas maksimalus balsų skaičius - no_votes_remaining: Balsų neliko - vote: Balsuoti - votes_blocked: Balsavimas išjungtas - votes_count: - count: - one: Balsas - few: Balsai - many: Balsų - other: Balsai voting_rules: - can_accumulate_supports_beyond_threshold: - description: Kiekvienas pasiūlymas gali sukaupti daugiau nei %{limit} balsų - minimum_votes_per_user: - description: Turite paskirstyti mažiausiai %{votes} balsų tarp skirtingų pasiūlymų. - given_enough_votes: Jūs parėmėte pakankamai. - supports_remaining: Kad į jūsų balsus būtų atsižvelgta, turite paremti dar %{remaining_votes} pasiūlymus (-ų). proposal_limit: description: Galite parengti iki %{limit} pasiūlymų. - threshold_per_proposal: - description: Kad pasiūlymai būtų priimti, jie turi surinkti %{limit} palaikymų. - title: 'Paramai taikomos šios taisyklės:' - vote_limit: - description: Galite paremti iki %{limit} pasiūlymų. - votes: Balsai wizard_aside: back: Grįžti back_from_step_1: Grįžti į pasiūlymus @@ -869,9 +803,6 @@ lt: versions: index: title: Versijos - withdraw: - errors: - has_supports: Šis pasiūlymo negalima atsiimti, nes jam jau pritarta. resource_links: copied_from_component: proposal_proposal: Susiję pasiūlymai @@ -883,4 +814,4 @@ lt: statistics: proposals_accepted: Priimti Pasiūlymai proposals_count: Pasiūlymai - supports_count: Palaikymai + votes_count: Balsai diff --git a/decidim-proposals/config/locales/lv.yml b/decidim-proposals/config/locales/lv.yml index a198c5e425a65..96c2864870979 100644 --- a/decidim-proposals/config/locales/lv.yml +++ b/decidim-proposals/config/locales/lv.yml @@ -68,10 +68,6 @@ lv: zero: Piezīmes one: Piezīme other: Piezīmes - decidim/proposals/proposal_vote: - zero: Atbalsta - one: Atbalsts - other: Atbalsta decidim: admin: filters: @@ -86,7 +82,6 @@ lv: amend: Grozīt create: Izveidot endorse: Atbalstīt - vote: Atbalsts withdraw: Atsaukt name: Priekšlikumi settings: @@ -96,11 +91,9 @@ lv: amendments_wizard_help_text: Grozījumu vedņa palīdzības teksts announcement: Paziņojums attachments_allowed: Atļaut pielikumus - can_accumulate_supports_beyond_threshold: Var sasniegt atbalstu, kas pārsniedz slieksni collaborative_drafts_enabled: Sadarbības projekti iespējoti comments_enabled: Komentāri ir iespējoti geocoding_enabled: Ģeokodēšana iespējota - minimum_votes_per_user: Minimālais atbalsts no viena lietotāja new_proposal_body_template: Jauna priekšlikuma veidne new_proposal_body_template_help: Jūs varat definēt jau gatavu jauno priekšlikumu tekstu new_proposal_help_text: Jaunu priekšlikumu palīdzības teksts @@ -114,7 +107,6 @@ lv: proposal_wizard_step_1_help_text: Priekšlikumu vedņa „Izveidot” soļa palīdzības teksts resources_permissions_enabled: Katram priekšlikumam var iestatīt darbības atļaujas threshold_per_proposal: Slieksnis vienam priekšlikumam - vote_limit: Atbalsta limits vienam dalībniekam step: amendment_creation_enabled: Grozījumu izveide ir iespējota amendment_creation_enabled_help: Dalībnieks var grozīt priekšlikumus. @@ -136,9 +128,6 @@ lv: proposal_answering_enabled: Atbilde uz priekšlikumiem ir iespējota publish_answers_immediately: Nekavējoties publicēt atbildes uz priekšlikumiem suggested_hashtags: Dalībniekiem ieteiktās mirkļbirkas jaunajiem priekšlikumiem - votes_blocked: Atbalsts bloķēts - votes_enabled: Atbalsts iespējots - votes_hidden: Atbalsts slēpts (ja atbalsts ir iespējots tad, atzīmējot šo, tiks paslēpts atbalsta apmērs) events: proposals: admin: @@ -196,10 +185,7 @@ lv: email_subject: '%{resource_title} priekšlikuma tvērums tika atjaunināts' notification_title: %{resource_title} administrators ir atjauninājis priekšlikuma tvērumu. voting_enabled: - email_intro: 'Varat atbalstīt priekšlikumus telpā %{participatory_space_title}! Sāciet piedalīties šajā lapā:' email_outro: Jūs saņēmāt šo paziņojumu, jo sekojat %{participatory_space_title}. Jūs varat atteikties no paziņojumu saņemšanas, sekojot iepriekšējai saitei. - email_subject: Priekšlikumu atbalstīšana priekš %{participatory_space_title} ir sākusies - notification_title: Tagad jūs varat sākt atbalstīt priekšlikumus sadaļā %{participatory_space_title} gamification: badges: accepted_proposals: @@ -216,13 +202,7 @@ lv: proposal_votes: conditions: - Pārlūkojiet un pavadiet kādu laiku, lasot citu cilvēku priekšlikumus - - Atbalstiet priekšlikumus, kas jums patīk vai šķiet interesanti - description: Šis žetons tiek piešķirts, kad jūs atbalstāt citu cilvēku priekšlikumus. - description_another: Šis dalībnieks ir atbalstījis%{score} priekšlikumus. - description_own: Jūs esat atbalstījis %{score} priekšlikumus. - name: Atbalsti priekšlikumiem - next_level_in: Atbalstiet vēl %{score} priekšlikumus, lai sasniegtu nākamo līmeni! - unearned_own: Jūs vēl neesat atbalstījis nevienu priekšlikumu. + - proposals: conditions: - Izvēlieties savu līdzdalības telpu ar iespējotu priekšlikumu iesniegšanu @@ -246,10 +226,6 @@ lv: description: Priekšlikumu skaits object: priekšlikumi title: Priekšlikumi - votes: - description: Atbalstīto priekšlikumu skaits - object: atbalsta - title: Atbalsta proposals: actions: answer_proposal: Atbildes priekšlikums @@ -353,7 +329,6 @@ lv: remove_assignment: Noņemt uzdevumu remove_assignment_confirmation: Vai tiešām vēlaties noņemt vērtētāju šim priekšlikumam? valuators: Vērtētāji - votes_count: Atbalstu skaits update_category: invalid: 'Šiem priekšlikumiem jau bija %{subject_name} kategorija: %{proposals}.' success: 'Priekšlikumi ir veiksmīgi atjaunināti kategorijā %{subject_name} kategorija: %{proposals}.' @@ -516,9 +491,6 @@ lv: buttons: amend: Grozīt comment: Komentēt - proposal_votes: - create: - error: Atbalstot priekšlikumu, radās problēma proposals: edit: attachment_legend: "(Pēc izvēles) Pievienojiet pielikumu" @@ -543,7 +515,6 @@ lv: search: Meklēt state: Statuss type: Veids - voted: Atbalstīts index: collaborative_drafts_list: Piekļūt sadarbības projektam count: @@ -559,7 +530,6 @@ lv: most_commented: Visvairāk komentētie most_endorsed: Visvairāk veicinātie most_followed: Visvairāk sekotāju - most_voted: Visvairāk atbalstītie random: Nejauši recent: Nesenie with_more_authors: Ar vairākiem autoriem @@ -589,27 +559,10 @@ lv: proposal_accepted_reason: 'Šis priekšlikums ir pieņemts, jo:' proposal_in_evaluation_reason: Šis priekšlikums tiek vērtēts proposal_rejected_reason: 'Šis priekšlikums netika pieņemts, jo' - withdraw_btn_hint: Ja pārdomājat, jūs varat atsaukt savu priekšlikumu, ja vien neesat saņēmis atbalstu. Priekšlikums netiks izdzēsts, bet tas parādīsies atsaukto priekšlikumu sarakstā. withdraw_proposal: Atsaukt priekšlikumu - vote_button: - already_voted: Jau atbalstīts - already_voted_hover: Atsaukt atbalstu - maximum_votes_reached: Sasniegts atbalsta limits - no_votes_remaining: Nav atlikuši atbalsti - vote: Atbalsts - votes_blocked: Atbalsts nav iespējots voting_rules: - can_accumulate_supports_beyond_threshold: - description: Katrs priekšlikums var uzkrāt vairāk nekā %{limit} atbalstu - minimum_votes_per_user: - description: Starp dažādiem priekšlikumiem jums ir jāsadala vismaz %{votes} balsis. - supports_remaining: Jums ir jāatbalsta vēl %{remaining_votes} vairāk priekšlikumi, lai jūsu atbalsts tiktu ņemts vērā. proposal_limit: description: Jūs varat izveidot līdz %{limit} priekšlikumiem. - title: 'Atbalstam tiek piemēroti šādi noteikumi:' - vote_limit: - description: Jūs varat atbalstīt līdz %{limit} priekšlikumiem. - votes: Atbalsta wizard_aside: back: Atpakaļ wizard_steps: diff --git a/decidim-proposals/config/locales/nl.yml b/decidim-proposals/config/locales/nl.yml index 38df52429b7bb..39c38798acccf 100644 --- a/decidim-proposals/config/locales/nl.yml +++ b/decidim-proposals/config/locales/nl.yml @@ -56,12 +56,10 @@ nl: attributes: base: not_official: Zijn niet officieel - supported: Heeft steun ontvangen proposals_split: attributes: base: not_official: Zijn niet officieel - supported: Heeft steun ontvangen models: decidim/proposals/admin/update_proposal_category_event: Voorstelcategorie gewijzigd decidim/proposals/admin/update_proposal_scope_event: Voorstel bereik gewijzigd @@ -81,9 +79,6 @@ nl: decidim/proposals/proposal_note: one: Notitie other: Notes - decidim/proposals/proposal_vote: - one: Stem - other: stemmen decidim: admin: filters: @@ -110,23 +105,18 @@ nl: amendments_wizard_help_text: Hulptekst van de amendementen wizard announcement: Aankondiging attachments_allowed: Bijlagen toestaan - can_accumulate_supports_beyond_threshold: Kan stemmen verzamelen die de limiet overschrijden collaborative_drafts_enabled: Samenwerkingsconcepten ingeschakeld comments_enabled: Reacties ingeschakeld comments_max_length: Commentaar maximale lengte (laat 0 voor standaard waarde) default_sort_order: Standaardsortering - default_sort_order_help: Standaardsortering betekent dat als de ondersteuning is ingeschakeld, de voorstellen willekeurig worden weergegeven. Als de ondersteuning geblokkeerd is, zullen ze gesorteerd worden op de meest ondersteunde manier. default_sort_order_options: - default: Standaard most_commented: Meeste reacties most_endorsed: Meest gesteund most_followed: Meest gevolgd - most_voted: Meeste stemmen random: Willekeurig recent: Meest recent with_more_authors: Met meer auteurs geocoding_enabled: Geolocatie ingeschakeld - minimum_votes_per_user: Minimale stemmen per gebruiker new_proposal_body_template: Nieuw voorstel lichaamssjabloon new_proposal_body_template_help: U kunt de door voorgevulde tekst definiëren die de nieuwe voorstellen zullen hebben new_proposal_help_text: Hulptekst bij de creatie van een nieuw voorstel @@ -146,7 +136,6 @@ nl: scope_id: Scope scopes_enabled: Scopes ingeschakeld threshold_per_proposal: Limiet per voorstel - vote_limit: Beperk het aantal stemmen per gebruiker step: amendment_creation_enabled: Aanmaken van amendementen ingeschakeld amendment_creation_enabled_help: Deelnemer kan voorstellen wijzigen. @@ -165,13 +154,10 @@ nl: comments_blocked: Reacties geblokkeerd creation_enabled: Gebruikers kunnen voorstellen maken default_sort_order: Standaardsortering - default_sort_order_help: Standaardsortering betekent dat als de ondersteuning is ingeschakeld, de voorstellen willekeurig worden weergegeven. Als de ondersteuning geblokkeerd is, zullen ze gesorteerd worden op de meest ondersteunde manier. default_sort_order_options: - default: Standaard most_commented: Meeste reacties most_endorsed: Meest gesteund most_followed: Meest gevolgd - most_voted: Meeste stemmen random: Willekeurig recent: Meest recent with_more_authors: Met meer auteurs @@ -181,8 +167,7 @@ nl: publish_answers_immediately: Publiceer voorstel antwoorden onmiddellijk suggested_hashtags: Hashtags stelde gebruikers voor nieuwe voorstellen voor votes_blocked: Stemmen geblokkeerd - votes_enabled: Stemmen ingeschakeld - votes_hidden: Stemmen verborgen (als stemmen zijn ingeschakeld, zal dit controleren het aantal stemmen verbergen) + votes_enabled: Stemmen actief events: proposals: admin: @@ -240,10 +225,9 @@ nl: email_subject: Het toepassingsgebied van het %{resource_title} voorstel is bijgewerkt notification_title: Het bereik van %{resource_title} voorstel is bijgewerkt door een admin. voting_enabled: - email_intro: 'U kunt op voorstellen in %{participatory_space_title} stemmen! Neem deel via deze pagina:' + email_intro: 'Je kan op voorstellen in %{participatory_space_title} stemmen! Neem deel via deze pagina:' email_outro: Je hebt deze melding ontvangen omdat je %{participatory_space_title} volgt. Schakel de meldingen uit door te klikken op de voorgaande link. - email_subject: U kunt nu stemmen op de voorstellen van %{participatory_space_title} - notification_title: U kunt nu beginnen met stemmen op in %{participatory_space_title} + notification_title: Je kan nu beginnen met stemmen op in %{participatory_space_title} gamification: badges: accepted_proposals: @@ -260,13 +244,7 @@ nl: proposal_votes: conditions: - Blader en besteed wat tijd aan het lezen van de voorstellen van anderen - - Steun de voorstellen die u leuk of interessant vindt - description: Deze badge wordt toegekend wanneer u de voorstellen van andere mensen steunt. - description_another: Deze gebruiker heeft %{score} voorstellen ondersteund. - description_own: U hebt %{score} voorstellen ondersteund. - name: Voorstel ondersteunt - next_level_in: Geef %{score} extra voorstellen om het volgende niveau te bereiken! - unearned_own: U heeft nog geen steun gegeven aan voorstellen. + - proposals: conditions: - Kies de deelnemingsruimte van uw interesse met ingediende inzending voor voorstellen @@ -290,10 +268,6 @@ nl: description: Aantal voorstellen object: voorstellen title: voorstellen - votes: - description: Aantal stemmen voor voorstellen - object: stemmen - title: stemmen participatory_spaces: highlighted_proposals: see_all: Alles zien (%{count}) @@ -415,7 +389,6 @@ nl: remove_assignment: Opdracht verwijderen remove_assignment_confirmation: Weet u zeker dat u de beoordelaar uit dit voorstel wilt verwijderen? valuators: Beoordelaars - votes_count: Aantal stemmen update_category: invalid: 'Deze voorstellen hadden al de %{subject_name} categorie: %{proposals}.' success: 'Voorstellen zijn succesvol bijgewerkt naar de %{subject_name} categorie: %{proposals}.' @@ -582,9 +555,6 @@ nl: buttons: amend: Wijzigen comment: Commentaar - proposal_votes: - create: - error: Er zijn fouten geweest bij het stemmen van het voorstel. proposals: dynamic_map_instructions: description: De coördinaten worden bijgewerkt bij het klikken op de 'preview' knop. Het adres verandert echter niet. @@ -660,34 +630,21 @@ nl: proposal_accepted_reason: 'Dit voorstel is geaccepteerd omdat:' proposal_in_evaluation_reason: Dit voorstel wordt geëvalueerd proposal_rejected_reason: 'Dit voorstel is afgewezen omdat:' - withdraw_btn_hint: Je kan je voorstel intrekken als je van gedacht verandert, zolang je geen hulp hebt ontvangen. Het voorstel wordt niet verwijderd; het wordt weergegeven in de lijst met ingetrokken voorstellen. withdraw_confirmation_html: Weet u zeker dat u dit voorstel wilt intrekken?

    Deze actie kan niet worden geannuleerd! withdraw_proposal: Voorstel intrekken update: title: Update voorstel vote_button: already_voted: Al gestemd - already_voted_hover: Stem Intrekken maximum_votes_reached: Stemlimiet bereikt no_votes_remaining: Geen stemmen over vote: Stem votes_blocked: Stemmen uitgeschakeld - votes_count: - count: - one: STEM - other: STEMMEN voting_rules: - can_accumulate_supports_beyond_threshold: - description: Elk voorstel kan meer dan %{limit} stemmen verzamelen - minimum_votes_per_user: - description: U moet een minimum van %{votes} stemmen verdelen over verschillende voorstellen. - supports_remaining: U moet %{remaining_votes} meer voorstellen steunen om rekening te houden met uw ondersteuning. proposal_limit: description: Je kan maximaal %{limit} voorstellen doen. - title: 'Stemmen zijn onderworpen aan de volgende regels:' vote_limit: description: U kunt tot %{limit} voorstellen stemmen. - votes: Stemmen wizard_aside: back: Terug back_from_step_1: Terug naar voorstellen @@ -722,4 +679,4 @@ nl: statistics: proposals_accepted: Aanvaarde voorstellen proposals_count: Voorstellen - supports_count: Aantal keer gesteund + votes_count: Stemmen diff --git a/decidim-proposals/config/locales/no.yml b/decidim-proposals/config/locales/no.yml index bfd04a98b1aa3..0865c4170b2e4 100644 --- a/decidim-proposals/config/locales/no.yml +++ b/decidim-proposals/config/locales/no.yml @@ -53,12 +53,10 @@ attributes: base: not_official: Er ikke offisiell - supported: Har mottatt støtte eller påtegninger proposals_split: attributes: base: not_official: Er ikke offisiell - supported: Har mottatt støtte eller påtegninger models: decidim/proposals/admin/update_proposal_category_event: Forslags kategorien ble endret decidim/proposals/admin/update_proposal_scope_event: Forslagstema er endret @@ -78,9 +76,6 @@ decidim/proposals/proposal_note: one: Merk other: Merknader - decidim/proposals/proposal_vote: - one: Støtte - other: Støttere decidim: admin: filters: @@ -112,7 +107,6 @@ comment: Kommentar create: Opprett endorse: Påtegne - vote: Støtte vote_comment: Stem på kommentar withdraw: Trekk tilbake name: Forslag @@ -123,23 +117,18 @@ amendments_wizard_help_text: Endrings Veiviser hjelpetekst announcement: Kunngjøring attachments_allowed: Tillat vedlegg - can_accumulate_supports_beyond_threshold: Kan samle støtter utover terskelen collaborative_drafts_enabled: Samarbeids utkaster aktivert comments_enabled: Kommentarer aktivert comments_max_length: Maks lengde på kommentarer (Sett 0 for standardverdi) default_sort_order: Standard sortering av forslag - default_sort_order_help: Standardverdien betyr at hvis støtte er aktivert, vil forslagene bli vist i tilfeldig rekkefølge og hvis støttene er blokkert, vil de bli sortert etter de mest støttede forslagene. default_sort_order_options: - default: Standardverdi most_commented: Mest kommenterte most_endorsed: Mest påtegnet most_followed: Mest fulgte - most_voted: Mest støttet random: Tilfeldig recent: Nylig with_more_authors: Med flere forfattere geocoding_enabled: Geokoding aktivert - minimum_votes_per_user: Minimum støtter per bruker new_proposal_body_template: Nytt forslag korppsmal new_proposal_body_template_help: Du kan definere forhåndsutfylt tekst som de nye forslagene vil ha new_proposal_help_text: Ny forslag hjelpetekst @@ -159,7 +148,6 @@ scope_id: Tema scopes_enabled: Aktiverte temaer threshold_per_proposal: Terskel per forslag - vote_limit: Støttegrense per deltaker step: amendment_creation_enabled: Oppretting av endringer aktivert amendment_creation_enabled_help: Deltakeren kan endre forslag. @@ -178,13 +166,10 @@ comments_blocked: Kommentarer blokkert creation_enabled: Deltakerne kan opprette forslag default_sort_order: Standard sortering av forslag - default_sort_order_help: Standard betyr at hvis støttene er aktivert, vil forslagene bli vist i tilfeldig rekkefølge, og hvis støttene er blokkert, vil de bli sortert etter de mest støttede støttene. default_sort_order_options: - default: Standardverdi most_commented: Mest kommentert most_endorsed: Mest påtegnet most_followed: Mest fulgt - most_voted: Mest støttet random: Tilfeldig recent: Nylig with_more_authors: Med flere forfattere @@ -193,9 +178,6 @@ proposal_answering_enabled: Forslags besvaring aktivert publish_answers_immediately: Publiser svar på forslag umiddelbart suggested_hashtags: Hashtagger foreslått til deltakere for nye forslag - votes_blocked: Støtter blokkert - votes_enabled: Støtter aktivert - votes_hidden: Støtter skjult (hvis støtter er aktivert, sjekke du av dette vil det skjule antall støtter) events: proposals: collaborative_draft_access_accepted: @@ -245,10 +227,7 @@ proposal_update_scope: email_outro: Du har mottatt denne varslingen fordi du er forfatteren av forslaget. voting_enabled: - email_intro: 'Du kan støtte forslag i %{participatory_space_title}! Begynn å delta på denne siden:' email_outro: Du har mottatt denne varslingen fordi du følger %{participatory_space_title}. Du kan slutte å motta varsler hvis du følger den forrige lenken. - email_subject: Forslags støtte har startet for %{participatory_space_title} - notification_title: Du kan nå begynne å støtte forslag i %{participatory_space_title} gamification: badges: accepted_proposals: @@ -265,13 +244,7 @@ proposal_votes: conditions: - Bla gjennom og bruk litt tid på å lese andres forslag - - Gi støtte til forslagene du liker eller finner interessante - description: Dette merket tildeles når du støtter andres forslag. - description_another: Denne deltakeren har gitt støtte til %{score} forslag. - description_own: Du har gitt støtte til %{score} forslag. - name: Forslags støtter - next_level_in: Gi støtte til %{score} flere forslag for å nå neste nivå! - unearned_own: Du har ikke gitt støtte til noen forslag ennå. + - proposals: conditions: - Velg deltaker området for interessen din når innsending av forslag er aktivert @@ -295,10 +268,6 @@ description: Antall forslag object: forslag title: Forslag - votes: - description: Antall støtter til forslag - object: støtter - title: Støtter participatory_spaces: highlighted_proposals: see_all: Vis alle (%{count}) @@ -414,7 +383,6 @@ photos: Bilder ranking: "%{ranking} av %{total}" related_meetings: Relaterte møter - votes_count: Støtter antall proposals_imports: new: create: Importer forslag @@ -563,9 +531,6 @@ buttons: amend: Endre comment: Kommentar - proposal_votes: - create: - error: Det oppstod et problem med å støtte forslaget. proposals: edit: attachment_legend: "(Valgfritt) Legg til et vedlegg" @@ -590,7 +555,6 @@ search: Søk state: Status type: Type - voted: Støttet index: collaborative_drafts_list: Lag utkast sammen med andre count: @@ -607,7 +571,6 @@ most_commented: Flest kommentarer most_endorsed: Mest påtegnet most_followed: Mest fulgte - most_voted: Mest støttet random: Tilfeldig recent: Nylig with_more_authors: Med flere forfattere @@ -639,34 +602,13 @@ proposal_accepted_reason: 'Dette forslaget ble akseptert fordi:' proposal_in_evaluation_reason: Dette forslaget blir evaluert proposal_rejected_reason: 'Dette forslaget ble avvist fordi:' - withdraw_btn_hint: Du kan trekke tilbake forslaget ditt hvis du ombestemmer deg, så lenge du ikke har fått noe støtte. Forslaget er ikke slettet, den vil vises i listen av tilbaketrukne forslag. withdraw_confirmation_html: Er du sikker på at du vil trekke tilbake dette forslaget?

    Denne handlingen kan ikke avbrytes! withdraw_proposal: Trekk tilbake forslag update: title: Oppdater forslag - vote_button: - already_voted: Støttet allerede - already_voted_hover: Trekk tilbake støtte - maximum_votes_reached: Støttegrense nådd - no_votes_remaining: Ingen støtter igjen - vote: Støtte - votes_blocked: Støtter deaktivert - votes_count: - count: - one: STØTTE - other: STØTTERE voting_rules: - can_accumulate_supports_beyond_threshold: - description: Hvert forslag kan samle mer enn %{limit} støtter - minimum_votes_per_user: - description: Du må gi ut minimum %{votes} støtter mellom forskjellige forslag. - supports_remaining: Du må støtte %{remaining_votes} flere forslag for at støttene dine som skal tas i betraktning. proposal_limit: description: Du kan lage opptil %{limit} forslag. - title: 'Støtter er underlagt følgende regler:' - vote_limit: - description: Du kan støtte opptil %{limit} forslag. - votes: Støtter wizard_aside: back: Tilbake back_from_step_1: Tilbake til forslag @@ -699,4 +641,4 @@ statistics: proposals_accepted: Godkjente forslag proposals_count: Forslag - supports_count: Støtter + votes_count: Stemmer diff --git a/decidim-proposals/config/locales/pl.yml b/decidim-proposals/config/locales/pl.yml index eb1c68d448bbd..80633133c0d3d 100644 --- a/decidim-proposals/config/locales/pl.yml +++ b/decidim-proposals/config/locales/pl.yml @@ -74,12 +74,12 @@ pl: attributes: base: not_official: Nieoficjalne - supported: Otrzymano wsparcie lub poparcie + voted: Otrzymano głosy lub potwierdzenia proposals_split: attributes: base: not_official: Nie są oficjalne - supported: Otrzymano wsparcie lub potwierdzenia + voted: Otrzymano głosy lub potwierdzenia models: decidim/proposals/admin/update_proposal_category_event: Zmieniono kategorię propozycji decidim/proposals/admin/update_proposal_scope_event: Zmieniono zakres propozycji @@ -105,11 +105,6 @@ pl: few: Uwagi many: Uwag other: Uwagi - decidim/proposals/proposal_vote: - one: Wsparcie - few: Wsparcia - many: Wsparć - other: Wsparcia decidim: admin: filters: @@ -151,7 +146,7 @@ pl: comment: Skomentuj create: Tworzenie endorse: Rekomendacje - vote: Wspieranie + vote: Głosuj vote_comment: Poprzyj komentarz withdraw: Wycofywanie name: Propozycje @@ -162,23 +157,19 @@ pl: amendments_wizard_help_text: Tekst pomocy Kreatora poprawek announcement: Ogłoszenie attachments_allowed: Zezwalaj na załączniki - can_accumulate_supports_beyond_threshold: Może gromadzić wsparcia po przekroczeniu progu + attachments_allowed_help: Gdy ta opcja jest włączona, propozycje będą domyślne dla trybu siatkowego, a pierwszy obraz pojawi się na karcie. collaborative_drafts_enabled: Zezwalaj na wspólne szkice comments_enabled: Komentarze włączone comments_max_length: Maksymalna długość komentarzy (Pozostaw 0 dla wartości domyślnej) default_sort_order: Domyślne sortowanie propozycji - default_sort_order_help: Domyślnie oznacza, że jeśli wsparcie jest włączone, propozycje będą wyświetlane w kolejności losowej, a jeśli wsparcie jest zablokowane, zostaną posortowane według najbardziej popieranych. default_sort_order_options: - default: Domyślne most_commented: Najczęściej komentowane most_endorsed: Najbardziej popierane most_followed: Najczęściej obserwowane - most_voted: Najbardziej wspierane random: Losowo recent: Ostatnie with_more_authors: Z większą liczbą autorów geocoding_enabled: Włączono geokodowanie - minimum_votes_per_user: Minimalna liczba wsparć na użytkownika new_proposal_body_template: Szablon treści nowej propozycji new_proposal_body_template_help: Możesz zdefiniować częściowo wypełnioną treść nowej propozycji new_proposal_help_text: Nowy tekst pomocy dla propozycji @@ -199,7 +190,6 @@ pl: scope_id: Zakres scopes_enabled: Zakresy włączone threshold_per_proposal: Próg poparcia dla propozycji - vote_limit: Limit możliwych wsparć na użytkownika step: amendment_creation_enabled: Można tworzyć poprawki amendment_creation_enabled_help: Uczestnik może wnosić poprawki do propozycji. @@ -219,16 +209,13 @@ pl: creation_enabled: Uczestnicy mogą tworzyć propozycje creation_enabled_readonly: To ustawienie jest wyłączone, gdy aktywujesz funkcjonalność tekstów partycypacyjnych. Aby przesłać propozycje jako tekst partycypacyjny, kliknij przycisk "Tekst partycypacyjny" i postępuj zgodnie z instrukcjami. default_sort_order: Domyślne sortowanie propozycji - default_sort_order_options: - most_voted: Najwiecej wsparć endorsements_blocked: Rekomendacje zostały zablokowane endorsements_enabled: Rekomendacje włączone proposal_answering_enabled: Włączono odpowiadanie na propozycję publish_answers_immediately: Natychmiast publikuj odpowiedzi na propozycje suggested_hashtags: Hashtagi sugerowane użytkownikom dodającym nowe propozycje - votes_blocked: Wspieranie zablokowane - votes_enabled: Wspieranie włączone - votes_hidden: Wsparcia są ukryte (jeśli wsparcia są włączone, zaznaczenie tego ukryje liczbę wsparć) + votes_blocked: Głosy zablokowane + votes_enabled: Głosowanie włączone events: proposals: admin: @@ -301,10 +288,7 @@ pl: email_subject: Zaktualizowano zakres propozycji %{resource_title} notification_title: Administrator zaktualizował zakres propozycji %{resource_title}. voting_enabled: - email_intro: 'Możesz wspierać propozycje w %{participatory_space_title}! Dołącz na tej stronie:' email_outro: Otrzymałeś to powiadomienie, ponieważ obserwujesz %{participatory_space_title}. Możesz przestać otrzymywać powiadomienia klikając w poprzedni link. - email_subject: Rozpoczęto zbieranie wsparcia dla propozycji w przestrzeni %{participatory_space_title} - notification_title: Możesz teraz zacząć wspierać propozycje w %{participatory_space_title} gamification: badges: accepted_proposals: @@ -321,14 +305,7 @@ pl: proposal_votes: conditions: - Przeglądaj i poświęć trochę czasu na czytanie propozycji innych osób - - Wspieraj propozycje, które lubisz lub które są dla Ciebie interesujące - description: Ta odznaka jest przyznawana, gdy wspierasz propozycje innych osób. - description_another: Ten użytkownik udzielił wsparcia propozycjom w liczbie %{score}. - description_own: Udzieliłeś wsparcia propozycjom w liczbie %{score}. - name: Wsparcia propozycji - next_level_in: Wesprzyj %{score} innych propozycji, aby awansować na kolejny poziom! - unearned_another: Ten uczestnik nie wsparł jeszcze żadnych propozycji. - unearned_own: Nie udzielałeś jeszcze wsparcia żadnym propozycjom. + - proposals: conditions: - Wybierz przestrzeń partycypacyjną, która Cię interesuje, z możliwością dodawania propozycji @@ -353,10 +330,6 @@ pl: description: Liczba propozycji object: propozycje title: Propozycje - votes: - description: Liczba uzyskanych wsparć dla propozycji - object: wsparcia - title: Wsparcia participatory_spaces: highlighted_proposals: last: Ostatnie propozycje @@ -538,7 +511,6 @@ pl: remove_assignment: Usuń zadanie remove_assignment_confirmation: Czy na pewno chcesz usunąć przypisanie weryfikatora z tej propozycji? valuators: Weryfikatorzy - votes_count: Liczba wsparć update_category: invalid: 'Następujące propozycje miały już kategorię %{subject_name}: %{proposals}.' select_a_category: Proszę wybrać kategorię. @@ -727,9 +699,6 @@ pl: buttons: amend: Dodaj poprawkę comment: Skomentuj - proposal_votes: - create: - error: Podczas próby poparcia propozycji wystąpił błąd. proposals: dynamic_map_instructions: description: Współrzędne zostaną zaktualizowane po kliknięciu przycisku 'podgląd'. Jednakże adres nie ulegnie zmianie. @@ -761,7 +730,7 @@ pl: search: Szukaj state: Status type: Typ - voted: Wsparte + voted: Głosował index: click_here: Zobacz wszystkie propozycje collaborative_drafts_list: Wspólne szkice @@ -770,6 +739,8 @@ pl: few: "%{count} propozycji" many: "%{count} propozycji" other: "%{count} propozycji" + grid_mode: Tryb siatkowy + list_mode: Tryb listy new_proposal: Nowa propozycja see_all: Zobacz wszystkie propozycje see_all_withdrawn: Zobacz wszystkie wycofane propozycje @@ -782,7 +753,7 @@ pl: most_commented: Najczęściej komentowane most_endorsed: Najbardziej rekomendowane most_followed: Najczęściej obserwowane - most_voted: Najczęściej wspierane + most_voted: Większość głosów random: Losowo recent: Najnowsze with_more_authors: Z większą liczbą autorów @@ -824,39 +795,18 @@ pl: proposal_accepted_reason: 'Ta propozycja została zaakceptowana, ponieważ:' proposal_in_evaluation_reason: Ta propozycja jest oceniana proposal_rejected_reason: 'Ta propozycja została odrzucona, ponieważ:' - withdraw_btn_hint: Możesz wycofać swoją propozycję, jeśli zmienisz zdanie, o ile nie otrzymałeś żadnego wsparcia. Propozycja nie zostanie usunięta, pojawi się na liście wycofanych propozycji. withdraw_confirmation_html: Czy na pewno chcesz wycofać tę propozycję?

    Tej akcji nie można anulować! withdraw_proposal: Wycofaj propozycję update: title: Aktualizuj propozycję vote_button: - already_voted: Już wsparto - already_voted_hover: Cofnij wsparcie - maximum_votes_reached: Osiągnięto limit wsparć - no_votes_remaining: Brak wsparć - vote: Wesprzyj - votes_blocked: Wspieranie zostało wyłączone - votes_count: - count: - one: Wsparcie - few: Wsparć - many: Wsparcia - other: Wsparcia + already_voted: Już głosował + no_votes_remaining: Brak głosów + vote: Głosować + votes_blocked: Głosowanie zostało wyłączone voting_rules: - can_accumulate_supports_beyond_threshold: - description: Każda propozycja może zebrać więcej niż wynosi limit wsparć %{limit} - minimum_votes_per_user: - description: Musisz rozdzielić co najmniej %{votes} wsparć pomiędzy różne propozycje. - given_enough_votes: Udzieliłeś wystarczającej ilości wsparcia. - supports_remaining: Musisz wesprzeć %{remaining_votes} dodatkowych propozycji, aby Twoje głosy zostały policzone. proposal_limit: description: Możesz utworzyć maksymalnie %{limit} propozycji. - threshold_per_proposal: - description: Aby zostać zaakceptowanym, propozycje muszą otrzymać %{limit} wsparć. - title: 'Wspieranie podlega następującym zasadom:' - vote_limit: - description: Możesz wesprzeć maksymalnie %{limit} propozycji. - votes: Wsparcia wizard_aside: back: Wróć back_from_step_1: Wróć do propozycji @@ -883,9 +833,6 @@ pl: versions: index: title: Wersje - withdraw: - errors: - has_supports: Tej propozycji nie można wycofać, ponieważ oddano już na nią głosy poparcia. resource_links: copied_from_component: proposal_proposal: Powiązane propozycje @@ -897,4 +844,4 @@ pl: statistics: proposals_accepted: Przyjęte propozycje proposals_count: Propozycje - supports_count: Głosy poparcia + votes_count: Głosy diff --git a/decidim-proposals/config/locales/pt-BR.yml b/decidim-proposals/config/locales/pt-BR.yml index 8cc56c5e70c74..3dd0e1f116759 100644 --- a/decidim-proposals/config/locales/pt-BR.yml +++ b/decidim-proposals/config/locales/pt-BR.yml @@ -126,7 +126,6 @@ pt-BR: amendments_wizard_help_text: Texto de ajuda do Assistente announcement: Anúncio attachments_allowed: Permitir anexos - can_accumulate_supports_beyond_threshold: Pode acumular suportes além do limiar collaborative_drafts_enabled: Rascunhos colaborativos ativados comments_enabled: Comentários ativados comments_max_length: Tamanho máximo de comentários (deixe 0 para o valor padrão) @@ -153,7 +152,6 @@ pt-BR: scope_id: Escopo scopes_enabled: Escopos habilitados threshold_per_proposal: Limiar por proposta - vote_limit: Limite de voto por usuário step: amendment_creation_enabled: Criação de alteração ativada amendment_creation_enabled_help: O usuário pode alterar propostas. @@ -179,8 +177,8 @@ pt-BR: proposal_answering_enabled: Resposta de proposta ativada publish_answers_immediately: Publicar respostas da proposta imediatamente suggested_hashtags: Hashtags sugeridos aos usuários para novas propostas - votes_blocked: Votação desativada - votes_enabled: Votação habilitada + votes_blocked: Votos bloqueados + votes_enabled: Votos ativados votes_hidden: Votos ocultos (se os votos estiverem ativados, verificar isso esconderá o número de votos) events: proposals: @@ -255,7 +253,6 @@ pt-BR: voting_enabled: email_intro: 'Você pode votar propostas em %{participatory_space_title}! Comece a participar nesta página:' email_outro: Você recebeu esta notificação porque está seguindo %{participatory_space_title}. Você pode parar de receber notificações após o link anterior. - email_subject: As propostas de votação começaram para %{participatory_space_title} notification_title: Agora você pode iniciar propostas de votação em %{participatory_space_title} gamification: badges: @@ -273,13 +270,7 @@ pt-BR: proposal_votes: conditions: - Navegue e passe algum tempo lendo as propostas de outras pessoas - - Dê apoio às propostas que você gosta ou ache interessante - description: Este selo é concedido quando você oferece suporte a propostas de outras pessoas. - description_another: Este usuário deu suporte a %{score} propostas. - description_own: Você deu suporte a %{score} propostas. - name: Apoios proposta - next_level_in: Dê suporte a mais %{score} propostas para alcançar o próximo nível! - unearned_own: Você deu suporte a nenhuma proposta ainda. + - proposals: conditions: - Escolha o espaço de participação de seu interesse com o envio de propostas ativadas @@ -304,7 +295,6 @@ pt-BR: object: propostas title: Propostas votes: - description: Número de votos gerados em propostas de usuários object: votos title: Votos participatory_spaces: @@ -443,7 +433,6 @@ pt-BR: remove_assignment: Remover Atribuição remove_assignment_confirmation: Tem certeza que deseja remover o avaliador desta proposta? valuators: Avaliadores - votes_count: Contagem de votos update_category: invalid: 'Estas propostas já tinham a categoria %{subject_name}: %{proposals}.' select_a_category: Por favor, selecione uma categoria. @@ -614,9 +603,6 @@ pt-BR: buttons: amend: Alterar comment: Comente - proposal_votes: - create: - error: Houve erros ao votar a proposta. proposals: dynamic_map_instructions: description: As coordenadas serão atualizadas quando clicar no botão 'visualizar'. No entanto, o endereço não muda. @@ -697,34 +683,23 @@ pt-BR: proposal_accepted_reason: 'Esta proposta foi aceita porque:' proposal_in_evaluation_reason: Esta proposta está sendo avaliada proposal_rejected_reason: 'Esta proposta foi rejeitada porque:' - withdraw_btn_hint: Você pode retirar sua proposta se mudar de idéia, desde que não tenha recebido nenhum suporte. A proposta não é excluída, ela aparecerá na lista de propostas retiradas. withdraw_confirmation_html: Tem certeza que deseja retirar esta proposta?

    Esta ação não pode ser cancelada! withdraw_proposal: Retirar proposta update: title: Atualizar proposta vote_button: already_voted: Já votou - already_voted_hover: Unvote maximum_votes_reached: Limite de votação atingido no_votes_remaining: Não há votos restantes vote: Voto votes_blocked: Votação desativada - votes_count: - count: - one: VOTO - other: VOTOS voting_rules: - can_accumulate_supports_beyond_threshold: - description: Cada proposta pode acumular mais de %{limit} suporta minimum_votes_per_user: description: Você deve distribuir um mínimo de %{votes} votos entre diferentes propostas. - supports_remaining: Você tem que votar %{remaining_votes} mais propostas para seus votos a serem levados em conta. proposal_limit: description: Você pode criar até %{limit} propostas. - title: 'A votação está sujeita às seguintes regras:' vote_limit: description: Você pode votar até %{limit} propostas. - votes: Votos wizard_aside: back: Costas back_from_step_1: Voltar às propostas @@ -759,4 +734,4 @@ pt-BR: statistics: proposals_accepted: Propostas aceitas proposals_count: Propostas - supports_count: Votos + votes_count: Votos diff --git a/decidim-proposals/config/locales/pt.yml b/decidim-proposals/config/locales/pt.yml index f297f04ed30fc..36ef3f4f77c63 100644 --- a/decidim-proposals/config/locales/pt.yml +++ b/decidim-proposals/config/locales/pt.yml @@ -56,12 +56,10 @@ pt: attributes: base: not_official: Não são oficiais - supported: Receberam suporte ou apoios proposals_split: attributes: base: not_official: Não são oficiais - supported: Receberam suporte ou apoios models: decidim/proposals/admin/update_proposal_category_event: Categoria da proposta modificada decidim/proposals/admin/update_proposal_scope_event: Âmbito da proposta modificado @@ -81,9 +79,6 @@ pt: decidim/proposals/proposal_note: one: Nota other: Notas - decidim/proposals/proposal_vote: - one: Voto - other: Votos decidim: admin: filters: @@ -117,7 +112,6 @@ pt: comment: Comentar create: Criar endorse: Endossar - vote: Voto vote_comment: Cometário ao voto withdraw: Retirar name: Propostas @@ -128,23 +122,18 @@ pt: amendments_wizard_help_text: Texto de ajuda do Assistente de Modificações announcement: Anúncio attachments_allowed: Permitir anexos - can_accumulate_supports_beyond_threshold: Pode acumular votos além do limite collaborative_drafts_enabled: Rascunhos colaborativos ativados comments_enabled: Comentários ativados comments_max_length: Comprimento máximo dos comentários (Deixar 0 para o valor predefinido) default_sort_order: Ordenamento por defeitos das propostas - default_sort_order_help: Por defeito significa que se os apoios estiverem activos as propostas serão ordenadas ao acaso, e se os apoios estiverem bloqueados serão ordenadas do maior para o menor número de apoios. default_sort_order_options: - default: Por defeito most_commented: Mais comentada most_endorsed: Mais apoiada most_followed: Mais seguida - most_voted: Mais apoiada random: Aleatório recent: Mais recentes with_more_authors: Com mais autores geocoding_enabled: Geocoding ativado - minimum_votes_per_user: Votos mínimos por utilizador new_proposal_body_template: Novo modelo de corpo de proposta new_proposal_body_template_help: Pode definir o texto pré-preenchido que as novas Propostas terão new_proposal_help_text: Novo texto de ajuda da proposta @@ -164,7 +153,6 @@ pt: scope_id: Âmbito scopes_enabled: Âmbitos activados threshold_per_proposal: Limiar por proposta - vote_limit: Limite de voto por participante step: amendment_creation_enabled: Criação de modificação ativada amendment_creation_enabled_help: O participante pode modificar propostas. @@ -182,13 +170,10 @@ pt: automatic_hashtags: Hashtags adicionados a todas as propostas comments_blocked: Comentários bloqueados default_sort_order: Ordenamento por defeitos das propostas - default_sort_order_help: Por defeito significa que se os apoios estiverem activos as propostas serão ordenadas ao acaso, e se os apoios estiverem bloqueados serão ordenadas do maior para o menor número de apoios. default_sort_order_options: - default: Por defeito most_commented: Mais comentada most_endorsed: Mais apoiada most_followed: Mais seguida - most_voted: Mais apoiada random: Aleatório recent: Mais recentes with_more_authors: Com mais autores @@ -197,9 +182,8 @@ pt: proposal_answering_enabled: Resposta de proposta ativada publish_answers_immediately: Publicar as respostas às propostas imediatamente suggested_hashtags: Hashtags sugeridos aos participantes para novas propostas - votes_blocked: Votação bloqueada - votes_enabled: Votação ativada - votes_hidden: Votos ocultos (se os votos estiverem ativados, selecionar isto esconderá o número de votos) + votes_blocked: Votos bloqueados + votes_enabled: Votos ativados events: proposals: admin: @@ -257,10 +241,7 @@ pt: email_subject: O âmbito da proposta %{resource_title} foi atualizado notification_title: O âmbito da proposta %{resource_title} foi atualizado por um administrador. voting_enabled: - email_intro: 'Pode votar em propostas em %{participatory_space_title}! Comece a participar nesta página:' email_outro: Recebeu esta notificação porque segue %{participatory_space_title}. Pode parar de receber notificações seguindo a hiperligação anterior. - email_subject: As propostas de votação começaram para %{participatory_space_title} - notification_title: Agora pode começar a votar em propostas em %{participatory_space_title} gamification: badges: accepted_proposals: @@ -277,13 +258,7 @@ pt: proposal_votes: conditions: - Navegue e passe algum tempo a ler as propostas de outras pessoas - - Votar nas propostas que gosta ou que considera interessantes - description: Este distintivo é concedido quando vota em propostas de outras pessoas. - description_another: Este participante votou em %{score} propostas. - description_own: Você deu suporte a %{score} propostas. - name: Votos da proposta - next_level_in: Vote em mais %{score} propostas para alcançar o próximo nível! - unearned_own: Ainda não votou em alguma proposta. + - proposals: conditions: - Escolha o espaço de participação do seu interesse com o envio de propostas ativado @@ -307,10 +282,6 @@ pt: description: Número de propostas object: propostas title: Propostas - votes: - description: Número de votos nas propostas - object: votos - title: Votos participatory_spaces: highlighted_proposals: see_all: Ver todos (%{count}) @@ -421,7 +392,6 @@ pt: remove_assignment: Remover atribuição remove_assignment_confirmation: Tem a certeza de que pretende remover o avaliador desta proposta? valuators: Avaliadores - votes_count: Contagem de votos update_category: invalid: 'Estas propostas já possuíam a categoria %{subject_name}: %{proposals}.' success: 'Propostas atualizadas corretamente para a categoria %{subject_name}: %{proposals}.' @@ -587,9 +557,6 @@ pt: buttons: amend: Modificar comment: Comentar - proposal_votes: - create: - error: Ocorreu um problema ao votar na proposta. proposals: dynamic_map_instructions: description: As coordenadas serão actualizadas quando clicar no botão ‘pré-visualização’. No entanto, o endereço não será alterado. @@ -617,7 +584,6 @@ pt: search: Pesquisar state: Estado type: Tipo - voted: Votado index: click_here: Ver todas as propostas collaborative_drafts_list: Aceder a rascunhos colaborativos @@ -635,7 +601,6 @@ pt: most_commented: Mais comentadas most_endorsed: Mais endossadas most_followed: Mais seguidas - most_voted: Mais votadas random: Aleatória recent: Recente with_more_authors: Com mais autores @@ -667,34 +632,13 @@ pt: proposal_accepted_reason: 'Esta proposta foi aceite porque:' proposal_in_evaluation_reason: Esta proposta está sob avaliação proposal_rejected_reason: 'Esta proposta foi rejeitada porque:' - withdraw_btn_hint: Pode retirar a sua proposta se mudar de ideia, desde que não tenha recebido nenhum voto. A proposta não é eliminada, aparecerá na lista de propostas retiradas. withdraw_confirmation_html: Tem a certeza de que deseja retirar esta proposta?

    Esta ação não pode ser cancelada! withdraw_proposal: Retirar proposta update: title: Atualizar proposta - vote_button: - already_voted: Já votou - already_voted_hover: Retirar voto - maximum_votes_reached: Limite de voto atingido - no_votes_remaining: Não há votos restantes - vote: Voto - votes_blocked: Votação desativada - votes_count: - count: - one: VOTO - other: VOTOS voting_rules: - can_accumulate_supports_beyond_threshold: - description: Cada proposta pode acumular mais de %{limit} votos - minimum_votes_per_user: - description: Deve distribuir um mínimo de %{votes} votos entre diferentes propostas. - supports_remaining: Tem que votar em mais %{remaining_votes} propostas para os seus votos serem levados em conta. proposal_limit: description: Pode criar até %{limit} propostas. - title: 'A votação está sujeita às seguintes regras:' - vote_limit: - description: Pode votar até %{limit} propostas. - votes: Votos wizard_aside: back: Retroceder back_from_step_1: Retroceder para as propostas @@ -729,4 +673,4 @@ pt: statistics: proposals_accepted: Propostas aceites proposals_count: Propostas - supports_count: Suportes + votes_count: Votos diff --git a/decidim-proposals/config/locales/ro-RO.yml b/decidim-proposals/config/locales/ro-RO.yml index 67afab1dbadf3..cb644d9a4ef83 100644 --- a/decidim-proposals/config/locales/ro-RO.yml +++ b/decidim-proposals/config/locales/ro-RO.yml @@ -56,12 +56,10 @@ ro: attributes: base: not_official: Nu sunt oficiale - supported: Au primit voturi sau susțineri proposals_split: attributes: base: not_official: Nu sunt oficiale - supported: Au primit voturi sau susțineri models: decidim/proposals/admin/update_proposal_category_event: Categorie de propunere modificată decidim/proposals/admin/update_proposal_scope_event: Domeniu de interes al propunerii modificat @@ -84,10 +82,6 @@ ro: one: Notă few: Note other: Note - decidim/proposals/proposal_vote: - one: Vot - few: Voturi - other: Voturi decidim: admin: filters: @@ -121,7 +115,6 @@ ro: comment: Comentează create: Creează endorse: Susține - vote: Votează vote_comment: Votează comentariul withdraw: Retrage name: Propuneri @@ -132,23 +125,18 @@ ro: amendments_wizard_help_text: Text de ajutor pentru amendamente announcement: Anunţ attachments_allowed: Permite atașamente - can_accumulate_supports_beyond_threshold: Se pot acumula voturi dincolo de pragul limită collaborative_drafts_enabled: Ciornele colaborative au fost activate comments_enabled: Comentariile au fost activate comments_max_length: Număr maxim de caractere a comentariilor (păstrează 0 pentru valoarea implicită) default_sort_order: Mod implicit de sortare a propunerilor - default_sort_order_help: Implicit înseamnă că dacă este activată votarea, propunerile vor fi afișate aleatoriu, și dacă votarea este blocată, atunci vor fi sortate în funcție de cele mai multe voturi. default_sort_order_options: - default: Implicit most_commented: Cele mai comentate most_endorsed: Cele mai susținute most_followed: Cele mai urmărite - most_voted: Cele mai votate random: Aleator recent: Recente with_more_authors: Cu mai mulți autori geocoding_enabled: Geocodarea a fost activată - minimum_votes_per_user: Număr minim de voturi pe utilizator new_proposal_body_template: Model de conținut pentru o propunere nouă new_proposal_body_template_help: Poți defini textul precompletat pe care îl vor avea noile propuneri new_proposal_help_text: Text de ajutor pentru propunere nouă @@ -169,7 +157,6 @@ ro: scope_id: Domeniu de interes scopes_enabled: Domeniile de interes au fost activate threshold_per_proposal: Prag per propunere - vote_limit: Limită de voturi pe participant step: amendment_creation_enabled: Crearea de amendamente a fost activată amendment_creation_enabled_help: Participantul poate face amendamente la propuneri. @@ -188,13 +175,10 @@ ro: comments_blocked: Comentarii blocate creation_enabled: Participantul poate crea propuneri default_sort_order: Mod implicit de sortare a propunerilor - default_sort_order_help: Implicit înseamnă că dacă este activată votarea, propunerile vor fi afișate aleatoriu, și dacă votarea este blocată, atunci vor fi sortate în funcție de cele mai multe voturi. default_sort_order_options: - default: Implicit most_commented: Cele mai comentate most_endorsed: Cele mai susținute most_followed: Cele mai urmărite - most_voted: Cele mai votate random: Aleator recent: Recente with_more_authors: Cu mai mulți autori @@ -203,9 +187,6 @@ ro: proposal_answering_enabled: Modulul de răspuns pentru propuneri a fost activat publish_answers_immediately: Publică imediat răspunsurile la propunere suggested_hashtags: Hashtag-uri sugerate participanţilor pentru noi propuneri - votes_blocked: Votare blocată - votes_enabled: Votare activată - votes_hidden: Voturi ascunse (dacă votarea este activată, bifarea acestei opțiuni va ascunde numărul de voturi primite) events: proposals: admin: @@ -263,10 +244,7 @@ ro: email_subject: Domeniul de interes al propunerii %{resource_title} a fost actualizat notification_title: Domeniul de interes al propunerii %{resource_title} a fost actualizat de către un administrator. voting_enabled: - email_intro: 'Poți vota propuneri pentru %{participatory_space_title}! Participă acum la această pagină:' email_outro: Ai primit această notificare deoarece urmărești %{participatory_space_title}. Poți anula aceste notificări de la link-ul anterior. - email_subject: A început votarea propunerilor pentru %{participatory_space_title} - notification_title: Acum poți începe să votezi propuneri pentru %{participatory_space_title} gamification: badges: accepted_proposals: @@ -283,13 +261,7 @@ ro: proposal_votes: conditions: - Răsfoiește paginile și petrece puțin timp citind propunerile altora - - Votează propunerilor care îți plac sau ți se par intersante - description: Această insignă este acordată atunci când votezi propunerile altora. - description_another: Acest participant a votat %{score} propuneri. - description_own: Ai votat %{score} propuneri. - name: Voturi pentru propuneri - next_level_in: Votează încă %{score} alte propuneri pentru a atinge următorul nivel! - unearned_own: Încă nu ai votat nicio propunere. + - proposals: conditions: - Alege spațiul de participare unde e activă opțiunea de a trimite propuneri conform domeniului tău de interes @@ -313,10 +285,6 @@ ro: description: Număr de propuneri object: propuneri title: Propuneri - votes: - description: Numărul de voturi pentru propuneri - object: voturi - title: Voturi participatory_spaces: highlighted_proposals: see_all: Afișează toate propunerile (%{count}) @@ -441,7 +409,6 @@ ro: remove_assignment: Elimină atribuirea remove_assignment_confirmation: Sigur dorești să elimini evaluatorul din această propunere? valuators: Evaluatori - votes_count: Număr de voturi update_category: invalid: 'Aceste propuneri aveau deja categoria %{subject_name} : %{proposals}.' success: 'Propuneri actualizate cu succes la categoria %{subject_name} : %{proposals}.' @@ -610,9 +577,6 @@ ro: buttons: amend: Trimite un amendament comment: Comentariu - proposal_votes: - create: - error: A apăut o problemă în timpul votării propunerii. proposals: dynamic_map_instructions: description: Coordonatele vor fi actualizate când apeși pe butonul 'previzualizează'. Cu toate acestea, adresa nu se schimbă. @@ -642,7 +606,6 @@ ro: search: Caută state: Stadiu type: Tip - voted: Votate index: click_here: Afișează toate propunerile collaborative_drafts_list: Accesează ciorne colaborative @@ -661,7 +624,6 @@ ro: most_commented: Cele mai comentate most_endorsed: Cele mai susținute most_followed: Cele mai urmărite - most_voted: Cele mai votate random: Aleatoriu recent: Recente with_more_authors: Cu mai mulți autori @@ -695,35 +657,13 @@ ro: proposal_accepted_reason: 'Această propunere a fost acceptată deoarece:' proposal_in_evaluation_reason: Această propunere este în curs de evaluare proposal_rejected_reason: 'Această propunere a fost respinsă deoarece:' - withdraw_btn_hint: Îți poți retrage propunerea dacă te răzgândești, cu condiția să nu fi primit niciun vot. Propunerea nu va fi eliminată, ci va apărea pe lista propunerilor retrase. withdraw_confirmation_html: Sigur dorești să retragi această propunere?

    Această acțiune nu poate fi anulată! withdraw_proposal: Retrage propunerea update: title: Actualizează propunerea - vote_button: - already_voted: Ai votat deja - already_voted_hover: Retrage votul - maximum_votes_reached: Ai atins limita de votare - no_votes_remaining: Niciun vot rămas - vote: Votează - votes_blocked: Votare dezactivată - votes_count: - count: - one: Vot - few: Voturi - other: Voturi voting_rules: - can_accumulate_supports_beyond_threshold: - description: Fiecare propunere poate acumula mai mult de %{limit} voturi - minimum_votes_per_user: - description: Trebuie să distribui un minim de %{votes} voturi pentru propuneri diferite. - supports_remaining: Trebuie să votezi încă %{remaining_votes} propuneri pentru ca votul tău să fie luat în considerare. proposal_limit: description: Poți crea până la %{limit} propuneri. - title: 'Voturile sunt supuse următoarelor reguli:' - vote_limit: - description: Poți vota până la %{limit} propuneri. - votes: Voturi wizard_aside: back: Înapoi back_from_step_1: Înapoi la propuneri @@ -758,4 +698,4 @@ ro: statistics: proposals_accepted: Propuneri acceptate proposals_count: Propuneri - supports_count: Voturi + votes_count: Voturi diff --git a/decidim-proposals/config/locales/ru.yml b/decidim-proposals/config/locales/ru.yml index 1852b05da0e53..c71d795a6204c 100644 --- a/decidim-proposals/config/locales/ru.yml +++ b/decidim-proposals/config/locales/ru.yml @@ -44,7 +44,7 @@ ru: other: Примечаний decidim/proposals/proposal_vote: one: Голос - few: Голоса + few: Голосов many: Голосов other: Голосов decidim: @@ -60,7 +60,6 @@ ru: global: announcement: Объявление attachments_allowed: Разрешить прикрпеленные файлы - can_accumulate_supports_beyond_threshold: Может накапливать выражения поддержки свыше порогового значения comments_enabled: Комментарии включены geocoding_enabled: Геокодирование включено new_proposal_help_text: Подсказки по созданию нового предложения @@ -72,7 +71,6 @@ ru: proposal_wizard_step_1_help_text: Справка мастера предложений о шаге "Создать" resources_permissions_enabled: Для каждого предложения можно задать те или иные разрешения на действия threshold_per_proposal: Порог для каждого предложения - vote_limit: Предельное количество голосов для одного участника step: announcement: Объявление comments_blocked: Комментарии отключены @@ -111,7 +109,6 @@ ru: voting_enabled: email_intro: 'Теперь вы можете голосовать по предложениям в %{participatory_space_title}! Начните со страницы:' email_outro: Вы получили это уведомление, потому что вы следите за «%{participatory_space_title}». Вы можете отписаться от уведомлений, перейдя по приведенной выше ссылке. - email_subject: В %{participatory_space_title} началось голосование по предложениям notification_title: Теперь в %{participatory_space_title} появилась возможность голосовать по предложениям proposals: actions: @@ -150,8 +147,6 @@ ru: new: create: Внести title: Создать предложение - show: - votes_count: Количество голосов proposals_imports: new: create: Позаимствовать предложения @@ -194,9 +189,6 @@ ru: state: Cостояние title: Заголовок votes: Голоса - proposal_votes: - create: - error: При голосовании по этому предложению произошли ошибки. proposals: edit: attachment_legend: "(Необязательно) Добавить вложение" @@ -242,30 +234,18 @@ ru: proposal_accepted_reason: 'Это предложение было принято, поскольку:' proposal_in_evaluation_reason: Это предложение сейчас рассматривается proposal_rejected_reason: 'Это предложение было отклонено, поскольку:' - withdraw_btn_hint: Вы можете снять свое предложение, если передумаете, пока вы не получили никакой поддержки. Предложение не будет удалено, оно будет указано в списке снятых предложений. withdraw_proposal: Снять предложение vote_button: already_voted: Уже проголосовали - already_voted_hover: Отменить голос maximum_votes_reached: Достигнуто предельное количество голосов no_votes_remaining: Больше не осталось голосов vote: Голосовать votes_blocked: Голосование отключено - votes_count: - count: - one: ГОЛОС - few: ГОЛОСА - many: ГОЛОСОВ - other: ГОЛОСА voting_rules: - can_accumulate_supports_beyond_threshold: - description: Каждое предложение может накапливать более %{limit} выражений поддержки proposal_limit: description: Вы можете создать до %{limit} предложений. - title: 'Голосование регулируется следующими правилами:' vote_limit: description: Вы можете проголосовать до %{limit} предложений. - votes: Голоса wizard_aside: back: Вернуться wizard_steps: diff --git a/decidim-proposals/config/locales/sk.yml b/decidim-proposals/config/locales/sk.yml index 1a9e70064c52b..c9fdf4d93516c 100644 --- a/decidim-proposals/config/locales/sk.yml +++ b/decidim-proposals/config/locales/sk.yml @@ -74,11 +74,6 @@ sk: few: Poznámky many: Poznámky other: Poznámky - decidim/proposals/proposal_vote: - one: Podpora - few: Podpory - many: Podpory - other: Podpory decidim: admin: filters: @@ -93,7 +88,6 @@ sk: amend: Upraviť create: Vytvoriť endorse: Schváliť - vote: Hlasovanie withdraw: Vrátiť späť name: Návrhy settings: @@ -103,11 +97,9 @@ sk: amendments_wizard_help_text: Sprievodca Pozmeňujúcimi návrhmi announcement: Oznámenie attachments_allowed: Povoliť prílohy - can_accumulate_supports_beyond_threshold: Môžu získať finančnú podporu nad stanovenú hranicu collaborative_drafts_enabled: Spoločné návrhy sú povolené comments_enabled: Komentáre povolené geocoding_enabled: Geokódovanie povolené - minimum_votes_per_user: Minimálny počet hlasov na užívateľa new_proposal_body_template: Telo šablóny nového návrhu new_proposal_body_template_help: Môžete definovať predvyplnený text, ktorý budú mať všetky nové návrhy new_proposal_help_text: Pomocný text ku novému návrhu @@ -121,7 +113,6 @@ sk: proposal_wizard_step_1_help_text: Pomocný text Sprievodcu "Vytvoriť" návrh resources_permissions_enabled: Pre každý návrh možno nastaviť povolenia akcie threshold_per_proposal: Maximálny limit na návrh - vote_limit: Počet hlasov na užívateľa step: amendment_creation_enabled: Umožniť tvorbu Pozmeňovacích návrhov amendment_creation_enabled_help: Účastníci môžu pozmeňovať návrhy. @@ -140,9 +131,6 @@ sk: proposal_answering_enabled: Odpovedanie na návrh je povolené publish_answers_immediately: Publikovať odpovede na návrhy okamžite suggested_hashtags: Hashtagy navrhované užívateľom pre ich nové návrhy - votes_blocked: Schvaľovanie bolo blokované - votes_enabled: Schvaľovanie povolené - votes_hidden: Hlasy skryté (ak sú povolené hlasy, pri kontrole sa skryje počet hlasov) events: proposals: collaborative_draft_access_accepted: @@ -196,10 +184,7 @@ sk: email_subject: Rozsah návrhu %{resource_title} bol aktualizovaný notification_title: Rozsah návrhu %{resource_title} bol aktualizovaný administrátorom. voting_enabled: - email_intro: 'Môžete hlasovať návrhy v %{participatory_space_title}! Zúčastnite sa na tejto stránke: ' email_outro: Toto oznámenie ste dostali, pretože sledujete %{participatory_space_title}. Notifikácie môžete zrušiť po kliknutí na predchádzajúci odkaz. - email_subject: Hlasovanie návrhov sa začalo na úrovni%{participatory_space_title} - notification_title: Teraz môžete začať hlasovania v %{participatory_space_title} gamification: badges: accepted_proposals: @@ -216,13 +201,7 @@ sk: proposal_votes: conditions: - Pozrite si a prečítajte návrhy ďalších účastníkov. - - Pridajte podporu návrhom, ktoré sa Vám páčia, alebo Vás zaujali. - description: Tento odznak ste dostali za podporu návrhov ďalších účastníkov. - description_another: Tento účastník podporil %{score} návrhov. - description_own: Podporili ste %{score} návrhov. - name: Podpora návrhu - next_level_in: Podporte o %{score} návrhov viac pre dosiahnutie ďalšej úrovne! - unearned_own: Zatiaľ ste nepodporili žiadne návrhy. + - proposals: conditions: - Vyberte si participatívny priestor, ktorý Vás zaujíma, ktorý umožňuje pridávanie návrhov. @@ -246,10 +225,6 @@ sk: description: Počet návrhov object: návrhy title: Návrhy - votes: - description: Počete hlasov za návrhy - object: hlasy - title: Hlasy participatory_spaces: highlighted_proposals: see_all: Zobraziť všetky (%{count}) @@ -359,7 +334,6 @@ sk: remove_assignment: Zrušiť priradenie remove_assignment_confirmation: Ste si istý, že chcete odstrániť hodnotiteľa z návrhu? valuators: Hodnotiteľ - votes_count: Počet hlasov update_category: invalid: 'Tieto návrhy už majú kategóriu %{subject_name}: %{proposals}.' success: 'Návrhy úspešne pridané do kategórie %{subject_name}: %{proposals}.' @@ -525,9 +499,6 @@ sk: buttons: amend: doplňujúci návrh comment: Komentár - proposal_votes: - create: - error: Pri hlasovaní o návrhu došlo k chybám. proposals: edit: attachment_legend: "(Voliteľné) Pridanie prílohy" @@ -552,7 +523,6 @@ sk: search: Vyhľadávanie state: Štát type: Typ - voted: Hlasoval index: collaborative_drafts_list: Získajte prístup k spolupráci count: @@ -569,7 +539,6 @@ sk: most_commented: Najviac komentované most_endorsed: Najviac schválené most_followed: Najviac sledované - most_voted: Najviac hlasovalo random: Náhodný recent: Nedávno with_more_authors: S viac autormi @@ -601,33 +570,10 @@ sk: proposal_accepted_reason: 'Tento návrh bol prijatý, pretože:' proposal_in_evaluation_reason: Tento návrh sa hodnotí proposal_rejected_reason: 'Tento návrh bol zamietnutý, pretože:' - withdraw_btn_hint: Ak zmeníte názor, môžete svoj návrh stiahnuť, ak ste nedostali žiadnu podporu. Návrh nie je zrušený, objaví sa v zozname stiahnutých návrhov. withdraw_proposal: Návrh stiahnuť - vote_button: - already_voted: Už bolo hlasované - already_voted_hover: Zavolajte - maximum_votes_reached: Dosiahla sa obmedzenie hlasovania - no_votes_remaining: Žiadne zostávajúce hlasy - vote: Hlasovanie - votes_blocked: Hlasovanie je zakázané - votes_count: - count: - one: HLASOVANIE - few: HLASOVANIE - many: HLASOVANIE - other: HLASOVANIE voting_rules: - can_accumulate_supports_beyond_threshold: - description: Každý návrh môže akumulovať viac ako%{limit} pomoci - minimum_votes_per_user: - description: Musíte rozdeliť minimálne %{votes} hlasov medzi rôzne návrhy. - supports_remaining: Musíte hlasovať o ďalších %{remaining_votes} návrhoch, aby sa vaše hlasy zohľadnili. proposal_limit: description: Môžete vytvoriť až %{limit} návrhov. - title: 'Hlasovanie podlieha týmto pravidlám:' - vote_limit: - description: Môžete hlasovať až pre %{limit} návrhov. - votes: Hlasy wizard_aside: back: Zadná wizard_steps: diff --git a/decidim-proposals/config/locales/sv.yml b/decidim-proposals/config/locales/sv.yml index f95b8394d7172..a146c46c63edc 100644 --- a/decidim-proposals/config/locales/sv.yml +++ b/decidim-proposals/config/locales/sv.yml @@ -56,12 +56,10 @@ sv: attributes: base: not_official: Är inte officiella - supported: Har fått stöd eller instämmande proposals_split: attributes: base: not_official: Är inte officiella - supported: Har fått stöd eller instämmande models: decidim/proposals/admin/update_proposal_category_event: Förslagskategori ändrad decidim/proposals/admin/update_proposal_scope_event: Ändrat förslagets omfång @@ -82,8 +80,8 @@ sv: one: Anteckning other: Anteckningar decidim/proposals/proposal_vote: - one: Stöd - other: Stöd + one: Röst + other: Röster decidim: admin: filters: @@ -123,7 +121,7 @@ sv: comment: Kommentera create: Skapa endorse: Instäm - vote: Stötta + vote: Rösta vote_comment: Rösta på en kommentar withdraw: Dra tillbaka name: Förslag @@ -134,23 +132,18 @@ sv: amendments_wizard_help_text: Hjälptext för guiden för ändringsförslag announcement: Meddelande attachments_allowed: Tillåt bilagor - can_accumulate_supports_beyond_threshold: Kan samla in stöd bortom tröskeln collaborative_drafts_enabled: Samarbetsutkast aktiverat comments_enabled: Kommentarer aktiverade comments_max_length: Maximal längd för kommentarer (Lämna 0 för standardvärde) default_sort_order: Förvald produkt sortering - default_sort_order_help: Förinställt innebär att om stödet är aktiverat kommer förslagen sorteras slumpmässigt, och om stöden är blockerade kommer de att sorteras efter mest stödda. default_sort_order_options: - default: Förinställt most_commented: Mest kommenterade most_endorsed: Mest instämda i most_followed: Mest följda - most_voted: Mest stödda random: Slumpmässigt recent: Senaste with_more_authors: Med fler författare geocoding_enabled: Geokodning aktiverad - minimum_votes_per_user: Minsta antal stöd per användare new_proposal_body_template: Innehållsmall för nytt förslag new_proposal_body_template_help: Du kan ange den förifyllda texten för nya förslag new_proposal_help_text: Hjälptext om nya förslag @@ -170,7 +163,6 @@ sv: scope_id: Omfång scopes_enabled: Omfång aktiverade threshold_per_proposal: Tröskel per förslag - vote_limit: Stödgräns per deltagare step: amendment_creation_enabled: Skapa ändringar är aktiverat amendment_creation_enabled_help: Deltagare kan ändra förslag. @@ -189,13 +181,10 @@ sv: comments_blocked: Kommentarer blockerade creation_enabled: Deltagare kan skapa förslag default_sort_order: Förvald produkt sortering - default_sort_order_help: Förinställt innebär att om stödet är aktiverat kommer förslagen sorteras slumpmässigt, och om stöden är blockerade kommer de att sorteras efter mest stödda. default_sort_order_options: - default: Förinställt most_commented: Mest kommenterade most_endorsed: Mest instämda i most_followed: Mest följda - most_voted: Mest stödda random: Slumpmässigt recent: Senaste with_more_authors: Med fler författare @@ -204,9 +193,9 @@ sv: proposal_answering_enabled: Svar på förslag aktiverat publish_answers_immediately: Publicera svar på förslag omedelbart suggested_hashtags: Förslag på hashtags för nya förslag till deltagare - votes_blocked: Stöd blockerat - votes_enabled: Stöd aktiverat - votes_hidden: Stöd dolda (om stöd är aktiverade, kommer detta att gömma antalet stöd) + votes_blocked: Röster blockerade + votes_enabled: Röster aktiverade + votes_hidden: Röster dolda (om röster är aktiverade, kommer detta att gömma antalet röster) events: proposals: admin: @@ -264,10 +253,9 @@ sv: email_subject: Omfånget för förslaget %{resource_title} har uppdaterats notification_title: Omfånget för förslaget %{resource_title} har uppdaterats av en administratör. voting_enabled: - email_intro: 'Du kan stödja förslag i %{participatory_space_title}! Börja delta på den här sidan:' + email_intro: 'Du kan rösta på förslag på %{participatory_space_title}! Börja delta på den här sidan:' email_outro: Du har fått det här meddelandet eftersom du följer %{participatory_space_title}. Du kan sluta att ta emot meddelanden via föregående länk. - email_subject: Förslagsstöd har påbörjats för %{participatory_space_title} - notification_title: Du kan nu börja att stödja förslag i %{participatory_space_title} + notification_title: Du kan nu börja röstningsförslag i %{participatory_space_title} gamification: badges: accepted_proposals: @@ -284,13 +272,7 @@ sv: proposal_votes: conditions: - Bläddra runt och ägna lite tid åt att läsa andras förslag - - Ge stöd till de förslag som du tycker om eller tycker är intressanta - description: Du får detta märke när du stöder förslag från andra. - description_another: Denna användare har gett stöd till %{score} förslag. - description_own: Du har gett stöd till %{score} förslag. - name: Stött förslag - next_level_in: Ge stöd till %{score} fler förslag för att nå nästa nivå! - unearned_own: Du har inte gett stöd till några förslag än. + - proposals: conditions: - Välj det deltagarutrymme där inlämning av förslag är aktiverat som är av intresse @@ -315,9 +297,8 @@ sv: object: förslag title: Förslag votes: - description: Antal stöd till förslag - object: stöd - title: Stöd + object: röster + title: Röster participatory_spaces: highlighted_proposals: last: Senaste förslag @@ -440,7 +421,6 @@ sv: remove_assignment: Ta bort tilldelning remove_assignment_confirmation: Vill du ta bort värderaren från förslaget? valuators: Värderare - votes_count: Antal stöd update_category: invalid: 'Dessa förslag var redan i kategorin %{subject_name}: %{proposals}.' success: 'Förslag som har uppdaterats till kategorin %{subject_name}: %{proposals}.' @@ -615,9 +595,6 @@ sv: buttons: amend: Ändra comment: Kommentar - proposal_votes: - create: - error: Det gick inte att stödja förslaget. proposals: dynamic_map_instructions: description: Koordinaterna uppdateras när du klickar på knappen 'Förhandsgranska'. Adressen ändras dock inte. @@ -647,7 +624,7 @@ sv: search: Sök state: Status type: Typ - voted: Stöder + voted: Röstade index: click_here: Se alla förslag collaborative_drafts_list: Visa gemensamma utkast @@ -665,7 +642,7 @@ sv: most_commented: Mest kommenterade most_endorsed: Mest instämda i most_followed: Mest följda - most_voted: Mest stöd + most_voted: Mest röstade random: Slumpmässig recent: Senaste with_more_authors: Med fler författare @@ -700,34 +677,21 @@ sv: proposal_accepted_reason: 'Detta förslag har accepterats eftersom:' proposal_in_evaluation_reason: Detta förslag utvärderas proposal_rejected_reason: 'Detta förslag har avslagits på grund av att:' - withdraw_btn_hint: Du kan dra tillbaka ett förslag om du ändrar dig, så länge som det inte har fått något stöd. Förslaget raderas inte utan kommer att visas i listan över förslag som dragits tillbaka. withdraw_confirmation_html: Är du säker på att du vill dra tillbaka förslaget?

    Denna åtgärd kan inte ångras! withdraw_proposal: Dra tillbaka förslaget update: title: Uppdatera förslag vote_button: - already_voted: Redan stött - already_voted_hover: Dra tillbaka stöd - maximum_votes_reached: Uppnått stödgränsen - no_votes_remaining: Inga stöd kvar - vote: Stöd - votes_blocked: Stöd är avaktiverat - votes_count: - count: - one: STÖDER - other: STÖDER + already_voted: Redan röstat + maximum_votes_reached: Röstningsgränsen uppnådd + no_votes_remaining: Inga röster kvar + vote: Rösta + votes_blocked: Röstning inaktiverad voting_rules: - can_accumulate_supports_beyond_threshold: - description: Varje förslag kan samla mer än %{limit} stöd - minimum_votes_per_user: - description: Du måste fördela minst %{votes} stöd mellan olika förslag. - supports_remaining: Du måste stödja ytterligare %{remaining_votes} förslag för att dina stöd ska beaktas. proposal_limit: description: Du kan skapa upp till %{limit} förslag. - title: 'Stöd är föremål för följande regler:' vote_limit: - description: Du kan stödja upp till %{limit} förslag. - votes: Stöder + description: Du kan rösta upp till %{limit} förslag. wizard_aside: back: Tillbaka back_from_step_1: Tillbaka till förslag @@ -762,4 +726,4 @@ sv: statistics: proposals_accepted: Godkända Förslag proposals_count: Förslag - supports_count: Stöd + votes_count: Röster diff --git a/decidim-proposals/config/locales/tr-TR.yml b/decidim-proposals/config/locales/tr-TR.yml index 8edf6578727af..a1b92bf224b28 100644 --- a/decidim-proposals/config/locales/tr-TR.yml +++ b/decidim-proposals/config/locales/tr-TR.yml @@ -83,9 +83,6 @@ tr: decidim/proposals/proposal_note: one: Not other: Notlar - decidim/proposals/proposal_vote: - one: Destek - other: Destekler decidim: admin: filters: @@ -120,7 +117,6 @@ tr: amend: Değiştir create: Oluştur endorse: Onayla - vote: Destek withdraw: Geri çek name: Teklifler settings: @@ -130,12 +126,10 @@ tr: amendments_wizard_help_text: Değişiklik Sihirbazı yardım metni announcement: Duyuru attachments_allowed: Eklere izin ver - can_accumulate_supports_beyond_threshold: Eşiğin ötesinde destek biriktirebilir collaborative_drafts_enabled: Ortak çalışma taslakları etkin comments_enabled: Yorumlar etkin comments_max_length: Maksimum yorum uzunluğu (Varsayılan değer için 0 bırakın) geocoding_enabled: Coğrafi kod etkin - minimum_votes_per_user: Kullanıcı başına minimum destek new_proposal_body_template: Yeni teklif gövdesi şablonu new_proposal_body_template_help: Yeni Tekliflerin sahip olacağı önceden doldurulmuş metni tanımlayabilirsiniz new_proposal_help_text: Yeni teklif yardım metni @@ -147,11 +141,11 @@ tr: proposal_length: Maksimum teklif gövdesi uzunluğu proposal_limit: Katılımcı başına teklif sınırı proposal_wizard_step_1_help_text: Teklif sihirbazı "Oluştur" adımı yardım metni + proposal_wizard_step_2_help_text: Teklif "Yayınlama" sihirbazı yardım metni resources_permissions_enabled: Her teklif için işlem izinleri ayarlanabilir scope_id: Kapsam scopes_enabled: Kapsamlar etkinleştirildi threshold_per_proposal: Teklif başına eşik - vote_limit: Katılımcı başına destek sınırı step: amendment_creation_enabled: Değişiklik oluşturma etkinleştirildi amendment_creation_enabled_help: Katılımcı teklifleri değiştirebilir. @@ -173,9 +167,6 @@ tr: proposal_answering_enabled: Teklif yanıtlama etkin publish_answers_immediately: Teklif yanıtlarını hemen yayınlayın suggested_hashtags: Yeni teklifler için katılımcılara önerilen etiketler - votes_blocked: Engellenen destekler - votes_enabled: Destekler etkin - votes_hidden: Gizli desteği destekler (destekler etkinleştirilmişse, bunu kontrol etmek destek sayısını gizleyecektir) events: proposals: admin: @@ -244,10 +235,7 @@ tr: email_subject: '%{resource_title} teklif kapsamı güncellendi' notification_title: %{resource_title} teklif kapsamı bir yönetici tarafından güncellendi. voting_enabled: - email_intro: 'Teklifleri %{participatory_space_title} içinde destekleyebilirsiniz! Bu sayfaya katılmaya başlayın:' email_outro: Bu bildirimi, %{participatory_space_title} izlediğiniz için aldınız. Önceki bağlantıyı takip ederek bildirimleri almayı durdurabilirsiniz. - email_subject: '%{participatory_space_title} için teklif desteği başladı' - notification_title: Artık %{participatory_space_title} içinde destekleyici teklifleri başlatabilirsiniz gamification: badges: accepted_proposals: @@ -264,13 +252,7 @@ tr: proposal_votes: conditions: - Göz atın ve diğer insanların önerilerini okumak için biraz zaman harcayın - - Beğendiğiniz ya da ilginç bulduğunuz tekliflere destek verin - description: Bu rozet, başkalarının önerilerini desteklediğinizde verilir. - description_another: Bu katılımcı %{score} teklife destek verdi. - description_own: '%{score} teklife destek verdiniz.' - name: Teklif destekleri - next_level_in: Bir sonraki seviyeye ulaşmak için %{score} adetten fazla teklife destek verin! - unearned_own: Henüz hiçbir teklife destek vermediniz. + - proposals: conditions: - Tekliflerin sunulması için gönderim ile ilgilendiğiniz katılım alanını seçin @@ -294,10 +276,6 @@ tr: description: Teklif sayısı object: teklifler title: Teklifler - votes: - description: Tekliflere verilen desteklerin sayısı - object: destekler - title: Destekler participatory_spaces: highlighted_proposals: see_all: Tüm teklifleri görün (%{count}) @@ -344,6 +322,7 @@ tr: md: Markdown odt: ODT bottom_hint: "(Belge bölümlerini önizleyebilir ve sıralayabilirsiniz)" + document_legend: '2 Mb''tan küçük bir belge ekleyin; 3 seviyeye kadar olan her bölüm tekliflere ayrıştırılacaktır. Desteklenen formatlar şunlardır: %{valid_mime_types}' title: BELGE EKLE upload_document: Belge yükle sections: @@ -431,7 +410,6 @@ tr: remove_assignment: Atamayı kaldır remove_assignment_confirmation: Bilirkişiyi, bu tekliften çıkarmak istediğinizden emin misiniz? valuators: Bilirkişiler - votes_count: Oy sayısı update_category: invalid: 'Bu teklifler zaten %{subject_name} kategorisine sahipti: %{proposals}.' success: 'Teklifler, %{subject_name} kategorisine başarıyla güncellendi: %{proposals}.' @@ -598,9 +576,6 @@ tr: buttons: amend: Düzelt comment: Yorum Yap - proposal_votes: - create: - error: Teklifi destekleyen bir sorun vardı. proposals: edit: attachment_legend: "(İsteğe bağlı) Bir ek ekleyin" @@ -613,6 +588,8 @@ tr: discard_confirmation: Bu teklif taslağını silmek istediğinizden emin misiniz? send: Ön izleme title: Teklif Taslağını Düzenle + edit_form_fields: + marker_added: haritaya İşaretçi eklendi. filters: activity: Aktivitelerim all: Tümü @@ -625,7 +602,6 @@ tr: search: Arama state: Statü type: tip - voted: Desteklenmiş index: collaborative_drafts_list: Ortak çalışmaya dayalı taslaklara erişin count: @@ -640,7 +616,6 @@ tr: most_commented: En çok yorum yapılan most_endorsed: En çok onaylanan most_followed: En çok takip edilen - most_voted: En çok desteklenen random: Rastgele recent: En son with_more_authors: Daha fazla yazarlı @@ -670,40 +645,21 @@ tr: proposal_accepted_reason: 'Bu teklif kabul edildi çünkü:' proposal_in_evaluation_reason: Bu teklif değerlendiriliyor proposal_rejected_reason: 'Bu teklif reddedildi çünkü:' - withdraw_btn_hint: Herhangi bir destek almadığınız sürece fikrinizi değiştirirseniz teklifinizi geri çekebilirsiniz. Teklif silinmemiş, iptal edilen teklifler listesinde görünecektir. withdraw_confirmation_html: Bu teklifi geri çekmek istediğinizden emin misiniz?

    Bu eylem iptal edilemez! withdraw_proposal: Teklifi geri çek update: title: Teklif güncelleme - vote_button: - already_voted: Çoktan oy verildi - already_voted_hover: Unvote - maximum_votes_reached: Oy limiti aşıldı - no_votes_remaining: Kalan oy yok - vote: Oy - votes_blocked: Oylama devre dışı - votes_count: - count: - one: OY - other: OYLAR voting_rules: - can_accumulate_supports_beyond_threshold: - description: Her teklif, %{limit} fazla destek biriktirebilir - minimum_votes_per_user: - description: Farklı teklifler arasında en az %{votes} oy kullanmalısınız. - supports_remaining: Oylarınızın dikkate alınması için %{remaining_votes} daha fazla teklif vermeniz gerekiyor. proposal_limit: description: En fazla %{limit} teklif oluşturabilirsin. - title: 'Oylama aşağıdaki kurallara tabidir:' - vote_limit: - description: En fazla %{limit} teklife oy verebilirsiniz. - votes: oy wizard_aside: back: Geri back_from_step_1: Teklifte geri dön + back_from_step_2: Düzenlemeye Dönünüz wizard_steps: current_step: Geçerli adım step_1: Teklifinizi oluşturun + step_2: Teklifinizi Yayınlayın title: Teklif oluşturma adımları proposals_picker: choose_proposals: Teklifleri seçin diff --git a/decidim-proposals/config/locales/uk.yml b/decidim-proposals/config/locales/uk.yml index 8568a1fe4dd02..ae428dda000fb 100644 --- a/decidim-proposals/config/locales/uk.yml +++ b/decidim-proposals/config/locales/uk.yml @@ -44,7 +44,7 @@ uk: other: Приміток decidim/proposals/proposal_vote: one: Голос - few: Голоси + few: Голосів many: Голосів other: Голосів decidim: @@ -60,7 +60,6 @@ uk: global: announcement: Оголошення attachments_allowed: Дозволити вкладення - can_accumulate_supports_beyond_threshold: Можна накопичувати прояви підтримки більше порогового значення comments_enabled: Коментарі увімкнено geocoding_enabled: Геокодування увімкнено new_proposal_help_text: Підказки зі внесення нової пропозиції @@ -72,7 +71,6 @@ uk: proposal_wizard_step_1_help_text: Довідка майстра пропозицій щодо кроку "Створити" resources_permissions_enabled: Для кожної пропозиції можна встановити ті чи інші дозволи на дії threshold_per_proposal: Поріг на кожну пропозицію - vote_limit: Гранична кількість голосів від одного учасника step: announcement: Оголошення comments_blocked: Коментарі вимкнено @@ -80,7 +78,7 @@ uk: endorsements_enabled: Надання підтримки увімкнено proposal_answering_enabled: Відповіді на пропозиції увімкнено votes_blocked: Голосування вимкнене - votes_enabled: Голосування ввімкнене + votes_enabled: Голосування увімкнене votes_hidden: Голоси приховані (якщо голосування увімкнене, то буде сховано кількість голосів) events: proposals: @@ -111,7 +109,6 @@ uk: voting_enabled: email_intro: 'Ви можете голосувати щодо пропозицій у %{participatory_space_title}! Почніть брати участь зі сторінки:' email_outro: Ви отримали це сповіщення, тому що ви стежите за %{participatory_space_title}. Ви можете відписатися від цих сповіщень, перейшовши за наведеним вище посиланням. - email_subject: У %{participatory_space_title} почалось голосування щодо пропозицій notification_title: Тепер в %{participatory_space_title} відкрилась можливість голосувати щодо пропозицій proposals: actions: @@ -150,8 +147,6 @@ uk: new: create: Внести title: Створити пропозицію - show: - votes_count: Кількість голосів proposals_imports: new: create: Запозичити пропозиції @@ -194,9 +189,6 @@ uk: state: Стан title: Назва votes: Голоси - proposal_votes: - create: - error: При голосуванні щодо пропозиції сталися помилки. proposals: edit: attachment_legend: "(Необов'язково) Додати вкладений файл" @@ -242,30 +234,18 @@ uk: proposal_accepted_reason: 'Ця пропозиція була прийнята, тому що:' proposal_in_evaluation_reason: Ця пропозиція розглядається proposal_rejected_reason: 'Ця пропозиція була відхилена, оскільки:' - withdraw_btn_hint: Ви можете зняти свою пропозицію, якщо ви передумали, доки ви не отримали жодної підтримки. Пропозиція не видаляється, вона з'явиться у списку відкликаних пропозицій. withdraw_proposal: Зняти пропозицію vote_button: already_voted: Вже проголосували - already_voted_hover: Скасувати голос maximum_votes_reached: Використано всі голоси no_votes_remaining: Не залишилось голосів vote: Голосувати votes_blocked: Голосування вимкнене - votes_count: - count: - one: ГОЛОС - few: ГОЛОСИ - many: ГОЛОСІВ - other: ГОЛОСІВ voting_rules: - can_accumulate_supports_beyond_threshold: - description: Кожну пропозицію можуть підтримувати понад %{limit} людей proposal_limit: description: Ви можете висунути до %{limit} пропозицій. - title: 'Голосування регулюється наступними правилами:' vote_limit: description: Ви можете проголосувати до %{limit} пропозицій. - votes: Голоси wizard_aside: back: Повернутись wizard_steps: diff --git a/decidim-proposals/config/locales/zh-CN.yml b/decidim-proposals/config/locales/zh-CN.yml index d4703bedead6d..a220de61e3ac5 100644 --- a/decidim-proposals/config/locales/zh-CN.yml +++ b/decidim-proposals/config/locales/zh-CN.yml @@ -64,8 +64,6 @@ zh-CN: other: 建议 decidim/proposals/proposal_note: other: 注 - decidim/proposals/proposal_vote: - other: 支持 decidim: admin: filters: @@ -98,7 +96,6 @@ zh-CN: amend: 修改: create: 创建 endorse: 批准 - vote: 支持 withdraw: 取款 name: 建议 settings: @@ -108,12 +105,10 @@ zh-CN: amendments_wizard_help_text: 修正向导帮助文本 announcement: 通 知 attachments_allowed: 允许附件 - can_accumulate_supports_beyond_threshold: 可以积累超过阈值的支持 collaborative_drafts_enabled: 协作草稿已启用 comments_enabled: 评论已启用 comments_max_length: 评论最大长度 (默认值留0) geocoding_enabled: 地理编码已启用 - minimum_votes_per_user: 每个用户的最低支持 new_proposal_body_template: 新的提案正文模板 new_proposal_body_template_help: 您可以定义新建议将包含的预填文本 new_proposal_help_text: 新建议帮助文本 @@ -129,7 +124,6 @@ zh-CN: scope_id: 范围 scopes_enabled: 范围已启用 threshold_per_proposal: 每个建议的阈值 - vote_limit: 每位参与者的支持限制 step: amendment_creation_enabled: 修改创建已启用 amendment_creation_enabled_help: 参加者可以修改提案。 @@ -151,9 +145,6 @@ zh-CN: proposal_answering_enabled: 建议答案已启用 publish_answers_immediately: 立即发布提案答案 suggested_hashtags: 推荐给参与者的新建议标签 - votes_blocked: 支持被阻止 - votes_enabled: 支持已启用 - votes_hidden: 支持隐藏 (如果支持已启用,选中将隐藏支持次数) events: proposals: admin: @@ -207,9 +198,7 @@ zh-CN: email_subject: '%{resource_title} 建议范围已更新' notification_title: %{resource_title} 提议范围已被管理员更新。 voting_enabled: - email_intro: '您可以在 %{participatory_space_title}中支持建议!开始参与此页面:' email_outro: 您收到此通知是因为您正在关注 %{participatory_space_title}。您可以停止收到跟随上一个链接的通知。 - email_subject: '%{participatory_space_title} 的建议支持已经开始' gamification: badges: accepted_proposals: @@ -226,13 +215,7 @@ zh-CN: proposal_votes: conditions: - 浏览并花一些时间阅读其他人的建议 - - 支持您想要的建议或有趣的 - description: 当你支持其他人的建议时,这个徽章将被授予。 - description_another: 此参与者已经支持 %{score} 提案。 - description_own: 您已经对 %{score} 的建议给予了支持。 - name: 建议支持 - next_level_in: 支持更多 %{score} 个建议以达到下一级! - unearned_own: 您还没有对任何建议给予支持。 + - proposals: conditions: - 选择您感兴趣的提交建议的参与空间 @@ -256,10 +239,6 @@ zh-CN: description: 建议数 object: 提议 title: 建议 - votes: - description: 支持提议的数量 - object: 支持 - title: 支持 participatory_spaces: highlighted_proposals: see_all: 查看所有建议 (%{count}) @@ -365,7 +344,6 @@ zh-CN: remove_assignment: 移除作业 remove_assignment_confirmation: 您确定要从此建议中删除值吗? valuators: 估价器 - votes_count: 支持计数 update_category: invalid: '这些建议已经有 %{subject_name} 分类: %{proposals}。' success: '建议已成功更新到 %{subject_name} 类别: %{proposals}。' @@ -527,9 +505,6 @@ zh-CN: buttons: amend: 修改: comment: 评论 - proposal_votes: - create: - error: 有一个问题支持这项提议。 proposals: edit: attachment_legend: "(可选) 添加附件" @@ -554,7 +529,6 @@ zh-CN: search: 搜索 state: 状态 type: 类型 - voted: 支持的 index: collaborative_drafts_list: 访问协作草稿 count: @@ -568,7 +542,6 @@ zh-CN: most_commented: 最多评论 most_endorsed: 最多支持 most_followed: 关注最多的 - most_voted: 最多支持 random: 随机播放 recent: 最近的 with_more_authors: 有更多作者 @@ -594,33 +567,13 @@ zh-CN: proposal_accepted_reason: '这一提议已被接受,原因是:' proposal_in_evaluation_reason: 这项建议正在评估 proposal_rejected_reason: '这一提议被否决,理由是:' - withdraw_btn_hint: 如果您改变主意,只要您没有得到任何支持,您可以撤回您的建议。 该提案未予删除,将列入撤回的提案清单。 withdraw_confirmation_html: 您确定要撤回此建议吗?

    此操作不能取消! withdraw_proposal: 撤回提案 update: title: 更新提议 - vote_button: - already_voted: 已经支持 - already_voted_hover: 取款支持 - maximum_votes_reached: 已达到支持上限 - no_votes_remaining: 不支持剩余 - vote: 支持 - votes_blocked: 支持已禁用 - votes_count: - count: - other: 支持 voting_rules: - can_accumulate_supports_beyond_threshold: - description: 每个建议都可以积累超过 %{limit} 个支持 - minimum_votes_per_user: - description: 您必须在不同的建议中至少分配 %{votes} 支持。 - supports_remaining: 您必须支持 %{remaining_votes} 个更多的建议以便您的支持被考虑。 proposal_limit: description: 您最多可以创建 %{limit} 个建议。 - title: '支持受以下规则约束:' - vote_limit: - description: 您可以最多支持 %{limit} 个建议。 - votes: 支持 wizard_aside: back: 后退 back_from_step_1: 回到提议 diff --git a/decidim-proposals/config/locales/zh-TW.yml b/decidim-proposals/config/locales/zh-TW.yml index ab4cba0fe2db1..e807611447835 100644 --- a/decidim-proposals/config/locales/zh-TW.yml +++ b/decidim-proposals/config/locales/zh-TW.yml @@ -61,12 +61,10 @@ zh-TW: attributes: base: not_official: 非正式 - supported: 已獲得支持或連署 proposals_split: attributes: base: not_official: 非正式 - supported: 已獲得支持或連署 models: decidim/proposals/admin/update_proposal_category_event: 提案類別已更改 decidim/proposals/admin/update_proposal_scope_event: 提案範圍已更改 @@ -83,8 +81,6 @@ zh-TW: other: 提案 decidim/proposals/proposal_note: other: 備註 - decidim/proposals/proposal_vote: - other: 支援 decidim: admin: filters: @@ -118,7 +114,6 @@ zh-TW: comment: 評論 create: 建立 endorse: 連署 - vote: 支援 vote_comment: 投票評論 withdraw: 撤回 name: 提案 @@ -129,23 +124,18 @@ zh-TW: amendments_wizard_help_text: 修改向導説明文字 announcement: 公告 attachments_allowed: 允許附檔 - can_accumulate_supports_beyond_threshold: 能夠累積支持至超過門檻 collaborative_drafts_enabled: ' 啟用協作草稿' comments_enabled: 已啟用留言 comments_max_length: 評論字數最大長度(若要使用預設值請輸入0) default_sort_order: 預設提案排序 - default_sort_order_help: 默認意味著如果啟用了支持,則建議將提案按隨機順序排序,如果封鎖了支持,則將按最受支持的順序排序。 default_sort_order_options: - default: 預設值 most_commented: 最多評論 most_endorsed: 最多已連署 most_followed: 最多追蹤者 - most_voted: 最受支持的 random: 隨機 recent: 最近 with_more_authors: 有更多作者 geocoding_enabled: 地理編碼已啟用 - minimum_votes_per_user: 每位使用者最少贊成數量 new_proposal_body_template: 新提案正文樣板 new_proposal_body_template_help: 您可以定義新提案預先填寫的文字 new_proposal_help_text: 新提案幫助文本 @@ -165,7 +155,6 @@ zh-TW: scope_id: 範圍 scopes_enabled: 啟用範圍 threshold_per_proposal: 每個提案的門檻 - vote_limit: 每位參與者可支持的數量上限 step: amendment_creation_enabled: 創建修正案已啟用 amendment_creation_enabled_help: 參與者可修改提案 @@ -185,13 +174,10 @@ zh-TW: creation_enabled: 參與者可以建立提案 creation_enabled_readonly: 啟用參與式文本功能後,此設置將被禁用。要將提案上傳為參與式文本,請點擊“參與式文本”按鈕,然後按照說明進行操作。 default_sort_order: 預設提案排序 - default_sort_order_help: 默認意味著如果啟用了支持,則建議將提案按隨機順序排序,如果封鎖了支持,則將按最受支持的順序排序。 default_sort_order_options: - default: 預設值 most_commented: 最多評論 most_endorsed: 最多已連署 most_followed: 最多追蹤者 - most_voted: 最受支持的 random: 隨機 recent: 最近 with_more_authors: 有更多作者 @@ -201,9 +187,6 @@ zh-TW: publish_answers_immediately: 立即發布提案回答 publish_answers_immediately_help_html: '請注意,如果您在未啟用此功能的情況下回答任何提案,您將需要手動選擇它們並使用發布操作進行發布。有關此操作的更多信息,請參閱 提案答案文檔頁面。' suggested_hashtags: 為新提案建議參與者使用的標籤 - votes_blocked: 封鎖支持 - votes_enabled: 啟用支持 - votes_hidden: 隱藏支持(如果支持被啟用,勾選此選項將隱藏支持的數量) events: proposals: admin: @@ -279,10 +262,7 @@ zh-TW: email_subject: '%{resource_title} 提案範圍已更新' notification_title: %{resource_title} 提案範圍已由管理員更新。 voting_enabled: - email_intro: '你可以支持 %{participatory_space_title} 的提案!在此頁面開始參與:' email_outro: 你收到此通知是因為你正在追蹤 %{participatory_space_title}。你可以透過前面的連結停止接收通知。 - email_subject: 已開放 %{participatory_space_title} 的提案支持。 - notification_title: 現在您可以開始支持提案%{participatory_space_title} gamification: badges: accepted_proposals: @@ -299,14 +279,7 @@ zh-TW: proposal_votes: conditions: - 瀏覽並花些時間閱讀其他人的提案 - - 給你喜歡或覺得有趣的提案提供支持 - description: 當您支持他人的提案時,將獲得此徽章。 - description_another: 這個參與者支持了 %{score} 個提案。 - description_own: 你已經支持了 %{score} 個提案。 - name: 支持的提案 - next_level_in: 給予支持給%{score} 更多提案,以達到下一個等級! - unearned_another: 這位參與者尚未對任何提案表示支持。 - unearned_own: 您尚未給任何提案提供支持。 + - proposals: conditions: - 選擇您有興趣的參與空間並啟用提交提案功能 @@ -331,10 +304,6 @@ zh-TW: description: 提案總數 object: 提案 title: 提案 - votes: - description: 提案所獲得的支持數 - object: 支持 - title: 支援 participatory_spaces: highlighted_proposals: see_all: 檢視所有提案 (%{count}) @@ -485,7 +454,6 @@ zh-TW: remove_assignment: 移除指派 remove_assignment_confirmation: 您確定要將評估者從此提案中移除嗎? valuators: 評估者 - votes_count: 支持數量 update_category: invalid: '這些提案已經擁有 %{subject_name} 類別: %{proposals}。' select_a_category: 請選擇一個類別。 @@ -678,9 +646,6 @@ zh-TW: buttons: amend: 修訂 comment: 評論 - proposal_votes: - create: - error: 支持提案時發生問題。 proposals: dynamic_map_instructions: description: 當點擊“預覽”按鈕時,座標將會更新,但地址不會更改。 @@ -710,7 +675,6 @@ zh-TW: search: 搜尋 state: 狀態 type: 類別 - voted: 支持 index: click_here: 檢視所有提案 collaborative_drafts_list: 進入協作草稿 @@ -728,7 +692,6 @@ zh-TW: most_commented: 最多評論 most_endorsed: 最多已連署 most_followed: 最多追蹤者 - most_voted: 最受支持的 random: 隨機 recent: 最近 with_more_authors: 有更多作者 @@ -761,36 +724,13 @@ zh-TW: proposal_accepted_reason: '這個提案已經被接受,因為:' proposal_in_evaluation_reason: 這個提案正在被評估中 proposal_rejected_reason: '這個提案被拒絕了,因為:' - withdraw_btn_hint: 如果你改變主意,只要你的提案沒有獲得任何支持,你可以撤回你的提案。提案不會被刪除,它會顯示在被撤回的提案清單中。 withdraw_confirmation_html: 您確定要撤回此提案嗎?

    此操作無法取消! withdraw_proposal: 撤回提案 update: title: 更新提案 - vote_button: - already_voted: 已得到支持 - already_voted_hover: 撤回支持 - maximum_votes_reached: 已達支持上限 - no_votes_remaining: 無剩餘支持次數 - vote: 支持 - votes_blocked: 支持已禁用 - votes_count: - count: - other: 支持 voting_rules: - can_accumulate_supports_beyond_threshold: - description: 每個提案可以累積超過%{limit} 個支持 - minimum_votes_per_user: - description: 你必須在不同的提案之間分配至少 %{votes} 票的支持。 - given_enough_votes: 您已經提供足夠的支持。 - supports_remaining: 您還需要支持 %{remaining_votes} 個提案,才能讓您的支持被考慮在內。 proposal_limit: description: 您最多可以創建 %{limit} 個提案。 - threshold_per_proposal: - description: 為了讓提案被認可,需要達到%{limit} 個支持票數. - title: '支持需遵守以下規則:' - vote_limit: - description: 您最多可以支持 %{limit} 個提案。 - votes: 支持 wizard_aside: back: 返回 back_from_step_1: 返回提案 @@ -815,9 +755,6 @@ zh-TW: versions: index: title: 版本 - withdraw: - errors: - has_supports: 這份提案無法撤回,因為它已經得到支持。 resource_links: copied_from_component: proposal_proposal: 相關提案 @@ -829,4 +766,4 @@ zh-TW: statistics: proposals_accepted: 已通過的提案 proposals_count: 提案 - supports_count: 支持 + votes_count: 投票 diff --git a/decidim-proposals/lib/decidim/proposals/admin_engine.rb b/decidim-proposals/lib/decidim/proposals/admin_engine.rb index c6268a0bb2a6c..dd5dcb2ac98f9 100644 --- a/decidim-proposals/lib/decidim/proposals/admin_engine.rb +++ b/decidim-proposals/lib/decidim/proposals/admin_engine.rb @@ -16,6 +16,7 @@ class AdminEngine < ::Rails::Engine post :update_category post :publish_answers post :update_scope + post :update_multiple_answers, controller: "proposal_answers" resource :proposals_import, only: [:new, :create] resource :proposals_merge, only: [:create] resource :proposals_split, only: [:create] diff --git a/decidim-proposals/lib/decidim/proposals/component.rb b/decidim-proposals/lib/decidim/proposals/component.rb index 3f03efd9ce433..d8e1243733de6 100644 --- a/decidim-proposals/lib/decidim/proposals/component.rb +++ b/decidim-proposals/lib/decidim/proposals/component.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require "decidim/meetings" - Decidim.register_component(:proposals) do |component| component.engine = Decidim::Proposals::Engine component.admin_engine = Decidim::Proposals::AdminEngine @@ -28,7 +26,7 @@ component.permissions_class_name = "Decidim::Proposals::Permissions" - POSSIBLE_SORT_ORDERS = %w(default random recent most_endorsed most_voted most_commented most_followed with_more_authors).freeze + POSSIBLE_SORT_ORDERS = %w(automatic random recent most_endorsed most_voted most_commented most_followed with_more_authors).freeze component.settings(:global) do |settings| settings.attribute :scopes_enabled, type: :boolean, default: false @@ -40,9 +38,9 @@ settings.attribute :proposal_edit_time, type: :enum, default: "limited", choices: -> { %w(infinite limited) } settings.attribute :edit_time, type: :integer_with_units, default: [5, "minutes"], required: true, units: %w(minutes hours days) settings.attribute :threshold_per_proposal, type: :integer, default: 0, required: true - settings.attribute :can_accumulate_supports_beyond_threshold, type: :boolean, default: false + settings.attribute :can_accumulate_votes_beyond_threshold, type: :boolean, default: false settings.attribute :proposal_answering_enabled, type: :boolean, default: true - settings.attribute :default_sort_order, type: :select, default: "default", choices: -> { POSSIBLE_SORT_ORDERS } + settings.attribute :default_sort_order, type: :select, default: "automatic", choices: -> { POSSIBLE_SORT_ORDERS } settings.attribute :official_proposals_enabled, type: :boolean, default: true settings.attribute :comments_enabled, type: :boolean, default: true settings.attribute :comments_max_length, type: :integer, required: true @@ -111,7 +109,7 @@ Decidim::Proposals::FilteredProposals.for(components, start_at, end_at).accepted.not_hidden.count end - component.register_stat :supports_count, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |components, start_at, end_at| + component.register_stat :votes_count, priority: Decidim::StatsRegistry::HIGH_PRIORITY do |components, start_at, end_at| proposals = Decidim::Proposals::FilteredProposals.for(components, start_at, end_at).published.not_hidden Decidim::Proposals::ProposalVote.where(proposal: proposals).count end diff --git a/decidim-proposals/lib/decidim/proposals/engine.rb b/decidim-proposals/lib/decidim/proposals/engine.rb index 9e02dc4c37fdd..fc949c39cf342 100644 --- a/decidim-proposals/lib/decidim/proposals/engine.rb +++ b/decidim-proposals/lib/decidim/proposals/engine.rb @@ -91,21 +91,6 @@ class Engine < ::Rails::Engine end end - # Subscribes to ActiveSupport::Notifications that may affect a Proposal. - initializer "decidim_proposals.subscribe_to_events" do - # when a proposal is linked from a result - event_name = "decidim.resourceable.included_proposals.created" - ActiveSupport::Notifications.subscribe event_name do |_name, _started, _finished, _unique_id, data| - payload = data[:this] - if payload[:from_type] == Decidim::Accountability::Result.name && payload[:to_type] == Proposal.name - proposal = Proposal.find(payload[:to_id]) - - proposal.assign_state("accepted") - proposal.update(state_published_at: Time.current) - end - end - end - initializer "decidim_proposals.add_cells_view_paths" do Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Proposals::Engine.root}/app/cells") Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Proposals::Engine.root}/app/views") # for proposal partials diff --git a/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb b/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb index fa7f40fb0c8a3..66da841ee2dfb 100644 --- a/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb +++ b/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb @@ -44,7 +44,7 @@ def serialize reference: proposal.reference, answer: ensure_translatable(proposal.answer), answered_at: proposal.answered_at, - supports: proposal.proposal_votes_count, + votes: proposal.proposal_votes_count, endorsements: { total_count: proposal.endorsements.size, user_endorsements: diff --git a/decidim-proposals/lib/decidim/proposals/seeds.rb b/decidim-proposals/lib/decidim/proposals/seeds.rb index 06e23a25d568d..7f6263aad9fa4 100644 --- a/decidim-proposals/lib/decidim/proposals/seeds.rb +++ b/decidim-proposals/lib/decidim/proposals/seeds.rb @@ -59,6 +59,7 @@ def create_component! participatory_space:, settings: { vote_limit: 0, + attachments_allowed: [true, false].sample, collaborative_drafts_enabled: true }, step_settings: @@ -75,21 +76,9 @@ def create_component! end def create_proposal!(component:) - n = rand(5) - - proposal_state, answer, state_published_at = if n > 3 - [:accepted, Decidim::Faker::Localized.sentence(word_count: 10), Time.current] - elsif n > 2 - [:rejected, nil, Time.current] - elsif n > 1 - [:evaluating, nil, Time.current] - elsif n.positive? - [:accepted, Decidim::Faker::Localized.sentence(word_count: 10), nil] - else - [:not_answered, nil, nil] - end - + proposal_state, answer, state_published_at = random_state_answer proposal_state = Decidim::Proposals::ProposalState.where(component:, token: proposal_state).first + params = { component:, category: participatory_space.categories.sample, @@ -110,18 +99,7 @@ def create_proposal!(component:) visibility: "all" ) do proposal = Decidim::Proposals::Proposal.new(params) - meeting_component = participatory_space.components.find_by(manifest_name: "meetings") - - coauthor = case n - when 0 - Decidim::User.where(organization:).sample - when 1 - Decidim::UserGroup.where(organization:).sample - when 2 - Decidim::Meetings::Meeting.where(component: meeting_component).sample - else - organization - end + coauthor = random_coauthor proposal.add_coauthor(coauthor) proposal.save! @@ -134,6 +112,44 @@ def create_proposal!(component:) proposal end + + create_attachment(attached_to: proposal, filename: "city.jpeg") if component.settings.attachments_allowed? + + proposal + end + + def random_state_answer + n = rand(5) + + if n > 3 + [:accepted, Decidim::Faker::Localized.sentence(word_count: 10), Time.current] + elsif n > 2 + [:rejected, nil, Time.current] + elsif n > 1 + [:evaluating, nil, Time.current] + elsif n.positive? + [:accepted, Decidim::Faker::Localized.sentence(word_count: 10), nil] + else + [:not_answered, nil, nil] + end + end + + def random_coauthor + n = rand(5) + n = 3 if n == 2 && !Decidim.module_installed?(:meetings) + + case n + when 0 + Decidim::User.where(organization:).sample + when 1 + Decidim::UserGroup.where(organization:).sample + when 2 + meeting_component = participatory_space.components.find_by(manifest_name: "meetings") + + Decidim::Meetings::Meeting.where(component: meeting_component).sample + else + organization + end end def random_nickname diff --git a/decidim-proposals/lib/decidim/proposals/test/factories.rb b/decidim-proposals/lib/decidim/proposals/test/factories.rb index 3c8a84bd2b97b..65737e543dfee 100644 --- a/decidim-proposals/lib/decidim/proposals/test/factories.rb +++ b/decidim-proposals/lib/decidim/proposals/test/factories.rb @@ -29,6 +29,14 @@ def generate_state_title(token, skip_injection: false) Decidim::Proposals.create_default_states!(proposal_component, nil, with_traceability: false) end + trait :with_costs_enabled do + step_settings do + { + participatory_space.active_step.id => { answers_with_costs: true } + } + end + end + trait :with_endorsements_enabled do step_settings do { @@ -163,10 +171,10 @@ def generate_state_title(token, skip_injection: false) end end - trait :with_can_accumulate_supports_beyond_threshold do + trait :with_can_accumulate_votes_beyond_threshold do settings do { - can_accumulate_supports_beyond_threshold: true + can_accumulate_votes_beyond_threshold: true } end end @@ -267,6 +275,7 @@ def generate_state_title(token, skip_injection: false) end token { :not_answered } title { generate_state_title(:not_answered, skip_injection:) } + announcement_title { generate_localized_title(:announcement_title, skip_injection:) } component { build(:proposal_component) } bg_color { Faker::Color.hex_color(:light) } text_color { Faker::Color.hex_color(:dark) } @@ -496,7 +505,13 @@ def generate_state_title(token, skip_injection: false) transient do skip_injection { false } end - body { Faker::Lorem.sentences(number: 3).join("\n") } + body do + if skip_injection + generate(:title) + else + " #{generate(:title)}" + end + end proposal { build(:proposal, skip_injection:) } author { build(:user, organization: proposal.organization, skip_injection:) } end diff --git a/decidim-proposals/spec/commands/decidim/proposals/admin/assign_proposals_to_valuator_spec.rb b/decidim-proposals/spec/commands/decidim/proposals/admin/assign_proposals_to_valuator_spec.rb index e268519982872..f2056b6bd0bf3 100644 --- a/decidim-proposals/spec/commands/decidim/proposals/admin/assign_proposals_to_valuator_spec.rb +++ b/decidim-proposals/spec/commands/decidim/proposals/admin/assign_proposals_to_valuator_spec.rb @@ -13,13 +13,14 @@ module Admin let(:organization) { space.organization } let(:user) { create(:user, organization:) } let(:valuator_role) { create(:participatory_process_user_role, role: :valuator, user:, participatory_process: space) } + let(:valuator_roles) { [valuator_role] } let(:form) do instance_double( ValuationAssignmentForm, current_user: user, current_component:, current_organization: current_component.organization, - valuator_role:, + valuator_roles:, proposals: [proposal], valid?: valid ) diff --git a/decidim-proposals/spec/commands/decidim/proposals/admin/unassign_proposals_from_valuator_spec.rb b/decidim-proposals/spec/commands/decidim/proposals/admin/unassign_proposals_from_valuator_spec.rb index ce116f535f75f..f4f0e9c7970de 100644 --- a/decidim-proposals/spec/commands/decidim/proposals/admin/unassign_proposals_from_valuator_spec.rb +++ b/decidim-proposals/spec/commands/decidim/proposals/admin/unassign_proposals_from_valuator_spec.rb @@ -15,6 +15,7 @@ module Admin let(:user) { create(:user, organization:) } let(:valuator) { create(:user, organization:) } let(:valuator_role) { create(:participatory_process_user_role, role: :valuator, user: valuator, participatory_process: space) } + let(:valuator_roles) { [valuator_role] } let!(:assignment) { create(:valuation_assignment, proposal: assigned_proposal, valuator_role:) } let(:form) do instance_double( @@ -22,7 +23,7 @@ module Admin current_user: user, current_component:, current_organization: current_component.organization, - valuator_role:, + valuator_roles:, proposals: [assigned_proposal, unassigned_proposal], valid?: valid ) diff --git a/decidim-proposals/spec/commands/decidim/proposals/vote_proposal_spec.rb b/decidim-proposals/spec/commands/decidim/proposals/vote_proposal_spec.rb index 7756b153c7275..6a25b8a70b7b9 100644 --- a/decidim-proposals/spec/commands/decidim/proposals/vote_proposal_spec.rb +++ b/decidim-proposals/spec/commands/decidim/proposals/vote_proposal_spec.rb @@ -53,7 +53,7 @@ module Proposals context "when the threshold have been reached but proposal can accumulate more votes" do before do allow(proposal).to receive(:maximum_votes_reached?).and_return(true) - allow(proposal).to receive(:can_accumulate_supports_beyond_threshold).and_return(true) + allow(proposal).to receive(:can_accumulate_votes_beyond_threshold).and_return(true) end it "creates a new vote for the proposal" do diff --git a/decidim-proposals/spec/commands/decidim/proposals/withdraw_proposal_spec.rb b/decidim-proposals/spec/commands/decidim/proposals/withdraw_proposal_spec.rb index b75b9ba64ec03..fbdddd3a1a5b9 100644 --- a/decidim-proposals/spec/commands/decidim/proposals/withdraw_proposal_spec.rb +++ b/decidim-proposals/spec/commands/decidim/proposals/withdraw_proposal_spec.rb @@ -15,7 +15,7 @@ module Proposals let(:current_user) { proposal.creator_author } let(:command) { described_class.new(proposal, current_user) } - context "and the proposal has no supports" do + context "and the proposal has no votes" do it "withdraws the proposal" do expect do expect { command.call }.to broadcast(:ok) @@ -25,14 +25,14 @@ module Proposals end end - context "and the proposal HAS some supports" do + context "and the proposal HAS some votes" do before do proposal.votes.create!(author: current_user) end it "is not able to withdraw the proposal" do expect do - expect { command.call }.to broadcast(:has_supports) + expect { command.call }.to broadcast(:has_votes) end.not_to change(Decidim::Proposals::Proposal, :count) expect(proposal).not_to be_withdrawn expect(proposal.withdrawn_at).not_to be_present diff --git a/decidim-proposals/spec/controllers/concerns/orderable_spec.rb b/decidim-proposals/spec/controllers/concerns/orderable_spec.rb index 20965bcdc2795..a7368d1e5f5a0 100644 --- a/decidim-proposals/spec/controllers/concerns/orderable_spec.rb +++ b/decidim-proposals/spec/controllers/concerns/orderable_spec.rb @@ -27,7 +27,7 @@ class OrderableFakeController < Decidim::ApplicationController endorsements_enabled?: endorsements_enabled, comments_enabled?: comments_enabled) end - let(:component_default_sort_order) { "default" } + let(:component_default_sort_order) { "automatic" } let(:step_default_sort_order) { "" } let(:votes_enabled) { nil } let(:votes_blocked) { nil } @@ -64,7 +64,7 @@ class OrderableFakeController < Decidim::ApplicationController context "when step has default default_sort_order" do let(:component_default_sort_order) { "most_followed" } - let(:step_default_sort_order) { "default" } + let(:step_default_sort_order) { "automatic" } let(:votes_blocked) { false } it "use it instead of component's" do @@ -91,7 +91,7 @@ class OrderableFakeController < Decidim::ApplicationController end describe "by default" do - let(:default_sort_order) { "default" } + let(:default_sort_order) { "automatic" } it "default_order is random" do expect(controller.send(:default_order)).to eq("random") diff --git a/decidim-proposals/spec/controllers/decidim/proposals/admin/proposal_answers_controller_spec.rb b/decidim-proposals/spec/controllers/decidim/proposals/admin/proposal_answers_controller_spec.rb new file mode 100644 index 0000000000000..77c31a4dfd896 --- /dev/null +++ b/decidim-proposals/spec/controllers/decidim/proposals/admin/proposal_answers_controller_spec.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +require "spec_helper" +require "decidim/templates/test/factories" + +describe Decidim::Proposals::Admin::ProposalAnswersController do + routes { Decidim::Proposals::AdminEngine.routes } + + let(:user) { create(:user, :confirmed, :admin, organization: component.organization) } + let(:component) { create(:proposal_component, :with_creation_enabled, :with_attachments_allowed) } + let(:proposal) { create(:proposal, component:) } + let(:proposal_state) { create(:proposal_state, component:) } + let(:template) { create(:template, target: :proposal_answer, templatable: component, field_values: { "proposal_state_id" => proposal_state.id }) } + let(:form_double) { Decidim::Proposals::Admin::ProposalAnswerForm.from_params({}) } + + before do + sign_in user + request.env["decidim.current_organization"] = component.organization + request.env["decidim.current_component"] = component + + allow(Decidim::Proposals::Admin::ProposalAnswerForm).to receive(:from_params).and_return(form_double) + allow(form_double).to receive(:with_context).and_return(form_double) + end + + describe "POST update_multiple_answers" do + let(:proposal_ids) { [proposal.id] } + let(:multiple_params) { { proposal_ids:, template: { template_id: template.id } } } + + before do + component.update!( + settings: { answers_with_costs: true } + ) + + allow(controller).to receive(:proposals_path).and_return("/proposals") + allow(form_double).to receive(:attributes).and_return({ "answer" => "Test answer" }) + end + + it "enqueues ProposalAnswerJob for each proposal and redirects" do + allow(form_double).to receive(:costs_required?).and_return(false) + + expect do + post :update_multiple_answers, params: multiple_params + end.to have_enqueued_job(Decidim::Proposals::Admin::ProposalAnswerJob).with(proposal.id, anything, component) + + expect(response).to redirect_to(Decidim::EngineRouter.admin_proxy(component).root_path) + expect(flash[:notice]).to eq(I18n.t("proposals.answer.success", scope: "decidim.proposals.admin")) + end + + context "when cost data is required" do + before do + allow(form_double).to receive(:costs_required?).and_return(true) + proposal.update!(cost: nil) + end + + it "redirects with an alert" do + post :update_multiple_answers, params: multiple_params + + expect(response).to redirect_to(Decidim::EngineRouter.admin_proxy(component).root_path) + expect(flash[:alert]).to eq(I18n.t("proposals.answer.missing_cost_data", scope: "decidim.proposals.admin")) + end + end + + context "when cost data is not required" do + before do + allow(form_double).to receive(:costs_required?).and_return(false) + end + + it "enqueues ProposalAnswerJob for each proposal and redirects without checking cost data" do + expect do + post :update_multiple_answers, params: multiple_params + end.to have_enqueued_job(Decidim::Proposals::Admin::ProposalAnswerJob).with(proposal.id, anything, component) + + expect(response).to redirect_to(Decidim::EngineRouter.admin_proxy(component).root_path) + expect(flash[:notice]).to eq(I18n.t("proposals.answer.success", scope: "decidim.proposals.admin")) + end + end + end +end diff --git a/decidim-proposals/spec/controllers/decidim/proposals/proposals_controller_spec.rb b/decidim-proposals/spec/controllers/decidim/proposals/proposals_controller_spec.rb index b6d1f49dc7387..2d04045a4401e 100644 --- a/decidim-proposals/spec/controllers/decidim/proposals/proposals_controller_spec.rb +++ b/decidim-proposals/spec/controllers/decidim/proposals/proposals_controller_spec.rb @@ -242,13 +242,13 @@ module Proposals expect(proposal).to be_withdrawn end - context "and the proposal already has supports" do + context "and the proposal already has votes" do let(:proposal) { create(:proposal, :with_votes, component:, users: [user]) } it "is not able to withdraw the proposal" do put :withdraw, params: params.merge(id: proposal.id) - expect(flash[:alert]).to eq("This proposal cannot be withdrawn because it already has supports.") + expect(flash[:alert]).to eq("This proposal cannot be withdrawn because it already has votes.") expect(response).to have_http_status(:found) proposal.reload expect(proposal).not_to be_withdrawn @@ -260,7 +260,7 @@ module Proposals let(:current_user) { create(:user, :confirmed, organization: component.organization) } let(:proposal) { create(:proposal, component:, users: [current_user]) } - context "and the proposal has no supports" do + context "and the proposal has no votes" do it "is not able to withdraw the proposal" do expect(WithdrawProposal).not_to receive(:call) diff --git a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb index 8684308b6ee80..fc6bb2f08ebd6 100644 --- a/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb +++ b/decidim-proposals/spec/events/decidim/proposals/voting_enabled_event_spec.rb @@ -10,10 +10,10 @@ module Proposals include_context "when a simple event" let(:event_name) { "decidim.events.proposals.voting_enabled" } - let(:email_subject) { "Proposal support has started for #{participatory_space_title}" } - let(:email_intro) { "You can support proposals in #{participatory_space_title}! Start participating in this page:" } + let(:email_subject) { "Proposal voting has started for #{participatory_space_title}" } + let(:email_intro) { "You can vote proposals in #{participatory_space_title}! Start participating in this page:" } let(:email_outro) { "You have received this notification because you are following #{participatory_space_title}. You can stop receiving notifications following the previous link." } - let(:notification_title) { "You can now start supporting proposals in #{participatory_space_title}" } + let(:notification_title) { "You can now start voting proposals in #{participatory_space_title}" } let(:resource) { create(:proposal_component) } let(:participatory_space) { resource.participatory_space } let(:resource_path) { main_component_path(resource) } diff --git a/decidim-proposals/spec/forms/decidim/proposals/admin/valuation_assignment_form_spec.rb b/decidim-proposals/spec/forms/decidim/proposals/admin/valuation_assignment_form_spec.rb index e510d49347a12..cea04e404b077 100644 --- a/decidim-proposals/spec/forms/decidim/proposals/admin/valuation_assignment_form_spec.rb +++ b/decidim-proposals/spec/forms/decidim/proposals/admin/valuation_assignment_form_spec.rb @@ -16,7 +16,7 @@ module Admin let(:valuator_role) { create(:participatory_process_user_role, role: :valuator, user: valuator, participatory_process: valuator_process) } let(:params) do { - id: valuator_role.try(:id), + valuator_role_ids: [valuator_role.try(:id)], proposal_ids: proposals.map(&:id) } end @@ -32,7 +32,7 @@ module Admin it { is_expected.to be_valid } end - context "without a valuator role" do + context "without valuator roles" do let(:valuator_role) { nil } it { is_expected.to be_invalid } diff --git a/decidim-proposals/spec/jobs/decidim/proposals/admin/proposal_answer_job_spec.rb b/decidim-proposals/spec/jobs/decidim/proposals/admin/proposal_answer_job_spec.rb new file mode 100644 index 0000000000000..d370dce25ceea --- /dev/null +++ b/decidim-proposals/spec/jobs/decidim/proposals/admin/proposal_answer_job_spec.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe Decidim::Proposals::Admin::ProposalAnswerJob do + let(:component) { create(:proposal_component, :with_creation_enabled) } + let(:initial_state) { create(:proposal_state, component:, token: "initial_state") } + let(:proposal) { create(:proposal, component:, proposal_state: initial_state) } + let(:proposal_state) do + create( + :proposal_state, + title: { en: "Custom state" }, + token: "custom_state", + component: + ) + end + + let(:answer_form_params) do + { + "answer" => { "en" => "Test answer" }, + "internal_state" => proposal_state.token, + "cost" => "1000", + "cost_report" => { "en" => "Cost report" }, + "execution_period" => { "en" => "Execution period" } + } + end + + describe "#perform" do + context "when the answer is valid" do + before do + allow(Decidim::Proposals::Admin::AnswerProposal).to receive(:call) do |form, proposal| + proposal.update!(answer: form.answer, proposal_state:) + double(success?: true, invalid?: false) + end + end + + it "updates the proposal answer" do + described_class.perform_now(proposal.id, answer_form_params, component) + proposal.reload + + expect(proposal.answer).to eq({ "en" => "Test answer" }) + end + + it "updates the proposal state" do + described_class.perform_now(proposal.id, answer_form_params, component) + proposal.reload + + expect(proposal.proposal_state).to eq(proposal_state) + end + end + + context "when the answer is invalid" do + let(:original_answer) { proposal.answer } + let(:original_proposal_state) { proposal.proposal_state } + + before do + allow(Decidim::Proposals::Admin::AnswerProposal).to receive(:call).and_return(double(success?: false, invalid?: true)) + end + + it "does not update the proposal answer" do + described_class.perform_now(proposal.id, answer_form_params, component) + proposal.reload + + expect(proposal.answer).to eq(original_answer) + end + + it "does not update the proposal state" do + described_class.perform_now(proposal.id, answer_form_params, component) + proposal.reload + + expect(proposal.proposal_state).to eq(original_proposal_state) + end + end + end +end diff --git a/decidim-proposals/spec/lib/decidim/proposals/component_spec.rb b/decidim-proposals/spec/lib/decidim/proposals/component_spec.rb index 34bec81aaaedd..84586799e67c3 100644 --- a/decidim-proposals/spec/lib/decidim/proposals/component_spec.rb +++ b/decidim-proposals/spec/lib/decidim/proposals/component_spec.rb @@ -76,8 +76,8 @@ end end - describe "supports_count" do - let(:stats_name) { :supports_count } + describe "votes_count" do + let(:stats_name) { :votes_count } before do create_list(:proposal_vote, 2, proposal:) @@ -137,11 +137,11 @@ it_behaves_like "has mandatory config setting", :proposal_limit end - context "when support limit per participant is empty" do + context "when vote limit per participant is empty" do it_behaves_like "has mandatory config setting", :vote_limit end - context "when minimum supports per user is empty" do + context "when minimum votes per user is empty" do it_behaves_like "has mandatory config setting", :minimum_votes_per_user end diff --git a/decidim-proposals/spec/models/decidim/proposals/subscribed_events_spec.rb b/decidim-proposals/spec/models/decidim/proposals/subscribed_events_spec.rb deleted file mode 100644 index 04b79d2f0e2a8..0000000000000 --- a/decidim-proposals/spec/models/decidim/proposals/subscribed_events_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -require "spec_helper" - -module Decidim - module Proposals - describe Proposal do - subject { proposal } - - let!(:organization) { create(:organization) } - let!(:component) { create(:component, organization:, manifest_name: "proposals") } - let!(:participatory_process) { create(:participatory_process, organization:) } - let!(:author) { create(:user, :admin, organization:) } - let!(:proposal) { create(:proposal, component:, users: [author]) } - let(:resource) do - build(:dummy_resource) - end - - context "when event is created" do - before do - link_name = "included_proposals" - event_name = "decidim.resourceable.#{link_name}.created" - payload = { - from_type: "Decidim::Accountability::Result", from_id: resource.id, - to_type: proposal.class.name, to_id: proposal.id - } - ActiveSupport::Notifications.instrument event_name, this: payload do - Decidim::ResourceLink.create!( - from: resource, - to: resource, - name: link_name, - data: {} - ) - end - end - - it "is accepted" do - proposal.reload - expect(proposal.state).to eq("accepted") - end - end - end - end -end diff --git a/decidim-proposals/spec/permissions/decidim/proposals/admin/permissions_spec.rb b/decidim-proposals/spec/permissions/decidim/proposals/admin/permissions_spec.rb index 2ca4db6730320..16232349c1e4a 100644 --- a/decidim-proposals/spec/permissions/decidim/proposals/admin/permissions_spec.rb +++ b/decidim-proposals/spec/permissions/decidim/proposals/admin/permissions_spec.rb @@ -101,17 +101,6 @@ it_behaves_like "can answer proposals" it_behaves_like "can export proposals" end - - context "when current user is the valuator" do - describe "unassign proposals from themselves" do - let(:action) do - { scope: :admin, action: :unassign_from_valuator, subject: :proposals } - end - let(:extra_context) { { valuator: user } } - - it { is_expected.to be true } - end - end end it_behaves_like "can create proposal notes" diff --git a/decidim-proposals/spec/presenters/decidim/proposals/log/resource_presenter_spec.rb b/decidim-proposals/spec/presenters/decidim/log/resource_presenter_spec.rb similarity index 82% rename from decidim-proposals/spec/presenters/decidim/proposals/log/resource_presenter_spec.rb rename to decidim-proposals/spec/presenters/decidim/log/resource_presenter_spec.rb index cc05381a60362..c97bf493997a1 100644 --- a/decidim-proposals/spec/presenters/decidim/proposals/log/resource_presenter_spec.rb +++ b/decidim-proposals/spec/presenters/decidim/log/resource_presenter_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe Decidim::Proposals::Log::ResourcePresenter, type: :helper do +describe Decidim::Log::ResourcePresenter, type: :helper do let(:presenter) { described_class.new(resource, helper, extra) } let(:resource) { create(:proposal, title: Faker::Book.unique.title) } let(:extra) do @@ -12,11 +12,6 @@ end let(:resource_path) { Decidim::ResourceLocatorPresenter.new(resource).path } - before do - helper.extend(Decidim::ApplicationHelper) - helper.extend(Decidim::TranslationsHelper) - end - context "when the resource exists" do it "links to its public page with the name of the proposal" do html = presenter.present diff --git a/decidim-proposals/spec/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter_spec.rb b/decidim-proposals/spec/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter_spec.rb index 8e51d2634f0fa..6b105536f92ab 100644 --- a/decidim-proposals/spec/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter_spec.rb +++ b/decidim-proposals/spec/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter_spec.rb @@ -2,8 +2,16 @@ require "spec_helper" -describe Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter do - subject { described_class.new(value, _helpers) } +describe Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter, type: :helper do + subject { described_class.new(value, helper) } + + before do + module FooBar + include Decidim::SanitizeHelper + end + + helper.extend FooBar + end let(:value) do { @@ -11,7 +19,6 @@ "es" => "My title in Spanish" } end - let(:_helpers) { nil } describe "#present" do it "handles i18n fields" do diff --git a/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb b/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb index 82d05868b5a24..2fcd2954efc67 100644 --- a/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb +++ b/decidim-proposals/spec/services/decidim/proposals/proposal_serializer_spec.rb @@ -157,8 +157,8 @@ module Proposals expect(serialized).to include(longitude: proposal.longitude) end - it "serializes the amount of supports" do - expect(serialized).to include(supports: proposal.proposal_votes_count) + it "serializes the amount of votes" do + expect(serialized).to include(votes: proposal.proposal_votes_count) end it "serializes the amount of comments" do diff --git a/decidim-proposals/spec/shared/bulk_update_answer_proposals_spec.rb b/decidim-proposals/spec/shared/bulk_update_answer_proposals_spec.rb new file mode 100644 index 0000000000000..6a69bbcde4cff --- /dev/null +++ b/decidim-proposals/spec/shared/bulk_update_answer_proposals_spec.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +shared_examples "bulk update answer proposals" do + let!(:evaluating_state) { create(:proposal_state, :evaluating, component: proposal_component) } + let!(:accepted_state) { create(:proposal_state, :accepted, component: proposal_component, token: :accepted) } + let!(:amendable) { create(:proposal, component: proposal_component) } + let!(:emendation) { create(:proposal, component: proposal_component) } + let!(:amendment) { create(:amendment, amendable:, emendation:, amender: emendation.creator_author) } + let!(:proposal_without_permission) { emendation } + let!(:proposals_with_permission) { create_list(:proposal, 2, component: proposal_component) } + let!(:template) { create(:template, target: :proposal_answer, templatable: proposal_component, field_values: { "proposal_state_id" => evaluating_state.id }) } + let!(:answer_with_cost_template) { create(:template, target: :proposal_answer, templatable: proposal_component, field_values: { "proposal_state_id" => accepted_state.id }) } + + context "when selecting proposals" do + let!(:proposal_component) { current_component } + + context "when clicking the bulk action button" do + before do + visit current_path + page.find(".js-check-all").set(true) + click_on "Actions" + end + + it "shows the change action option if proposals have permission" do + expect(page).to have_button("Change status and answer") + end + + it "does not show the change action option if proposals do not have permission" do + page.find(".js-check-all").set(false) + page.find(".js-proposal-id-#{proposal_without_permission.id}").set(true) + click_on "Actions" + expect(page).to have_no_button("Change status and answer") + end + end + + context "when change status and answer is selected from the actions dropdown" do + before do + visit current_path + page.find(".js-check-all").set(false) + proposals_with_permission.each do |proposal| + page.find(".js-proposal-id-#{proposal.id}").set(true) + end + click_on "Actions" + click_on "Change status and answer" + end + + it "shows the template select" do + expect(page).to have_css("#template_template_id", count: 1) + end + + it "shows an update button" do + expect(page).to have_button(id: "js-submit-change-answer-status", text: "Update", count: 1) + end + + context "when submitting the form" do + before do + within "#js-form-change-answer-status" do + select translated(answer_with_cost_template.name), from: :template_template_id + perform_enqueued_jobs do + click_on "Update" + end + end + end + + it "changes the status and answer of the selected proposals" do + expect(page).to have_content("The proposals have been queued for answer update.") + + proposals_with_permission.each do |proposal| + expect(page).to have_css("tr[data-id='#{proposal.id}']", text: translated(accepted_state.title)) + end + end + end + end + + context "when cost is required" do + let!(:proposal_component) do + create(:proposal_component, :with_costs_enabled, :published, participatory_space: current_component.participatory_space, name: "New component") + end + let!(:proposal_with_cost) { create(:proposal, :not_answered, component: proposal_component, cost: 10) } + let!(:proposal_without_cost) do + create(:proposal, :not_answered, title: "Proposal without cost", component: proposal_component, cost: nil) + end + + before do + visit manage_component_path(proposal_component) + end + + context "when cost is provided" do + before do + visit current_path + page.find(".js-check-all").set(false) + page.find(".js-proposal-id-#{proposal_with_cost.id}").set(true) + + click_on "Actions" + click_on "Change status and answer" + + within "#js-form-change-answer-status" do + select translated(answer_with_cost_template.name), from: :template_template_id + perform_enqueued_jobs do + click_on "Update" + end + sleep 1 + end + end + + it "changes the status and answer of the selected proposals" do + expect(page).to have_content("The proposals have been queued for answer update.") + + expect(page).to have_css("tr[data-id='#{proposal_with_cost.id}']", text: translated(accepted_state.title)) + end + end + + context "when cost is not provided" do + before do + page.find_by_id("proposals_bulk", class: "js-check-all").set(false) + page.find(".js-proposal-id-#{proposal_without_cost.id}").set(true) + click_on "Actions" + click_on "Change status and answer" + within "#js-form-change-answer-status" do + select translated(answer_with_cost_template.name), from: :template_template_id + perform_enqueued_jobs { click_on "Update" } + end + end + + it "shows a missing cost data alert" do + expect(page).to have_content("Please fill in the required cost field for all selected proposals.") + end + end + end + end +end diff --git a/decidim-proposals/spec/shared/manage_proposals_examples.rb b/decidim-proposals/spec/shared/manage_proposals_examples.rb index dd874763b33b3..8207a8b0e9453 100644 --- a/decidim-proposals/spec/shared/manage_proposals_examples.rb +++ b/decidim-proposals/spec/shared/manage_proposals_examples.rb @@ -65,6 +65,8 @@ end context "when process is not related to any scope" do + let(:attributes) { attributes_for(:proposal, component: current_component) } + it "can be related to a scope" do click_on "New proposal" @@ -73,12 +75,12 @@ end end - it "creates a new proposal", :slow do + it "creates a new proposal", versioning: true do click_on "New proposal" within ".new_proposal" do - fill_in_i18n :proposal_title, "#proposal-title-tabs", en: "Make decidim great again" - fill_in_i18n_editor :proposal_body, "#proposal-body-tabs", en: "Decidim is great but it can be better" + fill_in_i18n :proposal_title, "#proposal-title-tabs", **attributes[:title].except("machine_translations") + fill_in_i18n_editor :proposal_body, "#proposal-body-tabs", **attributes[:body].except("machine_translations") select translated(category.name), from: :proposal_category_id select translated(scope.name), from: :proposal_scope_id find("*[type=submit]").click @@ -89,11 +91,13 @@ within "table" do proposal = Decidim::Proposals::Proposal.last - expect(page).to have_content("Make decidim great again") - expect(translated(proposal.body)).to eq("

    Decidim is great but it can be better

    ") + expect(page).to have_content(translated(attributes[:title])) + expect(translated(proposal.body)).to eq("

    #{strip_tags(translated(attributes[:body]))}

    ") expect(proposal.category).to eq(category) expect(proposal.scope).to eq(scope) end + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} proposal") end end diff --git a/decidim-proposals/spec/shared/merge_proposals_examples.rb b/decidim-proposals/spec/shared/merge_proposals_examples.rb index e3969101b150d..d8885733a1c1e 100644 --- a/decidim-proposals/spec/shared/merge_proposals_examples.rb +++ b/decidim-proposals/spec/shared/merge_proposals_examples.rb @@ -75,7 +75,7 @@ expect(page).to have_css(".table-list tbody tr", count: 3) expect(page).to have_content("There has been a problem merging the selected proposals") expect(page).to have_content("Are not official") - expect(page).to have_content("Have received support or endorsements") + expect(page).to have_content("Have received votes or endorsements") end end diff --git a/decidim-proposals/spec/shared/split_proposals_examples.rb b/decidim-proposals/spec/shared/split_proposals_examples.rb index 0ef043a751bbb..9591d65cc3046 100644 --- a/decidim-proposals/spec/shared/split_proposals_examples.rb +++ b/decidim-proposals/spec/shared/split_proposals_examples.rb @@ -60,7 +60,7 @@ it "does not create a new proposal and displays a validation fail message" do expect(page).to have_content("There has been a problem splitting the selected proposals") expect(page).to have_content("Are not official") - expect(page).to have_content("Have received support or endorsements") + expect(page).to have_content("Have received votes or endorsements") end end end diff --git a/decidim-proposals/spec/system/admin/admin_creates_proposal_spec.rb b/decidim-proposals/spec/system/admin/admin_creates_proposal_spec.rb index f34f8a423e484..7c9670f54c453 100644 --- a/decidim-proposals/spec/system/admin/admin_creates_proposal_spec.rb +++ b/decidim-proposals/spec/system/admin/admin_creates_proposal_spec.rb @@ -37,4 +37,43 @@ expect(page).to have_content("city.jpeg") expect(page).to have_content("FOO BAR") end + + describe "validating the form" do + before do + visit_component_admin + click_on("New proposal") + end + + context "when focus shifts to body" do + it "displays error when title is empty" do + fill_in_i18n :proposal_title, "#proposal-title-tabs", en: " " + find_by_id("proposal-body-tabs").click + + expect(page).to have_css(".form-error.is-visible", text: "There is an error in this field.") + end + + it "displays error when title is invalid" do + fill_in_i18n :proposal_title, "#proposal-title-tabs", en: "invalid-title" + find_by_id("proposal-body-tabs").click + + expect(page).to have_css(".form-error.is-visible", text: "There is an error in this field") + end + end + + context "when focus remains on title" do + it "does not display error when title is empty" do + fill_in_i18n :proposal_title, "#proposal-title-tabs", en: " " + find_by_id("proposal-title-tabs").click + + expect(page).to have_no_css(".form-error.is-visible", text: "There is an error in this field.") + end + + it "does not display error when title is invalid" do + fill_in_i18n :proposal_title, "#proposal-title-tabs", en: "invalid-title" + find_by_id("proposal-title-tabs").click + + expect(page).to have_no_css(".form-error.is-visible", text: "There is an error in this field") + end + end + end end diff --git a/decidim-proposals/spec/system/admin/admin_edits_proposal_spec.rb b/decidim-proposals/spec/system/admin/admin_edits_proposal_spec.rb index ea70eea72f0b1..4a477f4acae36 100644 --- a/decidim-proposals/spec/system/admin/admin_edits_proposal_spec.rb +++ b/decidim-proposals/spec/system/admin/admin_edits_proposal_spec.rb @@ -22,8 +22,7 @@ end describe "editing an official proposal" do - let(:new_title) { "This is my proposal new title" } - let(:new_body) { "This is my proposal new body" } + let(:attributes) { attributes_for(:proposal, component: current_component) } it "can be updated" do visit_component_admin @@ -31,16 +30,21 @@ find("a.action-icon--edit-proposal").click expect(page).to have_content "Update proposal" - fill_in_i18n :proposal_title, "#proposal-title-tabs", en: new_title - fill_in_i18n_editor :proposal_body, "#proposal-body-tabs", en: new_body + fill_in_i18n :proposal_title, "#proposal-title-tabs", **attributes[:title].except("machine_translations") + fill_in_i18n_editor :proposal_body, "#proposal-body-tabs", **attributes[:body].except("machine_translations") click_on "Update" preview_window = window_opened_by { find("a.action-icon--preview").click } within_window preview_window do - expect(page).to have_content(new_title) - expect(page).to have_content(new_body) + expect(page).to have_content(translated(attributes[:title])) + expect(page).to have_content(strip_tags(translated(attributes[:body])).strip) end + + expect(page).to have_admin_callout("successfully") + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} official proposal") end context "when the proposal has some votes" do @@ -101,7 +105,7 @@ find("input#proposal_attachment_delete_file").set(true) click_on("Replace") click_on("Remove") - click_on("Next") + click_on("Save") dynamically_attach_file(:proposal_attachment_file, Decidim::Dev.asset("city.jpeg")) click_on("Update") diff --git a/decidim-proposals/spec/system/admin/admin_manages_proposal_states_spec.rb b/decidim-proposals/spec/system/admin/admin_manages_proposal_states_spec.rb index 93dfd204cd47a..949f9f667c356 100644 --- a/decidim-proposals/spec/system/admin/admin_manages_proposal_states_spec.rb +++ b/decidim-proposals/spec/system/admin/admin_manages_proposal_states_spec.rb @@ -32,6 +32,8 @@ end describe "creating a proposal state" do + let(:attributes) { attributes_for(:proposal_state) } + before do click_on "Statuses" click_on "New status" @@ -40,21 +42,8 @@ it "creates a new proposal state" do expect(Decidim::Proposals::ProposalState.find_by(token: "custom")).to be_nil within ".new_proposal_state" do - fill_in_i18n( - :proposal_state_title, - "#proposal_state-title-tabs", - en: "Custom state", - es: "Estado personalizado", - ca: "Estat personalitzat" - ) - - fill_in_i18n( - :proposal_state_announcement_title, - "#proposal_state-announcement_title-tabs", - en: "A longer announcement", - es: "Anuncio más largo", - ca: "Anunci més llarg" - ) + fill_in_i18n(:proposal_state_title, "#proposal_state-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:proposal_state_announcement_title, "#proposal_state-announcement_title-tabs", **attributes[:announcement_title].except("machine_translations")) within ".proposal-status__color" do find_by_id("proposal_state_text_color_9a6700").click @@ -67,14 +56,17 @@ within "table" do expect(page).to have_css(".label", style: "background-color: #FFFCE5; color: #9A6700; border-color: #9A6700;") - expect(page).to have_content("Custom state") + expect(page).to have_content(translated(attributes[:title])) end - state = Decidim::Proposals::ProposalState.find_by(token: "custom_state") + state = Decidim::Proposals::ProposalState.find_by(token: "script_alert_proposal_state_title_script_not_answered") expect(state).to be_present - expect(translated(state.title)).to eq("Custom state") - expect(translated(state.announcement_title)).to eq("A longer announcement") + expect(translated(state.title)).to eq(translated(attributes[:title])) + expect(translated(state.announcement_title)).to eq(translated(attributes[:announcement_title])) expect(state.css_style).to eq("background-color: #FFFCE5; color: #9A6700; border-color: #9A6700;") + + visit decidim_admin.root_path + expect(page).to have_content("created #{translated(attributes[:title])} in") end it "updates the label and announcement previews" do @@ -124,6 +116,7 @@ } end let!(:state) { create(:proposal_state, component: current_component, **state_params) } + let(:attributes) { attributes_for(:proposal_state) } before do click_on "Statuses" @@ -139,21 +132,8 @@ end within ".edit_proposal_state" do - fill_in_i18n( - :proposal_state_title, - "#proposal_state-title-tabs", - en: "Custom state", - es: "Estado personalizado", - ca: "Estat personalitzat" - ) - - fill_in_i18n( - :proposal_state_announcement_title, - "#proposal_state-announcement_title-tabs", - en: "A longer announcement", - es: "Anuncio más largo", - ca: "Anunci més llarg" - ) + fill_in_i18n(:proposal_state_title, "#proposal_state-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:proposal_state_announcement_title, "#proposal_state-announcement_title-tabs", **attributes[:announcement_title].except("machine_translations")) within ".proposal-status__color" do find_by_id("proposal_state_text_color_9a6700").click @@ -161,17 +141,21 @@ find("*[type=submit]").click end + expect(page).to have_admin_callout("successfully") within "table" do expect(page).to have_css(".label", style: "background-color: #FFFCE5; color: #9A6700; border-color: #9A6700;") - expect(page).to have_content("Custom state") + expect(page).to have_content(translated(attributes[:title])) end state = Decidim::Proposals::ProposalState.find_by(token: "editable_state") - expect(translated(state.title)).to eq("Custom state") - expect(translated(state.announcement_title)).to eq("A longer announcement") + expect(translated(state.title)).to eq(translated(attributes[:title])) + expect(translated(state.announcement_title)).to eq(translated(attributes[:announcement_title])) expect(state.css_style).to eq("background-color: #FFFCE5; color: #9A6700; border-color: #9A6700;") + + visit decidim_admin.root_path + expect(page).to have_content("updated #{translated(attributes[:title])} in") end it "updates the label and announcement previews" do @@ -180,21 +164,8 @@ end within ".edit_proposal_state" do - fill_in_i18n( - :proposal_state_title, - "#proposal_state-title-tabs", - en: "Custom state", - es: "Estado personalizado", - ca: "Estat personalitzat" - ) - - fill_in_i18n( - :proposal_state_announcement_title, - "#proposal_state-announcement_title-tabs", - en: "A longer announcement", - es: "Anuncio más largo", - ca: "Anunci més llarg" - ) + fill_in_i18n(:proposal_state_title, "#proposal_state-title-tabs", **attributes[:title].except("machine_translations")) + fill_in_i18n(:proposal_state_announcement_title, "#proposal_state-announcement_title-tabs", **attributes[:announcement_title].except("machine_translations")) within ".proposal-status__color" do find_by_id("proposal_state_text_color_9a6700").click @@ -202,14 +173,20 @@ expect(page).to have_css("[data-label-preview]", style: "background-color: rgb(255, 252, 229); color: rgb(154, 103, 0);") within "[data-label-preview]" do - expect(page).to have_content("Estat personalitzat") + expect(page).to have_content(translated(attributes[:title])) end expect(page).to have_css("[data-announcement-preview]", style: "background-color: rgb(255, 252, 229); color: rgb(154, 103, 0); border-color: #9A6700/var(--tw-border-opacity);") within "[data-announcement-preview]" do - expect(page).to have_content("Anunci més llarg") + # text_copy.js implements a change event that updates the label. The fill_in_i18n is "changing" the fields, and the "ca" locale is the last one that one that is being changed + expect(page).to have_content(translated(attributes[:announcement_title], locale: "ca")) end + find("*[type=submit]").click end + expect(page).to have_admin_callout("successfully") + + visit decidim_admin.root_path + expect(page).to have_content("updated #{translated(attributes[:title])} in") end end diff --git a/decidim-proposals/spec/system/admin/admin_manages_proposal_valuators_spec.rb b/decidim-proposals/spec/system/admin/admin_manages_proposal_valuators_spec.rb index 3fd4906d869ad..2f59a3b3410db 100644 --- a/decidim-proposals/spec/system/admin/admin_manages_proposal_valuators_spec.rb +++ b/decidim-proposals/spec/system/admin/admin_manages_proposal_valuators_spec.rb @@ -12,6 +12,8 @@ end let!(:valuator) { create(:user, organization:) } let!(:valuator_role) { create(:participatory_process_user_role, role: :valuator, user: valuator, participatory_process:) } + let!(:other_valuator) { create(:user, organization:) } + let!(:other_valuator_role) { create(:participatory_process_user_role, role: :valuator, user: other_valuator, participatory_process:) } include Decidim::ComponentPathHelper @@ -40,7 +42,7 @@ context "when submitting the form" do before do within "#js-form-assign-proposals-to-valuator" do - select valuator.name, from: :valuator_role_id + tom_select("#assign_valuator_role_ids", option_id: valuator_role.id) click_on(id: "js-submit-assign-proposals-to-valuator") end end @@ -52,6 +54,41 @@ expect(page).to have_css("td.valuators-count", text: 1) end end + + it "displays log" do + visit decidim_admin.root_path + expect(page).to have_content("assigned the #{translated(proposal.title)} proposal to a valuator") + end + end + end + + context "when assigning to multiple valuators" do + before do + visit current_path + + within "tr", text: translated(proposal.title) do + page.first(".js-proposal-list-check").set(true) + end + + click_on "Actions" + click_on "Assign to valuator" + end + + context "when submitting the form" do + before do + within "#js-form-assign-proposals-to-valuator" do + tom_select("#assign_valuator_role_ids", option_id: [valuator_role.id, other_valuator_role.id]) + click_on(id: "js-submit-assign-proposals-to-valuator") + end + end + + it "assigns the proposals to the valuator" do + expect(page).to have_content("Proposals assigned to a valuator successfully") + + within "tr", text: translated(proposal.title) do + expect(page).to have_css("td.valuators-count", text: 2) + end + end end end @@ -107,12 +144,47 @@ context "when submitting the form" do before do within "#js-form-unassign-proposals-from-valuator" do - select valuator.name, from: :valuator_role_id + tom_select("#unassign_valuator_role_ids", option_id: valuator_role.id) + click_on(id: "js-submit-unassign-proposals-from-valuator") + end + end + + it "unassigns the proposals from the valuator" do + expect(page).to have_content("Valuator unassigned from proposals successfully") + + within "tr", text: translated(proposal.title) do + expect(page).to have_css("td.valuators-count", text: 0) + end + end + end + end + + context "when unassigning multiple valuators from a proposal from the proposals index page" do + let(:assigned_proposal) { proposal } + + before do + create(:valuation_assignment, proposal:, valuator_role:) + create(:valuation_assignment, proposal:, valuator_role: other_valuator_role) + + visit current_path + + within "tr", text: translated(proposal.title) do + page.first(".js-proposal-list-check").set(true) + end + + click_on "Actions" + click_on "Unassign from valuator" + end + + context "when submitting the form" do + before do + within "#js-form-unassign-proposals-from-valuator" do + tom_select("#unassign_valuator_role_ids", option_id: [valuator_role.id, other_valuator_role.id]) click_on(id: "js-submit-unassign-proposals-from-valuator") end end - it "unassigns the proposals to the valuator" do + it "unassigns the proposals from the valuator" do expect(page).to have_content("Valuator unassigned from proposals successfully") within "tr", text: translated(proposal.title) do diff --git a/decidim-proposals/spec/system/admin/admin_manages_proposals_spec.rb b/decidim-proposals/spec/system/admin/admin_manages_proposals_spec.rb index b1c130999faac..9b8cc4bc7d7c5 100644 --- a/decidim-proposals/spec/system/admin/admin_manages_proposals_spec.rb +++ b/decidim-proposals/spec/system/admin/admin_manages_proposals_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require "spec_helper" +require "decidim/templates/test/factories" describe "Admin manages proposals" do let(:manifest_name) { "proposals" } @@ -25,6 +26,7 @@ it_behaves_like "merge proposals" it_behaves_like "split proposals" it_behaves_like "publish answers" + it_behaves_like "bulk update answer proposals" it_behaves_like "sorted moderations" do let!(:reportables) { create_list(:proposal, 17, component: current_component) } diff --git a/decidim-proposals/spec/system/admin/filter_proposals_spec.rb b/decidim-proposals/spec/system/admin/filter_proposals_spec.rb index 5204f626492fe..6e1a5221b4d5e 100644 --- a/decidim-proposals/spec/system/admin/filter_proposals_spec.rb +++ b/decidim-proposals/spec/system/admin/filter_proposals_spec.rb @@ -115,6 +115,104 @@ def proposal_without_state(token) end end + context "when filtering by multiple filters" do + let!(:scope1) { create(:scope, organization:, name: { "en" => "Scope1" }) } + let!(:scope2) { create(:scope, organization:, name: { "en" => "Scope2" }) } + let!(:answered_proposal_with_scope1) { create(:proposal, :with_answer, component:, scope: scope1) } + let!(:unanswered_proposal_with_scope1) { create(:proposal, component:, scope: scope1) } + let!(:answered_proposal_with_scope2) { create(:proposal, :with_answer, component:, scope: scope2) } + let!(:unanswered_proposal_with_scope2) { create(:proposal, component:, scope: scope2) } + + before do + apply_filter("Answered", "Answered") + visit_component_admin + end + + it_behaves_like "a filtered collection", options: "Scope", filter: "Scope1" do + let(:in_filter) { translated(answered_proposal_with_scope1.title) } + let(:not_in_filter) { translated(answered_proposal_with_scope2.title) } + end + + context "when multiple filters are checked" do + before do + apply_filter("Scope", "Scope1") + end + + it "has a link to remove all filters" do + expect(page).to have_content(translated(answered_proposal_with_scope1.title)) + expect(page).to have_no_content(translated(unanswered_proposal_with_scope1.title)) + expect(page).to have_no_content(translated(answered_proposal_with_scope2.title)) + expect(page).to have_no_content(translated(unanswered_proposal_with_scope2.title)) + + within("[data-applied-filters-tags]") do + expect(page).to have_content("Remove all") + end + + within("[data-applied-filters-tags]") do + click_on("Remove all") + end + + expect(page).to have_content(translated(answered_proposal_with_scope1.title)) + expect(page).to have_content(translated(unanswered_proposal_with_scope1.title)) + expect(page).to have_content(translated(answered_proposal_with_scope2.title)) + expect(page).to have_content(translated(unanswered_proposal_with_scope2.title)) + expect(page).to have_css("[data-applied-filters-tags]", exact_text: "") + end + + it "stores the filters in the session and recovers it when visiting the component page" do + within("tr[data-id='#{answered_proposal_with_scope1.id}']") do + click_on("Answer proposal") + end + + within "form.edit_proposal_answer" do + fill_in_i18n_editor( + :proposal_answer_answer, + "#proposal_answer-answer-tabs", + en: "An answer does not change the filters" + ) + click_on "Answer" + end + + within("[data-applied-filters-tags]") do + expect(page).to have_content("Answered: Answered") + expect(page).to have_content("Scope: Scope1") + expect(page).to have_content("Remove all") + end + + filter_params = CGI.parse(URI.parse(page.current_url).query) + expect(filter_params["q[scope_id_eq]"]).to eq([scope1.id.to_s]) + expect(filter_params["q[with_any_state]"]).to eq(["state_published"]) + end + end + + context "when the admin visits a proposal from a filtered list" do + let!(:other_proposal_with_scope2) { create(:proposal, :with_answer, component:, scope: scope2) } + + before { visit_component_admin } + + it "can navigate through the proposals of the filtered list" do + ids = find_all("tr[data-id]").map { |node| node["data-id"].to_i } + + within("tr[data-id='#{ids[0]}']") do + click_on("Answer proposal") + end + + expect(page).to have_no_link("Previous") + expect(page).to have_link("Next", href: %r{/manage/proposals/#{ids[1]}$}) + + click_on("Next") + + expect(page).to have_link("Previous", href: %r{/manage/proposals/#{ids[0]}$}) + expect(page).to have_link("Next", href: %r{/manage/proposals/#{ids[2]}$}) + + click_on("Next") + + expect(page).to have_link("Previous", href: %r{/manage/proposals/#{ids[1]}$}) + expect(page).to have_no_link("Next") + end + end + end + context "when searching by ID or title" do let!(:proposal1) { create(:proposal, component:) } let!(:proposal2) { create(:proposal, component:) } diff --git a/decidim-proposals/spec/system/admin/index_proposal_notes_spec.rb b/decidim-proposals/spec/system/admin/index_proposal_notes_spec.rb index 06d2b16294984..8426b80173941 100644 --- a/decidim-proposals/spec/system/admin/index_proposal_notes_spec.rb +++ b/decidim-proposals/spec/system/admin/index_proposal_notes_spec.rb @@ -9,6 +9,7 @@ let(:manifest_name) { "proposals" } let(:proposal) { create(:proposal, component:) } let(:participatory_space) { component.participatory_space } + let(:attributes) { attributes_for(:proposal_note) } let(:body) { "New awesome body" } let(:proposal_notes_count) { 5 } @@ -33,15 +34,15 @@ it "shows proposal notes for the current proposal" do proposal_notes.each do |proposal_note| expect(page).to have_content(proposal_note.author.name) - expect(page).to have_content(proposal_note.body) + expect(page).to have_content(decidim_sanitize_translated(proposal_note.body)) end expect(page).to have_css("form") end context "when the form has a text inside body" do - it "creates a proposal note", :slow do + it "creates a proposal note", versioning: true do within ".new_proposal_note" do - fill_in :proposal_note_body, with: body + fill_in :proposal_note_body, with: attributes[:body] find("*[type=submit]").click end @@ -50,8 +51,11 @@ click_on "Private notes" within ".component__show_notes-grid .comment:last-child" do - expect(page).to have_content("New awesome body") + expect(page).to have_content(decidim_sanitize_translated(attributes[:body])) end + + visit decidim_admin.root_path + expect(page).to have_content("left a private note on the #{translated(proposal.title)} proposal") end end diff --git a/decidim-proposals/spec/system/admin/valuator_manages_proposals_spec.rb b/decidim-proposals/spec/system/admin/valuator_manages_proposals_spec.rb index 50d20a1792401..b27294500f8e1 100644 --- a/decidim-proposals/spec/system/admin/valuator_manages_proposals_spec.rb +++ b/decidim-proposals/spec/system/admin/valuator_manages_proposals_spec.rb @@ -42,25 +42,10 @@ end click_on "Actions" - click_on "Unassign from valuator" - end - - it "can unassign themselves" do - within "#js-form-unassign-proposals-from-valuator" do - select user.name, from: :valuator_role_id - click_on(id: "js-submit-unassign-proposals-from-valuator") - end - - expect(page).to have_content("Valuator unassigned from proposals successfully") end it "cannot unassign others" do - within "#js-form-unassign-proposals-from-valuator" do - select another_user.name, from: :valuator_role_id - click_on(id: "js-submit-unassign-proposals-from-valuator") - end - - expect(page).to have_content("You are not authorized to perform this action") + expect(page).to have_no_content("Unassign from valuator") end end @@ -71,26 +56,6 @@ end end - it "can only unassign themselves" do - within "#valuators" do - expect(page).to have_content(user.name) - expect(page).to have_content(another_user.name) - - within "li", text: another_user.name do - expect(page).to have_no_selector("a.red-icon") - end - - within "li", text: user.name do - expect(page).to have_css("a.red-icon") - accept_confirm do - find("a.red-icon").click - end - end - end - - expect(page).to have_content("successfully") - end - it "can leave proposal notes" do expect(page).to have_content("Private notes") click_on "Private notes" diff --git a/decidim-proposals/spec/system/admin/view_proposal_details_from_admin_spec.rb b/decidim-proposals/spec/system/admin/view_proposal_details_from_admin_spec.rb index 2b9177f0cfab9..ee86dd2098019 100644 --- a/decidim-proposals/spec/system/admin/view_proposal_details_from_admin_spec.rb +++ b/decidim-proposals/spec/system/admin/view_proposal_details_from_admin_spec.rb @@ -92,23 +92,23 @@ end end - describe "with supports" do + describe "with votes" do before do create_list(:proposal_vote, 2, proposal:) end - it "shows the number of supports" do + it "shows the number of votes" do go_to_admin_proposal_page(proposal) - expect(page).to have_css("[data-supports] [data-count]", text: "2") + expect(page).to have_css("[data-votes] [data-count]", text: "2") end - it "shows the ranking by supports" do + it "shows the ranking by votes" do another_proposal = create(:proposal, component:) create(:proposal_vote, proposal: another_proposal) go_to_admin_proposal_page(proposal) - expect(page).to have_css("[data-supports] [data-ranking]", text: "1 of ") + expect(page).to have_css("[data-votes] [data-ranking]", text: "1 of ") end end diff --git a/decidim-proposals/spec/system/comments_spec.rb b/decidim-proposals/spec/system/comments_spec.rb index 3472a9f96d094..f3bf13b67a74d 100644 --- a/decidim-proposals/spec/system/comments_spec.rb +++ b/decidim-proposals/spec/system/comments_spec.rb @@ -21,4 +21,11 @@ end include_examples "comments" + + context "with comments blocked" do + let!(:component) { create(:proposal_component, participatory_space:, organization:) } + let(:participatory_space) { create(:participatory_process, :with_steps, organization:) } + + include_examples "comments blocked" + end end diff --git a/decidim-proposals/spec/system/edit_proposal_spec.rb b/decidim-proposals/spec/system/edit_proposal_spec.rb index 0b6a570499c79..a24aba7156ca2 100644 --- a/decidim-proposals/spec/system/edit_proposal_spec.rb +++ b/decidim-proposals/spec/system/edit_proposal_spec.rb @@ -76,7 +76,7 @@ within "[data-filename='Exampledocument.pdf']" do click_on("Remove") end - click_on "Next" + click_on "Save" end click_on "Send" @@ -101,7 +101,7 @@ within "[data-filename='Exampledocument.pdf']" do find("input[type='text']").set(attachment_file_title) end - click_on "Next" + click_on "Save" end click_on "Send" expect(page).to have_css("[data-alert-box].success") @@ -126,7 +126,7 @@ expect(page).to have_content("Required fields are marked with an asterisk") click_on("Edit documents") within "[data-dialog]" do - click_on("Next") + click_on("Save") end click_on("Send") expect(page).to have_content("Proposal successfully updated.") @@ -148,7 +148,7 @@ expect(page).to have_content("Required fields are marked with an asterisk") click_on("Edit documents") within "[data-dialog]" do - click_on("Next") + click_on("Save") end click_on("Send") expect(page).to have_content("Proposal successfully updated.") diff --git a/decidim-proposals/spec/system/filter_proposals_spec.rb b/decidim-proposals/spec/system/filter_proposals_spec.rb index bcc1daf8bcd86..24e8a2cd8b7e9 100644 --- a/decidim-proposals/spec/system/filter_proposals_spec.rb +++ b/decidim-proposals/spec/system/filter_proposals_spec.rb @@ -463,9 +463,9 @@ visit_component end - it "can be filtered by supported" do + it "can be filtered by voted" do within "form.new_filter" do - expect(page).to have_content(/Supported/i) + expect(page).to have_content(/Voted/i) end end @@ -484,9 +484,9 @@ visit_component end - it "cannot be filtered by supported" do + it "cannot be filtered by voted" do within "form.new_filter" do - expect(page).to have_no_content(/Supported/i) + expect(page).to have_no_content(/Voted/i) end end end diff --git a/decidim-proposals/spec/system/new_proposals_spec.rb b/decidim-proposals/spec/system/new_proposals_spec.rb index b3dc546cc7e47..474fdd94e83ef 100644 --- a/decidim-proposals/spec/system/new_proposals_spec.rb +++ b/decidim-proposals/spec/system/new_proposals_spec.rb @@ -75,5 +75,43 @@ end end end + + describe "validating the form" do + before do + click_on "New proposal" + end + + context "when focus shifts to body" do + it "displays error when title is empty" do + fill_in :proposal_title, with: " " + find_by_id("proposal_body").click + + expect(page).to have_css(".form-error.is-visible", text: "There is an error in this field.") + end + + it "displays error when title is invalid" do + fill_in :proposal_title, with: "invalid-title" + find_by_id("proposal_body").click + + expect(page).to have_css(".form-error.is-visible", text: "There is an error in this field") + end + end + + context "when focus remains on title" do + it "does not display error when title is empty" do + fill_in :proposal_title, with: " " + find_by_id("proposal_title").click + + expect(page).to have_no_css(".form-error.is-visible", text: "There is an error in this field.") + end + + it "does not display error when title is invalid" do + fill_in :proposal_title, with: "invalid-title" + find_by_id("proposal_title").click + + expect(page).to have_no_css(".form-error.is-visible", text: "There is an error in this field") + end + end + end end end diff --git a/decidim-proposals/spec/system/proposals_spec.rb b/decidim-proposals/spec/system/proposals_spec.rb index bed24c1413ab0..bdc13915dbc5d 100644 --- a/decidim-proposals/spec/system/proposals_spec.rb +++ b/decidim-proposals/spec/system/proposals_spec.rb @@ -469,7 +469,7 @@ before { visit_component } it "lists the proposals ordered by votes by default" do - expect(page).to have_css("a", text: "Most supported") + expect(page).to have_css("a", text: "Most voted") expect(page).to have_css("[id^='proposals__proposal']:first-child", text: most_voted_proposal_title) expect(page).to have_css("[id^='proposals__proposal']:last-child", text: less_voted_proposal_title) end @@ -544,7 +544,7 @@ let!(:votes) { create_list(:proposal_vote, 3, proposal: most_voted_proposal) } let!(:less_voted_proposal) { create(:proposal, component:) } - it_behaves_like "ordering proposals by selected option", "Most supported" do + it_behaves_like "ordering proposals by selected option", "Most voted" do let(:first_proposal) { most_voted_proposal } let(:last_proposal) { less_voted_proposal } end diff --git a/decidim-proposals/spec/system/vote_proposal_spec.rb b/decidim-proposals/spec/system/vote_proposal_spec.rb index f513b1c25a673..79d32805b3ca9 100644 --- a/decidim-proposals/spec/system/vote_proposal_spec.rb +++ b/decidim-proposals/spec/system/vote_proposal_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "Support Proposal", slow: true do +describe "Vote Proposal", slow: true do include_context "with a component" let(:manifest_name) { "proposals" } @@ -13,8 +13,8 @@ let!(:user) { create(:user, :confirmed, organization:) } def expect_page_not_to_include_votes - expect(page).to have_no_button("Support") - expect(page).to have_no_css(".progress-bar__container .progress-bar__number span", text: "0\nSupports") + expect(page).to have_no_button("Vote") + expect(page).to have_no_css(".progress-bar__container .progress-bar__number span", text: "0\nVotes") end context "when votes are not enabled" do @@ -71,7 +71,7 @@ def expect_page_not_to_include_votes click_on proposal_title within ".proposal__aside-vote" do - click_on "Support" + click_on "Vote" end expect(page).to have_css("#loginModal", visible: :visible) @@ -91,12 +91,12 @@ def expect_page_not_to_include_votes it "is able to vote the proposal" do within "#proposal-#{proposal.id}-vote-button" do - click_on "Support" - expect(page).to have_button("Already supported") + click_on "Vote" + expect(page).to have_button("Already voted") end within "#proposal-#{proposal.id}-votes-count" do - expect(page).to have_content("1\nSupport") + expect(page).to have_content("1\nVote") end end end @@ -110,23 +110,23 @@ def expect_page_not_to_include_votes it "is not able to vote it again" do within "#proposal-#{proposal.id}-vote-button" do - expect(page).to have_button("Already supported") - expect(page).to have_no_button("Support") + expect(page).to have_button("Already voted") + expect(page).to have_no_button("Vote") end within "#proposal-#{proposal.id}-votes-count" do - expect(page).to have_content("1\nSupport") + expect(page).to have_content("1\nVote") end end it "is able to undo the vote" do within "#proposal-#{proposal.id}-vote-button" do - click_on "Already supported" - expect(page).to have_button("Support") + click_on "Already voted" + expect(page).to have_button("Vote") end within "#proposal-#{proposal.id}-votes-count" do - expect(page).to have_content("0\nSupports") + expect(page).to have_content("0\nVotes") end end end @@ -225,11 +225,11 @@ def expect_page_not_to_include_votes it "updates the remaining votes counter" do within ".proposal__aside-vote" do - click_on "Support" - expect(page).to have_button("Already supported") + click_on "Vote" + expect(page).to have_button("Already voted") end - expect(page).to have_content("Remaining 9 supports") + expect(page).to have_content("Remaining 9 votes") end end @@ -250,7 +250,7 @@ def expect_page_not_to_include_votes it "shows a modal dialog" do within "#proposal-#{proposal.id}-vote-button" do - click_on "Support" + click_on "Vote" end expect(page).to have_content("Authorization required") @@ -266,22 +266,22 @@ def expect_page_not_to_include_votes it "is not able to vote it again" do within "#proposal-#{proposal.id}-vote-button" do - expect(page).to have_button("Already supported") - expect(page).to have_no_button("Support") + expect(page).to have_button("Already voted") + expect(page).to have_no_button("Vote") end end it "is able to undo the vote" do within ".proposal__aside-vote" do - click_on "Already supported" - expect(page).to have_button("Support") + click_on "Already voted" + expect(page).to have_button("Vote") end within "#proposal-#{proposal.id}-votes-count" do - expect(page).to have_content("0\nSupports") + expect(page).to have_content("0\nVotes") end - expect(page).to have_content("Remaining 10 supports") + expect(page).to have_content("Remaining 10 votes") end end @@ -296,14 +296,14 @@ def expect_page_not_to_include_votes it "is not able to vote other proposals" do click_on proposal_title within ".proposal__aside-vote" do - expect(page).to have_content("1\nSupport") + expect(page).to have_content("1\nVote") end other_proposals_titles.each do |title| visit_component click_on title within ".proposal__aside-vote" do - expect(page).to have_content("No supports remaining") + expect(page).to have_content("No votes remaining") expect(page).to have_css(".button[disabled]") end end @@ -320,14 +320,14 @@ def expect_page_not_to_include_votes it "shows the vote count but not the vote button" do click_on proposal_title within ".proposal__aside-vote" do - expect(page).to have_content("1\nSupport") + expect(page).to have_content("1\nVote") end other_proposals_titles.each do |title| visit_component click_on title within ".proposal__aside-vote" do - expect(page).to have_content("Supports disabled") + expect(page).to have_content("Voting disabled") expect(page).to have_css(".button[disabled]") end end @@ -380,7 +380,7 @@ def expect_page_not_to_include_votes click_on proposal_title within "#proposal-#{proposal.id}-vote-button" do - expect(page).to have_content("Support limit reached") + expect(page).to have_content("Vote limit reached") end end @@ -389,8 +389,8 @@ def expect_page_not_to_include_votes click_on proposal_title within ".proposal__aside-vote" do - click_on "Support" - expect(page).to have_content("Already supported") + click_on "Vote" + expect(page).to have_content("Already voted") end end end @@ -400,7 +400,7 @@ def expect_page_not_to_include_votes create(:proposal_component, :with_votes_enabled, :with_threshold_per_proposal, - :with_can_accumulate_supports_beyond_threshold, + :with_can_accumulate_votes_beyond_threshold, manifest:, participatory_space: participatory_process) end @@ -415,7 +415,7 @@ def expect_page_not_to_include_votes click_on proposal_title within ".proposal__aside-vote" do - expect(page).to have_content("1\nSupport") + expect(page).to have_content("1\nVote") end end end @@ -444,37 +444,37 @@ def expect_page_not_to_include_votes click_on proposal_titles[0] within ".proposal__aside-vote" do - click_on "Support" - expect(page).to have_content("Already supported") - expect(page).to have_content("0\nSupports") + click_on "Vote" + expect(page).to have_content("Already voted") + expect(page).to have_content("0\nVotes") end visit_component click_on proposal_titles[1] within ".proposal__aside-vote" do - click_on "Support" - expect(page).to have_content("Already supported") - expect(page).to have_content("0\nSupports") + click_on "Vote" + expect(page).to have_content("Already voted") + expect(page).to have_content("0\nVotes") end visit_component click_on proposal_titles[2] within ".proposal__aside-vote" do - click_on "Support" - expect(page).to have_content("Already supported") - expect(page).to have_content("1\nSupport") + click_on "Vote" + expect(page).to have_content("Already voted") + expect(page).to have_content("1\nVote") end visit_component click_on proposal_titles[0] within ".proposal__aside-vote" do - expect(page).to have_content("1\nSupport") + expect(page).to have_content("1\nVote") end visit_component click_on proposal_titles[1] within ".proposal__aside-vote" do - expect(page).to have_content("1\nSupport") + expect(page).to have_content("1\nVote") end end end @@ -490,8 +490,8 @@ def expect_page_not_to_include_votes expect do within ".proposal__aside-vote" do - click_on "Support" - expect(page).to have_content("1\nSupport") + click_on "Vote" + expect(page).to have_content("1\nVote") end end.to change { Decidim::Gamification.status_for(user, :proposal_votes).score }.by(1) end diff --git a/decidim-sortitions/config/locales/tr-TR.yml b/decidim-sortitions/config/locales/tr-TR.yml index a2c5684de8376..92382a46d7902 100644 --- a/decidim-sortitions/config/locales/tr-TR.yml +++ b/decidim-sortitions/config/locales/tr-TR.yml @@ -88,6 +88,8 @@ tr: cancelled: İptal edildi category: Kategori state: Statü + index: + empty: Henüz bir sıralama yok. linked_sortitions: selected_proposals: Seçili teklifler orders: diff --git a/decidim-sortitions/spec/shared/manage_sortitions_examples.rb b/decidim-sortitions/spec/shared/manage_sortitions_examples.rb index 1d91844dbdf42..3f74a180a27de 100644 --- a/decidim-sortitions/spec/shared/manage_sortitions_examples.rb +++ b/decidim-sortitions/spec/shared/manage_sortitions_examples.rb @@ -56,37 +56,20 @@ let(:sortition_dice) { Faker::Number.between(from: 1, to: 6) } let(:sortition_target_items) { Faker::Number.between(from: 1, to: 10) } let!(:proposal) { create(:proposal, component: proposal_component) } + let(:attributes) { attributes_for(:sortition, component: current_component) } it_behaves_like "having a rich text editor for field", ".tabs-content[data-tabs-content='sortition-additional_info-tabs']", "full" it_behaves_like "having a rich text editor for field", ".tabs-content[data-tabs-content='sortition-witnesses-tabs']", "content" - it "shows the sortition details" do + it "shows the sortition details", versioning: true do within ".new_sortition" do fill_in :sortition_dice, with: sortition_dice fill_in :sortition_target_items, with: sortition_target_items select translated(proposal_component.name), from: :sortition_decidim_proposals_component_id - fill_in_i18n_editor( - :sortition_witnesses, - "#sortition-witnesses-tabs", - en: "Witnesses", - es: "Testigos", - ca: "Testimonis" - ) - fill_in_i18n_editor( - :sortition_additional_info, - "#sortition-additional_info-tabs", - en: "additional info", - es: "Información adicional", - ca: "Informació adicional" - ) - - fill_in_i18n( - :sortition_title, - "#sortition-title-tabs", - en: "Title", - es: "Título", - ca: "Títol" - ) + + fill_in_i18n_editor(:sortition_witnesses, "#sortition-witnesses-tabs", **attributes[:witnesses].except("machine_translations")) + fill_in_i18n_editor(:sortition_additional_info, "#sortition-additional_info-tabs", **attributes[:additional_info].except("machine_translations")) + fill_in_i18n(:sortition_title, "#sortition-title-tabs", **attributes[:title].except("machine_translations")) accept_confirm { find("*[type=submit]").click } end @@ -114,6 +97,9 @@ expect(page).to have_content(translated(p.title)) end end + + visit decidim_admin.root_path + expect(page).to have_content("created the #{translated(attributes[:title])} sortition") end end end diff --git a/decidim-sortitions/spec/shared/update_sortitions_examples.rb b/decidim-sortitions/spec/shared/update_sortitions_examples.rb index dfdd852d0f32a..05f063e0024f5 100644 --- a/decidim-sortitions/spec/shared/update_sortitions_examples.rb +++ b/decidim-sortitions/spec/shared/update_sortitions_examples.rb @@ -3,6 +3,7 @@ shared_examples "update sortitions" do describe "update sortition data" do let!(:sortition) { create(:sortition, component: current_component) } + let(:attributes) { attributes_for(:sortition, component: current_component) } before do visit_component_admin @@ -24,28 +25,18 @@ end context "when updates a sortition" do - it "Redirects to sortitions view" do + it "Redirects to sortitions view", versioning: true do within ".edit_sortition" do - fill_in_i18n_editor( - :sortition_additional_info, - "#sortition-additional_info-tabs", - en: "Additional info", - es: "Información adicional", - ca: "Informació adicional" - ) - - fill_in_i18n( - :sortition_title, - "#sortition-title-tabs", - en: "Title", - es: "Título", - ca: "Títol" - ) + fill_in_i18n_editor(:sortition_additional_info, "#sortition-additional_info-tabs", **attributes[:additional_info].except("machine_translations")) + fill_in_i18n(:sortition_title, "#sortition-title-tabs", **attributes[:title].except("machine_translations")) find("*[type=submit]").click end expect(page).to have_admin_callout("successfully") + + visit decidim_admin.root_path + expect(page).to have_content("updated the #{translated(attributes[:title])} sortition") end end end diff --git a/decidim-system/app/cells/decidim/system/system_checks/show.erb b/decidim-system/app/cells/decidim/system/system_checks/show.erb new file mode 100644 index 0000000000000..197264438f930 --- /dev/null +++ b/decidim-system/app/cells/decidim/system/system_checks/show.erb @@ -0,0 +1,13 @@ +
      + <% checks.each do |key, check| %> +
    • + <% if check[:check_method] %> + <%= icon "checkbox-circle-line", class: "fill-success inline" %> + <%= t("#{key}.success", scope: "decidim.system.system_checks") %> + <% else %> + <%= icon "close-circle-line", class: "fill-alert inline" %> + <%= t("#{key}.error", scope: "decidim.system.system_checks", error_extra: check[:error_extra]) %> + <% end %> +
    • + <% end %> +
    diff --git a/decidim-system/app/cells/decidim/system/system_checks_cell.rb b/decidim-system/app/cells/decidim/system/system_checks_cell.rb new file mode 100644 index 0000000000000..658c891248d16 --- /dev/null +++ b/decidim-system/app/cells/decidim/system/system_checks_cell.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +module Decidim + module System + class SystemChecksCell < Decidim::ViewModel + def show + render + end + + private + + def checks + { + secret_key: { + check_method: correct_secret_key_base?, + error_extra: generated_secret_key + }, + active_job_queue: { + check_method: correct_active_job_queue?, + error_extra: active_job_queue_link + } + } + end + + def correct_secret_key_base? + Rails.application.secrets.secret_key_base&.length == 128 + end + + def generated_secret_key + SecureRandom.hex(64) + end + + def correct_active_job_queue? + # The default ActiveJob queue is not recommended for production environments, + # as it can lose jobs when restarting + Rails.application.config.active_job.queue_adapter != :async + end + + def active_job_queue_link + link_to(t("active_job_queue.decidim_documentation", scope: "decidim.system.system_checks"), + "https://docs.decidim.org/en/develop/services/activejob", + class: "underline text-primary", + target: "_blank", + rel: "nofollow noopener noreferrer") + end + end + end +end diff --git a/decidim-system/app/controllers/decidim/system/dashboard_controller.rb b/decidim-system/app/controllers/decidim/system/dashboard_controller.rb index f751fde71333a..022c30dae1deb 100644 --- a/decidim-system/app/controllers/decidim/system/dashboard_controller.rb +++ b/decidim-system/app/controllers/decidim/system/dashboard_controller.rb @@ -10,6 +10,8 @@ def show @admins = Admin.all end + private + def check_organizations_presence return if Organization.exists? diff --git a/decidim-system/app/views/decidim/system/dashboard/show.html.erb b/decidim-system/app/views/decidim/system/dashboard/show.html.erb index 560897e702c52..d5bd056742fc9 100644 --- a/decidim-system/app/views/decidim/system/dashboard/show.html.erb +++ b/decidim-system/app/views/decidim/system/dashboard/show.html.erb @@ -4,6 +4,10 @@

    <%= t("decidim.system.titles.dashboard") %>

    <% end %> +

    <%= t ".system_checks" %>

    + +<%= cell "decidim/system/system_checks", nil %> +

    <%= t ".current_organizations" %>

    <%= link_to t("actions.new_organization", scope: "decidim.system"), [:new, :organization], class: "button button__sm md:button__lg button__primary" %> diff --git a/decidim-system/app/views/layouts/decidim/system/_js_configuration.html.erb b/decidim-system/app/views/layouts/decidim/system/_js_configuration.html.erb index c226c5c5b16eb..626b5148f1050 100644 --- a/decidim-system/app/views/layouts/decidim/system/_js_configuration.html.erb +++ b/decidim-system/app/views/layouts/decidim/system/_js_configuration.html.erb @@ -1,6 +1,6 @@ <% js_configs = { - icons_path: Decidim.cors_enabled ? "" : asset_pack_path("media/images/icons.svg") + icons_path: Decidim.cors_enabled ? "" : asset_pack_path("media/images/remixicon.symbol.svg") } %> diff --git a/decidim-system/config/locales/bg.yml b/decidim-system/config/locales/bg.yml index e91d7bba73d57..cf890795df68b 100644 --- a/decidim-system/config/locales/bg.yml +++ b/decidim-system/config/locales/bg.yml @@ -31,6 +31,10 @@ bg: attributes: redirect_uri: must_be_ssl: URI адресът за пренасочване трябва да бъде SSL URI + organization: + attributes: + password: + secret_key: Трябва да дефинирате променливата на средата SECRET_KEY_BASE, за да можете да запазите това поле decidim: system: actions: @@ -63,6 +67,7 @@ bg: show: admins: Администратори current_organizations: Текущи организации + system_checks: Проверки на системата default_pages: placeholders: content: Моля, добавете важно съдържание на статичната страница %{page} в администраторското табло. @@ -138,6 +143,7 @@ bg: show: Показване на разширените настройки create: error: Възникна проблем при създаването на нова организация. + error_invitation: Възникна проблем при създаването на нова организация. Прегледайте администраторското име на вашата организация. success_html: |

    Организацията е създадена успешно. @@ -244,6 +250,8 @@ bg: smtp_settings: fieldsets: sender: Подател + instructions: + from_label: 'Изпращачът на имейл ще бъде: „име-на-вашата-организация . Оставете празно, за да използвате същото име като дефинираното за организацията.' placeholder: from_email: your-organization@example.org from_label: your-organization-name @@ -261,6 +269,14 @@ bg: organizations_list: confirm_resend_invitation: Сигурни ли сте, че искате да изпратите отново тази покана? resend_invitation: Изпратете отново покана + system_checks: + active_job_queue: + decidim_documentation: Документация на Civil Power + error: Опашката ActiveJob не е конфигурирана. Това не е препоръчителна настройка за производство. Прочетете повече на %{error_extra}. + success: Опашката ActiveJob е конфигурирана правилно. + secret_key: + error: 'Тайният ключ не е дефиниран правилно. Моля, запазете в променливата на средата SECRET_KEY_BASE и рестартирайте сървъра: %{error_extra}' + success: Тайният ключ е конфигуриран правилно. titles: dashboard: Табло за управление decidim: Civil Power diff --git a/decidim-system/config/locales/ca.yml b/decidim-system/config/locales/ca.yml index d0a24d427c645..9d5b76b929e10 100644 --- a/decidim-system/config/locales/ca.yml +++ b/decidim-system/config/locales/ca.yml @@ -67,6 +67,7 @@ ca: show: admins: Administradores current_organizations: Organitzacions actuals + system_checks: Comprovació del sistema default_pages: placeholders: content: Si us plau, afegeix contingut significatiu a la pàgina estàtica de %{page} dins el panell d'administració. @@ -142,6 +143,7 @@ ca: show: Mostra la configuració avançada create: error: S'ha produït un error en crear una nova organització. + error_invitation: Hi ha hagut un problema en crear una nova organització. Revisa el nom de l'administradora de l'organització. success_html: |

    Organitzció creada correctament. @@ -266,6 +268,14 @@ ca: organizations_list: confirm_resend_invitation: Segur que vols reenviar la invitació? resend_invitation: Reenviar la invitació + system_checks: + active_job_queue: + decidim_documentation: Documentació sobre Decidim + error: La cua d'ActiveJob no està configurada. Aquesta no és una configuració recomanable per l'entorn de producció. Llegir més a %{error_extra}. + success: La cua d'ActiveJob està configurada correctament. + secret_key: + error: 'La clau secreta no està definida correctament. Si us plau, guarda-la a la variable d''entorn: SECRET_KEY_BASE, i reinicia el servidor: llegir més a %{error_extra}.' + success: La clau secreta està configurada correctament. titles: dashboard: Tauler de control decidim: Decidim diff --git a/decidim-system/config/locales/de.yml b/decidim-system/config/locales/de.yml index 6c05a7d17be13..af1eba0326e15 100644 --- a/decidim-system/config/locales/de.yml +++ b/decidim-system/config/locales/de.yml @@ -67,6 +67,7 @@ de: show: admins: Admins current_organizations: Aktuelle Organisationen + system_checks: System-Prüfung default_pages: placeholders: content: Fügen Sie der statischen Seite %{page} im Admin-Dashboard sinnvollen Inhalt hinzu. @@ -142,6 +143,7 @@ de: show: Zeige erweiterte Einstellungen create: error: Beim Erstellen einer neuen Organisation ist ein Fehler aufgetreten. + error_invitation: Es gab ein Problem beim Erstellen einer neuen Organisation. Überprüfen Sie den Administratornamen Ihrer Organisation. success_html: |

    Organisation erfolgreich erstellt. @@ -259,6 +261,14 @@ de: organizations_list: confirm_resend_invitation: Sind Sie sicher, das Sie die Einladung erneut senden möchten? resend_invitation: Einladung erneut senden + system_checks: + active_job_queue: + decidim_documentation: Decidim-Dokumentation + error: Die ActiveJob-Warteschlange ist nicht konfiguriert. Dies ist kein empfohlenes Setup für die Produktion. Lesen Sie mehr unter %{error_extra}. + success: Die ActiveJob-Warteschlange ist korrekt konfiguriert. + secret_key: + error: 'Der geheime Schlüssel ist nicht korrekt definiert. Bitte speichern Sie ihn in der SECRET_KEY_BASE Umgebungsvariable und starten Sie den Server neu: %{error_extra}' + success: Der geheime Schlüssel ist korrekt konfiguriert. titles: dashboard: Instrumententafel decidim: Decidim diff --git a/decidim-system/config/locales/en.yml b/decidim-system/config/locales/en.yml index f030e881c52d8..5a395cf918ca9 100644 --- a/decidim-system/config/locales/en.yml +++ b/decidim-system/config/locales/en.yml @@ -68,6 +68,7 @@ en: show: admins: Admins current_organizations: Current organizations + system_checks: System checks default_pages: placeholders: content: Please add meaningful content to the %{page} static page on the admin dashboard. @@ -269,6 +270,14 @@ en: organizations_list: confirm_resend_invitation: Are you sure you want to resend the invitation? resend_invitation: Resend invitation + system_checks: + active_job_queue: + decidim_documentation: Decidim Documentation + error: The ActiveJob queue is not configured. This is not a recommended setup for production. Read more at %{error_extra}. + success: The ActiveJob queue is configured correctly. + secret_key: + error: 'The secret key is not defined correctly. Please save to the SECRET_KEY_BASE environment variable and restart the server: %{error_extra}' + success: The secret key is configured correctly. titles: dashboard: Dashboard decidim: Decidim diff --git a/decidim-system/config/locales/es-MX.yml b/decidim-system/config/locales/es-MX.yml index 8900756c7a06e..1c99dd7f2d07a 100644 --- a/decidim-system/config/locales/es-MX.yml +++ b/decidim-system/config/locales/es-MX.yml @@ -67,6 +67,7 @@ es-MX: show: admins: Administradoras current_organizations: Organizaciones actuales + system_checks: Comprobación del sistema default_pages: placeholders: content: Agrega contenido significativo a la página estática de %{page} en el panel de admin. @@ -142,6 +143,7 @@ es-MX: show: Mostrar configuración avanzada create: error: Se ha producido un error al crear una nueva organización. + error_invitation: Hubo un problema al crear una nueva organización. Revisa el nombre de la administradora de la organización. success_html: |

    Organización creada correctamente. @@ -267,6 +269,14 @@ es-MX: organizations_list: confirm_resend_invitation: '¿Seguro que quieres reenviar la invitación?' resend_invitation: Reenviar la invitación + system_checks: + active_job_queue: + decidim_documentation: Documentación sobre Decidim + error: La cola de ActiveJob no está configurada. Esta no es una configuración recomendada para el entrono de producción. Leer más en %{error_extra}. + success: La cola de ActiveJob está configurada correctamente. + secret_key: + error: 'La clave secreta no está definida correctamente. Por favor, guárdala en la variable de entorno: SECRET_KEY_BASE, y reinicie el servidor: leer más en %{error_extra}.' + success: La clave secreta está configurada correctamente. titles: dashboard: Panel de control decidim: Decidim diff --git a/decidim-system/config/locales/es-PY.yml b/decidim-system/config/locales/es-PY.yml index 23fd3677c1a41..02d6336d036ae 100644 --- a/decidim-system/config/locales/es-PY.yml +++ b/decidim-system/config/locales/es-PY.yml @@ -67,6 +67,7 @@ es-PY: show: admins: Administradoras current_organizations: Organizaciones actuales + system_checks: Comprobación del sistema default_pages: placeholders: content: Agrega contenido significativo a la página estática de %{page} en el panel de admin. @@ -142,6 +143,7 @@ es-PY: show: Mostrar configuración avanzada create: error: Se ha producido un error al crear una nueva organización. + error_invitation: Hubo un problema al crear una nueva organización. Revisa el nombre de la administradora de la organización. success_html: |

    Organización creada correctamente. @@ -267,6 +269,14 @@ es-PY: organizations_list: confirm_resend_invitation: '¿Seguro que quieres reenviar la invitación?' resend_invitation: Reenviar la invitación + system_checks: + active_job_queue: + decidim_documentation: Documentación sobre Decidim + error: La cola de ActiveJob no está configurada. Esta no es una configuración recomendada para el entrono de producción. Leer más en %{error_extra}. + success: La cola de ActiveJob está configurada correctamente. + secret_key: + error: 'La clave secreta no está definida correctamente. Por favor, guárdala en la variable de entorno: SECRET_KEY_BASE, y reinicie el servidor: leer más en %{error_extra}.' + success: La clave secreta está configurada correctamente. titles: dashboard: Panel de control decidim: Decidim diff --git a/decidim-system/config/locales/es.yml b/decidim-system/config/locales/es.yml index b38ef8d0b36de..f6649875d07b1 100644 --- a/decidim-system/config/locales/es.yml +++ b/decidim-system/config/locales/es.yml @@ -67,6 +67,7 @@ es: show: admins: Administradoras current_organizations: Organizaciones actuales + system_checks: Comprobación del sistema default_pages: placeholders: content: Por favor, agrega contenido significativo a la página estática de %{page} en el panel de administración. @@ -142,6 +143,7 @@ es: show: Mostrar configuración avanzada create: error: Se ha producido un error al crear una nueva organización. + error_invitation: Hubo un problema al crear una nueva organización. Revisa el nombre de la administradora de la organización. success_html: |

    Organización creada correctamente. @@ -267,6 +269,14 @@ es: organizations_list: confirm_resend_invitation: '¿Seguro que quieres reenviar la invitación?' resend_invitation: Reenviar la invitación + system_checks: + active_job_queue: + decidim_documentation: Documentación sobre Decidim + error: La cola de ActiveJob no está configurada. Esta no es una configuración recomendada para el entrono de producción. Leer más en %{error_extra}. + success: La cola de ActiveJob está configurada correctamente. + secret_key: + error: 'La clave secreta no está definida correctamente. Por favor, guárdala en la variable de entorno: SECRET_KEY_BASE, y reinicie el servidor: leer más en %{error_extra}.' + success: La clave secreta está configurada correctamente. titles: dashboard: Panel de administración decidim: Decidim diff --git a/decidim-system/config/locales/eu.yml b/decidim-system/config/locales/eu.yml index 4b1b70195229f..1156d482caaa3 100644 --- a/decidim-system/config/locales/eu.yml +++ b/decidim-system/config/locales/eu.yml @@ -67,6 +67,7 @@ eu: show: admins: Administratzaileak current_organizations: Uneko antolatzaileak + system_checks: Sistemaren egiaztapenak default_pages: placeholders: content: Mesedez, gehitu eduki adierazgarria %{page} (a) ren orri estatikoaren administrazio-panelean. @@ -142,6 +143,7 @@ eu: show: Erakutsi aukera aurreratua create: error: Errorea izan da antolatzaile berri bat sortzean. + error_invitation: Arazo bat sortu da erakunde berri bat sortzean. Berrikusi erakundearen administratzailearen izena. success_html: |

    Arrakastaz sortutako erakundea. @@ -268,6 +270,14 @@ eu: organizations_list: confirm_resend_invitation: Ziur zaude gonbidapena birbidali nahi duzula? resend_invitation: Birbidali gonbidapena + system_checks: + active_job_queue: + decidim_documentation: Dokumentazioa Decidimez + error: 'ActiveJob ilara ez dago konfiguratuta. Hau ez da ekoizpenerako gomendatutako muntaia. Irakurri gehiago hemen: % {error_extra}.' + success: ActiveJob ilara behar bezala konfiguratuta dago. + secret_key: + error: 'Gako sekretua ez dago ondo definituta. Gorde, mesedez, SECRET_KEY_BASE aldagaia eta berrabiarazi zerbitzaria: % {error_extra}' + success: Gako sekretua behar bezala konfiguratuta dago. titles: dashboard: Kontrol-panela decidim: Decidim diff --git a/decidim-system/config/locales/fi-plain.yml b/decidim-system/config/locales/fi-plain.yml index 86ef85cc9bc8b..e9b03da9eabb3 100644 --- a/decidim-system/config/locales/fi-plain.yml +++ b/decidim-system/config/locales/fi-plain.yml @@ -142,6 +142,7 @@ fi-pl: show: Näytä lisäasetukset create: error: Uuden organisaation luonnissa tapahtui virhe. + error_invitation: Uuden organisaation luominen epäonnistui. Tarkasta organisaation hallintakäyttäjän nimi. success_html: |

    Organisaation luonti onnistui. diff --git a/decidim-system/config/locales/fi.yml b/decidim-system/config/locales/fi.yml index 93e95eadcc280..ba400b4b33336 100644 --- a/decidim-system/config/locales/fi.yml +++ b/decidim-system/config/locales/fi.yml @@ -142,6 +142,7 @@ fi: show: Näytä lisäasetukset create: error: Uuden organisaation luonti epäonnistui. + error_invitation: Uuden organisaation luominen epäonnistui. Tarkasta organisaation hallintakäyttäjän nimi. success_html: |

    Organisaation luonti onnistui. diff --git a/decidim-system/config/locales/fr-CA.yml b/decidim-system/config/locales/fr-CA.yml index 3a9a1ed91fc24..910df813d93d8 100644 --- a/decidim-system/config/locales/fr-CA.yml +++ b/decidim-system/config/locales/fr-CA.yml @@ -67,6 +67,7 @@ fr-CA: show: admins: Administrateurs current_organizations: Organisations actuelles + system_checks: Vérifications du système default_pages: placeholders: content: Ajoutez un contenu pertinent à la page %{page} en allant sur l'interface d'administration. @@ -142,6 +143,7 @@ fr-CA: show: Afficher les paramètres avancés create: error: Une erreur s'est produite lors de la création d'une nouvelle organisation. + error_invitation: Il y a eu un problème lors de la création d'une nouvelle organisation. Vérifiez le nom de l'administrateur de votre organisation. success_html: |

    Organisation créée avec succès. @@ -267,6 +269,14 @@ fr-CA: organizations_list: confirm_resend_invitation: Êtes-vous sûr de vouloir renvoyer l'invitation ? resend_invitation: Renvoyer l'invitation + system_checks: + active_job_queue: + decidim_documentation: Documentation de Decidim + error: La file d'attente ActiveJob n'est pas configurée. Ce n'est pas une configuration recommandée pour de la production. En savoir plus sur %{error_extra}. + success: La file d'attente ActiveJob est correctement configurée. + secret_key: + error: 'La clé secrète n''est pas définie correctement. Veuillez l''enregistrer dans la variable d''environnement SECRET_KEY_BASE et redémarrer le serveur : %{error_extra}' + success: La clé secrète est correctement configurée. titles: dashboard: Tableau de bord decidim: Decidim diff --git a/decidim-system/config/locales/fr.yml b/decidim-system/config/locales/fr.yml index b61a1883535cd..25062ba0fcb3b 100644 --- a/decidim-system/config/locales/fr.yml +++ b/decidim-system/config/locales/fr.yml @@ -67,6 +67,7 @@ fr: show: admins: Administrateurs current_organizations: Organisations actuelles + system_checks: Vérifications du système default_pages: placeholders: content: Ajoutez un contenu pertinent à la page %{page} en allant sur l'interface d'administration. @@ -142,6 +143,7 @@ fr: show: Afficher les paramètres avancés create: error: Une erreur s'est produite lors de la création d'une nouvelle organisation. + error_invitation: Il y a eu un problème lors de la création d'une nouvelle organisation. Vérifiez le nom de l'administrateur de votre organisation. success_html: |

    Organisation créée avec succès. @@ -267,6 +269,14 @@ fr: organizations_list: confirm_resend_invitation: Êtes-vous sûr de vouloir renvoyer l'invitation ? resend_invitation: Renvoyer l'invitation + system_checks: + active_job_queue: + decidim_documentation: Documentation de Decidim + error: La file d'attente ActiveJob n'est pas configurée. Ce n'est pas une configuration recommandée pour de la production. En savoir plus sur %{error_extra}. + success: La file d'attente ActiveJob est correctement configurée. + secret_key: + error: 'La clé secrète n''est pas définie correctement. Veuillez l''enregistrer dans la variable d''environnement SECRET_KEY_BASE et redémarrer le serveur : %{error_extra}' + success: La clé secrète est correctement configurée. titles: dashboard: Tableau de bord decidim: Decidim diff --git a/decidim-system/config/locales/it.yml b/decidim-system/config/locales/it.yml index a68542cd5acc7..2c0a98e06fb66 100644 --- a/decidim-system/config/locales/it.yml +++ b/decidim-system/config/locales/it.yml @@ -112,6 +112,7 @@ it: show: Mostra impostazioni avanzate create: error: C'è stato un errore durante la creazione di una nuova organizzazione. + error_invitation: Si è verificato un problema durante la creazione di una nuova organizzazione. Controlla il nome dell'amministratore dell'organizzazione. edit: secondary_hosts_hint: Inserisci ciascun elemento in una nuova linea file_upload_settings: diff --git a/decidim-system/config/locales/ja.yml b/decidim-system/config/locales/ja.yml index 9f331be184888..5578ea4e60e85 100644 --- a/decidim-system/config/locales/ja.yml +++ b/decidim-system/config/locales/ja.yml @@ -67,6 +67,7 @@ ja: show: admins: 管理者 current_organizations: 現在の組織 + system_checks: システムチェック default_pages: placeholders: content: 管理ダッシュボードの %{page} 静的ページに意味のあるコンテンツを追加してください。 @@ -142,6 +143,7 @@ ja: show: 詳細設定を表示 create: error: 新しい組織を作成する際に問題が発生しました。 + error_invitation: 新しい組織を作成する際に問題が発生しました。組織の管理者名を確認してください。 success_html: |

    組織を作成しました。 @@ -265,6 +267,14 @@ ja: organizations_list: confirm_resend_invitation: 招待を再送信してもよろしいですか? resend_invitation: 招待を再送信する + system_checks: + active_job_queue: + decidim_documentation: Decidimドキュメント + error: ActiveJob キューが設定されていません。これは本番環境では推奨されるセットアップではありません。詳細は %{error_extra} をご覧ください。 + success: ActiveJob キューが正しく設定されています。 + secret_key: + error: 'シークレットキーが正しく定義されていません。環境変数 SECRET_KEY_BASE に保存し、サーバーを再起動してください: %{error_extra}' + success: 秘密鍵が正しく設定されています。 titles: dashboard: ダッシュボード decidim: Decidim diff --git a/decidim-system/config/locales/tr-TR.yml b/decidim-system/config/locales/tr-TR.yml index 5a3d9855c1c05..e254dc5c1f8bf 100644 --- a/decidim-system/config/locales/tr-TR.yml +++ b/decidim-system/config/locales/tr-TR.yml @@ -109,6 +109,26 @@ tr: organizations: create: error: Yeni bir organizasyon oluştururken bir sorun oluştu. + error_invitation: Yeni bir kuruluş oluşturulurken bir sorun oluştu. Kuruluşunuzun yönetici adını gözden geçirin. + csp_settings: + default_src_hint: | + Default-src yönergesi, JavaScript, Görseller, CSS, Yazı Tipleri, AJAX istekleri, Çerçeveler, HTML5 Medya gibi içeriklerin yüklenmesine ilişkin varsayılan politikadır. + Platform "'self' 'unsafe-inline'" ekleyecektir, ancak daha fazlasını eklemenize olanak tanır. Emin değilseniz boş bırakın. + font_src_hint: | + Font-src yönergesi @font-face kullanılarak yüklenebilecek URL'leri kısıtlar. + Platform 'kendini' ekleyecektir ancak daha fazlasını eklemenize olanak tanır. Emin değilseniz boş bırakın. + frame_src_hint: | + Frame-src yönergesi ,