From 5341adea69da4e206b073367dcba9c4d728904f1 Mon Sep 17 00:00:00 2001 From: es-ka <32279473+es-ka@users.noreply.github.com> Date: Wed, 7 Aug 2019 21:03:51 +0200 Subject: [PATCH 01/12] Update auth.php --- resources/lang/de/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/de/auth.php b/resources/lang/de/auth.php index f625c8dcd..4118bc202 100644 --- a/resources/lang/de/auth.php +++ b/resources/lang/de/auth.php @@ -13,7 +13,7 @@ return [ | */ - 'failed' => 'Diese Anmeldeinformationen stimmen nicht mit unseren Daten überein.', + 'failed' => 'Diese Anmeldeinformationen stimmen nicht mit unseren Daten überein.', 'throttle' => 'Zu viele Login-Versuche. Versuche es in :seconds Sekunden erneut.', ]; From 762ad6aea227f4eda002ff90b22c74effd730034 Mon Sep 17 00:00:00 2001 From: es-ka <32279473+es-ka@users.noreply.github.com> Date: Wed, 7 Aug 2019 21:18:03 +0200 Subject: [PATCH 02/12] Update navmenu.php --- resources/lang/de/navmenu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/de/navmenu.php b/resources/lang/de/navmenu.php index d9bbdd4a8..61a223c85 100644 --- a/resources/lang/de/navmenu.php +++ b/resources/lang/de/navmenu.php @@ -4,7 +4,7 @@ return [ 'viewMyProfile' => 'Mein Profil anschauen', 'myTimeline' => 'Meine Timeline', - 'publicTimeline' => 'Öffentliche Timeline', + 'publicTimeline' => 'Öffentliche Timeline', 'remoteFollow' => 'Aus der Ferne folgen', 'settings' => 'Einstellungen', 'admin' => 'Administration', From 5a7176181e4e98ea26d0997400a046e4d2b680f6 Mon Sep 17 00:00:00 2001 From: es-ka <32279473+es-ka@users.noreply.github.com> Date: Wed, 7 Aug 2019 21:38:47 +0200 Subject: [PATCH 03/12] Update notification.php --- resources/lang/de/notification.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/de/notification.php b/resources/lang/de/notification.php index 823a54200..f57f22e83 100644 --- a/resources/lang/de/notification.php +++ b/resources/lang/de/notification.php @@ -2,9 +2,9 @@ return [ - 'likedPhoto' => 'gefällt dein Foto.', + 'likedPhoto' => 'gefällt dein Foto.', 'startedFollowingYou' => 'folgt dir nun.', 'commented' => 'hat deinen Post kommentiert.', - 'mentionedYou' => 'hat dich erwähnt.', + 'mentionedYou' => 'hat dich erwähnt.', ]; From ee9b9c263e065984a8d2fa3829990f2ec15a91c6 Mon Sep 17 00:00:00 2001 From: es-ka <32279473+es-ka@users.noreply.github.com> Date: Wed, 7 Aug 2019 21:39:32 +0200 Subject: [PATCH 04/12] Update pagination.php --- resources/lang/de/pagination.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/de/pagination.php b/resources/lang/de/pagination.php index 2a6af7ce4..53a445b2b 100644 --- a/resources/lang/de/pagination.php +++ b/resources/lang/de/pagination.php @@ -14,6 +14,6 @@ return [ */ 'previous' => '« Vorherige', - 'next' => 'Naumlchste »', + 'next' => 'Nächste »', ]; From c0eec28d2af42db62e0f826b86b639ae585a0558 Mon Sep 17 00:00:00 2001 From: es-ka <32279473+es-ka@users.noreply.github.com> Date: Wed, 7 Aug 2019 21:40:34 +0200 Subject: [PATCH 05/12] Update passwords.php --- resources/lang/de/passwords.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lang/de/passwords.php b/resources/lang/de/passwords.php index 4a8829a6c..b728ed830 100644 --- a/resources/lang/de/passwords.php +++ b/resources/lang/de/passwords.php @@ -13,10 +13,10 @@ return [ | */ - 'password' => 'Passwörter müssen mindestens 6 Zeichen lang sein und mit der Bestätigung übereinstimmen.', - 'reset' => 'Dein Passwort wurde zurückgesetzt!', - 'sent' => 'Wir haben dir eine E-Mail zum Zurücksetzen deines Passworts gesendet!', - 'token' => 'Dieser Passwort-Reset-Code ist ungültig.', + 'password' => 'Passwörter müssen mindestens 6 Zeichen lang sein und mit der Bestätigung übereinstimmen.', + 'reset' => 'Dein Passwort wurde zurückgesetzt!', + 'sent' => 'Wir haben dir eine E-Mail zum Zurücksetzen deines Passworts gesendet!', + 'token' => 'Dieser Passwort-Reset-Code ist ungültig.', 'user' => 'Wir konnten keinen Nutzer mit dieser E-Mail-Adresse finden.', ]; From 019feaaa1b4e85d90192d99b0e1c842837a28ecd Mon Sep 17 00:00:00 2001 From: es-ka <32279473+es-ka@users.noreply.github.com> Date: Wed, 7 Aug 2019 21:47:02 +0200 Subject: [PATCH 06/12] Update validation.php --- resources/lang/de/validation.php | 62 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/resources/lang/de/validation.php b/resources/lang/de/validation.php index 228a74be2..2236c1cce 100644 --- a/resources/lang/de/validation.php +++ b/resources/lang/de/validation.php @@ -14,7 +14,7 @@ return [ */ 'accepted' => ':attribute muss akzeptiert sein .', - 'active_url' => ':attribute ist keine gültige URL.', + 'active_url' => ':attribute ist keine gültige URL.', 'after' => ':attribute muss ein Datum nach dem :date sein.', 'after_or_equal' => ':attribute muss auf den :date oder danach fallen.', 'alpha' => ':attribute darf nur Buchstaben beinhalten.', @@ -30,64 +30,64 @@ return [ 'array' => ':attribute muss zwischen :min bis :max Objekte beinhalten.', ], 'boolean' => ':attribute muss "true" oder "false" sein.', - 'confirmed' => ':attribute-Bestätigung stimmt nicht überein.', - 'date' => ':attribute ist kein gültiges Datum.', + 'confirmed' => ':attribute-Bestätigung stimmt nicht überein.', + 'date' => ':attribute ist kein gültiges Datum.', 'date_format' => ':attribute passt nicht in das :format Format.', - 'different' => ':attribute und :other dürfen nicht gleich sein.', + 'different' => ':attribute und :other dürfen nicht gleich sein.', 'digits' => ':attribute muss genau :digits Ziffern haben.', 'digits_between' => ':attribute muss :min bis :max Ziffern haben.', - 'dimensions' => ':attribute hat ungültige Bildmaße.', + 'dimensions' => ':attribute hat ungültige Bildmaße.', 'distinct' => ':attribute-Feld hat einen doppelten Wert.', - 'email' => ':attribute muss eine gültige E-Mail-Adresse sein.', - 'exists' => 'Gewählter :attribute-Wert ist ungültig.', + 'email' => ':attribute muss eine gültige E-Mail-Adresse sein.', + 'exists' => 'Gewählter :attribute-Wert ist ungültig.', 'file' => ':attribute muss eine Datei sein.', - 'filled' => ':attribute muss ausgefüllt sein.', + 'filled' => ':attribute muss ausgefüllt sein.', 'image' => ':attribute muss ein Bild sein.', - 'in' => 'Gewählter :attribute-Wert ist ungültig.', + 'in' => 'Gewählter :attribute-Wert ist ungültig.', 'in_array' => ':attribute-Feld existiert nicht in :other.', 'integer' => ':attribute muss eine Zahl sein.', - 'ip' => ':attribute muss eine gültige IP-Adresse sein.', - 'ipv4' => ':attribute muss eine gültige IPv4-Adresse sein.', - 'ipv6' => ':attribute muss eine gültige IPv6-Adresse sein.', - 'json' => ':attribute muss eine gültige JSON-Zeichenfolge sein.', + 'ip' => ':attribute muss eine gültige IP-Adresse sein.', + 'ipv4' => ':attribute muss eine gültige IPv4-Adresse sein.', + 'ipv6' => ':attribute muss eine gültige IPv6-Adresse sein.', + 'json' => ':attribute muss eine gültige JSON-Zeichenfolge sein.', 'max' => [ - 'numeric' => ':attribute darf nicht gr&omul;ßer als :max sein.', - 'file' => ':attribute darf nicht gr&omul;ßer als :max Kilobytes sein.', + 'numeric' => ':attribute darf nicht größer als :max sein.', + 'file' => ':attribute darf nicht größer als :max Kilobytes sein.', 'string' => ':attribute darf nicht mehr als :max Zeichen haben.', 'array' => ':attribute darf nicht mehr als :max Objekte beinhalten.', ], 'mimes' => ':attribute muss eine Datei einer dieser Typen sein: :values.', 'mimetypes' => ':attribute muss eine Datei einer dieser Typen sein: :values.', 'min' => [ - 'numeric' => ':attribute muss gr&omul;ßer als oder gleich :min sein.', - 'file' => ':attribute muss mindestens :min Kilobytes groß sein.', + 'numeric' => ':attribute muss größer als oder gleich :min sein.', + 'file' => ':attribute muss mindestens :min Kilobytes groß sein.', 'string' => ':attribute muss mindestens :min Zeichen haben.', 'array' => ':attribute muss mindestens :min Objekte beinhalten.', ], - 'not_in' => 'Gewählter :attribute-Wert ist ungültig.', - 'not_regex' => ':attribute-Format ist ungültig.', + 'not_in' => 'Gewählter :attribute-Wert ist ungültig.', + 'not_regex' => ':attribute-Format ist ungültig.', 'numeric' => ':attribute muss eine Zahl sein.', 'present' => ':attribute muss vorhanden sein.', - 'regex' => ':attribute-Format ist ungültig.', - 'required' => 'Das :attribute-Feld ist benötigt.', - 'required_if' => 'Das :attribute-Feld ist benötigt wenn :other :value ist.', - 'required_unless' => 'Das :attribute-Feld ist benötigt es sei denn :other ist in :values.', - 'required_with' => 'Das :attribute-Feld ist benötigt wenn :values vorhanden ist.', - 'required_with_all' => 'Das :attribute-Feld ist benötigt wenn :values vorhanden ist.', - 'required_without' => 'Das :attribute-Feld ist benötigt wenn :values nicht vorhanden ist.', - 'required_without_all' => 'Das :attribute-Feld ist benötigt wenn keiner von :values vorhanden ist.', - 'same' => ':attribute und :other müssen gleich sein.', + 'regex' => ':attribute-Format ist ungültig.', + 'required' => 'Das :attribute-Feld ist benötigt.', + 'required_if' => 'Das :attribute-Feld ist benötigt wenn :other :value ist.', + 'required_unless' => 'Das :attribute-Feld ist benötigt es sei denn :other ist in :values.', + 'required_with' => 'Das :attribute-Feld ist benötigt wenn :values vorhanden ist.', + 'required_with_all' => 'Das :attribute-Feld ist benötigt wenn :values vorhanden ist.', + 'required_without' => 'Das :attribute-Feld ist benötigt wenn :values nicht vorhanden ist.', + 'required_without_all' => 'Das :attribute-Feld ist benötigt wenn keiner von :values vorhanden ist.', + 'same' => ':attribute und :other müssen gleich sein.', 'size' => [ 'numeric' => ':attribute muss :size sein.', - 'file' => ':attribute muss :size Kilobytes groß sein.', + 'file' => ':attribute muss :size Kilobytes groß sein.', 'string' => ':attribute muss :size Zeichen lang sein.', 'array' => ':attribute muss :size Objekte beinhalten.', ], 'string' => ':attribute muss eine Zeichenkette sein.', - 'timezone' => ':attribute muss eine g¨ltige Zeitzone sein.', + 'timezone' => ':attribute muss eine gültige Zeitzone sein.', 'unique' => ':attribute ist bereits in Verwendung.', 'uploaded' => ':attribute hochladen ist fehlgeschlagen.', - 'url' => ':attribute-Format ist ung¨lig.', + 'url' => ':attribute-Format ist ungülig.', /* |-------------------------------------------------------------------------- From 27952883b617ffbedd81a6bca3bbfa0975b5dcf7 Mon Sep 17 00:00:00 2001 From: monkeyless <52392953+monkeyless@users.noreply.github.com> Date: Fri, 9 Aug 2019 05:38:48 +0200 Subject: [PATCH 07/12] Isert cities in chunks to increase performance --- app/Console/Commands/ImportCities.php | 51 +++++++++++++-------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/app/Console/Commands/ImportCities.php b/app/Console/Commands/ImportCities.php index d61b20813..20c179c41 100644 --- a/app/Console/Commands/ImportCities.php +++ b/app/Console/Commands/ImportCities.php @@ -1,5 +1,4 @@ error('Missing storage/app/cities.json file!'); return; } - - if(Place::count() > 10) { - $this->error('Cities already imported, aborting operation...'); - return; - } + // if (Place::count() > 10) { + // $this->error('Cities already imported, aborting operation...'); + // return; + // } $this->info('Importing city data into database ...'); - $cities = file_get_contents($path); $cities = json_decode($cities); - $count = count($cities); - $this->info("Found {$count} cities to insert ..."); - $bar = $this->output->createProgressBar($count); + $cityCount = count($cities); + $this->info("Found {$cityCount} cities to insert ..."); + $bar = $this->output->createProgressBar($cityCount); $bar->start(); - + $buffer = []; + $count = 0; foreach ($cities as $city) { $country = $city->country == 'XK' ? 'Kosovo' : (new \League\ISO3166\ISO3166)->alpha2($city->country)['name']; - DB::transaction(function () use ($city, $country) { - $place = new Place(); - $place->name = $city->name; - $place->slug = Str::slug($city->name); - $place->country = $country; - $place->lat = $city->lat; - $place->long = $city->lng; - $place->save(); - }); - $bar->advance(); + $buffer[] = ["name" => $city->name, "slug" => Str::slug($city->name), "country" => $country, "lat" => $city->lat, "long" => $city->lng]; + $count++; + if ($count % $this->argument('chunk') == 0) { + $this->insertBuffer($buffer, $count); + $bar->advance(count($buffer)); + $buffer = []; + } } + $this->insertBuffer($buffer, $count); $bar->finish(); + $this->info('Successfully imported ' . $count . ' entries.'); return; } + + private function insertBuffer($buffer, $count) + { + DB::table('places')->insert($buffer); + } } From 983172bc0aaa335049880a1edf5f6177585b09c4 Mon Sep 17 00:00:00 2001 From: monkeyless <52392953+monkeyless@users.noreply.github.com> Date: Fri, 9 Aug 2019 05:39:27 +0200 Subject: [PATCH 08/12] Increase peak memory --- contrib/docker/php.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/docker/php.ini b/contrib/docker/php.ini index 7fc73c567..34afdce98 100644 --- a/contrib/docker/php.ini +++ b/contrib/docker/php.ini @@ -1,5 +1,5 @@ file_uploads = On -memory_limit = 64M +memory_limit = 128M upload_max_filesize = 64M post_max_size = 64M max_execution_time = 600 From 6d771819f471d28fec98395e462b67ba9ec61505 Mon Sep 17 00:00:00 2001 From: monkeyless <52392953+monkeyless@users.noreply.github.com> Date: Fri, 9 Aug 2019 06:01:59 +0200 Subject: [PATCH 09/12] Add checks back --- app/Console/Commands/ImportCities.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/ImportCities.php b/app/Console/Commands/ImportCities.php index 20c179c41..ea72faa65 100644 --- a/app/Console/Commands/ImportCities.php +++ b/app/Console/Commands/ImportCities.php @@ -41,10 +41,10 @@ class ImportCities extends Command $this->error('Missing storage/app/cities.json file!'); return; } - // if (Place::count() > 10) { - // $this->error('Cities already imported, aborting operation...'); - // return; - // } + if (Place::count() > 10) { + $this->error('Cities already imported, aborting operation...'); + return; + } $this->info('Importing city data into database ...'); $cities = file_get_contents($path); $cities = json_decode($cities); From 32a6100fed87df1f3e4a93bf86feca67aacf1393 Mon Sep 17 00:00:00 2001 From: monkeyless <52392953+monkeyless@users.noreply.github.com> Date: Fri, 9 Aug 2019 06:02:44 +0200 Subject: [PATCH 10/12] Add last progressbar advance --- app/Console/Commands/ImportCities.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Console/Commands/ImportCities.php b/app/Console/Commands/ImportCities.php index ea72faa65..429128698 100644 --- a/app/Console/Commands/ImportCities.php +++ b/app/Console/Commands/ImportCities.php @@ -65,6 +65,7 @@ class ImportCities extends Command } } $this->insertBuffer($buffer, $count); + $bar->advance(count($buffer)); $bar->finish(); $this->info('Successfully imported ' . $count . ' entries.'); return; From bec231fba9dc68202446ae69ee4e27e2435cdeed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= <33203663+Quenty31@users.noreply.github.com> Date: Fri, 9 Aug 2019 18:08:56 +0200 Subject: [PATCH 11/12] Update validation.php --- resources/lang/oc/validation.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lang/oc/validation.php b/resources/lang/oc/validation.php index 66ba3f37a..e182f1e42 100644 --- a/resources/lang/oc/validation.php +++ b/resources/lang/oc/validation.php @@ -51,10 +51,10 @@ return [ 'ipv6' => ':attribute deu èsser una adreça IPv6 valida.', 'json' => ':attribute deu èsser una cadena JSON valida.', 'max' => [ - 'numeric' => 'The :attribute deu pas èsser superior a :max.', - 'file' => 'The :attribute deu pas èsser superior a :max kiloctets.', - 'string' => 'The :attribute deu èsser superior a :max caractèrs.', - 'array' => 'The :attribute deu pas conténer mai de :max elements', + 'numeric' => ':attribute deu pas èsser superior a :max.', + 'file' => ':attribute deu pas èsser superior a :max kiloctets.', + 'string' => ':attribute deu èsser superior a :max caractèrs.', + 'array' => ':attribute deu pas conténer mai de :max elements.', ], 'mimes' => ':attribute deu èsser un fichièr del tipe : :values.', 'mimetypes' => ':attribute deu èsser un fichièr del tipe : :values.', From c3c3ad25918c898bd099b56b4291de767ee25d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quent=C3=AD?= <33203663+Quenty31@users.noreply.github.com> Date: Fri, 9 Aug 2019 18:11:30 +0200 Subject: [PATCH 12/12] Update passwords.php --- resources/lang/oc/passwords.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/oc/passwords.php b/resources/lang/oc/passwords.php index e1c55a566..d97bb5dce 100644 --- a/resources/lang/oc/passwords.php +++ b/resources/lang/oc/passwords.php @@ -15,7 +15,7 @@ return [ 'password' => 'Los senhals devon almens fa sièis caractèrs e correspondre a la confirmacion.', 'reset' => 'Vòstre senhal es estat reïnicializat !', - 'sent' => 'Avèm mandat vòstre ligam de reïnicializacion de senhal !', + 'sent' => 'Se vòstra adreça existís dins nòstra basa de donadas, recebretz un ligam de recuperacion de senhal a vòstra adreça electronica dins un momenton. Verificatz tanben los corrièls pas desirables.', 'token' => 'Aqueste geton de reïnicializacion es invalid.', 'user' => 'Trobam pas cap d’utilizaire amb aquesta adreça de corrièl.',