The personal finance app for everyone (by everyone)
Ruby
feat(settings): add pagination to imports and exports pages (#598)
Julien Orain777fbdc4cac0
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rbindex b71318b62b..cfa4031248 100644--- a/app/controllers/accounts_controller.rb+++ b/app/controllers/accounts_controller.rb@@ -38,7 +38,7 @@ class AccountsController < ApplicationController@q = params.fetch(:q, {}).permit(:search, status: [])entries = @account.entries.where(excluded: false).search(@q).reverse_chronological- @pagy, @entries = pagy(entries, limit: params[:per_page] || "10")+ @pagy, @entries = pagy(entries, limit: safe_per_page)@activity_feed_data = Account::ActivityFeedData.new(@account, @entries)enddiff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rbindex b171a080d7..9f2cc1565f 100644--- a/app/controllers/application_controller.rb+++ b/app/controllers/application_controller.rb@@ -1,7 +1,7 @@class ApplicationController < ActionController::Baseinclude RestoreLayoutPreferences, Onboardable, Localize, AutoSync, Authentication, Invitable,SelfHostable, StoreLocation, Impersonatable, Breadcrumbable,- FeatureGuardable, Notifiable+ FeatureGuardable, Notifiable, SafePaginationinclude Pundit::Authorizationinclude Pagy::Backenddiff --git a/app/controllers/concerns/accountable_resource.rb b/app/controllers/concerns/accountable_resource.rbindex 2d994d45cb..1b8bbf6d23 100644--- a/app/controllers/concerns/accountable_resource.rb+++ b/app/controllers/concerns/accountable_resource.rb@@ -27,7 +27,7 @@ module AccountableResource@q = params.fetch(:q, {}).permit(:search)entries = @account.entries.search(@q).reverse_chronological- @pagy, @entries = pagy(entries, limit: params[:per_page] || "10")+ @pagy, @entries = pagy(entries, limit: safe_per_page(10))enddef editdiff --git a/app/controllers/concerns/safe_pagination.rb b/app/controllers/concerns/safe_pagination.rbnew file mode 100644index 0000000000..de0f794bc2--- /dev/null+++ b/app/controllers/concerns/safe_pagination.rb@@ -0,0 +1,15 @@+# frozen_string_literal: true++module SafePagination+ extend ActiveSupport::Concern++ private+ def safe_per_page(default = 10)+ allowed_values = [ 10, 20, 30, 50, 100 ]+ per_page = params[:per_page].to_i++ return default if per_page <= 0++ allowed_values.include?(per_page) ? per_page : allowed_values.min_by { |v| (v - per_page).abs }+ end+enddiff --git a/app/controllers/family_exports_controller.rb b/app/controllers/family_exports_controller.rbindex b8bd277741..d3a9163f52 100644--- a/app/controllers/family_exports_controller.rb+++ b/app/controllers/family_exports_controller.rb@@ -13,29 +13,33 @@ class FamilyExportsController < ApplicationControllerFamilyDataExportJob.perform_later(@export)respond_to do |format|- format.html { redirect_to imports_path, notice: "Export started. You'll be able to download it shortly." }+ format.html { redirect_to family_exports_path, notice: t("family_exports.create.success") }format.turbo_stream {- stream_redirect_to imports_path, notice: "Export started. You'll be able to download it shortly."+ stream_redirect_to family_exports_path, notice: t("family_exports.create.success")}endenddef index- @exports = Current.family.family_exports.ordered.limit(10)- render layout: false # For turbo frame+ @pagy, @exports = pagy(Current.family.family_exports.ordered, limit: safe_per_page)+ @breadcrumbs = [+ [ t("breadcrumbs.home"), root_path ],+ [ t("breadcrumbs.exports"), family_exports_path ]+ ]+ render layout: "settings"enddef downloadif @export.downloadable?redirect_to @export.export_file, allow_other_host: trueelse- redirect_to imports_path, alert: "Export not ready for download"+ redirect_to family_exports_path, alert: t("family_exports.export_not_ready")endenddef destroy@export.destroy- redirect_to imports_path, notice: "Export deleted successfully"+ redirect_to family_exports_path, notice: t("family_exports.destroy.success")endprivate@@ -46,7 +50,7 @@ class FamilyExportsController < ApplicationControllerdef require_adminunless Current.user.admin?- redirect_to root_path, alert: "Access denied"+ redirect_to root_path, alert: t("family_exports.access_denied")endendenddiff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rbindex 50891d3239..227e94866f 100644--- a/app/controllers/imports_controller.rb+++ b/app/controllers/imports_controller.rb@@ -12,11 +12,10 @@ class ImportsController < ApplicationControllerenddef index- @imports = Current.family.imports- @exports = Current.user.admin? ? Current.family.family_exports.ordered.limit(10) : nil+ @pagy, @imports = pagy(Current.family.imports.where(type: Import::TYPES).ordered, limit: safe_per_page)@breadcrumbs = [- [ "Home", root_path ],- [ "Import/Export", imports_path ]+ [ t("breadcrumbs.home"), root_path ],+ [ t("breadcrumbs.imports"), imports_path ]]render layout: "settings"end@@ -90,7 +89,7 @@ class ImportsController < ApplicationControllerprivatedef set_import- @import = Current.family.imports.find(params[:id])+ @import = Current.family.imports.includes(:account).find(params[:id])enddef import_paramsdiff --git a/app/controllers/rules_controller.rb b/app/controllers/rules_controller.rbindex cd8a6eb6c5..23889dc5af 100644--- a/app/controllers/rules_controller.rb+++ b/app/controllers/rules_controller.rb@@ -20,7 +20,7 @@ class RulesController < ApplicationController.recent.includes(:rule)- @pagy, @recent_runs = pagy(recent_runs_scope, limit: params[:per_page] || 20, page_param: :runs_page)+ @pagy, @recent_runs = pagy(recent_runs_scope, limit: safe_per_page, page_param: :runs_page)render layout: "settings"enddiff --git a/app/controllers/transactions_controller.rb b/app/controllers/transactions_controller.rbindex 3060af3f5d..e5efee0b04 100644--- a/app/controllers/transactions_controller.rb+++ b/app/controllers/transactions_controller.rb@@ -21,7 +21,7 @@ class TransactionsController < ApplicationController:transfer_as_inflow, :transfer_as_outflow)- @pagy, @transactions = pagy(base_scope, limit: per_page)+ @pagy, @transactions = pagy(base_scope, limit: safe_per_page)# Load projected recurring transactions for next month@projected_recurring = Current.family.recurring_transactions@@ -281,10 +281,6 @@ class TransactionsController < ApplicationControllerendprivate- def per_page- params[:per_page].to_i.positive? ? params[:per_page].to_i : 20- end-def needs_rule_notification?(transaction)return false if Current.user.rule_prompts_disableddiff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rbindex a907cd7c8b..1bd120e00f 100644--- a/app/helpers/settings_helper.rb+++ b/app/helpers/settings_helper.rb@@ -20,6 +20,7 @@ module SettingsHelper{ name: "Self-Hosting", path: :settings_hosting_path, condition: :self_hosted_and_admin? },{ name: "Providers", path: :settings_providers_path, condition: :admin_user? },{ name: "Imports", path: :imports_path, condition: :admin_user? },+ { name: "Exports", path: :family_exports_path, condition: :admin_user? },# More section{ name: "Guides", path: :settings_guides_path },{ name: "What's new", path: :changelog_path },diff --git a/app/views/family_exports/_list.html.erb b/app/views/family_exports/_list.html.erbindex e73889dfb8..5d266eda8c 100644--- a/app/views/family_exports/_list.html.erb+++ b/app/views/family_exports/_list.html.erb@@ -9,7 +9,7 @@<div class="flex items-center justify-between mx-4 py-4"><div class="flex items-center gap-2 mb-1"><div>- <p class="text-sm font-medium text-primary">Export from <%= export.created_at.strftime("%B %d, %Y at %I:%M %p") %></p>+ <p class="text-sm font-medium text-primary"><%= t("family_exports.list.export_from", date: l(export.created_at, format: :long)) %></p><p class="text-xs text-secondary"><%= export.filename %></p></div>@@ -31,7 +31,7 @@<% if export.processing? || export.pending? %><div class="flex items-center gap-2 text-secondary"><div class="animate-spin h-4 w-4 border-2 border-secondary border-t-transparent rounded-full"></div>- <span class="text-sm">Exporting...</span>+ <span class="text-sm"><%= t("family_exports.exporting") %></span></div><% elsif export.completed? %><div class="flex items-center gap-2">@@ -39,7 +39,7 @@method: :delete,class: "flex items-center gap-2 text-destructive hover:text-destructive-hover",data: {- turbo_confirm: "Are you sure you want to delete this export? This action cannot be undone.",+ turbo_confirm: t("family_exports.delete_confirmation"),turbo_frame: "_top"} do %><%= icon "trash-2", class: "w-5 h-5 text-destructive" %>@@ -61,7 +61,7 @@method: :delete,class: "flex items-center gap-2 text-destructive hover:text-destructive-hover",data: {- turbo_confirm: "Are you sure you want to delete this failed export?",+ turbo_confirm: t("family_exports.delete_failed_confirmation"),turbo_frame: "_top"} do %><%= icon "trash-2", class: "w-5 h-5 text-destructive" %>@@ -71,7 +71,7 @@</div><% end %><% else %>- <p class="text-sm text-primary text-center py-4 mb-1 font-medium">No exports yet.</p>+ <p class="text-sm text-primary text-center py-4 mb-1 font-medium"><%= t("family_exports.index.no_exports") %></p><% end %></div><% end %>diff --git a/app/views/family_exports/index.html.erb b/app/views/family_exports/index.html.erbindex 530b81518b..f4bee6bdf3 100644--- a/app/views/family_exports/index.html.erb+++ b/app/views/family_exports/index.html.erb@@ -1 +1,85 @@-<%= render "list", exports: @exports %>+<%= settings_section title: t(".title") do %>+ <div class="space-y-4">+ <% if @exports.empty? %>+ <p class="text-sm text-primary text-center py-4 mb-1 font-medium"><%= t(".no_exports") %></p>+ <% else %>+ <div class="bg-container rounded-lg shadow-border-xs">+ <% @exports.each do |export| %>+ <div class="flex items-center justify-between mx-4 py-4">+ <div class="flex items-center gap-2 mb-1">+ <div>+ <p class="text-sm font-medium text-primary"><%= t("family_exports.list.export_from", date: l(export.created_at, format: :long)) %></p>+ <p class="text-xs text-secondary"><%= export.filename %></p>+ </div>++ <% if export.processing? || export.pending? %>+ <span class="px-1 py text-xs rounded-full bg-gray-500/5 text-secondary border border-alpha-black-50">+ <%= t("family_exports.list.in_progress") %>+ </span>+ <% elsif export.completed? %>+ <span class="px-1 py text-xs rounded-full bg-green-500/5 text-green-500 border border-alpha-black-50">+ <%= t("family_exports.list.complete") %>+ </span>+ <% elsif export.failed? %>+ <span class="px-1 py text-xs rounded-full bg-red-500/5 text-red-500 border border-alpha-black-50">+ <%= t("family_exports.list.failed") %>+ </span>+ <% end %>+ </div>++ <% if export.processing? || export.pending? %>+ <div class="flex items-center gap-2 text-secondary">+ <div class="animate-spin h-4 w-4 border-2 border-secondary border-t-transparent rounded-full"></div>+ <span class="text-sm"><%= t("family_exports.exporting") %></span>+ </div>+ <% elsif export.completed? %>+ <div class="flex items-center gap-2">+ <%= button_to family_export_path(export),+ method: :delete,+ class: "flex items-center gap-2 text-destructive hover:text-destructive-hover",+ data: {+ turbo_confirm: t("family_exports.delete_confirmation")+ } do %>+ <%= icon "trash-2", class: "w-5 h-5 text-destructive" %>+ <% end %>++ <%= link_to download_family_export_path(export),+ class: "flex items-center gap-2 text-primary hover:text-primary-hover" do %>+ <%= icon "download", class: "w-5 h-5" %>+ <% end %>+ </div>+ <% elsif export.failed? %>+ <div class="flex items-center gap-2">+ <div class="flex items-center gap-2 text-destructive">+ <%= icon "alert-circle", class: "w-4 h-4" %>+ </div>++ <%= button_to family_export_path(export),+ method: :delete,+ class: "flex items-center gap-2 text-destructive hover:text-destructive-hover",+ data: {+ turbo_confirm: t("family_exports.delete_failed_confirmation")+ } do %>+ <%= icon "trash-2", class: "w-5 h-5 text-destructive" %>+ <% end %>+ </div>+ <% end %>+ </div>+ <% end %>+ </div>++ <% if @pagy.pages > 1 %>+ <div class="mt-4">+ <%= render "shared/pagination", pagy: @pagy %>+ </div>+ <% end %>+ <% end %>++ <%= link_to new_family_export_path,+ class: "bg-container-inset flex items-center justify-center gap-2 text-secondary mt-1 hover:bg-container-inset-hover rounded-lg px-4 py-2 w-full text-center",+ data: { turbo_frame: :modal } do %>+ <%= icon("plus") %>+ <%= t(".new") %>+ <% end %>+ </div>+<% end %>diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erbindex 8e01454bda..272caab60a 100644--- a/app/views/imports/index.html.erb+++ b/app/views/imports/index.html.erb@@ -1,11 +1,17 @@-<%= settings_section title: t(".imports") do %>+<%= settings_section title: t(".title") do %><div class="space-y-4"><% if @imports.empty? %><%= render partial: "imports/empty" %><% else %><div class="bg-container rounded-lg shadow-border-xs">- <%= render partial: "imports/import", collection: @imports.ordered %>+ <%= render partial: "imports/import", collection: @imports %></div>++ <% if @pagy.pages > 1 %>+ <div class="mt-4">+ <%= render "shared/pagination", pagy: @pagy %>+ </div>+ <% end %><% end %><%= link_to new_import_path,@@ -16,24 +22,3 @@<% end %></div><% end %>--<% if Current.user.admin? %>- <%= settings_section title: t(".exports") do %>- <div class="space-y-4">- <div class="bg-container rounded-lg shadow-border-xs">- <%= turbo_frame_tag "family_exports", src: family_exports_path, loading: :lazy do %>- <div class="mt-4 text-center text-secondary py-8">- <div class="animate-spin inline-block h-4 w-4 border-2 border-secondary border-t-transparent rounded-full"></div>- </div>- <% end %>- </div>-- <%= link_to new_family_export_path,- class: "bg-container-inset flex items-center justify-center gap-2 text-secondary mt-1 hover:bg-container-inset-hover rounded-lg px-4 py-2 w-full text-center",- data: { turbo_frame: :modal } do %>- <%= icon("plus") %>- <%= t(".new_export") %>- <% end %>- </div>- <% end %>-<% end %>diff --git a/app/views/settings/_settings_nav.html.erb b/app/views/settings/_settings_nav.html.erbindex 89a1a73c20..54936014b3 100644--- a/app/views/settings/_settings_nav.html.erb+++ b/app/views/settings/_settings_nav.html.erb@@ -31,6 +31,7 @@ nav_sections = [{ label: t(".self_hosting_label"), path: settings_hosting_path, icon: "database", if: self_hosted? },{ label: "Providers", path: settings_providers_path, icon: "plug" },{ label: t(".imports_label"), path: imports_path, icon: "download" },+ { label: t(".exports_label"), path: family_exports_path, icon: "upload" },{ label: "SSO Providers", path: admin_sso_providers_path, icon: "key-round", if: Current.user&.super_admin? },{ label: "Users", path: admin_users_path, icon: "users", if: Current.user&.super_admin? }]diff --git a/app/views/shared/_pagination.html.erb b/app/views/shared/_pagination.html.erbindex c3c9c292a9..edcf4c2869 100644--- a/app/views/shared/_pagination.html.erb+++ b/app/views/shared/_pagination.html.erb@@ -50,7 +50,7 @@</div><div class="flex items-center gap-4"><%= select_tag :per_page,- options_for_select(["10", "20", "30", "50"], pagy.limit),+ options_for_select(["10", "20", "30", "50", "100"], pagy.limit),data: { controller: "selectable-link" },class: "py-1.5 pr-8 text-sm text-primary font-medium bg-container-inset border border-secondary rounded-lg focus:border-secondary focus:ring-secondary focus-visible:ring-secondary" %></div>diff --git a/config/locales/breadcrumbs/ca.yml b/config/locales/breadcrumbs/ca.ymlnew file mode 100644index 0000000000..c726a4da77--- /dev/null+++ b/config/locales/breadcrumbs/ca.yml@@ -0,0 +1,6 @@+---+ca:+ breadcrumbs:+ exports: Exportacions+ home: Inici+ imports: Importacionsdiff --git a/config/locales/breadcrumbs/de.yml b/config/locales/breadcrumbs/de.ymlnew file mode 100644index 0000000000..842ff38a0a--- /dev/null+++ b/config/locales/breadcrumbs/de.yml@@ -0,0 +1,6 @@+---+de:+ breadcrumbs:+ exports: Exporte+ home: Startseite+ imports: Importediff --git a/config/locales/breadcrumbs/en.yml b/config/locales/breadcrumbs/en.ymlnew file mode 100644index 0000000000..9d81ba325c--- /dev/null+++ b/config/locales/breadcrumbs/en.yml@@ -0,0 +1,6 @@+---+en:+ breadcrumbs:+ exports: Exports+ home: Home+ imports: Importsdiff --git a/config/locales/breadcrumbs/es.yml b/config/locales/breadcrumbs/es.ymlnew file mode 100644index 0000000000..f0a45a4915--- /dev/null+++ b/config/locales/breadcrumbs/es.yml@@ -0,0 +1,6 @@+---+es:+ breadcrumbs:+ exports: Exportaciones+ home: Inicio+ imports: Importacionesdiff --git a/config/locales/breadcrumbs/nb.yml b/config/locales/breadcrumbs/nb.ymlnew file mode 100644index 0000000000..c216b77ae4--- /dev/null+++ b/config/locales/breadcrumbs/nb.yml@@ -0,0 +1,6 @@+---+nb:+ breadcrumbs:+ exports: Eksporter+ home: Hjem+ imports: Importerdiff --git a/config/locales/breadcrumbs/pt-BR.yml b/config/locales/breadcrumbs/pt-BR.ymlnew file mode 100644index 0000000000..6e390706c5--- /dev/null+++ b/config/locales/breadcrumbs/pt-BR.yml@@ -0,0 +1,6 @@+---+pt-BR:+ breadcrumbs:+ exports: Exportações+ home: Início+ imports: Importaçõesdiff --git a/config/locales/breadcrumbs/ro.yml b/config/locales/breadcrumbs/ro.ymlnew file mode 100644index 0000000000..86dc25114d--- /dev/null+++ b/config/locales/breadcrumbs/ro.yml@@ -0,0 +1,6 @@+---+ro:+ breadcrumbs:+ exports: Exporturi+ home: Acasă+ imports: Importuridiff --git a/config/locales/breadcrumbs/tr.yml b/config/locales/breadcrumbs/tr.ymlnew file mode 100644index 0000000000..08dea8ecd0--- /dev/null+++ b/config/locales/breadcrumbs/tr.yml@@ -0,0 +1,6 @@+---+tr:+ breadcrumbs:+ exports: Dışa Aktarmalar+ home: Ana Sayfa+ imports: İçe Aktarmalardiff --git a/config/locales/breadcrumbs/zh-CN.yml b/config/locales/breadcrumbs/zh-CN.ymlnew file mode 100644index 0000000000..978e8396c3--- /dev/null+++ b/config/locales/breadcrumbs/zh-CN.yml@@ -0,0 +1,6 @@+---+zh-CN:+ breadcrumbs:+ exports: 导出+ home: 主页+ imports: 导入diff --git a/config/locales/views/family_exports/ca.yml b/config/locales/views/family_exports/ca.ymlindex c35eb1bb63..a06d6edd3a 100644--- a/config/locales/views/family_exports/ca.yml+++ b/config/locales/views/family_exports/ca.yml@@ -1,7 +1,22 @@---ca:family_exports:+ access_denied: Accés denegat+ create:+ success: Exportació iniciada. Podràs descarregar-la aviat.+ delete_confirmation: Estàs segur que vols eliminar aquesta exportació? Aquesta acció no es pot desfer.+ delete_failed_confirmation: Estàs segur que vols eliminar aquesta exportació fallida?+ destroy:+ success: Exportació eliminada amb èxit+ export_not_ready: L'exportació no està llesta per descarregar+ exporting: Exportant...+ index:+ title: Exportacions+ new: Nova exportació+ no_exports: Encara no hi ha exportacions.list:+ export_from: "Exportació del %{date}"+ in_progress: En curscomplete: Completatfailed: Errorin_progress: En cursdiff --git a/config/locales/views/family_exports/de.yml b/config/locales/views/family_exports/de.ymlindex 28cfb0bb69..bb7a9353d1 100644--- a/config/locales/views/family_exports/de.yml+++ b/config/locales/views/family_exports/de.yml@@ -1,7 +1,21 @@---de:family_exports:+ access_denied: Zugriff verweigert+ create:+ success: Export gestartet. Sie können ihn in Kürze herunterladen.+ delete_confirmation: Möchten Sie diesen Export wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.+ delete_failed_confirmation: Möchten Sie diesen fehlgeschlagenen Export wirklich löschen?+ destroy:+ success: Export erfolgreich gelöscht+ export_not_ready: Export noch nicht zum Download bereit+ exporting: Wird exportiert...+ index:+ title: Exporte+ new: Neuer Export+ no_exports: Noch keine Exporte vorhanden.list:+ export_from: "Export vom %{date}"in_progress: Wird ausgeführtcomplete: Abgeschlossenfailed: Fehlgeschlagendiff --git a/config/locales/views/family_exports/en.yml b/config/locales/views/family_exports/en.ymlindex 79674716b7..732cb9c1bf 100644--- a/config/locales/views/family_exports/en.yml+++ b/config/locales/views/family_exports/en.yml@@ -1,7 +1,21 @@---en:family_exports:+ access_denied: Access denied+ create:+ success: Export started. You'll be able to download it shortly.+ delete_confirmation: Are you sure you want to delete this export? This action cannot be undone.+ delete_failed_confirmation: Are you sure you want to delete this failed export?+ destroy:+ success: Export deleted successfully+ export_not_ready: Export not ready for download+ exporting: Exporting...+ index:+ title: Exports+ new: New Export+ no_exports: No exports yet.list:+ export_from: "Export from %{date}"in_progress: In progresscomplete: Completefailed: Faileddiff --git a/config/locales/views/family_exports/es.yml b/config/locales/views/family_exports/es.ymlindex 685a91cdb4..5979c5349e 100644--- a/config/locales/views/family_exports/es.yml+++ b/config/locales/views/family_exports/es.yml@@ -1,7 +1,21 @@---es:family_exports:+ access_denied: Acceso denegado+ create:+ success: Exportación iniciada. Podrás descargarla en breve.+ delete_confirmation: ¿Estás seguro de que quieres eliminar esta exportación? Esta acción no se puede deshacer.+ delete_failed_confirmation: ¿Estás seguro de que quieres eliminar esta exportación fallida?+ destroy:+ success: Exportación eliminada con éxito+ export_not_ready: La exportación no está lista para descargar+ exporting: Exportando...+ index:+ title: Exportaciones+ new: Nueva exportación+ no_exports: Aún no hay exportaciones.list:+ export_from: "Exportación del %{date}"in_progress: En progresocomplete: Completofailed: Fallidodiff --git a/config/locales/views/family_exports/nb.yml b/config/locales/views/family_exports/nb.ymlindex be5e5b53e6..dc61e3ca04 100644--- a/config/locales/views/family_exports/nb.yml+++ b/config/locales/views/family_exports/nb.yml@@ -1,7 +1,21 @@---nb:family_exports:+ access_denied: Tilgang nektet+ create:+ success: Eksport startet. Du vil kunne laste den ned snart.+ delete_confirmation: Er du sikker på at du vil slette denne eksporten? Denne handlingen kan ikke angres.+ delete_failed_confirmation: Er du sikker på at du vil slette denne mislykkede eksporten?+ destroy:+ success: Eksport slettet+ export_not_ready: Eksport ikke klar for nedlasting+ exporting: Eksporterer...+ index:+ title: Eksporter+ new: Ny Eksport+ no_exports: Ingen eksporter ennå.list:+ export_from: "Eksport fra %{date}"in_progress: Pågårcomplete: Fullførtfailed: Mislykketdiff --git a/config/locales/views/family_exports/pt-BR.yml b/config/locales/views/family_exports/pt-BR.ymlindex 78d35db25a..6412e5c253 100644--- a/config/locales/views/family_exports/pt-BR.yml+++ b/config/locales/views/family_exports/pt-BR.yml@@ -1,7 +1,21 @@---pt-BR:family_exports:+ access_denied: Acesso negado+ create:+ success: Exportação iniciada. Você poderá baixá-la em breve.+ delete_confirmation: Tem certeza de que deseja excluir esta exportação? Esta ação não pode ser desfeita.+ delete_failed_confirmation: Tem certeza de que deseja excluir esta exportação falhada?+ destroy:+ success: Exportação excluída com sucesso+ export_not_ready: Exportação não está pronta para download+ exporting: Exportando...+ index:+ title: Exportações+ new: Nova Exportação+ no_exports: Nenhuma exportação ainda.list:- in_progress: Em andamento+ export_from: "Exportação de %{date}"+ in_progress: Em andamentocomplete: Concluídofailed: Falhoudiff --git a/config/locales/views/family_exports/ro.yml b/config/locales/views/family_exports/ro.ymlindex 24acbad980..a698a2043e 100644--- a/config/locales/views/family_exports/ro.yml+++ b/config/locales/views/family_exports/ro.yml@@ -1,7 +1,21 @@---ro:family_exports:+ access_denied: Acces interzis+ create:+ success: Export început. Veți putea să-l descărcați în curând.+ delete_confirmation: Sigur doriți să ștergeți acest export? Această acțiune nu poate fi anulată.+ delete_failed_confirmation: Sigur doriți să ștergeți acest export eșuat?+ destroy:+ success: Export șters cu succes+ export_not_ready: Exportul nu este gata pentru descărcare+ exporting: Se exportă...+ index:+ title: Exporturi+ new: Export nou+ no_exports: Nu există încă exporturi.list:+ export_from: "Export din %{date}"in_progress: În curs de desfășurarecomplete: Finalizatfailed: Eșuatdiff --git a/config/locales/views/family_exports/tr.yml b/config/locales/views/family_exports/tr.ymlindex db1da6c02c..f62e43d32f 100644--- a/config/locales/views/family_exports/tr.yml+++ b/config/locales/views/family_exports/tr.yml@@ -1,7 +1,21 @@---tr:family_exports:+ access_denied: Erişim reddedildi+ create:+ success: Dışa aktarma başladı. Kısa süre içinde indirebileceksiniz.+ delete_confirmation: Bu dışa aktarma işlemini silmek istediğinizden emin misiniz? Bu işlem geri alınamaz.+ delete_failed_confirmation: Bu başarısız dışa aktarma işlemini silmek istediğinizden emin misiniz?+ destroy:+ success: Dışa aktarma başarıyla silindi+ export_not_ready: Dışa aktarma henüz indirmeye hazır değil+ exporting: Dışa aktarılıyor...+ index:+ title: Dışa aktarmalar+ new: Yeni Dışa Aktarma+ no_exports: Henüz hiç dışa aktarma yok.list:+ export_from: "%{date} tarihli dışa aktarma"in_progress: Devam ediyorcomplete: Tamamlandıfailed: Başarısızdiff --git a/config/locales/views/family_exports/zh-CN.yml b/config/locales/views/family_exports/zh-CN.ymlindex 4fef9a5f6d..5373a5309b 100644--- a/config/locales/views/family_exports/zh-CN.yml+++ b/config/locales/views/family_exports/zh-CN.yml@@ -1,7 +1,21 @@---zh-CN:family_exports:+ access_denied: 访问被拒绝+ create:+ success: 导出已开始。您很快就能下载它。+ delete_confirmation: 确定要删除此导出吗?此操作无法撤销。+ delete_failed_confirmation: 确定要删除此失败的导出吗?+ destroy:+ success: 导出已成功删除+ export_not_ready: 导出尚未准备好下载+ exporting: 正在导出...+ index:+ title: 导出+ new: 新建导出+ no_exports: 暂无导出记录list:+ export_from: "导出自 %{date}"complete: 已完成failed: 已失败in_progress: 进行中diff --git a/config/locales/views/family_exports/zh-TW.yml b/config/locales/views/family_exports/zh-TW.ymlindex 198743f088..88d3e37007 100644--- a/config/locales/views/family_exports/zh-TW.yml+++ b/config/locales/views/family_exports/zh-TW.yml@@ -1,6 +1,12 @@---zh-TW:family_exports:+ access_denied: 存取被拒絕+ create:+ success: 匯出已開始。您很快就能下載它。+ destroy:+ success: 匯出已成功刪除+ export_not_ready: 匯出尚未準備好下載list:complete: 已完成failed: 已失敗diff --git a/config/locales/views/imports/ca.yml b/config/locales/views/imports/ca.ymlindex a02426e782..6613243aa9 100644--- a/config/locales/views/imports/ca.yml+++ b/config/locales/views/imports/ca.yml@@ -84,12 +84,12 @@ ca:uploading: Processant filesview: Veureindex:+ title: Importacions+ new: Nova importacióexports: Exportacionsimports: Importacions- new: Nova importaciónew_export: Nova exportacióno_exports: Encara no hi ha exportacions.- title: Importa/Exportanew:description: Pots importar manualment diversos tipus de dades via CSV o utilitzaruna de les nostres plantilles d'importació com Mint.diff --git a/config/locales/views/imports/de.yml b/config/locales/views/imports/de.ymlindex 0498c92bb7..b2e5d1f973 100644--- a/config/locales/views/imports/de.yml+++ b/config/locales/views/imports/de.yml@@ -58,12 +58,8 @@ de:uploading: Zeilen werden verarbeitetview: Anzeigenindex:- imports: Importe+ title: Importenew: Neuer Import- title: Import/Export- exports: Exporte- new_export: Neuer Export- no_exports: Noch keine Exporte vorhanden.new:description: Du kannst verschiedene Datentypen manuell über CSV importieren oder eine unserer Importvorlagen wie Mint verwenden.import_accounts: Konten importierendiff --git a/config/locales/views/imports/en.yml b/config/locales/views/imports/en.ymlindex be1b078066..d569d7be7b 100644--- a/config/locales/views/imports/en.yml+++ b/config/locales/views/imports/en.yml@@ -83,12 +83,8 @@ en:uploading: Processing rowsview: Viewindex:- imports: Imports+ title: Importsnew: New Import- title: Import/Export- exports: Exports- new_export: New Export- no_exports: No exports yet.new:description: You can manually import various types of data via CSV or use oneof our import templates like Mint.diff --git a/config/locales/views/imports/es.yml b/config/locales/views/imports/es.ymlindex 0068520d43..9872391c41 100644--- a/config/locales/views/imports/es.yml+++ b/config/locales/views/imports/es.yml@@ -62,12 +62,8 @@ es:uploading: Procesando filasview: Verindex:- imports: Importaciones+ title: Importacionesnew: Nueva importación- title: Importar/Exportar- exports: Exportaciones- new_export: Nueva exportación- no_exports: Aún no hay exportaciones.new:description: Puedes importar manualmente varios tipos de datos mediante CSV o usar una de nuestras plantillas de importación como Mint.import_accounts: Importar cuentasdiff --git a/config/locales/views/imports/nb.yml b/config/locales/views/imports/nb.ymlindex c796426b03..a59a2d44f9 100644--- a/config/locales/views/imports/nb.yml+++ b/config/locales/views/imports/nb.yml@@ -71,12 +71,8 @@ nb:uploading: Behandler raderview: Visindex:- imports: Importer- new: Ny Importtitle: Importer- exports: Eksporter- new_export: Ny Eksport- no_exports: Ingen eksporter ennå.+ new: Ny Importnew:description: Du kan manuelt importere ulike typer data via CSV eller bruke en avvåre importmaler som Mint.diff --git a/config/locales/views/imports/pt-BR.yml b/config/locales/views/imports/pt-BR.ymlindex 33350d79c6..1750672e0d 100644--- a/config/locales/views/imports/pt-BR.yml+++ b/config/locales/views/imports/pt-BR.yml@@ -76,12 +76,8 @@ pt-BR:uploading: Processando linhasview: Visualizarindex:- imports: Importações+ title: Importaçõesnew: Nova Importação- title: Importar/Exportar- exports: Exportações- new_export: Nova Exportação- no_exports: Nenhuma exportação ainda.new:description: Você pode importar manualmente vários tipos de dados via CSV ou usar umde nossos modelos de importação, como o do Mint.diff --git a/config/locales/views/imports/ro.yml b/config/locales/views/imports/ro.ymlindex d257b3ebcf..2da6f2436d 100644--- a/config/locales/views/imports/ro.yml+++ b/config/locales/views/imports/ro.yml@@ -58,12 +58,8 @@ ro:uploading: Se procesează rândurileview: Veziindex:- imports: Importuri+ title: Importurinew: Import nou- title: Import/Export- exports: Exporturi- new_export: Export nou- no_exports: Nu există încă exporturi.new:description: Poți importa manual diverse tipuri de date prin CSV sau poți folosi unul dintre șabloanele noastre de import, cum ar fi Mint.import_accounts: Importă conturidiff --git a/config/locales/views/imports/tr.yml b/config/locales/views/imports/tr.ymlindex a9f389a83d..c1abca0339 100644--- a/config/locales/views/imports/tr.yml+++ b/config/locales/views/imports/tr.yml@@ -58,12 +58,8 @@ tr:uploading: Satırlar işleniyorview: Görüntüleindex:- imports: İçe aktarmalar- new: Yeni İçe Aktarmatitle: İçe aktarmalar- exports: Dışa aktarmalar- new_export: Yeni Dışa Aktarma- no_exports: Henüz hiç dışa aktarma yok.+ new: Yeni İçe Aktarmanew:description: Farklı veri türlerini CSV ile manuel olarak içe aktarabilir veya Mint gibi içe aktarma şablonlarımızı kullanabilirsiniz.import_accounts: Hesapları içe aktardiff --git a/config/locales/views/imports/zh-CN.yml b/config/locales/views/imports/zh-CN.ymlindex 952bff5495..55e2cf8e32 100644--- a/config/locales/views/imports/zh-CN.yml+++ b/config/locales/views/imports/zh-CN.yml@@ -66,12 +66,8 @@ zh-CN:uploading: 处理行数据中view: 查看index:- exports: 导出记录- imports: 导入记录+ title: 导入记录new: 新建导入- new_export: 新建导出- no_exports: 暂无导出记录- title: 导入/导出管理new:description: 您可以通过 CSV 手动导入多种类型数据,或使用我们的导入模板(如 Mint 格式)。import_accounts: 导入账户diff --git a/config/locales/views/settings/ca.yml b/config/locales/views/settings/ca.ymlindex 0dc0aba991..1fa11698ea 100644--- a/config/locales/views/settings/ca.yml+++ b/config/locales/views/settings/ca.yml@@ -127,8 +127,9 @@ ca:categories_label: Categoriesfeedback_label: Feedbackgeneral_section_title: General+ imports_label: Importacions+ exports_label: Exportacionsguides_label: Guies- imports_label: Importa/Exportalogout: Tanca la sessiómerchants_label: Comerçosother_section_title: Mésdiff --git a/config/locales/views/settings/de.yml b/config/locales/views/settings/de.ymlindex e38d21d0df..becf9ea7bb 100644--- a/config/locales/views/settings/de.yml+++ b/config/locales/views/settings/de.yml@@ -94,7 +94,8 @@ de:categories_label: Kategorienfeedback_label: Feedbackgeneral_section_title: Allgemein- imports_label: Import/Export+ imports_label: Importe+ exports_label: Exportelogout: Abmeldenmerchants_label: Händlerguides_label: Anleitungendiff --git a/config/locales/views/settings/en.yml b/config/locales/views/settings/en.ymlindex e84e9e0564..cba0a4e9b7 100644--- a/config/locales/views/settings/en.yml+++ b/config/locales/views/settings/en.yml@@ -115,7 +115,8 @@ en:categories_label: Categoriesfeedback_label: Feedbackgeneral_section_title: General- imports_label: Import/Export+ imports_label: Imports+ exports_label: Exportslogout: Logoutmerchants_label: Merchantsguides_label: Guidesdiff --git a/config/locales/views/settings/es.yml b/config/locales/views/settings/es.ymlindex 0079aa1d2f..38ede64ff6 100644--- a/config/locales/views/settings/es.yml+++ b/config/locales/views/settings/es.yml@@ -95,7 +95,8 @@ es:categories_label: Categoríasfeedback_label: Comentariosgeneral_section_title: General- imports_label: Importar/Exportar+ imports_label: Importaciones+ exports_label: Exportacioneslogout: Cerrar sesiónmerchants_label: Comerciantesguides_label: Guíasdiff --git a/config/locales/views/settings/nb.yml b/config/locales/views/settings/nb.ymlindex 5c5354a177..098dd9f6ac 100644--- a/config/locales/views/settings/nb.yml+++ b/config/locales/views/settings/nb.yml@@ -81,6 +81,7 @@ nb:feedback_label: Tilbakemeldinggeneral_section_title: Genereltimports_label: Importer+ exports_label: Eksporterlogout: Logg utmerchants_label: Forhandlereother_section_title: Merdiff --git a/config/locales/views/settings/pt-BR.yml b/config/locales/views/settings/pt-BR.ymlindex f7c681495f..06934d4ea7 100644--- a/config/locales/views/settings/pt-BR.yml+++ b/config/locales/views/settings/pt-BR.yml@@ -91,6 +91,7 @@ pt-BR:feedback_label: Feedbackgeneral_section_title: Geralimports_label: Importações+ exports_label: Exportaçõeslogout: Sairmerchants_label: Comerciantesother_section_title: Maisdiff --git a/config/locales/views/settings/ro.yml b/config/locales/views/settings/ro.ymlindex ea473a5c5b..3c5b7e0913 100644--- a/config/locales/views/settings/ro.yml+++ b/config/locales/views/settings/ro.yml@@ -98,7 +98,8 @@ ro:categories_label: Categoriifeedback_label: Feedbackgeneral_section_title: General- imports_label: Import/Export+ imports_label: Importuri+ exports_label: Exporturilogout: Logoutmerchants_label: Comercianțiguides_label: Ghiduridiff --git a/config/locales/views/settings/zh-CN.yml b/config/locales/views/settings/zh-CN.ymlindex 4b9d7bff3c..c1263c3524 100644--- a/config/locales/views/settings/zh-CN.yml+++ b/config/locales/views/settings/zh-CN.yml@@ -101,7 +101,8 @@ zh-CN:feedback_label: 意见反馈general_section_title: 通用设置guides_label: 使用指南- imports_label: 导入/导出+ imports_label: 导入记录+ exports_label: 导出记录logout: 退出登录merchants_label: 商户管理other_section_title: 更多设置diff --git a/test/controllers/family_exports_controller_test.rb b/test/controllers/family_exports_controller_test.rbindex 017509bba5..a7a820ae3a 100644--- a/test/controllers/family_exports_controller_test.rb+++ b/test/controllers/family_exports_controller_test.rb@@ -33,7 +33,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTestpost family_exports_pathend- assert_redirected_to imports_path+ assert_redirected_to family_exports_pathassert_equal "Export started. You'll be able to download it shortly.", flash[:notice]export = @family.family_exports.last@@ -67,7 +67,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTestexport = @family.family_exports.create!(status: "processing")get download_family_export_path(export)- assert_redirected_to imports_path+ assert_redirected_to family_exports_pathassert_equal "Export not ready for download", flash[:alert]end@@ -78,7 +78,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTestdelete family_export_path(export)end- assert_redirected_to imports_path+ assert_redirected_to family_exports_pathassert_equal "Export deleted successfully", flash[:notice]end@@ -95,7 +95,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTestdelete family_export_path(export)end- assert_redirected_to imports_path+ assert_redirected_to family_exports_pathassert_equal "Export deleted successfully", flash[:notice]end@@ -112,7 +112,7 @@ class FamilyExportsControllerTest < ActionDispatch::IntegrationTestdelete family_export_path(export)end- assert_redirected_to imports_path+ assert_redirected_to family_exports_pathassert_equal "Export deleted successfully", flash[:notice]end