Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#259 closed bug (fixed)

Translation functions create nested links!!!

Reported by: lemon-head Owned by:
Priority: major Milestone: 0.1.3
Component: BW Forum Keywords: translation
Cc:

Description

Nested links are illegal in html.

However, the translation functions

  • "function ww($code, ...)" in "\htdocs\bw\lib\lang.php", and
  • "function MOD_words::get($code)" in "\modules\i18n\lib\words.lib.php"
  • "function MOD_words::getFormatted($code, ...)" in "\modules\i18n\lib\words.lib.php"

do inevitably create nested links, when used between <a ..> and </a> tags, if the words are not translated. Which often happens (in the menu, for instance).

This can be avoided by using a combination of

  • "function MOD_words::prepare($code)" for the translation link
  • "function MOD_words::getSilent($code)" for the translated word itself. The second function does only work in combination with the first one!

See also #50.


Task:

  1. discuss if that's a good solution.
  2. replace whereever necessary.

Change History (7)

comment:1 Changed 9 years ago by matrixpoint

See also #263 and r3529, r3530.

comment:2 Changed 9 years ago by lemon-head

We now use $words->getBuffered and $words->flushBuffer, instead of $words->prepare, and $words->getSilent.

getSilent does still exist, but now it does the same as getBuffered.

comment:3 Changed 9 years ago by micha

  • Milestone changed from 0.1.1-outreach-bugfixing to 0.1.2 - more improvements & bugfixing

comment:4 Changed 9 years ago by philipp

  • Component changed from BV Forum to BW Forum

comment:5 Changed 9 years ago by micha

  • follow_up changed from review code to test on alpha

seems to work fine. moved to alpha in rev. 3748

comment:6 Changed 9 years ago by micha

  • follow_up changed from test on alpha to release
  • Resolution set to fixed
  • Status changed from new to closed

Tested again > Can be moved to production when the rest is ready!

comment:7 Changed 9 years ago by matrixpoint

  • follow_up changed from release to none

Released in r3925.

Note: See TracTickets for help on using tickets.