Skip to content

Commit

Permalink
fixing translation ids
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Apr 13, 2021
1 parent 4d98b7d commit 21f6ce6
Show file tree
Hide file tree
Showing 49 changed files with 336 additions and 267 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const AboutPanel: FC<Props> = ({ onFilePickerChange }) => {
<EuiFilePicker
id="filePicker"
initialPromptText={i18n.translate(
'xpack.fileUpload.aboutPanel.selectOrDragAndDropFileDescription',
'xpack.fileDataVisualizer.aboutPanel.selectOrDragAndDropFileDescription',
{
defaultMessage: 'Select or drag and drop a file',
}
Expand All @@ -70,7 +70,7 @@ export const LoadingPanel: FC = () => {
<EuiTitle size="s">
<h1 role="alert">
<FormattedMessage
id="xpack.fileUpload.aboutPanel.analyzingDataTitle"
id="xpack.fileDataVisualizer.aboutPanel.analyzingDataTitle"
defaultMessage="Analyzing data"
/>
</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { getMaxBytesFormatted } from '../../../../../file_upload/public';

export const WelcomeContent: FC = () => {
const toolTipContent = i18n.translate(
'xpack.fileUpload.welcomeContent.experimentalFeatureTooltip',
'xpack.fileDataVisualizer.welcomeContent.experimentalFeatureTooltip',
{
defaultMessage: "Experimental feature. We'd love to hear your feedback.",
}
Expand All @@ -42,7 +42,7 @@ export const WelcomeContent: FC = () => {
<EuiTitle size="m">
<h1>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.visualizeDataFromLogFileTitle"
id="xpack.fileDataVisualizer.welcomeContent.visualizeDataFromLogFileTitle"
defaultMessage="Visualize data from a log file&nbsp;{experimentalBadge}"
values={{
experimentalBadge: <ExperimentalBadge tooltipContent={toolTipContent} />,
Expand All @@ -54,7 +54,7 @@ export const WelcomeContent: FC = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.visualizeDataFromLogFileDescription"
id="xpack.fileDataVisualizer.welcomeContent.visualizeDataFromLogFileDescription"
defaultMessage="The File Data Visualizer helps you understand the fields and metrics in a log file.
Upload your file, analyze its data, and then choose whether to import the data into an Elasticsearch index."
/>
Expand All @@ -64,7 +64,7 @@ export const WelcomeContent: FC = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.supportedFileFormatDescription"
id="xpack.fileDataVisualizer.welcomeContent.supportedFileFormatDescription"
defaultMessage="The File Data Visualizer supports these file formats:"
/>
</p>
Expand All @@ -78,7 +78,7 @@ export const WelcomeContent: FC = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.delimitedTextFilesDescription"
id="xpack.fileDataVisualizer.welcomeContent.delimitedTextFilesDescription"
defaultMessage="Delimited text files, such as CSV and TSV"
/>
</p>
Expand All @@ -94,7 +94,7 @@ export const WelcomeContent: FC = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.newlineDelimitedJsonDescription"
id="xpack.fileDataVisualizer.welcomeContent.newlineDelimitedJsonDescription"
defaultMessage="Newline-delimited JSON"
/>
</p>
Expand All @@ -110,7 +110,7 @@ export const WelcomeContent: FC = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.logFilesWithCommonFormatDescription"
id="xpack.fileDataVisualizer.welcomeContent.logFilesWithCommonFormatDescription"
defaultMessage="Log files with a common format for the timestamp"
/>
</p>
Expand All @@ -121,7 +121,7 @@ export const WelcomeContent: FC = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.uploadedFilesAllowedSizeDescription"
id="xpack.fileDataVisualizer.welcomeContent.uploadedFilesAllowedSizeDescription"
defaultMessage="You can upload files up to {maxFileSize}."
values={{ maxFileSize }}
/>
Expand All @@ -131,7 +131,7 @@ export const WelcomeContent: FC = () => {
<EuiText>
<p>
<FormattedMessage
id="xpack.fileUpload.welcomeContent.experimentalFeatureDescription"
id="xpack.fileDataVisualizer.welcomeContent.experimentalFeatureDescription"
defaultMessage="This feature is experimental. Got feedback? Please create an issue in&nbsp;{githubLink}."
values={{
githubLink: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const AnalysisSummary: FC<{ results: FindFileStructureResponse }> = ({ re
<EuiTitle size="s">
<h2>
<FormattedMessage
id="xpack.fileUpload.analysisSummary.summaryTitle"
id="xpack.fileDataVisualizer.analysisSummary.summaryTitle"
defaultMessage="Summary"
/>
</h2>
Expand All @@ -37,7 +37,7 @@ function createDisplayItems(results: FindFileStructureResponse) {
{
title: (
<FormattedMessage
id="xpack.fileUpload.analysisSummary.analyzedLinesNumberTitle"
id="xpack.fileDataVisualizer.analysisSummary.analyzedLinesNumberTitle"
defaultMessage="Number of lines analyzed"
/>
),
Expand All @@ -53,7 +53,7 @@ function createDisplayItems(results: FindFileStructureResponse) {
items.push({
title: (
<FormattedMessage
id="xpack.fileUpload.analysisSummary.formatTitle"
id="xpack.fileDataVisualizer.analysisSummary.formatTitle"
defaultMessage="Format"
/>
),
Expand All @@ -64,7 +64,7 @@ function createDisplayItems(results: FindFileStructureResponse) {
items.push({
title: (
<FormattedMessage
id="xpack.fileUpload.analysisSummary.delimiterTitle"
id="xpack.fileDataVisualizer.analysisSummary.delimiterTitle"
defaultMessage="Delimiter"
/>
),
Expand All @@ -74,7 +74,7 @@ function createDisplayItems(results: FindFileStructureResponse) {
items.push({
title: (
<FormattedMessage
id="xpack.fileUpload.analysisSummary.hasHeaderRowTitle"
id="xpack.fileDataVisualizer.analysisSummary.hasHeaderRowTitle"
defaultMessage="Has header row"
/>
),
Expand All @@ -87,7 +87,7 @@ function createDisplayItems(results: FindFileStructureResponse) {
items.push({
title: (
<FormattedMessage
id="xpack.fileUpload.analysisSummary.grokPatternTitle"
id="xpack.fileDataVisualizer.analysisSummary.grokPatternTitle"
defaultMessage="Grok pattern"
/>
),
Expand All @@ -99,7 +99,7 @@ function createDisplayItems(results: FindFileStructureResponse) {
items.push({
title: (
<FormattedMessage
id="xpack.fileUpload.analysisSummary.timeFieldTitle"
id="xpack.fileDataVisualizer.analysisSummary.timeFieldTitle"
defaultMessage="Time field"
/>
),
Expand All @@ -111,7 +111,7 @@ function createDisplayItems(results: FindFileStructureResponse) {
items.push({
title: (
<FormattedMessage
id="xpack.fileUpload.analysisSummary.timeFormatTitle"
id="xpack.fileDataVisualizer.analysisSummary.timeFormatTitle"
defaultMessage="Time {timestampFormats, plural, zero {format} one {format} other {formats}}"
values={{
timestampFormats: results.java_timestamp_formats.length,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const BottomBar: FC<BottomBarProps> = ({ mode, onChangeMode, onCancel, di
content={
disableImport ? (
<FormattedMessage
id="xpack.fileUpload.bottomBar.missingImportPrivilegesMessage"
id="xpack.fileDataVisualizer.bottomBar.missingImportPrivilegesMessage"
defaultMessage="You require the ingest_admin role to enable data importing"
/>
) : null
Expand All @@ -52,7 +52,7 @@ export const BottomBar: FC<BottomBarProps> = ({ mode, onChangeMode, onCancel, di
data-test-subj="mlFileDataVisOpenImportPageButton"
>
<FormattedMessage
id="xpack.fileUpload.bottomBar.readMode.importButtonLabel"
id="xpack.fileDataVisualizer.bottomBar.readMode.importButtonLabel"
defaultMessage="Import"
/>
</EuiButton>
Expand All @@ -61,7 +61,7 @@ export const BottomBar: FC<BottomBarProps> = ({ mode, onChangeMode, onCancel, di
<EuiFlexItem grow={false}>
<EuiButtonEmpty color="ghost" onClick={() => onCancel()}>
<FormattedMessage
id="xpack.fileUpload.bottomBar.readMode.cancelButtonLabel"
id="xpack.fileDataVisualizer.bottomBar.readMode.cancelButtonLabel"
defaultMessage="Cancel"
/>
</EuiButtonEmpty>
Expand All @@ -76,15 +76,15 @@ export const BottomBar: FC<BottomBarProps> = ({ mode, onChangeMode, onCancel, di
<EuiFlexItem grow={false}>
<EuiButton color="ghost" onClick={() => onChangeMode(DATAVISUALIZER_MODE.READ)}>
<FormattedMessage
id="xpack.fileUpload.bottomBar.backButtonLabel"
id="xpack.fileDataVisualizer.bottomBar.backButtonLabel"
defaultMessage="Back"
/>
</EuiButton>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmpty color="ghost" onClick={() => onCancel()}>
<FormattedMessage
id="xpack.fileUpload.bottomBar.cancelButtonLabel"
id="xpack.fileDataVisualizer.bottomBar.cancelButtonLabel"
defaultMessage="Cancel"
/>
</EuiButtonEmpty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class CombinedFieldsForm extends Component<Props, State> {
return JSON.parse(this.props.mappingsString);
} catch (error) {
throw new Error(
i18n.translate('xpack.fileUpload.combinedFieldsForm.mappingsParseError', {
i18n.translate('xpack.fileDataVisualizer.combinedFieldsForm.mappingsParseError', {
defaultMessage: 'Error parsing mappings: {error}',
values: { error: error.message },
})
Expand All @@ -127,7 +127,7 @@ export class CombinedFieldsForm extends Component<Props, State> {
return JSON.parse(this.props.pipelineString);
} catch (error) {
throw new Error(
i18n.translate('xpack.fileUpload.combinedFieldsForm.pipelineParseError', {
i18n.translate('xpack.fileDataVisualizer.combinedFieldsForm.pipelineParseError', {
defaultMessage: 'Error parsing pipeline: {error}',
values: { error: error.message },
})
Expand All @@ -153,7 +153,7 @@ export class CombinedFieldsForm extends Component<Props, State> {
};

render() {
const geoPointLabel = i18n.translate('xpack.fileUpload.geoPointCombinedFieldLabel', {
const geoPointLabel = i18n.translate('xpack.fileDataVisualizer.geoPointCombinedFieldLabel', {
defaultMessage: 'Add geo point field',
});
const panels = [
Expand All @@ -180,7 +180,7 @@ export class CombinedFieldsForm extends Component<Props, State> {
];
return (
<EuiFormRow
label={i18n.translate('xpack.fileUpload.combinedFieldsLabel', {
label={i18n.translate('xpack.fileDataVisualizer.combinedFieldsLabel', {
defaultMessage: 'Combined fields',
})}
>
Expand All @@ -196,12 +196,15 @@ export class CombinedFieldsForm extends Component<Props, State> {
iconType="trash"
color="danger"
onClick={this.removeCombinedField.bind(null, idx)}
title={i18n.translate('xpack.fileUpload.removeCombinedFieldsLabel', {
defaultMessage: 'Remove combined field',
})}
aria-label={i18n.translate('xpack.fileUpload.removeCombinedFieldsLabel', {
title={i18n.translate('xpack.fileDataVisualizer.removeCombinedFieldsLabel', {
defaultMessage: 'Remove combined field',
})}
aria-label={i18n.translate(
'xpack.fileDataVisualizer.removeCombinedFieldsLabel',
{
defaultMessage: 'Remove combined field',
}
)}
/>
</EuiFlexItem>
)}
Expand All @@ -217,7 +220,7 @@ export class CombinedFieldsForm extends Component<Props, State> {
isDisabled={this.props.isDisabled}
>
<FormattedMessage
id="xpack.fileUpload.addCombinedFieldsLabel"
id="xpack.fileDataVisualizer.addCombinedFieldsLabel"
defaultMessage="Add combined field"
/>
</EuiButtonEmpty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export function CombinedFieldsReadOnlyForm({
}) {
return combinedFields.length ? (
<EuiFormRow
label={i18n.translate('xpack.fileUpload.combinedFieldsReadOnlyLabel', {
label={i18n.translate('xpack.fileDataVisualizer.combinedFieldsReadOnlyLabel', {
defaultMessage: 'Combined fields',
})}
helpText={i18n.translate('xpack.fileUpload.combinedFieldsReadOnlyHelpTextLabel', {
helpText={i18n.translate('xpack.fileDataVisualizer.combinedFieldsReadOnlyHelpTextLabel', {
defaultMessage: 'Edit combined fields in advanced tab',
})}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class GeoPointForm extends Component<Props, State> {
return (
<Fragment>
<EuiFormRow
label={i18n.translate('xpack.fileUpload.geoPointForm.latFieldLabel', {
label={i18n.translate('xpack.fileDataVisualizer.geoPointForm.latFieldLabel', {
defaultMessage: 'Latitude field',
})}
>
Expand All @@ -131,7 +131,7 @@ export class GeoPointForm extends Component<Props, State> {
</EuiFormRow>

<EuiFormRow
label={i18n.translate('xpack.fileUpload.geoPointForm.lonFieldLabel', {
label={i18n.translate('xpack.fileDataVisualizer.geoPointForm.lonFieldLabel', {
defaultMessage: 'Longitude field',
})}
>
Expand All @@ -143,7 +143,7 @@ export class GeoPointForm extends Component<Props, State> {
</EuiFormRow>

<EuiFormRow
label={i18n.translate('xpack.fileUpload.geoPointForm.geoPointFieldLabel', {
label={i18n.translate('xpack.fileDataVisualizer.geoPointForm.geoPointFieldLabel', {
defaultMessage: 'Geo point field',
})}
isInvalid={this.state.geoPointFieldError !== ''}
Expand All @@ -153,9 +153,12 @@ export class GeoPointForm extends Component<Props, State> {
value={this.state.geoPointField}
onChange={this.onGeoPointFieldChange}
isInvalid={this.state.geoPointFieldError !== ''}
aria-label={i18n.translate('xpack.fileUpload.geoPointForm.geoPointFieldAriaLabel', {
defaultMessage: 'Geo point field, required field',
})}
aria-label={i18n.translate(
'xpack.fileDataVisualizer.geoPointForm.geoPointFieldAriaLabel',
{
defaultMessage: 'Geo point field, required field',
}
)}
/>
</EuiFormRow>

Expand All @@ -176,7 +179,7 @@ export class GeoPointForm extends Component<Props, State> {
onClick={this.onSubmit}
>
<FormattedMessage
id="xpack.fileUpload.geoPointForm.submitButtonLabel"
id="xpack.fileDataVisualizer.geoPointForm.submitButtonLabel"
defaultMessage="Add"
/>
</EuiButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function createGeoPointCombinedField(
}

export function getNameCollisionMsg(name: string) {
return i18n.translate('xpack.fileUpload.nameCollisionMsg', {
return i18n.translate('xpack.fileDataVisualizer.nameCollisionMsg', {
defaultMessage: '"{name}" already exists, please provide a unique name',
values: { name },
});
Expand Down

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

Loading

0 comments on commit 21f6ce6

Please sign in to comment.