martinlindhe / laravel-vue-i18n-generator

Generates a vue-i18n compatible include file from your Laravel translations
MIT License
306 stars 207 forks source link

Add published vendor translation #37

Closed roseffendi closed 6 years ago

roseffendi commented 6 years ago

This PR include published vendor translation at generation. I think it will come handy to generate the published package translation all at once.

martinlindhe commented 6 years ago

If this is useful, then sure we can merge it. But I want it behind a command line switch, and disabled by default. The reason is that scanning the vendor folder might add quite some time when running this package (if the vendor folder is big).

You can see how command line switches is currently handled in https://github.com/martinlindhe/laravel-vue-i18n-generator/blob/master/src/Commands/GenerateInclude.php

roseffendi commented 6 years ago

Yes, i can make command line switch for that. How would you like it to be formatted ?

Currently it's like this.

[en] => [
    "yes" => "Yes",
    "no" => "No"
    "vendor" => [
        "package-hint-one" => [
            "package-one-lang" => "Translation"
        ],
        "package-hint-two" => [
            "package-two-lang" => "Translation"
        ],
    ]
]
martinlindhe commented 6 years ago

The formatting looks good, thank you for your work on this!

martinlindhe commented 6 years ago

All good, thanks alot for this!