mirror of
https://github.com/we-promise/sure.git
synced 2026-04-11 16:24:51 +00:00
fix: locale-dependent category duplication bug (#956)
* fix: locale-dependent category duplication bug * fix: use family locale for investment contributions category to prevent duplicates and handle legacy data * Remove v* tag trigger from flutter-build to fix double-runs publish.yml already calls flutter-build via workflow_call on v* tags, so the direct push trigger was causing duplicate workflow runs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Refactor mobile release asset flow * fix: category uniqueness and workflow issues * fix: fix test issue * fix: solve test issue * fix: resolve legacy problem * fix: solve lint test issue * fix: revert unrelated changes --------- Co-authored-by: Juan José Mata <juanjo.mata@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -127,6 +127,14 @@ class Category < ApplicationRecord
|
||||
I18n.t(INVESTMENT_CONTRIBUTIONS_NAME_KEY)
|
||||
end
|
||||
|
||||
# Returns all possible investment contributions names across all supported locales
|
||||
# Used to detect investment contributions category regardless of locale
|
||||
def all_investment_contributions_names
|
||||
LanguagesHelper::SUPPORTED_LOCALES.map do |locale|
|
||||
I18n.t(INVESTMENT_CONTRIBUTIONS_NAME_KEY, locale: locale)
|
||||
end.uniq
|
||||
end
|
||||
|
||||
private
|
||||
def default_categories
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user