<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mitcho.com &#187; l10n</title>
	<atom:link href="http://mitcho.com/blog/tag/l10n/feed/" rel="self" type="application/rss+xml" />
	<link>http://mitcho.com</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 02:04:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>The Aliens Aliases Have Landed</title>
		<link>http://mitcho.com/blog/projects/the-aliens-aliases-have-landed/</link>
		<comments>http://mitcho.com/blog/projects/the-aliens-aliases-have-landed/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 00:46:56 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verb]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2841</guid>
		<description><![CDATA[This week I implemented a new way to customize and extend Ubiquity commands: CmdUtils.CreateAlias. The use case for and importance of CreateAlias CreateAlias lets you easily create a special-case alias of another, more generic verb. Ubiquity comes bundled with useful verbs like translate and search which can be used for a number of different uses [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/rolling-out-the-roles/' rel='bookmark' title='Rolling out the Roles'>Rolling out the Roles</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/' rel='bookmark' title='Ubiquity Localization: What&#8217;s New, What&#8217;s Next'>Ubiquity Localization: What&#8217;s New, What&#8217;s Next</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/09/close-encounters.jpg" alt="close-encounters.jpg" border="0" width="640" height="300" /></p>

<p>This week <a href="http://ubiquity.mozilla.com/trac/ticket/201">I implemented</a> a new way to customize and extend Ubiquity commands: <code>CmdUtils.CreateAlias</code>.</p>

<h3>The use case for and importance of <code>CreateAlias</code></h3>

<p><code>CreateAlias</code> lets you easily create a special-case alias of another, more generic verb. Ubiquity comes bundled with useful verbs like <code>translate</code> and <code>search</code> which can be used for a number of different uses based on their arguments. In some cases, and in some languages, though, typing out <code>translate to English</code> or <code>search with Google</code> is <a href="http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/">unnatural</a>, though, as there is a more succinct and direct way to make that request. For example, in English one could say &#8220;anglicize&#8221; or &#8220;google&#8221;, respectively, for the verbs and arguments above. Indeed, in order to support both <code>search with Google</code> and <code>google</code>, Ubiquity traditionally has implemented two different verbs, <code>search</code> and <code>google</code>, which duplicate functionality and code.</p>

<p><code>CreateAlias</code> lets us create such natural aliases <a href="http://en.wikipedia.org/wiki/Don&#8217;t_repeat_yourself">without repeating ourselves</a>. We can easily create an <code>anglicize</code> verb which, in one word, does the work of <code>translate to English</code>, or <code>google</code> which is semantically equivalent to <code>search with Google</code>.</p>

<p>These sorts of aliases become particularly important in our perpetual quest to internationalize Ubiquity. One discussion that came up early on on our <a href="http://groups.google.com/group/ubiquity-i18n">Ubiquity-i18n</a> list is the fact that not all languages have the verb &#8220;Google&#8221;: in many languages it is necessary to explicitly say &#8220;search with Google&#8221;. Moreover, other languages may have other domain-specific verbs which English doesn&#8217;t have either. Maybe some language has a special verb for &#8220;email with Hotmail&#8221; or &#8220;map Denmark&#8221;. Who knows? With <code>CreateAlias</code> we can easily enable such localizations based on the more generic commands bundled with Ubiquity.</p>

<h3>Creating an alias</h3>

<p><code>CreateAlias</code> was designed to be incredibly simple to use. Here&#8217;s an example that will be bundled (but not installed by default) in Ubiquity:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">CmdUtils.<span style="color: #660066;">CreateAlias</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  names<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;anglicize&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  verb<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;translate&quot;</span><span style="color: #339933;">,</span>
  givenArgs<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> goal<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;English&quot;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>


<p>As you see, this syntax is incredibly straightforward. There are two required properties, <code>names</code>, an array of names for the alias, and <code>verb</code>, a reference to the target verb that this alias should use.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p>The alias can also have a <code>givenArgs</code> property which is a hash of pre-specified arguments with their <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles">semantic roles</a>. Because <code>translate</code> takes three arguments (an <code>object</code> text, a <code>goal</code> language, and a <code>source</code> language) but we have pre-specified a <code>goal</code> in the <code>givenArgs</code>, the new <code>anglicize</code> command will only take two arguments: the <code>object</code> text and a <code>source</code> language. Of course, if you specify no <code>givenArgs</code>, you&#8217;ll get a simple synonym without having access to the original verb&#8217;s code.</p>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/09/anglicize1.png" alt="anglicize.png" border="0" width="650" height="152" /></p>

<p>As you see, the preview of this command is simply the preview of the <code>translate</code> verb. Its preview and execution is just as if you had entered <code>translate こんにちは to English</code>.</p>

<p>Just like other commands created with <code>CreateCommand</code>, the object specifying the alias can also have properties like <code>help</code>, <code>description</code>, <code>author</code> information, and so on. I used the <code>icon</code> property to add a <a href="http://en.wikipedia.org/wiki/Union Jack">Union Jack</a> to it so that it was easily identifiable.</p>

<h3>Bonus: using <code>CmdUtils.previewCommand</code> and <code>CmdUtils.executeCommand</code></h3>

<p>On the road to implementing <code>CreateAlias</code>, I also implemented the <code>CmdUtils.previewCommand</code> and <code>CmdUtils.executeCommand</code> functions. The majority of this code comes from previous work by <a href="http://groups.google.com/group/ubiquity-firefox/browse_thread/thread/993411167fc6f165">Louis-Rémi Babé</a>, though I adapted it to the modern Ubiquity system. Using <code>previewCommand</code> and <code>executeCommand</code> you can take advantage of the preview or execute functionality of another command. In the new <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/tip/ubiquity/standard-feeds/alias-commands.js">alias-commands</a> feed I included a command called <code>germanize</code> which essentially is a straightforward analogy to <code>anglicize</code>, seen above, but using these functions within a <code>CreateCommand</code>. While <code>CreateAlias</code> is much more straightforward for simple aliases, for more complex subcommands where you would like to adapt another verb&#8217;s execution or preview, or only take one of those but re-implement the other part, <code>previewCommand</code> and <code>executeCommand</code> are the way to go.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>The <code>verb</code> reference can be the canonical or <em>reference name</em> of a command, which is the first name in the <code>names</code> of a command (also the name listed in the command list when Ubiquity is running in English) or the actual internal ID of the command, which looks like <code>resource://ubiquity/standard-feeds/general.html#translate</code>.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/rolling-out-the-roles/' rel='bookmark' title='Rolling out the Roles'>Rolling out the Roles</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/' rel='bookmark' title='Ubiquity Localization: What&#8217;s New, What&#8217;s Next'>Ubiquity Localization: What&#8217;s New, What&#8217;s Next</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/the-aliens-aliases-have-landed/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s talk about how cool our localizers are</title>
		<link>http://mitcho.com/blog/projects/lets-talk-about-how-cool-our-localizers-are/</link>
		<comments>http://mitcho.com/blog/projects/lets-talk-about-how-cool-our-localizers-are/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 20:17:53 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[BabelZilla]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2692</guid>
		<description><![CDATA[I uploaded Ubiquity to BabelZilla, an online community and tool for localizing Mozilla-style strings, just a couple days ago and we already have French and Polish complete.1 WOW! Granted, these are only Ubiquity&#8217;s interface strings (for example, the about and settings pages)&#8230; the parser localization and command localization have their own processes.2 But this is [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
<li><a href='http://mitcho.com/blog/projects/a-visual-guide-to-community-command-localization/' rel='bookmark' title='A Visual Guide to Community Command Localization'>A Visual Guide to Community Command Localization</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/' rel='bookmark' title='Ubiquity Localization: What&#8217;s New, What&#8217;s Next'>Ubiquity Localization: What&#8217;s New, What&#8217;s Next</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I uploaded <a href="http://ubiquity.mozilla.com">Ubiquity</a> to <a href="http://babelzilla.org">BabelZilla</a>, an online community and tool for localizing Mozilla-style strings, just a couple days ago and we already have French and Polish complete.<sup id="fnref:2"><a href="#fn:2" rel="footnote">1</a></sup> WOW!</p>

<p><a href="http://mitcho.com/blog/wp-content/uploads/2009/08/babelzilla-status.png" rel='lightbox'><img src="http://mitcho.com/blog/wp-content/uploads/2009/08/babelzilla-status.png" alt="babelzilla-status.png" border="0" width="492" height="210" /></a></p>

<p>Granted, these are only Ubiquity&#8217;s interface strings (for example, the about and settings pages)&#8230; the <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Localization_Tutorial">parser localization</a> and <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.5_Command_Localization_Tutorial">command localization</a> have their own processes.<sup id="fnref:1"><a href="#fn:1" rel="footnote">2</a></sup> But this is still a tremendous accomplishment!</p>

<p>Hopefully we can roll some of these complete or almost-complete interface localizations with <a href="http://tinyurl.com/ubiq054">Ubiquity 0.5.4</a> which is a minor bugfix update coming soon. <strong>If you would like to get involved with localizing the Ubiquity interface strings into your language, get a BabelZilla login and sign up on <a href="http://www.babelzilla.org/index.php?option=com_wts&amp;Itemid=264&amp;extension=5165&amp;type=show">the Ubiquity project page</a>.</strong> Thanks again to our rockin&#8217; localizers!</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:2">
<p>I received notification that the Polish localization in particular has completed testing and is now ready for release, <em>as I was writing this blog post</em>.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:1">
<p>Perhaps this anecdote is telling us that having a nice centralized web interface for localizers to work together and without messing with the files directly is a plus. Perhaps we should put up the builtin commands for localization on something like <a href="http://en.wikipedia.org/wiki/Pootle">Pootle</a> or <a href="http://launchpad.net">Launchpad</a>. Thoughts, anyone?&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
<li><a href='http://mitcho.com/blog/projects/a-visual-guide-to-community-command-localization/' rel='bookmark' title='A Visual Guide to Community Command Localization'>A Visual Guide to Community Command Localization</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/' rel='bookmark' title='Ubiquity Localization: What&#8217;s New, What&#8217;s Next'>Ubiquity Localization: What&#8217;s New, What&#8217;s Next</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/lets-talk-about-how-cool-our-localizers-are/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Visual Guide to Community Command Localization</title>
		<link>http://mitcho.com/blog/projects/a-visual-guide-to-community-command-localization/</link>
		<comments>http://mitcho.com/blog/projects/a-visual-guide-to-community-command-localization/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 22:11:30 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Matt Mullenweg]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2475</guid>
		<description><![CDATA[A natural language interface is only &#8220;natural&#8221; if it&#8217;s in your natural language. With this mantra in mind, we&#8217;ve been making steady progress on the challenging problem of Ubiquity localization. The first fruit of this research is in the localization of the parser and bundled commands in Ubiquity 0.5. Here today is a visual guide [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-update/' rel='bookmark' title='Ubiquity Localization Update'>Ubiquity Localization Update</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/' rel='bookmark' title='Ubiquity Localization: What&#8217;s New, What&#8217;s Next'>Ubiquity Localization: What&#8217;s New, What&#8217;s Next</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/">natural language interface</a> is only &#8220;natural&#8221; if it&#8217;s in your natural language. With this mantra in mind, we&#8217;ve been making steady progress on the challenging problem of <a href="http://ubiquity.mozilla.com">Ubiquity</a> localization. The first fruit of this research is in the localization of the parser and bundled commands <a href="http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/">in Ubiquity 0.5</a>. Here today is a visual guide on command localization in Ubiquity and different options we can take in attacking the community command localization problem.<span id="more-2475"></span></p>

<h3>Command localization in Ubiquity 0.5</h3>

<p>A few important design decisions have already been made in implementing command localization in Ubiquity 0.5. The first was the choice of the <a href="http://en.wikipedia.org/wiki/gettext">gettext</a> po (portable object) file format. The po format is a de facto industry standard with many tools built for the format and this design choice hopefully lower the bar for prospective localizers.</p>

<p>Second, in order to simplify the matching of localizations and commands, we require that each command feed have one localization po file, rather than splitting the localizations of different commands across multiple po files.</p>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/dist.png" alt="dist.png" border="0" width="650" height="250" /></p>

<p>Finding the appropriate localization po file for a JavaScript command feed is very simple with bundled commands as the files are managed in our main repository so we know exactly where to find them. We just take the command feed&#8217;s filename sans extension—the <em>feed key</em>—and look for <code>localizations/</code><em>lang</em><code>/</code><em>feed key</em><code>.po</code>, where <em>lang</em> is the active language code. This gives us a simple one to one relationship between the JavaScript command feed source and the appropriate localization.</p>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/local.png" alt="local.png" border="0" width="650" height="218" /></p>

<h3>Background</h3>

<p>The ability of users to <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.5_Author_Tutorial">easily write their own Ubiquity commands</a> has always been a huge strength of the Ubiquity platform. Users can also &#8220;subscribe&#8221; to commands written by other users on other servers. In this case, local copies of those command sources are made.</p>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/distcmds.png" alt="distcmds.png" border="0" width="650" height="420" /></p>

<p>The <a href="http://ubiquity.mozilla.com/herd/">herd</a> was developed as a dynamic aggregator of community Ubiquity commands. The herd keeps its own copy of each command source. The herd groups mirrors of command feeds on multiple servers together as well, giving each unique command feed a unique ID.</p>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/herd.png" alt="herd.png" border="0" width="650" height="240" /></p>

<h3>Localizing distributed resources</h3>

<p>This distributed nature of the command feeds is exactly what complicates the localization of community commands. The original sources themselves are distributed, and we also want a community of localizers to be able to localize the commands—i.e., for the localizations to be (in some sense) distributed. Here I will present three options which I believe could be the basis for a winning solution, in order of more distributed to less distributed.</p>

<p>All three of these options have the property that localizations do not need to be &#8220;approved&#8221; or &#8220;managed&#8221; by the command author. For example, a possible standard where URL&#8217;s of localizations must be in the command feed is not considered. I believe this is a crucial property of any approach we decide on.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<h4>Option 1: a completely distributed option</h4>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/option1.png" alt="herd.png" border="0" width="650" height="300" /></p>

<p>In this option, localizers simply put the po files on their own servers (or some code snippet site such as github) and the user must then subscribe to those localizations much as they subscribe to commands now.</p>

<h4>Option 2: registration and discovery through the herd</h4>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/option2.png" alt="herd.png" border="0" width="650" height="400" /></p>

<p>In this option, localizers put po files up on their own servers and then register that po file&#8217;s URL with the herd. The herd keeps track of each command feed&#8217;s localizations in different languages.</p>

<h4>Option 3: localizations on the herd</h4>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/option3.png" alt="herd.png" border="0" width="650" height="340" /></p>

<p>In this option, po localizations are uploaded right onto the herd. The herd is the centralized repository of all localizations for each command feed.</p>

<h3>Users first</h3>

<p>In coming up with a criteria for judging different models of community command localization, I think it is helpful to think of the end-user experience. Right now to subscribe to a new command a user must find the command (perhaps via the herd) and click on the subscribe button, then in most cases confirm that they are aware of the possible dangers and confirm subscription.<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup> What work is required for a user to subscribe to a new command <em>and get it in their language</em>?</p>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/07/subscribe.png" alt="herd.png" border="0" width="650" height="40" /></p>

<p>Under option one, the user would somehow have to find the localization scattered someplace on the internet of their own accord, and then install that localization by themself. In my mind, this is clearly a no go. With options two or three, however, when a user subscribes to a command feed Ubiquity can check with the herd to see whether there are any localizations available. The localizations could be offered to the user or the localization for the currently active language could be automatically installed. There are, on the other hand, disadvantages to requiring a centralized authority, exemplified by the fact that the current iteration of the herd itself has often been down.</p>

<h3>Summary and a call for comments</h3>

<p>As laid out in this visual guide, I personally have a couple main criteria which I believe we should follow:</p>

<ol>
<li><strong>localization independence</strong>: Command authors should not have to manage their commands&#8217; localizations. (See footnote 1.)</li>
<li><strong>friendly discovery and subscription</strong>: Users should not have to go out and find localizations by themselves. Localizations should be offered to the user.</li>
</ol>

<p>With these criteria, I&#8217;m pretty sure the only logical conclusion is that we need some level of centralization, pointing to options two and three. <strong>If you think of another option which satisfies these criteria, or disagree with the criteria above, I would love to know.</strong> In addition, <strong>have you encountered similar problems of localizing distributed resources elsewhere? What worked there?</strong></p>

<p>If this problem has been solved before, there is no need to reinvent the wheel. As far as I can tell, however, this could be a particularly hairy problem.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>This strong view is based on my own experience as a <a href="http://mitcho.com/code/yarpp/">WordPress plugin author</a> and a subsequent conversation with <a href="http://en.wikipedia.org/wiki/Matt Mullenweg">Matt Mullenweg</a>. The WordPress plugin ecosystem requires that plugin authors orchestrate localizations and bundle them into releases. In the case of my plugin, this requires regular contact with over a dozen localizers.<br/>The case of WordPress plugins is actually much like that of Ubiquity commands&#8230; the plugins can be served on any server, distributed, but there is also a central repository, <a href="http://wordpress.org/extend/">wordpress.org/extend</a>.<br/>Matt and I agreed that if localizers could somehow localize plugins without going through the command author, most of whom produce their plugins by volunteering their time, the localization of plugins could be much more popular. Indeed, some localizers go ahead and publish po files for popular plugins, but those localizations are hard to find as there is no repository for the localizations either.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>As I&#8217;ve <a href="http://mitcho.com/blog/projects/friendlier-command-feed-subscription/">written before about Ubiquity&#8217;s command subscription</a>, there is much we can improve in this area of Ubiquity&#8217;s user experience.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-update/' rel='bookmark' title='Ubiquity Localization Update'>Ubiquity Localization Update</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/' rel='bookmark' title='Ubiquity Localization: What&#8217;s New, What&#8217;s Next'>Ubiquity Localization: What&#8217;s New, What&#8217;s Next</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/a-visual-guide-to-community-command-localization/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubiquity Localization: What&#8217;s New, What&#8217;s Next</title>
		<link>http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/</link>
		<comments>http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 19:45:25 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[nountype]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[participate]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[verb]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2432</guid>
		<description><![CDATA[Yesterday we released Ubiquity 0.5, a major update to the already popular Ubiquity platform. Among numerous other features, Ubiquity 0.5 includes the first fruit of months of research on building a multilingual parser and natural language interface. In this blog post I&#8217;ll give a quick overview of new internationalization-related features in Ubiquity 0.5 as well [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/' rel='bookmark' title='Localizing Ubiquity: commands and nountypes'>Localizing Ubiquity: commands and nountypes</a></li>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Yesterday we <a href="https://labs.mozilla.com/2009/07/ubiquity-0-5/">released Ubiquity 0.5</a>, a major update to the already popular Ubiquity platform. Among <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.5_Release_Notes">numerous other features</a>, Ubiquity 0.5 includes the first fruit of <a href="http://mitcho.com/blog/tag/ubiquity/">months of research on building a multilingual parser and natural language interface</a>. In this blog post I&#8217;ll give a quick overview of new internationalization-related features in Ubiquity 0.5 as well as a quick roadmap of future considerations.</p>

<p>Of course, one of the best ways to learn about the new features is to experience them&#8230; try Ubiquity 0.5 now!</p>

<p><a href="https://ubiquity.mozilla.com/xpi/0.5/ubiquity-0.5.xpi" style="cursor:pointer;background: #01d835;border: 1px solid;border-color:#01d835 #4ece71 #4ece71 #01d835;-moz-border-radius:4px;padding:10px;text-transform:uppercase;font-size:1.3em;color:white;text-shadow:#1e792c 1px 1px 1px;">Install now!</a></p>

<p><span id="more-2432"></span></p>

<h3>Preface: What&#8217;s What</h3>

<p>To give users a completely localized experience, there are many different components that need to be made to work with different languages. In a single Ubiquity input, like</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="en" style="font-family:monospace;">translate hello from English to Spanish</pre></td></tr></table></div>


<p>there are actually many different components that need to all be localized in order to comprehend the equivalent sentence in a different language. The diagram below will give you a sense for the different components that need to be localized: the parser, verbs, and nountypes.</p>

<table>
<tr><th>input:</th><td>translate</td><td>hello</td><td>from</td><td>English</td><td>to</td><td>Spanish</td></tr>
<tr><th>element type:</th><td>verb</td><td>free argument</td><td>delimiter</td><td>structured argument</td><td>delimiter</td><td>structured argument</td></tr>
<tr><th>component to localize:</th><td>verb name</td><td>&nbsp;</td><td>parser</td><td>nountype</td><td>parser</td><td>nountype</td></tr>
</table>

<h3>What&#8217;s New</h3>

<p>Ubiquity 0.5&#8217;s improved language support can be thought of as the product of two more or less orthogonal developments: the brand-new parser, Parser 2, as well as local command localization support.</p>

<h4>Parser 2</h4>

<p>Parser 2 (née <a href="http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/">Parser: The Next Generation</a>) is a completely new parser designed to support different languages easily. Taking a serious look at the similarities and differences between different languages, we created a universal <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2">parser design</a> which takes a minimal set of settings for particular languages to &#8220;learn&#8221; that language&#8217;s grammar.</p>

<p>The key insight to Parser 2&#8217;s design is that, for the limited range of inputs Ubiquity should understand, languages deal with them in remarkably similar ways. The input we&#8217;re dealing with here are all commands or actions without quantification or negation. These are all comprised of a single verb and a series of arguments with certain markings to designate their roles in the sentence. For example, here&#8217;s our example Ubiquity input:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="en" style="font-family:monospace;">translate hello from English to Spanish</pre></td></tr></table></div>


<p>In this example, &#8220;translate&#8221; is the verb, which we recognize by looking at our bank of known verbs, and the rest of the input can be split up into three different arguments: &#8220;hello,&#8221; &#8220;from English,&#8221; and &#8220;to Spanish.&#8221; Of these, the markers &#8220;from&#8221; and &#8220;to&#8221; tell us that &#8220;English&#8221; is a <em>source</em> of some sort and &#8220;Spanish&#8221; is a <em>goal</em>, while the unmarked &#8220;hello&#8221; is simply an <em>object</em>—the target of the action. By identifying arguments by these abstract <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles"><em>semantic roles</em></a>, we&#8217;re able to quickly identify different kinds of arguments in different languages. For example, the following is the exact same example but using the Japanese syntax and markers:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
</pre></td><td class="code"><pre class="en" style="font-family:monospace;">helloをEnglishからSpanishにtranslate</pre></td></tr></table></div>


<p>Ubiquity knows what the different markers mean in Japanese, like &#8220;を&#8221; > <code>object</code>, &#8220;から&#8221; > <code>source</code>, &#8220;に&#8221; > <code>goal</code>, and can easily interpret this to mean the exact same command as (1). With just a few lines of code, <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Localization_Tutorial">you can teach</a> Ubiquity how to recognize these different semantic roles in your language. This innovation also means that Ubiquity commands can be <a href="http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/">written once for one language and automatically used with another language&#8217;s parser</a>, bringing us half-way to the goal of command localization.</p>

<p>Note also that Japanese (as in example (2)) is verb-final and uses no spaces between words. We&#8217;ve tried to make Parser 2 itself agnostic towards these types of different ways in which languages vary.</p>

<p>Parser 2 also adds <a href="http://mitcho.com/blog/projects/a-demonstration-of-ubiquity-parser-2/">better argument-first suggestions</a>, inspired by some <a href="http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/">earlier thoughts on Ubiquity in Japanese</a>. Ubiquity will now start to parse arguments in the input even if a verb isn&#8217;t found, and suggest verbs based on that input. For example, if you enter &#8220;hello to Spanish,&#8221; it&#8217;ll recognize that you have an <em>object</em> of &#8220;hello&#8221; and a <em>goal</em> of &#8220;Spanish&#8221; which can be understood as a language name, so it&#8217;ll suggest the verb &#8220;translate.&#8221; This is the way it should be. <img src='http://mitcho.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p><small>For more information and background, feel free to check out some of my previous blog posts <a href="http://mitcho.com/blog/tag/ubiquity+parser/">on the new parser</a> and <a href="http://mitcho.com/blog/tag/ubiquity+linguistics/">on the different linguistic considerations</a>. I also have a four-page academic paper giving an overview of some innovations in the parser—email me at <code>x@x.com</code> where <code>x=mitcho</code> if you&#8217;d like to get a copy.</small></p>

<h4>Internationalization of bundled commands</h4>

<p>The move to use <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Semantic_Roles">semantic roles</a> in the <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_Source_Tip_Author_Tutorial">new command API</a>, described above, means that the same Ubiquity command code can be used with inputs in different languages. Two things are left, then, to make a completely localized input work: (1) translation (localization) of different strings in the commands and (2) localization of the nountypes.</p>

<p>In Ubiquity 0.5, we built a localization infrastructure for commands (1, above) but have not yet tackled the nountypes (2). Ubiquity 0.5 uses the <a href="http://en.wikipedia.org/wiki/gettext">gettext</a> <code>po</code> (portable object) file format for localizations, which many localizers in the UNIX world are very familiar with. This <a href="http://groups.google.com/group/ubiquity-i18n/browse_thread/thread/79c7cea117ad04bb#">choice of file format</a> potentially opens Ubiquity localization up to many who are new to localization or are unfamiliar with other Mozilla localization. Ubiquity is able to produce localization templates by itself and we also have <a href="http://geeksbynature.dk/?p=35">a great tool</a> to check the completeness of different localizations.</p>

<p>A huge caveat, however, is that this localization support currently only works with the commands bundled with Ubiquity itself.</p>

<h3>What&#8217;s Next</h3>

<p>We&#8217;re going to continue working to make Ubiquity <a href="http://mitcho.com/blog/projects/how-natural-should-a-natural-interface-be/">more natural</a> for more users. The tasks we have ahead of us are the localization of nountypes and community commands.</p>

<h4>Nountype localization</h4>

<p>With the new semantic role argument specifications, command localization simply became a question of translating some strings, which many localizers are used to. After all, we want localizations to affect the <em>presentation</em> of commands, not the logic of the commands. When it comes to nountypes, however, it is quite possible that we would actually want the nountype localization to affect its behavior.</p>

<p>Consider, for example, an imaginary <code>day_of_the_week</code> nountype. In English, this nountype might accept or suggest strings like &#8220;Monday&#8221; or &#8220;Tuesday,&#8221; while a French localization would accept &#8220;lundi&#8221; or &#8220;mardi.&#8221; More complicated still, consider a <code>date</code> nountype. In English this nountype may have custom logic to parse strings like &#8220;June 1st&#8221; while another language may have to parse very different kinds of strings. These nountype localizations thus involve not just string translations, but actual changes in their <em>logic</em>, making the <code>po</code> format approach we took to command localization a poor fit.</p>

<p>Making nountypes localizable, however, will make Ubiquity significantly more &#8220;natural&#8221; for many users. In the coming weeks and months we&#8217;ll be discussing and debating different options to accomplish this.</p>

<h4>Community command localization</h4>

<p>Even though the file format and infrastructure for command localization itself has been fleshed out with Ubiquity 0.5, the distributed nature of all these community commands adds an additional complication. Do we want community command localizations to be completely distributed, or should they be centralized? If they&#8217;re distributed, how do you find them? These are the types of questions we&#8217;ll need to ask and answer. The ease of creating a new Ubiquity command and sharing it with the world is a huge asset of the platform, so we&#8217;ll definitely be thinking about how best to localize these community commands as well. In the next day or two I&#8217;ll be writing up a more detailed blog post on what we need from a good community command localization solution.</p>

<h3>Summary</h3>

<p>For the more visually inclined (including myself), here&#8217;s a handy diagram to summarize what components are localizable now, what will be in the future, and what this means for Ubiquity users of different languages.</p>

<table>
<tr><th rowspan='2'>localized components</th><th rowspan='2'>Japanese input that Ubiquity will understand</th><th colspan='2'>support coverage</th></tr>
<tr><th>for bundled commands</th><th>for community commands</th></tr>
<tr><th><i>no localization</i></th><td>translate hello from English to Spanish</td><th rowspan='3' style='background: #99ff99'>Ubiquity 0.5!</th><th rowspan='2' style='background: #99ff99'>Ubiquity 0.5!</td></tr>
<tr><th>parser</th><td>helloをEnglishからSpanishにtranslate</td></tr>
<tr><th>parser + verbs</th><td>helloをEnglishからSpanishに訳す</td><th rowspan='2' style='background: #f99'><i>the future</i></th></tr>
<tr><th>parser + verbs + nountypes</th><td>helloを英語からスペイン語に訳す</td><th rowspan='1' style='background: #f99'><i>the future</i></th></tr>
</table>

<h3>Get Involved</h3>

<p>Whether you&#8217;re a speaker of an as-yet unsupported language, a veteran localization contributor, or simply interested in seeing how we can offer this natural language interface to more languages and more users, there are lots of ways to get involved. If you have some JavaScript experience and want to teach Ubiquity your native languages&#8217; grammar, read our <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Localization_Tutorial">parser localization tutorial</a>. If you would like to contribute localizations for our built-in commands, there&#8217;s a <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.5_Command_Localization_Tutorial">command localization tutorial</a>. To discuss how best to localize nountypes and community commands, or to ask questions about or discuss command and parser localization, join us on the <a href="http://groups.google.com/group/ubiquity-i18n">Ubiquity-i18n mailing list</a>.</p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/' rel='bookmark' title='Localizing Commands for Ubiquity 0.5'>Localizing Commands for Ubiquity 0.5</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/' rel='bookmark' title='Localizing Ubiquity: commands and nountypes'>Localizing Ubiquity: commands and nountypes</a></li>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/ubiquity-localization-whats-new-whats-next/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Localizing Commands for Ubiquity 0.5</title>
		<link>http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/</link>
		<comments>http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 11:12:23 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[participate]]></category>
		<category><![CDATA[po]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2331</guid>
		<description><![CDATA[As many of you know, earlier this week we released a preview of version 0.5 (0.5pre). We&#8217;re going to stress test and refine this release through the weekend and push the official 0.5 out next Tuesday. This release will have fully localized commands for Danish and Japanese, as well as parser settings for a number [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/' rel='bookmark' title='Localizing Ubiquity: commands and nountypes'>Localizing Ubiquity: commands and nountypes</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-update/' rel='bookmark' title='Ubiquity Localization Update'>Ubiquity Localization Update</a></li>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>As many of you know, earlier this week we released a preview of version 0.5 (0.5pre). We&#8217;re going to stress test and refine this release through the weekend and push the official 0.5 out next Tuesday. This release will have fully localized commands for Danish and Japanese, as well as parser settings for a number of other languages. Read <a href="https://labs.mozilla.com/2009/06/ubiquity-0-5-preview-release/">this Labs blog post</a> to learn more about the 0.5 release and how to test it.</p>

<p>It&#8217;s not too late to add localizations for other languages to 0.5, though. Localizations help make Ubiquity more &#8220;natural&#8221; for more users, offering a new level of ease and familiarity to the already powerful Ubiquity. We have <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.5_Command_Localization_Tutorial">a new tutorial to help you localize commands</a>.</p>

<p>To help encourage command localization, we now have <a href="http://en.wikipedia.org/wiki/gettext">gettext</a>-style <code>po</code> template files for all the bundled command feeds in the hg repository. You can find these files in the <code>ubiquity/localization/templates</code> directory of the repository, or <a href="http://ubiquity.mozilla.com/hg/ubiquity-firefox/file/tip/ubiquity/localization/templates">on our online hg repository</a>.</p>

<p>If you complete some localizations (even incomplete) for your language and would like to submit them into the repository, for the time being, you can post them on <a href="http://ubiquity.mozilla.com/trac/ticket/712">this trac ticket</a>.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p>I&#8217;ll be looking forward to seeing your localizations! If you have any questions, feel free to ask on the <a href="http://groups.google.com/group/ubiquity-i18n/">ubiquity-i18n Google group</a> or on <a href="irc://irc.mozilla.org#ubiquity">irc.mozilla.org#ubiquity</a>. ^^</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>In the post-0.5 future we&#8217;ll be rethinking how best to organize these localization files and give commit access to as many localizers as possible.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/' rel='bookmark' title='Localizing Ubiquity: commands and nountypes'>Localizing Ubiquity: commands and nountypes</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-localization-update/' rel='bookmark' title='Ubiquity Localization Update'>Ubiquity Localization Update</a></li>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/localizing-commands-for-ubiquity-0-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubiquity Localization Update</title>
		<link>http://mitcho.com/blog/projects/ubiquity-localization-update/</link>
		<comments>http://mitcho.com/blog/projects/ubiquity-localization-update/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 10:35:23 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[gettext]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2219</guid>
		<description><![CDATA[As we move closer and closer to shipping a Ubiquity with there is still much work to be done, particularly in the area of localization. In a recent Ubiquity meeting we laid out the explicit localization goals and non-goals of as follows: Goals for 0.5 Parser 2 (on by default) underlying support for localization of [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/' rel='bookmark' title='Localizing Ubiquity: commands and nountypes'>Localizing Ubiquity: commands and nountypes</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/' rel='bookmark' title='Ubiquity Commands by The Numbers'>Ubiquity Commands by The Numbers</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>As we move closer and closer to shipping a Ubiquity with <a href="https://labs.mozilla.com/2009/05/ubiquity-05-call-for-participation/">there is still much work to be done</a>, particularly in the area of localization. <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings/2009-05-27_Weekly_Meeting">In a recent Ubiquity meeting</a> we laid out the explicit localization goals and non-goals of as follows:</p>

<ul>
<li>Goals for 0.5

<ul>
<li>Parser 2 (on by default)</li>
<li>underlying support for localization of commands</li>
<li>localization of standard feed commands for a few languages</li>
<li>Parser 2 language files for those same languages</li>
</ul></li>
<li>Nongoals for 0.5

<ul>
<li>distribution/sharing of localizations</li>
<li>localization of nountypes </li>
</ul></li>
</ul>

<p>The overall goal for this release of Ubiquity is to come up with a format and standard for localization. Localizations in Ubiquity 0.5 will only apply to commands bundled with Ubiquity, and the localization files themselves will be distributed with Ubiquity. In a future release we will tackle the problem of localizations for <a href="https://ubiquity.mozilla.com/herd/">commands in the wild</a> and truly croud-source<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> this process.</p>

<p><span id="more-2219"></span></p>

<h3>Localization Architecture</h3>

<p>The localization of Ubiquity commands will use a <a href="http://en.wikipedia.org/wiki/gettext">gettext</a>-style approach where localization files list key-value pairs for different properties and messages of the commands. For Ubiquity 0.5, where we only deal with the standard command feeds bundled Ubiquity, we can simply place all the localization files in <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/file/tip/ubiquity/standard-feeds/localization"><code>ubiquity/standard-feeds/localization</code></a>. Localization files are organized by source feed, with one localization file per source feed, per language.</p>

<p>The localizable components of commands will include the <code>names</code>, <code>contributors</code>, and <code>help</code> properties, as well as any localizable strings in the command&#8217;s <code>preview()</code> and <code>execute()</code> methods. To make strings localizable in <code>preview()</code> and <code>execute()</code>, they must be wrapped in the localize function, <code>_()</code>.<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup></p>

<p>Other localizable components, like <code>names</code>, <code>contributors</code>, and <code>help</code> will not need to be wrapped in the <code>_()</code> function. In addition, as the localization files can only hold values of strings, for values such as names and contributors, the delimiter <code>|</code> can be used to delimit multiple values.</p>

<p><pre code='javascript'>zoom.names=ズーム|ズームして|ズームする|ズームしろ</pre></p>

<h3>The Localization Experience</h3>

<p><a href="https://ubiquity.mozilla.com/trac/ticket/739">One tool we have planned</a> to help kickstart the localization process is a tool that will automatically create a template of strings that need localization in a user&#8217;s commands. I took a first stab at this tool today. Clicking on the &#8220;get localization template&#8221; link next to each feed in the <a href="chrome://ubiquity/content/cmdlist.html">Ubiquity command list</a> will give you a template which you can then copy into a text file:</p>

<p><a class='limages' href='http://mitcho.com/blog/wp-content/uploads/2009/06/localization-template.png' rel='lightbox'><img src="http://mitcho.com/blog/wp-content/uploads/2009/06/localization-template-smaller.png" alt="localization-template-smaller.png" border="0" width="600" height="437" /></a></p>

<p>Additionally, instructions will later be added to this page to specify how and where to save localizations to test them or perhaps we can add a button that will automatically save it in the right location.</p>

<h3>Open Questions</h3>

<h4>Localization file formats</h4>

<p>There are two kinds of file formats for localizations we are considering: <a href="https://developer.mozilla.org/En/XUL_Tutorial/Property_Files"><code>.properties</code></a> and <code>.po</code>, the native <a href="http://en.wikipedia.org/wiki/gettext">gettext</a> format. As an example, here is the same key-value pair in the two formats:</p>

<h5><code>.properties</code>:</h5>

<p><pre># This is a comment
welcomeMessage=Hello, world!</pre></p>

<h5><code>.po</code>:</h5>

<p><pre>#. This is a comment (the . is actually optional)
msgid "welcomeMessage"
msgstr "Hello, world!"</pre></p>

<p>The advantage of <code>.properties</code> over <code>.po</code> is that Mozilla natively supports this format with an XUL/XPCOM interface called <a href="https://developer.mozilla.org/En/XUL/Stringbundle">stringbundle</a> and it is what is used to localize JavaScript in Firefox itself. We actually already have the <code>_()</code> localization function working with the properties file format, following <a href="http://www.xuldev.org/blog/?p=45">gomita&#8217;s great instructions</a> (Japanese) on how to load properties files in using Mozilla&#8217;s native <a href="https://developer.mozilla.org/En/XUL/Stringbundle">stringbundle</a> tools via JavaScript.</p>

<p>The advantage of <code>.po</code> over <code>.properties</code> is that it is the de-facto standard in localization, particularly in the UNIX world. Lots of great tools have been written for it. The adoption of <code>.po</code> could make Ubiquity localization more accessible for more people. Another advantage is that <code>.po</code> files can have keys with spaces, as I note below.</p>

<p>If we do opt to work with <code>.po</code> files, the two libraries I see out in the wild for dealing with <code>.po</code> files are <a href="http://code.google.com/p/gettext-js/">gettext-js</a> (MIT) and <a href="http://jsgettext.berlios.de/">jsgettext</a> (LGPL). While I haven&#8217;t looked at the libraries in depth yet, so far jsgettext seems to be the winner, as some sections of gettext-js require the use of the <a href="http://www.prototypejs.org/">prototype.js</a> library.</p>

<h4>A &#8220;key&#8221; question</h4>

<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/06/icanhaskeyplz.jpg" alt="icanhaskeyplz.jpg" border="0" width="650" height="416" /></p>

<p>In either file format, we need a unique way to refer to each localizable string—a key format. As each localization file refers to a command feed, the first collision we must avoid is the command name. With this in mind, we can come up with some trivial keys for the localizable properties: (here, consider the command <code>hello</code>)</p>

<ul>
<li><code>hello.names</code></li>
<li><code>hello.contributors</code></li>
<li><code>hello.help</code></li>
</ul>

<p>However, we run into difficulty when we try to come up with keys for the arbitrary text in <code>preview</code>s and <code>execute</code>s. For example, for a message like &#8220;Hello world!&#8221; in the preview, we could simply make the key <code>hello.preview.Hello world!</code> but this may be unruly and be prone to typos. In addition, in <code>.properties</code> files keys cannot have certain characters in them, like spaces, so we would have to make the key something like <code>hello.preview.Hello_world!</code> or, stripping symbols and standardizing case, <code>hello.preview.HELLO_WORLD</code>.</p>

<p>Keys could also get very long with this type of key format, although here again <code>.po</code> files may have an advantage as they can stay relatively more legible even with long keys. One option to deal with this would be to optionally supply a key argument to <code>_()</code> so that it is used instead of the automatic key. For example, suppose the <code>hello</code> command&#8217;s <code>preview()</code> included this code:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">_<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'This is a really long greeting message. Hello there!'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'longmessage'</span><span style="color: #009900;">&#41;</span></pre></div></div>


<p>then a localizer would only have to refer to <code>hello.preview.longmessage</code>, not <code>hello.preview.THIS_IS_A_REALLY_LONG_GREETING_MESSAGE_HELLO_THERE</code>.</p>

<p><a href="http://twitter.com/m_satyr">satyr</a> points out that some commands use another function to incorporate similar actions and messages in both <code>preview()</code> and <code>execute()</code>. In this case, he argues, it wouldn&#8217;t make sense to have to keep both localizations (<code>hello.preview.</code>&#8230; and <code>hello.execute.</code>&#8230;). He suggests that optional keys (mentioned above) could be used without the <code>preview.</code> or <code>execute.</code> infixes, as in <code>hello.longmessage</code>. By taking out the <code>preview</code> and <code>execute</code> namespacing in the localization keys, though, it becomes the command author&#8217;s responsibility to not accidentally use strings named &#8220;names&#8221;, &#8220;help&#8221;, etc. that will have unintended consequences.</p>

<h3>Conclusion</h3>

<p>I hope that this blog post gives people an idea of the progress we&#8217;ve made in the localization area and gets people thinking about the challenges we still face. <strong>We&#8217;d love to get your feedback on the localization format and process in Ubiquity, as well as the open problems of the file format and keys.</strong></p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>Or &#8220;cloud-source&#8221;&#8230; finally a Japanese accent joke that&#8217;s semantically stable!&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>This function currently also has the ability to do simple <a href="http://en.wikipedia.org/wiki/printf">printf</a>-formatted string replacements:<br/>
<pre code='javascript'>_('This is a %S.',['test'])</pre>
<br/>Whether this format will replace support for <code>CmdUtils.renderTemplate</code> remains to be seen and is definitely worthy of discussion. If we move away from <a href="https://developer.mozilla.org/En/XUL_Tutorial/Property_Files">properties files</a>, in particular, we may keep <code>renderTemplate()</code> in lieu of the <a href="http://en.wikipedia.org/wiki/printf">printf</a> format. Mozilla&#8217;s built-in <a href="https://developer.mozilla.org/En/XUL/Stringbundle">stringbundle handling</a> just gave us a fast and free implementation of <a href="http://en.wikipedia.org/wiki/printf">printf</a>-style replacement.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/' rel='bookmark' title='Localizing Ubiquity: commands and nountypes'>Localizing Ubiquity: commands and nountypes</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/' rel='bookmark' title='Ubiquity Commands by The Numbers'>Ubiquity Commands by The Numbers</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/ubiquity-localization-update/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Localizing Ubiquity: commands and nountypes</title>
		<link>http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/</link>
		<comments>http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/#comments</comments>
		<pubDate>Mon, 25 May 2009 02:56:14 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2100</guid>
		<description><![CDATA[Now that Parser 2 is in decent shape and a number of parsing problems in different languages have been tackled, the focus has now shifted to coming up with an approach for localizing Ubiquity commands and nountypes. At last week&#8217;s weekly Ubiquity meeting we had a great conversation on this subject, which then has continued [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/' rel='bookmark' title='Ubiquity Commands by The Numbers'>Ubiquity Commands by The Numbers</a></li>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Now that <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2">Parser 2</a> is in decent shape and a number of parsing problems in different languages have been tackled, the focus has now shifted to coming up with an approach for localizing Ubiquity commands and nountypes. At last week&#8217;s weekly Ubiquity meeting we had a great conversation on this subject, which then has <a href="http://groups.google.com/group/ubiquity-i18n/browse_thread/thread/56b97b6ed10d0d1a">continued on the Google group</a>.</p>

<p>I&#8217;ve been framing this problem as two subproblems:</p>

<ol>
<li>What will be the data structure of localized commands/nountypes within Ubiquity?</li>
<li>How do we distribute/share these localizations?</li>
</ol>

<p>We&#8217;ve mostly been discussing the first problem, weighing the merits of unified objects (with different localized text as different JS properties) as opposed to a <a href="http://en.wikipedia.org/wiki/gettext">gettext</a>-style approach, and noting that our requirements for commands and nountypes may be different. I hope we can discuss the second issue more in the coming week.</p>

<p>Should everything go through the command author? Should localization be centralized through some web tool? Should it be completely distributed like commands currently are? <strong>I invite you to join us in this conversation on the <a href="http://groups.google.com/group/ubiquity-i18n">Google group</a>.</strong> ^^</p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-commands-by-the-numbers/' rel='bookmark' title='Ubiquity Commands by The Numbers'>Ubiquity Commands by The Numbers</a></li>
<li><a href='http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/' rel='bookmark' title='Big Issues and Small Issues with Parser 2'>Big Issues and Small Issues with Parser 2</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/localizing-ubiquity-commands-and-nountypes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Big Issues and Small Issues with Parser 2</title>
		<link>http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/</link>
		<comments>http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/#comments</comments>
		<pubDate>Wed, 20 May 2009 03:05:53 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Dutch]]></category>
		<category><![CDATA[German]]></category>
		<category><![CDATA[Greek]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=2087</guid>
		<description><![CDATA[Jono and I had a good conversation this morning on IRC about the remaining Big Issues which are blocking the release of Parser 2 as the default parser for Ubiquity. Here are our Top 4 Big Issues: Some commands&#8217; preview&#8217;s and execute&#8217;s are not working properly (trac #652). This could be an underlying issue with [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/' rel='bookmark' title='This week on Ubiquity Parser: The Next Generation'>This week on Ubiquity Parser: The Next Generation</a></li>
<li><a href='http://mitcho.com/blog/projects/a-demonstration-of-ubiquity-parser-2/' rel='bookmark' title='A Demonstration of Ubiquity Parser 2'>A Demonstration of Ubiquity Parser 2</a></li>
<li><a href='http://mitcho.com/blog/how-to/adding-your-language-to-ubiquity-parser-2/' rel='bookmark' title='Adding Your Language to Ubiquity Parser 2'>Adding Your Language to Ubiquity Parser 2</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://jonoscript.wordpress.com/">Jono</a> and I had a good conversation this morning on <a href="irc://irc.mozilla.org/ubiquity">IRC</a> about the remaining Big Issues which are blocking the release of Parser 2 as the default parser for <a href="http://ubiquity.mozilla.com">Ubiquity</a>. Here are our <strong>Top 4 Big Issues</strong>:</p>

<ol>
<li><strong>Some commands&#8217; <code>preview</code>&#8217;s and <code>execute</code>&#8217;s are not working properly</strong> (<a href="http://ubiquity.mozilla.com/trac/ticket/653">trac #652</a>). This could be an underlying issue with some pipes not rerouted correctly in Parser 2, or it could be that the commands have not been rewritten correctly to take advantage of Parser 2.</li>
<li><strong>Flesh out how to localize resources, like commands and nountypes.</strong> We <a href="http://groups.google.com/group/ubiquity-i18n/browse_thread/thread/ab4d876b1ea02d4">started a conversation</a> on this subject a few weeks ago but we never reached a resolution. This blocks issues 3 and 4 below.</li>
<li><strong>We need to standardize a format for commands for Parser 2.</strong> As <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings/2009-05-13_Weekly_Meeting#Notes">noted in last week&#8217;s meeting</a> (among other places) Parser 2 will require at least some modification to all commands. Jono and I came up with a simple hybrid format for commands which specify <code>takes</code> and <code>modifiers</code> for Parser 1 and <code>arguments</code> for Parser 2, but until we figure out how exactly the localization of commands will work, we can&#8217;t write a definitive standard.</li>
<li><strong>Enable nountype localization.</strong> While the most popular nountypes used are those that ship with Ubiquity, it is important to come up with a localization process which can apply to custom nountypes as well. Nountype localizations need the ability to either (1) replace the <code>_name</code> only, or (2) replace both the <code>_name</code> and the <code>suggest()</code> logic, as both cases will be necessary.</li>
</ol>

<p>Given that Big Issue 3 and Big Issue 4 are both dependent on Big Issue 2, there clearly needs to be a continued public discussion of how we should make these resources localizable. <strong>I look forward to this discussion taking place <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings/2009-05-20_Weekly_Meeting">at tomorrow&#8217;s joint (general + i18n) Ubiquity meeting</a>.</strong></p>

<p>In other news, here are some <strong><small>Small Issues</small></strong>:</p>

<ol>
<li><strong>Add a switch for parser version and language settings</strong>: Jono&#8217;s already made a space for this in the new &#8220;Settings and Skins&#8221; page in <code>about:ubiquity</code>. He&#8217;s on it. Like a bonnet.</li>
<li><strong>Magic word (anaphor) substitution is not yet working properly.</strong> This needs to work both when there is an explicit magic word and when there are simply missing arguments.</li>
<li><strong>The position of suggested verbs is always sentence-initial</strong> (<a href="http://ubiquity.mozilla.com/trac/ticket/655">trac #655</a>). This also requires that we can specify whether verb name localizations are sentence-initial forms or sentence-final forms.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></li>
<li><a href="http://ubiquity.mozilla.com/trac/search?ticket=on&amp;q=new-parser">&#8230;</a></li>
</ol>

<p>Let&#8217;s hit the code!</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>German, Dutch, and Greek, for example, are all languages where there are both command verb forms which are sentence-initial and sentence-final.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/' rel='bookmark' title='This week on Ubiquity Parser: The Next Generation'>This week on Ubiquity Parser: The Next Generation</a></li>
<li><a href='http://mitcho.com/blog/projects/a-demonstration-of-ubiquity-parser-2/' rel='bookmark' title='A Demonstration of Ubiquity Parser 2'>A Demonstration of Ubiquity Parser 2</a></li>
<li><a href='http://mitcho.com/blog/how-to/adding-your-language-to-ubiquity-parser-2/' rel='bookmark' title='Adding Your Language to Ubiquity Parser 2'>Adding Your Language to Ubiquity Parser 2</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/big-issues-and-small-issues-with-parser-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding Your Language to Ubiquity Parser 2</title>
		<link>http://mitcho.com/blog/how-to/adding-your-language-to-ubiquity-parser-2/</link>
		<comments>http://mitcho.com/blog/how-to/adding-your-language-to-ubiquity-parser-2/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 11:44:20 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[how to]]></category>
		<category><![CDATA[argument structure]]></category>
		<category><![CDATA[arguments]]></category>
		<category><![CDATA[case marking]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[French]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[semantic roles]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1956</guid>
		<description><![CDATA[NOTE: This blog post has now been added to the Ubiquity wiki and is updated there. Please disregard this article and instead follow these instructions. You&#8217;ve seen the video. You speak another language. And you&#8217;re wondering, &#8220;how hard is it to add my language to Ubiquity with Parser 2?&#8221; The answer: not that hard. With [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/rolling-out-the-roles/' rel='bookmark' title='Rolling out the Roles'>Rolling out the Roles</a></li>
<li><a href='http://mitcho.com/blog/projects/foxkeh-demos-ubiquity-parser-the-next-generation/' rel='bookmark' title='Foxkeh demos Ubiquity Parser: The Next Generation'>Foxkeh demos Ubiquity Parser: The Next Generation</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE: This blog post has now been added to the Ubiquity wiki and is updated there. Please disregard this article and instead follow <a href="https://wiki.mozilla.org/Labs/Ubiquity/Parser_2/Localization_Tutorial">these instructions</a>.</strong></p>

<p>You&#8217;ve <a href="http://mitcho.com/blog/projects/a-demonstration-of-ubiquity-parser-2/">seen the video</a>. You speak another language. And you&#8217;re wondering, <strong>&#8220;how hard is it to add my language to Ubiquity with Parser 2?&#8221;</strong> The answer: <strong>not that hard.</strong> With a little bit of JavaScript and knowledge of and interest in your own language, you&#8217;ll be able to get at least rudimentary Ubiquity functionality in your language. Follow along in this step by step guide and please <a href="http://ubiquity.mozilla.com/trac/ticket/662">submit your (even incomplete) language files</a>!</p>

<p><em>As Ubiquity Parser 2 evolves, there is a chance that this specification will change in the future. Keep abreast of such changes on the <a href="http://ubiquity.mozilla.com/planet/">Ubiquity Planet</a> and/or <a href="http://mitcho.com/blog/">this blog</a> (<a href="http://mitcho.com/blog/feed/blog-only/">RSS</a>).</em></p>

<p><span id="more-1956"></span></p>

<h3>Set up your environment</h3>

<p>If you&#8217;re new to Ubiquity core development, you&#8217;ll want to first read the <a href="http://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial">Ubiquity 0.1 Development Tutorial</a> to learn how to get a live copy of the Ubiquity repository using <a href="http://en.wikipedia.org/wiki/Mercurial">Mercurial</a>. Once you&#8217;ve set up your Firefox profile to use this development version, make sure to try changing the <code>extensions.ubiquity.parserVersion</code> value to 2 in <code>about:config</code> (as seen in <a href="(http://mitcho.com/blog/projects/a-demonstration-of-ubiquity-parser-2/)">this demo video</a>) to verify that Parser 2 is working for you.</p>

<p>As you read along, you may find it beneficial to follow along in the languages currently included in Parser 2: <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/en.js">English</a>, <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/ja.js">Japanese</a>, <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/pt.js">Portuguese</a>, and <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/sv.js">Swedish</a> (and the incomplete <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/zh.js">Chinese</a> and <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/fr.js">French</a>).</p>

<h3>The structure of the language file</h3>

<p>Each language in Parser 2 gets its own file which acts as a <a href="https://developer.mozilla.org/En/Using_JavaScript_code_modules">JavaScript module</a>. You&#8217;ll need to look up the <a href="http://en.wikipedia.org/wiki/List of ISO 639-1 codes">ISO 639-1 code for your language</a>&#8230; Here we&#8217;ll use English (code <code>en</code>) as an example here and the JavaScript language file would then be called <code>en.js</code> and go in the <code>/ubiquity/modules/parser/new/</code> directory of the repository.</p>

<p>Here is the basic template for a Ubiquity Parser 2 language file:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> EXPORTED_SYMBOLS <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;makeEnParser&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> window<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// kick it chrome style</span>
  Components.<span style="color: #660066;">utils</span>.<span style="color: #003366; font-weight: bold;">import</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;resource://ubiquity/modules/parser/new/parser.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> makeEnParser<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> en <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Parser<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'en'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
...
&nbsp;
  <span style="color: #000066; font-weight: bold;">return</span> en<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<p>After lines 1-4 which set up the <a href="https://developer.mozilla.org/En/Using_JavaScript_code_modules">JavaScript module</a>, everything else is wrapped in a factory function called <code>makeLaParser</code> (for Latin) or <code>makeEnParser</code> (for English, <code>en</code>) or <code>makeFrParser</code> (for French, <code>fr</code>), etc. This function initializes the new <code>Parser</code> object (line 7) with the appropriate language code, sets a bunch of parameters (elided above) and returns it. That&#8217;s it!</p>

<p>Now let&#8217;s walk through some of the parameters you must set to get your language working. For reference, the properties the language parser object is required to have are: <code>branching</code>, <code>anaphora</code>, and <code>roles</code>.</p>

<h3>Identifying your branching parameter</h3>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  en.<span style="color: #660066;">branching</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'right'</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// or 'left'</span></pre></div></div>


<p>One of the first things you&#8217;ll have to set for your parser is <strong>the <code>branching</code> parameter</strong>. Ubiquity Parser 2 uses the branching parameter to decide which direction to look for an argument after finding a delimiter or &#8220;role marker&#8221; (most often, these are <a href="http://en.wikipedia.org/wiki/adposition">prepositions or postpositions</a>. For example, in English &#8220;from&#8221; is a delimiter for the <code>goal</code> role and its argument is on its right.</p>

<table>
<tr><td>&nbsp;</td><td>&nbsp;</td><td colspan='2' style='background: transparent url(http://mitcho.com/i/cccarrow-right.png) no-repeat right bottom'>&nbsp;</td></tr>
<tr><td><b>to</b></td><td>Mary</td><td><b>from</b></td><td>John</td></tr>
</table>

<p>So &#8220;John&#8221; is a possible argument for the <code>source</code> role, but &#8220;Mary&#8221; should not be. Ubiquity can figure this out because English has the property <code>en.branching = 'right'</code>.</p>

<p>In Japanese, on the other hand, the argument of a delimiter like から (&#8220;from&#8221;) is found on the left of that delimiter, so <code>en.branching = 'left'</code>.</p>

<table>
<tr><td colspan='2' style='background: transparent url(http://mitcho.com/i/cccarrow-left.png) no-repeat left bottom'>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
<tr><td>メアリー</td><td><b>-から</b></td><td>ジョン</td><td><b>-に</b></td></tr>
<tr><td>Mary</td><td><b>from</b></td><td>John</td><td><b>to</b></td></tr>
</table>

<p>In general, if your language has prepositions, you should use <code>.branching = 'right'</code> and if your language has postpositions, you can use <code>.branching = 'left'</code>.</p>

<p><strong>For more info</strong>:</p>

<ul>
<li>see <a href="http://en.wikipedia.org/wiki/Branching (linguistics)">branching</a> on Wikipedia.</li>
</ul>

<h3>Defining your roles</h3>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  en.<span style="color: #660066;">roles</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
    <span style="color: #009900;">&#123;</span>role<span style="color: #339933;">:</span> <span style="color: #3366CC;">'goal'</span><span style="color: #339933;">,</span> delimiter<span style="color: #339933;">:</span> <span style="color: #3366CC;">'to'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>role<span style="color: #339933;">:</span> <span style="color: #3366CC;">'source'</span><span style="color: #339933;">,</span> delimiter<span style="color: #339933;">:</span> <span style="color: #3366CC;">'from'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>role<span style="color: #339933;">:</span> <span style="color: #3366CC;">'position'</span><span style="color: #339933;">,</span> delimiter<span style="color: #339933;">:</span> <span style="color: #3366CC;">'at'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>role<span style="color: #339933;">:</span> <span style="color: #3366CC;">'position'</span><span style="color: #339933;">,</span> delimiter<span style="color: #339933;">:</span> <span style="color: #3366CC;">'on'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>role<span style="color: #339933;">:</span> <span style="color: #3366CC;">'alias'</span><span style="color: #339933;">,</span> delimiter<span style="color: #339933;">:</span> <span style="color: #3366CC;">'as'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>role<span style="color: #339933;">:</span> <span style="color: #3366CC;">'instrument'</span><span style="color: #339933;">,</span> delimiter<span style="color: #339933;">:</span> <span style="color: #3366CC;">'using'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>role<span style="color: #339933;">:</span> <span style="color: #3366CC;">'instrument'</span><span style="color: #339933;">,</span> delimiter<span style="color: #339933;">:</span> <span style="color: #3366CC;">'with'</span><span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>


<p>The second required property is the inventory of semantic roles and their corresponding delimiters. Each entry has a <code>role</code> from the <a href="http://mitcho.com/blog/projects/rolling-out-the-roles/">inventory of semantic roles</a> and a corresponding delimiter. Note that this mapping can be <a href="http://en.wikipedia.org/wiki/many-to-many (data model)">many-to-many</a>, i.e., each role can have multiple possible delimiters and different roles can have shared delimiters. Try to make sure to cover all of the roles in the <a href="http://mitcho.com/blog/projects/rolling-out-the-roles/">inventory of semantic roles</a>.</p>

<p><strong>For more info:</strong></p>

<ul>
<li><a href="http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/">Writing commands with semantic roles</a></li>
<li><a href="http://mitcho.com/blog/projects/rolling-out-the-roles/">the proposed inventory of semantic roles</a></li>
<li>Wikipedia entry on <a href="http://en.wikipedia.org/wiki/thematic relations">thematic relations</a></li>
</ul>

<h3>Entering your anaphora (&#8220;magic words&#8221;)</h3>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  en.<span style="color: #660066;">anaphora</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;this&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;that&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;it&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;selection&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;him&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;her&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;them&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>


<p>The final required property is the <code>anaphora</code> property which takes a list of &#8220;magic words&#8221;. Currently there is no distinction between all the different <a href="http://en.wikipedia.org/wiki/deixis">deictic</a> <a href="http://en.wikipedia.org/wiki/anaphora (linguistics)">anaphora</a> which might refer to different things.</p>

<h3>Special cases</h3>

<p>Some special language features can be handled by overriding the default behavior from <code>Parser</code>. Many of these features are still in the works, however, so we&#8217;d love to get your comments!</p>

<h4>Languages with no spaces</h4>

<p>If your language does not delimit arguments (or words, more generally) with spaces, there will be a need to write a custom <code>wordBreaker()</code> function and set <code>usespaces = false</code> and <code>joindelimiter = ''</code>. For an example, please take a look at the <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/ja.js">Japanese</a> or <a href="https://ubiquity.mozilla.com/hg/ubiquity-firefox/raw-file/08cf861ba79a/ubiquity/modules/parser/new/zh.js">Chinese</a>.</p>

<h4>Case marking languages</h4>

<p><strike>If you have a strongly <a href="http://en.wikipedia.org/wiki/grammatical case">case-marked</a> language, you&#8217;ll have to write some rules to identify those different cases in <code>wordBreaker()</code> and then add some extra <code>roles</code> for these case markers, but for a number of languages the current design does not allow an elegant solution for parsing such arguments. Updates to this issue will be posted to <a href="http://ubiquity.mozilla.com/trac/ticket/663">this trac ticket</a>.</p>

<p>In the mean time, however, if you could write a parser even with only the prepositions/postpositions in your language, that would be a great benefit in getting started in your language.</strike> <strong>UPDATE</strong>: a proposal on how to deal with strongly case-marked languages has been written here: <a href="http://mitcho.com/blog/projects/in-case-of-case/">In Case of Case&#8230;</a>.</p>

<h4>Stripping articles</h4>

<p>Some languages have some delimiters which combine with articles. For example, in French, the preposition &#8220;à&#8221; combines with the masculine definite article &#8220;le&#8221; but not &#8220;la&#8221;:</p>

<ol>
<li>à + la = à la</li>
<li>à + le = au</li>
</ol>

<p>You can add both &#8220;à&#8221; and &#8220;au&#8221; as delimiters of the <code>goal</code> role, but then you will get feminine arguments back with the determiner (e.g. &#8220;la table&#8221;) while masculine arguments would be parsed without a determiner (e.g. &#8220;chat&#8221;).</p>

<ol>
<li>&#8220;<b>à</b> la table&#8221; = &#8220;<b>to</b> the table&#8221;</li>
<li>&#8220;<b>au</b> chat&#8221; = &#8220;<b>to the</b> cat&#8221;</li>
</ol>

<p><strike>One possible solution to this is to write a custom <code>cleanArgument()</code> method. After arguments have been parsed and placed in their appropriate roles, each argument text (say, &#8220;la table&#8221; or &#8220;chat&#8221;) are passed to <code>cleanArgument()</code>. You can simply write a <code>cleanArgument()</code> to strip off any &#8220;la &#8221; at the beginning of the input and return it and both example inputs will get normalized arguments: &#8220;table&#8221; and &#8220;chat&#8221;, respectively.</strike> <strong>UPDATE</strong>: For more up-to-date information on how to deal with these types of articles, please see <a href="http://mitcho.com/blog/projects/solving-a-romantic-problem/">Solving a Romance Problem</a>.</p>

<h3>Test your parser</h3>

<p>Now you can go into <code>about:config</code> and change <code>extensions.ubiquity.language</code> to be your language code and restart. All the verbs and nountypes at this point will remain the same as in the English version, but it should obey the argument structure (the word order and delimiters) of your language.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> If you run into any trouble, feel free to ask for help on the <a href="http://groups.google.com/group/ubiquity-i18n">Ubiquity i18n listhost</a> or find me on the Ubiquity IRC channel (mitcho @ irc.mozilla.org#ubiquity). Of course, once you&#8217;re at a good stopping point, please <a href="http://ubiquity.mozilla.com/trac/ticket/662">contribute your language file to Ubiquity</a>!</p>

<h3>More to come&#8230;</h3>

<p>At this point, you&#8217;ve only localized the <a href="http://en.wikipedia.org/wiki/argument structure">argument structure</a> of your language&#8230; additional work will be required to localize the nountypes and verb names, which is <a href="http://groups.google.com/group/ubiquity-i18n/browse_thread/thread/ab4d876b1ea02d4">the subject of ongoing discussion</a>&#8230; <a href="http://groups.google.com/group/ubiquity-i18n">join the Google Group</a> to get in on the discussion!</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>At this point in time it&#8217;s also possible to test your parser at <code>chrome://parser-demo/content/index.html</code> if you make a couple other changes to your code&#8230; for more information, watch the <a href="http://mitcho.com/blog/projects/foxkeh-demos-ubiquity-parser-the-next-generation/">Foxkeh demos Ubiquity Parser TNG</a> video. This option gives you more debug info as well.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/rolling-out-the-roles/' rel='bookmark' title='Rolling out the Roles'>Rolling out the Roles</a></li>
<li><a href='http://mitcho.com/blog/projects/foxkeh-demos-ubiquity-parser-the-next-generation/' rel='bookmark' title='Foxkeh demos Ubiquity Parser: The Next Generation'>Foxkeh demos Ubiquity Parser: The Next Generation</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/how-to/adding-your-language-to-ubiquity-parser-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Foxkeh demos Ubiquity Parser: The Next Generation</title>
		<link>http://mitcho.com/blog/projects/foxkeh-demos-ubiquity-parser-the-next-generation/</link>
		<comments>http://mitcho.com/blog/projects/foxkeh-demos-ubiquity-parser-the-next-generation/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 10:10:43 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[contribute]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[Foxkeh]]></category>
		<category><![CDATA[French]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1725</guid>
		<description><![CDATA[I just made a screencast with Foxkeh to demo the Ubiquity next generation parser demo and to demonstrate how easy it is to add your own language. Foxkeh wants you to localize the parser into your language. How could you say no? ^^ Foxkeh demos Ubiquity Parser: The Next Generation from mitcho on Vimeo. There [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/' rel='bookmark' title='This week on Ubiquity Parser: The Next Generation'>This week on Ubiquity Parser: The Next Generation</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I just made a screencast with <a href="http://foxkeh.jp">Foxkeh</a> to demo the <a href="http://mitcho.com/code/ubiquity/parser-demo/">Ubiquity next generation parser demo</a> and to demonstrate how easy it is to add your own language. Foxkeh wants you to localize the parser into your language. How could you say no? ^^</p>

<p><object width="649" height="365"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3954284&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3954284&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="649" height="365"></embed></object><br /><a href="http://vimeo.com/3954284">Foxkeh demos Ubiquity Parser: The Next Generation</a> from <a href="http://vimeo.com/mitchoyoshitaka">mitcho</a> on <a href="http://vimeo.com">Vimeo</a>.</p>

<p>There are some details which are not covered in this introductory video, such as how to deal with case marking languages or languages without spaces. Hopefully this&#8217;ll inspire some people to play with the demo, though. <strong>I&#8217;d love to hear your comments! ^^</strong></p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/' rel='bookmark' title='This week on Ubiquity Parser: The Next Generation'>This week on Ubiquity Parser: The Next Generation</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/foxkeh-demos-ubiquity-parser-the-next-generation/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>This week on Ubiquity Parser: The Next Generation</title>
		<link>http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/</link>
		<comments>http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 06:30:31 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Danish]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[French]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[Japanese language]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[ubiquity]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1680</guid>
		<description><![CDATA[Last week I released a proof-of-concept demo of the next generation Ubiquity parser design and it was also the focus of discussion in our weekly internationalization meeting.1 Christian Sonne even wrote a Danish plugin for it during the meeting—a testament to the pluggability and of the new parser design. In addition, at the Ubiquity weekly [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/link/ubiquity-in-portuguese/' rel='bookmark' title='Ubiquity in Portuguese'>Ubiquity in Portuguese</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><img src="http://mitcho.com/blog/wp-content/uploads/2009/03/parsertng.png" alt="parsertng.png" border="0" width="649" height="277" /></p>

<p><a href="http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/">Last week</a> I released <a href="http://mitcho.com/code/ubiquity/parser-demo/">a proof-of-concept demo</a> of the <a href="https://wiki.mozilla.org/User:Mitcho/ParserTNG">next generation Ubiquity parser design</a> and it was also the focus of discussion in <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings/2009-03-24_i18n_Meeting">our weekly internationalization meeting</a>.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> Christian Sonne even wrote a Danish plugin for it during the meeting—a testament to the pluggability and of the new parser design.</p>

<p>In addition, at <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings/2009-03-25_Weekly_Meeting">the Ubiquity weekly meeting</a>, pushing this new parser into Ubiquity proper was identified as <a href="https://wiki.mozilla.org/Labs/Ubiquity/0.2_Roadmap_Proposals">a key goal of Ubiquity 0.2</a>, making frequent iteration and debate over this parser essential.</p>

<p>To that end, I&#8217;ll highlight some of the changes made to the parser demo <a href="http://bitbucket.org/mitcho/ubiquity-playground/">codebase</a> in the past week:
<span id="more-1680"></span></p>

<ul>
<li><a href="http://en.wikipedia.org/wiki/left-branching">left-branching</a> support and a Japanese parser</li>
<li>basic French parser</li>
<li>a timer display</li>
<li>Danish parser by Christian Sonne</li>
<li>synonyms: as an example, you can now use &#8220;purchase&#8221; or &#8220;buy,&#8221; both of which point to the same verb.</li>
<li>verb name localizations: you no longer need to use the English verb names with different languages. (Currently only Japanese has any verb localizations.)</li>
<li>a number of optimizations and corrections</li>
</ul>

<p>I encourage you to check out the demo again or <a href="http://bitbucket.org/mitcho/ubiquity-playground/">check out the source on BitBucket</a>.</p>

<h3><a href="http://mitcho.com/code/ubiquity/parser-demo/">➔ Ubiquity Parser: The Next Generation demo</a></h3>

<p>I&#8217;d love to get comments, patches, or additional parsers! Thanks! ^^</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>The weekly internationalization meeting, like all Ubiquity weekly meetings, are completely open to the public. We&#8217;d love to hear new voices contribute to the discussion! Take a look at <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings">the schedule of upcoming meetings</a>.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/ubiquity-parser-the-next-generation-demo/' rel='bookmark' title='Ubiquity Parser: The Next Generation Demo'>Ubiquity Parser: The Next Generation Demo</a></li>
<li><a href='http://mitcho.com/blog/link/ubiquity-in-portuguese/' rel='bookmark' title='Ubiquity in Portuguese'>Ubiquity in Portuguese</a></li>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/projects/this-week-on-ubiquity-parser-the-next-generation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubiquity in Portuguese</title>
		<link>http://mitcho.com/blog/link/ubiquity-in-portuguese/</link>
		<comments>http://mitcho.com/blog/link/ubiquity-in-portuguese/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 07:49:33 +0000</pubDate>
		<dc:creator>mitcho</dc:creator>
				<category><![CDATA[link]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[linguistics]]></category>
		<category><![CDATA[Mozilla Planet]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[Portuguese]]></category>
		<category><![CDATA[ubiquity]]></category>

		<guid isPermaLink="false">http://mitcho.com/blog/?p=1547</guid>
		<description><![CDATA[Felipe, a Ubiquity user, put together a wonderful look at what Ubiquity might look like in Portuguese. He has some great points here particularly regarding the &#8220;map&#8221; verb used in English—Felipe points out that Portuguese does not have a very common &#8220;map&#8221; verb and that it would be much more common to use enter me [...]
Related posts:<ol>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</a></li>
<li><a href='http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/' rel='bookmark' title='Writing commands with semantic roles'>Writing commands with semantic roles</a></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Felipe, a Ubiquity user, put together a wonderful look at <a href="http://felipe.wordpress.com/2009/03/03/thinking-ubiquity-in-portuguese/">what Ubiquity might look like in Portuguese</a>. He has some great points here particularly regarding the &#8220;map&#8221; verb used in English—Felipe points out that Portuguese does not have a very common &#8220;map&#8221; verb and that it would be much more common to use enter <code>me dê</code> (literally <em>me give</em>) to use a verb to <em>request</em> a map. This is a great example of how Jono&#8217;s <a href="http://jonoscript.wordpress.com/2009/01/24/overlord-verbs-a-proposal/">overlord verbs proposal</a> may be an important aspect of our i18n efforts. The post is also timely as we&#8217;ve recently been discussing in our <a href="https://wiki.mozilla.org/Labs/Ubiquity/Meetings">regular meetings</a> (open to all!) that Portuguese may/could be the focus of our next parser construction efforts.</p>

<p><strong>What would the challenges be for Ubiquity in your language?</strong> We&#8217;d love to see an increasing number of blog posts on this topic in different languages. Thanks Felipe! ^^</p>
<p>Related posts:</p><ol>
<li><a href='http://mitcho.com/blog/projects/localizing-ubiquity-an-open-letter-to-linguists/' rel='bookmark' title='Localizing Ubiquity: an open letter to linguists'>Localizing Ubiquity: an open letter to linguists</a></li>
<li><a href='http://mitcho.com/blog/projects/ubiquity-in-firefox-japanese/' rel='bookmark' title='Ubiquity in Firefox: Focus on Japanese'>Ubiquity in Firefox: Focus on Japanese</a></li>
<li><a href='http://mitcho.com/blog/projects/writing-commands-with-semantic-roles/' rel='bookmark' title='Writing commands with semantic roles'>Writing commands with semantic roles</a></li>
</ol>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mitcho.com/blog/link/ubiquity-in-portuguese/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

