Skip to content

feat(viewer): context-aware section texts for read-only users#1139

Merged
perber merged 2 commits into
mainfrom
feat/section-readonly-texts
Jun 8, 2026
Merged

feat(viewer): context-aware section texts for read-only users#1139
perber merged 2 commits into
mainfrom
feat/section-readonly-texts

Conversation

@perber

@perber perber commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Public visitors and viewers no longer see editor-specific hints (e.g. "When editing this page..." or CTAs to add pages). All section strings are extracted into a new i18n namespace viewer for future language support.

Public visitors and viewers no longer see editor-specific hints
(e.g. "When editing this page..." or CTAs to add pages). All
section strings are extracted into a new i18n namespace `viewer`
for future language support.
Copilot AI review requested due to automatic review settings June 8, 2026 19:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the section “empty/overview” UI copy to be context-aware for read-only users, and moves viewer-facing strings into a new viewer i18n namespace to support future localization.

Changes:

  • Added a new English viewer i18n namespace with section-related strings.
  • Registered the viewer namespace in the i18n initialization.
  • Updated EmptySectionChildrenList to use viewer translations and hide editor-only hints/CTAs for read-only users.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ui/leafwiki-ui/src/locales/en/viewer.json Adds viewer-facing, section-related localized strings (including read-only variants).
ui/leafwiki-ui/src/lib/i18n.ts Registers the new viewer namespace in i18next resources.
ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx Switches hardcoded strings to i18n and conditionally shows editor hints only when not read-only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/features/viewer/EmptySectionChildrenList.tsx Outdated
@perber
perber merged commit f920173 into main Jun 8, 2026
9 checks passed
@perber
perber deleted the feat/section-readonly-texts branch June 8, 2026 19:46
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.

2 participants