Git Product home page Git Product logo

Comments (8)

kaisermann avatar kaisermann commented on May 17, 2024 1

My bad for not making a v1 to v2 docs in the wiki! Will do soon. You can use the previous version for now. I'll probably deprecate the current v2 until I fix some bugs in the coming week 😬

from svelte-i18n.

kaisermann avatar kaisermann commented on May 17, 2024

In v2, as stated in the wiki (https://github.com/kaisermann/svelte-i18n/wiki/Formatting#format-or-_-or-t), you should pass your values to be interpolated inside a values property, instead of directly to passing them to the options object.

{$_('page_indicator', { values: { currentPage: 1, totalPages: 10 }})}

from svelte-i18n.

wootcake avatar wootcake commented on May 17, 2024

Didn't see that change, thanks for the information. Perhaps an update guide/changelog when breaking changes occur would be a good addition to the wiki.

However, when adding the values property it errors out completely right now:
TypeError: intl_messageformat__WEBPACK_IMPORTED_MODULE_3__ is not a constructor

I'l see if I can figure out what causes this..

from svelte-i18n.

kaisermann avatar kaisermann commented on May 17, 2024

Unpublished v2 and released 1.1.2. Sorry for the inconvenience!

from svelte-i18n.

wootcake avatar wootcake commented on May 17, 2024

Formatting still doesn't seem to work in the just released 1.1.2, but works in the older 1.1.2-beta

from svelte-i18n.

kaisermann avatar kaisermann commented on May 17, 2024

Ok, now THAT is strange. Both are the same code base. What error are you getting?

from svelte-i18n.

wootcake avatar wootcake commented on May 17, 2024

No errors at all, just messages not being formatted when using 1.1.2 (without specifing the values key)

from svelte-i18n.

kaisermann avatar kaisermann commented on May 17, 2024

@wootcake I just released v2.1.0 in case you want to start testing with it. I've also updated the docs and made a quick migration guide from v1 to v2: https://github.com/kaisermann/svelte-i18n/wiki/Migration

Let me know if your issue is fixed after migrating.

from svelte-i18n.

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.