<?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>dpfy</title>
	<atom:link href="http://dpfy.co.uk/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://dpfy.co.uk/blog</link>
	<description></description>
	<lastBuildDate>Thu, 23 Jul 2009 21:39:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ubuntu Irish Translations</title>
		<link>http://dpfy.co.uk/blog/?p=3</link>
		<comments>http://dpfy.co.uk/blog/?p=3#comments</comments>
		<pubDate>Thu, 23 Jul 2009 21:06:35 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[translations]]></category>

		<guid isPermaLink="false">http://dpfy.co.uk/blog/?p=3</guid>
		<description><![CDATA[I decided recently to try my hand at some Irish translations for Ubuntu.  Though never quite fluent in Irish, I wasn&#8217;t far off it back in my school days, and I figured it would come back to me once I got started.
So with some enthusiasm I went to the Irish Translations project on Launchpad, picked [...]]]></description>
			<content:encoded><![CDATA[<p>I decided recently to try my hand at some Irish translations for Ubuntu.  Though never quite fluent in Irish, I wasn&#8217;t far off it back in my school days, and I figured it would come back to me once I got started.</p>
<p>So with some enthusiasm I went to the <a href="https://translations.launchpad.net/ubuntu/jaunty/+lang/ga">Irish Translations</a> project on Launchpad, picked a small package that no-one had yet started working on (notification-daemon), fired up an online <a href="http://www.irishdictionary.ie/dictionary">english-irish dictionary</a> for reference, and clicked in&#8230;</p>
<p>First one&#8230; <strong><em>Current Theme</em></strong>, ok it wasn&#8217;t something I could translate off the top of my head, but it didn&#8217;t seem too hard either, a bit of dictionary work and I had something reasonable: <em>Téama reatha</em></p>
<p>Next one&#8230; <strong><em>Default Sound</em></strong>.  Ok here I knew one word straight off at least &#8211; sound = fuaim!  No idea about &#8216;Default&#8217;, so back to the dictionary.  Heres where I started to suspect something that was to be confirmed again and again &#8230; most online dictionaries are useless when it comes to technical terms.  There were plenty of examples for &#8216;default&#8217; in the legal sense (defaulting on a debt), but nothing relevant for this context.</p>
<p>So I had to leave that one to the side and move on to the next:<br />
<strong><em>Default popup location on the workspace for stack notifications<br />
</em></strong>Oh my god&#8230;where to begin?</p>
<p>About 2 hours later I had roughly 15 translations hammered out.  And I mean hammered, word by tortuous word.  And it was <strong>very</strong> hard work.  I needed some help.</p>
<p>This is what I came up with.  There is already a wealth of Irish translations available in Ubuntu  And since we&#8217;re an open-source project, those translations themselves are open-source.  With a  little bit of work we can take those translations and morph them into a searchable resource that we can then use to cut down some of the hard work in translating.  Effectively we come up with a simple dictionary that we can grep for either entire phrases, or individual words, and hopefully cut down on the amount of time spent grasping for the right terminology.</p>
<p>What follows is a description of how i created the dictionary, but if you would like to just grab the <a href="http://public.dpfy.co.uk/english-irish.txt.gz">end result</a> then please do, its a .gz file (1.7M) containing ~95k english terms with their Irish translations.  See below for  a bash function to help with searching for terms.</p>
<p>Translations are contained in .po files.  You can request to download one of these through the Launchpad translations interface, but what we wanted here was a way to grab all the .po files for Irish translations.  With some help from the good folks on #ubuntu-translators the easiest way turned out to use the familiar <em>apt-get source</em> approach.</p>
<p>So, create a directory and cd into it.  Next run this:</p>
<pre>apt-cache search language-pack | grep "\-ga" | sed 's/ - /;/' | cut -d';' -f1 | xargs apt-get source</pre>
<p>This will download the source for all the GA (Gaelic) language packs in Ubuntu.  Within these will be various .po files containing translations (988 files in total, with 931k lines of text).</p>
<p>The format of these files isn&#8217;t very useful for searching, so next step was to write a short <a href="http://public.dpfy.co.uk/parse.py">python script</a> to parse them into a more useful format:</p>
<p>source phrase =&gt; translated phrase</p>
<p>1-per line.  We save this output to a text file, and now we have a dictionary that we can grep for words or phrases.  The .po files condensed down to a file containing 95k translations.</p>
<p>The last piece to mention that I found helpful was a little bash function to cut down on typing:</p>
<pre>function trans</pre>
<pre>{</pre>
<pre>clear &amp;&amp; grep -i --color "$*" ~/english-irish.txt</pre>
<pre>}</pre>
<p>and a variation transw to match whole words only (add &#8216;w&#8217; flag to the grep options).<br />
<strong><br />
Conclusion:</strong> If you have had a go at Irish translations and been daunted by the terminology, download <a href="http://public.dpfy.co.uk/english-irish.txt.gz">this file</a> (1.7M) and give it another go.  It becomes quite fun when the terminology you need is easily accessible and you can just concentrate on assembling the pieces into the phrases you need.  You get to think more about the Irish and less about the technical terminology.</p>
<p>A word on <strong>copyright</strong>: the translations summarised here represent the hard work of many contributors to upstream projects and Ubuntu itself.  It would be remiss not to give due credit and recognition here.  As best as I could extract from the source files <a href="http://public.dpfy.co.uk/copyrightholders.html">here</a> is the list of those contributors.</p>
<p>Here are a few examples of how the translation above works in practice:</p>
<p>Item: <strong>Empathy Instant Messenger</strong><br />
trans instant messenger<br />
hits back for Clár Teachtaireachtaí Meandaracha, so translation becomes:<br />
Clár Teachtaireachtaí Meandaracha Empathy</p>
<p>Item: <strong>Empathy should auto-connect on startup</strong><br />
trans auto-connect &#8230; &gt;  ceangal uathoibríoch<br />
trans on startup &#8230; &gt; ag am tosaithe<br />
phrase becomes:<br />
Cumasaigh ceangal uathoibríoch ag am tosaithe. (Cumasaigh = Enable)</p>
<p>Item: <strong>Hide the main window</strong>.<br />
trans hide the main window<br />
direct hit &#8230; &gt;  Folaigh an Phríomhfhuinneog</p>
]]></content:encoded>
			<wfw:commentRss>http://dpfy.co.uk/blog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

