v4: a comment and a chat message are edited in the same field as every text edited in place — each had an editor of its own: a comment's was its reply form, which showed a refused edit as a card and left the focus nowhere once closed, and a chat message's a box of its own with its own buttons and rules. InlineEdit gives its field, InlineEditField, to the components that open it with an action of their own, as these two do with their Edit and ✎: they keep those, a click on someone's message being no request to edit it. The field opens on the text with the caret at its end and as tall as the text, saves on Ctrl+Enter (and on Enter in the chat, where Shift+Enter breaks a line, as in its composer), leaves on Escape, sends nothing for a text left as it was, refuses an empty one, says why a save was refused in one line, and gives the focus back to the button that opened it, unless the caller has put it elsewhere, as the chat does to its composer. CommentForm only posts a comment or a reply now; ChatEditBox keeps only what is the chat's, scrolling itself into the list's view.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:140
|
||||
#: src/components/comment/CommentNode.tsx:137
|
||||
msgid "[deleted]"
|
||||
msgstr "[supprimé]"
|
||||
|
||||
@@ -471,11 +471,10 @@ msgstr "Connexion impossible"
|
||||
|
||||
#: src/components/category/CategoryManager.tsx:241
|
||||
#: src/components/category/CategoryManager.tsx:242
|
||||
#: src/components/chat/ChatEditBox.tsx:92
|
||||
#: src/components/comment/CommentForm.tsx:127
|
||||
#: src/components/comment/CommentForm.tsx:125
|
||||
#: src/components/dump/create/DumpCreateModal.tsx:746
|
||||
#: src/components/form/FormActions.tsx:42
|
||||
#: src/components/form/InlineEdit.tsx:277
|
||||
#: src/components/form/InlineEdit.tsx:318
|
||||
#: src/components/playlist/PlaylistEditForm.tsx:222
|
||||
#: src/components/shared/ConfirmModal.tsx:63
|
||||
#: src/pages/Authorize.tsx:158
|
||||
@@ -694,9 +693,9 @@ msgstr "Onglet par défaut"
|
||||
#: src/components/category/CategoryManager.tsx:253
|
||||
#: src/components/chat/ChatMessageItem.tsx:118
|
||||
#: src/components/chat/ChatMessageItem.tsx:119
|
||||
#: src/components/chat/ChatMessageItem.tsx:220
|
||||
#: src/components/chat/ChatMessageItem.tsx:217
|
||||
#: src/components/comment/CommentNode.tsx:259
|
||||
#: src/components/comment/CommentNode.tsx:265
|
||||
#: src/components/comment/CommentNode.tsx:271
|
||||
#: src/components/form/DeleteButton.tsx:36
|
||||
#: src/components/shared/ConfirmModal.tsx:34
|
||||
msgid "Delete"
|
||||
@@ -728,7 +727,7 @@ msgstr "Échec de la suppression ({0})"
|
||||
msgid "Delete playlist"
|
||||
msgstr "Supprimer la collection"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:270
|
||||
#: src/components/comment/CommentNode.tsx:264
|
||||
msgid "Delete this comment?"
|
||||
msgstr "Supprimer ce commentaire ?"
|
||||
|
||||
@@ -736,7 +735,7 @@ msgstr "Supprimer ce commentaire ?"
|
||||
msgid "Delete this dump? This cannot be undone."
|
||||
msgstr "Supprimer cette reco ? Cette action est irréversible."
|
||||
|
||||
#: src/components/chat/ChatMessageItem.tsx:219
|
||||
#: src/components/chat/ChatMessageItem.tsx:216
|
||||
msgid "Delete this message?"
|
||||
msgstr "Supprimer ce message ?"
|
||||
|
||||
@@ -829,7 +828,7 @@ msgstr "Plus tôt"
|
||||
#: src/components/chat/ChatMessageItem.tsx:107
|
||||
#: src/components/chat/ChatMessageItem.tsx:108
|
||||
#: src/components/chat/PendingItem.tsx:93
|
||||
#: src/components/comment/CommentNode.tsx:256
|
||||
#: src/components/comment/CommentNode.tsx:250
|
||||
#: src/components/playlist/PlaylistHeader.tsx:104
|
||||
#: src/pages/Dump.tsx:556
|
||||
msgid "Edit"
|
||||
@@ -867,7 +866,7 @@ msgstr "modifié"
|
||||
#. placeholder {0}: relativeTime(dump.updatedAt)
|
||||
#. placeholder {0}: relativeTime(message.updatedAt)
|
||||
#: src/components/chat/ChatMessageItem.tsx:132
|
||||
#: src/components/comment/CommentNode.tsx:205
|
||||
#: src/components/comment/CommentNode.tsx:202
|
||||
#: src/components/playlist/PlaylistHeader.tsx:158
|
||||
#: src/pages/Dump.tsx:492
|
||||
msgid "edited {0}"
|
||||
@@ -877,7 +876,7 @@ msgstr "modifié {0}"
|
||||
#. placeholder {0}: dump.updatedAt.toLocaleString()
|
||||
#. placeholder {0}: message.updatedAt.toLocaleString()
|
||||
#: src/components/chat/ChatMessageItem.tsx:128
|
||||
#: src/components/comment/CommentNode.tsx:203
|
||||
#: src/components/comment/CommentNode.tsx:200
|
||||
#: src/components/playlist/PlaylistHeader.tsx:156
|
||||
#: src/pages/Dump.tsx:490
|
||||
msgid "Edited {0}"
|
||||
@@ -938,7 +937,7 @@ msgstr "Publication échouée"
|
||||
msgid "Failed to post comment"
|
||||
msgstr "Impossible de publier le commentaire"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:291
|
||||
#: src/components/comment/CommentNode.tsx:285
|
||||
msgid "Failed to post reply"
|
||||
msgstr "Impossible de publier la réponse"
|
||||
|
||||
@@ -952,10 +951,6 @@ msgstr "Enregistrement échoué"
|
||||
msgid "Failed to save category"
|
||||
msgstr "Échec de l’enregistrement de la catégorie"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:218
|
||||
msgid "Failed to save edit"
|
||||
msgstr "Impossible d'enregistrer la modification"
|
||||
|
||||
#: src/components/profile/ProfileHeader.tsx:174
|
||||
msgid "Failed to update avatar"
|
||||
msgstr "Impossible de mettre à jour l'avatar"
|
||||
@@ -1538,11 +1533,11 @@ msgstr "Collections"
|
||||
msgid "Post comment"
|
||||
msgstr "Publier le commentaire"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:289
|
||||
#: src/components/comment/CommentNode.tsx:283
|
||||
msgid "Post reply"
|
||||
msgstr "Publier la réponse"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:290
|
||||
#: src/components/comment/CommentNode.tsx:284
|
||||
#: src/components/comment/CommentThread.tsx:100
|
||||
#: src/components/dump/create/DumpCreateModal.tsx:752
|
||||
msgid "Posting…"
|
||||
@@ -1640,7 +1635,7 @@ msgstr "Remplacer le fichier"
|
||||
|
||||
#: src/components/chat/ChatMessageItem.tsx:97
|
||||
#: src/components/chat/ChatMessageItem.tsx:98
|
||||
#: src/components/comment/CommentNode.tsx:244
|
||||
#: src/components/comment/CommentNode.tsx:240
|
||||
msgid "Reply"
|
||||
msgstr "Répondre"
|
||||
|
||||
@@ -1697,16 +1692,13 @@ msgid "Role"
|
||||
msgstr "Rôle"
|
||||
|
||||
#: src/components/category/CategoryManager.tsx:232
|
||||
#: src/components/chat/ChatEditBox.tsx:85
|
||||
#: src/components/comment/CommentNode.tsx:216
|
||||
#: src/components/form/InlineEdit.tsx:269
|
||||
#: src/components/form/InlineEdit.tsx:310
|
||||
#: src/components/playlist/PlaylistEditForm.tsx:229
|
||||
#: src/pages/DumpEdit.tsx:564
|
||||
msgid "Save"
|
||||
msgstr "Enregistrer"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:217
|
||||
#: src/components/form/InlineEdit.tsx:266
|
||||
#: src/components/form/InlineEdit.tsx:307
|
||||
#: src/components/playlist/PlaylistEditForm.tsx:226
|
||||
#: src/components/profile/ChangePasswordModal.tsx:119
|
||||
#: src/pages/ResetPassword.tsx:191
|
||||
@@ -1878,7 +1870,7 @@ msgstr "Le mois sur {site}, {range}"
|
||||
msgid "The new order couldn't be saved. Try again."
|
||||
msgstr "Le nouvel ordre n'a pas pu être enregistré. Réessayez."
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:282
|
||||
#: src/components/comment/CommentNode.tsx:276
|
||||
msgid "This comment couldn't be deleted. Try again."
|
||||
msgstr "Ce commentaire n'a pas pu être supprimé. Réessayez."
|
||||
|
||||
@@ -2163,7 +2155,7 @@ msgstr "Pourquoi & où"
|
||||
msgid "Why?"
|
||||
msgstr "Pourquoi ?"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:293
|
||||
#: src/components/comment/CommentNode.tsx:287
|
||||
msgid "Write a reply…"
|
||||
msgstr "Écrire une réponse…"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user