Support the ongoing development of Laravel.io →
Packages
Last updated 2 years ago.
0

I tried to install from Composer and I'm getting en error:

[RuntimeException]
Could not scan for classes inside "/Library/WebServer/Documents/project/vendor/nicolasbeauvais/lari18n/src/migrations" which does not appear to be a file nor a folder
0

kokokurak said:

I tried to install from Composer and I'm getting en error:

[RuntimeException]
Could not scan for classes inside "/Library/WebServer/Documents/project/vendor/nicolasbeauvais/lari18n/src/migrations" which does not appear to be a file nor a folder

Fixed ! Thank you for being the first to have tried the package.

0

I will test it with pleasure :)

I made it through installation and configuration. Now I'm getting this:

Argument 1 passed to Nicolasbeauvais\Lari18n\Lari18n::injectToolbar() must be an instance of Illuminate\Http\Response, instance of Illuminate\Http\RedirectResponse given, called in /Library/WebServer/Documents/project/vendor/nicolasbeauvais/lari18n/src/Nicolasbeauvais/Lari18n/Lari18n.php on line 181 and defined
0

kokokurak said:

I will test it with pleasure :)

I made it through installation and configuration. Now I'm getting this:

Argument 1 passed to Nicolasbeauvais\Lari18n\Lari18n::injectToolbar() must be an instance of Illuminate\Http\Response, instance of Illuminate\Http\RedirectResponse given, called in /Library/WebServer/Documents/project/vendor/nicolasbeauvais/lari18n/src/Nicolasbeauvais/Lari18n/Lari18n.php on line 181 and defined

Fixed ! This is exactly the kind of bug that I had forgotten to predict ;)

0

Yeah, this is why testing on live examples is so important :) I will test it further and let you know.

0

Do you mind if I focus on bugs first? I will highlight good parts soon, but first I need to deal with errors :) So I found two now:

  1. On one page I have the top bar unstyled.
  2. I have a message as follows: You are translating from the fallback locale [En] to the [Pl] languages, and completed 115% of this locale translations

115%?

Plus, why is it translating from En to Pl? I have Pl language set and it's available I believe.

0
  1. It's hard for me to debug html/css bug without sources :(

  2. Lari18n use the fallback_locale as the reference language, in your case english, and activate the translation to the local language, in your case polish.

array(
        'locale' => 'pl',
	'fallback_locale' => 'en'
);

The 115% is probably because you have more pl translation than english translation ?

I made all my test with a complete fallback_local and created all other translation from scratch, using the package with already existing translation isn't fully tested so you help me a lot and I will look into that tomorow

Last updated 9 years ago.
0

Nicolas, I clicked on Activate button and then on some text, nice blocks with textarea appeared. I am unable to save translation though. There's Ajax error on http://project.dev/lari18n/translate:

{  
   "error":{  
      "type":"Illuminate\\Session\\TokenMismatchException",
      "message":"",
      "file":"\/Library\/WebServer\/Documents\/project\/app\/filters.php",
      "line":140
   }
}

Token mismatch. I think this is because I filter all POST requests with CSRF.

Last updated 9 years ago.
0

It's probably because of that,

I will add the CSRF token by default on the next update :)

0

Nice. On this CSS thing, the problem is:

Failed to load resource: the server responded with a status of 404 (Not Found): http://project.dev/page/packages/nicolasbeauvais/lari18n/css/lari18n.css

This problem occurs on pages that have more than one "chunk" in URL, for example /one/two. It looks like it creates the package path from one level higher instead of from the root.

Last updated 9 years ago.
0

I have created issues for each bugs you have reported, I will fix them tomorrow morning :)

https://github.com/nicolasbeauvais/lari18n/issues/

Last updated 9 years ago.
0

I fixed all the bugs you had reported, plus updated the readme.md file to make it more clear on how lari18n choose the languages to translate.

0

Nicolas, the CSS file is still missing on those /one/two URLs.

0

You probably need to republish the assets as the css is loaded from lari18n.js

0

Yes, it helped :) I will test it more when I'm back home.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.