Hi.<br><br>I'm writing a theme and I need to print a string which doesn't exist in default po files. <br><br>Thomas Waldmann told me to look at MoinMoin/i18n/__init__.py to learn how to add new translations. I didn't understand it very well, but I wrote the following code, and it's not working. Instead of adding theme translations to the translation system (*.MoinMoin.po + *.mytheme.po), it is replacing it completely (only *.mytheme.po is being used). What's wrong with the following code?<br>

<br><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">def __init__(self, request):</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">    ThemeBase.__init__(self, request)</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">    self.load_personal_translations()</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">def load_personal_translations(self):</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">    """Load personal translations to be used by this theme"""</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">    request = self.request</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">    po_dir = os.path.join('i18n', 'themes', <a href="http://self.name">self.name</a>)</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">    encoding = 'utf-8'</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">    for lang_file in glob.glob(po_filename(request, i18n_dir=po_dir, language='*', domain=<a href="http://self.name">self.name</a>)):</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        language, domain, ext = os.path.basename(lang_file).split('.')</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        t = Translation(language, domain)</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        f = file(lang_file)</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        t.load_po(f)</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        f.close()</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        t.loadLanguage(request, trans_dir=po_dir)</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        personal_translation = {}</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        for key, text in t.raw.items():</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">            personal_translation[key] = text</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        if not translations.has_key(language):</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">            translations[language] = t</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">        else:</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">            append = translations[language].raw.update</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<span style="font-family: courier new,monospace; color: rgb(204, 0, 0);">            append(t.raw)</span><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);"><br style="font-family: courier new,monospace; color: rgb(204, 0, 0);">

<br>