Skip to content

Commit

Permalink
Ensure that translated strings including page titles are in the corre…
Browse files Browse the repository at this point in the history
…ct order for all languages, and add quote marks around the page title for consistency with other labels
  • Loading branch information
helenb committed Jun 19, 2019
1 parent 5ac353d commit f35e27c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Explorer/ExplorerItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ const ExplorerItem = ({ item, onClick }) => {
href={`${ADMIN_URLS.PAGES}${id}/edit/`}
className="c-explorer__item__action c-explorer__item__action--small"
>
<Icon name="edit" title={`${STRINGS.EDIT} ${title}`} />
<Icon name="edit" title={STRINGS.EDIT_PAGE.replace('{0}', `'${title}'`)} />
</Button>
{hasChildren ? (
<Button
className="c-explorer__item__action"
onClick={onClick}
href={`${ADMIN_URLS.PAGES}${id}/`}
>
<Icon name="arrow-right" title={`${STRINGS.VIEW_CHILD_PAGES_OF} ${title}`} />
<Icon name="arrow-right" title={STRINGS.VIEW_CHILD_PAGES_OF_PAGE.replace('{0}', `'${title}'`)} />
</Button>
) : null}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exports[`ExplorerItem children 1`] = `
<Icon
className={null}
name="edit"
title="Edit test"
title="Edit 'test'"
/>
</Button>
<Button
Expand All @@ -54,7 +54,7 @@ exports[`ExplorerItem children 1`] = `
<Icon
className={null}
name="arrow-right"
title="View child pages of test"
title="View child pages of 'test'"
/>
</Button>
</div>
Expand Down Expand Up @@ -93,7 +93,7 @@ exports[`ExplorerItem renders 1`] = `
<Icon
className={null}
name="edit"
title="Edit test"
title="Edit 'test'"
/>
</Button>
</div>
Expand Down Expand Up @@ -150,7 +150,7 @@ exports[`ExplorerItem should show a publication status if not live 1`] = `
<Icon
className={null}
name="edit"
title="Edit test"
title="Edit 'test'"
/>
</Button>
<Button
Expand All @@ -166,7 +166,7 @@ exports[`ExplorerItem should show a publication status if not live 1`] = `
<Icon
className={null}
name="arrow-right"
title="View child pages of test"
title="View child pages of 'test'"
/>
</Button>
</div>
Expand Down Expand Up @@ -223,7 +223,7 @@ exports[`ExplorerItem should show a publication status with unpublished changes
<Icon
className={null}
name="edit"
title="Edit test"
title="Edit 'test'"
/>
</Button>
<Button
Expand All @@ -239,7 +239,7 @@ exports[`ExplorerItem should show a publication status with unpublished changes
<Icon
className={null}
name="arrow-right"
title="View child pages of test"
title="View child pages of 'test'"
/>
</Button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion client/tests/stubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ global.wagtailConfig = {
EDITOR_CRASH: 'The editor just crashed. Content has been reset to the last saved version.',
BROKEN_LINK: 'Broken link',
MISSING_DOCUMENT: 'Missing document',
VIEW_CHILD_PAGES_OF: 'View child pages of',
EDIT_PAGE: 'Edit {0}',
VIEW_CHILD_PAGES_OF_PAGE: 'View child pages of {0}',
},
};

Expand Down
3 changes: 2 additions & 1 deletion wagtail/admin/templates/wagtailadmin/admin_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
EDITOR_CRASH: "{% trans 'The editor just crashed. Content has been reset to the last saved version.' %}",
BROKEN_LINK: "{% trans 'Broken link' %}",
MISSING_DOCUMENT: "{% trans 'Missing document' %}",
VIEW_CHILD_PAGES_OF: "{% trans 'View child pages of' %}",
EDIT_PAGE: "{% trans 'Edit {0}' %}",
VIEW_CHILD_PAGES_OF_PAGE: "{% trans 'View child pages of {0}' %}",

MONTHS: [
"{% trans 'January' %}",
Expand Down

0 comments on commit f35e27c

Please sign in to comment.