Giter VIP home page Giter VIP logo

Comments (11)

jasonxeno avatar jasonxeno commented on July 24, 2024

It seems to be a problem with the just-i18n dependency

from reactive-table.

aslagle avatar aslagle commented on July 24, 2024

yes, that sounds like the problem. is just-i18n in your smart.lock?

from reactive-table.

 avatar commented on July 24, 2024

I am also having this issue, 'just-i18n' is in my smart.lock, I tried v0.2.3 & the latest (0.2.4) it did not change, still having same issue.

  "just-i18n": {
    "git": "https://github.com/subhog/meteor-just-i18n.git",
    "tag": "v0.2.3",
    "commit": "494c5a1efb07ccb498e9a74283817fdddcd528c4"
  },

from reactive-table.

aslagle avatar aslagle commented on July 24, 2024

I haven't been able to reproduce this, but I'll look into it if someone can point me to an example app with the same issue.

from reactive-table.

hellogerard avatar hellogerard commented on July 24, 2024

I got this error too. After some digging, I believe it's because I'm using another package (accounts-entry) that also depends on just-i18n. I'm thinking the problem is that you can only call i18n.map() once.

from reactive-table.

aslagle avatar aslagle commented on July 24, 2024

Thanks, I can reproduce it using accounts-entry. The problem is actually that accounts-entry is using a different translation package called accounts-t9n, which overwrites the i18n helper and breaks just-i18n. They say this is for backwards-compatibility with just-i18n, but it doesn't actually work since it doesn't let you use i18n.map. I'll create an issue in that package.

from reactive-table.

softwarerero avatar softwarerero commented on July 24, 2024

I confirm the issue when both packages are used together and will try to avoid this in the future. For a quick fix you can try to exclude just-i18n in smart.json and translations should work as expected.

from reactive-table.

aslagle avatar aslagle commented on July 24, 2024

I don't think excluding just-i18n would fix the problem in this case, since the translations are defined with i18n.map. Maybe accounts-t9n could set i18n.map to t9n.map, and export i18n though...

from reactive-table.

softwarerero avatar softwarerero commented on July 24, 2024

You are right, you would have to call the method 'map' on the T9n object.

Maybe accounts-t9n could set i18n.map to t9n.map, and export i18n though...
There is no control over the load order of the packages so it would only work sometimes, also I would introduce more deprecated code.

from reactive-table.

aslagle avatar aslagle commented on July 24, 2024

I don't want to add a dependency on accounts-t9n to reactive-table (unless someone can point out any advantages over just-i18n), but for anyone who wants to use both packages, a workaround is to add a translation to T9n from your app, e.g. for English:

T9n.map('en', {
  reactiveTable: {
      filter: 'Filter',
      show: 'Show',
      rowsPerPage: 'rows per page',
      page: 'Page',
      of: 'of'
  }
});

from reactive-table.

softwarerero avatar softwarerero commented on July 24, 2024

I just removed the i18n helpers from t9n so there shouldn't be any more collisions between the module. I guess you can close this issue.

from reactive-table.

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.