Skip to content

Commit

Permalink
Fix translation and update solutions (#73)
Browse files Browse the repository at this point in the history
* Fix translation and update solutions

* Change version and fix syntax error in translation
  • Loading branch information
laurajaime authored Oct 16, 2024
1 parent 76d488a commit 1fa565d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Following Semantic Versioning 2.

## next version:

## Version 0.4.1.1 (PATCH)
- Add missing translation.
- Fix update solution in backoffice.

## Version 0.4.1 (PATCH)
- Add new fields and refactor status field in solutions show on public page.
- Fix error in create solutions in backoffice.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ GIT
PATH
remote: .
specs:
decidim-challenges (0.4.1)
decidim-challenges (0.4.1.1)
decidim-core (~> 0.27)

GEM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def edit

def update
enforce_permission_to :edit, :solution, solution: solution
@form = form(Decidim::Solutions::Admin::SolutionsForm).from_params(params)
@form = form(Decidim::Solutions::Admin::SolutionsForm).from_params(params.merge({ author_id: current_user.id }))

Decidim::Solutions::Admin::UpdateSolution.call(@form, solution) do
on(:ok) do |_solution|
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/decidim/solutions/solutions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def challenge_scope
@challenge_scope ||= if @solution.problem.present?
current_organization.scopes.find_by(id: @solution.problem.challenge.decidim_scope_id)
else
current_organization.scopes.find_by(id: @solution.challenge.decidim_scope_id)
current_organization.scopes.find_by(id: @solution.challenge&.decidim_scope_id)
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/decidim/solutions/solutions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</div>
<% end %>
<% else %>
<% if @solution.challenge.sdg_code %>
<% if @solution.challenge&.sdg_code %>
<div class="definition-data__item sdg">
<span class="definition-data__title"><%= t("sdg", scope: "activemodel.attributes.challenge") %></span>
<div class="ods solutions">
Expand Down
1 change: 1 addition & 0 deletions config/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ ca:
edit_documents: Edita documents
create:
success: La solució s'ha creat correctament i serà revisada per un administrador.
error: Hi ha hagut un problema al crear aquesta solució
solutions:
empty: No s'han pogut trobar solucions
empty_filters: No s'han pogut trobar solucions
Expand Down
2 changes: 1 addition & 1 deletion lib/decidim/challenges/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Decidim
# This holds the decidim-meetings version.
module Challenges
def self.version
"0.4.1"
"0.4.1.1"
end

def self.decidim_version
Expand Down

0 comments on commit 1fa565d

Please sign in to comment.