Merge pull request #15143 from snipe/fixes/no-NO-language

Switch to nb-NO from no-NO for Norwegian
This commit is contained in:
snipe 2024-07-23 18:25:27 +01:00 committed by GitHub
commit 900c19b76d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 36 additions and 6 deletions

View file

@ -14,7 +14,7 @@ APP_KEY=base64:3ilviXqB9u6DX1NRcyWGJ+sjySF+H18CPDGb3+IVwMQ=
APP_URL=http://localhost:8000
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - TZ identifier
APP_TIMEZONE='UTC'
APP_LOCALE=en
APP_LOCALE=en-US
MAX_RESULTS=500
# --------------------------------------------

View file

@ -6,7 +6,7 @@ APP_DEBUG=false
APP_KEY=base64:hTUIUh9CP6dQx+6EjSlfWTgbaMaaRvlpEwk45vp+xmk=
APP_URL=http://127.0.0.1:8000
APP_TIMEZONE='US/Eastern'
APP_LOCALE=en
APP_LOCALE=en-US
APP_LOCKED=false
MAX_RESULTS=200

View file

@ -20,7 +20,7 @@ APP_DEBUG=true
APP_KEY=base64:glJpcM7BYwWiBggp3SQ/+NlRkqsBQMaGEOjemXqJzOU=
APP_URL=http://localhost:8000
APP_TIMEZONE='UTC'
APP_LOCALE=en
APP_LOCALE=en-US
# --------------------------------------------
# REQUIRED: DATABASE SETTINGS

View file

@ -62,7 +62,7 @@ class Helper
'mn' => 'mn-MN', // Mongolian
'ms' => 'ms-MY', // Malay
'nl' => 'nl-NL', // Dutch
'no' => 'no-NO', // Norwegian
'no' => 'nb-NO', // Norwegian Bokmål
'pl' => 'pl-PL', // Polish
'pt' => 'pt-PT', // Portuguese
'ro' => 'ro-RO', // Romanian

View file

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Models\Setting;
use App\Models\User;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Setting::where('locale', 'no-NO')->update(['locale' => 'nb-NO']);
User::where('locale', 'no-NO')->update(['locale' => 'nb-NO']);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
}
};

View file

@ -40,7 +40,9 @@ return [
'ms-MY'=> 'Malay',
'mi-NZ'=> 'Maori',
'mn-MN'=> 'Mongolian',
'no-NO'=> 'Norwegian',
//'no-NO'=> 'Norwegian',
'nb-NO'=> 'Norwegian Bokmål',
//'nn-NO'=> 'Norwegian Nynorsk',
'fa-IR'=> 'Persian',
'pl-PL'=> 'Polish',
'pt-PT'=> 'Portuguese',

View file

@ -34,7 +34,7 @@ class SnipeTranslatorTest extends TestCase
{
$this->assertEquals(
'Ingen sikkerhetskopier ble gjort ennå',
trans('backup::notifications.no_backups_info',[],'no-NO'),
trans('backup::notifications.no_backups_info',[],'nb-NO'),
"Norwegian 'no backups info' message should be here"
);
}