Skip to content

[🐞 BUG]: Hardcoded Spanish Strings in formatRelativeTime() #1698

@mohi-devhub

Description

@mohi-devhub

Description 📝

The formatRelativeTime() function in src/shared/utils/dateUtils.js returns hardcoded Spanish strings (e.g., “Hoy”, “Ayer”, “Hace X días”, “Hace X meses”) instead of using the project’s i18n translation system.

Because of this, any UI displaying relative time shows Spanish text to all users, regardless of their selected language. Additionally, locale defaults in the same file are inconsistent (es-ES, en-GB, en).

Link 🔗

N/A

Steps to Reproduce 🔄

  1. Open the application and switch the language to any non-Spanish locale (e.g., English).
  2. Navigate to any page displaying relative timestamps (e.g., activity logs, records, or history views).
  3. Observe the relative time labels.

Screenshots 📸

Image

Expected Behavior 🤔

  • Relative time strings should use the i18n system ($t() or equivalent).
  • Text should display according to the user’s selected locale.
  • Locale handling within dateUtils.js should be consistent.

Actual Behavior 😱

  • Relative time always appears in Spanish.
  • Strings are hardcoded and cannot be translated.
  • Locale usage is inconsistent across functions in the same file.

Environment 🌍

  • Vue component / File: src/shared/utils/dateUtils.js
  • Git branch: main
  • OS: macOS (reproducible on any OS)
  • Browser: Any (Chrome, Firefox, Safari)

Additional Information ℹ️

Nil

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions