{"id":78,"date":"2008-07-03T10:10:39","date_gmt":"2008-07-03T17:10:39","guid":{"rendered":"http:\/\/blog.mozilla.org\/axel\/?p=78"},"modified":"2008-08-05T01:40:36","modified_gmt":"2008-08-05T08:40:36","slug":"l10n-merge","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/axel\/2008\/07\/03\/l10n-merge\/","title":{"rendered":"l10n merge"},"content":{"rendered":"<p>I&#8217;ve just pushed an implementation of l10n-merge to my <a href=\"http:\/\/hg.mozilla.org\/users\/axel_mozilla.com\/tooling\/\">tooling repository<\/a>. It&#8217;s now actually just an option to compare-locales, and will do the weakest heuristic for now.<\/p>\n<p>Whenever compare-locales finds missing entries in an existing file, it will create a copy of that file in a staging directory for the merge, and append the missing entries. For the bulk of our files, that should work fine. Bookmarks.html is an exception, as are the netError files, I think order of entities and dtd inclusions matters there. In the end, you get a staging directory with files that got fixed up, a localization directory with both good files and files with missing entries, and the original en-US source. Making jar.mn actually pick localized files up from three different places in a particular order is in my <a href=\"http:\/\/hg.mozilla.org\/users\/axel_mozilla.com\/index.cgi\/build-patches\/\">build-patches repository<\/a>.<\/p>\n<p>Here&#8217;s why, in case you wonder: First and foremost, it leaves the original source alone. I like it like that. Secondly, it does as few file manipulations as possible in the best case, a complete localization doesn&#8217;t do a single copy or something. It&#8217;s not all that invasive into the build system as one might think, too. At least as soon as you want to look at the code to see where you&#8217;re looking for files, checking a bunch of source base dirs is rather trivial.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve just pushed an implementation of l10n-merge to my tooling repository. It&#8217;s now actually just an option to compare-locales, and will do the weakest heuristic for now. Whenever compare-locales finds missing entries in an existing file, it will create a copy of that file in a staging directory for the merge, and append the missing [&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,5],"tags":[23779],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/78"}],"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=78"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/axel\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}