mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Use relative translation keys
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
%h5= t('admin.product_import.save.final_results')
|
||||
%h5= t('.final_results')
|
||||
%br
|
||||
|
||||
%div.post-save-results
|
||||
@@ -8,45 +8,45 @@
|
||||
%i.fa{ng: {class: "{'fa-info-circle': updates.products_created == 0, 'fa-check-circle': updates.products_created > 0}"}}
|
||||
%strong.created-count
|
||||
{{ updates.products_created }}
|
||||
= t('admin.product_import.save.products_created')
|
||||
= t('.products_created')
|
||||
|
||||
%p{ng: {show: 'updates.products_updated'}}
|
||||
%i.fa{ng: {class: "{'fa-info-circle': updates.products_updated == 0, 'fa-check-circle': updates.products_updated > 0}"}}
|
||||
%strong.updated-count
|
||||
{{ updates.products_updated }}
|
||||
= t('admin.product_import.save.products_updated')
|
||||
= t('.products_updated')
|
||||
|
||||
%p{ng: {show: 'updates.inventory_created'}}
|
||||
%i.fa{ng: {class: "{'fa-info-circle': updates.inventory_created == 0, 'fa-check-circle': updates.inventory_created > 0}"}}
|
||||
%strong.inv-created-count
|
||||
{{ updates.inventory_created }}
|
||||
= t('admin.product_import.save.inventory_created')
|
||||
= t('.inventory_created')
|
||||
|
||||
%p{ng: {show: 'updates.inventory_updated'}}
|
||||
%i.fa{ng: {class: "{'fa-info-circle': updates.inventory_updated == 0, 'fa-check-circle': updates.inventory_updated > 0}"}}
|
||||
%strong.inv-updated-count
|
||||
{{ updates.inventory_updated }}
|
||||
= t('admin.product_import.save.inventory_updated')
|
||||
= t('.inventory_updated')
|
||||
|
||||
%p{ng: {show: 'updates.products_reset'}}
|
||||
%i.fa.fa-info-circle
|
||||
%strong.reset-count
|
||||
{{ updates.products_reset }}
|
||||
- if @import_into == 'inventories'
|
||||
= t('admin.product_import.save.inventory_reset')
|
||||
= t('.inventory_reset')
|
||||
- else
|
||||
= t('admin.product_import.save.products_reset')
|
||||
= t('.products_reset')
|
||||
|
||||
%br
|
||||
|
||||
%p{ng: {show: 'update_errors.length == 0'}}
|
||||
= t('admin.product_import.save.all_saved')
|
||||
= t('.all_saved')
|
||||
|
||||
%div{ng: {show: 'update_errors.length > 0'}}
|
||||
%p {{ updated_total }} #{t('admin.product_import.save.some_saved')}
|
||||
%p {{ updated_total }} #{t('.some_saved')}
|
||||
%br
|
||||
|
||||
%h5= t('admin.product_import.save.save_errors')
|
||||
%h5= t('.save_errors')
|
||||
|
||||
%p.save-error{ng: {repeat: 'error in update_errors'}}
|
||||
- {{ error }}
|
||||
@@ -54,10 +54,10 @@
|
||||
%br
|
||||
%div{ng: {show: 'updated_total > 0'}}
|
||||
%a.button.view{href: main_app.admin_inventory_path, ng: {show: 'updates.inventory_created > 0 || updates.inventory_updated > 0'}}
|
||||
= t('admin.product_import.save.view_inventory')
|
||||
= t('.view_inventory')
|
||||
|
||||
%a.button.view{href: admin_products_path, ng: {show: 'updates.products_created > 0 || updates.products_updated > 0'}}
|
||||
= t('admin.product_import.save.view_products')
|
||||
= t('.view_products')
|
||||
|
||||
%a.button{href: main_app.admin_product_import_path}
|
||||
= t('admin.product_import.save.import_again')
|
||||
= t('.import_again')
|
||||
|
||||
@@ -505,7 +505,7 @@ en:
|
||||
inventory_to_reset: Existing inventory items will have their stock reset to zero
|
||||
line: Line
|
||||
item_line: Item line
|
||||
save:
|
||||
save_results:
|
||||
final_results: Import final results
|
||||
products_created: Products created
|
||||
products_updated: Products updated
|
||||
|
||||
@@ -72,7 +72,7 @@ feature "Product Import", js: true do
|
||||
|
||||
wait_until { page.find("a.button.view").present? }
|
||||
|
||||
click_link I18n.t('admin.product_import.save.view_products')
|
||||
click_link I18n.t('admin.product_import.save_results.view_products')
|
||||
|
||||
expect(page).to have_content 'Bulk Edit Products'
|
||||
wait_until { page.find("#p_#{potatoes.id}").present? }
|
||||
@@ -174,7 +174,7 @@ feature "Product Import", js: true do
|
||||
potatoes = Spree::Product.find_by_name('Potatoes')
|
||||
expect(potatoes.variants.first.import_date).to be_within(1.minute).of Time.zone.now
|
||||
|
||||
click_link I18n.t('admin.product_import.save.view_products')
|
||||
click_link I18n.t('admin.product_import.save_results.view_products')
|
||||
|
||||
wait_until { page.find("#p_#{carrots.id}").present? }
|
||||
|
||||
@@ -251,7 +251,7 @@ feature "Product Import", js: true do
|
||||
expect(Float(cabbage_override.price)).to eq 1.50
|
||||
expect(cabbage_override.count_on_hand).to eq 2001
|
||||
|
||||
click_link I18n.t('admin.product_import.save.view_inventory')
|
||||
click_link I18n.t('admin.product_import.save_results.view_inventory')
|
||||
expect(page).to have_content 'Inventory'
|
||||
|
||||
select enterprise2.name, from: "hub_id", visible: false
|
||||
@@ -437,6 +437,6 @@ feature "Product Import", js: true do
|
||||
wait_until { page.find("button.view_results:not([disabled='disabled'])").present? }
|
||||
|
||||
find('button.view_results').trigger 'click'
|
||||
expect(page).to have_content I18n.t('admin.product_import.save.final_results')
|
||||
expect(page).to have_content I18n.t('admin.product_import.save_results.final_results')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user