Skip to content

fix(notifications): do not translate empty ExApp strings, which throws on Nextcloud 35 - #953

Merged
oleksandr-nc merged 1 commit into
mainfrom
fix/empty-translatable-strings
Jul 30, 2026
Merged

fix(notifications): do not translate empty ExApp strings, which throws on Nextcloud 35#953
oleksandr-nc merged 1 commit into
mainfrom
fix/empty-translatable-strings

Conversation

@oleksandr-nc

Copy link
Copy Markdown
Contributor

Nextcloud master throws RuntimeException: The translated text is empty since the L10N strict types refactoring, so a notification created without a message made ExAppNotifier::prepare() call t('') and turned the whole notifications endpoint into a 500 - which is what has been failing the NC_Py_API jobs on every PR.

Empty rich subject/message are now skipped instead of translated.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d5fbe785-6d1f-476d-acd0-7a8d58dd534f

📥 Commits

Reviewing files that changed from the base of the PR and between 91ecd8a and bac4a81.

📒 Files selected for processing (2)
  • lib/Listener/LoadMenuEntriesListener.php
  • lib/Notifications/ExAppNotifier.php

📝 Walkthrough

Walkthrough

The changes add empty-string safeguards to menu entry and rich notification rendering. Menu entries with empty display names are skipped before localization. Rich notification subjects are processed only when both subject data and parameters are present and the subject is non-empty.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main fix: avoiding translation of empty ExApp notification strings.
Description check ✅ Passed The description matches the changeset and explains the empty-string translation failure and its fix.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…s on Nextcloud 35

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
@oleksandr-nc
oleksandr-nc force-pushed the fix/empty-translatable-strings branch from 91ecd8a to bac4a81 Compare July 29, 2026 15:22

@lukasdotcom lukasdotcom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐘

@oleksandr-nc
oleksandr-nc merged commit 6bd4c7a into main Jul 30, 2026
53 of 54 checks passed
@oleksandr-nc
oleksandr-nc deleted the fix/empty-translatable-strings branch July 30, 2026 06:51
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.

3 participants