Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit Checker: display relative dates ("Today"/"Tomorrow") #1590

Open
AprilSylph opened this issue Aug 23, 2024 · 1 comment
Open

Limit Checker: display relative dates ("Today"/"Tomorrow") #1590

AprilSylph opened this issue Aug 23, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@AprilSylph
Copy link
Owner

Disclaimer: this is motivated by my hatred for MM/DD/YY, which is how Limit Checker displays its dates in English, which is thanks to Tumblr's English being en-US. Which makes sense, it was based out of NYC originally...


It would be nice if Limit Checker either had a more nicely formatted date display. The simplest thing I can think of is to simplify it to a (localised if possible) "Today" or "Tomorrow"; the cutoff is always in the next 24 hours, so it can't be "Yesterday" or 2+ days into the future. A fallback in case any weekly etc. limits are introduced should probably be built anyway, though.

Mockup of intended before/after using HTML editing (taken on 23rd August 2024 @ 1:37pm UTC+1):

Current Proposed
Screen Shot 2024-08-23 at 13 37 53 Screen Shot 2024-08-23 at 13 37 41
@AprilSylph AprilSylph added enhancement New feature or request help wanted Extra attention is needed labels Aug 23, 2024
@marcustyphoon
Copy link
Collaborator

marcustyphoon commented Aug 24, 2024

localised if possible

Seems semi-possible. Today definitely works, and one could text-transform: capitalize; the tomorrow string... presuming it doesn't get removed along with the Tumblr Live-related translations at some point.

Edit: Although, huh. Interesting. text-transform: capitalize; doesn't affect copy-pasting the string, so I would think that String.prototype.toLocaleCapitalized() would be preferable... except that that doesn't exist and I made it up. I guess for a single word it's probably equivalent to calling toLocaleUpperCase on the first letter and keeping the rest, but like, Intl.Segmenter exists for a reason, no? Anyway...

Output from a tool I made:

  "Today": {
    "overlapping_keys": 5,
    "identical": true,
    "Today": {
      "de_DE": ["Heute"],
      "es_ES": ["Hoy"],
      "fr_FR": ["Aujourd'hui"],
      "hi_IN": ["आज"],
      "id_ID": ["Hari ini"],
      "it_IT": ["Oggi"],
      "ja_JP": ["今日"],
      "ko_KR": ["오늘"],
      "nl_NL": ["Vandaag"],
      "pl_PL": ["Dzisiaj"],
      "pt_BR": ["Hoje"],
      "pt_PT": ["Hoje"],
      "ru_RU": ["Сегодня"],
      "tr_TR": ["Bugün"],
      "zh_CN": ["今天"],
      "zh_HK": ["今天"],
      "zh_TW": ["今天"]
    },
    "Tumblr Live\u0004Today": {
      "de_DE": ["Heute"],
      ...
  "tomorrow": {
   "Tumblr Live\u0004tomorrow": {
     "de_DE": ["Morgen"],
     "es_ES": ["mañana"],
     "fr_FR": ["demain"],
     "hi_IN": ["अगला दिन"],
     "id_ID": ["besok"],
     "it_IT": ["domani"],
     "ja_JP": ["明日"],
     "ko_KR": ["내일"],
     "nl_NL": ["morgen"],
     "pl_PL": ["jutro"],
     "pt_BR": ["amanhã"],
     "pt_PT": ["amanhã"],
     "ru_RU": ["завтра"],
     "tr_TR": ["Yarın"],
     "zh_CN": ["明天"],
     "zh_HK": ["明天"],
     "zh_TW": ["明天"]
   }
 },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants