Skip to content

Commit 367f35e

Browse files
committed
Rename trans to trans_osm for Laravel compatibility
1 parent cbbe621 commit 367f35e

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
// Istanziamento del gestore delle traduzioni del progetto
163163
$lang = !empty($config['lang']) ? $config['lang'] : (isset($_GET['lang']) ? $_GET['lang'] : null);
164164
$formatter = !empty($config['formatter']) ? $config['formatter'] : [];
165-
$translator = trans();
165+
$translator = trans_osm();
166166
$translator->addLocalePath(base_dir().'/locale');
167167
$translator->addLocalePath(base_dir().'/modules/*/locale');
168168

include/init/configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
],
367367
];
368368

369-
$current = trans()->getCurrentLocale();
369+
$current = trans_osm()->getCurrentLocale();
370370
foreach ($languages as $code => $language) {
371371
echo '
372372
<option data-country="'.$language['flag'].'" value="'.$code.'" '.($code == $current ? 'selected' : '').'>'.$language['title'].'</option>';
@@ -522,7 +522,7 @@ class: "img-flag",
522522
// Form dei parametri
523523
echo '
524524
<form action="?action=updateconfig&firstuse=true" method="post" id="config-form">
525-
<input type="hidden" name="lang" value="'.trans()->getCurrentLocale().'">
525+
<input type="hidden" name="lang" value="'.trans_osm()->getCurrentLocale().'">
526526
527527
<div class="config-section-content">
528528
<h4 class="config-section-header">'.tr('Formato date').'</h4>

lib/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function auth_osm()
158158
*
159159
* @return Translator
160160
*/
161-
function trans()
161+
function trans_osm()
162162
{
163163
return Translator::getInstance();
164164
}

src/App.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public static function getAssets()
200200

201201
// Impostazione dei percorsi
202202
$paths = self::getPaths();
203-
$lang = trans()->getCurrentLocale();
203+
$lang = trans_osm()->getCurrentLocale();
204204

205205
// Sezioni: nome - percorso
206206
$sections = [

src/Util/Singleton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private function __clone()
4747
/**
4848
* Private unserialize method to prevent unserializing of the <b>Singleton</b> instance.
4949
*/
50-
private function __wakeup()
50+
public function __wakeup()
5151
{
5252
}
5353

0 commit comments

Comments
 (0)