From e336f242252301d0ee7c087b593a37e9465480e0 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Mon, 4 Apr 2022 20:10:29 +0200 Subject: [PATCH] Upgraded Font Awesome to v6 --- package.json | 2 +- public/viewjs/batteriesoverview.js | 6 +- public/viewjs/batterytracking.js | 2 +- public/viewjs/choresoverview.js | 8 +-- public/viewjs/choretracking.js | 2 +- public/viewjs/components/barcodescanner.js | 6 +- public/viewjs/components/calendarcard.js | 18 ++--- public/viewjs/components/datetimepicker.js | 18 ++--- public/viewjs/components/datetimepicker2.js | 18 ++--- public/viewjs/components/productpicker.js | 2 +- public/viewjs/consume.js | 6 +- public/viewjs/inventory.js | 2 +- public/viewjs/mealplan.js | 40 +++++------ public/viewjs/purchase.js | 2 +- public/viewjs/stockentries.js | 4 +- public/viewjs/stockentryform.js | 2 +- public/viewjs/stockoverview.js | 14 ++-- public/viewjs/tasks.js | 6 +- public/viewjs/transfer.js | 8 +-- services/DemoDataGeneratorService.php | 2 +- views/about.blade.php | 4 +- views/batteries.blade.php | 12 ++-- views/batteriesjournal.blade.php | 12 ++-- views/batteriesoverview.blade.php | 14 ++-- views/batteryform.blade.php | 2 +- views/batterytracking.blade.php | 2 +- views/calendar.blade.php | 2 +- views/choreform.blade.php | 6 +- views/chores.blade.php | 18 ++--- views/choresjournal.blade.php | 12 ++-- views/choresoverview.blade.php | 22 +++--- views/choretracking.blade.php | 2 +- views/components/batterycard.blade.php | 2 +- views/components/calendarcard.blade.php | 2 +- views/components/chorecard.blade.php | 2 +- views/components/datetimepicker.blade.php | 4 +- views/components/datetimepicker2.blade.php | 4 +- views/components/locationpicker.blade.php | 2 +- views/components/numberpicker.blade.php | 6 +- views/components/productcard.blade.php | 4 +- views/components/productpicker.blade.php | 6 +- views/components/recipepicker.blade.php | 4 +- views/components/userfields_tbody.blade.php | 2 +- views/components/userfieldsform.blade.php | 6 +- views/consume.blade.php | 18 ++++- views/equipment.blade.php | 22 +++--- views/equipmentform.blade.php | 2 +- views/inventory.blade.php | 6 +- views/layout/default.blade.php | 74 ++++++++++----------- views/locationcontentsheet.blade.php | 6 +- views/locationform.blade.php | 2 +- views/locations.blade.php | 12 ++-- views/login.blade.php | 2 +- views/manageapikeys.blade.php | 12 ++-- views/mealplan.blade.php | 2 +- views/mealplansections.blade.php | 12 ++-- views/productbarcodeform.blade.php | 2 +- views/productform.blade.php | 48 ++++++------- views/productgroups.blade.php | 14 ++-- views/products.blade.php | 22 +++--- views/purchase.blade.php | 2 +- views/quantityunitform.blade.php | 8 +-- views/quantityunits.blade.php | 12 ++-- views/recipeform.blade.php | 64 +++++++++++++----- views/recipeposform.blade.php | 6 +- views/recipes.blade.php | 50 +++++++------- views/recipessettings.blade.php | 2 +- views/shoppinglist.blade.php | 20 +++--- views/shoppinglocations.blade.php | 12 ++-- views/stockentries.blade.php | 24 +++---- views/stockjournal.blade.php | 20 +++--- views/stockjournalsummary.blade.php | 12 ++-- views/stockoverview.blade.php | 36 +++++----- views/stocksettings.blade.php | 2 +- views/taskcategories.blade.php | 12 ++-- views/tasks.blade.php | 18 ++--- views/transfer.blade.php | 16 ++++- views/userentities.blade.php | 12 ++-- views/userentityform.blade.php | 9 ++- views/userfieldform.blade.php | 6 +- views/userfields.blade.php | 14 ++-- views/userform.blade.php | 2 +- views/userobjects.blade.php | 10 +-- views/users.blade.php | 14 ++-- yarn.lock | 8 +-- 85 files changed, 514 insertions(+), 453 deletions(-) diff --git a/package.json b/package.json index faa38e88..236e1113 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "@danielfarrell/bootstrap-combobox": "https://github.com/berrnd/bootstrap-combobox.git#master", "@ericblade/quagga2": "^1.2.1", "@fontsource/noto-sans": "^4.4.5", - "@fortawesome/fontawesome-free": "^5.14.0", + "@fortawesome/fontawesome-free": "^6.1.1", "animate.css": "^3.7.2", "bootbox": "^5.3.2", "bootstrap": "^4.5.2", diff --git a/public/viewjs/batteriesoverview.js b/public/viewjs/batteriesoverview.js index d5c7b546..3b79d18f 100644 --- a/public/viewjs/batteriesoverview.js +++ b/public/viewjs/batteriesoverview.js @@ -169,9 +169,9 @@ function RefreshStatistics() } }); - $("#info-due-today-batteries").html('' + dueTodayCount + ' ' + __n(dueTodayCount, '%s battery is due to be charged today', '%s batteries are due to be charged today')); - $("#info-due-soon-batteries").html('' + dueSoonCount + ' ' + __n(dueSoonCount, '%s battery is due to be charged', '%s batteries are due to be charged') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days')); - $("#info-overdue-batteries").html('' + overdueCount + ' ' + __n(overdueCount, '%s battery is overdue to be charged', '%s batteries are overdue to be charged')); + $("#info-due-today-batteries").html('' + dueTodayCount + ' ' + __n(dueTodayCount, '%s battery is due to be charged today', '%s batteries are due to be charged today')); + $("#info-due-soon-batteries").html('' + dueSoonCount + ' ' + __n(dueSoonCount, '%s battery is due to be charged', '%s batteries are due to be charged') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days')); + $("#info-overdue-batteries").html('' + overdueCount + ' ' + __n(overdueCount, '%s battery is overdue to be charged', '%s batteries are overdue to be charged')); }, function(xhr) { diff --git a/public/viewjs/batterytracking.js b/public/viewjs/batterytracking.js index 843cb8f6..7ebffe90 100644 --- a/public/viewjs/batterytracking.js +++ b/public/viewjs/batterytracking.js @@ -22,7 +22,7 @@ function(result) { Grocy.FrontendHelpers.EndUiBusy("batterytracking-form"); - toastr.success(__t('Tracked charge cycle of battery %1$s on %2$s', batteryDetails.battery.name, $('#tracked_time').find('input').val()) + '
' + __t("Undo") + ''); + toastr.success(__t('Tracked charge cycle of battery %1$s on %2$s', batteryDetails.battery.name, $('#tracked_time').find('input').val()) + '
' + __t("Undo") + ''); Grocy.Components.BatteryCard.Refresh($('#battery_id').val()); $('#battery_id').val(''); diff --git a/public/viewjs/choresoverview.js b/public/viewjs/choresoverview.js index 4be94c1d..64d40b1b 100644 --- a/public/viewjs/choresoverview.js +++ b/public/viewjs/choresoverview.js @@ -270,10 +270,10 @@ function RefreshStatistics() } }); - $("#info-due-today-chores").html('' + dueTodayCount + ' ' + __n(dueTodayCount, '%s chore is due to be done today', '%s chores are due to be done today')); - $("#info-due-soon-chores").html('' + dueSoonCount + ' ' + __n(dueSoonCount, '%s chore is due to be done', '%s chores are due to be done') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days')); - $("#info-overdue-chores").html('' + overdueCount + ' ' + __n(overdueCount, '%s chore is overdue to be done', '%s chores are overdue to be done')); - $("#info-assigned-to-me-chores").html('' + assignedToMeCount + ' ' + __n(assignedToMeCount, '%s chore is assigned to me', '%s chores are assigned to me')); + $("#info-due-today-chores").html('' + dueTodayCount + ' ' + __n(dueTodayCount, '%s chore is due to be done today', '%s chores are due to be done today')); + $("#info-due-soon-chores").html('' + dueSoonCount + ' ' + __n(dueSoonCount, '%s chore is due to be done', '%s chores are due to be done') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days')); + $("#info-overdue-chores").html('' + overdueCount + ' ' + __n(overdueCount, '%s chore is overdue to be done', '%s chores are overdue to be done')); + $("#info-assigned-to-me-chores").html('' + assignedToMeCount + ' ' + __n(assignedToMeCount, '%s chore is assigned to me', '%s chores are assigned to me')); }, function(xhr) { diff --git a/public/viewjs/choretracking.js b/public/viewjs/choretracking.js index 84f90ddb..a86772ba 100644 --- a/public/viewjs/choretracking.js +++ b/public/viewjs/choretracking.js @@ -27,7 +27,7 @@ Grocy.Components.UserfieldsForm.Save(function() { Grocy.FrontendHelpers.EndUiBusy("choretracking-form"); - toastr.success(__t('Tracked execution of chore %1$s on %2$s', choreDetails.chore.name, Grocy.Components.DateTimePicker.GetValue()) + '
' + __t("Undo") + ''); + toastr.success(__t('Tracked execution of chore %1$s on %2$s', choreDetails.chore.name, Grocy.Components.DateTimePicker.GetValue()) + '
' + __t("Undo") + ''); Grocy.Components.ChoreCard.Refresh($('#chore_id').val()); $('#chore_id').val(''); diff --git a/public/viewjs/components/barcodescanner.js b/public/viewjs/components/barcodescanner.js index 293a4197..3efc6f10 100644 --- a/public/viewjs/components/barcodescanner.js +++ b/public/viewjs/components/barcodescanner.js @@ -234,7 +234,7 @@ $(document).on("click", "#barcodescanner-start-button", async function(e) closeButton: true, buttons: { torch: { - label: '', + label: '', className: 'btn-warning responsive-button torch', callback: function() { @@ -291,11 +291,11 @@ Grocy.Components.BarcodeScanner.Init = function() { if ($(this).hasAttr("disabled")) { - $(this).after(''); + $(this).after(''); } else { - $(this).after(''); + $(this).after(''); } Grocy.Components.BarcodeScanner.InitDone = true; diff --git a/public/viewjs/components/calendarcard.js b/public/viewjs/components/calendarcard.js index 36cc3425..6a130bf3 100644 --- a/public/viewjs/components/calendarcard.js +++ b/public/viewjs/components/calendarcard.js @@ -8,15 +8,15 @@ $('#calendar').datetimepicker( calendarWeeks: true, locale: moment.locale(), icons: { - time: 'far fa-clock', - date: 'far fa-calendar', - up: 'fas fa-arrow-up', - down: 'fas fa-arrow-down', - previous: 'fas fa-chevron-left', - next: 'fas fa-chevron-right', - today: 'fas fa-calendar-check', - clear: 'far fa-trash-alt', - close: 'far fa-times-circle' + time: 'fa-regular fa-clock', + date: 'fa-regular fa-calendar', + up: 'fa-solid fa-arrow-up', + down: 'fa-solid fa-arrow-down', + previous: 'fa-solid fa-chevron-left', + next: 'fa-solid fa-chevron-right', + today: 'fa-solid fa-calendar-check', + clear: 'fa-regular fa-trash-alt', + close: 'fa-regular fa-times-circle' }, keepOpen: true, inline: true, diff --git a/public/viewjs/components/datetimepicker.js b/public/viewjs/components/datetimepicker.js index 3e44be9a..df8f0cd0 100644 --- a/public/viewjs/components/datetimepicker.js +++ b/public/viewjs/components/datetimepicker.js @@ -95,15 +95,15 @@ Grocy.Components.DateTimePicker.Init = function(reInit = false) defaultDate: startDate, useCurrent: false, icons: { - time: 'far fa-clock', - date: 'far fa-calendar', - up: 'fas fa-arrow-up', - down: 'fas fa-arrow-down', - previous: 'fas fa-chevron-left', - next: 'fas fa-chevron-right', - today: 'fas fa-calendar-day', - clear: 'far fa-trash-alt', - close: 'fas fa-check' + time: 'fa-regular fa-clock', + date: 'fa-regular fa-calendar', + up: 'fa-solid fa-arrow-up', + down: 'fa-solid fa-arrow-down', + previous: 'fa-solid fa-chevron-left', + next: 'fa-solid fa-chevron-right', + today: 'fa-solid fa-calendar-day', + clear: 'fa-regular fa-trash-alt', + close: 'fa-solid fa-check' }, sideBySide: true, keyBinds: { diff --git a/public/viewjs/components/datetimepicker2.js b/public/viewjs/components/datetimepicker2.js index a134e460..017c79b3 100644 --- a/public/viewjs/components/datetimepicker2.js +++ b/public/viewjs/components/datetimepicker2.js @@ -95,15 +95,15 @@ Grocy.Components.DateTimePicker2.Init = function(reInit = false) defaultDate: startDate, useCurrent: false, icons: { - time: 'far fa-clock', - date: 'far fa-calendar', - up: 'fas fa-arrow-up', - down: 'fas fa-arrow-down', - previous: 'fas fa-chevron-left', - next: 'fas fa-chevron-right', - today: 'fas fa-calendar-day', - clear: 'far fa-trash-alt', - close: 'fas fa-check' + time: 'fa-regular fa-clock', + date: 'fa-regular fa-calendar', + up: 'fa-solid fa-arrow-up', + down: 'fa-solid fa-arrow-down', + previous: 'fa-solid fa-chevron-left', + next: 'fa-solid fa-chevron-right', + today: 'fa-solid fa-calendar-day', + clear: 'fa-regular fa-trash-alt', + close: 'fa-solid fa-check' }, sideBySide: true, keyBinds: { diff --git a/public/viewjs/components/productpicker.js b/public/viewjs/components/productpicker.js index 6003c92d..4655940e 100644 --- a/public/viewjs/components/productpicker.js +++ b/public/viewjs/components/productpicker.js @@ -255,7 +255,7 @@ $('#product_id_text_input').on('blur', function(e) if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_DISABLE_BROWSER_BARCODE_CAMERA_SCANNING) { buttons.retrycamerascanning = { - label: 'C ', + label: 'C ', className: 'btn-primary responsive-button retry-camera-scanning-button', callback: function() { diff --git a/public/viewjs/consume.js b/public/viewjs/consume.js index 2a733a2b..6bb6adbf 100644 --- a/public/viewjs/consume.js +++ b/public/viewjs/consume.js @@ -82,11 +82,11 @@ if (productDetails.product.enable_tare_weight_handling == 1 && !jsonData.exact_amount) { - var successMessage = __t('Removed %1$s of %2$s from stock', Math.abs(jsonForm.amount - (parseFloat(productDetails.product.tare_weight) + parseFloat(productDetails.stock_amount))) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''; + var successMessage = __t('Removed %1$s of %2$s from stock', Math.abs(jsonForm.amount - (parseFloat(productDetails.product.tare_weight) + parseFloat(productDetails.stock_amount))) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''; } else { - var successMessage = __t('Removed %1$s of %2$s from stock', Math.abs(jsonForm.amount) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''; + var successMessage = __t('Removed %1$s of %2$s from stock', Math.abs(jsonForm.amount) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''; } if (GetUriParam("embedded") !== undefined) @@ -187,7 +187,7 @@ $('#save-mark-as-open-button').on('click', function(e) } Grocy.FrontendHelpers.EndUiBusy("consume-form"); - toastr.success(__t('Marked %1$s of %2$s as opened', parseFloat(jsonForm.amount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''); + toastr.success(__t('Marked %1$s of %2$s as opened', parseFloat(jsonForm.amount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''); if (BoolVal(Grocy.UserSettings.stock_default_consume_amount_use_quick_consume_amount)) { diff --git a/public/viewjs/inventory.js b/public/viewjs/inventory.js index fbf158c7..b834fdf4 100644 --- a/public/viewjs/inventory.js +++ b/public/viewjs/inventory.js @@ -121,7 +121,7 @@ Grocy.Api.Get('stock/products/' + jsonForm.product_id, function(result) { - var successMessage = __t('Stock amount of %1$s is now %2$s', result.product.name, result.stock_amount + " " + __n(result.stock_amount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true)) + '
' + __t("Undo") + ''; + var successMessage = __t('Stock amount of %1$s is now %2$s', result.product.name, result.stock_amount + " " + __n(result.stock_amount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true)) + '
' + __t("Undo") + ''; if (GetUriParam("embedded") !== undefined) { diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 411a7822..b52954de 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -64,7 +64,7 @@ $(".calendar").each(function() $(".calendar[data-primary-section='true'] .fc-day-header").prepend('\
\ - \ + \ \ '); @@ -233,11 +233,11 @@ $(".calendar").each(function() } fulfillmentInfoHtml = __t('Not enough in stock'); - var fulfillmentIconHtml = ''; + var fulfillmentIconHtml = ''; if (parseFloat(productDetails.stock_amount_aggregated) >= parseFloat(mealPlanEntry.product_amount)) { var fulfillmentInfoHtml = __t('Enough in stock'); - var fulfillmentIconHtml = ''; + var fulfillmentIconHtml = ''; } var costsAndCaloriesPerServing = "" @@ -253,7 +253,7 @@ $(".calendar").each(function() var shoppingListButtonHtml = ""; if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_SHOPPINGLIST) { - shoppingListButtonHtml = ''; + shoppingListButtonHtml = ''; } element.html('\ @@ -263,9 +263,9 @@ $(".calendar").each(function()
' + fulfillmentIconHtml + " " + fulfillmentInfoHtml + '
\ ' + costsAndCaloriesPerServing + ' \
\ - \ - \ - \ + \ + \ + \ ' + shoppingListButtonHtml + ' \ ' + doneButtonHtml + ' \
\ @@ -282,8 +282,8 @@ $(".calendar").each(function()
\
' + mealPlanEntry.note + '
\
\ - \ - \ + \ + \ ' + doneButtonHtml + ' \
\
'); @@ -830,7 +830,7 @@ $(document).on('click', '.product-consume-button', function(e) Grocy.Api.Get('stock/products/' + productId, function(result) { - var toastMessage = __t('Removed %1$s of %2$s from stock', consumeAmount.toString() + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; + var toastMessage = __t('Removed %1$s of %2$s from stock', consumeAmount.toString() + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; Grocy.Api.Put('objects/meal_plan/' + mealPlanEntryId, { "done": 1 }, function(result) diff --git a/public/viewjs/purchase.js b/public/viewjs/purchase.js index 775205ad..9ef0eb33 100644 --- a/public/viewjs/purchase.js +++ b/public/viewjs/purchase.js @@ -121,7 +121,7 @@ $('#save-purchase-button').on('click', function(e) { amountMessage = parseFloat(jsonForm.amount) - parseFloat(productDetails.stock_amount) - parseFloat(productDetails.product.tare_weight); } - var successMessage = __t('Added %1$s of %2$s to stock', amountMessage + " " + __n(amountMessage, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''; + var successMessage = __t('Added %1$s of %2$s to stock', amountMessage + " " + __n(amountMessage, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name) + '
' + __t("Undo") + ''; if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER) { diff --git a/public/viewjs/stockentries.js b/public/viewjs/stockentries.js index 788742c0..47d7a84f 100644 --- a/public/viewjs/stockentries.js +++ b/public/viewjs/stockentries.js @@ -81,7 +81,7 @@ $(document).on('click', '.stock-consume-button', function(e) Grocy.Api.Get('stock/products/' + productId, function(result) { - var toastMessage = __t('Removed %1$s of %2$s from stock', parseFloat(consumeAmount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; + var toastMessage = __t('Removed %1$s of %2$s from stock', parseFloat(consumeAmount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; if (wasSpoiled) { toastMessage += " (" + __t("Spoiled") + ")"; @@ -128,7 +128,7 @@ $(document).on('click', '.product-open-button', function(e) { button.addClass("disabled"); Grocy.FrontendHelpers.EndUiBusy(); - toastr.success(__t('Marked %1$s of %2$s as opened', 1 + " " + productQuName, productName) + '
' + __t("Undo") + ''); + toastr.success(__t('Marked %1$s of %2$s as opened', 1 + " " + productQuName, productName) + '
' + __t("Undo") + ''); RefreshStockEntryRow(stockRowId); }, function(xhr) diff --git a/public/viewjs/stockentryform.js b/public/viewjs/stockentryform.js index ba503c36..77222f4f 100644 --- a/public/viewjs/stockentryform.js +++ b/public/viewjs/stockentryform.js @@ -44,7 +44,7 @@ Grocy.Api.Put("stock/entry/" + Grocy.EditObjectId, jsonData, function(result) { - var successMessage = __t('Stock entry successfully updated') + '
' + __t("Undo") + ''; + var successMessage = __t('Stock entry successfully updated') + '
' + __t("Undo") + ''; window.parent.postMessage(WindowMessageBag("StockEntryChanged", Grocy.EditObjectId), Grocy.BaseUrl); window.parent.postMessage(WindowMessageBag("ShowSuccessMessage", successMessage), Grocy.BaseUrl); diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index 491ef295..1762c3ee 100755 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -147,11 +147,11 @@ $(document).on('click', '.product-consume-button', function(e) { if (result.product.enable_tare_weight_handling == 1) { - var toastMessage = __t('Removed %1$s of %2$s from stock', parseFloat(originalTotalStockAmount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; + var toastMessage = __t('Removed %1$s of %2$s from stock', parseFloat(originalTotalStockAmount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; } else { - var toastMessage = __t('Removed %1$s of %2$s from stock', parseFloat(consumeAmount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; + var toastMessage = __t('Removed %1$s of %2$s from stock', parseFloat(consumeAmount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + __n(consumeAmount, result.quantity_unit_stock.name, result.quantity_unit_stock.name_plural, true), result.product.name) + '
' + __t("Undo") + ''; } if (wasSpoiled) @@ -207,7 +207,7 @@ $(document).on('click', '.product-open-button', function(e) } Grocy.FrontendHelpers.EndUiBusy(); - toastr.success(__t('Marked %1$s of %2$s as opened', parseFloat(amount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + productQuName, productName) + '
' + __t("Undo") + ''); + toastr.success(__t('Marked %1$s of %2$s as opened', parseFloat(amount).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }) + " " + productQuName, productName) + '
' + __t("Undo") + ''); RefreshStatistics(); RefreshProductRow(productId); }, @@ -261,10 +261,10 @@ function RefreshStatistics() Grocy.Api.Get('stock/volatile?due_soon_days=' + nextXDays, function(result) { - $("#info-duesoon-products").html('' + result.due_products.length + ' ' + __n(result.due_products.length, '%s product is due', '%s products are due') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days') + ''); - $("#info-overdue-products").html('' + result.overdue_products.length + ' ' + __n(result.overdue_products.length, '%s product is overdue', '%s products are overdue') + ''); - $("#info-expired-products").html('' + result.expired_products.length + ' ' + __n(result.expired_products.length, '%s product is expired', '%s products are expired') + ''); - $("#info-missing-products").html('' + result.missing_products.length + ' ' + __n(result.missing_products.length, '%s product is below defined min. stock amount', '%s products are below defined min. stock amount') + ''); + $("#info-duesoon-products").html('' + result.due_products.length + ' ' + __n(result.due_products.length, '%s product is due', '%s products are due') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days') + ''); + $("#info-overdue-products").html('' + result.overdue_products.length + ' ' + __n(result.overdue_products.length, '%s product is overdue', '%s products are overdue') + ''); + $("#info-expired-products").html('' + result.expired_products.length + ' ' + __n(result.expired_products.length, '%s product is expired', '%s products are expired') + ''); + $("#info-missing-products").html('' + result.missing_products.length + ' ' + __n(result.missing_products.length, '%s product is below defined min. stock amount', '%s products are below defined min. stock amount') + ''); }, function(xhr) { diff --git a/public/viewjs/tasks.js b/public/viewjs/tasks.js index c020b4c6..3c9e0411 100644 --- a/public/viewjs/tasks.js +++ b/public/viewjs/tasks.js @@ -213,9 +213,9 @@ function RefreshStatistics() } }); - $("#info-due-today-tasks").html('' + dueTodayCount + ' ' + __n(dueTodayCount, '%s task is due to be done today', '%s tasks are due to be done today')); - $("#info-due-soon-tasks").html('' + dueSoonCount + ' ' + __n(dueSoonCount, '%s task is due to be done', '%s tasks are due to be done') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days')); - $("#info-overdue-tasks").html('' + overdueCount + ' ' + __n(overdueCount, '%s task is overdue to be done', '%s tasks are overdue to be done')); + $("#info-due-today-tasks").html('' + dueTodayCount + ' ' + __n(dueTodayCount, '%s task is due to be done today', '%s tasks are due to be done today')); + $("#info-due-soon-tasks").html('' + dueSoonCount + ' ' + __n(dueSoonCount, '%s task is due to be done', '%s tasks are due to be done') + ' ' + __n(nextXDays, 'within the next day', 'within the next %s days')); + $("#info-overdue-tasks").html('' + overdueCount + ' ' + __n(overdueCount, '%s task is overdue to be done', '%s tasks are overdue to be done')); }, function(xhr) { diff --git a/public/viewjs/transfer.js b/public/viewjs/transfer.js index f6d35f46..dec23cc5 100644 --- a/public/viewjs/transfer.js +++ b/public/viewjs/transfer.js @@ -61,11 +61,11 @@ if (productDetails.product.enable_tare_weight_handling == 1) { - var successMessage = __t('Transfered %1$s of %2$s from %3$s to %4$s', Math.abs(jsonForm.amount - parseFloat(productDetails.product.tare_weight)) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name, $('option:selected', "#location_id_from").text(), $('option:selected', "#location_id_to").text()) + '
' + __t("Undo") + ''; + var successMessage = __t('Transfered %1$s of %2$s from %3$s to %4$s', Math.abs(jsonForm.amount - parseFloat(productDetails.product.tare_weight)) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name, $('option:selected', "#location_id_from").text(), $('option:selected', "#location_id_to").text()) + '
' + __t("Undo") + ''; } else { - var successMessage = __t('Transfered %1$s of %2$s from %3$s to %4$s', Math.abs(jsonForm.amount) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name, $('option:selected', "#location_id_from").text(), $('option:selected', "#location_id_to").text()) + '
' + __t("Undo") + ''; + var successMessage = __t('Transfered %1$s of %2$s from %3$s to %4$s', Math.abs(jsonForm.amount) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural, true), productDetails.product.name, $('option:selected', "#location_id_from").text(), $('option:selected', "#location_id_to").text()) + '
' + __t("Undo") + ''; } if (GetUriParam("embedded") !== undefined) @@ -82,7 +82,7 @@ if (parseInt($("#location_id_from option:selected").attr("data-is-freezer")) === 0 && parseInt($("#location_id_to option:selected").attr("data-is-freezer")) === 1) // Frozen { - toastr.info('' + __t("Frozen") + " "); + toastr.info('' + __t("Frozen") + " "); if (BoolVal(productDetails.product.should_not_be_frozen)) { @@ -91,7 +91,7 @@ } if (parseInt($("#location_id_from option:selected").attr("data-is-freezer")) === 1 && parseInt($("#location_id_to option:selected").attr("data-is-freezer")) === 0) // Thawed { - toastr.info('' + __t("Thawed") + " "); + toastr.info('' + __t("Thawed") + " "); } $("#specific_stock_entry").find("option").remove().end().append(""); diff --git a/services/DemoDataGeneratorService.php b/services/DemoDataGeneratorService.php index 90943641..4311b83f 100644 --- a/services/DemoDataGeneratorService.php +++ b/services/DemoDataGeneratorService.php @@ -190,7 +190,7 @@ class DemoDataGeneratorService extends BaseService INSERT INTO equipment (name, description, instruction_manual_file_name) VALUES ('{$this->__t_sql('Coffee machine')}', '{$loremIpsumWithHtmlFormattings}', 'loremipsum.pdf'); --1 INSERT INTO equipment (name, description) VALUES ('{$this->__t_sql('Dishwasher')}', '{$loremIpsumWithHtmlFormattings}'); --2 - INSERT INTO userentities (name, caption, description, show_in_sidebar_menu, icon_css_class) VALUES ('exampleuserentity', '{$this->__t_sql('Example userentity')}', '{$this->__t_sql('This is an example user entity...')}', 1, 'fas fa-smile'); --1 + INSERT INTO userentities (name, caption, description, show_in_sidebar_menu, icon_css_class) VALUES ('exampleuserentity', '{$this->__t_sql('Example userentity')}', '{$this->__t_sql('This is an example user entity...')}', 1, 'fa-solid fa-smile'); --1 INSERT INTO userfields (entity, name, caption, type, show_as_column_in_tables) VALUES ('userentity-exampleuserentity', 'customfield1', '{$this->__t_sql('Custom field')} 1', 'text-single-line', 1); --1 INSERT INTO userfields (entity, name, caption, type, show_as_column_in_tables) VALUES ('userentity-exampleuserentity', 'customfield2', '{$this->__t_sql('Custom field')} 2', 'text-single-line', 1); --2 diff --git a/views/about.blade.php b/views/about.blade.php index d6814274..f3386913 100644 --- a/views/about.blade.php +++ b/views/about.blade.php @@ -44,7 +44,7 @@ {{ $__t('Do you find grocy useful?') }}
{{ $__t('Say thanks') }} + target="_blank">{{ $__t('Say thanks') }}

@@ -84,7 +84,7 @@ - +

diff --git a/views/batteries.blade.php b/views/batteries.blade.php index f4a590f8..176f8158 100644 --- a/views/batteries.blade.php +++ b/views/batteries.blade.php @@ -14,13 +14,13 @@ type="button" data-toggle="collapse" data-target="#table-filter-row"> - + @@ -26,7 +26,7 @@
- +
-  {{ $__t('Battery') }} +  {{ $__t('Battery') }}
@@ -86,7 +86,7 @@ data-toggle="tooltip" title="{{ $__t('Table options') }}" data-table-selector="#batteries-journal-table" - href="#"> + href="#"> {{ $__t('Battery') }} {{ $__t('Tracked time') }} @@ -103,7 +103,7 @@ data-toggle="tooltip" data-placement="left" title="{{ $__t('Undo charge cycle') }}"> - + diff --git a/views/batteriesoverview.blade.php b/views/batteriesoverview.blade.php index 23ebee6d..f8ba942b 100644 --- a/views/batteriesoverview.blade.php +++ b/views/batteriesoverview.blade.php @@ -18,7 +18,7 @@ type="button" data-toggle="collapse" data-target="#related-links"> - +