Skip to content

Commit

Permalink
fixup! Show dependencies on edit translation view
Browse files Browse the repository at this point in the history
  • Loading branch information
kaedroho committed Sep 8, 2020
1 parent 28199f1 commit 6327aa7
Showing 1 changed file with 16 additions and 7 deletions.
Expand Up @@ -746,8 +746,13 @@ const EditorRelatedObjectSegment: FunctionComponent<
<li>
{!!segment.dest ? (
<>
{segment.translationProgress.translatedSegments} / {segment.translationProgress.totalSegments} {gettext('segments translated')}
<Icon name="tick" className="icon--green" />
{segment.translationProgress.translatedSegments} /{' '}
{segment.translationProgress.totalSegments}{' '}
{gettext('segments translated')}
{segment.translationProgress.translatedSegments ==
segment.translationProgress.totalSegments && (
<Icon name="tick" className="icon--green" />
)}
</>
) : (
<>
Expand All @@ -762,11 +767,15 @@ const EditorRelatedObjectSegment: FunctionComponent<
{gettext('Edit')}
</ActionButton>
)}
{!segment.dest && !!segment.source && segment.source.createTranslationRequestUrl && (
<ActionButton onClick={openCreateTranslationRequestUrl}>
{gettext('Translate')}
</ActionButton>
)}
{!segment.dest &&
!!segment.source &&
segment.source.createTranslationRequestUrl && (
<ActionButton
onClick={openCreateTranslationRequestUrl}
>
{gettext('Translate')}
</ActionButton>
)}
</li>
</SegmentToolbar>
</li>
Expand Down

0 comments on commit 6327aa7

Please sign in to comment.