diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2017-09-26 12:46:59 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2017-10-03 15:46:19 +0300 |
commit | b509588a28d0a102f4ad4b97d91c5b5944946834 (patch) | |
tree | 1ace10c95ed2573f14927ddee014c562ab987621 /doc/development/i18n_guide.md | |
parent | 92173ac55cd921a65ce137e238ed8bc4474aaccb (diff) |
Add basic sprintf implementation to JavaScript
Diffstat (limited to 'doc/development/i18n_guide.md')
-rw-r--r-- | doc/development/i18n_guide.md | 11 |
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 |