From 8b8e89f343ab96e32319c692597938eec2c2c1c9 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 16 Jan 2019 14:31:29 +0100 Subject: [PATCH 1/7] Fix typo --- config/locales/en/budgets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml index f7e99240d..24b16d1de 100644 --- a/config/locales/en/budgets.yml +++ b/config/locales/en/budgets.yml @@ -147,7 +147,7 @@ en: different_heading_assigned_html: "You have active votes in another heading: %{heading_link}" change_ballot: "If your change your mind you can remove your votes in %{check_ballot} and start again." check_ballot_link: "check my ballot" - price: "This heading have a budget of" + price: "This heading has a budget of" progress_bar: assigned: "You have assigned: " available: "Available budget: " From d93fd07bb7ecf608e98a39a4de83a06c6f17f889 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 16 Jan 2019 14:32:20 +0100 Subject: [PATCH 2/7] Update there are no budget i18n to add consistency --- config/locales/en/admin.yml | 2 +- config/locales/es/admin.yml | 2 +- spec/features/admin/budgets_spec.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index 7033fefbf..cbf7a605d 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -87,7 +87,7 @@ en: table_edit_budget: Edit edit_groups: Edit headings groups edit_budget: Edit budget - no_budgets: "There are no open budgets." + no_budgets: "There are no budgets." create: notice: New participatory budget created successfully! update: diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 0075225c7..a6dad6341 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -87,7 +87,7 @@ es: table_edit_budget: Editar edit_groups: Editar grupos de partidas edit_budget: Editar presupuesto - no_budgets: "No hay presupuestos abiertos." + no_budgets: "No hay presupuestos." create: notice: '¡Presupuestos participativos creados con éxito!' update: diff --git a/spec/features/admin/budgets_spec.rb b/spec/features/admin/budgets_spec.rb index ffd67f457..7854ea109 100644 --- a/spec/features/admin/budgets_spec.rb +++ b/spec/features/admin/budgets_spec.rb @@ -28,7 +28,7 @@ feature 'Admin budgets' do scenario 'Displaying no open budgets text' do visit admin_budgets_path - expect(page).to have_content("There are no open budgets.") + expect(page).to have_content("There are no budgets.") end scenario 'Displaying budgets' do @@ -125,7 +125,7 @@ feature 'Admin budgets' do click_link 'Delete budget' expect(page).to have_content('Budget deleted successfully') - expect(page).to have_content('There are no open budgets.') + expect(page).to have_content('There are no budgets.') end scenario 'Try to destroy a budget with investments' do From 25bf7bf37dfba423d6d5bf7db0e077d5fbc8c3bf Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 16 Jan 2019 14:33:38 +0100 Subject: [PATCH 3/7] Update i18n for proposals success To avoid confussions we use supports concept instead of votes for proposals. --- config/locales/en/settings.yml | 4 ++-- config/locales/es/settings.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/en/settings.yml b/config/locales/en/settings.yml index 808fcaee4..dcf570613 100644 --- a/config/locales/en/settings.yml +++ b/config/locales/en/settings.yml @@ -14,7 +14,7 @@ en: official_level_5_name_description: "Tag that will appear on users marked as Level 5 official position" max_ratio_anon_votes_on_debates: "Maximum ratio of anonymous votes per Debate" max_ratio_anon_votes_on_debates_description: "Anonymous votes are by registered users with an unverified account" - max_votes_for_proposal_edit: "Number of votes from which a Proposal can no longer be edited" + max_votes_for_proposal_edit: "Number of supports from which a Proposal can no longer be edited" max_votes_for_proposal_edit_description: "From this number of supports the author of a Proposal can no longer edit it" max_votes_for_debate_edit: "Number of votes from which a Debate can no longer be edited" max_votes_for_debate_edit_description: "From this number of votes the author of a Debate can no longer edit it" @@ -22,7 +22,7 @@ en: proposal_code_prefix_description: "This prefix will appear in the Proposals before the creation date and its ID" featured_proposals_number: "Number of featured proposals" featured_proposals_number_description: "Number of featured proposals that will be displayed if the Featured proposals feature is active" - votes_for_proposal_success: "Number of votes necessary for approval of a Proposal" + votes_for_proposal_success: "Number of supports necessary for approval of a Proposal" votes_for_proposal_success_description: "When a proposal reaches this number of supports it will no longer be able to receive more supports and is considered successful" months_to_archive_proposals: "Months to archive Proposals" months_to_archive_proposals_description: "After this number of months the Proposals will be archived and will no longer be able to receive supports" diff --git a/config/locales/es/settings.yml b/config/locales/es/settings.yml index af5203c01..397059419 100644 --- a/config/locales/es/settings.yml +++ b/config/locales/es/settings.yml @@ -14,7 +14,7 @@ es: official_level_5_name_description: "Etiqueta que aparecerá en los usuarios marcados como Nivel 5 de cargo público" max_ratio_anon_votes_on_debates: "Porcentaje máximo de votos anónimos por Debate" max_ratio_anon_votes_on_debates_description: "Se consideran votos anónimos los realizados por usuarios registrados con una cuenta sin verificar" - max_votes_for_proposal_edit: "Número de votos en que una Propuesta deja de poderse editar" + max_votes_for_proposal_edit: "Número de apoyos en que una Propuesta deja de poderse editar" max_votes_for_proposal_edit_description: "A partir de este número de apoyos el autor de una Propuesta ya no podrá editarla" max_votes_for_debate_edit: "Número de votos en que un Debate deja de poderse editar" max_votes_for_debate_edit_description: "A partir de este número de votos el autor de un Debate ya no podrá editarlo" From b4ecd07f1f06ff369a15a24b1fd8b75372b796db Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 11 Feb 2019 15:41:35 +0100 Subject: [PATCH 4/7] Refactor social share messages --- app/views/budgets/investments/_investment_show.html.erb | 4 ++-- app/views/proposals/_social_share.html.erb | 4 ++-- config/locales/en/budgets.yml | 3 +-- config/locales/en/general.yml | 3 +-- config/locales/es/budgets.yml | 3 +-- config/locales/es/general.yml | 3 +-- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index 49543417d..9f10b5f4f 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -194,8 +194,8 @@ url: budget_investment_url(investment.budget, investment), description: t("budgets.investments.share.message", title: investment.title, - org: setting['org_name']), - mobile: t("budgets.investments.share.message_mobile", + handle: setting['org_name']), + mobile: t("budgets.investments.share.message", title: investment.title, handle: setting['twitter_handle']) %> diff --git a/app/views/proposals/_social_share.html.erb b/app/views/proposals/_social_share.html.erb index b675fe192..c1b12e907 100644 --- a/app/views/proposals/_social_share.html.erb +++ b/app/views/proposals/_social_share.html.erb @@ -4,7 +4,7 @@ url: proposal_url(proposal), description: t("proposals.share.message", summary: proposal.summary, - org: setting['org_name']), - mobile: t("proposals.share.message_mobile", + handle: setting['org_name']), + mobile: t("proposals.share.message", summary: proposal.summary, handle: setting['twitter_handle']) %> diff --git a/config/locales/en/budgets.yml b/config/locales/en/budgets.yml index 24b16d1de..6a070cea0 100644 --- a/config/locales/en/budgets.yml +++ b/config/locales/en/budgets.yml @@ -106,8 +106,7 @@ en: confidence_score: highest rated price: by price share: - message: "I created the investment project %{title} in %{org}. Create an investment project you too!" - message_mobile: "I created the investment project %{title} in %{handle}. Create an investment project you too!" + message: "I created the investment project %{title} in %{handle}. Create an investment project too!" show: author_deleted: User deleted price_explanation: Price explanation diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 20f843999..f6c6c43ff 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -452,8 +452,7 @@ en: form: submit_button: Save changes share: - message: "I supported the proposal %{summary} in %{org}. If you're interested, support it too!" - message_mobile: "I supported the proposal %{summary} in %{handle}. If you're interested, support it too!" + message: "I supported the proposal %{summary} in %{handle}. If you're interested, support it too!" polls: all: "All" no_dates: "no date assigned" diff --git a/config/locales/es/budgets.yml b/config/locales/es/budgets.yml index 5b4406b3e..ba4fae5e3 100644 --- a/config/locales/es/budgets.yml +++ b/config/locales/es/budgets.yml @@ -106,8 +106,7 @@ es: confidence_score: Mejor valorados price: Por coste share: - message: "He presentado el proyecto %{title} en %{org}. ¡Presenta un proyecto tú también!" - message_mobile: "He presentado el proyecto %{title} en %{handle}. ¡Presenta un proyecto tú también!" + message: "He presentado el proyecto %{title} en %{handle}. ¡Presenta un proyecto tú también!" show: author_deleted: Usuario eliminado price_explanation: Informe de coste diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index e1a2aa3e2..1d47a23e8 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -452,8 +452,7 @@ es: form: submit_button: Guardar cambios share: - message: "He apoyado la propuesta %{summary} en %{org}. Si te interesa, ¡apoya tú también!" - message_mobile: "He apoyado la propuesta %{summary} en %{handle}. Si te interesa, ¡apoya tú también!" + message: "He apoyado la propuesta %{summary} en %{handle}. Si te interesa, ¡apoya tú también!" polls: all: "Todas" no_dates: "sin fecha asignada" From bce8b8b0a3e80edbe467b01e56ae5c41f3744b6d Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 11 Feb 2019 15:41:44 +0100 Subject: [PATCH 5/7] Change locale switcher background color --- app/assets/stylesheets/layout.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 88738c072..48ec86f67 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -980,7 +980,7 @@ footer { } .locale-switcher { - background: #1a1a1a; + background: #001d33; border: 0; border-radius: rem-calc(4); color: #fff; From 6df471d0824e7d8ce16aceddc4227e6cbebf32ca Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 11 Feb 2019 15:41:52 +0100 Subject: [PATCH 6/7] Change layout on admin settings to prevent broken buttons --- app/views/admin/settings/_configuration.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/settings/_configuration.html.erb b/app/views/admin/settings/_configuration.html.erb index f2d5a7605..2bca8b9ea 100644 --- a/app/views/admin/settings/_configuration.html.erb +++ b/app/views/admin/settings/_configuration.html.erb @@ -19,10 +19,10 @@ <%= form_for(setting, url: admin_setting_path(setting), html: { id: "edit_#{dom_id(setting)}"}) do |f| %> -
+
<%= f.text_area :value, label: false, id: dom_id(setting), lines: 1 %>
-
+
<%= f.submit(t('admin.settings.index.update_setting'), class: "button hollow expanded") %>
<% end %> From e8ad9f749ed941fb25b52af0450719c4dcb407c8 Mon Sep 17 00:00:00 2001 From: decabeza Date: Mon, 11 Feb 2019 17:33:51 +0100 Subject: [PATCH 7/7] Fix hound warnings --- spec/features/admin/budgets_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/admin/budgets_spec.rb b/spec/features/admin/budgets_spec.rb index 7854ea109..abe09bb58 100644 --- a/spec/features/admin/budgets_spec.rb +++ b/spec/features/admin/budgets_spec.rb @@ -125,7 +125,7 @@ feature 'Admin budgets' do click_link 'Delete budget' expect(page).to have_content('Budget deleted successfully') - expect(page).to have_content('There are no budgets.') + expect(page).to have_content("There are no budgets.") end scenario 'Try to destroy a budget with investments' do