filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.38k stars 2.97k forks source link

Wrong Norwegian language code (no) #14214

Open Tor2r opened 2 months ago

Tor2r commented 2 months ago

Package

filament/filament

Package Version

v3.2.111

Laravel Version

v11.22.0

Livewire Version

v3.5.6

PHP Version

PHP 8.3

Problem description

Norway have two written languages, Norsk Bokmål (nb) and Nynorsk (nn). Laravel lang have both of these which translates your Laravel application.

Since Filament uses "no" you wount benefint from these translation, like the validation messages.

When you set your language to "no" Filament is translated as expected, but the rest of your Laravel application is not, and vice versa.

Expected behavior

Setting language to "nb" would translate both Laravel application and Filament.

Steps to reproduce

Install Laravel, Livewire, Filament and Laravel lang. Sett locale to "no" or "nb" Add a user. Log in. Go to "Edit user" Fill in a short password. Validation message would be in another language than the Filament app.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/Tor2r/novsnb

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

Tor2r commented 2 months ago

I will gladly pull request a "nb" language to Filament, but I just don't know if that is the correct way to go, since there already is a "no" version.

ekandreas commented 2 months ago

Hopefully this will be fixed soon.

zepfietje commented 1 month ago

When using the no language code, which language would you expect, @Tor2r @ekandreas? Would that be Norsk Bokmål or Nynorsk, or doesn't it make sense to use no at all?

Let me know and I can point you in the right direction. I think you should be able to add the right codes in a pull request.

Tor2r commented 1 month ago

It doesn't make sense at all, since Laravel it self doesn't use "no" it uses "nb" and "nn". Many other packages uses "nb" as well.

zepfietje commented 1 month ago

Alright, let's add the correct "nb" and "nn" locales then. Should not be breaking if we keep the wrong "no" files around until v4.

Could you work on this, @Tor2r? :)

Tor2r commented 1 month ago

I'll fix it 👍