Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #1567 fix translation #1574

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ PATH
rqrcode (~> 2.0)
searchkick (~> 5.1)
simple_calendar (~> 2.4)
spree (>= 4.5.0)
spree_api_v1 (>= 4.5.0)
spree_auth_devise (>= 4.5.0)
spree_backend (>= 4.5.0)
spree (~> 4.5.0)
spree_api_v1 (~> 4.5.0)
spree_auth_devise (~> 4.5.0)
spree_backend (~> 4.5.0)
spree_extension
spree_multi_vendor (>= 2.4.1)
telegram-bot
Expand Down Expand Up @@ -719,7 +719,7 @@ GEM
responders
spree (>= 4.4.0.rc1)
spree_extension
spree_auth_devise (4.6.0)
spree_auth_devise (4.5.0)
devise (~> 4.7)
devise-encryptable (= 0.2.0)
spree_core (>= 4.5.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module SpreeCmCommissioner
class SubscriptionOrderExecutorJob < ApplicationJob
def perform
SubscriptionsOrderCronExecutor.call
logger.info 'SubscriptionOrderExecutorJob done'
logger.debug { 'My args: tykeaboyloy' }
end
end
end
4 changes: 2 additions & 2 deletions app/views/spree/billing/businesses/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<% content_for :page_title do %>
<%= @businesses_taxonomy&.name %>
<%= I18n.t('spree.billing.businesses') %>
<% end %>

<% content_for :page_actions do %>
<%= button_link_to Spree.t('billing.businesses.add_new_business'), spree.new_billing_business_path(), icon: 'add.svg', class: 'no-wrap btn btn-success align-self-center' %>
<%= button_link_to I18n.t('spree.billing.add_new_business'), spree.new_billing_business_path(), icon: 'add.svg', class: 'no-wrap btn btn-success align-self-center' %>
<% end %>


Expand Down
8 changes: 4 additions & 4 deletions app/views/spree/billing/customers/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<%= f.error_message_on :email %>
<% end %>
<%= f.field_container :first_name do %>
<%= f.label :first_name, Spree.t(:business_name) %>
<%= f.label :first_name, Spree.t('billing.business_name') %>
<%= f.text_field :first_name, class: 'form-control' %>
<%= f.error_message_on :first_name %>
<% end %>
<%= f.field_container :last_name do %>
<%= f.label :last_name, Spree.t(:owner_name) %>
<%= f.label :last_name, Spree.t('billing.owner_name') %>
<%= f.text_field :last_name, class: 'form-control' %>
<%= f.error_message_on :last_name %>
<% end %>
<%= f.field_container :place_id do %>
<%= f.label :place_id, Spree.t(:place) %>
<%= f.label :place_id, Spree.t('billing.places') %>
<%= f.collection_select(:place_id, SpreeCmCommissioner::Place.all, :id, :name, { include_blank: true }, { class: 'select2-clear' }) %>
<%= f.error_message_on :location %>
<% end %>
Expand All @@ -27,7 +27,7 @@
<% end %>
<%= f.hidden_field :vendor_id, value: current_vendor.id %>
<%= f.field_container :taxons do %>
<%= f.label :taxon_ids, Spree.t('businesses') %>
<%= f.label :taxon_ids, Spree.t('billing.businesses') %>
<%= f.collection_select(:taxon_ids, @businesses, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2', multiple: true })%>
<%= f.error_message_on :taxon_ids %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/billing/customers/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<%= sort_link @search, :id, Spree.t(:id), {}, {title:"id_title"} %>
</th>
<th>
<%= sort_link @search, :full_name, Spree.t(:business_name), {}, {title: 'fullname_title'} %>
<%= sort_link @search, :full_name, I18n.t("spree.billing.business_name"), {}, {title: 'fullname_title'} %>
</th>
<th>
<%= sort_link @search, :full_name, Spree.t(:full_name), {}, {title: 'fullname_title'} %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/billing/option_types/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% content_for :page_title do %>
<%= plural_resource_name(Spree::OptionType) %>
<%= Spree.t('option_type') %>
<% end %>

<% content_for :page_actions do %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/billing/payments/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<table class="table border rounded" id='payments' data-order-id='<%= @order.number %>'>
<thead class="text-muted">
<tr data-hook="payments_header">
<th><%= Spree::Payment.human_attribute_name(:number) %></th>
<th><%= I18n.t(:number, scope: 'activerecord.attributes.spree/payment') %></th>
<th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
<th class="text-center"><%= Spree.t(:amount) %></th>
<th class="text-center"><%= Spree.t(:payment_method) %></th>
Expand Down
6 changes: 3 additions & 3 deletions app/views/spree/billing/places/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% end %>

<% content_for :page_actions do %>
<%= button_link_to Spree.t(:new_place), new_billing_place_path, { class: "btn-success", icon: 'add.svg', id: 'admin_new_place' } %>
<%= button_link_to I18n.t('spree.billing.new_place'), new_billing_place_path, { class: "btn-success", icon: 'add.svg', id: 'admin_new_place' } %>
<% end if can?(:create, SpreeCmCommissioner::Place) %>

<% content_for :table_filter do %>
Expand Down Expand Up @@ -37,8 +37,8 @@
<tr data-hook="admin_places_index_headers">
<th><%= sort_link @search,:name, Spree.t(:name), { default_order: "desc" }, {title: 'admin_places_listing_name_title'} %></th>
<th><%= sort_link @search,:code, Spree.t(:code), { default_order: "desc" }, {title: 'admin_places_listing_code_title'} %></th>
<th><%= sort_link @search,:updated_at, Spree.t(:updated_at), { default_order: "desc" }, {title: 'admin_places_listing_updated_at_title'} %></th>
<th><%= sort_link @search,:created_at, Spree.t(:created_at), { default_order: "desc" }, {title: 'admin_places_listing_created_at_title'} %></th>
<th><%= sort_link @search,:updated_at, I18n.t(:updated_at, scope: 'activerecord.attributes.spree/order'), { default_order: "desc" }, {title: 'admin_places_listing_updated_at_title'} %></th>
<th><%= sort_link @search,:created_at, I18n.t(:created_at, scope: 'activerecord.attributes.spree/order'), { default_order: "desc" }, {title: 'admin_places_listing_created_at_title'} %></th>
<th class="text-center" data-hook="admin_places_index_header_actions" class="actions"></th>
</tr>
</thead>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/billing/places/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% content_for :page_title do %>
<%= page_header_back_button spree.billing_places_path %>
<%= Spree.t(:new_place) %>
<%= Spree.t('billing.new_place') %>
<% end %>
<div data-hook="admin_user_new_form_header">
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @object } %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/billing/shared/sub_menu/_setting.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<% if spree_current_user.has_spree_role?('admin') || spree_current_user.permissions.exists?(entry: 'spree/billing/roles') %>
<%= configurations_sidebar_menu_item(I18n.t('spree.billing.roles'), billing_roles_url) %>
<% end %>
<%= tab :vendor, selected: request.path.include?('/vendors'), url: edit_billing_vendor_url(@current_vendor.id), label: Spree.t('billing.vendor') %>
<%= tab :vendor, selected: request.path.include?('/vendors'), url: edit_billing_vendor_url(@current_vendor.id), label: I18n.t('spree.vendor') %>
</ul>
7 changes: 7 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,13 @@ en:
match_any: "Some line items must from selected age group"
match_all: "All line items must from selected age group"
billing:
owner_name: "Owner Name"
new_place: "New Place"
payment_date: "Payment Date"
new_order: "New Order"
businesses: "Businesses"
add_new_business: "Add New Business"
business_name: "Business Name"
places: "Places"
code: "code"
name: "name"
Expand Down Expand Up @@ -336,6 +341,8 @@ en:
show_invoices: "Show Invoices"
spree/report:
cashier: "Cashier"
spree/payment:
number: "Number"
errors:
models:
spree_cm_commissioner/service_calendar:
Expand Down
39 changes: 31 additions & 8 deletions config/locales/km.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,19 @@ km:
match_any: "Some line items must from selected age group"
match_all: "All line items must from selected age group"
billing:
code: "code"
name: "name"
logo: "logo"
payment_qrcode: "Payment QRCode"
image: "image"
order_line_items: "Order Line Items"
owner_name: "MISSING"
new_place: "MISSING"
new_order: "MISSING"
businesses: "MISSING"
add_new_business: "MISSING"
business_name: "MISSING"
places: "MISSING"
code: "MISSING"
name: "MISSING"
logo: "MISSING"
payment_qrcode: "MISSING"
image: "MISSING"
order_line_items: "MISSING"
new_role: "បង្កើតតួនាទីថ្មី"
role_id: "កូដតួនាទី"
settings: "ការកំណត់"
Expand All @@ -248,7 +255,11 @@ km:
balance_due_orders: "វិក្កយបត្រមិនទាន់បង់"
overdue_orders: "វិក្កយបត្រហួសថ្ងៃបង់"
orders: "វិក្កយបត្រ"
customers: "អតិថិជន"
customers:
re_create_order:
success: "Invoice Created"
fails: "Invoice for this month is already exist "
customers: "អតិថិជន"
roles: "តួនាទី"
subscriptions: "ការប្រើប្រាស់"
active_subscription: "កំពុងប្រើប្រាស់"
Expand All @@ -257,7 +268,8 @@ km:
users: "គណនីបុគ្គលិក"
day: "ថ្ងៃ"
products: "ទំនិញ"
vendor: "vendor"
account_name: "MISSING"
account_number: "MISSING"
payment_state:
paid: "បង់រួច"
balance_due: "មិនទាន់បង់"
Expand All @@ -281,10 +293,16 @@ km:
activerecord:
attributes:
spree/order:
product_type: "MISSING"
customer_name: "MISSING"
issued_date: "MISSING"
payment_date: "MISSING"
printing_date: "MISSING"
customer_id: "លេខកូដអតិថិជន"
to_date: "រហូតដល់ថ្ងៃ"
from_date: "ពីថ្ងៃ"
created_at: "បង្កើតនៅថ្ងៃ"
updated_at: "MISSING"
start_date: "ថ្ងៃចាប់ផ្តើម"
start_date_range: "ចន្លោះថ្ងៃចាប់ផ្តើម"
phone_number: "លេខទូរសព្ទ"
Expand All @@ -295,8 +313,13 @@ km:
type: "ប្រភេទ"
select_date: "ជ្រើសរើសថ្ងៃ"
taxon: "ប្រភេទ"
quantity: "MISSING"
amount: "MISSING"
show_invoices: "MISSING"
spree/report:
cashier: "អ្នកគិតលុយ"
spree/payment:
number: "MISSING"
errors:
models:
spree_cm_commissioner/service_calendar:
Expand Down
2 changes: 1 addition & 1 deletion spec/models/spree_cm_commissioner/customer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@
expect(variants_list2).to include(*customer2.variants)
end
end
end
end
4 changes: 2 additions & 2 deletions spree_cm_commissioner.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.require_path = 'lib'
s.requirements << 'none'

spree_opts = '>= 4.5.0'
spree_opts = '~> 4.5.0'
s.add_dependency 'spree', spree_opts
s.add_dependency 'spree_api_v1', spree_opts # latest spree_multi_vendor 2.4.0 still depends on the Spree v1 API
s.add_dependency 'spree_auth_devise', spree_opts
Expand Down Expand Up @@ -52,4 +52,4 @@ Gem::Specification.new do |s|
s.add_development_dependency 'pg'
s.add_development_dependency 'spree_dev_tools'
s.metadata['rubygems_mfa_required'] = 'true'
end
end
Loading