Skip to content
Merged
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
212 changes: 107 additions & 105 deletions i18n/oceans.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,109 @@
{
"fishvtrash-training-init1": "Garbage dumped in the water affects marine life. In this activity, you will program or train A.I. (artificial intelligence) to identify fish or trash. Let's clean up the ocean! Click anywhere on the screen to continue.",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uuuugh prettier still fixing things in this repo- these are all just indents! Please review sans whitespace changes

"fishvtrash-training-init2": "Let’s meet A.I.",
"fishvtrash-training-init3": "A.I. does not know if an object is a fish or trash, but it can process images and identify patterns.",
"fishvtrash-training-init4": "To program A.I., use the buttons to label an image as “Fish” or “Not Fish”. The training you provide will teach A.I. to recognize patterns on its own. Let’s get started!",
"fishvtrash-training-pause1": "Seventeen billion pounds of plastic enter the ocean each year.",
"fishvtrash-training-pause2": "You are programming or training A.I. with each click. Keep going.",
"fishvtrash-training-pause3": "80% of ocean pollution comes from land debris and is estimated to cost $13 billion per year.",
"fishvtrash-training-pause4": "A.I. learns from your choices. If you make “wrong” choices, A.I. will repeat your mistakes. Keep training.",
"fishvtrash-training-pause5": "Great work! The more data you provide A.I., the more it learns. Keep training A.I. or continue when ready.",
"fishvtrash-predicting-init1": "Now let’s see if A.I. knows what a “fish” looks like.",
"fishvtrash-predicting-init2": "A.I. will analyze a random set of objects and label them based on your training.",
"fishvtrash-predicting-init3": "Let’s go!",
"fishvtrash-pond-init1": "Based on your training, here are some objects that A.I. identified as “fish”. How did A.I. do?",
"fishvtrash-pond-recall": "Click here to switch between objects identified as “fish” and “not fish”.",
"fishvtrash-pond-init2": "You can train A.I. more...",
"fishvtrash-pond-init3": "...or Continue.",
"creaturesvtrashdemo-predicting-init1": "So far, we trained A.I. to identify objects as either “fish” or “not fish”.",
"creaturesvtrashdemo-predicting-init2": "What if this training data was used to decide what belonged in the water?",
"creaturesvtrashdemo-predicting-init3": "What would happen to other sea creatures? Does our training approach cause unintended consequences?",
"creaturesvtrashdemo-predicting-init4": "Let's see.",
"creaturesvtrashdemo-predicting-pause1": "Did you notice that A.I. identified some sea creatures as “not fish”?",
"creaturesvtrashdemo-predicting-pause2": "While these sea creatures are not fish, they do belong in the water.",
"creaturesvtrashdemo-predicting-pause3": "A.I. only learns what we teach it.",
"creaturesvtrashdemo-predicting-pause4": "Let’s train A.I. again.",
"creaturesvtrash-training-init1": "Let’s teach A.I. to learn which objects should be in the water.",
"creaturesvtrash-training-init2": "In the ocean, plastic debris can harm fish, seabirds, and marine mammals. Protecting seabirds and marine life is one of many reasons to keep the oceans clean.",
"creaturesvtrash-training-init3": "The more training data you provide, the more A.I. learns. Keep training.",
"creaturesvtrash-training-init4": "Marine plastic pollution has impacted at least 267 species worldwide, including 86% of all sea turtle species.",
"creaturesvtrash-training-init5": "Keep training to teach A.I. what belongs in the water.",
"creaturesvtrash-training-init6": "Great work! The more data you provide A.I., the better it will do. Keep training A.I. or continue when ready.",
"creaturesvtrash-predicting-init1": "Do you think A.I. will now do a better job identifying what should be in the water? Let’s watch.",
"creaturesvtrash-pond-init1": "Based on your training, here are some objects that A.I. identified as “belongs in water”. How did A.I. do?",
"fishshort-words-init1": "Artificial intelligence and machine learning can be used to teach a computer new patterns.",
"fishshort-words-init2": "Let’s teach A.I. a new word by showing it examples of that type of fish.",
"fishshort-words-training-pause1": "Do you think A.I. has enough training data? You can click Continue to find out.",
"fishshort-words-training-pause2": "Great work! Keep training A.I. or continue when ready.",
"fishshort-predicting-init1": "With your training data, you have programmed A.I. to recognize “{word}” fish.",
"fishshort-predicting-init2": "Let's see A.I. identify “{word}” fish.",
"fishshort-pond-init1": "Based on your training, A.I. identified {n, plural,one {this} other {these}} fish as “{word}”. How did A.I. do? You can Train More if you want to improve the results.",
"fishshort-pond-init2": "Click on the info button to see what A.I. learned.",
"fishlong-words-init1": "Now let’s see if A.I. can learn a less obvious word.",
"fishlong-words-init2": "Let’s teach A.I. a word that depends on your opinion. It is up to you to pick fish that match your word.",
"fishlong-training-pause1": "Is it fair to use artificial intelligence to judge a fish by its looks? While AI might seem fair and neutral, its analysis comes from the training we provide. What unintended bias could this cause?",
"fishlong-training-pause2": "More training data will help A.I. learn your word. Keep training.",
"fishlong-training-pause3": "Each choice you make can help A.I. learn. Keep training.",
"fishlong-training-pause4": "Do you think A.I. has enough training data? A.I. will do better with a lot of data. Continue when you think A.I. is ready.",
"fishlong-training-many": "Wow. That's a lot of fish!",
"fishlong-predicting-init1": "With your training data, you have programmed A.I. to recognize “{word}” fish.",
"fishlong-predicting-init2": "Let’s see A.I. identify “{word}” fish.",
"fishlong-pond-init1": "Based on your training, A.I. identified {n, plural,one {this} other {these}} fish as “{word}”. How did A.I. do?",
"fishlong-pond-init2": "You can Train More if you want to improve the results.",
"fishlong-pond-init3": "Or you can teach A.I. a new word by choosing New Word.",
"didYouKnow": "Did you know?",
"continue": "Continue",
"training-generic-please-continue": "Great Work! Click Continue to see what A.I. has learned.",
"areYouSure": "Are you sure?",
"eraseWarning": "Erasing A.I.'s data will permanently delete all training. Is that what you want to do?",
"erase": "Erase",
"cancel": "Cancel",
"yes": "Yes",
"no": "No",
"notWord": "Not {word}",
"run": "Run",
"mostImportantParts": "These were the most important fish parts:",
"clickIndividualFish": "Click individual fish to see their information.",
"mostImportantPartsDescription": "These were the most important fish parts in determining whether this fish was “*{word}*” or “**{notWord}**”.",
"newWord": "New Word",
"finish": "Finish",
"trainMore": "Train More",
"wordQuestionShort": "What type of fish do you want to train A.I. to detect?",
"wordQuestionLong": "Choose a new word to teach A.I.",
"isThisFish": "Is this fish {word}?",
"isThisAFish": "Is this a fish?",
"doesThisBelongInWater": "Does this belong in the water?",
"fish": "Fish",
"waterCreature": "Water creature",
"blue": "Blue",
"green": "Green",
"red": "Red",
"circular": "Circular",
"rectangular": "Rectangular",
"triangular": "Triangular",
"angry": "Angry",
"awesome": "Awesome",
"delicious": "Delicious",
"endangered": "Endangered",
"fast": "Fast",
"fierce": "Fierce",
"fun": "Fun",
"glitchy": "Glitchy",
"happy": "Happy",
"hungry": "Hungry",
"playful": "Playful",
"scary": "Scary",
"silly": "Silly",
"spooky": "Spooky",
"wild": "Wild",
"dorsalFins": "dorsal fin",
"pectoralFinsFront": "pectoral fins",
"tails": "tail",
"bodies": "body",
"scales": "scales",
"eyes": "eyes",
"mouths": "mouth",
"colors": "colors"
"fishvtrash-training-init1": "Garbage dumped in the water affects marine life. In this activity, you will program or train A.I. (artificial intelligence) to identify fish or trash. Let's clean up the ocean! Click anywhere on the screen to continue.",
"fishvtrash-training-init2": "Let’s meet A.I.",
"fishvtrash-training-init3": "A.I. does not know if an object is a fish or trash, but it can process images and identify patterns.",
"fishvtrash-training-init4": "To program A.I., use the buttons to label an image as “Fish” or “Not Fish”. The training you provide will teach A.I. to recognize patterns on its own. Let’s get started!",
"fishvtrash-training-pause1": "Seventeen billion pounds of plastic enter the ocean each year.",
"fishvtrash-training-pause2": "You are programming or training A.I. with each click. Keep going.",
"fishvtrash-training-pause3": "80% of ocean pollution comes from land debris and is estimated to cost $13 billion per year.",
"fishvtrash-training-pause4": "A.I. learns from your choices. If you make “wrong” choices, A.I. will repeat your mistakes. Keep training.",
"fishvtrash-training-pause5": "Great work! The more data you provide A.I., the more it learns. Keep training A.I. or continue when ready.",
"fishvtrash-predicting-init1": "Now let’s see if A.I. knows what a “fish” looks like.",
"fishvtrash-predicting-init2": "A.I. will analyze a random set of objects and label them based on your training.",
"fishvtrash-predicting-init3": "Let’s go!",
"fishvtrash-pond-init1": "Based on your training, here are some objects that A.I. identified as “fish”. How did A.I. do?",
"fishvtrash-pond-recall": "Click here to switch between objects identified as “fish” and “not fish”.",
"fishvtrash-pond-init2": "You can train A.I. more...",
"fishvtrash-pond-init3": "...or Continue.",
"creaturesvtrashdemo-predicting-init1": "So far, we trained A.I. to identify objects as either “fish” or “not fish”.",
"creaturesvtrashdemo-predicting-init2": "What if this training data was used to decide what belonged in the water?",
"creaturesvtrashdemo-predicting-init3": "What would happen to other sea creatures? Does our training approach cause unintended consequences?",
"creaturesvtrashdemo-predicting-init4": "Let's see.",
"creaturesvtrashdemo-predicting-pause1": "Did you notice that A.I. identified some sea creatures as “not fish”?",
"creaturesvtrashdemo-predicting-pause2": "While these sea creatures are not fish, they do belong in the water.",
"creaturesvtrashdemo-predicting-pause3": "A.I. only learns what we teach it.",
"creaturesvtrashdemo-predicting-pause4": "Let’s train A.I. again.",
"creaturesvtrash-training-init1": "Let’s teach A.I. to learn which objects should be in the water.",
"creaturesvtrash-training-init2": "In the ocean, plastic debris can harm fish, seabirds, and marine mammals. Protecting seabirds and marine life is one of many reasons to keep the oceans clean.",
"creaturesvtrash-training-init3": "The more training data you provide, the more A.I. learns. Keep training.",
"creaturesvtrash-training-init4": "Marine plastic pollution has impacted at least 267 species worldwide, including 86% of all sea turtle species.",
"creaturesvtrash-training-init5": "Keep training to teach A.I. what belongs in the water.",
"creaturesvtrash-training-init6": "Great work! The more data you provide A.I., the better it will do. Keep training A.I. or continue when ready.",
"creaturesvtrash-predicting-init1": "Do you think A.I. will now do a better job identifying what should be in the water? Let’s watch.",
"creaturesvtrash-pond-init1": "Based on your training, here are some objects that A.I. identified as “belongs in water”. How did A.I. do?",
"fishshort-words-init1": "Artificial intelligence and machine learning can be used to teach a computer new patterns.",
"fishshort-words-init2": "Let’s teach A.I. a new word by showing it examples of that type of fish.",
"fishshort-words-training-pause1": "Do you think A.I. has enough training data? You can click Continue to find out.",
"fishshort-words-training-pause2": "Great work! Keep training A.I. or continue when ready.",
"fishshort-predicting-init1": "With your training data, you have programmed A.I. to recognize “{word}” fish.",
"fishshort-predicting-init2": "Let's see A.I. identify “{word}” fish.",
"fishshort-pond-init1": "Based on your training, A.I. identified {n, plural,one {this} other {these}} fish as “{word}”. How did A.I. do? You can Train More if you want to improve the results.",
"fishshort-pond-init2": "Click on the info button to see what A.I. learned.",
"fishlong-words-init1": "Now let’s see if A.I. can learn a less obvious word.",
"fishlong-words-init2": "Let’s teach A.I. a word that depends on your opinion. It is up to you to pick fish that match your word.",
"fishlong-training-pause1": "Is it fair to use artificial intelligence to judge a fish by its looks? While AI might seem fair and neutral, its analysis comes from the training we provide. What unintended bias could this cause?",
"fishlong-training-pause2": "More training data will help A.I. learn your word. Keep training.",
"fishlong-training-pause3": "Each choice you make can help A.I. learn. Keep training.",
"fishlong-training-pause4": "Do you think A.I. has enough training data? A.I. will do better with a lot of data. Continue when you think A.I. is ready.",
"fishlong-training-many": "Wow. That's a lot of fish!",
"fishlong-predicting-init1": "With your training data, you have programmed A.I. to recognize “{word}” fish.",
"fishlong-predicting-init2": "Let’s see A.I. identify “{word}” fish.",
"fishlong-pond-init1": "Based on your training, A.I. identified {n, plural,one {this} other {these}} fish as “{word}”. How did A.I. do?",
"fishlong-pond-init2": "You can Train More if you want to improve the results.",
"fishlong-pond-init3": "Or you can teach A.I. a new word by choosing New Word.",
"didYouKnow": "Did you know?",
"continue": "Continue",
"training-generic-please-continue": "Great Work! Click Continue to see what A.I. has learned.",
"areYouSure": "Are you sure?",
"eraseWarning": "Erasing A.I.'s data will permanently delete all training. Is that what you want to do?",
"erase": "Erase",
"cancel": "Cancel",
"yes": "Yes",
"no": "No",
"notWord": "Not {word}",
"run": "Run",
"mostImportantParts": "These were the most important fish parts:",
"clickIndividualFish": "Click individual fish to see their information.",
"mostImportantPartsDescription": "These were the most important fish parts in determining whether this fish was “*{word}*” or “**{notWord}**”.",
"newWord": "New Word",
"finish": "Finish",
"trainMore": "Train More",
"wordQuestionShort": "What type of fish do you want to train A.I. to detect?",
"wordQuestionLong": "Choose a new word to teach A.I.",
"isThisFish": "Is this fish {word}?",
"isThisAFish": "Is this a fish?",
"doesThisBelongInWater": "Does this belong in the water?",
"fish": "Fish",
"waterCreature": "Water creature",
"blue": "Blue",
"green": "Green",
"red": "Red",
"circular": "Circular",
"rectangular": "Rectangular",
"triangular": "Triangular",
"angry": "Angry",
"awesome": "Awesome",
"delicious": "Delicious",
"endangered": "Endangered",
"fast": "Fast",
"fierce": "Fierce",
"fun": "Fun",
"glitchy": "Glitchy",
"happy": "Happy",
"hungry": "Hungry",
"playful": "Playful",
"scary": "Scary",
"silly": "Silly",
"spooky": "Spooky",
"wild": "Wild",
"dorsalFins": "dorsal fin",
"pectoralFinsFront": "pectoral fins",
"tails": "tail",
"bodies": "body",
"scales": "scales",
"eyes": "eyes",
"mouths": "mouth",
"colors": "colors",
"switchToMatchingItems": "Switch to Matching Items",
"switchToNonMatchingItems": "Switch to Non-Matching Items"
}
63 changes: 37 additions & 26 deletions src/oceans/components/scenes/pond/index.jsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import React from 'react'
import _ from "lodash";
import Radium from "radium";
import React from 'react';
import _ from 'lodash';
import Radium from 'radium';

import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faBan, faCheck, faInfo} from "@fortawesome/free-solid-svg-icons";
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faBan, faCheck, faInfo} from '@fortawesome/free-solid-svg-icons';

import {getState, setState} from "@ml/oceans/state";
import styles from "@ml/oceans/styles";
import I18n from "@ml/oceans/i18n";
import soundLibrary from "@ml/oceans/models/soundLibrary";
import {arrangeFish} from "@ml/oceans/models/pond";
import helpers, {$time} from "@ml/oceans/helpers";
import guide from "@ml/oceans/models/guide";
import constants, {AppMode, Modes} from "@ml/oceans/constants";
import {Body, Button} from "@ml/oceans/components/common";
import aiBotClosed from "@public/images/ai-bot/ai-bot-closed.png";
import modeHelpers from "@ml/oceans/modeHelpers";
import PondPanel from "@ml/oceans/components/scenes/pond/PondPanel";
import {getState, setState} from '@ml/oceans/state';
import styles from '@ml/oceans/styles';
import I18n from '@ml/oceans/i18n';
import soundLibrary from '@ml/oceans/models/soundLibrary';
import {arrangeFish} from '@ml/oceans/models/pond';
import helpers, {$time} from '@ml/oceans/helpers';
import guide from '@ml/oceans/models/guide';
import constants, {AppMode, Modes} from '@ml/oceans/constants';
import {Body, Button} from '@ml/oceans/components/common';
import aiBotClosed from '@public/images/ai-bot/ai-bot-closed.png';
import modeHelpers from '@ml/oceans/modeHelpers';
import PondPanel from '@ml/oceans/components/scenes/pond/PondPanel';

function Collide(x1, y1, w1, h1, x2, y2, w2, h2) {
// Detect a non-collision.
Expand All @@ -33,7 +33,6 @@ function Collide(x1, y1, w1, h1, x2, y2, w2, h2) {
return true;
}


let UnwrappedPond = class Pond extends React.Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -193,24 +192,36 @@ let UnwrappedPond = class Pond extends React.Component {
<Body>
<div onClick={this.onPondClick} style={styles.pondSurface} />
<div style={recallIconsStyle}>
<FontAwesomeIcon
icon={faCheck}
<button
type="button"
onClick={this.toggleRecall}
aria-label={I18n.t('switchToMatchingItems')}
style={{
...styles.recallIcon,
...{borderTopLeftRadius: 8, borderBottomLeftRadius: 8},
...(state.showRecallFish ? {} : styles.bgGreen)
}}
>
<FontAwesomeIcon
icon={faCheck}
style={{width: '100%', height: '100%'}}
/>
</button>
<button
type="button"
onClick={this.toggleRecall}
/>
<FontAwesomeIcon
icon={faBan}
aria-label={I18n.t('switchToNonMatchingItems')}
style={{
...styles.recallIcon,
...{borderTopRightRadius: 8, borderBottomRightRadius: 8},
...(state.showRecallFish ? styles.bgRed : {})
}}
onClick={this.toggleRecall}
/>
>
<FontAwesomeIcon
icon={faBan}
style={{width: '100%', height: '100%'}}
/>
</button>
</div>
{showInfoButton && (
<div
Expand All @@ -224,7 +235,7 @@ let UnwrappedPond = class Pond extends React.Component {
<FontAwesomeIcon icon={faInfo} style={styles.infoIcon} />
</div>
)}
<img style={styles.pondBot} src={aiBotClosed} alt=""/>
<img style={styles.pondBot} src={aiBotClosed} alt="" />
{state.canSkipPond && (
<div id="uitest-nav-btns">
{state.appMode === AppMode.FishLong ? (
Expand Down
Loading