Mercurial > genshi > genshi-test
comparison doc/i18n.txt @ 594:0fb43dc2e165
Add option to I18n filter to only extract strings in gettext function calls.
author | cmlenz |
---|---|
date | Mon, 13 Aug 2007 23:02:46 +0000 |
parents | 2a6cf641cb5e |
children | 5a1c0ee0f659 |
comparison
equal
deleted
inserted
replaced
593:aa5762c7b7f1 | 594:0fb43dc2e165 |
---|---|
143 set it to ``genshi.template:TextTemplate`` for `text templates`_. | 143 set it to ``genshi.template:TextTemplate`` for `text templates`_. |
144 | 144 |
145 .. _`text templates`: text-templates.html | 145 .. _`text templates`: text-templates.html |
146 | 146 |
147 ``encoding`` | 147 ``encoding`` |
148 ------------------ | 148 ------------ |
149 The encoding of the template file. This is only used for text templates. The | 149 The encoding of the template file. This is only used for text templates. The |
150 default is to assume “utf-8”. | 150 default is to assume “utf-8”. |
151 | 151 |
152 ``include_attrs`` | 152 ``include_attrs`` |
153 ------------------ | 153 ----------------- |
154 Comma-separated list of attribute names that should be considered to have | 154 Comma-separated list of attribute names that should be considered to have |
155 localizable values. Only used for markup templates. | 155 localizable values. Only used for markup templates. |
156 | 156 |
157 ``include_tags`` | 157 ``ignore_tags`` |
158 ------------------ | 158 --------------- |
159 Comma-separated list of tag names that should be ignored. Only used for markup | 159 Comma-separated list of tag names that should be ignored. Only used for markup |
160 templates. | 160 templates. |
161 | |
162 ``extract_text`` | |
163 ---------------- | |
164 Whether text outside explicit ``gettext`` function calls should be extracted. | |
165 By default, any text nodes not inside ignored tags, and values of attribute in | |
166 the ``include_attrs`` list are extracted. If this option is disabled, only | |
167 strings in ``gettext`` function calls are extracted. | |
168 | |
169 .. note:: If you disable this option, it's not necessary to add the translation | |
170 filter as described above. You only need to make sure that the | |
171 template has access to the ``gettext`` functions it uses. | |
161 | 172 |
162 | 173 |
163 Translation | 174 Translation |
164 =========== | 175 =========== |
165 | 176 |