Просмотр исходного кода

Update word count modal text (#28251)

GitOrigin-RevId: 754dd01940ef42092b54eaed4117b93ba08dd816
Alf Eaton 1 год назад
Родитель
Сommit
309097a038

+ 1 - 0
services/web/frontend/extracted-translations.json

@@ -1923,6 +1923,7 @@
   "total_today": "",
   "total_with_subtotal_and_tax": "",
   "total_words": "",
+  "total_words_lower": "",
   "track_changes": "",
   "tracked_change_added": "",
   "tracked_change_deleted": "",

+ 1 - 1
services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.tsx

@@ -23,7 +23,7 @@ export default function WordCountModalContent({
     <>
       <OLModalHeader closeButton>
         <OLModalTitle>
-          {t('word_count')}{' '}
+          {t('word_count_lower')}{' '}
           <SplitTestBadge
             splitTestName="word-count-client"
             displayOnVariants={['enabled']}

+ 4 - 4
services/web/frontend/js/features/word-count-modal/components/word-counts-client.tsx

@@ -98,7 +98,7 @@ export const WordCountsClient: FC<{ data: WordCountData }> = ({ data }) => {
           </thead>
           <tbody>
             <tr>
-              <th style={{ width: 100 }}>{t('total_words')}:</th>
+              <th style={{ width: 100 }}>{t('total_words_lower')}:</th>
               <td style={{ width: 100, textAlign: 'right' }}>
                 {numberFormat.format(totals.words)}
               </td>
@@ -141,19 +141,19 @@ export const WordCountsClient: FC<{ data: WordCountData }> = ({ data }) => {
 
       <Row className="border-top py-2">
         <Col xs={12}>
-          <b>Headers:</b> {data.headers}
+          <b>{t('headers')}:</b> {data.headers}
         </Col>
       </Row>
 
       <Row className="border-top py-2">
         <Col xs={12}>
-          <b>Math Inline:</b> {data.mathInline}
+          <b>{t('inline_math')}:</b> {data.mathInline}
         </Col>
       </Row>
 
       <Row className="border-top py-2 pb-0">
         <Col xs={12}>
-          <b>Math Display:</b> {data.mathDisplay}
+          <b>{t('display_math')}:</b> {data.mathDisplay}
         </Col>
       </Row>
     </Container>

+ 1 - 0
services/web/locales/en.json

@@ -2455,6 +2455,7 @@
   "total_today": "Total today",
   "total_with_subtotal_and_tax": "Total: <0>__total__</0> (__subtotal__ + __tax__ tax) per year",
   "total_words": "Total Words",
+  "total_words_lower": "Total words",
   "tr": "Turkish",
   "track_changes": "Track changes",
   "tracked_change_added": "Added",

+ 1 - 1
services/web/test/frontend/features/word-count-modal/components/word-count-modal.spec.tsx

@@ -17,7 +17,7 @@ describe('<WordCountModal />', function () {
       </EditorProviders>
     )
 
-    cy.findByText('Word Count')
+    cy.findByText('Word count')
     cy.findByText(/something went wrong/).should('not.exist')
   })