Giter VIP home page Giter VIP logo

Comments (3)

ThibaultAndreis avatar ThibaultAndreis commented on June 17, 2024

After checking a bit, I think we should disallow not setting any key / setting an empty string.
The key is used to check if we should load the translation file. It can cause existing translations to be loaded on direct access and not during client-side navigation. (I can provide an example project if necessary)

As an alternative for my use case, I think we could provide a way to disable the automatic dot notation (I can create a separate issue to discuss that).

We should, however, still provide a way to manage the same key problem exposed here.

from lib.

jarda-svoboda avatar jarda-svoboda commented on June 17, 2024

Hi @ThibaultAndreis!
Thanks for your great point for a discussion.
Iā€™m wondering if we could use config.preprocess allowing to use an object instead of string..
For example:

{
    preprocess: {
        strategy: 'full',
        identicalKeys: 'merge'
    }
}

from lib.

ThibaultAndreis avatar ThibaultAndreis commented on June 17, 2024

This seems like a logical modification to me, but it may require implementing it as a major release to respect semantic versioning and avoid disrupting other people's workflows.

We could make it this way, or just add the new code for now, without changing preprocess, limiting potential breakage to only the new code.

We can still make changes in a future release, if necessary. However, it might require more users to modify their configurations in the end.

How do you think we should pass the value of 'identicalKeys' to the serialization function?

Edit : If we include the change preventing from using empty keys, it would be a breaking change, so we can modify the config anyway I think

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.