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

FileUpload Locale it does not work correctly #1985

Closed
themahdavi opened this issue Mar 23, 2022 · 5 comments
Closed

FileUpload Locale it does not work correctly #1985

themahdavi opened this issue Mar 23, 2022 · 5 comments
Labels
bug Something isn't working unconfirmed

Comments

@themahdavi
Copy link
Contributor

Package

filament/forms

Package Version

2.10

Laravel Version

9.2

Livewire Version

2.6

PHP Version

8.0.3

Bug description

When change Laravel locale the Filament all packages set to new locale, design and more thing change dynamically.
but in FileUpload form component when change the locale of Laravel project this component try to set correct locale of Filepond package and search https://cdn.skypack.dev/filepond/locale/ CDN to get locale translation and not find some languages because locale filename of all locale not same as (en-en)

from this page https://github.com/pqina/filepond/tree/master/locale
for example : da-dk.js , fa_ir.js, no-nb.js

and shown error in console get request for locale js file not respond!

for solution : define option to FileUpload component can handle filename of locale of Filepond package 🤙
anyone have best solution ?

Steps to reproduce

No response

Relevant log output

No response

@themahdavi themahdavi added bug Something isn't working unconfirmed labels Mar 23, 2022
@themahdavi
Copy link
Contributor Author

@Zagna
Copy link
Contributor

Zagna commented Mar 26, 2022

My mistake about Skypack was because I was looking for fi-fi which is only in github master because latest release is older than it being added.

@themahdavi
Copy link
Contributor Author

CDN link not problem

filename cause problem

in this link logic of send filename to CDN not completely load every links

because for example code generate fa-fa.js but in filepond fa_ir.js is correct

@Zagna
Copy link
Contributor

Zagna commented Mar 26, 2022

Simple switch which checks for both 'fa' and 'fa-ir' and sets $locale to 'fa_ir'?
Same for norwegian and swedish.
And the $locale concat as default?

@themahdavi
Copy link
Contributor Author

yes switch need fix for support all locale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

No branches or pull requests

3 participants