Skip to content

Feat/add missing translations - #1046

Merged
scheidtdav merged 9 commits into
devfrom
feat/add-missing-translations
Aug 13, 2026
Merged

Feat/add missing translations#1046
scheidtdav merged 9 commits into
devfrom
feat/add-missing-translations

Conversation

@jona159

@jona159 jona159 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Type of Change

  • Dependency upgrade
  • Bug fix (non-breaking change)
  • Breaking change
    • e.g. a fixed bug or new feature that may break something else
  • New feature
  • Code quality improvements
    • e.g. refactoring, documentation, tests, tooling, ...

Implementation

Checklist

  • I gave this pull request a meaningful title
  • My pull request is targeting the dev branch
  • I have added documentation to my code
  • I have deleted code that I have commented out

Additional Information

  • This PR closes #

@jona159 jona159 linked an issue Aug 3, 2026 that may be closed by this pull request
3 tasks
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 65.97% 2242 / 3398
🔵 Statements 64.51% 2316 / 3590
🔵 Functions 63.21% 433 / 685
🔵 Branches 50.79% 1080 / 2126
File CoverageNo changed files found.
Generated in workflow #2866 for commit d500555 by the Vitest Coverage Report Action

@scheidtdav scheidtdav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Lets just figure out what we do with date-fns :-) I saw that even functions like formatDistanceToNow can be achieved using Intl.RelativeTimeFormat.

Comment thread app/components/device-detail/device-detail-box.tsx Outdated
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f24a5ae-0efe-4695-af55-865aabcd8643

📥 Commits

Reviewing files that changed from the base of the PR and between 975dcfd and d500555.

📒 Files selected for processing (1)
  • public/locales/de/data-table.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • public/locales/de/data-table.json

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Localized device details, logs, sharing actions, navigation, forms, and table labels in English and German.
    • Exposure values now display translated labels across device views.
    • Dates and timestamps are formatted according to the selected language.
    • Added localized feedback messages, tooltips, placeholders, accessibility text, and error notifications.
    • Added translated “Add item” controls for array fields.
    • Improved device log and sensor views with language-aware labels and date formatting.

Walkthrough

The PR adds English and German translations across device details, device logs, navigation, exposure values, and array-field controls. It also formats device and sensor timestamps with the active language.

Changes

Device interface localization

Layer / File(s) Summary
Device detail localization and date formatting
app/components/device-detail/device-detail-box.tsx, app/components/device-detail/share-link.tsx, public/locales/{en,de}/device-detail-box.json
Device metadata, sensor states, sharing controls, labels, messages, and timestamps now use translations and the active locale.
Device logs localization
app/components/device-detail/entry-logs.tsx, app/routes/device.$deviceId.edit.logs.tsx, public/locales/{en,de}/edit-device-logs.json
Log headings, timestamps, controls, table labels, action feedback, and error messages now use translations.
Device edit navigation
app/routes/device.$deviceId.edit.tsx, public/locales/{en,de}/device-overview.json
Device edit navigation labels now use translation keys.
Exposure and array controls
app/components/mydevices/dt/columns.tsx, app/components/rjsf/arrayFieldTemplate.tsx, public/locales/{en,de}/data-table.json, public/locales/{en,de}/ui-components.json
Exposure values and the array-field add action now use localized labels.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: 🟠 High · up to d5005

The current PR head still permits log mutations without visible authentication or ownership checks, which could allow unauthorized changes, and may render locale-dependent timestamps inconsistently between server and browser. These issues make the PR unsafe to merge without security review and remediation.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description contains only an unfilled template and does not explain the translation changes. Describe the localization changes, affected interfaces, and implementation details.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding missing translations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-missing-translations

Comment @coderabbitai help to get the list of available commands.

@jona159

jona159 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Looking good. Lets just figure out what we do with date-fns :-) I saw that even functions like formatDistanceToNow can be achieved using Intl.RelativeTimeFormat.

Looking good. Lets just figure out what we do with date-fns :-) I saw that even functions like formatDistanceToNow can be achieved using Intl.RelativeTimeFormat.

I am on the same page on the issue of reducing dependencies, i removed the format method from date-fns in the component and replaced it with a formatter using the code you provided above. To get rid of date-fns entirely would probably require more than some simple replacements though as we use the library in some ui components where some of its methods come in very handy i think. Should we make this a seperate issue?

@scheidtdav
scheidtdav enabled auto-merge (squash) August 13, 2026 07:57
@scheidtdav

Copy link
Copy Markdown
Member

Created a new issue, merging this one :-)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/routes/device.$deviceId.edit.logs.tsx (1)

59-89: 🔒 Security & Privacy | 🔴 Critical | 🏗️ Heavy lift

Authorize and scope every log mutation in action.

The root middleware does not require authentication, and action does not call getUserId. An unauthenticated request can create a log for any known device ID. A request with a known log entry ID can delete the entry or change its visibility because both model queries filter only by logEntry.id.

Require an authenticated user. Verify device ownership before creating a log. Scope delete and visibility updates by deviceID and the owner's user ID.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8fd17e32-87ee-472b-b978-035d193448cd

📥 Commits

Reviewing files that changed from the base of the PR and between ec7891c and 975dcfd.

📒 Files selected for processing (17)
  • app/components/device-detail/device-detail-box.tsx
  • app/components/device-detail/entry-logs.tsx
  • app/components/device-detail/share-link.tsx
  • app/components/mydevices/dt/columns.tsx
  • app/components/rjsf/arrayFieldTemplate.tsx
  • app/routes/device.$deviceId.edit.logs.tsx
  • app/routes/device.$deviceId.edit.tsx
  • public/locales/de/data-table.json
  • public/locales/de/device-detail-box.json
  • public/locales/de/device-overview.json
  • public/locales/de/edit-device-logs.json
  • public/locales/de/ui-components.json
  • public/locales/en/data-table.json
  • public/locales/en/device-detail-box.json
  • public/locales/en/device-overview.json
  • public/locales/en/edit-device-logs.json
  • public/locales/en/ui-components.json

Comment thread app/components/device-detail/device-detail-box.tsx
Comment thread app/routes/device.$deviceId.edit.logs.tsx
@scheidtdav
scheidtdav merged commit 6da7f40 into dev Aug 13, 2026
7 checks passed
@scheidtdav
scheidtdav deleted the feat/add-missing-translations branch August 13, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add missing German translations

2 participants