summaryrefslogtreecommitdiff
path: root/doc/development
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-10-03 15:56:40 +0000
committerTim Zallmann <tzallmann@gitlab.com>2017-10-03 15:56:40 +0000
commit23e6b17b3e7fab3fc1668234133dcf339dedc649 (patch)
treea4b5099d988447ceece848d63ad759bb6a67bfdd /doc/development
parent66dd045e6af591c370143c21ae98f36d439cd87e (diff)
parentb509588a28d0a102f4ad4b97d91c5b5944946834 (diff)
downloadgitlab-ce-23e6b17b3e7fab3fc1668234133dcf339dedc649.tar.gz
Merge branch 'winh-sprintf' into 'master'
Add basic sprintf implementation to JavaScript See merge request gitlab-org/gitlab-ce!14506
Diffstat (limited to 'doc/development')
-rw-r--r--doc/development/i18n_guide.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/development/i18n_guide.md b/doc/development/i18n_guide.md
index bd0ef39ca62..29c8941a8f7 100644
--- a/doc/development/i18n_guide.md
+++ b/doc/development/i18n_guide.md
@@ -183,13 +183,20 @@ aren't in the message with id `1 pipeline`.
### Interpolation
-- In Ruby/HAML:
+- In Ruby/HAML (see [sprintf]):
```ruby
_("Hello %{name}") % { name: 'Joe' }
```
-- In JavaScript: Not supported at this moment.
+- In JavaScript: Only named parameters are supported (see also [#37992]):
+
+ ```javascript
+ __("Hello %{name}") % { name: 'Joe' }
+ ```
+
+[sprintf]: http://ruby-doc.org/core/Kernel.html#method-i-sprintf
+[#37992]: https://gitlab.com/gitlab-org/gitlab-ce/issues/37992
### Plurals