You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace the translated-string size-limit discriminator with a locale-independent marker #1413
Follow-up to #1411. Not a bug today, and explicitly out of scope there — recording it so it is not rediscovered the hard way.
SubmissionUploadFilesComponent.onUploadError decides whether an upload failure was the client-side size-limit rejection by comparing the emitted response against a translated string:
The uploader produced that same string with the same one-argument translate.instant(key) call, so today the === holds in every locale. But it is brittle in a way nothing catches:
adding any interpolation param at either site makes the comparison silently false — no compile error, no failing spec, and eight live customers quietly lose their only actionable oversized-file message;
it depends on the two instant() calls resolving in the same locale at the same moment.
#1411 pins the current behaviour with specs and documents the constraint in a TypeDoc block, but does not change the mechanism.
Proposed fix: replace the translated-string discriminator with a locale-independent marker — either response: '<the i18n key>' (not its translation) or an optional sizeLimitExceeded: true on the emitted UploaderError. Verified safe in principle: no other onUploadError consumer on dtq-dev renders error.response.
Activity
milanmajchrak commentedon Aug 3, 2026
Closing — filed outside the agreed scope of #1411. The content is preserved in that PR's working notes if we want to re-file it deliberately later.