question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request - Calendar plugin texts should be part of locale

See original GitHub issue

Describe the bug Wrong/missing translation on calendar pluging to spanish language

Expected behavior Parsing a date using UTC, adjusting it using timezone and translating using locale to “es” (spanish) i was expecting to translate a same date as “hoy a las” instead to “Today at”

As workaround i used the method below:

dayjs().calendar(null, {
  sameDay: '[hoy a las] h:mm A', // The same day ( Today at 2:30 AM )
  sameElse: 'DD/MM/YYYY' // Everything else ( 7/10/2011 )
})

Information

  • Day.js Version: v1.11.3
  • OS: Debian Sid / Debian 5.18.2-1 (2022-06-06)
  • Browser: Firefox Developer Edition 102.0b7
  • Time zone: GMT-04:00

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
BePo65commented, Jun 27, 2022

I would interpret the last comment in this issue as @iamkun is not against localizing these texts (as long as the size of the bundle is not significantly increased. So perhaps it is worth a try. Perhaps I will find the time to do some experiments.

1reaction
holic-clcommented, Jun 28, 2022

Thanks for reply and suggestions @BePo65

I will try to make PR for spanish

Read more comments on GitHub >

github_iconTop Results From Across the Web

Month/Day/Year Order from Locale? | Apple Developer Forums
To start, you're assuming that month, day and year are the only values that the user must pick to specify a day but...
Read more >
Different Languages on the same website - WordPress plugin
Booking Calendar supports WPML and Polylang plugins for dynamic changing of website locale (language). General Usage: [lang=LOCALE] - start a new translation ...
Read more >
The Events Calendar – WordPress plugin
Our feature-rich plugin comes with everything you need to create and manage your calendar. ✔️ Rapidly create events ✔️ Saved venues & organizers...
Read more >
Uses of Class java.util.Locale (Java SE 19 & JDK 19)
Classes supporting the built-in JPEG plug-in. javax.imageio.spi. A package of the Java Image I/O API containing the plug-in interfaces for readers, ...
Read more >
Language Tags and Locale Identifiers for the World Wide Web
The first part, called Tags for Identifying Languages [ RFC5646 ] ... ​Specifications SHOULD require that language tags be well-formed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found