-
Notifications
You must be signed in to change notification settings - Fork 268
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
All strings displayed in the UI should be externalised #453
Comments
Had a look through this one to check the latest status, so I see the following and updated checkboxes accordingly https://github.com/tektoncd/dashboard/blob/master/src/containers/CreatePipelineRun/CreatePipelineRun.js now has lots of intl strings https://github.com/tektoncd/dashboard/blob/master/src/containers/ImportResources/ImportResources.js looks good too https://github.com/tektoncd/dashboard/blob/master/src/containers/NamespacesDropdown/NamespacesDropdown.js still needs work |
we're nearly there |
@steveodonovan pointed out that we missed some strings in the Carbon DataTable that don't follow the standard process of passing them as props, added details to the end of the description. There are likely others, doing a quick scan of the Carbon repo now and will update the description with other matches. |
PR open for the last of the strings. There are a few remaining strings that I've deliberately omitted:
These inputs only accept a limited set of characters, so including translations here would likely confuse users. We may revisit this in future to provide translated helper text or documentation in a user guide, but for now the placeholder values will remain untranslated. |
Expected Behavior
It should be possible to customise / translate all strings displayed in the UI (excluding user data or error messages provided by the environment).
Actual Behavior
Many strings are still hard-coded in the components instead of using
react-intl
.Additional Info
We have begun extracting strings as described, this process should be completed and all new strings added using
react-intl
to avoid building up additional debt.Some of the components that have been migrated to @tektoncd/dashboard-components have been partially updated and need to be revisited to ensure no hardcoded strings remain.
We also need to ensure the process for adding new strings is clearly documented in https://github.com/tektoncd/dashboard/blob/master/DEVELOPMENT.md or other appropriate location. Tooling should also be added to avoid manual steps to build the externalised list of current strings.
@tektoncd/dashboard-components
Breadcrumbs(likely to be removed in design update, 'Import Tekton Resources' is the only string that would need to be extracted otherwise)src/components
src/containers
Carbon components
Some Carbon components provide default strings internally, such as the '{n} rows selected' batch selection text on a DataTable. Translations for these strings can be overridden by providing a custom
translateWithId
function as a prop to these components, to convert the providedtranslationKeys
into the desired string using any i18n library / approach.TableHeader for sort arrows, not currently used in dashboardtracked in Implement pagination and sorting method #842The text was updated successfully, but these errors were encountered: