Skip to content

Commit

Permalink
fix i18ns
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Nov 13, 2019
1 parent 8eb4743 commit f48be82
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 75 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dashboardEmbeddableContainer": "src/plugins/dashboard_embeddable_container",
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"embeddableApi": "src/plugins/embeddable",
"share": "src/plugins/share",
"esUi": "src/plugins/es_ui_shared",
"expressions_np": "src/plugins/expressions",
"expressions": "src/legacy/core_plugins/expressions",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/plugins/share/public/components/share_context_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class ShareContextMenu extends Component<Props> {

const permalinkPanel = {
id: panels.length + 1,
title: i18n.translate('common.ui.share.contextMenu.permalinkPanelTitle', {
title: i18n.translate('share.contextMenu.permalinkPanelTitle', {
defaultMessage: 'Permalink',
}),
content: (
Expand All @@ -77,7 +77,7 @@ export class ShareContextMenu extends Component<Props> {
),
};
menuItems.push({
name: i18n.translate('common.ui.share.contextMenu.permalinksLabel', {
name: i18n.translate('share.contextMenu.permalinksLabel', {
defaultMessage: 'Permalinks',
}),
icon: 'link',
Expand All @@ -89,7 +89,7 @@ export class ShareContextMenu extends Component<Props> {
if (this.props.allowEmbed) {
const embedPanel = {
id: panels.length + 1,
title: i18n.translate('common.ui.share.contextMenu.embedCodePanelTitle', {
title: i18n.translate('share.contextMenu.embedCodePanelTitle', {
defaultMessage: 'Embed Code',
}),
content: (
Expand All @@ -106,7 +106,7 @@ export class ShareContextMenu extends Component<Props> {
};
panels.push(embedPanel);
menuItems.push({
name: i18n.translate('common.ui.share.contextMenu.embedCodeLabel', {
name: i18n.translate('share.contextMenu.embedCodeLabel', {
defaultMessage: 'Embed code',
}),
icon: 'console',
Expand All @@ -130,7 +130,7 @@ export class ShareContextMenu extends Component<Props> {
if (menuItems.length > 1) {
const topLevelMenuPanel = {
id: panels.length + 1,
title: i18n.translate('common.ui.share.contextMenuTitle', {
title: i18n.translate('share.contextMenuTitle', {
defaultMessage: 'Share this {objectType}',
values: {
objectType: this.props.objectType,
Expand Down
26 changes: 10 additions & 16 deletions src/plugins/share/public/components/url_panel_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ export class UrlPanelContent extends Component<Props, State> {
>
{this.props.isEmbedded ? (
<FormattedMessage
id="common.ui.share.urlPanel.copyIframeCodeButtonLabel"
id="share.urlPanel.copyIframeCodeButtonLabel"
defaultMessage="Copy iFrame code"
/>
) : (
<FormattedMessage
id="common.ui.share.urlPanel.copyLinkButtonLabel"
id="share.urlPanel.copyLinkButtonLabel"
defaultMessage="Copy link"
/>
)}
Expand Down Expand Up @@ -288,12 +288,9 @@ export class UrlPanelContent extends Component<Props, State> {
{
id: ExportUrlAsType.EXPORT_URL_AS_SNAPSHOT,
label: this.renderWithIconTip(
<FormattedMessage id="share.urlPanel.snapshotLabel" defaultMessage="Snapshot" />,
<FormattedMessage
id="common.ui.share.urlPanel.snapshotLabel"
defaultMessage="Snapshot"
/>,
<FormattedMessage
id="common.ui.share.urlPanel.snapshotDescription"
id="share.urlPanel.snapshotDescription"
defaultMessage="Snapshot URLs encode the current state of the {objectType} in the URL itself.
Edits to the saved {objectType} won't be visible via this URL."
values={{ objectType: this.props.objectType }}
Expand All @@ -305,12 +302,9 @@ export class UrlPanelContent extends Component<Props, State> {
id: ExportUrlAsType.EXPORT_URL_AS_SAVED_OBJECT,
disabled: this.isNotSaved(),
label: this.renderWithIconTip(
<FormattedMessage id="share.urlPanel.savedObjectLabel" defaultMessage="Saved object" />,
<FormattedMessage
id="common.ui.share.urlPanel.savedObjectLabel"
defaultMessage="Saved object"
/>,
<FormattedMessage
id="common.ui.share.urlPanel.savedObjectDescription"
id="share.urlPanel.savedObjectDescription"
defaultMessage="You can share this URL with people to let them load the most recent saved version of this {objectType}."
values={{ objectType: this.props.objectType }}
/>
Expand All @@ -334,7 +328,7 @@ export class UrlPanelContent extends Component<Props, State> {
private renderExportAsRadioGroup = () => {
const generateLinkAsHelp = this.isNotSaved() ? (
<FormattedMessage
id="common.ui.share.urlPanel.canNotShareAsSavedObjectHelpText"
id="share.urlPanel.canNotShareAsSavedObjectHelpText"
defaultMessage="Can't share as saved object until the {objectType} has been saved."
values={{ objectType: this.props.objectType }}
/>
Expand All @@ -345,7 +339,7 @@ export class UrlPanelContent extends Component<Props, State> {
<EuiFormRow
label={
<FormattedMessage
id="common.ui.share.urlPanel.generateLinkAsLabel"
id="share.urlPanel.generateLinkAsLabel"
defaultMessage="Generate the link as"
/>
}
Expand All @@ -368,7 +362,7 @@ export class UrlPanelContent extends Component<Props, State> {
return;
}
const shortUrlLabel = (
<FormattedMessage id="common.ui.share.urlPanel.shortUrlLabel" defaultMessage="Short URL" />
<FormattedMessage id="share.urlPanel.shortUrlLabel" defaultMessage="Short URL" />
);
const switchLabel = this.state.isCreatingShortUrl ? (
<span>
Expand All @@ -387,7 +381,7 @@ export class UrlPanelContent extends Component<Props, State> {
);
const tipContent = (
<FormattedMessage
id="common.ui.share.urlPanel.shortUrlHelpText"
id="share.urlPanel.shortUrlHelpText"
defaultMessage="We recommend sharing shortened snapshot URLs for maximum compatibility.
Internet Explorer has URL length restrictions,
and some wiki and markup parsers don't do well with the full-length version of the snapshot URL,
Expand Down
Loading

0 comments on commit f48be82

Please sign in to comment.