Never silently truncate the draft when attaching an IPFS link
Check before uploading that the link (from the gateway and a CIDv1-sized placeholder) fits with the draft and the reply prefix, and tell the user when it doesn't instead of cutting their text. The channel limit now counts the @[name] reply prefix like the send path.
This commit is contained in:
1 parent
084a8fb98b
commit
34db64d7af
25 files changed
+315
-103
No files matched your search
@@ -953,6 +953,14 @@
|
||||
}
|
||||
},
|
||||
"chat_ipfsUploadNotConfigured": "Configure an IPFS upload provider in App Settings first.",
|
||||
"chat_ipfsLinkNoRoom": "Not enough room for the image link. Shorten your message, then try again.",
|
||||
"@chat_ipfsLinkNoRoom": {
|
||||
"description": "Shown before an IPFS upload when the link would push the draft over the message size limit"
|
||||
},
|
||||
"chat_ipfsLinkOverLimit": "Image link added, but the message is now too long. Shorten it before sending.",
|
||||
"@chat_ipfsLinkOverLimit": {
|
||||
"description": "Shown after an IPFS upload when the link plus the draft no longer fits the message size limit"
|
||||
},
|
||||
"chat_imagePickFailed": "Couldn't open that image",
|
||||
"@chat_imagePickFailed": {
|
||||
"description": "Shown when picking or reading a photo to send fails"
|
||||
|
||||
@@ -3286,6 +3286,18 @@ abstract class AppLocalizations {
|
||||
/// **'Configure an IPFS upload provider in App Settings first.'**
|
||||
String get chat_ipfsUploadNotConfigured;
|
||||
|
||||
/// Shown before an IPFS upload when the link would push the draft over the message size limit
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Not enough room for the image link. Shorten your message, then try again.'**
|
||||
String get chat_ipfsLinkNoRoom;
|
||||
|
||||
/// Shown after an IPFS upload when the link plus the draft no longer fits the message size limit
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
/// **'Image link added, but the message is now too long. Shorten it before sending.'**
|
||||
String get chat_ipfsLinkOverLimit;
|
||||
|
||||
/// Shown when picking or reading a photo to send fails
|
||||
///
|
||||
/// In en, this message translates to:
|
||||
|
||||
@@ -1850,6 +1850,14 @@ class AppLocalizationsBg extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Не мог да откривам та изображин';
|
||||
|
||||
|
||||
@@ -1849,6 +1849,14 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Konnte dieses Bild nicht öffnen.';
|
||||
|
||||
|
||||
@@ -1818,6 +1818,14 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Couldn\'t open that image';
|
||||
|
||||
|
||||
@@ -1845,6 +1845,14 @@ class AppLocalizationsEs extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'No pude abrir esa imagen';
|
||||
|
||||
|
||||
@@ -1849,6 +1849,14 @@ class AppLocalizationsFr extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Je n\'ai pas pu ouvrir cette image';
|
||||
|
||||
|
||||
@@ -1839,6 +1839,14 @@ class AppLocalizationsHu extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Nem tudtam ezt a fenti fényre kapni';
|
||||
|
||||
|
||||
@@ -1849,6 +1849,14 @@ class AppLocalizationsIt extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed =>
|
||||
'Non sono riuscito ad aprire quell\'immagine';
|
||||
|
||||
@@ -1762,6 +1762,14 @@ class AppLocalizationsJa extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'その画像を開けませんでした';
|
||||
|
||||
|
||||
@@ -1767,6 +1767,14 @@ class AppLocalizationsKo extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => '그 이미지를 열 수 없었어요.';
|
||||
|
||||
|
||||
@@ -1835,6 +1835,14 @@ class AppLocalizationsNl extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Kon die afbeelding niet openen';
|
||||
|
||||
|
||||
@@ -1864,6 +1864,14 @@ class AppLocalizationsPl extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Nie mogłem otworzyć tego obrazu';
|
||||
|
||||
|
||||
@@ -1845,6 +1845,14 @@ class AppLocalizationsPt extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Não consegui abrir essa imagem';
|
||||
|
||||
|
||||
@@ -1849,6 +1849,14 @@ class AppLocalizationsRu extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Не удалось открыть это изображение';
|
||||
|
||||
|
||||
@@ -1837,6 +1837,14 @@ class AppLocalizationsSk extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Nesmiela jsem otvoriť tento obrázok';
|
||||
|
||||
|
||||
@@ -1836,6 +1836,14 @@ class AppLocalizationsSl extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Nispeval sem tega ta slik';
|
||||
|
||||
|
||||
@@ -1824,6 +1824,14 @@ class AppLocalizationsSv extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Kunde inte öppna bilden';
|
||||
|
||||
|
||||
@@ -1839,6 +1839,14 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => 'Неможливо відкрити це изображення';
|
||||
|
||||
|
||||
@@ -1742,6 +1742,14 @@ class AppLocalizationsZh extends AppLocalizations {
|
||||
String get chat_ipfsUploadNotConfigured =>
|
||||
'Configure an IPFS upload provider in App Settings first.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkNoRoom =>
|
||||
'Not enough room for the image link. Shorten your message, then try again.';
|
||||
|
||||
@override
|
||||
String get chat_ipfsLinkOverLimit =>
|
||||
'Image link added, but the message is now too long. Shorten it before sending.';
|
||||
|
||||
@override
|
||||
String get chat_imagePickFailed => '无法打开该图片';
|
||||
|
||||
|
||||
Reference in new issue
Block a user