Comments (7)
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.
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.
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.
That would be useful yes.
from laravel-langman.
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.
Any update about this?
from laravel-langman.
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)
- ๐Calling for help HOT 4
- Langman not compitable with laravel 8, HOT 5
- php 8 support HOT 1
- How we can use it in a project multilang Ar En? HOT 1
- Lang files are not PSR-2 HOT 3
- Disable URL on production HOT 2
- langman:sync autocreate
- Create lang file dynamically
- Utf8 Character Translation Not Working
- key with ' in it, breaks it
- Ignore files
- key with '.' in it, creates nested key
- Empty array on lang file throws offset error when syncing HOT 2
- Scan Error - Cannot read property 'Login' of undefined
- Specify language for missing
- Arabic (ar) support
- Lang files in sub-directories of the app not handled (non-vendor) HOT 1
- Laravel 6 compatibility HOT 4
- Cyrillic symbols is not working in not saving,
- Please fix with php 7.4 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-langman.