Translate unsaved products message correctly

This commit is contained in:
Maikel Linke
2016-03-23 17:57:22 +11:00
parent d51cfccd7e
commit 31302fb930
2 changed files with 7 additions and 8 deletions

View File

@@ -265,11 +265,11 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
$scope.displayDirtyProducts = ->
if DirtyProducts.count() > 0
message = if DirtyProducts.count() == 1 then t("one_product") else DirtyProducts.count() + t("products")
StatusMessage.display 'notice', t("changes_to") + "#{message}" + t("remain_unsaved.")
else
StatusMessage.clear()
count = DirtyProducts.count()
switch count
when 0 then StatusMessage.clear()
when 1 then StatusMessage.display 'notice', t("one_product_unsaved")
else StatusMessage.display 'notice', t("products_unsaved", n: count)
filterSubmitProducts = (productsToFilter) ->

View File

@@ -938,9 +938,8 @@ Please follow the instructions there to make your enterprise visible on the Open
success: "success"
failure: "failure"
unsaved_changes_confirmation: "Unsaved changes will be lost. Continue anyway?"
one_product: "one product"
changes_to: "Changes to"
remain_unsaved: "remain unsaced"
one_product_unsaved: "Changes to one product remain unsaved."
products_unsaved: "Changes to %{n} products remain unsaved."
add_manager: "Add a manager"
is_already_manager: "is already a manager!"
no_change_to_save: " No change to save"