sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
GetText#npgettext
call-seq:
npgettext(msgctxt, msgid, msgid_plural, n)
npgettext(msgctxt, msgids, n) # msgids = [msgid, msgid_plural]
np_(msgctxt, msgid, msgid_plural, n)
np_(msgctxt, msgids, n) # msgids = [msgid, msgid_plural]
The npgettext is similar to the nsgettext function.
e.g.) np_("Special", "An apple", "%{num} Apples", num) == ns_("Special|An apple", "%{num} Apples", num)
* msgctxt: the message context.
* msgid: the singular form.
* msgid_plural: the plural form.
* n: a number used to determine the plural form.
* Returns: the localized text which key is msgid_plural if n is plural(follow plural-rule) or msgid.
"plural-rule" is defined in po-file.Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/gettext-3.4.3/lib/gettext.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-GetText-npgettext-for-pr
# Commit to gitgit add app/server/ruby/vendor/gettext-3.4.3/lib/gettext.rbgit commit -m "better docs for GetText#npgettext"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-GetText-npgettext-for-pr
hub pull-request
# Celebrate!