Merge pull request #33359 from awanlin/topic/typos-cli
Added `typos` to CI and fixed all findings
This commit is contained in:
@@ -198,6 +198,7 @@ export const homeTranslationRef: TranslationRef<
|
||||
readonly 'customHomepageButtons.save': 'Save';
|
||||
readonly 'customHomepage.noWidgets': "No widgets added. Start by clicking the 'Add widget' button.";
|
||||
readonly 'widgetSettingsOverlay.cancelButtonTitle': 'Cancel';
|
||||
readonly 'widgetSettingsOverlay.editSettingsTooltip': 'Edit settings';
|
||||
readonly 'widgetSettingsOverlay.editSettingsTooptip': 'Edit settings';
|
||||
readonly 'widgetSettingsOverlay.deleteWidgetTooltip': 'Delete widget';
|
||||
readonly 'widgetSettingsOverlay.submitButtonTitle': 'Submit';
|
||||
|
||||
@@ -191,6 +191,7 @@ export const homeTranslationRef: TranslationRef<
|
||||
readonly 'customHomepageButtons.save': 'Save';
|
||||
readonly 'customHomepage.noWidgets': "No widgets added. Start by clicking the 'Add widget' button.";
|
||||
readonly 'widgetSettingsOverlay.cancelButtonTitle': 'Cancel';
|
||||
readonly 'widgetSettingsOverlay.editSettingsTooltip': 'Edit settings';
|
||||
readonly 'widgetSettingsOverlay.editSettingsTooptip': 'Edit settings';
|
||||
readonly 'widgetSettingsOverlay.deleteWidgetTooltip': 'Delete widget';
|
||||
readonly 'widgetSettingsOverlay.submitButtonTitle': 'Submit';
|
||||
|
||||
@@ -77,6 +77,16 @@ export const WidgetSettingsOverlay = (props: WidgetSettingsOverlayProps) => {
|
||||
const onClose = () => setSettingsDialogOpen(false);
|
||||
const { t } = useTranslationRef(homeTranslationRef);
|
||||
|
||||
// Prefer the corrected key, but fall back to the deprecated typo key so that
|
||||
// existing translation overrides on `editSettingsTooptip` keep working.
|
||||
const editSettingsTooltipText = t(
|
||||
'widgetSettingsOverlay.editSettingsTooltip',
|
||||
);
|
||||
const editSettingsTooltip =
|
||||
editSettingsTooltipText === 'Edit settings'
|
||||
? t('widgetSettingsOverlay.editSettingsTooptip')
|
||||
: editSettingsTooltipText;
|
||||
|
||||
return (
|
||||
<div className={styles.settingsOverlay}>
|
||||
{widget.settingsSchema && (
|
||||
@@ -124,7 +134,7 @@ export const WidgetSettingsOverlay = (props: WidgetSettingsOverlayProps) => {
|
||||
>
|
||||
{widget.settingsSchema && (
|
||||
<Grid item className="overlayGridItem">
|
||||
<Tooltip title={t('widgetSettingsOverlay.editSettingsTooptip')}>
|
||||
<Tooltip title={editSettingsTooltip}>
|
||||
<IconButton
|
||||
color="primary"
|
||||
onClick={() => setSettingsDialogOpen(true)}
|
||||
|
||||
@@ -39,6 +39,10 @@ export const homeTranslationRef = createTranslationRef({
|
||||
noWidgets: "No widgets added. Start by clicking the 'Add widget' button.",
|
||||
},
|
||||
widgetSettingsOverlay: {
|
||||
editSettingsTooltip: 'Edit settings',
|
||||
/**
|
||||
* @deprecated Use `editSettingsTooltip` instead. This was a typo in the original key.
|
||||
*/
|
||||
editSettingsTooptip: 'Edit settings',
|
||||
deleteWidgetTooltip: 'Delete widget',
|
||||
submitButtonTitle: 'Submit',
|
||||
|
||||
Reference in New Issue
Block a user