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
51 changes: 5 additions & 46 deletions lambda/custom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const recipes = require('./recipes');
const i18n = require('i18next');
const sprintf = require('i18next-sprintf-postprocessor');


/* INTENT HANDLERS */
const LaunchRequestHandler = {
canHandle(handlerInput) {
Expand Down Expand Up @@ -163,52 +164,10 @@ const ErrorHandler = {
/* CONSTANTS */
const skillBuilder = Alexa.SkillBuilders.custom();
const languageStrings = {
en: {
translation: {
RECIPES: recipes.RECIPE_EN_US,
SKILL_NAME: 'Minecraft Helper',
WELCOME_MESSAGE: 'Welcome to %s. You can ask a question like, what\'s the recipe for a %s? ... Now, what can I help you with?',
WELCOME_REPROMPT: 'For instructions on what you can say, please say help me.',
DISPLAY_CARD_TITLE: '%s - Recipe for %s.',
HELP_MESSAGE: 'You can ask questions such as, what\'s the recipe for a %s, or, you can say exit...Now, what can I help you with?',
HELP_REPROMPT: 'You can say things like, what\'s the recipe for a %s, or you can say exit...Now, what can I help you with?',
STOP_MESSAGE: 'Goodbye!',
RECIPE_REPEAT_MESSAGE: 'Try saying repeat.',
RECIPE_NOT_FOUND_MESSAGE: 'I\'m sorry, I currently do not know ',
RECIPE_NOT_FOUND_WITH_ITEM_NAME: 'the recipe for %s. ',
RECIPE_NOT_FOUND_WITHOUT_ITEM_NAME: 'that recipe. ',
RECIPE_NOT_FOUND_REPROMPT: 'What else can I help with?'
},
},
'en-US': {
translation: {
RECIPES: recipes.RECIPE_EN_US,
SKILL_NAME: 'American Minecraft Helper'
},
},
'en-GB': {
translation: {
RECIPES: recipes.RECIPE_EN_GB,
SKILL_NAME: 'British Minecraft Helper'
},
},
de: {
translation: {
RECIPES: recipes.RECIPE_DE_DE,
SKILL_NAME: 'Assistent für Minecraft in Deutsch',
WELCOME_MESSAGE: 'Willkommen bei %s. Du kannst beispielsweise die Frage stellen: Welche Rezepte gibt es für eine %s? ... Nun, womit kann ich dir helfen?',
WELCOME_REPROMPT: 'Wenn du wissen möchtest, was du sagen kannst, sag einfach „Hilf mir“.',
DISPLAY_CARD_TITLE: '%s - Rezept für %s.',
HELP_MESSAGE: 'Du kannst beispielsweise Fragen stellen wie „Wie geht das Rezept für eine %s“ oder du kannst „Beenden“ sagen ... Wie kann ich dir helfen?',
HELP_REPROMPT: 'Du kannst beispielsweise Sachen sagen wie „Wie geht das Rezept für eine %s“ oder du kannst „Beenden“ sagen ... Wie kann ich dir helfen?',
STOP_MESSAGE: 'Auf Wiedersehen!',
RECIPE_REPEAT_MESSAGE: 'Sage einfach „Wiederholen“.',
RECIPE_NOT_FOUND_MESSAGE: 'Tut mir leid, ich kenne derzeit ',
RECIPE_NOT_FOUND_WITH_ITEM_NAME: 'das Rezept für %s nicht. ',
RECIPE_NOT_FOUND_WITHOUT_ITEM_NAME: 'dieses Rezept nicht. ',
RECIPE_NOT_FOUND_REPROMPT: 'Womit kann ich dir sonst helfen?'
},
},
'en': require('languages/en.js'),
'en-US': require('languages/en-US.js'),
'en-GB': require('languages/en-GB.js'),
'de': require('languages/de.js')
};

// Finding the locale of the user
Expand Down
21 changes: 21 additions & 0 deletions lambda/custom/languages/de.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const recipes = require('../recipes');
const i18n = require('i18next');
const sprintf = require('i18next-sprintf-postprocessor');

module.exports = {
translation: {
RECIPES: recipes.RECIPE_DE_DE,
SKILL_NAME: 'Assistent für Minecraft in Deutsch',
WELCOME_MESSAGE: 'Willkommen bei %s. Du kannst beispielsweise die Frage stellen: Welche Rezepte gibt es für eine %s? ... Nun, womit kann ich dir helfen?',
WELCOME_REPROMPT: 'Wenn du wissen möchtest, was du sagen kannst, sag einfach „Hilf mir“.',
DISPLAY_CARD_TITLE: '%s - Rezept für %s.',
HELP_MESSAGE: 'Du kannst beispielsweise Fragen stellen wie „Wie geht das Rezept für eine %s“ oder du kannst „Beenden“ sagen ... Wie kann ich dir helfen?',
HELP_REPROMPT: 'Du kannst beispielsweise Sachen sagen wie „Wie geht das Rezept für eine %s“ oder du kannst „Beenden“ sagen ... Wie kann ich dir helfen?',
STOP_MESSAGE: 'Auf Wiedersehen!',
RECIPE_REPEAT_MESSAGE: 'Sage einfach „Wiederholen“.',
RECIPE_NOT_FOUND_MESSAGE: 'Tut mir leid, ich kenne derzeit ',
RECIPE_NOT_FOUND_WITH_ITEM_NAME: 'das Rezept für %s nicht. ',
RECIPE_NOT_FOUND_WITHOUT_ITEM_NAME: 'dieses Rezept nicht. ',
RECIPE_NOT_FOUND_REPROMPT: 'Womit kann ich dir sonst helfen?'
}
}
10 changes: 10 additions & 0 deletions lambda/custom/languages/en-GB.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const recipes = require('../recipes');
const i18n = require('i18next');
const sprintf = require('i18next-sprintf-postprocessor');

module.exports = {
translation: {
RECIPES: recipes.RECIPE_EN_GB,
SKILL_NAME: 'British Minecraft Helper'
}
}
10 changes: 10 additions & 0 deletions lambda/custom/languages/en-US.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const recipes = require('../recipes');
const i18n = require('i18next');
const sprintf = require('i18next-sprintf-postprocessor');

module.exports = {
translation: {
RECIPES: recipes.RECIPE_EN_US,
SKILL_NAME: 'American Minecraft Helper'
}
}
21 changes: 21 additions & 0 deletions lambda/custom/languages/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const recipes = require('../recipes');
const i18n = require('i18next');
const sprintf = require('i18next-sprintf-postprocessor');

module.exports = {
translation: {
RECIPES: recipes.RECIPE_EN_US,
SKILL_NAME: 'Minecraft Helper',
WELCOME_MESSAGE: 'Welcome to %s. You can ask a question like, what\'s the recipe for a %s? ... Now, what can I help you with?',
WELCOME_REPROMPT: 'For instructions on what you can say, please say help me.',
DISPLAY_CARD_TITLE: '%s - Recipe for %s.',
HELP_MESSAGE: 'You can ask questions such as, what\'s the recipe for a %s, or, you can say exit...Now, what can I help you with?',
HELP_REPROMPT: 'You can say things like, what\'s the recipe for a %s, or you can say exit...Now, what can I help you with?',
STOP_MESSAGE: 'Goodbye!',
RECIPE_REPEAT_MESSAGE: 'Try saying repeat.',
RECIPE_NOT_FOUND_MESSAGE: 'I\'m sorry, I currently do not know ',
RECIPE_NOT_FOUND_WITH_ITEM_NAME: 'the recipe for %s. ',
RECIPE_NOT_FOUND_WITHOUT_ITEM_NAME: 'that recipe. ',
RECIPE_NOT_FOUND_REPROMPT: 'What else can I help with?'
}
}