{"id":14,"date":"2006-11-15T19:19:43","date_gmt":"2006-11-16T02:19:43","guid":{"rendered":"http:\/\/blog.mozilla.org\/axel\/2006\/11\/15\/nifty-hack-1\/"},"modified":"2007-04-30T17:34:52","modified_gmt":"2007-05-01T00:34:52","slug":"nifty-hack-1","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/axel\/2006\/11\/15\/nifty-hack-1\/","title":{"rendered":"nifty hack #1"},"content":{"rendered":"<p>During the l10n session today we came up with an request from dynamis for him to be able to not have a string argument show up in a formatted l10n string.<\/p>\n<p>We came up with the idea to specify zero width in the format, but it&#8217;s actually precision 0.<\/p>\n<pre>foo=does \"%1$.0S\" work?<\/pre>\n<p>as foo.properties does actually yield to<\/p>\n<pre>js&gt; sb.formatStringFromName('foo',['Firefox'],1)\r\n\r\ndoes \"\" work?<\/pre>\n<p>So here goes your nifty l10n tip of the day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During the l10n session today we came up with an request from dynamis for him to be able to not have a string argument show up in a formatted l10n string. We came up with the idea to specify zero width in the format, but it&#8217;s actually precision 0. foo=does &#8220;%1$.0S&#8221; work? as foo.properties does [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/14"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}