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
path: root/doc
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2017-09-26 12:46:59 +0300
committerWinnie Hellmann <winnie@gitlab.com>2017-10-03 15:46:19 +0300
commitb509588a28d0a102f4ad4b97d91c5b5944946834 (patch)
tree1ace10c95ed2573f14927ddee014c562ab987621 /doc
parent92173ac55cd921a65ce137e238ed8bc4474aaccb (diff)
Add basic sprintf implementation to JavaScript
Diffstat (limited to 'doc')
-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