Skip to content

Commit

Permalink
Merge pull request #298 from jogrimst/master
Browse files Browse the repository at this point in the history
#295 Auto-generate StoryBook
  • Loading branch information
literacyapp authored Dec 4, 2016
2 parents d898807 + 6d575c6 commit c7f98f5
Showing 1 changed file with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,32 @@ public String handleRequest(Model model, HttpSession session) {
private List<StoryBook> generateStoryBooks(Locale locale) {
List<StoryBook> storyBooks = new ArrayList<>();

// TODO
StoryBook storyBook = new StoryBook();
storyBook.setLocale(locale.EN);
storyBook.setTimeLastUpdate(Calendar.getInstance());
storyBook.setTitle("Too Small");
List<String> paragraphs = new ArrayList<>();
paragraphs.add("\"Mom,\" called Lebo. \"Come and look. These clothes are all too small for me!\"");
paragraphs.add("\"Let me see,\" said Mom.");
paragraphs.add("\"Look at my skirt. It's too small,\" said Lebo.");
paragraphs.add("\"Yes, it is,\" said Mom. \"Nomsa can have your skirt.\"");
paragraphs.add("\"Look at my jeans. They are too small,\" said Lebo.");
paragraphs.add("\"Yes, they are,\" said Mom. \"Nomsa can have your jeans.");
paragraphs.add("\"Look at my T-shirt. It's too small,\" said Lebo.");
paragraphs.add("\"Yes, it is,\" said Mom. \"Nomsa can have your T-shirt.");
paragraphs.add("\"Look at my jersey. It is too small,\" said Lebo.");
paragraphs.add("\"Yes, it is,\" said Mom. \"We will give your jersey to Nomsa.\"");
paragraphs.add("\"Look at my raincoat. It's too small,\" said Lebo.");
paragraphs.add("\"Yes, it is. Nomsa can have your raincoat,\" said Mom.");
paragraphs.add("\"Look at my socks. They are too small,\" said Lebo.");
paragraphs.add("\"Yes, they certainly are,\" said Mom. \"Nomsa can have your socks.\"");
paragraphs.add("\"Look at my shoes. They are too small,\" said Lebo.");
paragraphs.add("\"Yes, they are,\" said Mom. \"Nomsa can have your shoes.\"");
paragraphs.add("\"Now you have lots of clothes,\" said Lebo.");
paragraphs.add("\"Oh, no, I don't,\" said Nomsa.");
paragraphs.add("\"These clothes are all too BIG for me!\"");
storyBook.setParagraphs(paragraphs);
storyBooks.add(storyBook);

return storyBooks;
}
Expand Down

0 comments on commit c7f98f5

Please sign in to comment.