Code Monkey home page Code Monkey logo

Comments (7)

themsaid avatar themsaid commented on June 3, 2024

I think the sync command can include the search for keys that exist in a language bas not in another, currently the missing command does this job.

So you run langman:sync and it looks into your application files to check for keys that doesn't exist in your language files, and also look into you language files and make sure all keys that exist in a language exists in the other. What do you think?

from laravel-langman.

vpratfr avatar vpratfr commented on June 3, 2024

I think that should be independent. For example, some dynamic keys are not grabbed by the sync command (like my example with enums in another issue). So those keys are not synchronized accross languages.

Additionally, the missing command will prompt me for each message. What if I have 200 messages? I just want to create all files for that new language and send them to the translators who will use a text editor.

Better than empty strings, it would be more useful to have the default language for new keys.

from laravel-langman.

themsaid avatar themsaid commented on June 3, 2024

Actually I'm saying that I can move the functionality of syncing keys across language files to the sync command, the sync command won't prompt for translations, that way The translation files will have all the needed keys after the langman:sync command so that you don't have to run langman:missing if you don't want.

from laravel-langman.

vpratfr avatar vpratfr commented on June 3, 2024

That would be useful yes.

from laravel-langman.

vpratfr avatar vpratfr commented on June 3, 2024

That new step should include:

  • Creating missing keys in all language files
  • Make sure the vendor lang folders get synced too
  • Creating missing files (even if that file does not contain any message from the views, see example with enums)

That extra step is not connected at all to finding keys in views/app. So I guess you could take my example above as a test case.

from laravel-langman.

uyab avatar uyab commented on June 3, 2024

Any update about this?

from laravel-langman.

themsaid avatar themsaid commented on June 3, 2024

This is now implemented on the master branch, if someone can test and confirm before making a new release I'll be very grateful.

from laravel-langman.

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.