View Single Post
Old 09-08-2014, 09:04 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,434
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I haven't customized any placeholder related settings on any of the files either in main calibre or in the plugins.

The problem is simply that the transifex checking code is recognizing

{@</span> and <span %(code)s>@}

as a placeholder. Translations should never alter the content inside placeholders, so it is complaining. I suspect the checking code use a simple regext of something like {\S+.+} to recognize these. The eval() function docstring has a space after the { which is why it doesn't trigger the problems.

If this is the only string where you have a problem simply special case it, make it something like

val = _('<span %(code)s>{}</span> and <span %(code)s>{}</span>').format('@{@', '@}@')
kovidgoyal is offline   Reply With Quote