-
Notifications
You must be signed in to change notification settings - Fork 86
fix: fixed translation of "danger " for varsel compoenent #17058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: fixed translation of "danger " for varsel compoenent #17058
Conversation
WalkthroughA new translation entry for the UI enum option "Danger" was added to the Norwegian Bokmål translation file, mapping "ux_editor.component_properties.enum_danger" to "Farlig". Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/Designer/frontend/language/src/nb.json (1)
1-1528: Consider improving the PR description for clarity.The PR description is currently incomplete with unchecked verification items. As per team conventions in learnings, it's preferable to remove non-applicable checklist items rather than leave them unmarked. While the code change itself is sound, a clearer description of the issue (e.g., "Alert component missing 'danger' severity translation") and completed verification would strengthen the PR record.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Designer/frontend/language/src/nb.json(1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 15719
File: frontend/dashboard/pages/OrgContentLibraryPage/FeedbackForm/FeedbackForm.tsx:22-39
Timestamp: 2025-06-20T13:41:45.278Z
Learning: In the Altinn Studio project, temporary feedback form components may intentionally use hardcoded text instead of internationalization when they are designed to be removed before language support is implemented.
Learnt from: Jondyr
Repo: Altinn/altinn-studio PR: 14517
File: frontend/language/src/nb.json:1385-1385
Timestamp: 2025-01-30T08:18:42.814Z
Learning: English translations (en.json) are not currently used in the Altinn Studio project. Comments about missing English translations should be ignored.
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 0
File: :0-0
Timestamp: 2025-09-10T12:02:06.348Z
Learning: In the Altinn Studio repository, the team convention is to remove irrelevant checkboxes from the PR template description rather than leaving them unmarked. This makes it clear that the author has intentionally considered each item and removed non-applicable ones, helping to avoid merging PRs with incomplete checklists.
Learnt from: ErlingHauan
Repo: Altinn/altinn-studio PR: 15977
File: frontend/libs/studio-components-legacy/src/components/StudioCard/index.tsx:2-7
Timestamp: 2025-08-06T12:36:57.397Z
Learning: When a developer copies a component from `studio-components-legacy` to `studio-components` in the Altinn Studio repository and has not added a deprecation comment for the component in `studio-components-legacy`, suggest adding the deprecation comment in the PR review.
Learnt from: framitdavid
Repo: Altinn/altinn-studio PR: 16372
File: src/Designer/frontend/libs/studio-components/src/components/index.ts:34-34
Timestamp: 2025-09-23T08:53:19.508Z
Learning: In the Altinn Studio codebase, when moving components from studio-components-legacy to studio-components, the team prefers to handle the component migration and remaining import updates in separate PRs to maintain focused, atomic changes.
Learnt from: wrt95
Repo: Altinn/altinn-studio PR: 15542
File: frontend/app-development/features/appSettings/components/TabsContent/Tabs/AboutTab/utils/appResourceValidationUtils.ts:64-95
Timestamp: 2025-06-03T10:54:59.508Z
Learning: In the app settings validation logic for appResourceValidationUtils.ts, the Norwegian Bokmål ('nb') language uses a comprehensive error message via getMissingInputLanguageString that can describe multiple missing languages, while Norwegian Nynorsk ('nn') and English ('en') use simpler, direct translation keys for missing translations. This pattern should be preserved when refactoring validation logic.
Learnt from: ErlingHauan
Repo: Altinn/altinn-studio PR: 15977
File: frontend/libs/studio-components-legacy/src/components/StudioCard/index.tsx:2-7
Timestamp: 2025-08-06T12:37:01.381Z
Learning: When reviewing PRs in the Altinn Studio repository where a developer copies a component from `studio-components-legacy` to `studio-components`, suggest adding a `deprecated` JSDoc comment to the component in `studio-components-legacy` if one hasn't been added. The deprecation comment should recommend using the component from `studio/components` instead.
Learnt from: lassopicasso
Repo: Altinn/altinn-studio PR: 14575
File: frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/OverrideFields/Summary2OverrideDisplayType.tsx:47-58
Timestamp: 2025-02-07T09:50:33.290Z
Learning: Avoid suggesting StudioCombobox component in future PRs for the Altinn Studio repository. A new replacement component will be introduced later.
Learnt from: standeren
Repo: Altinn/altinn-studio PR: 14449
File: frontend/packages/process-editor/src/components/ConfigPanel/ConfigContent/EditTaskId/EditTaskId.tsx:47-55
Timestamp: 2025-01-20T10:00:55.997Z
Learning: The project only supports Norwegian translations in the solution. English translation files are not maintained.
📚 Learning: 2025-06-02T08:50:48.884Z
Learnt from: Jondyr
Repo: Altinn/altinn-studio PR: 15537
File: frontend/language/src/nb.json:1932-1932
Timestamp: 2025-06-02T08:50:48.884Z
Learning: In frontend/language/src/nb.json, the localization keys use hierarchical dot notation with multiple segments after the namespace (e.g., ux_editor.add_item.add_component, ux_editor.component_category.advanced). Keys with 2-3 segments after ux_editor are both common and accepted patterns.
Applied to files:
src/Designer/frontend/language/src/nb.json
📚 Learning: 2025-01-30T08:18:42.814Z
Learnt from: Jondyr
Repo: Altinn/altinn-studio PR: 14517
File: frontend/language/src/nb.json:1385-1385
Timestamp: 2025-01-30T08:18:42.814Z
Learning: English translations (en.json) are not currently used in the Altinn Studio project. Comments about missing English translations should be ignored.
Applied to files:
src/Designer/frontend/language/src/nb.json
📚 Learning: 2025-06-03T10:54:59.508Z
Learnt from: wrt95
Repo: Altinn/altinn-studio PR: 15542
File: frontend/app-development/features/appSettings/components/TabsContent/Tabs/AboutTab/utils/appResourceValidationUtils.ts:64-95
Timestamp: 2025-06-03T10:54:59.508Z
Learning: In the app settings validation logic for appResourceValidationUtils.ts, the Norwegian Bokmål ('nb') language uses a comprehensive error message via getMissingInputLanguageString that can describe multiple missing languages, while Norwegian Nynorsk ('nn') and English ('en') use simpler, direct translation keys for missing translations. This pattern should be preserved when refactoring validation logic.
Applied to files:
src/Designer/frontend/language/src/nb.json
📚 Learning: 2025-01-20T10:00:55.997Z
Learnt from: standeren
Repo: Altinn/altinn-studio PR: 14449
File: frontend/packages/process-editor/src/components/ConfigPanel/ConfigContent/EditTaskId/EditTaskId.tsx:47-55
Timestamp: 2025-01-20T10:00:55.997Z
Learning: The project only supports Norwegian translations in the solution. English translation files are not maintained.
Applied to files:
src/Designer/frontend/language/src/nb.json
📚 Learning: 2025-06-20T13:41:45.278Z
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 15719
File: frontend/dashboard/pages/OrgContentLibraryPage/FeedbackForm/FeedbackForm.tsx:22-39
Timestamp: 2025-06-20T13:41:45.278Z
Learning: In the Altinn Studio project, temporary feedback form components may intentionally use hardcoded text instead of internationalization when they are designed to be removed before language support is implemented.
Applied to files:
src/Designer/frontend/language/src/nb.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Testing
- GitHub Check: CodeQL
- GitHub Check: Typechecking and linting
- GitHub Check: Build environment and run e2e test
🔇 Additional comments (1)
src/Designer/frontend/language/src/nb.json (1)
1528-1528: Translation entry is well-formed and follows project conventions.The new enum translation entry correctly maps
ux_editor.component_properties.enum_dangerto"Farlig", fitting the established alphabetical ordering and naming pattern for enum severity/status values in the file. The Norwegian translation is semantically appropriate for a "danger" severity level in the alert component context.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17058 +/- ##
==========================================
- Coverage 96.19% 96.19% -0.01%
==========================================
Files 2447 2395 -52
Lines 30790 30455 -335
Branches 3544 3511 -33
==========================================
- Hits 29618 29295 -323
+ Misses 864 853 -11
+ Partials 308 307 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Translated "danger " into Norwegian = "farlig"
closes: #17057
Verification