<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mediagoblin.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Manolinux</id>
	<title>GNU MediaGoblin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mediagoblin.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Manolinux"/>
	<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/Special:Contributions/Manolinux"/>
	<updated>2026-04-23T11:32:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=453</id>
		<title>User:Manolinux</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=453"/>
		<updated>2011-12-07T19:08:31Z</updated>

		<summary type="html">&lt;p&gt;Manolinux: /* Openx support */ more &amp;quot;long term&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Openx support ==&lt;br /&gt;
&lt;br /&gt;
Here I am going to write all the stuff about a feature proposal.&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
I hate ads.&lt;br /&gt;
&lt;br /&gt;
But if we are going to have a server with thousands of users all day uploading pics, we need to have income.&lt;br /&gt;
&lt;br /&gt;
Thinking federated, people who wish to run their web server may wish to do it for money.&lt;br /&gt;
&lt;br /&gt;
===What is OpenX?===&lt;br /&gt;
&lt;br /&gt;
Previously known as openAds, it is a software that manages and serves banners and other kind of ads. It is open source, of course (though there is a proprietary version too).&lt;br /&gt;
&lt;br /&gt;
===How does it work?===&lt;br /&gt;
&lt;br /&gt;
You need to have openx installed somewhere, or use openx hosted, a multiuser site. There, you define Advisers, Campaigns (inside Advisers) and banners (inside Campaigns) on one hand, and on the other hand you define Websites, and Zones in them. Then, you put some banners inside each zone.&lt;br /&gt;
&lt;br /&gt;
Each zone has an invocation code, a piece of HTML you put where you want in your website. The invocation code makes the banner appear, and do the neccesary accounting.&lt;br /&gt;
&lt;br /&gt;
===What do we do?===&lt;br /&gt;
&lt;br /&gt;
====Input====&lt;br /&gt;
&lt;br /&gt;
* OpenX instance address (i.e. http://myserver.com/openx)&lt;br /&gt;
* Zone number.&lt;br /&gt;
* Where in Media Goblin to put the code.&lt;br /&gt;
&lt;br /&gt;
====Output====&lt;br /&gt;
&lt;br /&gt;
* The HTML code in the desired area.&lt;br /&gt;
&lt;br /&gt;
===Why OpenX?===&lt;br /&gt;
&lt;br /&gt;
Because it is the better free advertising server I know of. If you know of another option, let me know.&lt;br /&gt;
&lt;br /&gt;
===Architecture===&lt;br /&gt;
&lt;br /&gt;
* For sure this must be a plugin. Any work done must be very modular and enough flexible to be adapted to the upcoming plugin infraestructure, whichever form it takes.&lt;br /&gt;
* I don&#039;t know gmg enough to say, but maybe page areas must be defined. Anyway, page areas will have to exist when a plugin infaestructure arrives.&lt;br /&gt;
&lt;br /&gt;
===Planning===&lt;br /&gt;
&lt;br /&gt;
I would like to take this work, but take it really &amp;quot;long term&amp;quot; (before, I need to learn more about gmg and even Python). I would do it in a separate branch avoiding merge until there is something interesting and useful.&lt;/div&gt;</summary>
		<author><name>Manolinux</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=452</id>
		<title>User:Manolinux</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=452"/>
		<updated>2011-12-07T19:04:00Z</updated>

		<summary type="html">&lt;p&gt;Manolinux: /* Openx support */ why openx?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Openx support ==&lt;br /&gt;
&lt;br /&gt;
Here I am going to write all the stuff about a feature proposal.&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
I hate ads.&lt;br /&gt;
&lt;br /&gt;
But if we are going to have a server with thousands of users all day uploading pics, we need to have income.&lt;br /&gt;
&lt;br /&gt;
Thinking federated, people who wish to run their web server may wish to do it for money.&lt;br /&gt;
&lt;br /&gt;
===What is OpenX?===&lt;br /&gt;
&lt;br /&gt;
Previously known as openAds, it is a software that manages and serves banners and other kind of ads. It is open source, of course (though there is a proprietary version too).&lt;br /&gt;
&lt;br /&gt;
===How does it work?===&lt;br /&gt;
&lt;br /&gt;
You need to have openx installed somewhere, or use openx hosted, a multiuser site. There, you define Advisers, Campaigns (inside Advisers) and banners (inside Campaigns) on one hand, and on the other hand you define Websites, and Zones in them. Then, you put some banners inside each zone.&lt;br /&gt;
&lt;br /&gt;
Each zone has an invocation code, a piece of HTML you put where you want in your website. The invocation code makes the banner appear, and do the neccesary accounting.&lt;br /&gt;
&lt;br /&gt;
===What do we do?===&lt;br /&gt;
&lt;br /&gt;
====Input====&lt;br /&gt;
&lt;br /&gt;
* OpenX instance address (i.e. http://myserver.com/openx)&lt;br /&gt;
* Zone number.&lt;br /&gt;
* Where in Media Goblin to put the code.&lt;br /&gt;
&lt;br /&gt;
====Output====&lt;br /&gt;
&lt;br /&gt;
* The HTML code in the desired area.&lt;br /&gt;
&lt;br /&gt;
===Why OpenX?===&lt;br /&gt;
&lt;br /&gt;
Because it is the better free advertising server I know of. If you know of another option, let me know.&lt;br /&gt;
&lt;br /&gt;
===Architecture===&lt;br /&gt;
&lt;br /&gt;
* For sure this must be a plugin. Any work done must be very modular and enough flexible to be adapted to the upcoming plugin infraestructure, whichever form it takes.&lt;br /&gt;
* I don&#039;t know gmg enough to say, but maybe page areas must be defined. Anyway, page areas will have to exist when a plugin infaestructure arrives.&lt;br /&gt;
&lt;br /&gt;
===Planning===&lt;br /&gt;
&lt;br /&gt;
I would like to take this work, but take it rather &amp;quot;long term&amp;quot;. I would do it in a separate branch avoiding merge until there is something interesting and useful.&lt;/div&gt;</summary>
		<author><name>Manolinux</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=451</id>
		<title>User:Manolinux</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=451"/>
		<updated>2011-12-07T18:54:23Z</updated>

		<summary type="html">&lt;p&gt;Manolinux: /* Openx support */ finish openx support description (for now)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Openx support ==&lt;br /&gt;
&lt;br /&gt;
Here I am going to write all the stuff about a feature proposal.&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
I hate ads.&lt;br /&gt;
&lt;br /&gt;
But if we are going to have a server with thousands of users all day uploading pics, we need to have income.&lt;br /&gt;
&lt;br /&gt;
Thinking federated, people who wish to run their web server may wish to do it for money.&lt;br /&gt;
&lt;br /&gt;
===What is OpenX?===&lt;br /&gt;
&lt;br /&gt;
Previously known as openAds, it is a software that manages and serves banners and other kind of ads. It is open source, of course (though there is a proprietary version too).&lt;br /&gt;
&lt;br /&gt;
===How does it works?===&lt;br /&gt;
&lt;br /&gt;
You need to have openx installed somewhere, or use openx hosted, a multiuser site. There, you define Advisers, Campaigns (inside Advisers) and banners (inside Campaigns) on one hand, and on the other hand you define Websites, and Zones in them. Then, you put some banners inside each zone.&lt;br /&gt;
&lt;br /&gt;
Each zone has an invocation code, a piece of HTML you put where you want in your website. The invocation code makes the banner appear, and do the neccesary accounting.&lt;br /&gt;
&lt;br /&gt;
===What do we do?===&lt;br /&gt;
&lt;br /&gt;
====Input====&lt;br /&gt;
&lt;br /&gt;
* OpenX instance address (i.e. http://myserver.com/openx)&lt;br /&gt;
* Zone number.&lt;br /&gt;
* Where in Media Goblin to put the code.&lt;br /&gt;
&lt;br /&gt;
====Output====&lt;br /&gt;
&lt;br /&gt;
* The HTML code in the desired area.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Architecture===&lt;br /&gt;
&lt;br /&gt;
* For sure this must be a plugin. Any work done must be very modular and enough flexible to be adapted to the upcoming plugin infraestructure, whichever form it takes.&lt;br /&gt;
* I don&#039;t know gmg enough to say, but maybe page areas must be defined. Anyway, page areas will have to exist when a plugin infaestructure arrives.&lt;br /&gt;
&lt;br /&gt;
===Planning===&lt;br /&gt;
&lt;br /&gt;
I would like to take this work, but take it rather &amp;quot;long term&amp;quot;. I would do it in a separate branch avoiding merge until there is something interesting and useful.&lt;/div&gt;</summary>
		<author><name>Manolinux</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=450</id>
		<title>User:Manolinux</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=User:Manolinux&amp;diff=450"/>
		<updated>2011-12-07T17:14:24Z</updated>

		<summary type="html">&lt;p&gt;Manolinux: Detailing my feature idea, to be continued&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Openx support ==&lt;br /&gt;
&lt;br /&gt;
===Rationale===&lt;br /&gt;
&lt;br /&gt;
I hate ads.&lt;br /&gt;
&lt;br /&gt;
But if we are going to have a server with thousands of users all day uploading pics, we need to have income.&lt;br /&gt;
&lt;br /&gt;
Thinking federated, people who wish to run their web server may wish to do it for money.&lt;br /&gt;
&lt;br /&gt;
===What is OpenX?===&lt;br /&gt;
&lt;br /&gt;
Previously known as openAds, it is a software that manages and serves banners and other kind of ads. It is open source, of course (though there is a proprietary version too).&lt;br /&gt;
&lt;br /&gt;
===How does it works?===&lt;br /&gt;
&lt;br /&gt;
You need to have openx installed somewhere, or use openx hosted, a multiuser site. There, you define Advisers, Campaigns (inside Advisers) and banners (inside Campaigns) on one hand, and on the other hand you define Websites, and Zones in them. Then, you put some banners inside each zone.&lt;br /&gt;
&lt;br /&gt;
Each zone has an invocation code, a piece of HTML you put where you want in your website. The invocation code makes the banner appear, and do the neccesary accounting.&lt;/div&gt;</summary>
		<author><name>Manolinux</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=Translations&amp;diff=449</id>
		<title>Translations</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=Translations&amp;diff=449"/>
		<updated>2011-12-07T14:30:41Z</updated>

		<summary type="html">&lt;p&gt;Manolinux: Fixing the stupid thing I said before :P&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For translators =&lt;br /&gt;
&lt;br /&gt;
You can translate our tools at Transifex:&lt;br /&gt;
&lt;br /&gt;
https://www.transifex.net/projects/p/mediagoblin/resource/mediagoblin/&lt;br /&gt;
&lt;br /&gt;
To translate, click on your language on the list, and then click on &amp;quot;Translate now&amp;quot;. By default, Transifex only shows you strings that currently have no translation. There is a checkbox to enable display of the translated strings, in case you can fix any of them.&lt;br /&gt;
&lt;br /&gt;
We are currently using no translation teams, so you can just edit the strings (but try to be nice and consistent with the current translation).&lt;br /&gt;
&lt;br /&gt;
Note: please don&#039;t translate the words &amp;quot;MediaGoblin&amp;quot; or &amp;quot;GNU&amp;quot; into your native language.  Those words should be retained as-is for branding reasons. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes for some language teams ==&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
Interessante Hinweise zur Übersetzung finden sich bei Gnome:&lt;br /&gt;
* http://live.gnome.org/de/UebersetzungsRichtlinien&lt;br /&gt;
&lt;br /&gt;
In Abweichung von diesen Richtlinien wird momentan &amp;quot;du&amp;quot; für die Anrede benutzt.&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
Se está adoptando la siguiente convención para la traducción al español. Si crees que alguna traducción se puede mejorar, sugiérela en la página de de discusión de este artículo.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Inglés&lt;br /&gt;
!Español&lt;br /&gt;
!Comentarios&lt;br /&gt;
|-&lt;br /&gt;
|you&lt;br /&gt;
|tú&lt;br /&gt;
|(segunda persona del singular, expresión informal)&lt;br /&gt;
|-&lt;br /&gt;
|media&lt;br /&gt;
|contenido&lt;br /&gt;
|-&lt;br /&gt;
|slug&lt;br /&gt;
|ficha&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Fixing translations from transifex==&lt;br /&gt;
&lt;br /&gt;
= For developers =&lt;br /&gt;
== Marking strings for translation ==&lt;br /&gt;
=== In Jinja2 ===&lt;br /&gt;
&lt;br /&gt;
See: http://jinja.pocoo.org/docs/templates/#i18n&lt;br /&gt;
&lt;br /&gt;
Mostly like Django template i18n support, if you have any experience with that.&lt;br /&gt;
&lt;br /&gt;
=== In python code ===&lt;br /&gt;
&lt;br /&gt;
Usually, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from mediagoblin.util import pass_to_ugettext as _&lt;br /&gt;
&lt;br /&gt;
def some_func(something):&lt;br /&gt;
    return _(u&#039;This string would tooootally be translatable now.&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Except, in form modules we don&#039;t actually want to translate things because for various reasons that doesn&#039;t work, so we do the translation call template-side.  So write the module to use the fake ugettext passthrough (which doesn&#039;t do any translation but still wraps things in _() so that Babel will know to extract these strings):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from mediagoblin.util import fake_ugettext_passthrough as _&lt;br /&gt;
&lt;br /&gt;
class FunkyMonkeyForm(wtforms.Form):&lt;br /&gt;
    funky = wtforms.TextAreaField(&lt;br /&gt;
            _(&#039;Funkiness description&#039;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extracting translations ==&lt;br /&gt;
&lt;br /&gt;
If you run buildout it should create a script called &#039;pybabel&#039;.  Use it to extract translations like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/pybabel extract -F babel.ini -o mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling translations ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/pybabel compile -D mediagoblin -d mediagoblin/i18n/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pulling translations from Transifex ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately until the next release of transifex-client which has been patched to have proper entry points, you have to run transifex-client from a virtualenv or from site-packages.  But assuming that&#039;s done, pulling translations is easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tx pull -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pushing new translations to Transifex ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tx push -s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
Got an error on Transifex like:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Translation must start with a newline (\n)&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
The problem here is when we have something like:&lt;br /&gt;
&lt;br /&gt;
        {% trans register_url=request.urlgen(&#039;mediagoblin.auth.register&#039;) %}&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit_highlight&amp;quot; href=&amp;quot;{{ register_url }}&amp;quot;&amp;gt;Create a free account&amp;lt;/a&amp;gt;&lt;br /&gt;
          or&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit&amp;quot; href=&amp;quot;http://wiki.mediagoblin.org/HackingHowto&amp;quot;&amp;gt;Set up MediaGoblin on your own server&amp;lt;/a&amp;gt;&lt;br /&gt;
        {% endtrans %}&lt;br /&gt;
&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
        {% trans register_url=request.urlgen(&#039;mediagoblin.auth.register&#039;) -%}&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit_highlight&amp;quot; href=&amp;quot;{{ register_url }}&amp;quot;&amp;gt;Create a free account&amp;lt;/a&amp;gt;&lt;br /&gt;
          or&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit&amp;quot; href=&amp;quot;http://wiki.mediagoblin.org/HackingHowto&amp;quot;&amp;gt;Set up MediaGoblin on your own server&amp;lt;/a&amp;gt;&lt;br /&gt;
        {%- endtrans %}&lt;br /&gt;
&lt;br /&gt;
The distinction might not be obvious... look for the %} versus -%} and {% versus {%- on the first and last lines.  The thing about this is this tells Jinja2 to strip the whitespace.  Without that, Transifex sees that there&#039;s a &amp;quot;\n&amp;quot; on the first line of the original but not on the future translation, and gets upset.&lt;br /&gt;
&lt;br /&gt;
If this happens the template should be updated to strip whitespace and translations should be pushed to transifex.&lt;/div&gt;</summary>
		<author><name>Manolinux</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=Translations&amp;diff=446</id>
		<title>Translations</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=Translations&amp;diff=446"/>
		<updated>2011-12-07T00:07:20Z</updated>

		<summary type="html">&lt;p&gt;Manolinux: How to update translations in transifex&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For translators =&lt;br /&gt;
&lt;br /&gt;
You can translate our tools at Transifex:&lt;br /&gt;
&lt;br /&gt;
https://www.transifex.net/projects/p/mediagoblin/resource/mediagoblin/&lt;br /&gt;
&lt;br /&gt;
Note: please don&#039;t translate the words &amp;quot;MediaGoblin&amp;quot; or &amp;quot;GNU&amp;quot; into your native language.  Those words should be retained as-is for branding reasons. :)&lt;br /&gt;
&lt;br /&gt;
We are currently using no translation teams, so you can just edit the strings (but try to be nice and consistent with the current translation).&lt;br /&gt;
&lt;br /&gt;
== Notes for some language teams ==&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
Interessante Hinweise zur Übersetzung finden sich bei Gnome:&lt;br /&gt;
* http://live.gnome.org/de/UebersetzungsRichtlinien&lt;br /&gt;
&lt;br /&gt;
In Abweichung von diesen Richtlinien wird momentan &amp;quot;du&amp;quot; für die Anrede benutzt.&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
Se está adoptando la siguiente convención para la traducción al español. Si crees que alguna traducción se puede mejorar, sugiérela en la página de de discusión de este artículo.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Inglés&lt;br /&gt;
!Español&lt;br /&gt;
!Comentarios&lt;br /&gt;
|-&lt;br /&gt;
|you&lt;br /&gt;
|tú&lt;br /&gt;
|(segunda persona del singular, expresión informal)&lt;br /&gt;
|-&lt;br /&gt;
|media&lt;br /&gt;
|contenido&lt;br /&gt;
|-&lt;br /&gt;
|slug&lt;br /&gt;
|ficha&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Fixing translations from transifex==&lt;br /&gt;
&lt;br /&gt;
Transifex only show you strings that currently have no translation.&lt;br /&gt;
&lt;br /&gt;
If you want to fix an existing translation, you can download a .po file with the &amp;quot;Download for viewing&amp;quot;  or &amp;quot;Download for tranlation&amp;quot; link, then edit the .po file with an appropiate tool (i.e. Poedit or emacs po-mode) and then upload the resulting file with the &amp;quot;Upload file&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
= For developers =&lt;br /&gt;
== Marking strings for translation ==&lt;br /&gt;
=== In Jinja2 ===&lt;br /&gt;
&lt;br /&gt;
See: http://jinja.pocoo.org/docs/templates/#i18n&lt;br /&gt;
&lt;br /&gt;
Mostly like Django template i18n support, if you have any experience with that.&lt;br /&gt;
&lt;br /&gt;
=== In python code ===&lt;br /&gt;
&lt;br /&gt;
Usually, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from mediagoblin.util import pass_to_ugettext as _&lt;br /&gt;
&lt;br /&gt;
def some_func(something):&lt;br /&gt;
    return _(u&#039;This string would tooootally be translatable now.&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Except, in form modules we don&#039;t actually want to translate things because for various reasons that doesn&#039;t work, so we do the translation call template-side.  So write the module to use the fake ugettext passthrough (which doesn&#039;t do any translation but still wraps things in _() so that Babel will know to extract these strings):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from mediagoblin.util import fake_ugettext_passthrough as _&lt;br /&gt;
&lt;br /&gt;
class FunkyMonkeyForm(wtforms.Form):&lt;br /&gt;
    funky = wtforms.TextAreaField(&lt;br /&gt;
            _(&#039;Funkiness description&#039;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extracting translations ==&lt;br /&gt;
&lt;br /&gt;
If you run buildout it should create a script called &#039;pybabel&#039;.  Use it to extract translations like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/pybabel extract -F babel.ini -o mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling translations ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/pybabel compile -D mediagoblin -d mediagoblin/i18n/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pulling translations from Transifex ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately until the next release of transifex-client which has been patched to have proper entry points, you have to run transifex-client from a virtualenv or from site-packages.  But assuming that&#039;s done, pulling translations is easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tx pull -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pushing new translations to Transifex ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tx push -s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
Got an error on Transifex like:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Translation must start with a newline (\n)&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
The problem here is when we have something like:&lt;br /&gt;
&lt;br /&gt;
        {% trans register_url=request.urlgen(&#039;mediagoblin.auth.register&#039;) %}&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit_highlight&amp;quot; href=&amp;quot;{{ register_url }}&amp;quot;&amp;gt;Create a free account&amp;lt;/a&amp;gt;&lt;br /&gt;
          or&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit&amp;quot; href=&amp;quot;http://wiki.mediagoblin.org/HackingHowto&amp;quot;&amp;gt;Set up MediaGoblin on your own server&amp;lt;/a&amp;gt;&lt;br /&gt;
        {% endtrans %}&lt;br /&gt;
&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
        {% trans register_url=request.urlgen(&#039;mediagoblin.auth.register&#039;) -%}&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit_highlight&amp;quot; href=&amp;quot;{{ register_url }}&amp;quot;&amp;gt;Create a free account&amp;lt;/a&amp;gt;&lt;br /&gt;
          or&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit&amp;quot; href=&amp;quot;http://wiki.mediagoblin.org/HackingHowto&amp;quot;&amp;gt;Set up MediaGoblin on your own server&amp;lt;/a&amp;gt;&lt;br /&gt;
        {%- endtrans %}&lt;br /&gt;
&lt;br /&gt;
The distinction might not be obvious... look for the %} versus -%} and {% versus {%- on the first and last lines.  The thing about this is this tells Jinja2 to strip the whitespace.  Without that, Transifex sees that there&#039;s a &amp;quot;\n&amp;quot; on the first line of the original but not on the future translation, and gets upset.&lt;br /&gt;
&lt;br /&gt;
If this happens the template should be updated to strip whitespace and translations should be pushed to transifex.&lt;/div&gt;</summary>
		<author><name>Manolinux</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=Translations&amp;diff=445</id>
		<title>Translations</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=Translations&amp;diff=445"/>
		<updated>2011-12-04T16:38:43Z</updated>

		<summary type="html">&lt;p&gt;Manolinux: Remove what is said about translation teams&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For translators =&lt;br /&gt;
&lt;br /&gt;
You can translate our tools at Transifex:&lt;br /&gt;
&lt;br /&gt;
https://www.transifex.net/projects/p/mediagoblin/resource/mediagoblin/&lt;br /&gt;
&lt;br /&gt;
Note: please don&#039;t translate the words &amp;quot;MediaGoblin&amp;quot; or &amp;quot;GNU&amp;quot; into your native language.  Those words should be retained as-is for branding reasons. :)&lt;br /&gt;
&lt;br /&gt;
We are currently using no translation teams, so you can just edit the strings (but try to be nice and consistent with the current translation).&lt;br /&gt;
&lt;br /&gt;
== Notes for some language teams ==&lt;br /&gt;
=== German ===&lt;br /&gt;
&lt;br /&gt;
Interessante Hinweise zur Übersetzung finden sich bei Gnome:&lt;br /&gt;
* http://live.gnome.org/de/UebersetzungsRichtlinien&lt;br /&gt;
&lt;br /&gt;
In Abweichung von diesen Richtlinien wird momentan &amp;quot;du&amp;quot; für die Anrede benutzt.&lt;br /&gt;
&lt;br /&gt;
=== Spanish ===&lt;br /&gt;
&lt;br /&gt;
Se está adoptando la siguiente convención para la traducción al español. Si crees que alguna traducción se puede mejorar, sugiérela en la página de de discusión de este artículo.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!Inglés&lt;br /&gt;
!Español&lt;br /&gt;
!Comentarios&lt;br /&gt;
|-&lt;br /&gt;
|you&lt;br /&gt;
|tú&lt;br /&gt;
|(segunda persona del singular, expresión informal)&lt;br /&gt;
|-&lt;br /&gt;
|media&lt;br /&gt;
|contenido&lt;br /&gt;
|-&lt;br /&gt;
|slug&lt;br /&gt;
|ficha&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= For developers =&lt;br /&gt;
== Marking strings for translation ==&lt;br /&gt;
=== In Jinja2 ===&lt;br /&gt;
&lt;br /&gt;
See: http://jinja.pocoo.org/docs/templates/#i18n&lt;br /&gt;
&lt;br /&gt;
Mostly like Django template i18n support, if you have any experience with that.&lt;br /&gt;
&lt;br /&gt;
=== In python code ===&lt;br /&gt;
&lt;br /&gt;
Usually, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from mediagoblin.util import pass_to_ugettext as _&lt;br /&gt;
&lt;br /&gt;
def some_func(something):&lt;br /&gt;
    return _(u&#039;This string would tooootally be translatable now.&#039;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Except, in form modules we don&#039;t actually want to translate things because for various reasons that doesn&#039;t work, so we do the translation call template-side.  So write the module to use the fake ugettext passthrough (which doesn&#039;t do any translation but still wraps things in _() so that Babel will know to extract these strings):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from mediagoblin.util import fake_ugettext_passthrough as _&lt;br /&gt;
&lt;br /&gt;
class FunkyMonkeyForm(wtforms.Form):&lt;br /&gt;
    funky = wtforms.TextAreaField(&lt;br /&gt;
            _(&#039;Funkiness description&#039;))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Extracting translations ==&lt;br /&gt;
&lt;br /&gt;
If you run buildout it should create a script called &#039;pybabel&#039;.  Use it to extract translations like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/pybabel extract -F babel.ini -o mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Compiling translations ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./bin/pybabel compile -D mediagoblin -d mediagoblin/i18n/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pulling translations from Transifex ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately until the next release of transifex-client which has been patched to have proper entry points, you have to run transifex-client from a virtualenv or from site-packages.  But assuming that&#039;s done, pulling translations is easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tx pull -a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pushing new translations to Transifex ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tx push -s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
Got an error on Transifex like:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Translation must start with a newline (\n)&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
The problem here is when we have something like:&lt;br /&gt;
&lt;br /&gt;
        {% trans register_url=request.urlgen(&#039;mediagoblin.auth.register&#039;) %}&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit_highlight&amp;quot; href=&amp;quot;{{ register_url }}&amp;quot;&amp;gt;Create a free account&amp;lt;/a&amp;gt;&lt;br /&gt;
          or&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit&amp;quot; href=&amp;quot;http://wiki.mediagoblin.org/HackingHowto&amp;quot;&amp;gt;Set up MediaGoblin on your own server&amp;lt;/a&amp;gt;&lt;br /&gt;
        {% endtrans %}&lt;br /&gt;
&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
        {% trans register_url=request.urlgen(&#039;mediagoblin.auth.register&#039;) -%}&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit_highlight&amp;quot; href=&amp;quot;{{ register_url }}&amp;quot;&amp;gt;Create a free account&amp;lt;/a&amp;gt;&lt;br /&gt;
          or&lt;br /&gt;
          &amp;lt;a class=&amp;quot;header_submit&amp;quot; href=&amp;quot;http://wiki.mediagoblin.org/HackingHowto&amp;quot;&amp;gt;Set up MediaGoblin on your own server&amp;lt;/a&amp;gt;&lt;br /&gt;
        {%- endtrans %}&lt;br /&gt;
&lt;br /&gt;
The distinction might not be obvious... look for the %} versus -%} and {% versus {%- on the first and last lines.  The thing about this is this tells Jinja2 to strip the whitespace.  Without that, Transifex sees that there&#039;s a &amp;quot;\n&amp;quot; on the first line of the original but not on the future translation, and gets upset.&lt;br /&gt;
&lt;br /&gt;
If this happens the template should be updated to strip whitespace and translations should be pushed to transifex.&lt;/div&gt;</summary>
		<author><name>Manolinux</name></author>
	</entry>
</feed>