{"id":246,"date":"2010-04-08T16:29:29","date_gmt":"2010-04-08T23:29:29","guid":{"rendered":"http:\/\/blog.mozilla.org\/axel\/?p=246"},"modified":"2010-05-20T03:57:11","modified_gmt":"2010-05-20T10:57:11","slug":"new-version-of-compare-locales-released-please-update","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/axel\/2010\/04\/08\/new-version-of-compare-locales-released-please-update\/","title":{"rendered":"New version of compare-locales released, please update"},"content":{"rendered":"<p>I&#8217;ve released a new version of compare-locales, and you should <strong>really<\/strong> update.<\/p>\n<p>The new version of compare-locales adds:<\/p>\n<ul>\n<li>support for more than one filter.py<\/li>\n<li>support for filter.py returning more than just bools, but &#8220;error&#8221;, &#8220;report&#8221;, or &#8220;ignore&#8221;.<\/li>\n<\/ul>\n<p><strong>Why?<\/strong><\/p>\n<p>Lorentz strings. They are missing, but them missing isn&#8217;t fatal. So we needed a third state.<br \/>\nAnd some of them are in toolkit, so we&#8217;re moving parts of the filter.py logic from all over the place into<br \/>\n<code>releases\/mozilla-1.9.2\/toolkit\/locales\/filter.py<\/code>. That means that we can remove the hacks in comm-central and mobile-browser, making our life so much more reliable and predictable.<\/p>\n<p>The changes to 1.9.2 will land shortly, so versions of compare-locales prior to 0.7 will stop working.<\/p>\n<p><strong>Update paths:<\/strong><\/p>\n<p><code>easy_install -U compare-locales<\/code><br \/>\nis the easiest way to do it. Depending on OS and local settings, you might want to<br \/>\n<code>sudo easy_install -U compare-locales<\/code><\/p>\n<p>Or,<br \/>\n<code>hg clone http:\/\/hg.mozilla.org\/build\/compare-locales\/<\/code><br \/>\nand do whatever you did last time, setting paths or python setup.py install.<\/p>\n<p><strong>How does it look? Where&#8217;s beef? Or veggies?<\/strong><\/p>\n<p>Here&#8217;s what 0.8 spits out for German on 1.9.2 with patched filter.py:<\/p>\n<pre><code>de\r\n   browser\/chrome\/browser\r\n     browser.properties\r\n         +crashedpluginsMessage.learnMore\r\n         +crashedpluginsMessage.reloadButton.accesskey\r\n         +crashedpluginsMessage.reloadButton.label\r\n         +crashedpluginsMessage.submitButton.accesskey\r\n         +crashedpluginsMessage.submitButton.label\r\n         +crashedpluginsMessage.title\r\n     preferences\/advanced.dtd\r\n         +submitCrashes.accesskey\r\n         +submitCrashes.label\r\n   toolkit\/chrome\/mozapps\/plugins\/plugins.dtd\r\n       +reloadPlugin.middle\r\n       +reloadPlugin.post\r\n       +reloadPlugin.pre\r\n       +report.disabled\r\n       +report.failed\r\n       +report.please\r\n       +report.submitted\r\n       +report.submitting\r\n       +report.unavailable\r\nde:\r\nkeys: 940\r\nreport: 17\r\nunchanged: 634\r\nchanged: 4561\r\n87% of entries changed<\/code><\/pre>\n<p>You can see the regular output of missing strings, and you&#8217;ll recognize all of lorentz. New here are three things:<\/p>\n<p>The strings in the long display are not counted as missing, but are in a new summary item called &#8220;report&#8221;. Those strings are not fatal, but should get localized.<br \/>\nThe return value of compare-locales is only dependent on *missing* strings, i.e., code checking the return value will see a successful run of compare-locales if there are reported strings, as long as there are none missing.<br \/>\nIf you switch l10n-merge on, it won&#8217;t merge the reported strings, but rely on the real code falling back as intended.<\/p>\n<p>Not-so-important feature update, compare-dirs is now supporting l10n-merge, too. That&#8217;s sweet for the upcoming weave stuff.<\/p>\n<p>Questions are welcome here, bug reports are welcome in <a href=\"https:\/\/bugzilla.mozilla.org\/enter_bug.cgi?product=Mozilla Localizations&#038;component=Infrastructure&#038;rep_platform=All&#038;op_sys=All&#038;short_desc=[compare-locales]\">&#8220;Mozilla<br \/>\nLocalizations&#8221;, &#8220;Infrastructure&#8221; component<\/a>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve released a new version of compare-locales, and you should really update. The new version of compare-locales adds: support for more than one filter.py support for filter.py returning more than just bools, but &#8220;error&#8221;, &#8220;report&#8221;, or &#8220;ignore&#8221;. Why? Lorentz strings. They are missing, but them missing isn&#8217;t fatal. So we needed a third state. And [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,5],"tags":[23779,23778],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/246"}],"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=246"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/246\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/media?parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/categories?post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/tags?post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}