Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/ReactViews/Map/Panels/SharePanel/ShareUrl/ShareUrl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,21 @@ export const ShareUrl = forwardRef<
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [terria, viewState, shouldShorten, includeStories]);

const hasStory = includeStories && terria.stories && terria.stories.length;

return (
<>
<Explanation>{t("clipboard.shareExplanation")}</Explanation>
<Explanation>
{hasStory
? t("clipboard.storyExplanation")
: t("clipboard.shareExplanation")}
</Explanation>
<Spacing bottom={1} />
<Clipboard
text={shareUrl}
inputPlaceholder={placeholder}
createdMessage={
includeStories && terria.stories && terria.stories.length > 0
? t("share.storyLinkCreated")
: t("share.shareLinkCreated")
hasStory ? t("share.storyLinkCreated") : t("share.shareLinkCreated")
}
onCopy={(text) =>
terria.analytics?.logEvent(
Expand Down
2 changes: 1 addition & 1 deletion lib/ReactViews/Story/StoryBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class StoryBuilder extends Component<
/>
<Spacing right={1} />
<TextSpan medium color={this.props.theme.infoColor}>
{t("story.saveInstructions")}
<Trans i18nKey="story.saveInstructions" />
</TextSpan>
</Box>
)}
Expand Down
3 changes: 2 additions & 1 deletion wwwroot/languages/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
"convertErrorMessage": "This share link is based on an older version of TerriaJS - the software powering this web map. An error has occurred trying to upgrade the share data.",
"getShareSaveHelpMessage": "How to Bookmark Sharelinks",
"shareStoryLink": "Share story link",
"storyLinkCreated": "Story link created",
"storyLinkCreated": "Saved as new story",
"shareLinkCreated": "Share link created"
},
"countDatasets": {
Expand Down Expand Up @@ -625,6 +625,7 @@
"unsuccessful": "Copy unsuccessful...",
"shareURL": "Share link",
"shareExplanation": "Anyone with this link will be able to access this map.",
"storyExplanation": "Anyone with this link will be able to access this map.",
"copy": "Copy"
},
"includeStory": {
Expand Down
Loading