Re: Extensions: Why does String.format() work (gnome_shell_list: message 5 of 20)

2016-08-21 Thread elbenfreund
On 21.08.2016 15:47, Norman L Smith - nls1...@gmail.com wrote: > Hello Eric, > > I think this is the gjs magic for string formatting. > > See https://wiki.gnome.org/Projects/Gjs/Package > > pkg.initFormat() will initialize the format module. After calling, > String.prototype.format will be avail

Re: Extensions: Why does String.format() work

2016-08-21 Thread Norman L Smith
Hello Eric, I think this is the gjs magic for string formatting. See https://wiki.gnome.org/Projects/Gjs/Package pkg.initFormat() will initialize the format module. After calling, String.prototype.format will be available Norman On Sun, 2016-08-21 at 11:26 +0200, elbenfreund wrote: > Hello lis

Re: Extensions: Why does String.format() work

2016-08-21 Thread Christoph Schulz
Hi Eric, I'm don't know much about (G)JS, but did you saw the underscore in front of your example string? Maybe gettext does some magic here. Greetings, Christoph Am Sonntag, den 21.08.2016, 11:26 +0200 schrieb elbenfreund: > Hello list, > > while browsing some of the existing GNOME-Shell exten

Extensions: Why does String.format() work

2016-08-21 Thread elbenfreund
Hello list, while browsing some of the existing GNOME-Shell extensions source [1] noticed string formating similiar to C or python: ``'some_random_string'.format()``. I'm not really that familiar with JS but by all accounts ([2], [3], [4]) javascript does not have build in string formating. So my