<p><a href="https://github.com/frlan" class="user-mention">@frlan</a> no, it would work just fine as is, just listing python files in <em>POTFILES.in</em> and marking strings with <code>_()</code></p>

<p>I gave this a quick shot, and the extraction process works fine, but I can't seem to get the translations from Python, as it makes it crash somehow:</p>

<pre lang="python-backtrace"><code>Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "/tmp/_install_gtk2/lib/geany/geanypy/geany/__init__.py", line 20, in <module>
    import manager
  File "/tmp/_install_gtk2/lib/geany/geanypy/geany/manager.py", line 7, in <module>
    t = gettext.translation('geany-plugins', '/tmp/_install_gtk2/share/locale')
  File "/usr/lib/python2.7/gettext.py", line 481, in translation
    t = _translations.setdefault(key, class_(fp))
  File "/usr/lib/python2.7/gettext.py", line 182, in __init__
    self._parse(fp)
  File "/usr/lib/python2.7/gettext.py", line 317, in _parse
    plural = v[1].split('plural=')[1]
IndexError: list index out of range
</code></pre>

<p>either using the <a href="https://docs.python.org/dev/library/gettext.html?highlight=ldgettext#class-based-api">recommend</a></p>

<div class="highlight highlight-source-python"><pre><span class="pl-k">import</span> gettext
t <span class="pl-k">=</span> gettext.translation(<span class="pl-s"><span class="pl-pds">'</span>geany-plugins<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>...<span class="pl-pds">'</span></span>)
_ <span class="pl-k">=</span> t.gettext</pre></div>

<p>or the one here after binding the textdomain with <a href="https://docs.python.org/dev/library/gettext.html?highlight=ldgettext#gettext.bindtextdomain"><code>gettext.bindtextdomain()</code></a>.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany-plugins/issues/272#issuecomment-172622420">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJw_ZluCW6g7hK5rYREr2B-WJL7zRks5pbSyygaJpZM4FXfbY.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany-plugins/issues/272#issuecomment-172622420"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>