-
-
Notifications
You must be signed in to change notification settings - Fork 79
Description
When the user's locale is set to en (US English), the Photos app renders a completely blank page with no error shown to the user.
Steps to reproduce:
- Set your Nextcloud language to English (US English / en)
- Navigate to the Photos app in the browser
Expected behavior: Photos app loads normally.
Actual behavior: Blank page. The browser console shows:
Uncaught TypeError: Cannot read properties of undefined (reading 'translations')
at nd.addTranslations (gettext.mjs:23:39)
at rd.build (gettext.mjs:101:15)
at index.mjs:9:99
Root cause:
In the bundled index.mjs (chunk index-gbefElOV.chunk.mjs), the moment.js locale setup contains:
if (locale === "en" || locale in translations) {
const gt = getGettextBuilder()
.setLanguage(locale)
.addTranslation(locale, translations[locale]) // translations["en"] is undefined!
.build();
The translations object includes en_GB but not en. The condition correctly special-cases "en" to enter the block, but then translations["en"] is
undefined, causing the gettext builder to crash, which prevents the entire app from rendering.
Fix:
Change the condition to only enter the block when the locale actually exists in the translations object:
if (locale in translations) {
Or alternatively, add an "en" entry to the bundled translations object.
Environment:
- Nextcloud version: 32.0.6
- Photos app version: 5.0.0
- Browser: Google Chrome 138.0.7204.184 (Official Build) (x86_64)
- Locale: en (US English)