From 5d8c625549893c464589917ae1950c88b5ad85a6 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sat, 18 Jan 2020 22:38:31 +0100 Subject: [PATCH] cleanup --- doc/translations.md | 16 ++++++++-------- src/LegacyModule.php | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/translations.md b/doc/translations.md index f12f07065..a29b0d63b 100644 --- a/doc/translations.md +++ b/doc/translations.md @@ -73,14 +73,14 @@ Then run `bin/console po2php view/lang//messages.po` to update the rel ### Basic usage -- `Friendica\Core\DI::l10n()->t('Label')` => `Label` -- `Friendica\Core\DI::l10n()->t('Label %s', 'test')` => `Label test` +- `Friendica\DI::l10n()->t('Label')` => `Label` +- `Friendica\DI::l10n()->t('Label %s', 'test')` => `Label test` ### Plural -- `Friendica\Core\DI::l10n()->tt('Label', 'Labels', 1)` => `Label` -- `Friendica\Core\DI::l10n()->tt('Label', 'Labels', 3)` => `Labels` -- `Friendica\Core\DI::l10n()->tt('%d Label', '%d Labels', 1)` => `1 Label` -- `Friendica\Core\DI::l10n()->tt('%d Label', '%d Labels', 3)` => `3 Labels` -- `Friendica\Core\DI::l10n()->tt('%d Label', 'Labels %2%s %3%s', 1, 'test', 'test2')` => `Label test test2` -- `Friendica\Core\DI::l10n()->tt('%d Label', 'Labels %2%s %3%s', 3, 'test', 'test2')` => `Labels test test2` +- `Friendica\DI::l10n()->tt('Label', 'Labels', 1)` => `Label` +- `Friendica\DI::l10n()->tt('Label', 'Labels', 3)` => `Labels` +- `Friendica\DI::l10n()->tt('%d Label', '%d Labels', 1)` => `1 Label` +- `Friendica\DI::l10n()->tt('%d Label', '%d Labels', 3)` => `3 Labels` +- `Friendica\DI::l10n()->tt('%d Label', 'Labels %2%s %3%s', 1, 'test', 'test2')` => `Label test test2` +- `Friendica\DI::l10n()->tt('%d Label', 'Labels %2%s %3%s', 3, 'test', 'test2')` => `Labels test test2` diff --git a/src/LegacyModule.php b/src/LegacyModule.php index 6a627e98b..ecb21ebc5 100644 --- a/src/LegacyModule.php +++ b/src/LegacyModule.php @@ -27,7 +27,7 @@ class LegacyModule extends BaseModule public static function setModuleFile($file_path) { if (!is_readable($file_path)) { - throw new \Exception(Core\DI::l10n()->t('Legacy module file not found: %s', $file_path)); + throw new \Exception(DI::l10n()->t('Legacy module file not found: %s', $file_path)); } self::$moduleName = basename($file_path, '.php');