Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#295 Auto-generate StoryBook #298

Merged
merged 2 commits into from
Dec 4, 2016
Merged
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
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