diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index d866b221e89..c8a00f86feb 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -3,6 +3,8 @@ name: Crowdin Action on: push: branches: [ crowdin-trigger ] + schedule: + - cron: "0 0 * * *" jobs: synchronize-with-crowdin: diff --git a/packages/smooth_app/lib/helpers/picture_capture_helper.dart b/packages/smooth_app/lib/helpers/picture_capture_helper.dart index 7ea91e7debc..4f558458bf8 100644 --- a/packages/smooth_app/lib/helpers/picture_capture_helper.dart +++ b/packages/smooth_app/lib/helpers/picture_capture_helper.dart @@ -26,7 +26,10 @@ Future uploadCapturedPicture( ProductQuery.getUser(), image, ), - title: appLocalizations.uploading_image, + title: _imageFieldLabel( + appLocalizations, + imageField, + ), ); if (result == null || result.error != null || result.status != 'status ok') { await LoadingDialog.error( @@ -39,6 +42,26 @@ Future uploadCapturedPicture( return true; } +String _imageFieldLabel( + AppLocalizations appLocalizations, + ImageField field, +) { + switch (field) { + case ImageField.FRONT: + return appLocalizations.uploading_image_type_front; + case ImageField.INGREDIENTS: + return appLocalizations.uploading_image_type_ingredients; + case ImageField.NUTRITION: + return appLocalizations.uploading_image_type_nutrition; + case ImageField.PACKAGING: + return appLocalizations.uploading_image_type_packaging; + case ImageField.OTHER: + return appLocalizations.uploading_image_type_other; + default: + return appLocalizations.uploading_image_type_generic; + } +} + Future _updateContinuousScanModel( BuildContext context, String barcode) async { final ContinuousScanModel? model =