Explorar o código

Update TimeZoneTrait for translate

Visman %!s(int64=2) %!d(string=hai) anos
pai
achega
783fb02a2f
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Models/Pages/TimeZoneTrait.php

+ 2 - 2
app/Models/Pages/TimeZoneTrait.php

@@ -25,7 +25,7 @@ trait TimeZoneTrait
             $dateTimeZone          = new DateTimeZone($zone);
             $dateTimeZone          = new DateTimeZone($zone);
             $dateTime              = new DateTime('now', $dateTimeZone);
             $dateTime              = new DateTime('now', $dateTimeZone);
             $offset                = $dateTime->getOffset();
             $offset                = $dateTime->getOffset();
-            $list[$offset][$zone]  = $zone;
+            $list[$offset][$zone]  = __($zone);
         }
         }
 
 
         \ksort($list, \SORT_NUMERIC);
         \ksort($list, \SORT_NUMERIC);
@@ -46,7 +46,7 @@ trait TimeZoneTrait
                     $options[] = ['(UTC' . $hm . ') ' . $format->format($now)];
                     $options[] = ['(UTC' . $hm . ') ' . $format->format($now)];
                 }
                 }
 
 
-                $options[] = [$zone, $value];
+                $options[] = [$zone, \trim($value)];
             }
             }
         }
         }