Skip to content

Improve i18n strings on Kubernetes apps page

Daniel Tian requested to merge 207322-improve-i18n-strings into master

What does this MR do?

On the Kubernetes apps page, there are several strings that follow the format:

<gl-sprintf :message="s__('Message with a link to %{linkText}')">
  <template #linkText>
    <gl-link>{{ s__('Link Text') }}</gl-link>
  </template>
</gl-sprintf>

This is not great for localization because it breaks the sentence into two parts: the sentence with a placeholder for the link text, and the link text itself.

This MR fixes that by moving the link text into the sentence itself, and uses the placeholder only to wrap the text in a link:

<gl-sprintf :message="s__('Message with a link to %{linkStart}Link Text%{linkEnd}')">
  <template #link="{ content }">
    <gl-link>{{ content }}</gl-link>
  </template>
</gl-sprintf>

Screenshots

Backstage change, so it looks exactly the same
Screenshot_from_2020-06-04_02-55-46

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by 🤖 GitLab Bot 🤖

Merge request reports