kontenta / kontour

Admin page manager for Laravel
2 stars 1 forks source link

Replace underscores in html lang attributes #196

Closed bjuppa closed 4 years ago

bjuppa commented 4 years ago

This PR makes the language code correct if the app locale has an underscore, it's replaced with a dash. See BCP47 at MDN.

Example: en_US becomes en-US in the hTML attribute.

Fixes #195

bjuppa commented 4 years ago

Hm... the builds fail on Laravel 7 & 8 only... Seems to be something with the chromedriver on Travis. I will investigate!

bjuppa commented 4 years ago

Travis output around the failing chromedriver:

0.40s$ ./vendor/bin/dusk-updater detect --auto-update
348 ----------------- ------------- 
349  Installed         Version      
350 ----------------- ------------- 
351  Chrome/Chromium   85.0.4183    
352  ChromeDriver      2.45.615279  
353 ----------------- ------------- 
354
355ChromeDriver binary successfully installed for version 85.0.4183.87.
before_script.4
3560.00s$ ./vendor/laravel/dusk/bin/chromedriver-linux &
357Starting ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}) on port 9515
358Only local connections are allowed.
359Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
before_script.5
360[1601968611.669][SEVERE]: bind() failed: Cannot assign requested address (99)
361ChromeDriver was started successfully.
3620.00s$ google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
bjuppa commented 4 years ago

I can reproduce locally too now... after updating to chromedriver 2.45.615355... which is not same as on Travis but 🤷

bjuppa commented 4 years ago

Aha, it seems orchestral/testbench-dusk has changed default port to 8001 (from 8000) in latest version: https://github.com/orchestral/testbench-dusk/releases

bjuppa commented 4 years ago

There, I've fixed the chromedriver port issue for all versions of orchestral/testbench-dusk we utilise!

erik-epineer commented 4 years ago

Great work with finding that port issue @bjuppa !