Bug 32586

Summary: Не локализуется <span> в теге <a>
Product: Sisyphus Reporter: Andrey Cherepanov <cas>
Component: alterator-fbiAssignee: Mikhail Efremov <sem>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: imz, manowar, nbr, sem
Version: unstable   
Hardware: all   
OS: Linux   

Description Andrey Cherepanov 2016-10-07 13:42:21 MSK
При использовании локализуемого <span translate="_"> в теге <a>, он не локализуется.

В примере:
<span translate="_">WORD</span> <a href="/ca/root"><span translate="_">WORD</span></a>
первый span будет локализованным, а второй - нет.
Comment 1 Ivan Zakharyaschev 2017-11-05 14:18:05 MSK
Fixed in 5.35-alt1 by http://git.altlinux.org/gears/a/alterator-fbi.git?p=alterator-fbi.git;a=commitdiff;h=aa1a7e483d5dd0266c6e4509b915146cd5e206e1 :

--- a/alterator-fbi/interfaces/guile/ahttpd/translate.scm
+++ b/alterator-fbi/interfaces/guile/ahttpd/translate.scm
@@ -86,7 +86,7 @@
                              options
                              'prefix-href token-prefix)
                             'href token-prefix)
-                         ,content)))
+                         ,(process-translate2 content hsh default-domain))))
      (replace-tag: "span"
                    (lambda (options content)
                      (let ((domain (cond-assq 'translate options)))

(This bug was previously introduced in 5.32 when translate.scm was hijacked for inserting CSRF tokens into <a href="..." ...>, and so other tags were translated as before, but the A tag was a special case, without calling the translation for any of its content.)