Skip to content

Commit

Permalink
Fix dynamic uses of i18n in core (#8392)
Browse files Browse the repository at this point in the history
* Fix dynamic uses of i18n in core

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

* Changeset file for PR #8392 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 1f9da21 commit 8ff905f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/8392.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix dynamic uses of i18n in core ([#8392](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8392))
2 changes: 1 addition & 1 deletion src/core/public/i18n/i18n_eui_mapping.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export const getEuiContextMapping = () => {
),
'euiFilterButton.filterBadge': ({ count, hasActiveFilters }: EuiValues) =>
i18n.translate('core.euiFilterButton.filterBadge', {
defaultMessage: '${count} ${filterCountLabel} filters',
defaultMessage: '{count} {filterCountLabel} filters',
values: { count, filterCountLabel: hasActiveFilters ? 'active' : 'available' },
}),
'euiForm.addressFormErrors': i18n.translate('core.euiForm.addressFormErrors', {
Expand Down
7 changes: 5 additions & 2 deletions src/core/server/rendering/views/template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,14 @@ export const Template: FunctionComponent<Props> = ({
<div
className="osdWelcomeText"
data-error-message={i18n('core.ui.welcomeErrorMessage', {
defaultMessage: `${applicationTitle} did not load properly. Check the server output for more information.`,
defaultMessage:
'{applicationTitle} did not load properly. Check the server output for more information.',
values: { applicationTitle },
})}
>
{i18n('core.ui.welcomeMessage', {
defaultMessage: `Loading ${applicationTitle}`,
defaultMessage: 'Loading {applicationTitle}',
values: { applicationTitle },
})}
</div>
{/* Show a progress bar if a static custom branded logo is used */}
Expand Down

0 comments on commit 8ff905f

Please sign in to comment.