]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6462 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 8 Nov 2023 16:19:38 +0000 (17:19 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 8 Nov 2023 16:19:38 +0000 (17:19 +0100)
app/Fields/ElearningTranslatedString.php
app/Models/Base/ToolboxContentTranslate.php

index 7a1a1fd3fdc41f86915a5c6732d7ec2bda8c00f9..c661aea4bfd1ab19dbd41c55095257fe247b24ea 100644 (file)
@@ -28,7 +28,7 @@ class ElearningTranslatedString extends SelectFromArray
     {
         $locale = 'en';
 
-        $translations = ElearningTranslate::getLocaleTranslations($locale);
+        $translations = ElearningTranslate::getLocaleTranslations($locale, false);
         $res = [];
         foreach ($translations as $k => $translation) {
             if ($k === 'k' || $k === 'nsis') {
index 1e041b2f50663ae20da72fe3e5dd05d9111ace15..061e86d458e4bd79fe3f9081b47a9066343c0b78 100644 (file)
@@ -6,6 +6,7 @@ use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelExportOperation;
 use App\Http\Controllers\Admin\Operations\ContentTranslate\ExcelImportOperation;
 use Cubist\Backpack\Facades\App;
 use Cubist\Backpack\Magic\Models\Translate;
+use Cubist\Util\Files\Files;
 use Cubist\Util\PHP;
 use Illuminate\Support\Facades\Cache;
 
@@ -55,7 +56,7 @@ class ToolboxContentTranslate extends Translate
 
     protected static function _getCacheKey()
     {
-        return 'all_' . static::$_name . '_translations';
+        return 'all_' . Files::hashFileAttributes(__FILE__) . '_' . static::$_name . '_translations';
     }
 
     public static function getAllTranslations($force = true)
@@ -75,10 +76,10 @@ class ToolboxContentTranslate extends Translate
                 }
 
                 $res = [];
-
                 foreach ($json as $code => $tr) {
                     $res[$code] = [];
                     foreach ($tr as $k => $v) {
+
                         $res[$code][$k] = ['str' => static::keyToStr($k), 'translation' => $v];
                     }
                 }