Skip to content

Make the Who Is Online label plain text in every language - #210

Merged
avandenberghe merged 1 commit into
develop33from
issue-199-viewing-recent-topics-lang
Oct 4, 2026
Merged

avandenberghe merged 1 commit into
develop33from
issue-199-viewing-recent-topics-lang

Conversation

@avandenberghe

Copy link
Copy Markdown
Collaborator

Closes #199.

Problem
In all 14 language packs, VIEWING_RECENT_TOPICS was 'Viewing <a href="%s">Recent Topics</a>'. But listener::viewonline_overwrite_location() calls lang() without an argument, and core's viewonline_body.html already wraps the location in <a href="{U_FORUM_LOCATION}">. Who Is Online therefore rendered a link nested inside core's link, pointing at a literal %s.

Fix
Drop the markup and placeholder from VIEWING_RECENT_TOPICS in ar, cs, de, de_x_sie, en, es, es_x_tu, fr, nl, pt, ru, sk, sv and uk, keeping each translation's own wording. location_url still supplies the link.

Tests

  • New tests/language/viewonline_lang_test.php, documented in tests/tests.md, loads every language pack and checks that the label has no < and no %. It failed for all 14 packs before the fix and passes for all 14 after.
  • Unit suite: 69 tests, 0 failures, run locally. The functional tests run in CI.

Checked on the local board (boot script: the listener's real viewonline handler for an app.php/rt session, using phpBB's language service, with the cell built as in prosilver's viewonline_body.html):

before: <td class="info"><a href="…/app.php/rt">Viewing <a href="%s">Recent Topics</a></a></td>
after:  <td class="info"><a href="…/app.php/rt">Viewing Recent Topics</a></td>

No changelog entry or version bump, per this repo's convention.

🤖 Generated with Claude Code

VIEWING_RECENT_TOPICS was 'Viewing <a href="%s">Recent Topics</a>' in
all 14 language packs, but the listener calls lang() without an
argument and core's viewonline template already wraps the location in
its own link. Who Is Online rendered a link nested inside core's link,
pointing at a literal "%s".

Drop the markup and placeholder, keeping each translation's wording.

Closes #199

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@avandenberghe
avandenberghe merged commit ac89255 into develop33 Oct 4, 2026
5 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VIEWING_RECENT_TOPICS lang string leaves a literal %s inside a nested link on Who Is Online

1 participant