Giter VIP home page Giter VIP logo

Comments (4)

rundis avatar rundis commented on June 14, 2024 1

Thx for the quick response Jan!

There is some sorting of keys going on during sync as well, so I feel the safest bet is to avoid key names which may get duck-typed to something else during processing/transformations in locize. Haven't tried "true", "null" or "undefined", they might work fine, but I'm not overly tempted to take the chance.

"401" is arguably not necessarily a translator person friendly name anyways 😄

cheers
-magnus

from locize-cli.

jamuhl avatar jamuhl commented on June 14, 2024

from locize-cli.

peterhass avatar peterhass commented on June 14, 2024

Hey! Just had the very same issue with a very similar dictionary.

{
  "en-US": {
    "404": {
      "link": "To homepage",
      "text": "This page doesn't exist.",
      "title": "Error 404"
    },
    "500": {
      "link": "Reload page",
      "text": "There was a server error.",
      "title": "Server error"
    }
  }

I understand the reasoning you (@jamuhl) provided up there but it's kind of unexpected behavior for me. Are there actually any cases where you would want arrays in your dictionaries? Any way for me to prevent this from happening (besides not using numeric keys or adding an additional key)?

Thanks for your help! Best wishes

from locize-cli.

jamuhl avatar jamuhl commented on June 14, 2024

@peterhass the support for arrays is already existing in i18next https://www.i18next.com/translation-function/objects-and-arrays#arrays therefore we also provide support for that...

currently the only option to avoid this is indeed what you described already....but will discuss this in the team again...eventual someone comes up with a new idea to make this more "smart".

from locize-cli.

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.