diff options
author | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-06-27 14:01:49 +1000 |
---|---|---|
committer | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-06-27 14:03:17 +1000 |
commit | 0d00ba502dfbd8b19e7a7288c0160b837fefb01d (patch) | |
tree | ae65c296d6e0e79ceb5d1098b90f29381ec60f7f | |
parent | 25f48b04808306dd8027733a03ff29369558c439 (diff) | |
download | gitlab-ce-ek-js-example-spltting-strings-with-links.tar.gz |
Added before example for jsek-js-example-spltting-strings-with-links
-rw-r--r-- | doc/development/i18n/externalization.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md index 2e793986ef8..a17932af37e 100644 --- a/doc/development/i18n/externalization.md +++ b/doc/development/i18n/externalization.md @@ -282,7 +282,16 @@ This also applies when using links in between translated sentences, otherwise th = s_('ClusterIntegration|Learn more about %{zones_link_start}zones%{zones_link_end}').html_safe % { zones_link_start: zones_link_start, zones_link_end: '</a>'.html_safe } ``` -- In JavaScript +- In JavaScript, instead of: + ```js + {{ + sprintf(s__("ClusterIntegration|Learn more about %{link}"), { + link: '<a href="https://cloud.google.com/compute/docs/regions-zones/regions-zones" target="_blank" rel="noopener noreferrer">zones</a>' + }) + }} + ``` + + Set the link starting and ending HTML fragments as variables like so: ```js {{ |