druc / laravel-langscanner Goto Github PK
View Code? Open in Web Editor NEWScans Laravel projects for missing translation keys and then writes them into individual json files for you to fill in.
License: MIT License
Scans Laravel projects for missing translation keys and then writes them into individual json files for you to fill in.
License: MIT License
The package doesn't generate translation files, it only outputs the missing translations in the console. I am using Laravel 9 Inertia Vue js
php artisan langscanner es
Output:
ES missing translations: +---------------------------+---------------+ | Key | Path | +---------------------------+---------------+ | Sports | Desktop.vue | | Live Bet | Desktop.vue | | Casino | Desktop.vue | | My Bets | Desktop.vue | | My Account | Desktop.vue | | Messages | Desktop.vue | | History | Desktop.vue | | Games | Desktop.vue | | Logout | Desktop.vue | | Account | Desktop.vue | | Preferences | Desktop.vue |
But no es translations are written in the es.json file.
Hi, today recognised that langscanner wont add translation keys to files if they in array maybe some idea to add this feature too ??
<div v-for="key in keys" :key="key">
{{ trans(key.name) }}
</div>
Only one of these can be installed: illuminate/contracts[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.2, v9.0.0, ..., v9.2.0], laravel/framework[v9.1.0, v9.2.0]. laravel/framework replaces illuminate/contracts and thus cannot coexist with it.
In order for the langscanner to do its job, you need to have a language.json
file with {}
as content in your lang
directory.
It would be nice to be able to specify the language in the command and have the langscanner create the language.json
file automatically.
For example:
php artisan langscanner nl
This would create nl.json
Add composer.json:
"illuminate/contracts": "^9.0|^10.0"|^11.0,
Support for laravel 11
It would be nice to be able to move all php translations inside json file so you don't have to deal with two kinds of translation methods.
$ composer require druc/laravel-langscanner
./composer.json has been updated
Running composer update druc/laravel-langscanner
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- druc/laravel-langscanner[0.0.0, ..., 0.3.0, 1.0.0] require illuminate/contracts ^8.0 -> found illuminate/contracts[v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
- druc/laravel-langscanner 1.1.0 requires illuminate/contracts ^8.0|^9.0 -> found illuminate/contracts[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.4] but these were not loaded, likely because it conflicts with another require.
- druc/laravel-langscanner[v2.0.0, ..., v2.0.1] require illuminate/contracts ^9.0 -> found illuminate/contracts[v9.0.0, ..., v9.52.4] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires druc/laravel-langscanner * -> satisfiable by druc/laravel-langscanner[0.0.0, 0.1.0, 0.2.0, 0.3.0, 1.0.0, 1.1.0, v2.0.0, v2.0.1].
You can also try re-running composer require with an explicit version constraint, e.g. "composer require druc/laravel-langscanner:*" to figure out if any version is installable, or "composer require druc/laravel-langscanner:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Thanks in advance!
For example, the follow translation keys are not found:
__( "my key" );
__(
"my key"
);
P.S. Love this package!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.