Skip to content

Commit

Permalink
Adds full namespace to string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
davejtoews committed Feb 9, 2024
1 parent 14ecdb1 commit 2a8e81e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
34 changes: 17 additions & 17 deletions src/Extension/Traits/FluentAdminTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function updateFluentActions(
// Add menu button
$moreOptions = Tab::create(
'FluentMenuOptions',
_t('FluentAdminTrait.Localisation', 'Localisation')
_t('TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Localisation', 'Localisation')
);
$moreOptions->addExtraClass('popover-actions-simulate');
$rootTabSet->push($moreOptions);
Expand All @@ -117,7 +117,7 @@ protected function updateFluentActions(
FormAction::create(
'clearFluent',
_t(
'FluentAdminTrait.Label_clearFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_clearFluent',
"Clear from all except '{title}'",
[
'title' => $locale->getTitle()
Expand All @@ -129,7 +129,7 @@ protected function updateFluentActions(
FormAction::create(
'copyFluent',
_t(
'FluentAdminTrait.Label_copyFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_copyFluent',
"Copy '{title}' to other locales",
[
'title' => $locale->getTitle()
Expand All @@ -144,7 +144,7 @@ protected function updateFluentActions(
FormAction::create(
'unpublishFluent',
_t(
'FluentAdminTrait.Label_unpublishFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_unpublishFluent',
'Unpublish (all locales)'
)
)->addExtraClass('btn-secondary')
Expand All @@ -153,7 +153,7 @@ protected function updateFluentActions(
FormAction::create(
'archiveFluent',
_t(
'FluentAdminTrait.Label_archiveFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_archiveFluent',
'Unpublish and Archive (all locales)'
)
)->addExtraClass('btn-outline-danger')
Expand All @@ -162,7 +162,7 @@ protected function updateFluentActions(
FormAction::create(
'publishFluent',
_t(
'FluentAdminTrait.Label_publishFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_publishFluent',
'Save & Publish (all locales)'
)
)->addExtraClass('btn-primary')
Expand All @@ -172,7 +172,7 @@ protected function updateFluentActions(
FormAction::create(
'deleteFluent',
_t(
'FluentAdminTrait.Label_deleteFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_deleteFluent',
'Delete (all locales)'
)
)->addExtraClass('btn-outline-danger')
Expand All @@ -187,7 +187,7 @@ protected function updateFluentActions(
FormAction::create(
'hideFluent',
_t(
'FluentAdminTrait.Label_hideFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_hideFluent',
"Hide from '{title}'",
[
'title' => $locale->getTitle()
Expand All @@ -200,7 +200,7 @@ protected function updateFluentActions(
FormAction::create(
'showFluent',
_t(
'FluentAdminTrait.Label_showFluent',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.Label_showFluent',
"Show in '{title}'",
[
'title' => $locale->getTitle()
Expand Down Expand Up @@ -256,7 +256,7 @@ public function clearFluent($data, $form)
});

$message = _t(
'FluentAdminTrait.ClearAllNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.ClearAllNotice',
"All localisations have been cleared for '{title}'.",
['title' => $record->Title]
);
Expand Down Expand Up @@ -302,7 +302,7 @@ public function copyFluent($data, $form)
});

$message = _t(
'FluentAdminTrait.CopyNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.CopyNotice',
"Copied '{title}' to all other locales.",
['title' => $record->Title]
);
Expand Down Expand Up @@ -336,7 +336,7 @@ public function unpublishFluent($data, $form)
});

$message = _t(
'FluentAdminTrait.UnpublishNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.UnpublishNotice',
"Unpublished '{title}' from all locales.",
['title' => $record->Title]
);
Expand Down Expand Up @@ -386,7 +386,7 @@ public function archiveFluent($data, $form)
$policy->delete($record);

$message = _t(
'FluentAdminTrait.ArchiveNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.ArchiveNotice',
"Archived '{title}' and all of its localisations.",
['title' => $record->Title]
);
Expand Down Expand Up @@ -434,7 +434,7 @@ public function deleteFluent($data, $form)
$policy->delete($record);

$message = _t(
'FluentAdminTrait.DeleteNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.DeleteNotice',
"Deleted '{title}' and all of its localisations.",
['title' => $record->Title]
);
Expand Down Expand Up @@ -478,7 +478,7 @@ public function publishFluent($data, $form)
});

$message = _t(
'FluentAdminTrait.PublishNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.PublishNotice',
"Published '{title}' across all locales.",
['title' => $record->Title]
);
Expand Down Expand Up @@ -508,7 +508,7 @@ public function showFluent($data, $form)
$record->FilteredLocales()->add($locale);

$message = _t(
'FluentAdminTrait.ShowNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.ShowNotice',
"Record '{title}' is now visible in {locale}",
[
'title' => $record->Title,
Expand Down Expand Up @@ -541,7 +541,7 @@ public function hideFluent($data, $form)
$record->FilteredLocales()->remove($locale);

$message = _t(
'FluentAdminTrait.HideNotice',
'TractorCow\Fluent\Extension\Traits\FluentAdminTrait.HideNotice',
"Record '{title}' is now hidden in {locale}",
[
'title' => $record->Title,
Expand Down
6 changes: 3 additions & 3 deletions src/Extension/Traits/FluentBadgeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function generateBadgeHTML(
// If the object has been localised in the current locale, show a "localised" state
$badgeClasses[] = 'fluent-badge--default';
$tooltip = _t(
'FluentBadgeTrait.BadgeLocalised',
'TractorCow\Fluent\Extension\Traits\FluentBadgeTrait.BadgeLocalised',
'Localised in {locale}',
[
'locale' => $locale->getTitle()
Expand All @@ -86,7 +86,7 @@ protected function generateBadgeHTML(
// If object is inheriting content from another locale show the source
$badgeClasses[] = 'fluent-badge--localised';
$tooltip = _t(
'FluentBadgeTrait.BadgeInherited',
'TractorCow\Fluent\Extension\Traits\FluentBadgeTrait.BadgeInherited',
'Inherited from {locale}',
[
'locale' => $info->getSourceLocale()->getTitle()
Expand All @@ -97,7 +97,7 @@ protected function generateBadgeHTML(
// by either localising or seting up a locale fallback
$badgeClasses[] = 'fluent-badge--invisible';
$tooltip = _t(
'FluentBadgeTrait.BaggeInvisible',
'TractorCow\Fluent\Extension\Traits\FluentBadgeTrait.BaggeInvisible',
'{type} has no available content in {locale}, localise the {type} or provide a locale fallback',
[
'type' => $record->i18n_singular_name(),
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/Traits/FluentObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected function updateFluentCMSFields(FieldList $fields)

$fields
->fieldByName('Root.Locales')
->setTitle(_t('FluentObjectTrait.TAB_LOCALISATION', 'Localisation'));
->setTitle(_t('TractorCow\Fluent\Extension\Traits\FluentObjectTrait.TAB_LOCALISATION', 'Localisation'));
} else {
$fields->push($gridField);
}
Expand Down

0 comments on commit 2a8e81e

Please sign in to comment.