Aggiunge traduzioni it/en/fr/de/es agli avvisi e toglie gli override Android/iOS.

Un avviso ha un testo per lingua; per differenziare le piattaforme si creano due avvisi. L'app riceve già il copy risolto da Accept-Language.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-20 16:26:30 +02:00
co-authored by Cursor
parent fb82b74e92
commit f02782d0f0
25 changed files with 396 additions and 168 deletions
@@ -0,0 +1,5 @@
class AddAnnouncementTranslations < ActiveRecord::Migration[7.2]
def change
add_column :app_announcements, :translations, :jsonb, null: false, default: {}
end
end
@@ -0,0 +1,12 @@
class RemoveAnnouncementPlatformCopy < ActiveRecord::Migration[7.2]
def change
remove_column :app_announcements, :android_title, :string
remove_column :app_announcements, :android_body, :text
remove_column :app_announcements, :android_action_url, :string
remove_column :app_announcements, :android_action_label, :string
remove_column :app_announcements, :ios_title, :string
remove_column :app_announcements, :ios_body, :text
remove_column :app_announcements, :ios_action_url, :string
remove_column :app_announcements, :ios_action_label, :string
end
end
+2 -9
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.2].define(version: 2026_08_20_180000) do
ActiveRecord::Schema[7.2].define(version: 2026_08_20_191000) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@ -69,14 +69,7 @@ ActiveRecord::Schema[7.2].define(version: 2026_08_20_180000) do
t.datetime "updated_at", null: false
t.boolean "show_on_android", default: true, null: false
t.boolean "show_on_ios", default: true, null: false
t.string "android_title"
t.text "android_body"
t.string "android_action_url"
t.string "android_action_label"
t.string "ios_title"
t.text "ios_body"
t.string "ios_action_url"
t.string "ios_action_label"
t.jsonb "translations", default: {}, null: false
t.index ["created_by_admin_id"], name: "index_app_announcements_on_created_by_admin_id"
t.index ["status", "starts_at", "ends_at"], name: "index_app_announcements_on_status_and_starts_at_and_ends_at"
t.index ["status"], name: "index_app_announcements_on_status"