Ver Fonte

Added missing gettext calls to the CommentComponent

Stefan Hammer há 2 anos atrás
pai
commit
906dfa2773

+ 1 - 0
CHANGELOG.txt

@@ -24,6 +24,7 @@ Changelog
  * Fix: Ensure the upgrade notification request for the latest release, which can be disabled via the `WAGTAIL_ENABLE_UPDATE_CHECK` sends the referrer origin with `strict-origin-when-cross-origin` (Karl Hobley)
  * Fix: Ensure radio buttons / checkboxes display vertically under Django 4.0 (Matt Westcott)
  * Fix: Ensure that custom document or image models support custom tag models (Matt Westcott)
+ * Fix: Ensure comments use translated values for their placeholder text (Stefan Hammer)
 
 
 3.0 (16.05.2022)

+ 2 - 2
client/src/components/CommentApp/components/Comment/index.tsx

@@ -160,7 +160,7 @@ export default class CommentComponent extends React.Component<CommentProps> {
         <form onSubmit={sendReply}>
           <TextArea
             className="comment__reply-input"
-            placeholder="Enter your reply..."
+            placeholder={gettext('Enter your reply...')}
             value={comment.newReply}
             onChange={onChangeNewReply}
           />
@@ -235,7 +235,7 @@ export default class CommentComponent extends React.Component<CommentProps> {
             className="comment__input"
             value={comment.newText}
             onChange={onChangeText}
-            placeholder="Enter your comments..."
+            placeholder={gettext('Enter your comments...')}
             additionalAttributes={{
               'aria-describedby': descriptionId,
             }}

+ 1 - 0
docs/releases/4.0.md

@@ -34,6 +34,7 @@ depth: 1
  * Ensure the upgrade notification request for the latest release, which can be disabled via the `WAGTAIL_ENABLE_UPDATE_CHECK` sends the referrer origin with `strict-origin-when-cross-origin` (Karl Hobley)
  * Ensure radio buttons / checkboxes display vertically under Django 4.0 (Matt Westcott)
  * Ensure that custom document or image models support custom tag models (Matt Westcott)
+ * Ensure comments use translated values for their placeholder text (Stefan Hammer)
 
 
 ## Upgrade considerations