Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issues #4

Closed
DanDvoracek opened this issue Oct 26, 2017 · 15 comments
Closed

Installation issues #4

DanDvoracek opened this issue Oct 26, 2017 · 15 comments
Labels

Comments

@DanDvoracek
Copy link

It seems that the documentation is a bit outdated. Am I right? Tried to follow instructions on a brand new Laravel project and there is a couple of issues. Seems to be related to the namespacing, as it keeps failing to find/compile some files. I'll try to provide more details later as I don't have time right now.

Can you confirm if the documentation is up to date though?

PS: I also have this package installed as I was hoping to make those two work hand in hand together
https://github.com/mcamara/laravel-localization#translated-routes

Not sure if that can be a reason for it to fail though, I don't think it is.

@ctf0
Copy link
Owner

ctf0 commented Oct 26, 2017

its up to date & about lara-localize am also using it & all is working good.

without info of what exactly is failing on ur end there isnt much i can do.

@DanDvoracek
Copy link
Author

Yeah I just tried to install it twice (each time by carefully removing all files etc).

It seems I have a problem with the php artisan vendor:publish --provider="ctf0\Lingo\LingoServiceProvider" command. It triggers some stuff but not all of them (routes + webpack config is missing; files get copied if I set 'providers' => [ ctf0\Lingo\LingoServiceProvider::class, ], otherwise they don't).

I managed to get to a point where the view was all broken and it was returning token not found. So there was progress. However, since I uninstalled-to-re-install the plugin, and the publish method isn't passing through properly, I'm now starting from 0 again. And stuck at the publish:vendor state.

To remove your plugin I did follow these steps (fyi):

  • Removed declaration from composer.json (in "require" section)
  • Removed Service Provider from "app/config/app.php" (reference in "providers" array)
  • Removed any Class Aliases from "app/config/app.php"
  • Ran "composer update vendor/package-name" ( Removes the package folder from "vendor" folder and rebuilds composer autoloading map ) .
  • Manually deleted the published files

@ctf0
Copy link
Owner

ctf0 commented Oct 26, 2017

as you can see we set the route/mix/env changes then use cache to remember that.

  • what version of laravel are u using ?

  • for the token not found, i missed adding that to the view, so i will update it now.

@DanDvoracek
Copy link
Author

Right I'll have a look at it again.

I'm using Laravel Framework 5.4.36.

@DanDvoracek
Copy link
Author

DanDvoracek commented Oct 26, 2017

Just gave it another try. Most of the issues aren't there anymore, however, it is still not working.

Here are a couple of screenshots to show you what happens on my end:

Let me know if you have any input about it. Cheers

Edit: it seems to be viewjs related but I don't know enough of it to debug your code I'm afraid. I'll try to have a look though.

@DanDvoracek
Copy link
Author

Could it have something to do with: warning vuemit > babel-preset-es2015@6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

Got that message when re-installing the required node_modules .

@ctf0
Copy link
Owner

ctf0 commented Oct 26, 2017

for vuemit try this ctf0/Laravel-Media-Manager#16 (comment) then see if you still have issues

@DanDvoracek
Copy link
Author

DanDvoracek commented Oct 26, 2017

Nice one 💯

The following seems to have fixed it:

$ yarn add --dev babel-preset-es2015 babel-preset-stage-2

And then adding the following to the webpack.mix.js config file:

// BABEL config
mix.webpackConfig({
  module: {
    rules: [
      {
        test: /\.jsx?$/,
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['env', 'es2015', 'stage-2']
          }
        }
      }
    ]
  }
});

However, even after clicking on scan it doesn't populate the data from my existing translation files (in resources/lang). Do I have to copy the files in another directory? This seems strange to me.

EDIT: sorry all good. The layout is a bit clanky that's all. I didn't notic the dropdown that populates a list.

@ctf0
Copy link
Owner

ctf0 commented Oct 26, 2017

under both default or vendor, you should have folders with the locale name en, fr, etc... or it won't work.

regarding the scan https://github.com/themsaid/laravel-langman#searching-view-files-for-missing-translations

@ctf0 ctf0 added the question label Oct 26, 2017
@DanDvoracek
Copy link
Author

It actually worked even without it but good to know thanks!

I think we can close this ticket now. Should help others I suppose 💯

Thanks for the great work 👍

@ctf0 ctf0 closed this as completed Oct 26, 2017
@DanDvoracek
Copy link
Author

One last thing I noticed (if I dare)..

When editing a value, and then switching to another panel with the dropdown, the cell keeps the value I just changed (the new one) in the frontend... Displaying it at the same position for each list. If I hit refresh, everything comes back to normal again. Could that be due to the stuff I just did above?

@ctf0
Copy link
Owner

ctf0 commented Oct 26, 2017

can u give me an example so i can reproduce ?

@DanDvoracek
Copy link
Author

Let's say I change the first item in the column it for the password.php file . If I then use the dropdown to edit the validation.php > it fields, I can still see the value I just entered for the password.php file in the first cell of validation.php > it . Make sense?

@ctf0
Copy link
Owner

ctf0 commented Oct 26, 2017

@DanDvoracek good catch.

@DanDvoracek
Copy link
Author

Hehe I'm sorry I don't want to make it sound bad! I love the concept behind that package and I think it's great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants