From f96f4a197dad24f72ade2809a0a255c9e38963af Mon Sep 17 00:00:00 2001 From: stephanierousset <61418966+Stef-Rousset@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:04:57 +0200 Subject: [PATCH] Fix: add missing translations for export dropdown in proposals admin (#582) * fix: add missing translations for export dropdown in proposals admin * fix: trying add necessary libu2f-udev dependance for google-chrome-stable install * fix: add command to block updates of chrome * fix: add command to unisntall old version of chrome * test: update failing test * chore:update config file after i18n test * ci: add check of chrome version * ci: last try to resolve chrome version * ci: last attempt fix * ci: back to previous code * ci: try remove downgrade of chrome * ci: back to code with downgrade * add missing dependency for chrome custom install --------- Co-authored-by: moustachu --- .github/workflows/ci_cd.yml | 7 +++++++ config/i18n-tasks.yml | 3 +++ config/locales/en.yml | 5 +++++ config/locales/fr.yml | 5 +++++ spec/jobs/export_job_spec.rb | 2 +- 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 828762d1aa..6a045e7a78 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -89,6 +89,7 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - run: | + sudo apt install libu2f-udev wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${{env.CHROME_VERSION}}-1_amd64.deb sudo dpkg -i /tmp/chrome.deb rm /tmp/chrome.deb @@ -161,6 +162,12 @@ jobs: with: ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true + - run: | + sudo apt install libu2f-udev + wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${{env.CHROME_VERSION}}-1_amd64.deb + sudo dpkg -i /tmp/chrome.deb + rm /tmp/chrome.deb + name: Install Chrome version ${{ env.CHROME_VERSION }} - uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 1425f5c36c..8ee5d31fe6 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -125,6 +125,7 @@ ignore_unused: - faker.* - activemodel.attributes.osp_authorization_handler.* - activemodel.attributes.participatory_process.private_space + - decidim.admin.exports.export_as - decidim.amendments.emendation.announcement.evaluating - decidim.authorization_handlers.osp_authorization_handler.{explanation, name} - decidim.authorization_handlers.osp_authorization_handler.fields.* @@ -135,6 +136,8 @@ ignore_unused: - decidim.meetings.meeting.not_allowed - decidim.meetings.directory.meetings.index.all - decidim.meetings.meetings.{create, update}.{invalid, success} + - decidim.proposals.admin.exports.awesome_private_proposals + - decidim.proposals.admin.exports.proposal_comments - decidim.scopes.global - decidim.scopes.picker.* - decidim.system.organizations.omniauth_settings.{france_connect, france_connect_profile, france_connect_uid}.* diff --git a/config/locales/en.yml b/config/locales/en.yml index 05468ab106..ef387ab37d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -17,6 +17,7 @@ en: decidim: admin: exports: + export_as: "%{name} as %{export_format}" notice: Your export is currently in progress. You'll receive an email when it's complete. participatory_space_private_users: create: @@ -130,6 +131,10 @@ en: show: local_area: Organization area proposals: + admin: + exports: + awesome_private_proposals: Proposals with private fields + proposal_comments: Comments collaborative_drafts: new: add_file: Add file diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 5e08e14303..66531c3ece 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -17,6 +17,7 @@ fr: decidim: admin: exports: + export_as: "%{name} au format %{export_format}" notice: Votre exportation est en cours. Vous recevrez un e-mail quand elle sera terminée. menu: admin_accountability: Admin accountability @@ -132,6 +133,10 @@ fr: show: local_area: Espace d'organisation proposals: + admin: + exports: + awesome_private_proposals: Propositions avec champs privés + proposal_comments: Commentaires collaborative_drafts: new: add_file: Ajouter le fichier diff --git a/spec/jobs/export_job_spec.rb b/spec/jobs/export_job_spec.rb index 37696939e0..cc923a7a3c 100644 --- a/spec/jobs/export_job_spec.rb +++ b/spec/jobs/export_job_spec.rb @@ -11,7 +11,7 @@ module Admin let!(:admin) { create(:user, :admin, organization: organization) } let!(:admin_of_the_process) { create(:user, organization: organization) } let!(:participatory_process) { create(:participatory_process, organization: organization) } - let(:proposal) { create(:proposal) } + let(:proposal) { create(:extended_proposal) } let(:collection) { [proposal] } # Use an array with the instance_double let(:export_manifest) do instance_double(