- '$share' => defaults($x, 'button', L10n::t('Share')),
- '$upload' => L10n::t('Upload photo'),
- '$shortupload' => L10n::t('upload photo'),
- '$attach' => L10n::t('Attach file'),
- '$shortattach' => L10n::t('attach file'),
- '$edbold' => L10n::t('Bold'),
- '$editalic' => L10n::t('Italic'),
- '$eduline' => L10n::t('Underline'),
- '$edquote' => L10n::t('Quote'),
- '$edcode' => L10n::t('Code'),
- '$edimg' => L10n::t('Image'),
- '$edurl' => L10n::t('Link'),
- '$edattach' => L10n::t('Link or Media'),
- '$setloc' => L10n::t('Set your location'),
- '$shortsetloc' => L10n::t('set location'),
- '$noloc' => L10n::t('Clear browser location'),
- '$shortnoloc' => L10n::t('clear location'),
- '$title' => defaults($x, 'title', ''),
- '$placeholdertitle' => L10n::t('Set title'),
- '$category' => defaults($x, 'category', ''),
- '$placeholdercategory' => Feature::isEnabled(local_user(), 'categories') ? L10n::t("Categories \x28comma-separated list\x29") : '',
- '$wait' => L10n::t('Please wait'),
- '$permset' => L10n::t('Permission settings'),
- '$shortpermset' => L10n::t('permissions'),
+ '$share' => ($x['button'] ?? '') ?: DI::l10n()->t('Share'),
+ '$loading' => DI::l10n()->t('Loading...'),
+ '$upload' => DI::l10n()->t('Upload photo'),
+ '$shortupload' => DI::l10n()->t('upload photo'),
+ '$attach' => DI::l10n()->t('Attach file'),
+ '$shortattach' => DI::l10n()->t('attach file'),
+ '$edbold' => DI::l10n()->t('Bold'),
+ '$editalic' => DI::l10n()->t('Italic'),
+ '$eduline' => DI::l10n()->t('Underline'),
+ '$edquote' => DI::l10n()->t('Quote'),
+ '$edcode' => DI::l10n()->t('Code'),
+ '$edimg' => DI::l10n()->t('Image'),
+ '$edurl' => DI::l10n()->t('Link'),
+ '$edattach' => DI::l10n()->t('Link or Media'),
+ '$setloc' => DI::l10n()->t('Set your location'),
+ '$shortsetloc' => DI::l10n()->t('set location'),
+ '$noloc' => DI::l10n()->t('Clear browser location'),
+ '$shortnoloc' => DI::l10n()->t('clear location'),
+ '$title' => $x['title'] ?? '',
+ '$placeholdertitle' => DI::l10n()->t('Set title'),
+ '$category' => $x['category'] ?? '',
+ '$placeholdercategory' => Feature::isEnabled(local_user(), 'categories') ? DI::l10n()->t("Categories \x28comma-separated list\x29") : '',
+ '$wait' => DI::l10n()->t('Please wait'),
+ '$permset' => DI::l10n()->t('Permission settings'),
+ '$shortpermset' => DI::l10n()->t('permissions'),