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

Export not works in sub folder afer upgrade to laravel 9 #435

Open
techffodils opened this issue Dec 14, 2022 · 4 comments
Open

Export not works in sub folder afer upgrade to laravel 9 #435

techffodils opened this issue Dec 14, 2022 · 4 comments

Comments

@techffodils
Copy link

techffodils commented Dec 14, 2022

After upgrading to 9.0 , export all files failed to write sub folders.
Is anybody have the same issue ?
php artisan translations:export '*'

@techffodils techffodils changed the title Export not works in sub folder when updated to laravel 9 Export not works in sub folder afer upgrade to laravel 9 Dec 14, 2022
@techffodils
Copy link
Author

Solved : Comment the code $group = basename($group); in the below file

File : vendor/barryvdh/laravel-translation-manager/src/Manager.php
public function exportTranslations($group = null, $json = false)
{
//$group = basename($group);
.....
}

@techffodils
Copy link
Author

@bstrahija @djoudi @snipe @dexmans
Please check this

@techffodils techffodils reopened this Feb 15, 2023
@evenloooo
Copy link

evenloooo commented Mar 25, 2023

same problem +1

Hi @barryvdh
When we publish the lang file in subfolder: resource/lang/en/product/overview.php
the group name is: product/overview

In File : vendor/barryvdh/laravel-translation-manager/src/Manager.php

public function exportTranslations($group = null, $json = false)
{
$group = basename($group) // In this case, it returns 'overview' not 'product/overview'.

So we comment this variable for workaround solution...
Please help to fix this issue for subfolder langauge file, many thanks!

@underdpt
Copy link

underdpt commented Jun 7, 2023

I think this is a duplicate of #406. This seems to be caused by PR #417.

I would try a PR for this, but I'm not sure where to start, because it seems that exportTranslations() can receive a full path (so basename here makes sense) but it's receiving a relative path. Also we dont't have information about the secutity issue that #417 solves.

underdpt added a commit to underdpt/laravel-translation-manager that referenced this issue Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants