Skip to content

Commit

Permalink
Fix unprefixed i18n identifiers in examples (opensearch-project#8412)
Browse files Browse the repository at this point in the history
* Fix unprefixed and duplicate i18n identifiers in examples

Signed-off-by: Miki <[email protected]>

* Changeset file for PR opensearch-project#8412 created/updated

* Changeset file for PR opensearch-project#8412 created/updated

* Changeset file for PR opensearch-project#8412 created/updated

---------

Signed-off-by: Miki <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
1 parent f19e9fa commit 2f541ff
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8412.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix unprefixed i18n identifiers in examples ([#8412](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8412))
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class ListContainerFactoryDefinition
};

public getDisplayName() {
return i18n.translate('embeddableExamples.searchableListContainer.displayName', {
return i18n.translate('embeddableExamples.listContainer.displayName', {
defaultMessage: 'List container',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class TodoRefEmbeddableFactoryDefinition
}

public getDisplayName() {
return i18n.translate('embeddableExamples.todo.displayName', {
return i18n.translate('embeddableExamples.todoByReference.displayName', {
defaultMessage: 'Todo (by reference)',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const quickFormFn = (): ExpressionFunctionDefinition<
> => ({
name: 'quick-form',
type: 'render',
help: i18n.translate('expressionsExample.function.avatar.help', {
help: i18n.translate('expressionsExample.function.form.help', {
defaultMessage: 'Render a simple form that sends the value back as an event on click',
}),
args: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const DataSourceViaTopNavMenuExample = ({
iconType: 'save',
emphasize: true,
id: 'save',
label: i18n.translate('exampleApp.topNav', {
label: i18n.translate('multipleDataSourceExample.topNav', {
defaultMessage: `Save`,
}),
testId: 'mapSaveButton',
Expand Down
2 changes: 1 addition & 1 deletion examples/search_examples/public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const SearchExamplesApp = ({
<IndexPatternSelect
savedObjectsClient={savedObjectsClient}
placeholder={i18n.translate(
'backgroundSessionExample.selectIndexPatternPlaceholder',
'searchExamples.selectIndexPatternPlaceholder',
{
defaultMessage: 'Select index pattern',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const App = ({ navigation, data, history, osdUrlStateStorage }: StateDemoAppDeps
<EuiTitle size="l">
<h1>
<FormattedMessage
id="stateDemo.helloWorldText"
id="stateContainerExamples.helloWorldText"
defaultMessage="{name}!"
values={{ name: PLUGIN_NAME }}
/>
Expand Down

0 comments on commit 2f541ff

Please sign in to comment.