fix(file-description): display "N/A" when file description is empty#167
Open
amadulhaxxani wants to merge 2 commits into
Open
fix(file-description): display "N/A" when file description is empty#167amadulhaxxani wants to merge 2 commits into
amadulhaxxani wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the item file preview “File description” field to display a localized fallback (“N/A” / “Neuvedeno”) when no description is provided, instead of rendering a blank value.
Changes:
- Added a new i18n key
item.file.description.nain EN and CS translation files. - Updated the file description template to fall back to the translated “N/A” label when the description is empty.
- Added unit tests covering both the fallback and non-empty description rendering.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/assets/i18n/en.json5 | Adds English translation for the new “N/A” fallback key. |
| src/assets/i18n/cs.json5 | Adds Czech translation for the new “N/A” fallback key and includes i18n sync-related changes. |
| src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.html | Uses the new translation key as a fallback when fileInput.description is empty. |
| src/app/item-page/simple/field-components/preview-section/file-description/file-description.component.spec.ts | Adds tests to verify fallback behavior and normal rendering when a description exists. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
File description field rendered blank when no description was provided. Now displays "N/A" (or its Czech translation "Neuvedeno") as a fallback.
Sync verification
If en.json5 or cs.json5 translation files were updated:
yarn run sync-i18n -t src/assets/i18n/cs.json5 -ito synchronize messages, and changes are included in this PR.Copilot review