Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix(ds): resolve remaining DS Drift Patrol findings (#2157) (#2977)

William Wei Mingd2eab1c9c7f1
diff --git a/app/components/DS/tag_select.html.erb b/app/components/DS/tag_select.html.erb
index de5fd55057..cfbdd7286d 100644
--- a/app/components/DS/tag_select.html.erb
+++ b/app/components/DS/tag_select.html.erb
@@ -37,14 +37,16 @@
<% unless disabled %>
<div class="absolute z-50 p-1.5 w-full min-w-32 rounded-lg shadow-lg shadow-border-xs bg-container mt-1.5 transition duration-150 ease-out -translate-y-1 opacity-0 hidden"
data-tag-select-target="menu">
- <div class="relative flex items-center bg-container border border-secondary rounded-lg mb-1">
- <input type="search"
- placeholder="<%= helpers.t("transactions.form.tag_search_placeholder") %>"
- autocomplete="off"
- class="bg-container text-primary text-sm placeholder:text-secondary font-normal h-10 pl-10 w-full border-none rounded-lg focus:outline-hidden focus:ring-0"
- data-tag-select-target="search"
- data-action="input->tag-select#filter keydown->tag-select#handleSearchKeydown">
- <%= helpers.icon("search", class: "absolute inset-0 ml-2 transform top-1/2 -translate-y-1/2") %>
+ <div class="flex items-center bg-container border border-secondary rounded-lg mb-1 focus-ring-within transition-shadow">
+ <%= render DS::SearchInput.new(
+ variant: :embedded,
+ class: "flex-1 min-w-0",
+ placeholder: helpers.t("transactions.form.tag_search_placeholder"),
+ data: {
+ tag_select_target: "search",
+ action: "input->tag-select#filter keydown->tag-select#handleSearchKeydown"
+ }
+ ) %>
</div>
<div class="flex flex-col gap-1 max-h-64 overflow-auto"
diff --git a/app/views/akahu_items/setup_accounts.html.erb b/app/views/akahu_items/setup_accounts.html.erb
index 7a7798e2c3..2007533d00 100644
--- a/app/views/akahu_items/setup_accounts.html.erb
+++ b/app/views/akahu_items/setup_accounts.html.erb
@@ -9,11 +9,12 @@
<% end %>
<% dialog.with_body do %>
- <%= form_with url: complete_account_setup_akahu_item_path(@akahu_item),
- method: :post,
- local: true,
- data: { turbo_frame: "_top" },
- class: "space-y-6" do %>
+ <%= styled_form_with url: complete_account_setup_akahu_item_path(@akahu_item),
+ method: :post,
+ scope: :account_types,
+ local: true,
+ data: { turbo_frame: "_top" },
+ class: "space-y-6" do |form| %>
<div class="space-y-4">
<% if @api_error.present? %>
<div class="p-8 flex flex-col gap-3 items-center justify-center text-center">
@@ -42,11 +43,12 @@
</p>
</div>
- <%= label_tag "account_types[#{akahu_account.id}]", t(".account_type_label"),
- class: "block text-sm font-medium text-primary mb-2" %>
- <%= select_tag "account_types[#{akahu_account.id}]",
- options_for_select(@account_type_options, @akahu_account_type_suggestions.fetch(akahu_account.id, "skip")),
- class: "appearance-none bg-container border border-primary rounded-md px-3 py-2 text-sm leading-6 text-primary focus:border-primary focus:ring-1 focus:ring-primary focus:outline-none w-full" %>
+ <%= form.select akahu_account.id,
+ @account_type_options,
+ {
+ label: t(".account_type_label"),
+ selected: @akahu_account_type_suggestions.fetch(akahu_account.id, "skip")
+ } %>
</div>
<% end %>
<% end %>
diff --git a/app/views/enable_banking_items/select_bank.html.erb b/app/views/enable_banking_items/select_bank.html.erb
index 73010080da..330490f6ea 100644
--- a/app/views/enable_banking_items/select_bank.html.erb
+++ b/app/views/enable_banking_items/select_bank.html.erb
@@ -1,11 +1,11 @@
<%= turbo_frame_tag "modal" do %>
<%= render DS::Dialog.new do |dialog| %>
- <% dialog.with_header(title: t(".title", default: "Select Your Bank")) %>
+ <% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<div class="space-y-4" data-controller="bank-search">
<p class="text-sm text-secondary">
- <%= t(".description", default: "Choose the bank you want to connect to your account.") %>
+ <%= t(".description") %>
</p>
<% if @error_message.present? %>
@@ -15,16 +15,15 @@
<% end %>
<% if @aspsps.present? %>
- <%# Search input — filters list client-side via Stimulus %>
- <input
- type="text"
- placeholder="<%= t(".search_placeholder", default: "Search for your bank...") %>"
- data-bank-search-target="input"
- data-action="input->bank-search#filter"
- class="w-full px-3 py-2 text-sm rounded-md border border-primary bg-container-inset text-primary placeholder:text-secondary focus:outline-none focus:ring-1 focus:ring-primary"
- autocomplete="off"
- aria-label="<%= t(".search_label", default: "Search for your bank") %>"
- autofocus>
+ <%= render DS::SearchInput.new(
+ placeholder: t(".search_placeholder"),
+ aria_label: t(".search_label"),
+ autofocus: true,
+ data: {
+ bank_search_target: "input",
+ action: "input->bank-search#filter"
+ }
+ ) %>
<div class="space-y-2 max-h-80 overflow-y-auto">
<% @aspsps.each do |aspsp| %>
@@ -45,7 +44,7 @@
<div class="flex items-center gap-2 flex-wrap">
<p class="font-medium text-sm text-primary"><%= aspsp[:name] %></p>
<% if aspsp[:beta] %>
- <%= render DS::Pill.new(label: t(".beta_label", default: "Beta"), tone: :warning, marker: false) %>
+ <%= render DS::Pill.new(label: t(".beta_label"), tone: :warning, marker: false) %>
<% end %>
</div>
<% if aspsp[:bic].present? %>
@@ -57,19 +56,19 @@
</div>
<% end %>
<div data-bank-search-target="emptyState" class="hidden py-4 text-center text-sm text-secondary">
- <%= t(".no_search_results", default: "No banks match your search.") %>
+ <%= t(".no_search_results") %>
</div>
</div>
<% else %>
<div class="text-center py-8">
- <p class="text-secondary"><%= t(".no_banks", default: "No banks available for this country.") %></p>
- <p class="text-sm text-secondary mt-2"><%= t(".check_country", default: "Please check your country code setting.") %></p>
+ <p class="text-secondary"><%= t(".no_banks") %></p>
+ <p class="text-sm text-secondary mt-2"><%= t(".check_country") %></p>
</div>
<% end %>
<div class="flex justify-end pt-4">
<%= render DS::Link.new(
- text: t(".cancel", default: "Cancel"),
+ text: t(".cancel"),
variant: :secondary,
href: settings_providers_path,
data: { turbo_frame: "_top", action: "DS--dialog#close" }
diff --git a/app/views/goals/_status_callout.html.erb b/app/views/goals/_status_callout.html.erb
index a8118fbc97..5de6a34e37 100644
--- a/app/views/goals/_status_callout.html.erb
+++ b/app/views/goals/_status_callout.html.erb
@@ -29,6 +29,6 @@
<div class="rounded-lg border px-3 py-2 text-sm flex items-center gap-2 text-primary <%= variant_classes %>">
<span class="shrink-0"><%= icon(icon_glyph, size: "sm", color: icon_color) %></span>
<span class="font-medium"><%= label %></span>
- <span class="opacity-60">·</span>
+ <span class="opacity-60" aria-hidden="true"><%= t("shared.dot_separator") %></span>
<span class="opacity-90 <%= "privacy-sensitive" if goal.status == :behind %>"><%= context %></span>
</div>
diff --git a/app/views/goals/index.html.erb b/app/views/goals/index.html.erb
index 10d326a240..48c6c5ead3 100644
--- a/app/views/goals/index.html.erb
+++ b/app/views/goals/index.html.erb
@@ -125,7 +125,7 @@
horizontally when the column is too narrow for all six chips,
rather than wrapping "On track" mid-label or forcing the row
wider than the viewport. %>
- <%= render DS::SegmentedControl.new(aria_label: t(".chips_aria", default: "Filter goals by status"), class: "overflow-x-auto max-w-full") do |sc| %>
+ <%= render DS::SegmentedControl.new(aria_label: t(".chips_aria"), class: "overflow-x-auto max-w-full") do |sc| %>
<% %w[all on_track behind no_target_date paused completed].each do |status| %>
<% sc.with_segment(t(".chips.#{status}"),
active: status == "all",
@@ -143,7 +143,7 @@
<% if @grid_goals.any? %>
<div class="flex items-center gap-1.5 mb-4 text-[11px] font-medium uppercase tracking-wide text-secondary">
<span><%= t(".ongoing_section.heading") %></span>
- <span class="text-subdued">·</span>
+ <span class="text-subdued" aria-hidden="true"><%= t("shared.dot_separator") %></span>
<span class="tabular-nums" data-goals-filter-target="count"><%= @grid_goals.size %></span>
</div>
<div class="grid grid-cols-1 @2xl:grid-cols-2 @5xl:grid-cols-3 gap-3.5" data-goals-filter-target="grid">
@@ -182,7 +182,7 @@
<span class="inline-flex items-center gap-1.5 mb-4 text-[11px] font-medium uppercase tracking-wide text-secondary">
<span class="text-subdued group-open:rotate-90 motion-safe:transition-transform"><%= icon("chevron-right", size: "sm") %></span>
<span><%= t(".archived_section.heading") %></span>
- <span class="text-subdued">·</span>
+ <span class="text-subdued" aria-hidden="true"><%= t("shared.dot_separator") %></span>
<span class="tabular-nums"><%= @archived_goals.size %></span>
</span>
<% end %>
diff --git a/app/views/imports/_pdf_import.html.erb b/app/views/imports/_pdf_import.html.erb
index 06f2a6e0ef..f9e23e10b3 100644
--- a/app/views/imports/_pdf_import.html.erb
+++ b/app/views/imports/_pdf_import.html.erb
@@ -9,8 +9,8 @@
</div>
<div class="text-center space-y-2">
- <h1 class="font-medium text-primary text-center text-3xl"><%= t("imports.pdf_import.ready_for_review_title", default: "Ready for Review") %></h1>
- <p class="text-sm text-secondary"><%= t("imports.pdf_import.ready_for_review_description", default: "We extracted %{count} transactions from your statement. Review and publish them to add to your account.", count: import.rows_count) %></p>
+ <h1 class="font-medium text-primary text-center text-3xl"><%= t("imports.pdf_import.ready_for_review_title") %></h1>
+ <p class="text-sm text-secondary"><%= t("imports.pdf_import.ready_for_review_description", count: import.rows_count) %></p>
</div>
<div class="bg-container border border-primary rounded-xl p-4 space-y-4">
@@ -26,34 +26,39 @@
<div class="space-y-2">
<h2 class="font-medium text-primary"><%= t("imports.pdf_import.document_type_label") %></h2>
<p class="text-sm text-secondary px-3 py-2 bg-container-inset rounded-lg">
- <%= t("imports.document_types.#{import.document_type}", default: import.document_type&.humanize || t("imports.pdf_import.unknown_document_type", default: "Unknown")) %>
+ <%# PDF document_type is AI-derived and not constrained to Import::DOCUMENT_TYPES;
+ unknown values should be shown as the localized fallback rather
+ than exposing an untranslated/internal enum string. %>
+ <%= t("imports.document_types.#{import.document_type}", default: t("imports.pdf_import.unknown_document_type")) %>
</p>
</div>
<div class="space-y-2">
- <h2 class="font-medium text-primary"><%= t("imports.pdf_import.transactions_extracted", default: "Transactions Extracted") %></h2>
+ <h2 class="font-medium text-primary"><%= t("imports.pdf_import.transactions_extracted") %></h2>
<p class="text-sm text-secondary px-3 py-2 bg-container-inset rounded-lg">
- <%= t("imports.pdf_import.transactions_extracted_count", count: import.rows_count, default: "%{count} transactions") %>
+ <%= t("imports.pdf_import.transactions_extracted_count", count: import.rows_count) %>
</p>
</div>
<div class="space-y-2">
- <h2 class="font-medium text-primary"><%= t("imports.pdf_import.select_account", default: "Import to Account") %></h2>
- <%= form_with model: import, scope: :import, url: import_path(import), method: :patch, class: "space-y-2" do |f| %>
+ <h2 id="pdf-import-select-account" class="font-medium text-primary"><%= t("imports.pdf_import.select_account") %></h2>
+ <%= styled_form_with model: import, scope: :import, url: import_path(import), method: :patch, class: "space-y-2" do |f| %>
<% accounts = Current.user.accessible_accounts.manual.alphabetically.pluck(:name, :id) %>
<% if accounts.any? %>
- <%= f.select :account_id, options_for_select(accounts, import.account_id), { include_blank: t("imports.pdf_import.select_account_placeholder", default: "Select an account...") }, class: "form-field__input" %>
+ <%= f.select :account_id, accounts,
+ { include_blank: t("imports.pdf_import.select_account_placeholder"), selected: import.account_id, label: false },
+ { "aria-labelledby": "pdf-import-select-account" } %>
<% if import.account.nil? %>
- <p class="text-xs text-secondary"><%= t("imports.pdf_import.select_account_hint", default: "Choose which account to import these transactions into.") %></p>
+ <p class="text-xs text-secondary"><%= t("imports.pdf_import.select_account_hint") %></p>
<% end %>
<% else %>
<p class="text-sm text-secondary px-3 py-2 bg-warning/10 rounded-lg">
- <%= t("imports.pdf_import.no_accounts", default: "No accounts available. Please create an account first.") %>
+ <%= t("imports.pdf_import.no_accounts") %>
</p>
- <%= render DS::Link.new(text: t("imports.pdf_import.create_account", default: "Create Account"), href: new_account_path(return_to: import_path(import)), variant: "primary", full_width: true, frame: :modal) %>
+ <%= render DS::Link.new(text: t("imports.pdf_import.create_account"), href: new_account_path(return_to: import_path(import)), variant: "primary", full_width: true, frame: :modal) %>
<% end %>
<% if accounts.any? %>
- <%= f.submit t("imports.pdf_import.save_account", default: "Save"), class: "w-full font-medium text-sm px-3 py-2 rounded-lg text-inverse bg-inverse hover:bg-inverse-hover" %>
+ <%= f.submit t("imports.pdf_import.save_account") %>
<% end %>
<% end %>
</div>
@@ -61,12 +66,18 @@
<div class="space-y-2 flex flex-col">
<% if import.publishable? %>
- <%= button_to t("imports.pdf_import.publish_transactions", default: "Publish %{count} Transactions", count: import.rows_count), publish_import_path(import), method: :post, class: "w-full font-medium text-sm px-3 py-2 rounded-lg text-inverse bg-inverse hover:bg-inverse-hover" %>
- <%= render DS::Link.new(text: t("imports.pdf_import.review_transactions", default: "Review Transactions"), href: import_clean_path(import), variant: "secondary", full_width: true) %>
+ <%= render DS::Button.new(
+ text: t("imports.pdf_import.publish_transactions", count: import.rows_count),
+ href: publish_import_path(import),
+ method: :post,
+ variant: :primary,
+ full_width: true
+ ) %>
+ <%= render DS::Link.new(text: t("imports.pdf_import.review_transactions"), href: import_clean_path(import), variant: "secondary", full_width: true) %>
<% elsif import.account.present? %>
- <%= render DS::Link.new(text: t("imports.pdf_import.review_transactions", default: "Review Transactions"), href: import_clean_path(import), variant: "primary", full_width: true) %>
+ <%= render DS::Link.new(text: t("imports.pdf_import.review_transactions"), href: import_clean_path(import), variant: "primary", full_width: true) %>
<% else %>
- <p class="text-center text-sm text-secondary"><%= t("imports.pdf_import.select_account_to_continue", default: "Please select an account above to continue.") %></p>
+ <p class="text-center text-sm text-secondary"><%= t("imports.pdf_import.select_account_to_continue") %></p>
<% end %>
<%= render DS::Link.new(text: t("imports.pdf_import.back_to_imports"), href: imports_path, variant: "secondary", full_width: true) %>
</div>
@@ -101,7 +112,13 @@
<div class="space-y-2 flex flex-col">
<%= render DS::Link.new(text: t("imports.pdf_import.try_again"), href: new_import_path, variant: "primary", full_width: true) %>
- <%= button_to t("imports.pdf_import.delete_import"), import_path(import), method: :delete, class: "w-full font-medium text-sm px-3 py-2 rounded-lg text-primary bg-surface-inset hover:bg-surface-inset-hover" %>
+ <%= render DS::Button.new(
+ text: t("imports.pdf_import.delete_import"),
+ href: import_path(import),
+ method: :delete,
+ variant: :secondary,
+ full_width: true
+ ) %>
</div>
<% elsif import.complete? && import.ai_processed? %>
@@ -127,7 +144,7 @@
<div class="space-y-2">
<h2 class="font-medium text-primary"><%= t("imports.pdf_import.document_type_label") %></h2>
<p class="text-sm text-secondary px-3 py-2 bg-container-inset rounded-lg">
- <%= t("imports.document_types.#{import.document_type}", default: import.document_type&.humanize || t("imports.pdf_import.unknown_document_type", default: "Unknown")) %>
+ <%= t("imports.document_types.#{import.document_type}", default: t("imports.pdf_import.unknown_document_type")) %>
</p>
</div>
@@ -145,7 +162,13 @@
<div class="space-y-2 flex flex-col">
<%= render DS::Link.new(text: t("imports.pdf_import.back_to_imports"), href: imports_path, variant: "primary", full_width: true) %>
- <%= button_to t("imports.pdf_import.delete_import"), import_path(import), method: :delete, class: "w-full font-medium text-sm px-3 py-2 rounded-lg text-primary bg-surface-inset hover:bg-surface-inset-hover" %>
+ <%= render DS::Button.new(
+ text: t("imports.pdf_import.delete_import"),
+ href: import_path(import),
+ method: :delete,
+ variant: :secondary,
+ full_width: true
+ ) %>
</div>
<% else %>
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
index ea6da081fc..f319db59b5 100644
--- a/app/views/sessions/new.html.erb
+++ b/app/views/sessions/new.html.erb
@@ -1,18 +1,11 @@
<% if @prefill_demo_credentials %>
- <div class="mb-4 rounded-lg border bg-blue-50 text-blue-700 border-blue-200 theme-dark:bg-blue-900/20 theme-dark:text-blue-400 theme-dark:border-blue-800 p-4" role="status" aria-live="polite">
- <div class="flex items-start gap-3">
- <div class="shrink-0">
- <%= icon "info", size: "sm", color: "blue-600" %>
- </div>
- <div class="flex-1 text-sm">
- <h3 class="font-semibold mb-1">
- <%= t(".demo_banner_title") %>
- </h3>
- <p>
- <%= t(".demo_banner_message") %>
- </p>
- </div>
- </div>
+ <div class="mb-4">
+ <%= render DS::Alert.new(
+ variant: :info,
+ title: t(".demo_banner_title"),
+ message: t(".demo_banner_message"),
+ live: :polite
+ ) %>
</div>
<% end %>
diff --git a/config/locales/views/goals/en.yml b/config/locales/views/goals/en.yml
index 15469ef823..cfe336a6c7 100644
--- a/config/locales/views/goals/en.yml
+++ b/config/locales/views/goals/en.yml
@@ -57,6 +57,7 @@ en:
empty_with_both: "No goals match \"%{query}\" with this filter."
clear_search: Clear search
show_all: Show all
+ chips_aria: Filter goals by status
chips:
all: All
on_track: On track
diff --git a/config/locales/views/shared/ca.yml b/config/locales/views/shared/ca.yml
index ad0c8427fa..66e3f7bd6e 100644
--- a/config/locales/views/shared/ca.yml
+++ b/config/locales/views/shared/ca.yml
@@ -5,6 +5,7 @@ ca:
redis_configured: Redis ja està configurat correctament! Ara pots configurar
la teva aplicació Sure.
shared:
+ dot_separator: "·"
cancel: Cancel·la
confirm_modal:
accept: Confirma
diff --git a/config/locales/views/shared/de.yml b/config/locales/views/shared/de.yml
index a672888d14..7dd3967f9b 100644
--- a/config/locales/views/shared/de.yml
+++ b/config/locales/views/shared/de.yml
@@ -29,6 +29,7 @@ de:
plural: Familien
singular: Familie
preview: Vorschau
+ dot_separator: "·"
require_admin: Das dürfen nur Admins
sync_toast:
message: Neue Daten verfügbar
diff --git a/config/locales/views/shared/en.yml b/config/locales/views/shared/en.yml
index 3ec0b37ea3..056cb521e2 100644
--- a/config/locales/views/shared/en.yml
+++ b/config/locales/views/shared/en.yml
@@ -5,6 +5,7 @@ en:
redis_configured: "Redis is now configured properly! You can now setup your Sure application."
shared:
preview: Preview
+ dot_separator: "·"
sync_toast:
message: "New data available"
refresh: "Refresh"
diff --git a/config/locales/views/shared/es.yml b/config/locales/views/shared/es.yml
index 4b3f5914fb..e03d67e0ca 100644
--- a/config/locales/views/shared/es.yml
+++ b/config/locales/views/shared/es.yml
@@ -1,6 +1,7 @@
---
es:
shared:
+ dot_separator: "·"
confirm_modal:
accept: Confirmar
body_html: "<p>No podrás deshacer esta decisión</p>"
diff --git a/config/locales/views/shared/fr.yml b/config/locales/views/shared/fr.yml
index 975646aae9..ed1652a138 100644
--- a/config/locales/views/shared/fr.yml
+++ b/config/locales/views/shared/fr.yml
@@ -4,6 +4,7 @@ fr:
self_hostable:
redis_configured: Redis est maintenant correctement configuré ! Vous pouvez maintenant configurer votre application Sure.
shared:
+ dot_separator: "·"
cancel: Annuler
confirm_modal:
accept: Confirmer
diff --git a/config/locales/views/shared/hu.yml b/config/locales/views/shared/hu.yml
index 8f0809e729..33191380c5 100644
--- a/config/locales/views/shared/hu.yml
+++ b/config/locales/views/shared/hu.yml
@@ -4,6 +4,7 @@ hu:
self_hostable:
redis_configured: "A Redis most megfelelően van konfigurálva! Mostantól beállíthatod a Sure alkalmazásodat."
shared:
+ dot_separator: "·"
confirm_modal:
accept: Megerősítés
body_html: "<p>Ezt a döntést nem tudod visszavonni</p>"
diff --git a/config/locales/views/shared/it.yml b/config/locales/views/shared/it.yml
index 82257a538e..c67223cb2f 100644
--- a/config/locales/views/shared/it.yml
+++ b/config/locales/views/shared/it.yml
@@ -4,6 +4,7 @@ it:
self_hostable:
redis_configured: "Redis è ora configurato correttamente! Puoi procedere con la configurazione della tua applicazione."
shared:
+ dot_separator: "·"
preview: Anteprima
sync_toast:
message: "Nuovi dati disponibili"
diff --git a/config/locales/views/shared/nb.yml b/config/locales/views/shared/nb.yml
index c4e6eb8b02..c305e44af8 100644
--- a/config/locales/views/shared/nb.yml
+++ b/config/locales/views/shared/nb.yml
@@ -1,6 +1,7 @@
---
nb:
shared:
+ dot_separator: "·"
confirm_modal:
accept: Bekreft
body_html: "<p>Du vil ikke kunne angre denne beslutningen</p>"
diff --git a/config/locales/views/shared/nl.yml b/config/locales/views/shared/nl.yml
index a63b576d01..8d4b294905 100644
--- a/config/locales/views/shared/nl.yml
+++ b/config/locales/views/shared/nl.yml
@@ -1,6 +1,7 @@
---
nl:
shared:
+ dot_separator: "·"
confirm_modal:
accept: Bevestigen
body_html: "<p>U kunt deze beslissing niet ongedaan maken</p>"
diff --git a/config/locales/views/shared/pl.yml b/config/locales/views/shared/pl.yml
index 03b5a73bff..e58b9c3222 100644
--- a/config/locales/views/shared/pl.yml
+++ b/config/locales/views/shared/pl.yml
@@ -1,6 +1,7 @@
---
pl:
shared:
+ dot_separator: "·"
confirm_modal:
accept: Potwierdź
body_html: "<p>Nie będzie można cofnąć tej decyzji</p>"
diff --git a/config/locales/views/shared/pt-BR.yml b/config/locales/views/shared/pt-BR.yml
index 73fc47727f..ab58eeee59 100644
--- a/config/locales/views/shared/pt-BR.yml
+++ b/config/locales/views/shared/pt-BR.yml
@@ -1,6 +1,7 @@
---
pt-BR:
shared:
+ dot_separator: "·"
confirm_modal:
accept: Confirmar
body_html: "<p>Você não poderá desfazer esta decisão</p>"
diff --git a/config/locales/views/shared/ro.yml b/config/locales/views/shared/ro.yml
index 9cb591e898..9e735bd9eb 100644
--- a/config/locales/views/shared/ro.yml
+++ b/config/locales/views/shared/ro.yml
@@ -1,6 +1,7 @@
---
ro:
shared:
+ dot_separator: "·"
confirm_modal:
accept: Confirmă
body_html: "<p>Nu vei putea anula această decizie</p>"
diff --git a/config/locales/views/shared/ru.yml b/config/locales/views/shared/ru.yml
index 5d1b926c07..c4c3f9cb85 100644
--- a/config/locales/views/shared/ru.yml
+++ b/config/locales/views/shared/ru.yml
@@ -5,6 +5,7 @@ ru:
redis_configured: Redis теперь настроен правильно! Вы можете настроить своё
приложение Sure.
shared:
+ dot_separator: "·"
cancel: Отмена
confirm_modal:
accept: Подтвердить
diff --git a/config/locales/views/shared/tr.yml b/config/locales/views/shared/tr.yml
index c96a048948..09579e0dd3 100644
--- a/config/locales/views/shared/tr.yml
+++ b/config/locales/views/shared/tr.yml
@@ -5,6 +5,7 @@ tr:
redis_configured: Redis artık düzgün şekilde yapılandırıldı! Artık Sure uygulamanızı
kurabilirsiniz.
shared:
+ dot_separator: "·"
cancel: İptal
confirm_modal:
accept: Onayla
diff --git a/config/locales/views/shared/uk.yml b/config/locales/views/shared/uk.yml
index cbfc98d9d7..a5a683e54f 100644
--- a/config/locales/views/shared/uk.yml
+++ b/config/locales/views/shared/uk.yml
@@ -4,6 +4,7 @@ uk:
redis_configured: "Redis тепер налаштовано правильно! Тепер ви можете налаштувати свою програму Sure."
shared:
preview: Попередній перегляд
+ dot_separator: "·"
sync_toast:
message: "Доступні нові дані"
refresh: "Оновити"
diff --git a/config/locales/views/shared/vi.yml b/config/locales/views/shared/vi.yml
index 358af1fccb..db485cb380 100644
--- a/config/locales/views/shared/vi.yml
+++ b/config/locales/views/shared/vi.yml
@@ -4,6 +4,7 @@ vi:
self_hostable:
redis_configured: "Redis đã được cấu hình đúng! Bây giờ bạn có thể thiết lập ứng dụng Sure của mình."
shared:
+ dot_separator: "·"
confirm_modal:
accept: Xác nhận
body_html: "<p>Bạn sẽ không thể hoàn tác quyết định này</p>"
diff --git a/config/locales/views/shared/zh-CN.yml b/config/locales/views/shared/zh-CN.yml
index 074022c1bf..5f2d3499f3 100644
--- a/config/locales/views/shared/zh-CN.yml
+++ b/config/locales/views/shared/zh-CN.yml
@@ -4,6 +4,7 @@ zh-CN:
self_hostable:
redis_configured: Redis 现已正确配置!您现在可以设置您的 Sure 应用了。
shared:
+ dot_separator: "·"
confirm_modal:
accept: 确认
body_html: "<p>此决定无法撤销</p>"
diff --git a/config/locales/views/shared/zh-TW.yml b/config/locales/views/shared/zh-TW.yml
index 585fc93be1..1b851025c3 100644
--- a/config/locales/views/shared/zh-TW.yml
+++ b/config/locales/views/shared/zh-TW.yml
@@ -4,6 +4,7 @@ zh-TW:
self_hostable:
redis_configured: Redis 已經設定好了!現在可以開始設定您的 Sure 應用程式。
shared:
+ dot_separator: "·"
preview: 預覽
sync_toast:
message: 有新資料可用
diff --git a/test/controllers/akahu_items_controller_test.rb b/test/controllers/akahu_items_controller_test.rb
index cd10280a86..7a3cec9fff 100644
--- a/test/controllers/akahu_items_controller_test.rb
+++ b/test/controllers/akahu_items_controller_test.rb
@@ -28,6 +28,11 @@ class AkahuItemsControllerTest < ActionDispatch::IntegrationTest
get setup_accounts_akahu_item_url(@akahu_item)
assert_response :success
+ select = css_select("select[name='account_types[#{@akahu_account.id}]']").first
+ assert select, "expected scoped account_types[#{@akahu_account.id}] select"
+ assert_equal 1, css_select("label[for='#{select['id']}']").size,
+ "label for= should match the generated select id"
+
selected_option = css_select("select[name='account_types[#{@akahu_account.id}]'] option[selected='selected']").first
assert_equal "Depository", selected_option["value"]