Bug 32586 - Не локализуется <span> в теге <a>
Summary: Не локализуется <span> в теге <a>
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: alterator-fbi (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Mikhail Efremov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-07 13:42 MSK by Andrey Cherepanov
Modified: 2017-11-05 14:18 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.)