-
Notifications
You must be signed in to change notification settings - Fork 36
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
[Refactoring] User-Facing Strings Should Be Wrapped #330
Comments
@sejli I'd like to pick this up |
Thanks for picking it up @nung22 ! |
Notes for wrapping user-facing stringsCollection of resources for completing this task. ProceduresI18n ProviderTranslated components need to be wrapped by Before translation: export const Flyout = () => {
const { setShowFlyout } = useSearchRelevanceContext();
return (
<EuiFlyout>
{...}
</EuiFlyout>
);
}; After translation: import { I18nProvider, FormattedMessage } from '@osd/i18n/react';
export const Flyout = () => {
const { setShowFlyout } = useSearchRelevanceContext();
return (
<I18nProvider>
<EuiFlyout>
{...}
</EuiFlyout>
</I18nProvider>
);
}; Simple MessageBefore translation: <p>Add at least one query to display search results.</p> After translation: <p>
<FormattedMessage
id="searchRelevance.result.noQueryPrompt"
defaultMessage="Add at least one query to display search results."
/>
</p> Complex Message (contains other tags like
|
Description
This has been brought to attention by this comment on a PR. We have many user-facing strings that are not wrapped for internalization. This is not consistent with OpenSearch Dashboards guidelines. User-facing strings should be updated to be compatible with the default message extraction tool.
OSD example usage
dashboards-search-relevance example of missing FormattedMessage
The text was updated successfully, but these errors were encountered: