[I18N] Fix i18n and add default domain 'Core'
This commit is contained in:
parent
13ae29cae2
commit
436b44df89
@ -17,7 +17,6 @@
|
|||||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility functions for i18n
|
* Utility functions for i18n
|
||||||
*
|
*
|
||||||
@ -52,6 +51,7 @@ foreach ($LC_CATEGORIES as $key => $name) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use App\Util\Formatting;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
@ -88,10 +88,10 @@ abstract class I18n
|
|||||||
static $cached;
|
static $cached;
|
||||||
$path = $backtrace[0]['file'];
|
$path = $backtrace[0]['file'];
|
||||||
if (!isset($cached[$path])) {
|
if (!isset($cached[$path])) {
|
||||||
$path = common::normalizePath($path);
|
$path = Formatting::normalizePath($path);
|
||||||
$cached[$path] = common::pluginFromPath($path);
|
$cached[$path] = Formatting::pluginFromPath($path);
|
||||||
}
|
}
|
||||||
return $cached[$path] ?? '';
|
return $cached[$path] ?? 'Core';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user