Giter VIP home page Giter VIP logo

Comments (8)

jarda-svoboda avatar jarda-svoboda commented on May 18, 2024 1

Oh, that’s weird… there are tests for it and it worked..🤔 https://github.com/sveltekit-i18n/base/blob/master/tests/specs/index.spec.ts#L138

i’ll look at it again soon..!

from lib.

dewrano avatar dewrano commented on May 18, 2024 1

@jarda-svoboda Thank you so much, I can confirm it works. :)
Hopefully we can expect #55 soon to disable the many warnings.

from lib.

jarda-svoboda avatar jarda-svoboda commented on May 18, 2024

Hi @dewrano!

Currently there is no way how to disable the sanitizer, but you have probably found a bug. This lib should work even without standard locales - in that case should only warn and use lower-cased form of the input locale.

I'll try to fix this in the next couple of days, thanks.)

from lib.

jarda-svoboda avatar jarda-svoboda commented on May 18, 2024

Ok, this does not yield any error https://github.com/sveltekit-i18n/base/blob/a5df0f1c63b23504e7dbcbe7a62461f573a78149/src/utils.ts#L32 for ku locale, so sanitized locale is undefined...
Definitely needs to be fixed.

from lib.

jarda-svoboda avatar jarda-svoboda commented on May 18, 2024

Will be included in [email protected] and @sveltekit-i18n/[email protected]

from lib.

dewrano avatar dewrano commented on May 18, 2024

@jarda-svoboda Thank you for the quick response. I've updated to 2.1.3 and now I see new warnings, but I still can't seem to get it to work. When I print out locales, it returns undefined for ku. See attached screenshot.

image

from lib.

jarda-svoboda avatar jarda-svoboda commented on May 18, 2024

It seems it already works on server side, but still does not work on client for some reason...
server:
Snímek obrazovky 2022-04-07 v 22 30 17
client:
Snímek obrazovky 2022-04-07 v 22 30 07

from lib.

jarda-svoboda avatar jarda-svoboda commented on May 18, 2024

It seems there is a difference between Node's and JS's Intl so that's probably the reason why all tests were passing for ku locale.
Anyway now it's fixed and it works on client as well in [email protected] and @sveltekit-i18n/[email protected]

from lib.

Related Issues (20)

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.