Giter Club home page Giter Club logo

Comments (10)

adrai avatar adrai commented on June 2, 2024 1

should be addressed with v14.0.6

from react-i18next.

adrai avatar adrai commented on June 2, 2024 1

This test is green: https://github.com/i18next/react-i18next/blob/master/test/trans.render.spec.jsx#L880
Can you try to setup a failing test here?

from react-i18next.

stefan-schweiger avatar stefan-schweiger commented on June 2, 2024

wow, thank you for the fast response!

from react-i18next.

adrai avatar adrai commented on June 2, 2024

If you like this module don’t forget to star this repo. Make a tweet, share the word or have a look at our https://locize.com to support the devs of this project.

There are many ways to help this project πŸ™

from react-i18next.

stefan-schweiger avatar stefan-schweiger commented on June 2, 2024

I just tried to update my reproduction to 14.0.6 but I still get a different output when I use the context property of Trans :(

https://stackblitz.com/edit/vitejs-vite-9ntmun?file=package.json&terminal=dev

image

from react-i18next.

adrai avatar adrai commented on June 2, 2024

ahh I know why....

from react-i18next.

adrai avatar adrai commented on June 2, 2024

That's because of the override of the prefix and suffix here: https://github.com/i18next/react-i18next/blob/master/src/TransWithoutContext.js#L357 but I don't remember why this was done like that... maybe @jamuhl remembers why?
Beside that, I can only say that normally the context interpolation for Trans component should by done with tags and children (<1></1>) and not like with the t function with {{context}}...

from react-i18next.

adrai avatar adrai commented on June 2, 2024

fyi: I locally just removed to pass the interpolationOverride object to... and all tests are still green... so it may be we can simplify that to no have the interpolation option override? @jamuhl ?

from react-i18next.

adrai avatar adrai commented on June 2, 2024

I just released v14.0.7 that removes the internal interpolationOverride handling...
if the community opens new issues because of that, we will probably revert this change

from react-i18next.

stefan-schweiger avatar stefan-schweiger commented on June 2, 2024

Seems to work now, thanks! :)

from react-i18next.

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.