Merge pull request #1585 from pixelfed/frontend-ui-refactor

Frontend ui refactor
This commit is contained in:
daniel 2019-08-09 20:47:21 -06:00 committed by GitHub
commit ca19314baf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 69 additions and 69 deletions

View file

@ -1,5 +1,4 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
@ -14,15 +13,13 @@ class ImportCities extends Command
*
* @var string
*/
protected $signature = 'import:cities';
protected $signature = 'import:cities {chunk=1000}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Import Cities to database';
/**
* Create a new command instance.
*
@ -32,7 +29,6 @@ class ImportCities extends Command
{
parent::__construct();
}
/**
* Execute the console command.
*
@ -41,38 +37,42 @@ class ImportCities extends Command
public function handle()
{
$path = storage_path('app/cities.json');
if(!is_file($path)) {
if (!is_file($path)) {
$this->error('Missing storage/app/cities.json file!');
return;
}
if(Place::count() > 10) {
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->advance(count($buffer));
$bar->finish();
$this->info('Successfully imported ' . $count . ' entries.');
return;
}
private function insertBuffer($buffer, $count)
{
DB::table('places')->insert($buffer);
}
}

View file

@ -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

View file

@ -13,7 +13,7 @@ return [
|
*/
'failed' => 'Diese Anmeldeinformationen stimmen nicht mit unseren Daten &uuml;berein.',
'failed' => 'Diese Anmeldeinformationen stimmen nicht mit unseren Daten überein.',
'throttle' => 'Zu viele Login-Versuche. Versuche es in :seconds Sekunden erneut.',
];

View file

@ -4,7 +4,7 @@ return [
'viewMyProfile' => 'Mein Profil anschauen',
'myTimeline' => 'Meine Timeline',
'publicTimeline' => '&Ouml;ffentliche Timeline',
'publicTimeline' => 'Öffentliche Timeline',
'remoteFollow' => 'Aus der Ferne folgen',
'settings' => 'Einstellungen',
'admin' => 'Administration',

View file

@ -2,9 +2,9 @@
return [
'likedPhoto' => 'gef&auml;llt dein Foto.',
'likedPhoto' => 'gefällt dein Foto.',
'startedFollowingYou' => 'folgt dir nun.',
'commented' => 'hat deinen Post kommentiert.',
'mentionedYou' => 'hat dich erw&auml;hnt.',
'mentionedYou' => 'hat dich erwähnt.',
];

View file

@ -14,6 +14,6 @@ return [
*/
'previous' => '« Vorherige',
'next' => 'Naumlchste »',
'next' => 'Nächste »',
];

View file

@ -13,10 +13,10 @@ return [
|
*/
'password' => 'Passw&ouml;rter müssen mindestens 6 Zeichen lang sein und mit der Best&auml;tigung &uuml;bereinstimmen.',
'reset' => 'Dein Passwort wurde zur&uuml;ckgesetzt!',
'sent' => 'Wir haben dir eine E-Mail zum Zur&uuml;cksetzen deines Passworts gesendet!',
'token' => 'Dieser Passwort-Reset-Code ist ung&uuml;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.',
];

View file

@ -14,7 +14,7 @@ return [
*/
'accepted' => ':attribute muss akzeptiert sein .',
'active_url' => ':attribute ist keine g&uuml;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&auml;tigung stimmt nicht &uuml;berein.',
'date' => ':attribute ist kein g&uuml;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&uuml;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&uuml;ltige Bildma&szlig;e.',
'dimensions' => ':attribute hat ungültige Bildmaße.',
'distinct' => ':attribute-Feld hat einen doppelten Wert.',
'email' => ':attribute muss eine g&uuml;ltige E-Mail-Adresse sein.',
'exists' => 'Gew&auml;hlter :attribute-Wert ist ung&uuml;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&uuml;llt sein.',
'filled' => ':attribute muss ausgefüllt sein.',
'image' => ':attribute muss ein Bild sein.',
'in' => 'Gew&auml;hlter :attribute-Wert ist ung&uuml;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&uuml;ltige IP-Adresse sein.',
'ipv4' => ':attribute muss eine g&uuml;ltige IPv4-Adresse sein.',
'ipv6' => ':attribute muss eine g&uuml;ltige IPv6-Adresse sein.',
'json' => ':attribute muss eine g&uuml;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;&szlig;er als :max sein.',
'file' => ':attribute darf nicht gr&omul;&szlig;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;&szlig;er als oder gleich :min sein.',
'file' => ':attribute muss mindestens :min Kilobytes gro&szlig; 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&auml;hlter :attribute-Wert ist ung&uuml;ltig.',
'not_regex' => ':attribute-Format ist ung&uuml;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&uuml;ltig.',
'required' => 'Das :attribute-Feld ist ben&ouml;tigt.',
'required_if' => 'Das :attribute-Feld ist ben&ouml;tigt wenn :other :value ist.',
'required_unless' => 'Das :attribute-Feld ist ben&ouml;tigt es sei denn :other ist in :values.',
'required_with' => 'Das :attribute-Feld ist ben&ouml;tigt wenn :values vorhanden ist.',
'required_with_all' => 'Das :attribute-Feld ist ben&ouml;tigt wenn :values vorhanden ist.',
'required_without' => 'Das :attribute-Feld ist ben&ouml;tigt wenn :values nicht vorhanden ist.',
'required_without_all' => 'Das :attribute-Feld ist ben&ouml;tigt wenn keiner von :values vorhanden ist.',
'same' => ':attribute und :other m&uuml;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&szlig; 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&uml;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&uml;lig.',
'url' => ':attribute-Format ist ungülig.',
/*
|--------------------------------------------------------------------------

View file

@ -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 dutilizaire amb aquesta adreça de corrièl.',

View file

@ -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.',