feat(messages): add max file size for attachments
This commit is contained in:
parent
ef6d6aa368
commit
bcf47ec92b
7 changed files with 24 additions and 0 deletions
7
app/javascript/trix-editor-overrides.js
Normal file
7
app/javascript/trix-editor-overrides.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
// app/javascript/trix-editor-overrides.js
|
||||
window.addEventListener("trix-file-accept", function(event) {
|
||||
if (event.file.size > 1024 * 1024 * 512) {
|
||||
event.preventDefault()
|
||||
alert(I18n.t('js.trix_editor.file_size_alert'))
|
||||
}
|
||||
})
|
|
@ -1216,12 +1216,15 @@ de:
|
|||
js:
|
||||
ordering:
|
||||
confirm_change: Änderungen an dieser Bestellung gehen verloren, wenn zu einer anderen Bestellung gewechselt wird. Möchtest Du trotzdem wechseln?
|
||||
trix_editor:
|
||||
file_size_alert: Der Dateianhang ist zu groß! Die maximale Größe beträgt 512Mb
|
||||
layouts:
|
||||
email:
|
||||
footer_1_separator: "--"
|
||||
footer_2_foodsoft: 'Foodsoft: %{url}'
|
||||
footer_3_homepage: 'Foodcoop: %{url}'
|
||||
footer_4_help: 'Hilfe: %{url}'
|
||||
help: 'Hilfe'
|
||||
foodsoft: Foodsoft
|
||||
footer:
|
||||
revision: Revision %{revision}
|
||||
|
|
|
@ -1219,12 +1219,15 @@ en:
|
|||
js:
|
||||
ordering:
|
||||
confirm_change: Modifications to this order will be lost when you change the order. Do you want to lose the changes you made and continue?
|
||||
trix_editor:
|
||||
file_size_alert: The file is to large! The supported file size is 512Mb!
|
||||
layouts:
|
||||
email:
|
||||
footer_1_separator: "--"
|
||||
footer_2_foodsoft: 'Foodsoft: %{url}'
|
||||
footer_3_homepage: 'Foodcoop: %{url}'
|
||||
footer_4_help: 'Help: %{url}'
|
||||
help: 'Help'
|
||||
foodsoft: Foodsoft
|
||||
footer:
|
||||
revision: revision %{revision}
|
||||
|
|
|
@ -1080,9 +1080,12 @@ es:
|
|||
js:
|
||||
ordering:
|
||||
confirm_change: Las modificaciones sobre este pedido se perderán cuando cambies el pedido. ¿Quieres perder los cambios que has hecho y continuar?
|
||||
trix_editor:
|
||||
file_size_alert: ¡El archivo adjunto es demasiado grande! El tamaño máximo es de 512Mb
|
||||
layouts:
|
||||
email:
|
||||
footer_4_help: 'Ayuda: %{url}'
|
||||
help: 'Ayuda'
|
||||
footer:
|
||||
revision: revisión %{revision}
|
||||
header:
|
||||
|
|
|
@ -831,10 +831,13 @@ fr:
|
|||
js:
|
||||
ordering:
|
||||
confirm_change: Les changements apportés à cette commande vont être perdus. Est-ce que tu veux vraiment continuer?
|
||||
trix_editor:
|
||||
file_size_alert: Le fichier joint est trop volumineux ! La taille maximale est de 512Mb
|
||||
layouts:
|
||||
email:
|
||||
footer_3_homepage: 'Boufcoop: %{url}'
|
||||
footer_4_help: 'Aide: %{url}'
|
||||
help: 'Aide'
|
||||
footer:
|
||||
revision: révision %{revision}
|
||||
header:
|
||||
|
|
|
@ -1189,12 +1189,15 @@ nl:
|
|||
js:
|
||||
ordering:
|
||||
confirm_change: Als je naar een andere bestelling gaat, gaan je aanpassingen in deze bestelling verloren. Wijzigingen vergeten en naar de andere bestelling gaan?
|
||||
trix_editor:
|
||||
file_size_alert: De bestandsbijlage is te groot! De maximale grootte is 512Mb!
|
||||
layouts:
|
||||
email:
|
||||
footer_1_separator: "--"
|
||||
footer_2_foodsoft: 'Foodsoft: %{url}'
|
||||
footer_3_homepage: 'Foodcoop: %{url}'
|
||||
footer_4_help: 'Help: %{url}'
|
||||
help: 'Help'
|
||||
foodsoft: Foodsoft
|
||||
footer:
|
||||
revision: revisie %{revision}
|
||||
|
|
|
@ -1218,6 +1218,8 @@ tr:
|
|||
js:
|
||||
ordering:
|
||||
confirm_change: Bu siparişe yapılan değişiklikler kaybolacak. Değişikliklerinizi kaybetmek ve devam etmek istiyor musunuz?
|
||||
trix_editor:
|
||||
file_size_alert: Dosya eki çok büyük! Maksimum boyut 512Mb
|
||||
layouts:
|
||||
email:
|
||||
footer_1_separator: "--"
|
||||
|
|
Loading…
Reference in a new issue