The personal finance app for everyone (by everyone)
Ruby
Support multiple Interactive Brokers connections per family (#4802)
AlexisDel0cb32845216c
diff --git a/app/controllers/ibkr_items_controller.rb b/app/controllers/ibkr_items_controller.rbindex 0a859f76cb..7dcf55b483 100644--- a/app/controllers/ibkr_items_controller.rb+++ b/app/controllers/ibkr_items_controller.rb@@ -4,14 +4,14 @@ class IbkrItemsController < ApplicationControllerdef create@ibkr_item = Current.family.ibkr_items.build(ibkr_item_params)- @ibkr_item.name ||= t("ibkr_items.defaults.name")+ @ibkr_item.name = @ibkr_item.name.presence || default_item_nameif @ibkr_item.save@ibkr_item.sync_laterredirect_to accounts_path, notice: t(".success"), status: :see_otherelse- render_provider_panel("ibkr", alert: @ibkr_item.errors.full_messages.join(", "))+ render_provider_panel("ibkr", alert: @ibkr_item.errors.full_messages.join(", "), new_item_name: ibkr_item_params[:name])endend@@ -19,6 +19,7 @@ class IbkrItemsController < ApplicationControllerattrs = ibkr_item_params.to_hattrs["query_id"] = @ibkr_item.query_id if attrs["query_id"].blank?attrs["token"] = @ibkr_item.token if attrs["token"].blank?+ attrs["name"] = @ibkr_item.name if attrs.key?("name") && attrs["name"].blank?if @ibkr_item.update(attrs.merge(status: :good))@ibkr_item.sync_later unless @ibkr_item.syncing?@@ -62,7 +63,9 @@ class IbkrItemsController < ApplicationControllerdef select_existing_account@account = Current.family.accounts.find(params[:account_id])- @available_ibkr_accounts = Current.family.ibkr_items+ ibkr_items = Current.family.ibkr_items.active+ ibkr_items = ibkr_items.where(id: params[:ibkr_item_id]) if params[:ibkr_item_id].present?+ @available_ibkr_accounts = ibkr_items.includes(ibkr_accounts: { account_provider: :account }).flat_map(&:ibkr_accounts).select { |ibkr_account| ibkr_account.account_provider.nil? }@@ -185,10 +188,20 @@ class IbkrItemsController < ApplicationControllerdef current_ibkr_itemactive_items = Current.family.ibkr_items.active+ return active_items.find_by(id: params[:ibkr_item_id]) if params[:ibkr_item_id].present?active_items.syncable.ordered.first || active_items.ordered.firstend+ # "Interactive Brokers", then "Interactive Brokers 2", "Interactive Brokers 3"...+ def default_item_name+ base = t("ibkr_items.defaults.name")+ existing = Current.family.ibkr_items.active.pluck(:name)+ return base unless existing.include?(base)++ (2..).lazy.map { |n| "#{base} #{n}" }.find { |name| !existing.include?(name) }+ end+def ibkr_item_paramsparams.require(:ibkr_item).permit(:name, :query_id, :token)enddiff --git a/app/models/provider/ibkr_adapter.rb b/app/models/provider/ibkr_adapter.rbindex 6398319371..dd2c620b7f 100644--- a/app/models/provider/ibkr_adapter.rb+++ b/app/models/provider/ibkr_adapter.rb@@ -11,19 +11,40 @@ class Provider::IbkrAdapter < Provider::Basedef self.connection_configs(family:)return [] unless family.can_connect_ibkr?- [ {- key: "ibkr",- name: I18n.t("providers.ibkr.name"),- description: I18n.t("providers.ibkr.connection_description"),+ ibkr_items = family.ibkr_items.active.ordered.select(&:credentials_configured?)++ # With a single connection (or none yet) keep one generic entry; with+ # several, offer one entry per connection so the user picks which one.+ return [ connection_config_for(nil) ] if ibkr_items.size <= 1++ ibkr_items.map { |ibkr_item| connection_config_for(ibkr_item) }+ end++ def self.connection_config_for(ibkr_item)+ url_helpers = Rails.application.routes.url_helpers++ {+ key: ibkr_item.present? ? "ibkr_#{ibkr_item.id}" : "ibkr",+ name: ibkr_item.present? ? I18n.t("providers.ibkr.named_connection", name: ibkr_item.name) : I18n.t("providers.ibkr.name"),+ description: ibkr_item.present? ? I18n.t("providers.ibkr.named_connection_description", name: ibkr_item.name) : I18n.t("providers.ibkr.connection_description"),can_connect: true,new_account_path: ->(_accountable_type, _return_to) {- Rails.application.routes.url_helpers.select_accounts_ibkr_items_path+ if ibkr_item.present?+ url_helpers.select_accounts_ibkr_items_path(ibkr_item_id: ibkr_item.id)+ else+ url_helpers.select_accounts_ibkr_items_path+ end},existing_account_path: ->(account_id) {- Rails.application.routes.url_helpers.select_existing_account_ibkr_items_path(account_id: account_id)+ if ibkr_item.present?+ url_helpers.select_existing_account_ibkr_items_path(account_id: account_id, ibkr_item_id: ibkr_item.id)+ else+ url_helpers.select_existing_account_ibkr_items_path(account_id: account_id)+ end}- } ]+ }end+ private_class_method :connection_config_fordef provider_name"ibkr"diff --git a/app/views/ibkr_items/_ibkr_item.html.erb b/app/views/ibkr_items/_ibkr_item.html.erbindex 196fd30cce..1a62cc9b34 100644--- a/app/views/ibkr_items/_ibkr_item.html.erb+++ b/app/views/ibkr_items/_ibkr_item.html.erb@@ -13,7 +13,7 @@<div class="pl-1 text-sm"><div class="flex items-center gap-2">- <%= tag.p ibkr_item.institution_display_name, class: "font-medium text-primary" %>+ <%= tag.p ibkr_item.name, class: "font-medium text-primary" %><% if ibkr_item.scheduled_for_deletion? %><p class="text-destructive text-sm animate-pulse"><%= t(".deletion_in_progress") %></p><% end %>@@ -72,7 +72,7 @@icon: "trash-2",href: ibkr_item_path(ibkr_item),method: :delete,- confirm: CustomConfirm.for_resource_deletion(ibkr_item.institution_display_name, high_severity: true)+ confirm: CustomConfirm.for_resource_deletion(ibkr_item.name, high_severity: true)) %><% end %></div>diff --git a/app/views/settings/providers/_ibkr_panel.html.erb b/app/views/settings/providers/_ibkr_panel.html.erbindex 44e0c7da96..23982ddbea 100644--- a/app/views/settings/providers/_ibkr_panel.html.erb+++ b/app/views/settings/providers/_ibkr_panel.html.erb@@ -91,62 +91,112 @@</div><% end %>- <%- ibkr_item = Current.family.ibkr_items.first_or_initialize(name: "Interactive Brokers")- is_new_record = ibkr_item.new_record?- %>-- <% if ibkr_item.persisted? %>- <div class="flex flex-wrap justify-end gap-2">- <%= button_to sync_ibkr_item_path(ibkr_item, source: "panel"),- method: :post,- class: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium text-secondary hover:text-primary border border-secondary rounded-lg hover:border-primary",- disabled: ibkr_item.syncing? do %>- <%= icon "refresh-cw", size: "sm" %>- <%= t(".sync") %>- <% end %>+ <% active_items = local_assigns[:ibkr_items] || Current.family.ibkr_items.active.ordered %>++ <% if active_items.any? %>+ <div class="space-y-3">+ <% active_items.each do |item| %>+ <%= render DS::Disclosure.new(variant: :card) do |disclosure| %>+ <% disclosure.with_summary_content do %>+ <div class="flex items-center justify-between gap-2 w-full">+ <div class="flex items-center gap-3">+ <%= render ProviderLogo.new(provider_key: :ibkr) %>+ <div>+ <p class="font-medium text-primary"><%= item.name %></p>+ <p class="text-xs text-secondary">+ <%= item.credentials_configured? ? item.sync_status_summary : t(".not_configured") %>+ </p>+ </div>+ </div>+ </div>+ <% end %>++ <div class="mt-4 space-y-4">+ <div class="flex flex-wrap items-center gap-2">+ <%= render DS::Button.new(+ text: t(".sync"),+ icon: "refresh-cw",+ variant: :outline,+ href: sync_ibkr_item_path(item, source: "panel"),+ method: :post,+ disabled: item.syncing?+ ) %>+ <%= render DS::Button.new(+ text: t(".disconnect"),+ icon: "trash-2",+ variant: :outline_destructive,+ href: ibkr_item_path(item),+ method: :delete,+ data: { turbo_confirm: t(".disconnect_confirm_named", name: item.name) }+ ) %>+ </div>++ <%= styled_form_with model: item,+ url: ibkr_item_path(item),+ scope: :ibkr_item,+ method: :patch,+ data: { turbo: true },+ class: "space-y-3" do |form| %>+ <%= form.text_field :name,+ label: t(".connection_name_label"),+ placeholder: t(".connection_name_placeholder") %>++ <%= form.text_field :query_id,+ label: t(".query_id_label"),+ placeholder: t(".query_id_placeholder_existing"),+ type: :password,+ value: nil %>- <%= button_to ibkr_item_path(ibkr_item),- method: :delete,- class: "inline-flex items-center gap-1 px-3 py-1.5 text-sm font-medium text-destructive hover:bg-destructive/10 rounded-lg",- data: { turbo_confirm: t(".disconnect_confirm") } do %>- <%= icon "trash-2", size: "sm" %>+ <%= form.text_field :token,+ label: t(".token_label"),+ placeholder: t(".token_placeholder_existing"),+ type: :password,+ value: nil %>++ <div class="flex flex-wrap justify-end gap-2">+ <%= render DS::Link.new(+ text: t(".setup_accounts"),+ icon: "settings",+ variant: "secondary",+ href: setup_accounts_ibkr_item_path(item),+ frame: :modal+ ) %>+ <%= render DS::Button.new(text: t(".update_configuration"), type: :submit) %>+ </div>+ <% end %>+ </div>+ <% end %><% end %></div>++ <%= render "settings/providers/add_connection_heading", label: t(".add_connection") %><% end %>- <%= styled_form_with model: ibkr_item,- url: is_new_record ? ibkr_items_path : ibkr_item_path(ibkr_item),+ <% new_item = Current.family.ibkr_items.build(name: local_assigns[:new_item_name]) %>+ <%= styled_form_with model: new_item,+ url: ibkr_items_path,scope: :ibkr_item,- method: is_new_record ? :post : :patch,+ method: :post,data: { turbo: true },class: "space-y-3" do |form| %>+ <%= form.text_field :name,+ label: t(".connection_name_label"),+ placeholder: t(".connection_name_placeholder") %>+<%= form.text_field :query_id,label: t(".query_id_label"),- placeholder: is_new_record ? t(".query_id_placeholder_new") : t(".query_id_placeholder_existing"),- type: :password %>+ placeholder: t(".query_id_placeholder_new"),+ type: :password,+ value: nil %><%= form.text_field :token,label: t(".token_label"),- placeholder: is_new_record ? t(".token_placeholder_new") : t(".token_placeholder_existing"),- type: :password %>+ placeholder: t(".token_placeholder_new"),+ type: :password,+ value: nil %>- <div class="flex flex-wrap justify-end gap-2">- <%= form.submit(is_new_record ? t(".save_configuration") : t(".update_configuration")) %>+ <div class="flex justify-end">+ <%= form.submit t(".add_connection") %></div><% end %>-- <div class="flex items-center gap-2">- <% if ibkr_item.persisted? && ibkr_item.credentials_configured? %>- <div class="w-2 h-2 bg-success rounded-full"></div>- <p class="text-sm text-secondary">- <%= t(".status_configured_prefix", summary: ibkr_item.sync_status_summary) %>- <%= link_to t(".accounts_tab"), accounts_path, class: "text-link underline" %>- <%= t(".status_configured_suffix") %>- </p>- <% else %>- <div class="w-2 h-2 bg-surface-inset rounded-full"></div>- <p class="text-sm text-secondary"><%= t(".not_configured") %></p>- <% end %>- </div></div>diff --git a/config/locales/views/ibkr_items/ca.yml b/config/locales/views/ibkr_items/ca.ymlindex ce6391fa66..6476e8d2eb 100644--- a/config/locales/views/ibkr_items/ca.yml+++ b/config/locales/views/ibkr_items/ca.yml@@ -95,6 +95,8 @@ ca:success: La configuració d'Interactive Brokers s'ha actualitzat correctament.providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Vincula els comptes de la teva consulta Flex %{name}"connection_description: Connecta un informe de Flex Web Service d'InteractiveBrokersinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/de.yml b/config/locales/views/ibkr_items/de.ymlindex 6f8c7cbf6e..4a50666643 100644--- a/config/locales/views/ibkr_items/de.yml+++ b/config/locales/views/ibkr_items/de.yml@@ -2,6 +2,8 @@de:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Konten aus deiner Flex-Abfrage %{name} verknüpfen"name: Interactive Brokersconnection_description: Verbinde einen Interactive Brokers Flex Web Service-Berichtinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/en.yml b/config/locales/views/ibkr_items/en.ymlindex 45666b2e40..40be221d61 100644--- a/config/locales/views/ibkr_items/en.yml+++ b/config/locales/views/ibkr_items/en.yml@@ -2,6 +2,8 @@en:providers:ibkr:+ named_connection: Interactive Brokers (%{name})+ named_connection_description: Link accounts from your %{name} Flex Queryname: Interactive Brokersconnection_description: Connect an Interactive Brokers Flex Web Service reportinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/es.yml b/config/locales/views/ibkr_items/es.ymlindex 857d308fbc..b416a40cdf 100644--- a/config/locales/views/ibkr_items/es.yml+++ b/config/locales/views/ibkr_items/es.yml@@ -2,6 +2,8 @@es:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Vincula las cuentas de tu consulta Flex %{name}"name: Interactive Brokersconnection_description: Conecta un informe del Flex Web Service de Interactive Brokersinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/fr.yml b/config/locales/views/ibkr_items/fr.ymlindex 362897aaa0..16c5993a0d 100644--- a/config/locales/views/ibkr_items/fr.yml+++ b/config/locales/views/ibkr_items/fr.yml@@ -96,6 +96,8 @@ fr:success: La configuration d'Interactive Brokers a été mise à jour avec succès.providers:ibkr:+ named_connection: Interactive Brokers (%{name})+ named_connection_description: Associer les comptes de votre requête Flex %{name}connection_description: Connecter un rapport de service Web Flex d'InteractiveBrokersinstitution_name: Courtiers interactifsdiff --git a/config/locales/views/ibkr_items/hu.yml b/config/locales/views/ibkr_items/hu.ymlindex d247428595..7062ad2640 100644--- a/config/locales/views/ibkr_items/hu.yml+++ b/config/locales/views/ibkr_items/hu.yml@@ -2,6 +2,8 @@hu:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Számlák összekapcsolása a(z) %{name} Flex-lekérdezésből"name: Interactive Brokersconnection_description: Csatlakozás egy Interactive Brokers Flex Web Service jelentéshezinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/it.yml b/config/locales/views/ibkr_items/it.ymlindex 4eeb141f8c..a08a82325b 100644--- a/config/locales/views/ibkr_items/it.yml+++ b/config/locales/views/ibkr_items/it.yml@@ -2,6 +2,8 @@it:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Collega i conti della tua query Flex %{name}"name: Interactive Brokersconnection_description: Connetti un report Flex Web Service di Interactive Brokersinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/nl.yml b/config/locales/views/ibkr_items/nl.ymlindex 3f694d9369..f17600b384 100644--- a/config/locales/views/ibkr_items/nl.yml+++ b/config/locales/views/ibkr_items/nl.yml@@ -2,6 +2,8 @@nl:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Koppel rekeningen uit je Flex-query %{name}"name: Interactive Brokersconnection_description: Koppel een Interactive Brokers Flex Web Service-rapportinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/pl.yml b/config/locales/views/ibkr_items/pl.ymlindex 1a67903ad6..97c45822af 100644--- a/config/locales/views/ibkr_items/pl.yml+++ b/config/locales/views/ibkr_items/pl.yml@@ -98,6 +98,8 @@ pl:success: Zaktualizowano konfigurację Interactive Brokers.providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Połącz konta z zapytania Flex %{name}"connection_description: Połącz raport Flex Web Service od Interactive Brokersinstitution_name: Interactive Brokersname: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/pt-BR.yml b/config/locales/views/ibkr_items/pt-BR.ymlindex 4eeaa49620..40a901e4f7 100644--- a/config/locales/views/ibkr_items/pt-BR.yml+++ b/config/locales/views/ibkr_items/pt-BR.yml@@ -2,6 +2,8 @@pt-BR:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Vincule as contas da sua consulta Flex %{name}"name: Interactive Brokersconnection_description: Conecte um relatório do Flex Web Service da Interactive Brokersinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/pt-PT.yml b/config/locales/views/ibkr_items/pt-PT.ymlindex bdd2883465..d6c795bbbf 100644--- a/config/locales/views/ibkr_items/pt-PT.yml+++ b/config/locales/views/ibkr_items/pt-PT.yml@@ -2,6 +2,8 @@pt-PT:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Associe as contas da sua consulta Flex %{name}"name: Interactive Brokersconnection_description: Ligue um relatório do Flex Web Service da Interactive Brokersinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/ru.yml b/config/locales/views/ibkr_items/ru.ymlindex 5d017e187b..c3bb6655c8 100644--- a/config/locales/views/ibkr_items/ru.yml+++ b/config/locales/views/ibkr_items/ru.yml@@ -97,6 +97,8 @@ ru:success: Конфигурация Interactive Brokers успешно обновлена.providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Привязать счета из Flex-запроса %{name}"connection_description: Подключите отчёт Flex Web Service от Interactive Brokersinstitution_name: Interactive Brokersname: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/tr.yml b/config/locales/views/ibkr_items/tr.ymlindex 2db703a232..1ed2eaae49 100644--- a/config/locales/views/ibkr_items/tr.yml+++ b/config/locales/views/ibkr_items/tr.yml@@ -93,6 +93,8 @@ tr:success: Interactive Brokers yapılandırması başarıyla güncellendi.providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "%{name} Flex sorgunuzdaki hesapları bağlayın"connection_description: Bir Interactive Brokers Flex Web Service raporu bağlayıninstitution_name: Interactive Brokersname: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/uk.yml b/config/locales/views/ibkr_items/uk.ymlindex 8f7abc5465..d9fad4456e 100644--- a/config/locales/views/ibkr_items/uk.yml+++ b/config/locales/views/ibkr_items/uk.yml@@ -2,6 +2,8 @@uk:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Прив'язати рахунки з Flex-запиту %{name}"name: "Interactive Brokers"connection_description: "Підключити звіт Interactive Brokers Flex Web Service"institution_name: "Interactive Brokers"diff --git a/config/locales/views/ibkr_items/vi.yml b/config/locales/views/ibkr_items/vi.ymlindex 2bb59f9a5a..1e7097e837 100644--- a/config/locales/views/ibkr_items/vi.yml+++ b/config/locales/views/ibkr_items/vi.yml@@ -2,6 +2,8 @@vi:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "Liên kết tài khoản từ truy vấn Flex %{name}"name: Interactive Brokersconnection_description: Kết nối báo cáo Flex Web Service của Interactive Brokersinstitution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/zh-CN.yml b/config/locales/views/ibkr_items/zh-CN.ymlindex 8c6e2cc464..2d40773593 100644--- a/config/locales/views/ibkr_items/zh-CN.yml+++ b/config/locales/views/ibkr_items/zh-CN.yml@@ -2,6 +2,8 @@zh-CN:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "关联 %{name} Flex 查询中的账户"name: Interactive Brokersconnection_description: 连接 Interactive Brokers Flex Web Service 报告institution_name: Interactive Brokersdiff --git a/config/locales/views/ibkr_items/zh-TW.yml b/config/locales/views/ibkr_items/zh-TW.ymlindex ed28476700..703d51e435 100644--- a/config/locales/views/ibkr_items/zh-TW.yml+++ b/config/locales/views/ibkr_items/zh-TW.yml@@ -2,6 +2,8 @@zh-TW:providers:ibkr:+ named_connection: "Interactive Brokers (%{name})"+ named_connection_description: "連結 %{name} Flex 查詢中的帳戶"name: Interactive Brokersconnection_description: 連結一份 Interactive Brokers Flex Web Service 報表institution_name: Interactive Brokersdiff --git a/config/locales/views/settings/ca.yml b/config/locales/views/settings/ca.ymlindex b594e31137..48595a850d 100644--- a/config/locales/views/settings/ca.yml+++ b/config/locales/views/settings/ca.yml@@ -375,7 +375,12 @@ ca:last_synced: Última sincronització fa %{time}needs_attention: necessita atencióibkr_panel:- accounts_tab: Comptes+ add_connection: "Afegeix connexió Interactive Brokers"+ connection_name_label: "Nom de la connexió"+ connection_name_placeholder: "p. ex. IBKR Irlanda, IBKR EUA"+ disconnect: "Desconnecta"+ disconnect_confirm_named: "Vols desconnectar %{name}?"+ setup_accounts: "Configura els comptes"configuration:all_other_options: 'Tota la resta d''opcions de configuració: "No"'date_format: 'Format de data: yyyy-MM-dd'@@ -385,7 +390,6 @@ ca:period: 'Període: Últims 365 dies naturals'profit_and_loss: 'Pèrdues i guanys: Per defecte'time_format: 'Format d''hora: HH:mm:ss'- disconnect_confirm: Vols desconnectar Interactive Brokers?flex_query_details:configuration_heading: Estableix aquestes opcions de consultaeyebrow: Flex Query@@ -400,7 +404,6 @@ ca:report_window_note: Els informes Flex d'IBKR estan limitats a la finestrade consulta configurada a IBKR. Sure importarà les posicions actuals completesmés fins a 365 dies d'activitat d'aquest informe.- save_configuration: Desa la configuraciósections:account_information: 'Account Information: Account ID, Currency'cash_report: 'Cash Report:'@@ -426,8 +429,6 @@ ca:To Base, IB Commission, IB Commission Currency, Quantity, Symbol, TradeDate, Trade ID, TradePrice, Transaction ID'trades_options: 'Options: Execution'- status_configured_prefix: "%{summary}. Ves a la pestanya"- status_configured_suffix: per gestionar els comptes descoberts.steps:step_1: Al teu IBKR Client Portal, navega a "Performance & Reports" > "FlexQueries".diff --git a/config/locales/views/settings/de.yml b/config/locales/views/settings/de.ymlindex 6c7077ebf1..5a0da32591 100644--- a/config/locales/views/settings/de.yml+++ b/config/locales/views/settings/de.yml@@ -333,7 +333,12 @@ de:last_synced: Sync vor %{time}needs_attention: mit Problemenibkr_panel:- accounts_tab: Konten+ add_connection: "Interactive-Brokers-Verbindung hinzufügen"+ connection_name_label: "Name der Verbindung"+ connection_name_placeholder: "z. B. IBKR Irland, IBKR USA"+ disconnect: "Trennen"+ disconnect_confirm_named: "%{name} trennen?"+ setup_accounts: "Konten einrichten"configuration:all_other_options: 'Alle übrigen Optionen: „No“'date_format: 'Date Format: yyyy-MM-dd'@@ -343,7 +348,6 @@ de:period: 'Period: Last 365 Calendar Days'profit_and_loss: 'Profit and Loss: Default'time_format: 'Time Format: HH:mm:ss'- disconnect_confirm: Interactive Brokers trennen?flex_query_details:configuration_heading: Diese Abfrageoptionen setzeneyebrow: Flex Query@@ -355,7 +359,6 @@ de:query_id_placeholder_existing: Leer lassen, um die bisherige Query ID zu behaltenquery_id_placeholder_new: IBKR-Flex-Query-ID eintragenreport_window_note: IBKR-Flex-Berichte sind auf den Zeitraum begrenzt, den du in IBKR eingestellt hast. Sure importiert die vollständigen aktuellen Bestände und bis zu 365 Tage Aktivität aus diesem Bericht.- save_configuration: Konfiguration speichernsections:account_information: 'Account Information: Account ID, Currency'cash_report: 'Cash Report:'@@ -374,8 +377,6 @@ de:trades: 'Trades:'trades_fields: 'Felder: Asset Class, Buy/Sell, Conid, Currency, FX Rate To Base, IB Commission, IB Commission Currency, Quantity, Symbol, Trade Date, Trade ID, TradePrice, Transaction ID'trades_options: 'Optionen: Execution'- status_configured_prefix: "%{summary}. Im Reiter"- status_configured_suffix: verwaltest du die gefundenen Konten.steps:step_1: Öffne im IBKR Client Portal „Performance & Reports“ > „Flex Queries“.step_2: Klick im Bereich „Activity Flex Query“ auf das Plus-Symbol, um eine neue Abfrage anzulegen.diff --git a/config/locales/views/settings/en.yml b/config/locales/views/settings/en.ymlindex 4c858bfc49..85383e37d4 100644--- a/config/locales/views/settings/en.yml+++ b/config/locales/views/settings/en.yml@@ -686,6 +686,12 @@ en:not_found: Provider not found.sync_provider_no_items: No connections available to sync.ibkr_panel:+ add_connection: Add Interactive Brokers connection+ connection_name_label: Connection name+ connection_name_placeholder: e.g. IBKR Ireland, IBKR US+ disconnect: Disconnect+ disconnect_confirm_named: Disconnect %{name}?+ setup_accounts: Set up accountssteps:step_1: 'In your IBKR Client Portal, navigate to "Performance & Reports" > "Flex Queries".'step_2: 'Click the "+" icon in the "Activity Flex Query" section to create a new query.'@@ -727,18 +733,13 @@ en:all_other_options: 'All other configuration options: "No"'report_window_note: "IBKR Flex reports are limited to the query window you configured in IBKR. Sure will import full current holdings plus up to the last 365 days of activity from this report."sync: Sync- disconnect_confirm: Disconnect Interactive Brokers?query_id_label: Query IDquery_id_placeholder_new: Enter your IBKR Flex Query IDquery_id_placeholder_existing: Leave blank to keep the current Query IDtoken_label: Tokentoken_placeholder_new: Enter your IBKR Flex Web Service Tokentoken_placeholder_existing: Leave blank to keep the current Token- save_configuration: Save Configurationupdate_configuration: Update Configuration- status_configured_prefix: "%{summary}. Visit the"- accounts_tab: Accounts- status_configured_suffix: tab to manage discovered accounts.not_configured: Not configured.trade_republic_panel:encryption_warning:diff --git a/config/locales/views/settings/es.yml b/config/locales/views/settings/es.ymlindex f9fb5de3a8..60913789fa 100644--- a/config/locales/views/settings/es.yml+++ b/config/locales/views/settings/es.yml@@ -515,6 +515,12 @@ es:not_found: Proveedor no encontrado.sync_provider_no_items: No hay conexiones disponibles para sincronizar.ibkr_panel:+ add_connection: "Añadir conexión de Interactive Brokers"+ connection_name_label: "Nombre de la conexión"+ connection_name_placeholder: "p. ej. IBKR Irlanda, IBKR EE. UU."+ disconnect: "Desconectar"+ disconnect_confirm_named: "¿Desconectar %{name}?"+ setup_accounts: "Configurar cuentas"steps:step_1: En tu Client Portal de IBKR, ve a "Performance & Reports" > "Flex Queries".step_2: Haz clic en el icono "+" de la sección "Activity Flex Query" para crear una nueva consulta.@@ -556,18 +562,13 @@ es:all_other_options: 'Todas las demás opciones de configuración: "No"'report_window_note: Los informes Flex de IBKR se limitan a la ventana de consulta que configuraste en IBKR. Sure importará todas las posiciones actuales más hasta los últimos 365 días de actividad de este informe.sync: Sincronizar- disconnect_confirm: ¿Desconectar Interactive Brokers?query_id_label: Query IDquery_id_placeholder_new: Introduce tu Flex Query ID de IBKRquery_id_placeholder_existing: Deja en blanco para conservar el Query ID actualtoken_label: Tokentoken_placeholder_new: Introduce tu token del Flex Web Service de IBKRtoken_placeholder_existing: Deja en blanco para conservar el token actual- save_configuration: Guardar configuraciónupdate_configuration: Actualizar configuración- status_configured_prefix: '%{summary}. Visita la pestaña'- accounts_tab: Cuentas- status_configured_suffix: para gestionar las cuentas detectadas.not_configured: Sin configurar.show:coinbase_title: Coinbasediff --git a/config/locales/views/settings/fr.yml b/config/locales/views/settings/fr.ymlindex 9730a8b270..98e56b538a 100644--- a/config/locales/views/settings/fr.yml+++ b/config/locales/views/settings/fr.yml@@ -456,7 +456,12 @@ fr:last_synced: Dernière synchronisation il y a %{time}needs_attention: requiert de l'attentionibkr_panel:- accounts_tab: Comptes+ add_connection: Ajouter une connexion Interactive Brokers+ connection_name_label: Nom de la connexion+ connection_name_placeholder: ex. IBKR Irlande, IBKR US+ disconnect: Déconnecter+ disconnect_confirm_named: Déconnecter %{name} ?+ setup_accounts: Configurer les comptesconfiguration:all_other_options: 'All other configuration options : "No"'date_format: "Date Format : yyyy-MM-dd"@@ -466,7 +471,6 @@ fr:period: "Period : Last 365 Calendar Days"profit_and_loss: "Profit and Loss : Default"time_format: "Time Format : HH:mm:ss"- disconnect_confirm: Déconnecter Interactive Brokers ?flex_query_details:configuration_heading: Définissez ces options de requêteeyebrow: Requête Flex@@ -478,7 +482,6 @@ fr:query_id_placeholder_existing: Laissez vide pour conserver l'ID de requête actuelquery_id_placeholder_new: Saisissez votre ID de requête IBKR Flexreport_window_note: Les rapports IBKR Flex sont limités à la fenêtre de requête que vous avez configurée dans IBKR. Sure importera la totalité des positions actuelles ainsi que jusqu'aux 365 derniers jours d'activité de ce rapport.- save_configuration: Enregistrer la configurationsections:account_information: "Account Information: Account ID, Currency"cash_report: "Cash Report :"@@ -497,8 +500,6 @@ fr:trades: "Trades :"trades_fields: "Fields : Asset Class, Buy/Sell, Conid, Currency, FX Rate To Base, IB Commission, IB Commission Currency, Quantity, Symbol, Trade Date, Trade ID, TradePrice, Transaction ID"trades_options: "Options : Execution"- status_configured_prefix: "%{summary}. Visitez l'onglet"- status_configured_suffix: pour gérer les comptes découverts.steps:step_1: Dans votre portail client IBKR, accédez à "Performance & Rapports" > "Requêtes Flex".step_2: Cliquez sur l'icône "+" dans la section "Activity Flex Query" pour créer une nouvelle requête.diff --git a/config/locales/views/settings/hu.yml b/config/locales/views/settings/hu.ymlindex 9b0c437c82..9e3a51763b 100644--- a/config/locales/views/settings/hu.yml+++ b/config/locales/views/settings/hu.yml@@ -424,6 +424,12 @@ hu:not_found: Szolgáltató nem található.sync_provider_no_items: Nincs elérhető kapcsolat a szinkronizáláshoz.ibkr_panel:+ add_connection: "Interactive Brokers kapcsolat hozzáadása"+ connection_name_label: "Kapcsolat neve"+ connection_name_placeholder: "pl. IBKR Írország, IBKR USA"+ disconnect: "Lecsatlakozás"+ disconnect_confirm_named: "Lecsatlakoztatja ezt: %{name}?"+ setup_accounts: "Számlák beállítása"steps:step_1: 'Az IBKR ügyfélportálon menj a „Teljesítmény és Jelentések" > „Flex lekérdezések" menübe.'step_2: 'Kattints a „+" ikonra az „Activity Flex Query" részben egy új lekérdezés létrehozásához.'@@ -465,16 +471,11 @@ hu:all_other_options: 'Minden egyéb konfigurációs opció: „Nem"'report_window_note: "Az IBKR Flex-jelentések az IBKR-ben konfigurált lekérdezési ablakra korlátozódnak. A Sure a teljes aktuális pozíciókat, valamint a jelentésből legfeljebb 365 nap tevékenységet importál."sync: Szinkronizálás- disconnect_confirm: Leválasztja az Interactive Brokers-t?query_id_label: Lekérdezés azonosítójaquery_id_placeholder_new: Add meg az IBKR Flex lekérdezés azonosítójátquery_id_placeholder_existing: Hagyd üresen a meglévő azonosító megtartásáhoztoken_label: Tokentoken_placeholder_new: Add meg az IBKR Flex Web Service tokenedettoken_placeholder_existing: Hagyd üresen a meglévő token megtartásához- save_configuration: Konfiguráció mentéseupdate_configuration: Konfiguráció frissítése- status_configured_prefix: "%{summary}. Látogasd meg a"- accounts_tab: Számlák- status_configured_suffix: fület a felderített számlák kezeléséhez.not_configured: Nincs konfigurálva.diff --git a/config/locales/views/settings/it.yml b/config/locales/views/settings/it.ymlindex ff09a206e6..0b6a01687a 100644--- a/config/locales/views/settings/it.yml+++ b/config/locales/views/settings/it.yml@@ -509,6 +509,12 @@ it:not_found: Provider non trovato.sync_provider_no_items: Nessuna connessione disponibile per la sincronizzazione.ibkr_panel:+ add_connection: "Aggiungi connessione Interactive Brokers"+ connection_name_label: "Nome connessione"+ connection_name_placeholder: "es. IBKR Irlanda, IBKR USA"+ disconnect: "Disconnetti"+ disconnect_confirm_named: "Disconnettere %{name}?"+ setup_accounts: "Configura conti"steps:step_1: 'Nel tuo portale clienti IBKR, vai su "Performance e rapporti" > "Flex Queries".'step_2: 'Clicca sull''icona "+" nella sezione "Activity Flex Query" per creare una nuova query.'@@ -550,16 +556,11 @@ it:all_other_options: 'Tutte le altre opzioni: "No"'report_window_note: "I rapporti IBKR Flex sono limitati alla finestra di query configurata in IBKR. Sure importerà le posizioni attuali complete più fino agli ultimi 365 giorni di attività da questo rapporto."sync: Sincronizza- disconnect_confirm: Disconnettere Interactive Brokers?query_id_label: Query IDquery_id_placeholder_new: Inserisci il tuo IBKR Flex Query IDquery_id_placeholder_existing: Lascia vuoto per mantenere il Query ID attualetoken_label: Tokentoken_placeholder_new: Inserisci il tuo IBKR Flex Web Service Tokentoken_placeholder_existing: Lascia vuoto per mantenere il Token attuale- save_configuration: Salva configurazioneupdate_configuration: Aggiorna configurazione- status_configured_prefix: "%{summary}. Visita la scheda"- accounts_tab: Conti- status_configured_suffix: per gestire i conti scoperti.not_configured: Non configurato.diff --git a/config/locales/views/settings/nl.yml b/config/locales/views/settings/nl.ymlindex 318226dbb2..5436118917 100644--- a/config/locales/views/settings/nl.yml+++ b/config/locales/views/settings/nl.yml@@ -688,6 +688,12 @@ nl:not_found: "Provider niet gevonden."sync_provider_no_items: "Geen koppelingen beschikbaar om te synchroniseren."ibkr_panel:+ add_connection: "Interactive Brokers-koppeling toevoegen"+ connection_name_label: "Naam koppeling"+ connection_name_placeholder: "bijv. IBKR Ierland, IBKR VS"+ disconnect: "Loskoppelen"+ disconnect_confirm_named: "%{name} loskoppelen?"+ setup_accounts: "Accounts instellen"steps:step_1: "Ga in uw IBKR Client Portal naar \"Performance & Reports\" > \"Flex Queries\"."step_2: "Klik op het \"+\"-pictogram in het onderdeel \"Activity Flex Query\" om een nieuwe query aan te maken."@@ -729,18 +735,13 @@ nl:all_other_options: "Alle overige configuratieopties: \"No\""report_window_note: "IBKR Flex-rapporten zijn beperkt tot het queryvenster dat u in IBKR heeft ingesteld. Sure importeert de volledige huidige posities plus maximaal de laatste 365 dagen aan activiteit uit dit rapport."sync: "Synchroniseren"- disconnect_confirm: "Interactive Brokers loskoppelen?"query_id_label: "Query ID"query_id_placeholder_new: "Voer uw IBKR Flex Query ID in"query_id_placeholder_existing: "Laat leeg om de huidige Query ID te behouden"token_label: "Token"token_placeholder_new: "Voer uw IBKR Flex Web Service Token in"token_placeholder_existing: "Laat leeg om het huidige Token te behouden"- save_configuration: "Configuratie opslaan"update_configuration: "Configuratie bijwerken"- status_configured_prefix: "%{summary}. Ga naar het tabblad"- accounts_tab: "Accounts"- status_configured_suffix: "om gevonden accounts te beheren."not_configured: "Niet geconfigureerd."trade_republic_panel:encryption_warning:diff --git a/config/locales/views/settings/pl.yml b/config/locales/views/settings/pl.ymlindex 4a03beafce..6f623047ae 100644--- a/config/locales/views/settings/pl.yml+++ b/config/locales/views/settings/pl.yml@@ -480,7 +480,12 @@ pl:last_synced: Ostatnio zsynchronizowano %{time} temuneeds_attention: wymaga uwagiibkr_panel:- accounts_tab: Konta+ add_connection: "Dodaj połączenie Interactive Brokers"+ connection_name_label: "Nazwa połączenia"+ connection_name_placeholder: "np. IBKR Irlandia, IBKR USA"+ disconnect: "Rozłącz"+ disconnect_confirm_named: "Rozłączyć %{name}?"+ setup_accounts: "Skonfiguruj konta"configuration:all_other_options: 'Wszystkie pozostałe opcje konfiguracji: "Nie"'date_format: 'Format daty: yyyy-MM-dd'@@ -490,7 +495,6 @@ pl:period: 'Okres: Ostatnie 365 dni kalendarzowych'profit_and_loss: 'Zysk i strata: Domyślne'time_format: 'Format godziny: HH:mm:ss'- disconnect_confirm: Rozłączyć Interactive Brokers?flex_query_details:configuration_heading: Ustaw te opcje zapytaniaeyebrow: Flex Query@@ -505,7 +509,6 @@ pl:report_window_note: Raporty IBKR Flex są ograniczone do okresu zapytania skonfigurowanegow IBKR. Sure zaimportuje pełny bieżący stan posiadania oraz do 365 ostatnichdni aktywności z tego raportu.- save_configuration: Zapisz konfiguracjęsections:account_information: 'Account Information: Account ID, Currency'cash_report: 'Cash Report:'@@ -531,8 +534,6 @@ pl:To Base, IB Commission, IB Commission Currency, Quantity, Symbol, TradeDate, Trade ID, TradePrice, Transaction ID'trades_options: 'Options: Execution'- status_configured_prefix: "%{summary}. Przejdź do zakładki"- status_configured_suffix: aby zarządzać wykrytymi kontami.steps:step_1: W IBKR Client Portal przejdź do "Performance & Reports" > "FlexQueries".diff --git a/config/locales/views/settings/pt-PT.yml b/config/locales/views/settings/pt-PT.ymlindex 932883a76a..4f7ac20e14 100644--- a/config/locales/views/settings/pt-PT.yml+++ b/config/locales/views/settings/pt-PT.yml@@ -596,6 +596,12 @@ pt-PT:not_found: Serviço não encontrado.sync_provider_no_items: Sem ligações disponíveis para sincronizar.ibkr_panel:+ add_connection: "Adicionar ligação Interactive Brokers"+ connection_name_label: "Nome da ligação"+ connection_name_placeholder: "ex.: IBKR Irlanda, IBKR EUA"+ disconnect: "Desligar"+ disconnect_confirm_named: "Desligar %{name}?"+ setup_accounts: "Configurar contas"steps:step_1: 'No seu Client Portal IBKR, navegue até "Performance & Reports" > "Flex Queries".'step_2: 'Clique no ícone "+" na secção "Activity Flex Query" para criar uma nova consulta.'@@ -637,18 +643,13 @@ pt-PT:all_other_options: 'Todas as outras opções de configuração: "No"'report_window_note: "Os relatórios Flex IBKR estão limitados à janela de consulta que configurou no IBKR. O Sure importará as posições atuais completas mais até aos últimos 365 dias de atividade deste relatório."sync: Sincronizar- disconnect_confirm: Desligar Interactive Brokers?query_id_label: Query IDquery_id_placeholder_new: Introduza o seu IBKR Flex Query IDquery_id_placeholder_existing: Deixe em branco para manter o Query ID atualtoken_label: Tokentoken_placeholder_new: Introduza o seu IBKR Flex Web Service Tokentoken_placeholder_existing: Deixe em branco para manter o Token atual- save_configuration: Guardar Configuraçãoupdate_configuration: Atualizar Configuração- status_configured_prefix: "%{summary}. Visite o"- accounts_tab: Contas- status_configured_suffix: separador para gerir as contas descobertas.not_configured: Não configurado.trading212_panel:steps:diff --git a/config/locales/views/settings/ru.yml b/config/locales/views/settings/ru.ymlindex 54ed1b8d63..298ca4cc75 100644--- a/config/locales/views/settings/ru.yml+++ b/config/locales/views/settings/ru.yml@@ -414,7 +414,12 @@ ru:last_synced: Последняя синхронизация %{time} назадneeds_attention: требует вниманияibkr_panel:- accounts_tab: Счета+ add_connection: "Добавить подключение Interactive Brokers"+ connection_name_label: "Название подключения"+ connection_name_placeholder: "напр. IBKR Ирландия, IBKR США"+ disconnect: "Отключить"+ disconnect_confirm_named: "Отключить %{name}?"+ setup_accounts: "Настроить счета"configuration:all_other_options: 'Все остальные параметры конфигурации: "Нет"'date_format: 'Формат даты: yyyy-MM-dd'@@ -424,7 +429,6 @@ ru:period: 'Период: Последние 365 календарных дней'profit_and_loss: 'Прибыль и убытки: По умолчанию'time_format: 'Формат времени: HH:mm:ss'- disconnect_confirm: Отключить Interactive Brokers?flex_query_details:configuration_heading: Установите эти параметры запросаeyebrow: Flex Query@@ -440,7 +444,6 @@ ru:report_window_note: Отчёты IBKR Flex ограничены окном запроса, которое вынастроили в IBKR. Sure импортирует полные текущие активы плюс до последних365 дней активности из этого отчёта.- save_configuration: Сохранить конфигурациюsections:account_information: 'Информация о счёте: ID счёта, Валюта'cash_report: 'Отчёт о наличных:'@@ -465,8 +468,6 @@ ru:к базовой валюте, Комиссия IB, Валюта комиссии IB, Количество, Символ,Дата сделки, ID сделки, Цена сделки, ID операции'trades_options: 'Опции: Исполнение'- status_configured_prefix: "%{summary}. Перейдите на"- status_configured_suffix: вкладку, чтобы управлять обнаруженными счетами.steps:step_1: В вашем клиентском портале IBKR перейдите в "Performance & Reports"> "Flex Queries".diff --git a/config/locales/views/settings/tr.yml b/config/locales/views/settings/tr.ymlindex 8893b89514..71a5b8fd48 100644--- a/config/locales/views/settings/tr.yml+++ b/config/locales/views/settings/tr.yml@@ -420,7 +420,12 @@ tr:last_synced: Son senkronizasyon %{time} önceneeds_attention: dikkat gerekiyoribkr_panel:- accounts_tab: Hesaplar+ add_connection: "Interactive Brokers bağlantısı ekle"+ connection_name_label: "Bağlantı adı"+ connection_name_placeholder: "ör. IBKR İrlanda, IBKR ABD"+ disconnect: "Bağlantıyı kes"+ disconnect_confirm_named: "%{name} bağlantısı kesilsin mi?"+ setup_accounts: "Hesapları kur"configuration:all_other_options: 'Diğer tüm yapılandırma seçenekleri: "No"'date_format: 'Tarih Formatı: yyyy-MM-dd'@@ -430,7 +435,6 @@ tr:period: 'Dönem: Son 365 Takvim Günü'profit_and_loss: 'Kar ve Zarar: Varsayılan'time_format: 'Saat Formatı: HH:mm:ss'- disconnect_confirm: Interactive Brokers bağlantısı kesilsin mi?flex_query_details:configuration_heading: Bu sorgu seçeneklerini ayarlayıneyebrow: Flex Query@@ -445,7 +449,6 @@ tr:report_window_note: IBKR Flex raporları, IBKR'de yapılandırdığınız sorgu penceresiylesınırlıdır. Sure, bu rapordan mevcut tüm varlıkları ve son 365 güne kadarolan işlem geçmişini içe aktaracaktır.- save_configuration: Yapılandırmayı Kaydetsections:account_information: 'Hesap Bilgileri: Account ID, Currency'cash_report: 'Nakit Raporu:'@@ -471,8 +474,6 @@ tr:To Base, IB Commission, IB Commission Currency, Quantity, Symbol, TradeDate, Trade ID, TradePrice, Transaction ID'trades_options: 'Seçenekler: Execution'- status_configured_prefix: "%{summary}. Şuraya gidin:"- status_configured_suffix: sekmesine giderek keşfedilen hesapları yönetin.steps:step_1: IBKR Client Portal'ınızda "Performance & Reports" > "Flex Queries"bölümüne gidin.diff --git a/config/locales/views/settings/uk.yml b/config/locales/views/settings/uk.ymlindex cf215c8e9b..4f161ce316 100644--- a/config/locales/views/settings/uk.yml+++ b/config/locales/views/settings/uk.yml@@ -612,6 +612,12 @@ uk:not_found: Постачальника не знайдено.sync_provider_no_items: Немає доступних з'єднань для синхронізації.ibkr_panel:+ add_connection: "Додати підключення Interactive Brokers"+ connection_name_label: "Назва підключення"+ connection_name_placeholder: "напр. IBKR Ірландія, IBKR США"+ disconnect: "Відключити"+ disconnect_confirm_named: "Відключити %{name}?"+ setup_accounts: "Налаштувати рахунки"steps:step_1: 'У вашому клієнтському порталі IBKR перейдіть до "Продуктивність та звіти" > "Flex Queries".'step_2: 'Натисніть значок "+" у розділі "Activity Flex Query", щоб створити новий запит.'@@ -653,18 +659,13 @@ uk:all_other_options: 'Усі інші параметри конфігурації: "Ні"'report_window_note: "Звіти IBKR Flex обмежені вікном запиту, яке ви налаштували в IBKR. Sure імпортує повні поточні активи плюс до останніх 365 днів активності з цього звіту."sync: Синхронізувати- disconnect_confirm: Відключити Interactive Brokers?query_id_label: ID запитуquery_id_placeholder_new: Введіть свій ID запиту IBKR Flexquery_id_placeholder_existing: Залиште порожнім, щоб зберегти поточний ID запитуtoken_label: Токенtoken_placeholder_new: Введіть свій токен веб-служби IBKR Flextoken_placeholder_existing: Залиште порожнім, щоб зберегти поточний токен- save_configuration: Зберегти конфігураціюupdate_configuration: Оновити конфігурацію- status_configured_prefix: "%{summary}. Відвідайте"- accounts_tab: Рахунки- status_configured_suffix: вкладку для керування виявленими рахунками.not_configured: Не налаштовано.drawer_trust_statement_encryption_unconfigured: Доступ лише для читання. Sure ніколи не може переміщувати гроші. Перш ніж зберігати облікові дані постачальників у робочому середовищі, налаштуйте явні ключі шифрування.provider_setup_encryption_warning:diff --git a/config/locales/views/settings/vi.yml b/config/locales/views/settings/vi.ymlindex 0b5a41ea62..ef2f20ca37 100644--- a/config/locales/views/settings/vi.yml+++ b/config/locales/views/settings/vi.yml@@ -468,6 +468,12 @@ vi:not_found: Không tìm thấy nhà cung cấp.sync_provider_no_items: Không có kết nối nào để đồng bộ.ibkr_panel:+ add_connection: "Thêm kết nối Interactive Brokers"+ connection_name_label: "Tên kết nối"+ connection_name_placeholder: "vd: IBKR Ireland, IBKR Mỹ"+ disconnect: "Ngắt kết nối"+ disconnect_confirm_named: "Ngắt kết nối %{name}?"+ setup_accounts: "Thiết lập tài khoản"steps:step_1: 'Trong Client Portal IBKR, điều hướng đến "Hiệu suất & Báo cáo" > "Flex Queries".'step_2: 'Nhấn biểu tượng "+" trong phần "Activity Flex Query" để tạo truy vấn mới.'@@ -509,16 +515,11 @@ vi:all_other_options: 'Tất cả tùy chọn cấu hình khác: "Không"'report_window_note: "Báo cáo IBKR Flex bị giới hạn trong cửa sổ truy vấn bạn cấu hình trong IBKR. Sure sẽ nhập toàn bộ danh mục nắm giữ hiện tại cộng với tối đa 365 ngày hoạt động gần nhất từ báo cáo này."sync: Đồng bộ- disconnect_confirm: Ngắt kết nối Interactive Brokers?query_id_label: Query IDquery_id_placeholder_new: Nhập Query ID IBKR Flex của bạnquery_id_placeholder_existing: Để trống để giữ Query ID hiện tạitoken_label: Tokentoken_placeholder_new: Nhập Token dịch vụ web IBKR Flex của bạntoken_placeholder_existing: Để trống để giữ Token hiện tại- save_configuration: Lưu cấu hìnhupdate_configuration: Cập nhật cấu hình- status_configured_prefix: "%{summary}. Vào tab"- accounts_tab: Tài khoản- status_configured_suffix: để quản lý các tài khoản đã phát hiện.not_configured: Chưa cấu hình.diff --git a/config/locales/views/settings/zh-CN.yml b/config/locales/views/settings/zh-CN.ymlindex 1ff020e9d9..4fd0eb531b 100644--- a/config/locales/views/settings/zh-CN.yml+++ b/config/locales/views/settings/zh-CN.yml@@ -763,6 +763,12 @@ zh-CN:not_found: 未找到提供商。sync_provider_no_items: 没有可同步的连接。ibkr_panel:+ add_connection: "添加 Interactive Brokers 连接"+ connection_name_label: "连接名称"+ connection_name_placeholder: "例如:IBKR 爱尔兰、IBKR 美国"+ disconnect: "断开连接"+ disconnect_confirm_named: "要断开 %{name} 吗?"+ setup_accounts: "设置账户"steps:step_1: 在您的 IBKR Client Portal 中,前往“Performance & Reports” > “Flex Queries”。step_2: 在“Activity Flex Query”区域点击“+”图标创建一个新查询。@@ -804,18 +810,13 @@ zh-CN:all_other_options: 其他所有配置选项:“No”report_window_note: IBKR Flex reports 受您在 IBKR 中配置的查询窗口限制。Sure 将从此报告导入完整的当前持仓,以及最多最近 365 天的活动。sync: 同步- disconnect_confirm: 断开 Interactive Brokers?query_id_label: Query IDquery_id_placeholder_new: 输入您的 IBKR Flex Query IDquery_id_placeholder_existing: 留空以保留当前 Query IDtoken_label: Tokentoken_placeholder_new: 输入您的 IBKR Flex Web Service Tokentoken_placeholder_existing: 留空以保留当前 Token- save_configuration: 保存配置update_configuration: 更新配置- status_configured_prefix: "%{summary}。请访问"- accounts_tab: 账户- status_configured_suffix: 标签页以管理已发现的账户。not_configured: 未配置。akahu_panel:step_1_html: 前往 %{link} 并创建个人应用。diff --git a/config/locales/views/settings/zh-TW.yml b/config/locales/views/settings/zh-TW.ymlindex 45d12760f4..e222302e62 100644--- a/config/locales/views/settings/zh-TW.yml+++ b/config/locales/views/settings/zh-TW.yml@@ -561,6 +561,12 @@ zh-TW:not_found: 找不到供應商。sync_provider_no_items: 沒有可同步的連線。ibkr_panel:+ add_connection: "新增 Interactive Brokers 連線"+ connection_name_label: "連線名稱"+ connection_name_placeholder: "例如:IBKR 愛爾蘭、IBKR 美國"+ disconnect: "中斷連線"+ disconnect_confirm_named: "要中斷 %{name} 的連線嗎?"+ setup_accounts: "設定帳戶"steps:step_1: 在您的 IBKR Client Portal 中,前往「Performance & Reports」>「Flex Queries」。step_2: 點選「Activity Flex Query」區塊中的「+」圖示,建立一個新查詢。@@ -602,18 +608,13 @@ zh-TW:all_other_options: 其他所有設定選項:「No」report_window_note: IBKR Flex 報表的範圍受限於您在 IBKR 設定的查詢區間。Sure 會從這份報表匯入完整的目前持股,以及最多近 365 天的活動。sync: 同步- disconnect_confirm: 要中斷 Interactive Brokers 連線嗎?query_id_label: Query IDquery_id_placeholder_new: 輸入您的 IBKR Flex Query IDquery_id_placeholder_existing: 留白即維持目前的 Query IDtoken_label: 權杖 (Token)token_placeholder_new: 輸入您的 IBKR Flex Web Service Tokentoken_placeholder_existing: 留白即維持目前的 Token- save_configuration: 儲存設定update_configuration: 更新設定- status_configured_prefix: '%{summary}。請前往'- accounts_tab: 帳戶管理- status_configured_suffix: 分頁管理已偵測到的帳戶。not_configured: 尚未設定。trading212_panel:steps:diff --git a/test/controllers/accounts_controller_test.rb b/test/controllers/accounts_controller_test.rbindex 5c83ad3ea3..207531d26a 100644--- a/test/controllers/accounts_controller_test.rb+++ b/test/controllers/accounts_controller_test.rb@@ -70,6 +70,18 @@ class AccountsControllerTest < ActionDispatch::IntegrationTestassert_select "##{dom_id(kraken_item)}"end+ test "index titles each ibkr connection with its own name" do+ first = ibkr_items(:configured_item)+ first.update!(name: "IBKR Ireland")+ second = @user.family.ibkr_items.create!(name: "IBKR US", query_id: "Q2", token: "T2")++ get accounts_url++ assert_response :success+ assert_select "##{dom_id(first)}", text: /IBKR Ireland/+ assert_select "##{dom_id(second)}", text: /IBKR US/+ end+test "index renders on-chain wallet items" doregister_fake_chain!item = create_onchain_wallet_item(family: @user.family)diff --git a/test/controllers/ibkr_items_controller_test.rb b/test/controllers/ibkr_items_controller_test.rbindex d76d54c4f7..c1750650bf 100644--- a/test/controllers/ibkr_items_controller_test.rb+++ b/test/controllers/ibkr_items_controller_test.rb@@ -143,4 +143,72 @@ class IbkrItemsControllerTest < ActionDispatch::IntegrationTestassert_select "turbo-frame#modal turbo-stream[action=redirect][target=?]", settings_providers_pathassert_equal I18n.t("ibkr_items.select_accounts.not_configured"), flash[:alert]end++ test "create adds a second connection with a unique default name" do+ assert_difference "@user.family.ibkr_items.count", 1 do+ post ibkr_items_url, params: { ibkr_item: { query_id: "QUERY2", token: "TOKEN2" } }+ end++ assert_redirected_to accounts_path+ assert_equal "Interactive Brokers 2", @user.family.ibkr_items.order(:created_at).last.name+ end++ test "create keeps the connection name the user typed" do+ post ibkr_items_url, params: { ibkr_item: { name: "IBKR Ireland", query_id: "QUERY2", token: "TOKEN2" } }++ assert @user.family.ibkr_items.exists?(name: "IBKR Ireland")+ end++ test "update renames a connection and keeps credentials when left blank" do+ patch ibkr_item_url(@ibkr_item), params: { ibkr_item: { name: "IBKR US", query_id: "", token: "" } }++ @ibkr_item.reload+ assert_equal "IBKR US", @ibkr_item.name+ assert_equal "QUERY123", @ibkr_item.query_id+ assert_equal "TOKEN123", @ibkr_item.token+ end++ test "update with a blank name keeps the current name" do+ patch ibkr_item_url(@ibkr_item), params: { ibkr_item: { name: "", query_id: "", token: "" } }++ assert_equal "Interactive Brokers", @ibkr_item.reload.name+ end++ test "select_accounts opens the connection given by ibkr_item_id" do+ second = @user.family.ibkr_items.create!(name: "IBKR Ireland", query_id: "Q2", token: "T2")++ get select_accounts_ibkr_items_url(ibkr_item_id: second.id)++ assert_redirected_to setup_accounts_ibkr_item_path(second)+ end++ test "select_existing_account only lists accounts from the chosen connection" do+ second = @user.family.ibkr_items.create!(name: "IBKR US", query_id: "Q2", token: "T2")+ other = second.ibkr_accounts.create!(name: "US IBKR", ibkr_account_id: "U7654321", currency: "USD")++ get select_existing_account_ibkr_items_url, params: { account_id: accounts(:investment).id, ibkr_item_id: second.id }++ assert_response :success+ assert_includes response.body, other.name+ assert_not_includes response.body, ibkr_accounts(:main_account).name+ end++ test "invalid create keeps the typed connection name but never the credentials" do+ post ibkr_items_url,+ params: { ibkr_item: { name: "IBKR Ireland", query_id: "", token: "SECRET-TOKEN" } },+ as: :turbo_stream++ assert_turbo_stream status: :unprocessable_entity, action: "replace", target: "ibkr-providers-panel"+ assert_includes response.body, 'value="IBKR Ireland"'+ assert_not_includes response.body, "SECRET-TOKEN"+ end++ test "select_existing_account skips connections scheduled for deletion" do+ @ibkr_item.update!(scheduled_for_deletion: true)++ get select_existing_account_ibkr_items_url, params: { account_id: accounts(:investment).id }++ assert_response :success+ assert_not_includes response.body, ibkr_accounts(:main_account).name+ endenddiff --git a/test/controllers/settings/providers_controller_test.rb b/test/controllers/settings/providers_controller_test.rbindex f3d1e51c47..5520b180e4 100644--- a/test/controllers/settings/providers_controller_test.rb+++ b/test/controllers/settings/providers_controller_test.rb@@ -721,6 +721,18 @@ class Settings::ProvidersControllerTest < ActionDispatch::IntegrationTestassert_match(/Query ID/i, response.body)end+ test "GET connect_form lists every Interactive Brokers connection" do+ families(:dylan_family).ibkr_items.create!(name: "IBKR Ireland", query_id: "Q1", token: "T1")+ families(:dylan_family).ibkr_items.create!(name: "IBKR US", query_id: "Q2", token: "T2")++ get connect_form_settings_providers_path(provider_key: "ibkr")++ assert_response :success+ assert_includes response.body, "IBKR Ireland"+ assert_includes response.body, "IBKR US"+ assert_includes response.body, I18n.t("settings.providers.ibkr_panel.add_connection")+ end+test "GET connect_form warns when self-hosted encryption keys are not explicitly configured" dowith_self_hosting doActiveRecordEncryptionConfig.stubs(:explicitly_configured?).returns(false)diff --git a/test/models/provider/ibkr_adapter_test.rb b/test/models/provider/ibkr_adapter_test.rbnew file mode 100644index 0000000000..9f400fe772--- /dev/null+++ b/test/models/provider/ibkr_adapter_test.rb@@ -0,0 +1,42 @@+require "test_helper"++class Provider::IbkrAdapterTest < ActiveSupport::TestCase+ test "returns a single generic connection config with one ibkr item" do+ family = families(:dylan_family)++ configs = Provider::IbkrAdapter.connection_configs(family: family)++ assert_equal 1, configs.length+ assert_equal "ibkr", configs.first[:key]+ assert_equal I18n.t("providers.ibkr.name"), configs.first[:name]+ assert_equal Rails.application.routes.url_helpers.select_accounts_ibkr_items_path,+ configs.first[:new_account_path].call("Investment", nil)+ end++ test "returns one connection config per credentialed ibkr item" do+ family = families(:dylan_family)+ first_item = ibkr_items(:configured_item)+ second_item = family.ibkr_items.create!(name: "IBKR Ireland", query_id: "Q2", token: "T2")++ configs = Provider::IbkrAdapter.connection_configs(family: family)++ assert_equal 2, configs.length+ assert_equal [ "ibkr_#{first_item.id}", "ibkr_#{second_item.id}" ].sort, configs.map { |c| c[:key] }.sort++ second_config = configs.find { |c| c[:key] == "ibkr_#{second_item.id}" }+ assert_equal I18n.t("providers.ibkr.named_connection", name: "IBKR Ireland"), second_config[:name]+ assert_equal Rails.application.routes.url_helpers.select_accounts_ibkr_items_path(ibkr_item_id: second_item.id),+ second_config[:new_account_path].call("Investment", nil)+ assert_equal Rails.application.routes.url_helpers.select_existing_account_ibkr_items_path(account_id: "acc-1", ibkr_item_id: second_item.id),+ second_config[:existing_account_path].call("acc-1")+ end++ test "ignores items scheduled for deletion" do+ family = families(:dylan_family)+ family.ibkr_items.create!(name: "Old IBKR", query_id: "Q2", token: "T2", scheduled_for_deletion: true)++ configs = Provider::IbkrAdapter.connection_configs(family: family)++ assert_equal [ "ibkr" ], configs.map { |c| c[:key] }+ end+end