<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=Development_Team%2FAlmanac%2FInternationalization</id>
	<title>Development Team/Almanac/Internationalization - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sugarlabs.org/index.php?action=history&amp;feed=atom&amp;title=Development_Team%2FAlmanac%2FInternationalization"/>
	<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;action=history"/>
	<updated>2026-05-13T10:06:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=81177&amp;oldid=prev</id>
		<title>Humitos: /* Step 4: Use msginit to generate a .po file */</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=81177&amp;oldid=prev"/>
		<updated>2012-07-17T11:33:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Step 4: Use msginit to generate a .po file&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:33, 17 July 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l187&quot;&gt;Line 187:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 187:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notice that the &amp;quot;msgstr&amp;quot; lines are empty. This is where translations go, as we shall discuss next.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Notice that the &amp;quot;msgstr&amp;quot; lines are empty. This is where translations go, as we shall discuss next.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Step 4.5: Use msgmerge to merge an existent .po file ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If you want to update an existent .po file already generated by someone else, you should use &#039;&#039;msgmerge&#039;&#039; instead of &#039;&#039;msginit&#039;&#039;. This is useful to update the existent es.po file, for example, to add new strings to be translated and preserve those ones that are already translated.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;So, to do this, you should run:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; msgmerge -o &amp;lt;output-file&amp;gt; &amp;lt;file-to-be-updated&amp;gt; &amp;lt;pot-file&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;And then edit &#039;&#039;output-file&#039;&#039; to translate the new strings added.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Step 5: Translate all the strings that need translation. ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Step 5: Translate all the strings that need translation. ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Humitos</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=61248&amp;oldid=prev</id>
		<title>RafaelOrtiz: updating link</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=61248&amp;oldid=prev"/>
		<updated>2011-01-30T03:40:26Z</updated>

		<summary type="html">&lt;p&gt;updating link&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:40, 29 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l206&quot;&gt;Line 206:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 206:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A better way is to plug in to the Pootle system that employs translators from all different languages. Visit the [&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https&lt;/del&gt;://&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;dev&lt;/del&gt;.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;laptop&lt;/del&gt;.org&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/translate/ One Laptop Per Child&lt;/del&gt;: Translation System] to find out more about using Pootle and putting your activity&#039;s po files up for translation.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A better way is to plug in to the Pootle system that employs translators from all different languages. Visit the [&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;http&lt;/ins&gt;://&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;translate&lt;/ins&gt;.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sugarlabs&lt;/ins&gt;.org &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SugarLabs&lt;/ins&gt;: Translation System] to find out more about using Pootle and putting your activity&#039;s po files up for translation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Step 6: Generate a &amp;quot;.mo&amp;quot; file using msgfmt and install the translation in to your activity by putting the .mo file in the locale/LANG/LC_MESSAGES directory. ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Step 6: Generate a &amp;quot;.mo&amp;quot; file using msgfmt and install the translation in to your activity by putting the .mo file in the locale/LANG/LC_MESSAGES directory. ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>RafaelOrtiz</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=46674&amp;oldid=prev</id>
		<title>Patrol: moved Walter is a wanker 12/Almanac/Internationalization to Development Team/Almanac/Internationalization over redirect: revert</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=46674&amp;oldid=prev"/>
		<updated>2010-02-24T01:32:55Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php?title=Walter_is_a_wanker_12/Almanac/Internationalization&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Walter is a wanker 12/Almanac/Internationalization (page does not exist)&quot;&gt;Walter is a wanker 12/Almanac/Internationalization&lt;/a&gt; to &lt;a href=&quot;/go/Development_Team/Almanac/Internationalization&quot; title=&quot;Development Team/Almanac/Internationalization&quot;&gt;Development Team/Almanac/Internationalization&lt;/a&gt; over redirect: revert&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:32, 23 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patrol</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=46479&amp;oldid=prev</id>
		<title>Page move vandal: moved Development Team/Almanac/Internationalization to Walter is a wanker 12/Almanac/Internationalization:&amp;#32;Walter is a wanker</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=46479&amp;oldid=prev"/>
		<updated>2010-02-24T00:21:12Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/go/Development_Team/Almanac/Internationalization&quot; title=&quot;Development Team/Almanac/Internationalization&quot;&gt;Development Team/Almanac/Internationalization&lt;/a&gt; to &lt;a href=&quot;/index.php?title=Walter_is_a_wanker_12/Almanac/Internationalization&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Walter is a wanker 12/Almanac/Internationalization (page does not exist)&quot;&gt;Walter is a wanker 12/Almanac/Internationalization&lt;/a&gt;: Walter is a wanker&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:21, 23 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Page move vandal</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=45534&amp;oldid=prev</id>
		<title>Patrol: moved Anal bleaching 15/Almanac/Internationalization to Development Team/Almanac/Internationalization over redirect: revert</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=45534&amp;oldid=prev"/>
		<updated>2010-02-21T22:41:49Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php?title=Anal_bleaching_15/Almanac/Internationalization&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Anal bleaching 15/Almanac/Internationalization (page does not exist)&quot;&gt;Anal bleaching 15/Almanac/Internationalization&lt;/a&gt; to &lt;a href=&quot;/go/Development_Team/Almanac/Internationalization&quot; title=&quot;Development Team/Almanac/Internationalization&quot;&gt;Development Team/Almanac/Internationalization&lt;/a&gt; over redirect: revert&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:41, 21 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Patrol</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=45020&amp;oldid=prev</id>
		<title>Anal bleaching: moved Development Team/Almanac/Internationalization to Anal bleaching 15/Almanac/Internationalization:&amp;#32;Anal bleaching</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=45020&amp;oldid=prev"/>
		<updated>2010-02-21T22:22:21Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/go/Development_Team/Almanac/Internationalization&quot; title=&quot;Development Team/Almanac/Internationalization&quot;&gt;Development Team/Almanac/Internationalization&lt;/a&gt; to &lt;a href=&quot;/index.php?title=Anal_bleaching_15/Almanac/Internationalization&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Anal bleaching 15/Almanac/Internationalization (page does not exist)&quot;&gt;Anal bleaching 15/Almanac/Internationalization&lt;/a&gt;: Anal bleaching&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:22, 21 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Anal bleaching</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=22291&amp;oldid=prev</id>
		<title>FGrose: DevelopmentTeam/Almanac/Internationalization moved to Development Team/Almanac/Internationalization: deCamel casing</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=22291&amp;oldid=prev"/>
		<updated>2009-03-17T20:44:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=DevelopmentTeam/Almanac/Internationalization&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;DevelopmentTeam/Almanac/Internationalization (page does not exist)&quot;&gt;DevelopmentTeam/Almanac/Internationalization&lt;/a&gt; moved to &lt;a href=&quot;/go/Development_Team/Almanac/Internationalization&quot; title=&quot;Development Team/Almanac/Internationalization&quot;&gt;Development Team/Almanac/Internationalization&lt;/a&gt;: deCamel casing&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:44, 17 March 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>FGrose</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=18772&amp;oldid=prev</id>
		<title>Dfarning-bot: Robot: Automated text replacement  (-{{Sugar Almanac}} +{{Almanac}})</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=18772&amp;oldid=prev"/>
		<updated>2009-02-06T18:56:58Z</updated>

		<summary type="html">&lt;p&gt;Robot: Automated text replacement  (-{{Sugar Almanac}} +{{Almanac}})&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:56, 6 February 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sugar &lt;/del&gt;Almanac}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Almanac}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Broad Steps to Internationalize/Localize Your Code ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Broad Steps to Internationalize/Localize Your Code ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dfarning-bot</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=18754&amp;oldid=prev</id>
		<title>Dfarning-bot: Internationalization in Sugar moved to DevelopmentTeam/Almanac/Internationalization: Robot: moved page</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=18754&amp;oldid=prev"/>
		<updated>2009-02-06T16:45:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=Internationalization_in_Sugar&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Internationalization in Sugar (page does not exist)&quot;&gt;Internationalization in Sugar&lt;/a&gt; moved to &lt;a href=&quot;/index.php?title=DevelopmentTeam/Almanac/Internationalization&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;DevelopmentTeam/Almanac/Internationalization (page does not exist)&quot;&gt;DevelopmentTeam/Almanac/Internationalization&lt;/a&gt;: Robot: moved page&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:45, 6 February 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Dfarning-bot</name></author>
	</entry>
	<entry>
		<id>https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=18671&amp;oldid=prev</id>
		<title>Dfarning: 24 revisions</title>
		<link rel="alternate" type="text/html" href="https://wiki.sugarlabs.org/index.php?title=Development_Team/Almanac/Internationalization&amp;diff=18671&amp;oldid=prev"/>
		<updated>2009-02-06T16:03:20Z</updated>

		<summary type="html">&lt;p&gt;24 revisions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Sugar Almanac}}&lt;br /&gt;
&lt;br /&gt;
== Broad Steps to Internationalize/Localize Your Code ==&lt;br /&gt;
Most of these steps are adapted from the [http://wiki.laptop.org/go/Python_i18n Python i18n] with some changes for clarity and accuracy. &lt;br /&gt;
&lt;br /&gt;
=== Step 1: Instrument all the translatable strings in your source code to use the gettext utility. ===&lt;br /&gt;
&lt;br /&gt;
To ensure that string output from your activity is correctly translated, you would use the gettext utility. The code below imports gettext, renaming it as &amp;#039;_&amp;#039; for code brevity. Then, whenever there is a string that you want to make sure is translated based on language settings, you simply pass it to the _() function. According to the [http://docs.python.org/lib/node731.html Python Reference Library], gettext will &amp;quot;return the localized translation of message, based on the current global domain, language, and locale directory.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The code snippet below is part of a larger UI creation routine that creates a sugar.graphics.Notebook object and three pages for that notebook. Each page label should be appropriately translated. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    from gettext import gettext as _&lt;br /&gt;
    ...        &lt;br /&gt;
        #Add the pages to the notebook. &lt;br /&gt;
        top_container.add_page(_(&amp;#039;First Page&amp;#039;), first_page)&lt;br /&gt;
        top_container.add_page(_(&amp;#039;Second Page&amp;#039;), second_page)&lt;br /&gt;
        top_container.add_page(_(&amp;#039;Third Page&amp;#039;), third_page)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Create a &amp;quot;po&amp;quot; directory within your activity bundle to store some files needed to support translation. ===&lt;br /&gt;
Go in to your activity&amp;#039;s source directory and create a new subdirectory called &amp;quot;po&amp;quot;. In this directory, create a file called POTFILES.in. In POTFILES.in, your first line should be &amp;quot;encoding: UTF-8&amp;quot;. Then, each subsequent line should be the name of a source file in your activity bundle that you want translated. &lt;br /&gt;
&lt;br /&gt;
Below is output from a sample shell session where I carry out all the tasks in this step.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; ls -l&lt;br /&gt;
total 292&lt;br /&gt;
drwxr-xr-x 2 fanwar fanwar  4096 2008-06-06 16:49 activity&lt;br /&gt;
-rw-r--r-- 1 fanwar fanwar  3143 2008-07-17 16:20 annotateactivity.py&lt;br /&gt;
drwxr-xr-x 2 fanwar fanwar  4096 2008-06-26 11:24 icons&lt;br /&gt;
-rw-r--r-- 1 fanwar fanwar   834 2008-07-02 14:30 setup.py&lt;br /&gt;
-rw-r--r-- 1 root   root    1759 2008-07-17 15:03 TextWidget.py&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; mkdir po&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cd po&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; emacs POTFILES.in &amp;amp;&lt;br /&gt;
[1] 7164&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; ls&lt;br /&gt;
POTFILES.in&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; cat POTFILES.in &lt;br /&gt;
encoding: UTF-8&lt;br /&gt;
annotateactivity.py&lt;br /&gt;
TextWidget.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Generate a .pot File that has a list of all the strings marked for translation by gettext in your activity source code. ===&lt;br /&gt;
&lt;br /&gt;
If you setup your POTFILES.in file properly, you can generate the .pot file by invoking your setup.py script with the genpot option. Below is the source code for setup.py for my sample activity. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from sugar.activity import bundlebuilder&lt;br /&gt;
bundlebuilder.start()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your setup.py file exists, then you simply go to the terminal activity in sugar and run setup.py with genpot. The following snapshot of a shell session shows how I invoke genpot and then look at the contents of the newly generated Annotate.pot file. The &amp;quot;sugar-activities&amp;quot; directory is just a symbolic link to the place in my sugar file structure where activity bundles live. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[fanwar@localhost Annotate.activity]$ pwd&lt;br /&gt;
/home/fanwar/sugar-activities/Annotate.activity&lt;br /&gt;
&lt;br /&gt;
[fanwar@localhost Annotate.activity]$ python setup.py genpot&lt;br /&gt;
WARNING:root:bundle_name deprecated, now comes from activity.info&lt;br /&gt;
WARNING:root:Activity directory lacks a MANIFEST file.&lt;br /&gt;
&lt;br /&gt;
[fanwar@localhost Annotate.activity]$ cd po&lt;br /&gt;
&lt;br /&gt;
[fanwar@localhost Annotate.activity]$ pwd&lt;br /&gt;
/home/fanwar/sugar-activities/Annotate.activity/po&lt;br /&gt;
&lt;br /&gt;
[fanwar@localhost po]$ ls&lt;br /&gt;
Annotate.pot  POTFILES.in&lt;br /&gt;
&lt;br /&gt;
[fanwar@localhost po]$ cat Annotate.pot &lt;br /&gt;
# SOME DESCRIPTIVE TITLE.&lt;br /&gt;
# Copyright (C) YEAR THE PACKAGE&amp;#039;S COPYRIGHT HOLDER&lt;br /&gt;
# This file is distributed under the same license as the PACKAGE package.&lt;br /&gt;
# FIRST AUTHOR &amp;lt;EMAIL@ADDRESS&amp;gt;, YEAR.&lt;br /&gt;
#&lt;br /&gt;
#, fuzzy&lt;br /&gt;
msgid &amp;quot;&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&amp;quot;Project-Id-Version: PACKAGE VERSION\n&amp;quot;&lt;br /&gt;
&amp;quot;Report-Msgid-Bugs-To: \n&amp;quot;&lt;br /&gt;
&amp;quot;POT-Creation-Date: 2008-07-17 17:14+0000\n&amp;quot;&lt;br /&gt;
&amp;quot;PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n&amp;quot;&lt;br /&gt;
&amp;quot;Last-Translator: FULL NAME &amp;lt;EMAIL@ADDRESS&amp;gt;\n&amp;quot;&lt;br /&gt;
&amp;quot;Language-Team: LANGUAGE &amp;lt;LL@li.org&amp;gt;\n&amp;quot;&lt;br /&gt;
&amp;quot;MIME-Version: 1.0\n&amp;quot;&lt;br /&gt;
&amp;quot;Content-Type: text/plain; charset=CHARSET\n&amp;quot;&lt;br /&gt;
&amp;quot;Content-Transfer-Encoding: 8bit\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: activity/activity.info:2 annotate-env.py:75 annotate-registry.py:92&lt;br /&gt;
#: annotate-mime.py:104 annotate-profile.py:101 annotate-original.py:70&lt;br /&gt;
#: annotate-alerts.py:179 annotate.py:83 annotate-pango.py:81&lt;br /&gt;
#: annotate-datastore.py:107 annotate-logging.py:59&lt;br /&gt;
msgid &amp;quot;Annotate&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotate-env.py:98 annotate-registry.py:115 annotate-mime.py:127&lt;br /&gt;
#: annotate-profile.py:125 annotate-original.py:93&lt;br /&gt;
#: annotate-internationalize.py:103 annotate-alerts.py:275 annotate.py:105&lt;br /&gt;
#: annotate-datastore.py:203 annotate-logging.py:82&lt;br /&gt;
msgid &amp;quot;Go to Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:66&lt;br /&gt;
msgid &amp;quot;First Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:67&lt;br /&gt;
msgid &amp;quot;Second Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:68&lt;br /&gt;
msgid &amp;quot;Third Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:81&lt;br /&gt;
msgid &amp;quot;Custom Annotate Toolbar&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Use msginit to generate a .po file ===&lt;br /&gt;
Once you have created a &amp;quot;.pot&amp;quot; file, the next step is to create a &amp;quot;.po&amp;quot;. You use the msginit command from within your po directory to do this. Below, I create an &amp;quot;es.po&amp;quot; file using msginit that will eventually contain translations to Spanish.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@localhost Annotate.activity]# cd po&lt;br /&gt;
&lt;br /&gt;
[root@localhost po]# msginit -l es&lt;br /&gt;
The new message catalog should contain your email address, so that users can&lt;br /&gt;
give you feedback about the translations, and so that maintainers can contact&lt;br /&gt;
you in case of unexpected technical problems.&lt;br /&gt;
&lt;br /&gt;
Is the following your email address?&lt;br /&gt;
  root@localhost.localdomain&lt;br /&gt;
Please confirm by pressing Return, or enter your email address.&lt;br /&gt;
&lt;br /&gt;
Retrieving http://www.iro.umontreal.ca/translation/registry.cgi?team=index... done.&lt;br /&gt;
A translation team for your language (es) does not exist yet.&lt;br /&gt;
If you want to create a new translation team for es, please visit&lt;br /&gt;
  http://www.iro.umontreal.ca/contrib/po/HTML/teams.html&lt;br /&gt;
  http://www.iro.umontreal.ca/contrib/po/HTML/leaders.html&lt;br /&gt;
  http://www.iro.umontreal.ca/contrib/po/HTML/index.html&lt;br /&gt;
&lt;br /&gt;
Created es.po.&lt;br /&gt;
[root@localhost po]# cat es.po &lt;br /&gt;
# Spanish translations for PACKAGE package.&lt;br /&gt;
# Copyright (C) 2008 THE PACKAGE&amp;#039;S COPYRIGHT HOLDER&lt;br /&gt;
# This file is distributed under the same license as the PACKAGE package.&lt;br /&gt;
# Faisal Anwar &amp;lt;root@localhost.localdomain&amp;gt;, 2008.&lt;br /&gt;
#&lt;br /&gt;
msgid &amp;quot;&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&amp;quot;Project-Id-Version: PACKAGE VERSION\n&amp;quot;&lt;br /&gt;
&amp;quot;Report-Msgid-Bugs-To: \n&amp;quot;&lt;br /&gt;
&amp;quot;POT-Creation-Date: 2008-07-17 17:14+0000\n&amp;quot;&lt;br /&gt;
&amp;quot;PO-Revision-Date: 2008-07-17 17:25+0000\n&amp;quot;&lt;br /&gt;
&amp;quot;Last-Translator: Faisal Anwar &amp;lt;root@localhost.localdomain&amp;gt;\n&amp;quot;&lt;br /&gt;
&amp;quot;Language-Team: Spanish\n&amp;quot;&lt;br /&gt;
&amp;quot;MIME-Version: 1.0\n&amp;quot;&lt;br /&gt;
&amp;quot;Content-Type: text/plain; charset=ASCII\n&amp;quot;&lt;br /&gt;
&amp;quot;Content-Transfer-Encoding: 8bit\n&amp;quot;&lt;br /&gt;
&amp;quot;Plural-Forms: nplurals=2; plural=(n != 1);\n&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:66&lt;br /&gt;
msgid &amp;quot;First Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:67&lt;br /&gt;
msgid &amp;quot;Second Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:68&lt;br /&gt;
msgid &amp;quot;Third Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:81&lt;br /&gt;
msgid &amp;quot;Custom Annotate Toolbar&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the &amp;quot;msgstr&amp;quot; lines are empty. This is where translations go, as we shall discuss next.&lt;br /&gt;
&lt;br /&gt;
=== Step 5: Translate all the strings that need translation. ===&lt;br /&gt;
&lt;br /&gt;
You can do this in several different ways. One is to go in to the &amp;quot;.po&amp;quot; file directly and add your msgstr translation for each msgid entry. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#: annotateactivity.py:66&lt;br /&gt;
msgid &amp;quot;First Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;pagina uno&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:67&lt;br /&gt;
msgid &amp;quot;Second Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;pagina dos&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#: annotateactivity.py:68&lt;br /&gt;
msgid &amp;quot;Third Page&amp;quot;&lt;br /&gt;
msgstr &amp;quot;pagina tres&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A better way is to plug in to the Pootle system that employs translators from all different languages. Visit the [https://dev.laptop.org/translate/ One Laptop Per Child: Translation System] to find out more about using Pootle and putting your activity&amp;#039;s po files up for translation.&lt;br /&gt;
&lt;br /&gt;
=== Step 6: Generate a &amp;quot;.mo&amp;quot; file using msgfmt and install the translation in to your activity by putting the .mo file in the locale/LANG/LC_MESSAGES directory. ===&lt;br /&gt;
&lt;br /&gt;
Finally, you have to compile the .po file with your translations in to a &amp;quot;.mo&amp;quot; file. The following code generates a .mo file called &amp;quot;org.laptop.AnnotateActivity.mo&amp;quot; using the msgfmt command. Your .mo file has to have this standard naming scheme that uses the URI for your activity (as it is defined in your activity.info file). Note that in the same command in which I generate the .mo file for Spanish translations, I also place this file in the appropriate directory where the translations can be picked up at runtime. This directory is &amp;quot;locale/es/LC_MESSAGES/&amp;quot; and is located within your activity bundle. Make sure to create this directory structure if it doesn&amp;#039;t exist already. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@localhost po]# pwd&lt;br /&gt;
/home/fanwar/sugar-activities/Annotate.activity/po&lt;br /&gt;
&lt;br /&gt;
[root@localhost po]# msgfmt es.po --output=&amp;#039;../locale/es/LC_MESSAGES/org.laptop.AnnotateActivity.mo&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other, more specific internationalization/localization tasks ==&lt;br /&gt;
&lt;br /&gt;
=== How do I ensure that using gettext does not crash my activity, especially when I try to translate more complex string substitution? ===&lt;br /&gt;
&lt;br /&gt;
Since some strings require variables to be substituted into them, they need to be translated carefully. If they&amp;#039;re not translated correctly, trying to do a string substitution can crash your activity.&lt;br /&gt;
&lt;br /&gt;
The code below redefines the _() to use the gettext method only if gettext actually works. If there is an exception, the code will simply return the untranslated string. This ensures that instead of crashing, your activity will simply not translate your string. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#Do the import of the gettext, but do not give it the underscore alias&lt;br /&gt;
from gettext import gettext&lt;br /&gt;
...&lt;br /&gt;
#defensive method against variables not translated correctly&lt;br /&gt;
def _(s):&lt;br /&gt;
    #todo: permanent variable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    istrsTest = {}&lt;br /&gt;
    for i in range (0,4):&lt;br /&gt;
        istrsTest[str(i)] = str(i)&lt;br /&gt;
&lt;br /&gt;
    #try to use gettext. If it fails, then just return the string untranslated. &lt;br /&gt;
    try:&lt;br /&gt;
            #test translating the string with many replacements&lt;br /&gt;
            i = gettext(s)&lt;br /&gt;
            test = i % istrsTest&lt;br /&gt;
            print test&lt;br /&gt;
    except:&lt;br /&gt;
            #if it doesn&amp;#039;t work, revert&lt;br /&gt;
            i = s&lt;br /&gt;
    return i&lt;br /&gt;
...&lt;br /&gt;
        #Now we can use the _() function and it should not crash if gettext fails.&lt;br /&gt;
        substitutionMap = {}&lt;br /&gt;
        substitutionMap[str(1)] = &amp;#039;one&amp;#039;&lt;br /&gt;
        substitutionMap[str(2)] = &amp;#039;two&amp;#039;&lt;br /&gt;
        substitutionMap[str(3)] = &amp;#039;three&amp;#039;&lt;br /&gt;
        print _(&amp;quot;Lets count to three: %(1)s, %(2)s, %(3)s&amp;quot;) % substitutionMap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How do I create translation comments that will be carried over in to the generated PO files? &amp;lt;ref&amp;gt;Copied from [http://wiki.laptop.org/go/Localization/i18n_Best_Practices Localization/i18n Best Practices page] &amp;lt;/ref&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
When you are using a string which may be confusing for the translators (contextual issues, or cultural issues), or if you want the string to be translated according to a particular convention, use translator-comments, which would show up alongside the message in the PO file translator get when they translate you software. Example (from Calculate activity)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        # TRANS: multiplication symbol (default: &amp;#039;*&amp;#039;)&lt;br /&gt;
        self.mul_sym = _(&amp;#039;mul_sym&amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So as you can see from the above example, translator-comments are normal Python comments with the &amp;quot;TRANS&amp;quot; keyword. This shows up the PO file as &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#. TRANS: multiplication symbol (default: &amp;#039;*&amp;#039;)&lt;br /&gt;
#: mathlib.py:74&lt;br /&gt;
msgid &amp;quot;mul_sym&amp;quot;&lt;br /&gt;
msgstr &amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How do I make my translations robust enough for varying plural forms? &amp;lt;ref&amp;gt;Copied from [http://wiki.laptop.org/go/Localization/i18n_Best_Practices Localization/i18n Best Practices page] &amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Do not assume that all languages have a concept of singular and plural like English. Some languages might have a single form, and some have more than two form. Use [http://www.gnu.org/software/automake/manual/gettext/Plural-forms.html plural forms] via &amp;#039;&amp;#039;ngettext()&amp;#039;&amp;#039; in these cases. Example (from sugar-update-control):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                header = gettext.ngettext(&amp;quot;You can install %s update&amp;quot;,&lt;br /&gt;
                                          &amp;quot;You can install %s updates&amp;quot;, avail) \&lt;br /&gt;
                                          % avail&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What Are some best practices to ensure that my translations are correctly compiled and applied by Pootle? &amp;lt;ref&amp;gt;Copied from [http://wiki.laptop.org/go/Localization/i18n_Best_Practices Localization/i18n Best Practices page] &amp;lt;/ref&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Use white-spaces and newlines only when you need to ====&lt;br /&gt;
&lt;br /&gt;
The tool which converts the translated PO files into binary MO files, &amp;#039;&amp;#039;msgfmt&amp;#039;&amp;#039;, can be quite picky about newlines and lines with only whitespaces. For example, the following string in sugar has a blank line at the end which is often overlooked by translators, causing msgfmt to choke.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    print _(&amp;#039;Usage: sugar-control-panel [ option ] key [ args ... ] \n\&lt;br /&gt;
    Control for the sugar environment. \n\&lt;br /&gt;
    Options: \n\&lt;br /&gt;
    -h           show this help message and exit \n\&lt;br /&gt;
    -l           list all the available options \n\&lt;br /&gt;
    -h key       show information about this key \n\&lt;br /&gt;
    -g key       get the current value of the key \n\&lt;br /&gt;
    -s key       set the current value for the key \n\&lt;br /&gt;
    -c key       clear the current value for the key \n\&lt;br /&gt;
    &amp;#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Keep string formatting as simple as possible ====&lt;br /&gt;
&lt;br /&gt;
In case of code like the following example, translators tend to translate the strings &amp;quot;error&amp;quot; and &amp;quot;file&amp;quot; into their own languages, causing msgfmt to choke.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                notify.props.msg = _(&amp;#039;%(error)s when deleting %(file)s&amp;#039;) % \&lt;br /&gt;
                    { &amp;#039;error&amp;#039;: err.strerror, &amp;#039;file&amp;#039;: logfile }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Avoid such strings if possible; use numbers or untranslatable strings (that are not English words) instead, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
                notify.props.msg = _(&amp;#039;%(ERR)s when deleting %(2)s&amp;#039;) % \&lt;br /&gt;
                    { &amp;#039;ERR&amp;#039;: err.strerror, &amp;#039;2&amp;#039;: logfile }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Do not touch anything inside your po directory ====&lt;br /&gt;
&lt;br /&gt;
If you change anything inside the po directory (including the POT file), and push it to Git, it will create a conflict which has to be updated in the Pootle side manually. Try avoid doing this, If you see any issues, please ping Sayamindu (sayamindu at laptop dot org) (you can also catch him on IRC, in channels like #sugar on Freenode with the nick unmadindu). If the changeset that you have is large, send him a patch, and he will apply that from the Pootle side manually and commit.&lt;br /&gt;
&lt;br /&gt;
==== Try to keep the po directory in the top level directory of your repository ====&lt;br /&gt;
&lt;br /&gt;
The various homebrew helper scripts which keep Pootle running properly make the assume that the po directory will be in the toplevel of the source repository. Try to avoid putting the po directory under a directory like i18n or such, as this will need yet another special casing in the helper scripts, making stuff more difficult to maintain.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Language support]]&lt;br /&gt;
[[Category:Languages (international)]]&lt;br /&gt;
[[category:localization]]&lt;br /&gt;
&lt;br /&gt;
= Additional Resources =&lt;br /&gt;
[http://wiki.laptop.org/go/Localization Sugar Localization]&lt;br /&gt;
&lt;br /&gt;
[http://wiki.laptop.org/go/Python_i18n Python i18n]&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dfarning</name></author>
	</entry>
</feed>