Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-01 03:13:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-01 03:13:08 +0300
commit9e10cf71176a52bca6b05a0d9255f9486bb91d9f (patch)
treea2dd11ec205fc323966c263e80716ce6f6546670 /doc/development/i18n
parentef9cb5bf1be79746f78f9f36dc7cda2931ea0f2c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/i18n')
-rw-r--r--doc/development/i18n/externalization.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md
index 103349e7164..1d3c5e2ec8f 100644
--- a/doc/development/i18n/externalization.md
+++ b/doc/development/i18n/externalization.md
@@ -561,9 +561,8 @@ To include formatting in the translated string, you can do the following:
- In Ruby/HAML:
```ruby
- html_escape(_('Some %{strongOpen}bold%{strongClose} text.')) % { strongOpen: '<strong>'.html_safe, strongClose: '</strong>'.html_safe }
-
- # => 'Some <strong>bold</strong> text.'
+ safe_format(_('Some %{strongOpen}bold%{strongClose} text.'), strongOpen: '<strong>'.html_safe, strongClose: '</strong>'.html_safe)
+ # => 'Some <strong>bold</strong> text.'
```
- In JavaScript:
@@ -801,8 +800,8 @@ translatable in certain languages.
```haml
- zones_link_url = 'https://cloud.google.com/compute/docs/regions-zones/regions-zones'
- - zones_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: zones_link_url }
- = html_escape(s_('ClusterIntegration|Learn more about %{zones_link_start}zones%{zones_link_end}')) % { zones_link_start: zones_link_start, zones_link_end: '</a>'.html_safe }
+ - zones_link_start = safe_format('<a href="%{url}" target="_blank" rel="noopener noreferrer">', url: zones_link_url)
+ = safe_format(s_('ClusterIntegration|Learn more about %{zones_link_start}zones%{zones_link_end}'), zones_link_start: zones_link_start, zones_link_end: '</a>'.html_safe)
```
- In Vue, instead of: