Skip to content

Commit

Permalink
Merge pull request #8 from kaltura/FEC-13988-download-document-title
Browse files Browse the repository at this point in the history
fix(FEC-13988): changed "download" title
  • Loading branch information
semarche-kaltura authored Jul 18, 2024
2 parents d4b930b + 02a620f commit 05b4e84
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/document-player.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Document player', () => {
cy.intercept('GET', 'https://mock-download-document/1', { statusCode: 200 }).as('downloadUrl');
cy.get('[data-testid="doc-player-text-wrapper"]').should(
'have.text',
'Accessibility Deck - latest presentation is unavailable, download to view.'
'Click to download Accessibility Deck - latest presentation'
);
cy.get('[data-testid="doc-player-button"]').should('exist');
cy.get('[data-testid="doc-player-button"]').should('have.text', 'Download document');
Expand Down
4 changes: 2 additions & 2 deletions src/components/doc-overlay/doc-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { withText, Text } = ui.preacti18n;
const translates = {
previewText: <Text id="docPlayer.previewText">Click to view</Text>,
previewButtonText: <Text id="docPlayer.previewButtonText">View document</Text>,
downloadText: <Text id="docPlayer.downloadText">is unavailable, download to view.</Text>,
downloadText: <Text id="docPlayer.downloadText">Click to download</Text>,
downloadButtonText: <Text id="docPlayer.downloadButtonText">Download document</Text>,
contentUnavailableText: <Text id="docPlayer.contentUnavailableText">is unavailable to view.</Text>
};
Expand All @@ -36,7 +36,7 @@ export const DocumentOverlay = withText(translates)((props: DocumentOverlayProps
};
} else if (props.onDownload) {
return {
text: `${props.sourceName} ${props.downloadText!}`,
text: `${props.downloadText!} ${props.sourceName}`,
buttonText: props.downloadButtonText!,
onClick: props.onDownload
};
Expand Down
2 changes: 1 addition & 1 deletion translations/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"docPlayer": {
"previewText": "Click to view",
"previewButtonText": "View document",
"downloadText": "is unavailable, download to view.",
"downloadText": "Click to download",
"downloadButtonText": "Download document",
"contentUnavailableText": "is unavailable to view."
}
Expand Down

0 comments on commit 05b4e84

Please sign in to comment.