Giter VIP home page Giter VIP logo

Comments (10)

volarname avatar volarname commented on May 12, 2024 3

anything that will provide possobility to split code and dont use translations directly in components is welcomed, at least this:
also the warning about local and global scope is very annoying

────locales
    │
    ├───en
    │   │   common.yaml
    │   │   component1.yaml
    │   │   component2.yaml
    │   
    ├───fr
    │   │   common.yaml
    │   │   component1.yaml
    │   │   component2.yaml

from bundle-tools.

Vissie2 avatar Vissie2 commented on May 12, 2024 1

Similar use-case. I'm trying to find a way to accomplish the folder structure below and use the folders as language key so messages can understand it. I thought about linking everything together in a src/i18n/index.ts but that is not supported either.

/src/i18n/
│   index.ts
│  
│
└───locales
    │
    ├───en-GB
    │   │   global.json
    │   │
    │   ├───components
    │   │       Example.json
    │   
    └───nl-NL
        │   global.json
        │
        ├───components
        │        Example.json

Then something like t('Example.key') or t('global.key') should be available.

I'm currently unable to use this plugin because this is a must the project I work in.

from bundle-tools.

markusand avatar markusand commented on May 12, 2024

This is a very needed feature if splitting code (and locales as well) into multiple modules or plugins.

from bundle-tools.

markusand avatar markusand commented on May 12, 2024

I've been digging into the code and found that the plugin is overriding resource paths, so only the last include is taken into account

resourcePaths = [...(await fg(inc))]

Use instead

resourcePaths = [...resourcePaths, ...(await fg(inc))] ;

This doesn't fix the issue as the language is overriden after this array of language definitions, but I don't understand the code so good to be able to do a pull request

codes.push(`${JSON.stringify(name)}: ${code}`)

from bundle-tools.

Frenkz avatar Frenkz commented on May 12, 2024

This is a very needed feature if splitting code (and locales as well) into multiple modules or plugins.

It would be really nice indeed to have this working.

from bundle-tools.

volarname avatar volarname commented on May 12, 2024

i need also code splitting feature, i dont want to use i18n block, and i dont want to have huge files per language
splitting and merging in folder structure is absolutely needed feature

from bundle-tools.

realityfilter avatar realityfilter commented on May 12, 2024

This is a much needed feature for us. Is there a workaround for the meantime?

from bundle-tools.

volarname avatar volarname commented on May 12, 2024

any comment from creators? any ETA on this?

from bundle-tools.

soranoc avatar soranoc commented on May 12, 2024

I would love to see some progress on this matter as well. We are currently planning the transition to unplugin-vue-i18n and this is a major blockage on our roadmap. Any update on PR #274 ?

from bundle-tools.

BobbieGoede avatar BobbieGoede commented on May 12, 2024

In what order would the locale files be merged? This matters as duplicate keys would overwrite each other, at least in the implementation of #274.

from bundle-tools.

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.