From 91d85fd7514ceb4fe1c7486b73a0354e6d44ea47 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 21 Dec 2021 22:11:03 -0700 Subject: [PATCH 1/3] New translations web.php (German) [ci skip] --- resources/lang/de/web.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/lang/de/web.php b/resources/lang/de/web.php index 08bc55c01..4ed49a57c 100644 --- a/resources/lang/de/web.php +++ b/resources/lang/de/web.php @@ -16,7 +16,7 @@ return [ 'cancel' => 'Abbrechen', 'copyLink' => 'Link kopieren', - 'delete' => 'Delete', + 'delete' => 'Löschen', 'error' => 'Fehler', 'errorMsg' => 'Etwas ist schief gelaufen. Bitter versuch es später nochmal.', 'oops' => 'Hoppla!', @@ -57,14 +57,14 @@ return [ 'compose' => 'Neu erstellen', // Nav footer - 'about' => 'About', - 'help' => 'Help', - 'language' => 'Language', - 'privacy' => 'Privacy', + 'about' => 'Über uns', + 'help' => 'Hilfe', + 'language' => 'Sprache', + 'privacy' => 'Privatsphäre', 'terms' => 'Terms', // Temporary links - 'backToPreviousDesign' => 'Go back to previous design' + 'backToPreviousDesign' => 'Zurück zum vorherigen Design' ], 'directMessages' => [ @@ -94,13 +94,13 @@ return [ 'dm' => 'dm', 'groupPost' => 'group post', 'modlog' => 'modlog', - 'post' => 'post', + 'post' => 'Beitrag', 'story' => 'story', ], 'post' => [ 'shareToFollowers' => 'Share to followers', - 'shareToOther' => 'Share to other', + 'shareToOther' => 'Mit anderen teilen', 'noLikes' => 'No likes yet', 'uploading' => 'Lädt hoch', ], @@ -136,7 +136,7 @@ return [ 'spam' => 'Spam', 'sensitive' => 'Sensitiver Inhalt', 'abusive' => 'Abusive or Harmful', - 'underageAccount' => 'Underage Account', + 'underageAccount' => 'Minderjährigen-Konto', 'copyrightInfringement' => 'Urheberrechtsverletzung', 'impersonation' => 'Impersonation', 'scamOrFraud' => 'Scam or Fraud', From 7bef1591192a8eff9599fabe407df74751ac7952 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Dec 2021 22:32:33 -0700 Subject: [PATCH 2/3] Add i18n dev command --- app/Console/Commands/ExportLanguages.php | 74 ++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 app/Console/Commands/ExportLanguages.php diff --git a/app/Console/Commands/ExportLanguages.php b/app/Console/Commands/ExportLanguages.php new file mode 100644 index 000000000..be315cc44 --- /dev/null +++ b/app/Console/Commands/ExportLanguages.php @@ -0,0 +1,74 @@ +error('This command is meant for development purposes and should only be run in a local environment'); + return Command::FAILURE; + } + + $path = base_path('resources/lang'); + $langs = []; + + foreach (new \DirectoryIterator($path) as $io) { + $name = $io->getFilename(); + $skip = ['vendor']; + if($io->isDot() || in_array($name, $skip)) { + continue; + } + + if($io->isDir()) { + array_push($langs, $name); + } + } + + $exportDir = resource_path('assets/js/i18n/'); + $exportDirAlt = public_path('_lang/'); + + foreach($langs as $lang) { + $strings = \Lang::get('web', [], $lang); + $json = json_encode($strings, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); + $path = "{$exportDir}{$lang}.json"; + file_put_contents($path, $json); + $pathAlt = "{$exportDirAlt}{$lang}.json"; + file_put_contents($pathAlt, $json); + } + + return Command::SUCCESS; + } +} From 5e1e2073297b8fe820b4dd3d152540bf880049a4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Dec 2021 22:33:54 -0700 Subject: [PATCH 3/3] Update langs --- public/_lang/de.json | Bin 5815 -> 5862 bytes resources/assets/js/i18n/de.json | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/_lang/de.json b/public/_lang/de.json index b7d3fe0e5fd112bc03a79274d71cb8b1959ea47c..c691804445fabd962ebc3fcc02e0d11cb621dc69 100644 GIT binary patch delta 197 zcmdn4`%HJkd`2Fhm{J3SG_&I5jMTi%OBwlC)Ib6$$w{e23Z;3)N;+H$P@t5Nnp2=; zrJ&@InUj_}`2wp1TW~>9Vsggh_pGu!CB+39Af2fuMX8hd*z9DYN{hfoCnsksRF&o` zl;sy?q!wkSr{*cRY))hgVP3yW46t@x@BF-y{LOs)E7<|)K0+D* delta 150 zcmaE+yIps~d`32x)ST3k)Xl3I`B-Eflk!VTlytZhpg<`jHK#zyN