wichert / lingua

Translation toolkit for Python
Other
45 stars 32 forks source link

Domain not respected when extracting i18n:attributes in Chameleon template #66

Closed piotr-dobrogost closed 8 years ago

piotr-dobrogost commented 8 years ago
$ cat test.pt
<ul i18n:domain="domX">
  <li tal:repeat="item items">
    <a title="Edit" i18n:attributes="title"></a>
  </li>
</ul>
$ pot-create -d domY -o out.pot test.pt
$ cat out.pot
#
# SOME DESCRIPTIVE TITLE
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2015.
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
"POT-Creation-Date: 2015-10-09 13:40+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: \n"
"Generated-By: Lingua 3.11\n"

#: ./test.pt:3
msgid "Edit"
msgstr ""

I expect extraction to skip Edit as it's declared in context of domX domain while extraction is for domY domain.

wichert commented 8 years ago

Thanks for the report. I have a fix ready; as soon as I have an internet connection that allows ssh I will push it out.

wichert commented 8 years ago

This has been fixed in the 3.12 release.

piotr-dobrogost commented 8 years ago

That was really quick. Thank you very much.