Skip to content

Translations for Dates #1584

Closed
ceciliahollins/p5.js-web-editor
#12
@oruburos

Description

@oruburos
  • Existing feature enhancement

At this moment translations in the Client-Side for dates are not provided
The dates functionality is provided by

import differenceInMilliseconds from 'date-fns/difference_in_millisecond';
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now';

date-fns has an own way to use locales, but they need to be declared (and present) before use (no fetching based on current language)

Feature enhancement details:

  • Create a custom wordstonow function to extend current functionality for the case where the saved date is bigger than 35 seconds
  • Analyze the tradeoff of importing all the date-fns in advance for use dates in the different languages vs custom solution vs different library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: TranslationFor localization of the p5.js editor or contributor documentationFeature RequestProposal for adding a new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions