Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unprefixed i18n identifiers in examples #8412

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
};

public getDisplayName() {
return i18n.translate('embeddableExamples.searchableListContainer.displayName', {
return i18n.translate('embeddableExamples.listContainer.displayName', {

Check warning on line 63 in examples/embeddable_examples/public/list_container/list_container_factory.ts

View check run for this annotation

Codecov / codecov/patch

examples/embeddable_examples/public/list_container/list_container_factory.ts#L63

Added line #L63 was not covered by tests
defaultMessage: 'List container',
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}

public getDisplayName() {
return i18n.translate('embeddableExamples.todo.displayName', {
return i18n.translate('embeddableExamples.todoByReference.displayName', {

Check warning on line 99 in examples/embeddable_examples/public/todo/todo_ref_embeddable_factory.tsx

View check run for this annotation

Codecov / codecov/patch

examples/embeddable_examples/public/todo/todo_ref_embeddable_factory.tsx#L99

Added line #L99 was not covered by tests
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
Loading