Skip to content

Commit

Permalink
NTP: Allow Remove widget option to be translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto authored and bsclifton committed Jan 23, 2020
1 parent 695efa1 commit ba90079
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions browser/ui/webui/brave_webui_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ void CustomizeWebUIHTMLSource(const std::string &name,
{ "day", IDS_BRAVE_NEW_TAB_DAY },
{ "days", IDS_BRAVE_NEW_TAB_DAYS },
{ "photoBy", IDS_BRAVE_NEW_TAB_PHOTO_BY },
{ "remove", IDS_BRAVE_NEW_TAB_REMOVE },
{ "preferencesPageTitle", IDS_BRAVE_NEW_TAB_PREFERENCES_PAGE_TITLE },
{ "bookmarksPageTitle", IDS_BRAVE_NEW_TAB_BOOKMARKS_PAGE_TITLE },
{ "historyPageTitle", IDS_BRAVE_NEW_TAB_HISTORY_PAGE_TITLE },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as React from 'react'
import { StyledWidgetMenuContainer, StyledWidgetMenu, StyledWidgetButton, StyledWidgetIcon, StyledSpan } from './styles'
import { IconButton } from '../../default'
import { CaratCircleODownIcon, CloseStrokeIcon } from 'brave-ui/components/icons'
import { getLocale } from '../../../../common/locale'

interface Props {
menuPosition: 'right' | 'left'
Expand Down Expand Up @@ -79,7 +80,7 @@ export default class WidgetMenu extends React.PureComponent<Props, State> {
onClick={this.unmountWidget}
>
<StyledWidgetIcon><CloseStrokeIcon/></StyledWidgetIcon>
<StyledSpan>Remove</StyledSpan>
<StyledSpan>{getLocale('remove')}</StyledSpan>
</StyledWidgetButton>
</StyledWidgetMenu>}
</StyledWidgetMenuContainer>
Expand Down
1 change: 1 addition & 0 deletions components/resources/brave_components_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
<message name="IDS_BRAVE_NEW_TAB_DAY" desc="Displays the number of days.">day</message>
<message name="IDS_BRAVE_NEW_TAB_DAYS" desc="Displays the number of days.">days</message>
<message name="IDS_BRAVE_NEW_TAB_PHOTO_BY" desc="Prefix for photographer name">Photo by</message>
<message name="IDS_BRAVE_NEW_TAB_REMOVE" desc="Shown as an option for a widget to remove itself">Remove</message>
<message name="IDS_BRAVE_NEW_TAB_PREFERENCES_PAGE_TITLE" desc="Title for preferences page">Edit Preferences</message>
<message name="IDS_BRAVE_NEW_TAB_BOOKMARKS_PAGE_TITLE" desc="Title for bookmarks page">View and Manage Bookmarks</message>
<message name="IDS_BRAVE_NEW_TAB_HISTORY_PAGE_TITLE" desc="Title for history page">View your browsing history</message>
Expand Down

0 comments on commit ba90079

Please sign in to comment.