Skip to content

Commit a1ea4ee

Browse files
committed
Remove dead pretranslation-in-progress banner from EditorMenu
EditorMenu only renders when no entities are batch-selected, so requestInProgress === 'pretranslate' can never coincide with it being mounted. In-progress feedback already exists in Pretranslate.tsx.
1 parent ddd8a5d commit a1ea4ee

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

‎translate/public/locale/en-US/translate.ftl‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ comments-Comment--cancel-button = CANCEL
137137

138138
editor-EditorMenu--sign-in-to-translate = <form>Sign in</form> to translate.
139139
editor-EditorMenu--read-only-localization = This is a read-only localization.
140-
editor-EditorMenu--pretranslation-in-progress = Pretranslation in progress.
141140
editor-EditorMenu--button-copy = COPY
142141
.title = Copy From Source (Ctrl + Shift + C)
143142
editor-EditorMenu--button-clear = CLEAR

‎translate/src/modules/editor/components/EditorMenu.tsx‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ import { FtlSwitch } from './FtlSwitch';
1818
import { KeyboardShortcuts } from './KeyboardShortcuts';
1919
import { MachinerySourceIndicator } from './MachinerySourceIndicator';
2020
import { TranslationLength } from './TranslationLength';
21-
import { useBatchactions } from '~/modules/batchactions/hooks';
2221

2322
/**
2423
* Shows a menu bar used to control the Editor.
2524
*
2625
* If the user is not authenticated, shows a login button.
2726
* If the entity is read-only, shows a read-only notification.
28-
* If the entity is pretranslating, shows a pretranslation notification.
2927
* Otherwise, shows the various tools to control the editor.
3028
*/
3129
export function EditorMenu(): React.ReactElement<'menu'> {
@@ -48,11 +46,6 @@ function MenuContent() {
4846
const { isAuthenticated, settings, signInURL, username } = useAppSelector(
4947
(state) => state.user,
5048
);
51-
const batchactions = useBatchactions();
52-
const isPretranslating =
53-
batchactions.requestInProgress === 'pretranslate' &&
54-
batchactions.entities.includes(entity.pk);
55-
5649
if (isAuthenticated === null) {
5750
// No content while loading user data
5851
return null;
@@ -77,14 +70,6 @@ function MenuContent() {
7770
);
7871
}
7972

80-
if (isPretranslating) {
81-
return (
82-
<Localized id='editor-EditorMenu--pretranslation-in-progress'>
83-
<div className='banner'>Pretranslation in progress.</div>
84-
</Localized>
85-
);
86-
}
87-
8873
function updateSetting(setting: keyof user.Settings, value: boolean) {
8974
dispatch(saveSetting(setting, value, username, showNotification));
9075
}

0 commit comments

Comments
 (0)