mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-03 04:25:21 +02:00
Start I18n Internationalization setup (#276)
* start internationalization_setup * add passwords views translations * add account views translations * fix translations * temporary disable i18n used key
This commit is contained in:
parent
64c8774867
commit
c8a659694d
33 changed files with 177 additions and 102 deletions
|
@ -1,4 +1,4 @@
|
|||
<h1 class="text-3xl font-semibold font-display">Add an account</h1>
|
||||
<h1 class="text-3xl font-semibold font-display"><%= t('.title')%></h1>
|
||||
|
||||
<% if params[:type].blank? || Account.accountable_types.include?("Account::#{params[:type]}") == false %>
|
||||
<div class="grid grid-cols-2 gap-4 mt-8 text-sm sm:grid-cols-3 md:grid-cols-4">
|
||||
|
@ -16,7 +16,7 @@
|
|||
<%= link_to new_account_path, class: "" do %>
|
||||
<%= inline_svg_tag('icon-arrow-left.svg', class: 'text-gray-500 fill-current') %>
|
||||
<% end %>
|
||||
<h2 class="text-2xl font-semibold font-display">Enter <%= params[:type] %> account</h2>
|
||||
<h2 class="text-2xl font-semibold font-display"><%= t('.enter_type_account', type: @account.accountable_class.model_name.human.downcase ) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_with model: @account, url: accounts_path, scope: :account, html: { class: "space-y-4" } do |f| %>
|
||||
|
@ -24,16 +24,17 @@
|
|||
|
||||
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
|
||||
<%# <span class="absolute px-2 py-1 text-xs font-medium text-gray-400 uppercase bg-gray-200 rounded-full opacity-50 right-3">Optional</span> %>
|
||||
<label for="account_name" class="block text-sm font-medium opacity-50 focus-within:opacity-100">Name</label>
|
||||
<%= f.text_field :name, placeholder: "Account name", required: 'required', class: "p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
|
||||
<%= f.label :name, class: 'block text-sm font-medium opacity-50 focus-within:opacity-100' %>
|
||||
<%= f.text_field :name, placeholder: t('.account_name_placeholder'), required: 'required', class: "p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
|
||||
</div>
|
||||
|
||||
<%= render "accounts/#{permitted_accountable_partial(@account.accountable_type)}", f: f %>
|
||||
|
||||
<div class="relative p-4 border border-gray-100 bg-offwhite rounded-xl focus-within:bg-white focus-within:shadow focus-within:opacity-100">
|
||||
<label for="account_balance" class="block text-sm font-medium opacity-50 focus-within:opacity-100">Balance</label>
|
||||
|
||||
<%= f.label :balance, class: 'block text-sm font-medium opacity-50 focus-within:opacity-100' %>
|
||||
<div class="flex">
|
||||
<%= f.number_field :balance, placeholder: "$0.00", in: 0.00..100000000.00, step: :any, required: 'required', class: "p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
|
||||
<%= f.number_field :balance, placeholder: number_to_currency(0), in: 0.00..100000000.00, required: 'required', class: "p-0 mt-1 bg-transparent border-none opacity-50 focus:outline-none focus:ring-0 focus-within:opacity-100" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue