Edgewall Software

Ticket #408 (closed enhancement: worksforme)

Opened 5 years ago

Last modified 3 years ago

support non translatable sections

Reported by: cboos Owned by: cmlenz
Priority: minor Milestone:
Component: Internationalization Version: 0.6
Keywords: i18n:ignore Cc: palgarvio, cmlenz


In some (rare) cases, it would be useful to prevent text from being translated, in templates. A new directive could be used for that, for example i18n:ignore.

See use case in  [T10253], but we could also use it for a few other situations ( Trac:MissingTranslations#Unnecessarystrings).

For example:

<a href="..." i18n:ignore="">TracGuide</a>

would look nicer than:

<a href="...">${'TracGuide'}</a>


Change History

  Changed 5 years ago by cmlenz

Doesn't xml:lang work for this anymore?

<a href="..." xml:lang="en">TracGuide</a>

follow-up: ↓ 3   Changed 5 years ago by cboos

I didn't know this was supported. But even so, will this prevent extraction?

That would be the main feature actually, not wasting the time of translators with stuff they shouldn't translate. And if it's not extracted and unique, it also won't be translated.

in reply to: ↑ 2   Changed 5 years ago by cboos

Replying to cboos:

I didn't know this was supported. But even so, will this prevent extraction?

It seems so:

Note that elements defining xml:lang attributes that do not contain variable expressions are ignored by this filter. That can be used to exclude specific parts of a template from being extracted and translated.
from /ApiDocs/genshi.filters.i18n

I'll test. Thanks for the feedback!

  Changed 5 years ago by cboos

  • status changed from new to closed
  • resolution set to worksforme
  • milestone 0.7 deleted

Works great! Fixed in Trac in  [T10265].

Thanks again.

Add/Change #408 (support non translatable sections)


E-mail address and user name can be saved in the Preferences.

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'
Note: See TracTickets for help on using tickets.