Skip to content

UI/UX: Non-localized "N/A" fallback in relative time display#1567

Open
kumburovicbranko682-boop wants to merge 1 commit into
gnmyt:developmentfrom
kumburovicbranko682-boop:contribai/fix/ui/non-localized-n-a-fallback-in-relative-t
Open

UI/UX: Non-localized "N/A" fallback in relative time display#1567
kumburovicbranko682-boop wants to merge 1 commit into
gnmyt:developmentfrom
kumburovicbranko682-boop:contribai/fix/ui/non-localized-n-a-fallback-in-relative-t

Conversation

@kumburovicbranko682-boop

Copy link
Copy Markdown

🎨 UI/UX Improvement

Problem

The generateRelativeTime function uses i18n for all time strings but returns a hardcoded English "N/A" for tests older than 24 hours. Non-English users will see an untranslated fallback string in an otherwise fully localized interface. Additionally, "N/A" is a poor UX choice — it hides information (the test exists and has a real timestamp) with no explanation, leaving users uncertain whether something broke or the data is simply old.

Severity: medium
File: client/src/pages/Home/components/LatestTest/utils.js

Solution

Replace the hardcoded fallback with a localized string that conveys useful information:

Changes

  • client/src/pages/Home/components/LatestTest/utils.js (modified)

📋 Description

Please include a summary of the changes and the related issue. Explain the problem that you are solving and provide the
necessary context.

🚀 Changes made to ...

  • 🔧 Server
  • 🖥️ Client
  • 📚 Documentation
  • 🔄 Other: ___

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have looked for similar pull requests in the repository and found none

🔗 Related Issues

Fixes #(issue)


🤖 About this PR

This pull request was generated by ContribAI, an AI agent
that helps improve open source projects. The change was:

  1. Discovered by automated code analysis
  2. Generated by AI with context-aware code generation
  3. Self-reviewed by AI quality checks

If you have questions or feedback about this PR, please comment below.
We appreciate your time reviewing this contribution!

Closes #1566

The generateRelativeTime function uses i18n for all time strings but returns a hardcoded English "N/A" for tests older than 24 hours. Non-English users will see an untranslated fallback string in an otherwise fully localized interface. Additionally, "N/A" is a poor UX choice — it hides information (the test exists and has a real timestamp) with no explanation, leaving users uncertain whether something broke or the data is simply old.


Affected files: utils.js

Signed-off-by: kumburovicbranko682-boop <[email protected]>
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.

fix: non-localized "n/a" fallback in relative time display

1 participant