Giter Club home page Giter Club logo

cldr-engine's Issues

CDN not available

image

Is there an alternative location available for the language files please?

Get time interval with formatDateInterval

I'm trying to get a localised time interval using cldr.Calendars.formatDateInterval. It always returns the date no matter what skeleton I pass as an option. e.g.:

cldr.Calendars.formatDateInterval(
  start,
  end,
  {
    skeleton: 'Hmm',
    ca: 'gregory',
  }
)

Returns something like this with the ja language:

1/1 18:15~12/31 18:45

I'd like to get:

18:15~18:45
// Or even better:
18時15分~18時45分

When I look inside the language pack for Japanese, I see patterns like this one:

H時mm分~H時mm分

So it looks like the information is there, but somehow not surfaced.

I'd like to either have this function to comply more closely to the skeleton or a different function called cldr.Calendars.formatTimeInterval.

CLDR: let's talk

Hi, @phensley — stumbled on this while trying to get another beta of the cldr json v38 data out.

tl;dr (yes, sounds like cldr) is, let's talk! Can you drop me an email? All my contact info is at https://github.com/srl295


Looking at:

I'm working on https://unicode-org.atlassian.net/browse/CLDR-14258 right now.

anyway, i'm working on another drop of the v38 beta CLDR JSON data on NPM. - i'll send an email to cldr-users when ready…  It's already checked in to the new monorepo on the branch https://github.com/unicode-org/cldr-json/tree/for-38-beta2

Date/Number parsing

Hi there, I was just wondering if there are any plans to add parsing to the feature stack. In some scenarios it would be nice to parse the date or number against the current user culture.

Regards
Benjamin

General.getLanguageDisplayName returns nothing for multi-subtag language tags

Hey Patrick,

I stumbled upon this small bug, just thought I would leave this for you here. Testing for v0.25.1 with an English bundle loaded, this statement returns nothing instead of "Simplified Chinese":

cldr.General.getLanguageDisplayName('zh-Hans');

It only works for plain language ids, like 'en' or 'es'. I've included a snippet from the English bundle for reference, note that in most cases, the tag in question includes a region subtag, except in the case of Chinese.

"ar-001": "Modern Standard Arabic",
"de-AT": "Austrian German",
"de-CH": "Swiss High German",
"en-AU": "Australian English",
"en-CA": "Canadian English",
"en-GB": "British English",
"en-US": "American English",
"es-419": "Latin American Spanish",
"es-ES": "European Spanish",
"es-MX": "Mexican Spanish",
"fa-AF": "Dari",
"fr-CA": "Canadian French",
"fr-CH": "Swiss French",
"nds-NL": "Low Saxon",
"nl-BE": "Flemish",
"pt-BR": "Brazilian Portuguese",
"pt-PT": "European Portuguese",
"ro-MD": "Moldavian",
"sr-ME": "Montenegrin",
"sw-CD": "Congo Swahili",
"zh-Hans": "Simplified Chinese",
"zh-Hant": "Traditional Chinese",

(Source: https://github.com/unicode-cldr/cldr-localenames-modern/blob/master/main/en/languages.json)

Example on codesandbox.io

Edit @phensley/cldr language name bug example

Possible issue location

https://github.com/phensley/cldr-engine/blob/master/packages/cldr-schema/src/code/names.ts#L6

Once again, thanks for all the hard work.

Time interval and 'begin-sentence' context

This is more a question than a bug report.
In a time interval, when I use the default 'middle-of-text' context with the fr language, this is what I get:

cldr.Calendars.formatDateInterval(
  start,
  end,
  {
    skeleton: 'yMMMEd',
    context: 'middle-of-text',
  }
)
mar. 1 janv. – mar. 31 déc. 1963

Now, with context set to 'begin-sentence', I get the following:

Mar. 1 janv. – Mar. 31 déc. 1963

I would expect 'begin-sentence' to return something like this:

Mar. 1 janv. – mar. 31 déc. 1963

With only the first part of the interval capitalised, and the second part in lower case.

Is this the intended behaviour of CLDR?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.