Git Product home page Git Product logo

laravel-translation-manager's Introduction

Laravel Translation Manager

Tests Packagist License Latest Stable Version Total Downloads Fruitcake

This is a package to manage Laravel translation files. It does not replace the Translation system, only import/export the php files to a database and make them editable through a webinterface. The workflow would be:

- Import translations: Read all translation files and save them in the database
- Find all translations in php/twig sources
- Optionally: Listen to missing translation with the custom Translator
- Translate all keys through the webinterface
- Export: Write all translations back to the translation files.

This way, translations can be saved in git history and no overhead is introduced in production.

Screenshot

Installation

Require this package in your composer.json and run composer update (or run composer require barryvdh/laravel-translation-manager directly):

composer require barryvdh/laravel-translation-manager

You need to run the migrations for this package.

php artisan vendor:publish --provider="Barryvdh\TranslationManager\ManagerServiceProvider" --tag=migrations
php artisan migrate

You need to publish the config file for this package. This will add the file config/translation-manager.php, where you can configure this package.

php artisan vendor:publish --provider="Barryvdh\TranslationManager\ManagerServiceProvider" --tag=config

In order to edit the default template, the views must be published as well. The views will then be placed in resources/views/vendor/translation-manager.

php artisan vendor:publish --provider="Barryvdh\TranslationManager\ManagerServiceProvider" --tag=views

Routes are added in the ServiceProvider. You can set the group parameters for the routes in the configuration. You can change the prefix or filter/middleware for the routes. If you want full customisation, you can extend the ServiceProvider and override the map() function.

This example will make the translation manager available at http://yourdomain.com/translations

If you would like to use auto translation using Google Translate API, install https://github.com/tanmuhittin/laravel-google-translate

composer require tanmuhittin/laravel-google-translate
php artisan vendor:publish --provider=Tanmuhittin\LaravelGoogleTranslate\LaravelGoogleTranslateServiceProvider

Middleware / Auth

The configuration file by default only includes the auth middleware, but the latests changes in Laravel 5.2 makes it that session variables are only accessible when your route includes the web middleware. In order to make this package work on Laravel 5.2, you will have to change the route/middleware setting from the default

    'route' => [
        'prefix' => 'translations',
        'middleware' => 'auth',
    ],

to

    'route' => [
        'prefix' => 'translations',
        'middleware' => [
	        'web',
	        'auth',
		],
    ],

NOTE: This is only needed in Laravel 5.2 (and up!)

Usage

Web interface

When you have imported your translation (via buttons or command), you can view them in the webinterface (on the url you defined with the controller). You can click on a translation and an edit field will popup. Just click save and it is saved :) When a translation is not yet created in a different locale, you can also just edit it to create it.

Using the buttons on the webinterface, you can import/export the translations. For publishing translations, make sure your application can write to the language directory.

You can also use the commands below.

Import command

The import command will search through app/lang and load all strings in the database, so you can easily manage them.

php artisan translations:import

Translation strings from app/lang/locale.json files will be imported to the _json group.

Note: By default, only new strings are added. Translations already in the DB are kept the same. If you want to replace all values with the ones from the files, add the --replace (or -R) option: php artisan translations:import --replace

Find translations in source

The Find command/button will look search for all php/twig files in the app directory, to see if they contain translation functions, and will try to extract the group/item names. The found keys will be added to the database, so they can be easily translated. This can be done through the webinterface, or via an Artisan command.

php artisan translations:find

If your project uses translation strings as keys, these will be stored into then _json group.

Export command

The export command will write the contents of the database back to app/lang php files. This will overwrite existing translations and remove all comments, so make sure to backup your data before using. Supply the group name to define which groups you want to publish.

php artisan translations:export <group>

For example, php artisan translations:export reminders when you have 2 locales (en/nl), will write to app/lang/en/reminders.php and app/lang/nl/reminders.php

To export translation strings as keys to JSON files , use the --json (or -J) option: php artisan translations:export --json. This will import every entries from the _json group.

Clean command

The clean command will search for all translation that are NULL and delete them, so your interface is a bit cleaner. Note: empty translations are never exported.

php artisan translations:clean

Reset command

The reset command simply clears all translation in the database, so you can start fresh (by a new import). Make sure to export your work if needed before doing this.

php artisan translations:reset

Detect missing translations

Most translations can be found by using the Find command (see above), but in case you have dynamic keys (variables/automatic forms etc), it can be helpful to 'listen' to the missing translations. To detect missing translations, we can swap the Laravel TranslationServiceProvider with a custom provider. In your config/app.php, comment out the original TranslationServiceProvider and add the one from this package:

//'Illuminate\Translation\TranslationServiceProvider',
'Barryvdh\TranslationManager\TranslationServiceProvider',

This will extend the Translator and will create a new database entry, whenever a key is not found, so you have to visit the pages that use them. This way it shows up in the webinterface and can be edited and later exported. You shouldn't use this in production, just in development to translate your views, then just switch back.

TODO

This package is still very alpha. Few things that are on the todo-list:

- Add locales/groups via webinterface
- Improve webinterface (more selection/filtering, behavior of popup after save etc)
- Seed existing languages (https://github.com/caouecs/Laravel-lang)
- Suggestions are welcome :)

laravel-translation-manager's People

Contributors

airtwister avatar al0mie avatar altelma avatar anorgan avatar barryvdh avatar cossou avatar derekmd avatar dexmans avatar duckthom avatar ecointest avatar gazben avatar honjoya avatar irazasyed avatar kg-bot avatar nowi5 avatar okaufmann avatar omranic avatar pcoetzeedev avatar renato-cardoso avatar roguesheep-nl avatar royduin avatar sangnguyenplus avatar simeriaionut avatar snipe avatar subodhdahal avatar tanmuhittin avatar ttomdewit avatar unrulynatives avatar uusa35 avatar voicecode-bv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-translation-manager's Issues

Publishing views

Hi,
is there a way to publish the views to my laravel folder?
I'm using laravel 4.2 and so the branch 0.1
I would like to make a few changes to the views, but i'm worried that if I make it in the vendor folder, one day I would do a composer update and they would be overriden.
How can I make shure that wouldn't happen?

Delete not working: wrong check in controller

Hi,

The check in the function postDelete in controller.php line 95 should be:

if(!in_array($group, $this->manager->getConfig('exclude_groups')) && $this->manager->getConfig('delete_enabled')) {

instead of

if(!in_array($group, $this->manager->getConfig('exclude_groups')) && !$this->manager->getConfig('delete_enabled')) {

Notice the ! before $this->manager->getConfig('delete_enabled') that shouldn't be there.

Problem with laravel 5.0.x

Hi you just pushed a new opdate to 0.2.0 requiring laravel 5.1 The problem is we cannot use 5.1 due to the php requirement and our lack of control over that in our servers.

And all you version use either 4.2 or 5.1. Any way we can have a version using 5.0?

[0.2] the laravel5.0 lang path changed

the lang path has been moved to /resources/lang
but the

D:/mysite/test/laravel5/vendor/barryvdh/laravel-translation-manager/src/Manager.php:140

$path = $this->app->make('path').'/lang/'.$locale.'/'.$group.'.php';

still use the L4's path.

maybe same problem of find command

Require failed Laravel 5

My composer.json has this:

"require": {
        "laravel/framework": "~5.0",

Error when performing composer update:

Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Conclusion: remove laravel/framework 5.0.x-dev

 - Installation request for laravel/framework ~5.0 -> satisfiable by laravel/framework[5.0.x-dev].
 - Installation request for barryvdh/laravel-translation-manager 0.1.x -> satisfiable by barryvdh/laravel-translation-manager[v0.1.0, v0.1.1].

array not parsed correctly '['

an array defined like
return [
'newsletter' => 'Newsletter',
'subscribe' => 'Sign up to receive updates and news.',
'email.placeholder' => 'Enter Email Address',
'newsletter.submit' => 'Subscribe'
];
will be parsed as:
return array (
'newsletter' =>
array (
'submit' => 'Subscribe',
),
'subscribe' => 'Sign up to receive updates and news.',
'email' =>
array (
'placeholder' => 'Enter Email Address',
),
);

New translations (the bols ones) do not update

For some strange reason the "new" translations, the ones in bold, change on the browser when updated, but the change is not persisted on the database or the files when published.

When the page reloads, the value of those translations is the original one.

Thanks, the package is awesome.

Ambiguous class resolution

Warning: Ambiguous class resolution, "CreateTranslationsTable" was found in both "$baseDir . '/database/migrations/2014_04_02_193005_create_translations_table.php" and "/vagrant/spike/releases/devel/vendor/barryvdh/laravel-translation-manager/database/migrations/2014_04_02_193005_create_translations_table.php", the first will be used.

Issues with 5.0.33 - Will not install.

Looks like it should be 5.0.33 compatible. Not sure why it won't install.

Problem 1
- Installation request for barryvdh/laravel-translation-manager ^0.2.0 -> satisfiable by barryvdh/laravel-translation-manager[v0.2.0].
- Conclusion: remove laravel/framework v5.0.33
- Conclusion: don't install laravel/framework v5.0.33
- barryvdh/laravel-translation-manager v0.2.0 requires illuminate/translation 5.1.x -> satisfiable by illuminate/translation[v5.1.1, v5.1.2].
- don't install illuminate/translation v5.1.1|don't install laravel/framework v5.0.33
- don't install illuminate/translation v5.1.2|don't install laravel/framework v5.0.33
- Installation request for laravel/framework == 5.0.33.0 -> satisfiable by laravel/framework[v5.0.33].

Nothing to publish

Fresh laravel 5.1.24 install, i add the "barryvdh/laravel-translation-manager": "0.2.1" to my composer.json and perform composer update, so far so good.

Next i add the package to my app.php providers and run: php artisan vendor:publish --provider="Barryvdh\TranslationManager\ManagerServiceProvider" --tag=migrations

It keeps returning: Nothing to publish for tag [migration].

I also tried version 0.2.0, gives the exact same message.

Accessing web interface with ACL

Hello,

I am using zizaco/entrust to manager my ACL and I like to give access to the web interface only for determinated roles(admins or/and super-admins). Where can I validate my ACL role?

Cannot delete key

When I click the trash bin - its removed from the view.. but when I refresh the page the key line is still there.

Latest commit broke the manager

There is an sql exception if in the config file you leave the excluded groups array empty.

Basically it calls the whereNotIn() method with empty array.

The fix is to check if the array is empty before applying the filter. If i have time I'll make a pull request.

Composer can't find the package

Composer returns the following error:

The requested package barryvdh/laravel-translation-manager could not be found in any version, there may be a typo in the package name.

my minimum stability is set to stable (default).

Twig search doesn't work

I use "rcrowe/twigbridge": "0.6.0-beta3", and "barryvdh/laravel-translation-manager": "v0.1.1".
Search doesn't work:

vagrant@vagrant:/vagrant$ php artisan translations:find
Done importing, processed 0 items!

If it matters, files have .twig extension, translations in views are set via {{ trans('key') }}, app/views structure is following (maybe search nesting is limited?):

app/views/
├── emails
│   └── auth
└── themes
    └── theme_name
        ├── layouts
        ├── partials
        │   └── widgets
        └── views
            ├── resource1
            └── resource2

Warning Ambiguous class resolution, "CreateTranslationsTable" was found in both...

composer dump-autoload is giving me this error

Warning: Ambiguous class resolution, "CreateTranslationsTable" was found in both...

referencing both migration files (the one in my migrations folder plus the one in the vendor folder). I'm not up on composer enough to figure out how to ignore this via the composer.json file (if indeed I can); I'm sure it's not a dealbreaker but it would be nice to not have the warning every time dump-autoload is run.

Invalid argument supplied for foreach()

After updating composer i noticed this error in te firebug console upon pressng the "import groups" button. I don;t know if this issue existed before the update, or wether something else on my side is wrong.

ErrorException in Arr.php line 70: Invalid argument supplied for foreach()

in Arr.php line 70
at HandleExceptions->handleError('2', 'Invalid argument supplied for foreach()', 'C:\wamp\www\test\vendor\laravel\framework\src\Illuminate\Support\Arr.php', '70', array('array' => '1', 'prepend' => '', 'results' => array())) in Arr.php line 70
at Arr::dot('1', '') in helpers.php line 90
at array_dot('1') in Manager.php line 55
at Manager->importTranslations('0') in Controller.php line 107
at Controller->postImport()
at call_user_func_array(array(object(Controller), 'postImport'), array()) in Controller.php line 246
at Controller->callAction('postImport', array()) in ControllerDispatcher.php line 162
at ControllerDispatcher->call(object(Controller), object(Route), 'postImport') in ControllerDispatcher.php line 107
at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 108
at ControllerDispatcher->callWithinStack(object(Controller), object(Route), object(Request), 'postImport') in ControllerDispatcher.php line 67
at ControllerDispatcher->dispatch(object(Route), object(Request), 'Barryvdh\TranslationManager\Controller', 'postImport') in Route.php line 198
at Route->runWithCustomDispatcher(object(Request)) in Route.php line 131
at Route->run(object(Request)) in Router.php line 692
at Router->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AuthenticateAdmin.php line 47
at AuthenticateAdmin->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Router.php line 694
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 661
at Router->dispatchToRoute(object(Request)) in Router.php line 619
at Router->dispatch(object(Request)) in Kernel.php line 214
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 141
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in VerifyCsrfToken.php line 43
at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 17
at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in ShareErrorsFromSession.php line 55
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in StartSession.php line 61
at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 36
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in EncryptCookies.php line 40
at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in CheckForMaintenanceMode.php line 42
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Language.php line 46
at Language->handle(object(Request), object(Closure)) in Pipeline.php line 125
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101
at Pipeline->then(object(Closure)) in Kernel.php line 115
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 84
at Kernel->handle(object(Request)) in index.php line 53

Config publish not working

Hi,

I'm following your "getting started" readme.

and:

$ php artisan config:publish barryvdh/laravel-translation-manager

Is not working, error:

 [InvalidArgumentException]  
  Configuration not found.

MySQL reserved keywords

I get this:

The column name 'group' is a MySQL reserved keyword.
The column name 'key' is a MySQL reserved keyword.

Maybe the column names should be changed?

A search function would be nice

Sometimes I am in in doubt if I have already used a key or translation text and therefor it would nice to be able to search after them

Not all the languages appear...

Hello,

First of all, congratulations for this package, it's a great help, and i do hope it improves over time.

One issue that i got from the start is that i installed several languages and i can just see some of them. I have like 40 languages and only 14 appear. Need a fix here :)

Thanks

Delete deprecated keys

Firs of all. Thank you for this useful plugin.

It's possible to delete the deprecated keys? In other words, I delete some text from the code, but the keys are kept in lang files. Can I clean lang files for deprecated keys?

If changed the key value before translated, not updated in database

Sorry, my English is not too good.

So, if I changed the key value before translated, not updated in database value. I think this is the problem:

if($replace || !$translation->value){
    $translation->value = $value;
}

Instead:

if($replace || !$translation->value || $newStatus === Translation::STATUS_CHANGED){
    $translation->value = $value;
}

Because, if "status" in database equal 1, then not changed value in database.

Versioning idea

Just dropping an idea here - would be good to have a versioning handling for all translations - so if there is a new amendment on one language - to switch to that version view - so the rest of translators to check what's new and what they need to translate for this version.

Delete cancel

When I click the trash icon to delete a translation row in the web interface I get prompted to be sure that I want to delete this item. But when I click cancel the row is delete anyway from the web interface and database. So I have to import all groups again.

When I find the time I will check if I can make a PR. If not you now that there is a small issue.

Thanks for the great packages!

A function to find translation keys in a project

Hi Barry,

I was thinking about a new approach to translations in a project.
I find myself writting trans('...') in the view and then have to open the translation file for each language and add the key by hand... It's boring and error proof! 😄

This is just a raw example:

<?php

$directory = new RecursiveDirectoryIterator('./app');
$iterator = new RecursiveIteratorIterator($directory);
$phpFiles = new RegexIterator($iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH);

$transKeys = array();

$phpFilesCount = 0;

foreach ($phpFiles as $file) {
    $phpFilesCount++;
    $inputFile = file_get_contents($file[0]) or die("Could not access file");

    $findTranslation = "trans\(\'([a-zA-Z0-9_]+([-.][a-zA-Z0-9_]+))\'\)";

    if(preg_match_all("/$findTranslation/siU", $inputFile, $matches)) { 
        foreach ($matches[1] as $key) {
            $transKeys[] = $key;
        }
    } 
}

echo "Files scaned: " . $phpFilesCount    . PHP_EOL;
echo "Keys founded: " . count($transKeys) . PHP_EOL;
echo "Keys: " . PHP_EOL;
print_r($transKeys);

Save it to test.php and run it from you project root:
$ php test.php

It's MEGA fast.
$ time php test.php

Files scaned: 392
Keys founded: 1900
Keys:
...
php test.php  0,20s user 0,05s system 94% cpu 0,266 total

What do you think?

thanks

Undefined index: exclude_groups

I am getting this error after instalation:

ErrorException (E_NOTICE)

Undefined index: exclude_groups
Open: /var/www/html/roadyo_test/vendor/barryvdh/laravel-translation-manager/src/Barryvdh/TranslationManager/Manager.php

public function getConfig($key = null)
{
    if($key == null) {
        return $this->config;
    }
    else {
        return $this->config[$key];
    }
}

Feature request: declaring DB connection in config file

I have several small sites, which apart from their own database have access to another DB, shared by all of the sites.
My idea was to generate shared translation resource. So that if I declare translation buttons.login, it would affect translations in all sites without the need to copy lang files.
I consider to be less troublesome to publish translations separately in all the sites.

For that purpose I want to have the ltm_translations table located in a secondary DB, declared as a connection shared in config/database.php beside the mysql.

Can you make that possible?

Improvement

  • Add Language package trough webinterface
  • Change language string while on the website (you can check Drupal 7, string translation module, then you know what i mean)
  • Create translation groups in the interface instead of the lang folder

Search unused, filter

Hey, I like your manager idea. Great job!
1.It would be a great feature to search views for unused keys.
2.It would be nice to filter empty keys.
3.Visible languages. For example I want to see only 2 languages from 4
4.Change key name
5.Country flags would be nice, but not that necessary.
6.Add language
7.Nicer, more compact view like this for ruby on rails https://www.localeapp.com/
8.Add group

Export functionality not working

Great idea. This exactly what I'd been looking for. However, I have a problem.
I'm using laravel 4.2 and version 0.1.x of Translation Manaher. The Export functionality is not working for me neither through the browser button nor from the console using artisan. I have even sudo to ran the command. Still nothing.
Any suggestions?
Thanks in advance

Subgroups

THis should also allow for deeper levels in groupnames. Like app/lang/en/admin/core/messages.php -> group admin.core.messages, both in importing, exporting and searching.

Version issue

Hi Barry

When I try to install the package with "barryvdh/laravel-translation-manager: 0.2.x" I get the message:

Problem 1
    - The requested package barryvdh/laravel-translation-manager could not be found in any version, there may be a typo in the package name.`

If I use "barryvdh/laravel-translation-manager: dev-master" It's work fine.

Not really an issue, I am just making you know

[0.2] Laravel 5 support

I think I've got a basic version working for now

Tasks:

  • New way of registering config/views
  • Update app paths
  • Add CSRF protection
  • Change route registering
  • PSR-4
  • Remove deprecated options (Form)
  • ..?

Method make does not exist

In your Controller.php you have a \View::make command which doesn't seem to work with my L5 site. Any ideas why? When I changed it to just:

view('translation-manager::index')

it worked.

Btw I installed "barryvdh/laravel-translation-manager": "0.2.*-dev"

Troubles with php artisan:refresh

Hello,
All times I am try to run php artisan:refresh I got this error

PHP Fatal error:  Class 'CreateLtmTranslationsTable' not found in /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php on line 328
PHP Stack trace:
PHP   1. {main}() /home/vagrant/Code/tripradar/artisan:0
PHP   2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/Code/tripradar/artisan:36
PHP   3. Symfony\Component\Console\Application->run() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:94
PHP   4. Symfony\Component\Console\Application->doRun() /home/vagrant/Code/tripradar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP   5. Symfony\Component\Console\Application->doRunCommand() /home/vagrant/Code/tripradar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP   6. Illuminate\Console\Command->run() /home/vagrant/Code/tripradar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP   7. Symfony\Component\Console\Command\Command->run() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Console/Command.php:101
PHP   8. Illuminate\Console\Command->execute() /home/vagrant/Code/tripradar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP   9. Illuminate\Container\Container->call() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Console/Command.php:115
PHP  10. call_user_func_array:{/home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Container/Container.php:526}() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Container/Container.php:526
PHP  11. Illuminate\Database\Console\Migrations\RefreshCommand->fire() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Container/Container.php:526
PHP  12. Illuminate\Console\Command->call() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/RefreshCommand.php:40
PHP  13. Illuminate\Console\Command->run() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Console/Command.php:131
PHP  14. Symfony\Component\Console\Command\Command->run() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Console/Command.php:101
PHP  15. Illuminate\Console\Command->execute() /home/vagrant/Code/tripradar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP  16. Illuminate\Container\Container->call() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Console/Command.php:115
PHP  17. call_user_func_array:{/home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Container/Container.php:526}() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Container/Container.php:526
PHP  18. Illuminate\Database\Console\Migrations\ResetCommand->fire() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Container/Container.php:526
PHP  19. Illuminate\Database\Migrations\Migrator->reset() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/ResetCommand.php:66
PHP  20. Illuminate\Database\Migrations\Migrator->runDown() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:199
PHP  21. Illuminate\Database\Migrations\Migrator->resolve() /home/vagrant/Code/tripradar/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:219

I have tryed clear cache; compser dumpautoload and many others commands but I have no success.
If I run php artisan migrate It works normally
Can anyone help me?

Add fallback fparameter to language get function

Laravel Translation Manager isn't working with the latest version of illuminate/translation since this commit: illuminate/translation@59fe9de

My solution is to change rows 11-22 in Translator.php to

    /**
     * Get the translation for the given key.
     *
     * @param  string  $key
     * @param  array   $replace
     * @param  string  $locale
     * @param  bool    $fallback
     * @return string
     */
    public function get($key, array $replace = array(), $locale = null, $fallback = true)
    {
        $result = parent::get($key, $replace, $locale, $fallback);

Linking to a key

I would like to be able to link to a key in the interface.

My first idea was in the table, to add an id of the key to the row. I was gonna implement this and send a pull request, but wanted to hear if you had a better idea and you are okay with it.

feature request - button PUBLISH ALL GROUPS NOW

I will soon ask several people to work on translations - 5 languages with several files each (routes, messages, etc.).

They are sure to forget to 'publish' from time to time, and I have no way to determine if they did so.
Based on trust in the quality of the translation I want to be able to PUBLISH ALL GROUPS NOW.

Can you make such a button, please?

how to import subfolder files

//Imported
button.php
general.php
messages.php
pagination.php
reminders.php
site.php
table.php
validation.php

// Not Imported
admin\html.php
admin\menu.php
admin\blogs\messages.php
admin\blogs\table.php
admin\blogs\title.php
admin\comments\messages.php
admin\comments\table.php
admin\comments\title.php
admin\companies\messages.php
admin\companies\table.php
admin\companies\title.php
admin\roles\messages.php
admin\roles\table.php
admin\roles\title.php
admin\users\messages.php
admin\users\table.php
admin\users\title.php
user\user.php

This problem only to me ?
Laravel 4.2

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.