Repository navigation
fix: register the app menu entry in PHP so "Office" isn't translated - #200
juliusknorr with Copilot wants to merge 3 commits into
Conversation
…ated Assisted-by: GitHubCopilot:copilot-swe-agent Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
17aaabb to
9ccce57
Compare
|
The entry is no longer gated per user: with Office limited to groups, users outside them get an "Office" tile that leads to "Page not found". The DetailCause
ReproServer 36.0.0 dev (
On this PR, bob clicking the tile gets "Page not found". With
Knock-on effects (same cause)
Suggested fixpublic function __construct(
private IAppManager $appManager,
private INavigationManager $navigationManager,
private IURLGenerator $urlGenerator,
) {
}
#[\Override]
public function handle(Event $event): void {
if (!$event instanceof LoadAdditionalEntriesEvent) {
return;
}
$this->navigationManager->add(function (): ?array {
if (!$this->appManager->isEnabledForUser(Application::APP_ID)) {
return null;
}
return [
'id' => Application::APP_ID,
'app' => Application::APP_ID,
'type' => INavigationManager::TYPE_APPS,
'href' => $this->urlGenerator->linkToRoute(Application::APP_ID . '.page.index'),
'icon' => $this->urlGenerator->imagePath(Application::APP_ID, 'app.svg'),
'name' => 'Office',
];
});
}Plus a test case for a user the app isn't enabled for (closure returns Non-blocking
|
|
Oh good catch. Could argue that this should be server responsibility, but let me add a quick check in here |
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
…ed for Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
|
Thanks, added the |



The navigation name in
info.xmlis extracted to Transifex, so the product name "Office" got translated (e.g. "Büro"). The<navigations>block is removed and the entry is now registered viaINavigationManagerin a newLoadNavigationEntryListeneronLoadAdditionalEntriesEvent(same approach as spreed), with an untranslated name and the same route, icon and type.Notes:
info.xmlentry was filtered by the server, the listener is not).order => 10is new, the old entry had none."Office"translations can only be cleaned up in Transifex, since the top-level<name>is still extracted.Fixes #17