Skip to content

Conversation

@JamalAlabdullah
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah commented Nov 26, 2025

Description

Translated "danger " into Norwegian = "farlig"
closes: #17057

Screenshot 2025-11-26 at 13 56 34

Verification

  • Related issues are connected (if applicable)
  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@JamalAlabdullah JamalAlabdullah changed the title fixed translation of "danger " for varsel compoenent fix: fixed translation of "danger " for varsel compoenent Nov 26, 2025
@github-actions github-actions bot added skip-releasenotes Issues that do not make sense to list in our release notes frontend solution/studio/designer labels Nov 26, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Walkthrough

A 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

Cohort / File(s) Change Summary
Norwegian Bokmål Translation Update
src/Designer/frontend/language/src/nb.json
Added translation entry for "ux_editor.component_properties.enum_danger": "Farlig"

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Verify the translation text "Farlig" is accurate for the "Danger" UI component property
  • Confirm the translation key path follows the established naming convention

Poem

🐰 A word in Norwegian, so bold and so bright,
"Farlig" now dances where danger takes flight,
The translator's nibble, so precise and so keen,
Makes interfaces lovely in every locale's scene! ✨

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title correctly identifies the main change: adding a Norwegian translation for the 'danger' UI enum option in the nb.json file.
Description check ✅ Passed The pull request description adequately follows the template with a clear summary, related issue link, verification evidence, and all checklist items marked complete.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 17057-fix-translation-for-word-danger-in-config-panel-for-varsel-component

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1e8cf96 and a3f96cb.

📒 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_danger to "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.

@JamalAlabdullah JamalAlabdullah added squad/utforming Issues that belongs to the named squad. skip-manual-testing Deprecated: Use skip-second-approval instead. labels Nov 26, 2025
@JamalAlabdullah JamalAlabdullah moved this to 🧪 Test in Team Altinn Studio Nov 26, 2025
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.19%. Comparing base (f63ea9c) to head (a3f96cb).
⚠️ Report is 391 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend skip-manual-testing Deprecated: Use skip-second-approval instead. skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer squad/utforming Issues that belongs to the named squad.

Projects

Status: 🧪 Test

Development

Successfully merging this pull request may close these issues.

fix translation for word "danger" in config panel for Varsel component.

1 participant