diff --git a/i18n/lambda/index.js b/i18n/lambda/index.js index 933b1f5..1fc735a 100644 --- a/i18n/lambda/index.js +++ b/i18n/lambda/index.js @@ -14,7 +14,9 @@ const persistenceAdapter = require('ask-sdk-s3-persistence-adapter'); const i18n = require('i18next'); // We import a language strings object containing all of our strings. // The keys for each string will then be referenced in our code, e.g. handlerInput.t('WELCOME_MSG') -const languageStrings = require('./l10n'); +const languageStrings = require('./languageStrings'); +// We will use the moment.js package in order to make sure that we calculate the date correctly +const moment = require('moment-timezone'); ///////////////////////////////// // Handlers Definition @@ -26,31 +28,31 @@ const languageStrings = require('./l10n'); */ const HasBirthdayLaunchRequestHandler = { canHandle(handlerInput) { - const {attributesManager} = handlerInput; + const { attributesManager } = handlerInput; const sessionAttributes = attributesManager.getSessionAttributes() || {}; - + const year = sessionAttributes.hasOwnProperty('year') ? sessionAttributes.year : 0; const month = sessionAttributes.hasOwnProperty('month') ? sessionAttributes.month : 0; const day = sessionAttributes.hasOwnProperty('day') ? sessionAttributes.day : 0; - - return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest' - && year - && month + + return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest' + && year + && month && day; }, async handle(handlerInput) { - const {serviceClientFactory, requestEnvelope, attributesManager} = handlerInput; + const { serviceClientFactory, requestEnvelope, attributesManager } = handlerInput; const deviceId = Alexa.getDeviceId(requestEnvelope) const sessionAttributes = attributesManager.getSessionAttributes() || {}; - + const year = sessionAttributes.hasOwnProperty('year') ? sessionAttributes.year : 0; const month = sessionAttributes.hasOwnProperty('month') ? sessionAttributes.month : 0; const day = sessionAttributes.hasOwnProperty('day') ? sessionAttributes.day : 0; - + let userTimeZone; try { const upsServiceClient = serviceClientFactory.getUpsServiceClient(); - userTimeZone = await upsServiceClient.getSystemTimeZone(deviceId); + userTimeZone = await upsServiceClient.getSystemTimeZone(deviceId); } catch (error) { if (error.name !== 'ServiceError') { const errorSpeechText = handlerInput.t('ERROR_TIMEZONE_MSG'); @@ -59,38 +61,44 @@ const HasBirthdayLaunchRequestHandler = { console.log('error', error.message); } console.log('userTimeZone', userTimeZone); + + // getting the current date with the time set to the start of the day, aka 00:00AM + const currentDate = moment().tz(userTimeZone).startOf('day') + // getting the current year + const currentYear = currentDate.year(); - const oneDay = 24*60*60*1000; - - // getting the current date with the time - const locale = Alexa.getLocale(requestEnvelope); - const currentDateTime = new Date(new Date().toLocaleString(locale, {timeZone: userTimeZone})); - // removing the time from the date because it affects our difference calculation - const currentDate = new Date(currentDateTime.getFullYear(), currentDateTime.getMonth(), currentDateTime.getDate()); - let currentYear = currentDate.getFullYear(); - - console.log('currentDateTime:', currentDateTime); - console.log('currentDate:', currentDate); + console.log('currentDate:', currentDate.toString()); // getting the next birthday - let nextBirthday = Date.parse(`${month} ${day}, ${currentYear}`); - - // adjust the nextBirthday by one year if the current date is after their birthday - if (currentDate.getTime() > nextBirthday) { - nextBirthday = Date.parse(`${month} ${day}, ${currentYear + 1}`); - currentYear++; - } - + const dateStr = currentYear.toString() + ' ' + month + ' ' + day.toString(); + const locale = Alexa.getLocale(requestEnvelope); + let nextBirthday = moment(dateStr, 'YYYY MMM DD', locale); + console.log('nextBirthday:', nextBirthday.toString()) + + // calculate the difference between the current date and the next birthday + let diffDays = nextBirthday.diff(currentDate, 'days'); + // setting the default speakOutput to Happy xth Birthday!! // Alexa will automatically correct the ordinal for you. // no need to worry about when to use st, th, rd - const age = currentYear - year; - let speakOutput = handlerInput.t('HAPPY_BIRTHDAY_MSG', {count: age}); - if (currentDate.getTime() !== nextBirthday) { - const diffDays = Math.round(Math.abs((currentDate.getTime() - nextBirthday)/oneDay)); - speakOutput = handlerInput.t('WELCOME_BACK_MSG', {count: diffDays, age: age}); + let age = currentYear - year; + let speakOutput = handlerInput.t('HAPPY_BIRTHDAY_MSG', { age: age }); + + // checking if birthday is still to happen or... + if (diffDays > 0) { + speakOutput = handlerInput.t('WELCOME_BACK_MSG', { count: diffDays, age: age }); + } + // has already happened this year + else if (diffDays < 0) { + // in this case, add one year to the next birthday, + nextBirthday = nextBirthday.add(1, 'Y'); + // recalculate the difference, + diffDays = nextBirthday.diff(currentDate, 'days') + // and add on extra year to the age + age++ + speakOutput = handlerInput.t('WELCOME_BACK_MSG', { count: diffDays, age: age }); } - + return handlerInput.responseBuilder .speak(speakOutput) .getResponse(); @@ -107,7 +115,7 @@ const LaunchRequestHandler = { }, handle(handlerInput) { const speakOutput = handlerInput.t('WELCOME_MSG'); - const repromptOutput = handlerInput.t('WELCOME_REPROMPT_MSG'); + const repromptOutput = handlerInput.t('WELCOME_REPROMPT_MSG'); return handlerInput.responseBuilder .speak(speakOutput) @@ -126,25 +134,26 @@ const BirthdayIntentHandler = { && Alexa.getIntentName(handlerInput.requestEnvelope) === 'CaptureBirthdayIntent'; }, async handle(handlerInput) { - const {attributesManager, requestEnvelope} = handlerInput; + const { attributesManager, requestEnvelope } = handlerInput; const year = Alexa.getSlotValue(requestEnvelope, 'year'); const month = Alexa.getSlotValue(requestEnvelope, 'month'); const day = Alexa.getSlotValue(requestEnvelope, 'day'); - + const birthdayAttributes = { "year": year, "month": month, "day": day - + }; attributesManager.setPersistentAttributes(birthdayAttributes); - await attributesManager.savePersistentAttributes(); - - const speakOutput = handlerInput.t('REGISTER_BIRTHDAY_MSG', {month: month, day: day, year:year}); + await attributesManager.savePersistentAttributes(); + + const speakOutput = handlerInput.t('REGISTER_BIRTHDAY_MSG', { month: month, day: day, year: year }); return handlerInput.responseBuilder .speak(speakOutput) //.reprompt('add a reprompt if you want to keep the session open for the user to respond') + .withShouldEndSession(true) // force the skill to close the session after confirming the birthday date .getResponse(); } }; @@ -156,7 +165,7 @@ const BirthdayIntentHandler = { const HelpIntentHandler = { canHandle(handlerInput) { return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest' - && Alexa.getIntentName(handlerInput.requestEnvelope) ==='AMAZON.HelpIntent'; + && Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.HelpIntent'; }, handle(handlerInput) { const speakOutput = handlerInput.t('HELP_MSG'); @@ -213,7 +222,7 @@ const IntentReflectorHandler = { }, handle(handlerInput) { const intentName = Alexa.getIntentName(handlerInput.requestEnvelope); - const speakOutput = handlerInput.t('REFLECTOR_MSG', {intentName: intentName}); + const speakOutput = handlerInput.t('REFLECTOR_MSG', { intentName: intentName }); return handlerInput.responseBuilder .speak(speakOutput) @@ -251,16 +260,18 @@ const ErrorHandler = { */ const LoggingRequestInterceptor = { process(handlerInput) { - console.log(`Incoming request: ${JSON.stringify(handlerInput.requestEnvelope)}`); + console.log("\n" + "********** REQUEST *********\n" + + JSON.stringify(handlerInput, null, 4)); } }; /** - * This response interceptor will log all outgoing responses in the associated Logs (CloudWatch) of the AWS Lambda functions + * This response interceptor will log outgoing responses if any in the associated Logs (CloudWatch) of the AWS Lambda functions */ const LoggingResponseInterceptor = { process(handlerInput, response) { - console.log(`Outgoing response: ${JSON.stringify(response)}`); + if (response) console.log("\n" + "************* RESPONSE **************\n" + + JSON.stringify(response, null, 4)); } }; @@ -287,13 +298,13 @@ const LocalisationRequestInterceptor = { * */ const LoadBirthdayInterceptor = { async process(handlerInput) { - const {attributesManager} = handlerInput; + const { attributesManager } = handlerInput; const sessionAttributes = await attributesManager.getPersistentAttributes() || {}; - + const year = sessionAttributes.hasOwnProperty('year') ? sessionAttributes.year : 0; const month = sessionAttributes.hasOwnProperty('month') ? sessionAttributes.month : 0; const day = sessionAttributes.hasOwnProperty('day') ? sessionAttributes.day : 0; - + if (year && month && day) { attributesManager.setSessionAttributes(sessionAttributes); } @@ -311,7 +322,7 @@ const LoadBirthdayInterceptor = { */ exports.handler = Alexa.SkillBuilders.custom() .withPersistenceAdapter( - new persistenceAdapter.S3PersistenceAdapter({bucketName:process.env.S3_PERSISTENCE_BUCKET}) + new persistenceAdapter.S3PersistenceAdapter({ bucketName: process.env.S3_PERSISTENCE_BUCKET }) ) .addRequestHandlers( HasBirthdayLaunchRequestHandler, @@ -331,4 +342,4 @@ exports.handler = Alexa.SkillBuilders.custom() .addResponseInterceptors( LoggingResponseInterceptor) .withApiClient(new Alexa.DefaultApiClient()) - .lambda(); + .lambda(); \ No newline at end of file diff --git a/i18n/lambda/l10n.js b/i18n/lambda/languageStrings.js similarity index 100% rename from i18n/lambda/l10n.js rename to i18n/lambda/languageStrings.js diff --git a/i18n/lambda/package.json b/i18n/lambda/package.json index 2878a17..512e381 100644 --- a/i18n/lambda/package.json +++ b/i18n/lambda/package.json @@ -13,6 +13,7 @@ "ask-sdk-model": "^1.4.1", "aws-sdk": "^2.326.0", "ask-sdk-s3-persistence-adapter": "^2.0.0", - "i18next": "^15.0.5" + "i18next": "^15.0.5", + "moment-timezone": "^0.5.27" } - } \ No newline at end of file + } diff --git a/i18n/models/en-AU.json b/i18n/models/en-AU.json index 5b34280..38769bf 100644 --- a/i18n/models/en-AU.json +++ b/i18n/models/en-AU.json @@ -1,7 +1,7 @@ { "interactionModel": { "languageModel": { - "invocationName": "cake walk", + "invocationName": "cakewalk", "intents": [ { "name": "AMAZON.CancelIntent", diff --git a/i18n/models/en-CA.json b/i18n/models/en-CA.json index 5a0b593..724e809 100644 --- a/i18n/models/en-CA.json +++ b/i18n/models/en-CA.json @@ -1,7 +1,7 @@ { "interactionModel": { "languageModel": { - "invocationName": "cake walk", + "invocationName": "cakewalk", "intents": [ { "name": "AMAZON.CancelIntent", diff --git a/i18n/models/en-GB.json b/i18n/models/en-GB.json index 5a0b593..40ca8c2 100644 --- a/i18n/models/en-GB.json +++ b/i18n/models/en-GB.json @@ -1,124 +1,124 @@ { - "interactionModel": { - "languageModel": { - "invocationName": "cake walk", - "intents": [ - { - "name": "AMAZON.CancelIntent", - "samples": [] - }, - { - "name": "AMAZON.HelpIntent", - "samples": [] - }, - { - "name": "AMAZON.StopIntent", - "samples": [] - }, - { - "name": "AMAZON.NavigateHomeIntent", - "samples": [] - }, - { - "name": "CaptureBirthdayIntent", - "slots": [ - { - "name": "month", - "type": "AMAZON.Month" - }, - { - "name": "day", - "type": "AMAZON.Ordinal" - }, - { - "name": "year", - "type": "AMAZON.FOUR_DIGIT_NUMBER" - } - ], - "samples": [ - "{month} {day}", - "{month} {day} {year}", - "{month} {year}", - "I was born on {month} {day} ", - "I was born on {month} {day} {year}", - "I was born on {month} {year}", - "register my birthday" - ] - } - ], - "types": [] - }, - "dialog": { - "intents": [ - { - "name": "CaptureBirthdayIntent", - "confirmationRequired": false, - "prompts": {}, - "slots": [ - { - "name": "month", - "type": "AMAZON.Month", - "confirmationRequired": false, - "elicitationRequired": true, - "prompts": { - "elicitation": "Elicit.Slot.303899476312.795077103633" - } - }, - { - "name": "day", - "type": "AMAZON.Ordinal", - "confirmationRequired": false, - "elicitationRequired": true, - "prompts": { - "elicitation": "Elicit.Slot.303899476312.985837334781" - } - }, - { - "name": "year", - "type": "AMAZON.FOUR_DIGIT_NUMBER", - "confirmationRequired": false, - "elicitationRequired": true, - "prompts": { - "elicitation": "Elicit.Slot.303899476312.27341833344" - } - } - ] - } - ], - "delegationStrategy": "ALWAYS" - }, - "prompts": [ - { - "id": "Elicit.Slot.303899476312.795077103633", - "variations": [ - { - "type": "PlainText", - "value": "I was born in November. What month were you born?" - }, - { - "type": "PlainText", - "value": "What month were you born?" - } - ] - }, - { - "id": "Elicit.Slot.303899476312.985837334781", - "variations": [ - { - "type": "PlainText", - "value": "I was born on the sixth. What day were you born?" - } - ] - }, - { - "id": "Elicit.Slot.303899476312.27341833344", - "variations": [ - { - "type": "PlainText", - "value": "I was born in two thousand fourteen, what year were you born?" - } - ] - } - ] - } + "interactionModel": { + "languageModel": { + "invocationName": "cakewalk", + "intents": [ + { + "name": "AMAZON.CancelIntent", + "samples": [] + }, + { + "name": "AMAZON.HelpIntent", + "samples": [] + }, + { + "name": "AMAZON.StopIntent", + "samples": [] + }, + { + "name": "AMAZON.NavigateHomeIntent", + "samples": [] + }, + { + "name": "CaptureBirthdayIntent", + "slots": [ + { + "name": "month", + "type": "AMAZON.Month" + }, + { + "name": "day", + "type": "AMAZON.Ordinal" + }, + { + "name": "year", + "type": "AMAZON.FOUR_DIGIT_NUMBER" + } + ], + "samples": [ + "{month} {day}", + "{month} {day} {year}", + "{month} {year}", + "I was born on {month} {day} ", + "I was born on {month} {day} {year}", + "I was born on {month} {year}", + "register my birthday" + ] + } + ], + "types": [] + }, + "dialog": { + "intents": [ + { + "name": "CaptureBirthdayIntent", + "confirmationRequired": false, + "prompts": {}, + "slots": [ + { + "name": "month", + "type": "AMAZON.Month", + "confirmationRequired": false, + "elicitationRequired": true, + "prompts": { + "elicitation": "Elicit.Slot.303899476312.795077103633" + } + }, + { + "name": "day", + "type": "AMAZON.Ordinal", + "confirmationRequired": false, + "elicitationRequired": true, + "prompts": { + "elicitation": "Elicit.Slot.303899476312.985837334781" + } + }, + { + "name": "year", + "type": "AMAZON.FOUR_DIGIT_NUMBER", + "confirmationRequired": false, + "elicitationRequired": true, + "prompts": { + "elicitation": "Elicit.Slot.303899476312.27341833344" + } + } + ] + } + ], + "delegationStrategy": "ALWAYS" + }, + "prompts": [ + { + "id": "Elicit.Slot.303899476312.795077103633", + "variations": [ + { + "type": "PlainText", + "value": "I was born in November. What month were you born?" + }, + { + "type": "PlainText", + "value": "What month were you born?" + } + ] + }, + { + "id": "Elicit.Slot.303899476312.985837334781", + "variations": [ + { + "type": "PlainText", + "value": "I was born on the sixth. What day were you born?" + } + ] + }, + { + "id": "Elicit.Slot.303899476312.27341833344", + "variations": [ + { + "type": "PlainText", + "value": "I was born in two thousand fourteen, what year were you born?" + } + ] + } + ] + } } \ No newline at end of file diff --git a/i18n/models/en-IN.json b/i18n/models/en-IN.json index 0f0e44e..50e419a 100644 --- a/i18n/models/en-IN.json +++ b/i18n/models/en-IN.json @@ -1,7 +1,7 @@ { "interactionModel": { "languageModel": { - "invocationName": "cake walk", + "invocationName": "cakewalk", "intents": [ { "name": "AMAZON.CancelIntent", diff --git a/i18n/models/en-US.json b/i18n/models/en-US.json index 5a0b593..1988b7f 100644 --- a/i18n/models/en-US.json +++ b/i18n/models/en-US.json @@ -1,124 +1,120 @@ { - "interactionModel": { - "languageModel": { - "invocationName": "cake walk", - "intents": [ - { - "name": "AMAZON.CancelIntent", - "samples": [] - }, - { - "name": "AMAZON.HelpIntent", - "samples": [] - }, - { - "name": "AMAZON.StopIntent", - "samples": [] - }, - { - "name": "AMAZON.NavigateHomeIntent", - "samples": [] - }, - { - "name": "CaptureBirthdayIntent", - "slots": [ - { - "name": "month", - "type": "AMAZON.Month" - }, - { - "name": "day", - "type": "AMAZON.Ordinal" - }, - { - "name": "year", - "type": "AMAZON.FOUR_DIGIT_NUMBER" - } - ], - "samples": [ - "{month} {day}", - "{month} {day} {year}", - "{month} {year}", - "I was born on {month} {day} ", - "I was born on {month} {day} {year}", - "I was born on {month} {year}", - "register my birthday" - ] - } - ], - "types": [] + "interactionModel": { + "languageModel": { + "invocationName": "cake walk", + "intents": [ + { + "name": "AMAZON.CancelIntent", + "samples": [] }, - "dialog": { - "intents": [ - { - "name": "CaptureBirthdayIntent", - "confirmationRequired": false, - "prompts": {}, - "slots": [ - { - "name": "month", - "type": "AMAZON.Month", - "confirmationRequired": false, - "elicitationRequired": true, - "prompts": { - "elicitation": "Elicit.Slot.303899476312.795077103633" - } - }, - { - "name": "day", - "type": "AMAZON.Ordinal", - "confirmationRequired": false, - "elicitationRequired": true, - "prompts": { - "elicitation": "Elicit.Slot.303899476312.985837334781" - } - }, - { - "name": "year", - "type": "AMAZON.FOUR_DIGIT_NUMBER", - "confirmationRequired": false, - "elicitationRequired": true, - "prompts": { - "elicitation": "Elicit.Slot.303899476312.27341833344" - } - } - ] - } - ], - "delegationStrategy": "ALWAYS" + { + "name": "AMAZON.HelpIntent", + "samples": [] }, - "prompts": [ + { + "name": "AMAZON.StopIntent", + "samples": [] + }, + { + "name": "AMAZON.NavigateHomeIntent", + "samples": [] + }, + { + "name": "CaptureBirthdayIntent", + "slots": [ + { + "name": "month", + "type": "AMAZON.Month" + }, + { + "name": "day", + "type": "AMAZON.Ordinal" + }, + { + "name": "year", + "type": "AMAZON.FOUR_DIGIT_NUMBER" + } + ], + "samples": [ + "I was born in {month} {year}", + "I was born on {month} {day} {year}", + "I was born on {month} {day}", + "{month} {year}", + "{month} {day} {year}", + "{month} {day}" + ] + } + ], + "types": [] + }, + "dialog": { + "intents": [ + { + "name": "CaptureBirthdayIntent", + "confirmationRequired": false, + "prompts": {}, + "slots": [ { - "id": "Elicit.Slot.303899476312.795077103633", - "variations": [ - { - "type": "PlainText", - "value": "I was born in November. What month were you born?" - }, - { - "type": "PlainText", - "value": "What month were you born?" - } - ] + "name": "month", + "type": "AMAZON.Month", + "elicitationRequired": true, + "confirmationRequired": false, + "prompts": { + "elicitation": "Elicit.Slot.1545633524831.1347716407493" + } }, { - "id": "Elicit.Slot.303899476312.985837334781", - "variations": [ - { - "type": "PlainText", - "value": "I was born on the sixth. What day were you born?" - } - ] + "name": "day", + "type": "AMAZON.Ordinal", + "elicitationRequired": true, + "confirmationRequired": false, + "prompts": { + "elicitation": "Elicit.Slot.1545633524831.190084519655" + } }, { - "id": "Elicit.Slot.303899476312.27341833344", - "variations": [ - { - "type": "PlainText", - "value": "I was born in two thousand fourteen, what year were you born?" - } - ] + "name": "year", + "type": "AMAZON.FOUR_DIGIT_NUMBER", + "elicitationRequired": true, + "confirmationRequired": false, + "prompts": { + "elicitation": "Elicit.Slot.1545633524831.788317813173" + } } + ] + } + ], + "delegationStrategy": "ALWAYS" + }, + "prompts": [ + { + "id": "Elicit.Slot.1545633524831.1347716407493", + "variations": [ + { + "type": "PlainText", + "value": "What month were you born in?" + } + ] + }, + { + "id": "Elicit.Slot.1545633524831.190084519655", + "variations": [ + { + "type": "PlainText", + "value": "Which day were you born on?" + } + ] + }, + { + "id": "Elicit.Slot.1545633524831.788317813173", + "variations": [ + { + "type": "PlainText", + "value": "Which year were you born on?" + } ] - } -} \ No newline at end of file + } + ] + }, + "version": "5" +} diff --git a/i18n/models/es-ES.json b/i18n/models/es-ES.json index d6146d0..89358c9 100644 --- a/i18n/models/es-ES.json +++ b/i18n/models/es-ES.json @@ -28,11 +28,11 @@ }, { "name": "day", - "type": "AMAZON.Number" + "type": "AMAZON.NUMBER" }, { "name": "year", - "type": "AMAZON.Number" + "type": "AMAZON.FOUR_DIGIT_NUMBER" } ], "samples": [ @@ -41,7 +41,6 @@ "el año {year}", "en {year}", "nací en {year}", - "nací en {year}", "el {day} de {month}", "el día {day} de {month}", "mi fecha de nacimiento es el {day} de {month} de {year}", @@ -78,7 +77,7 @@ }, { "name": "day", - "type": "AMAZON.Ordinal", + "type": "AMAZON.NUMBER", "confirmationRequired": false, "elicitationRequired": true, "prompts": { @@ -118,7 +117,7 @@ "variations": [ { "type": "PlainText", - "value": "Nací el 6. Qué día del mes es tu cumpleaños?" + "value": "Nací el seis. Qué día del mes es tu cumpleaños?" } ] }, diff --git a/i18n/models/es-MX.json b/i18n/models/es-MX.json index d6146d0..e23480d 100644 --- a/i18n/models/es-MX.json +++ b/i18n/models/es-MX.json @@ -28,11 +28,11 @@ }, { "name": "day", - "type": "AMAZON.Number" + "type": "AMAZON.NUMBER" }, { "name": "year", - "type": "AMAZON.Number" + "type": "AMAZON.FOUR_DIGIT_NUMBER" } ], "samples": [ @@ -78,7 +78,7 @@ }, { "name": "day", - "type": "AMAZON.Ordinal", + "type": "AMAZON.NUMBER", "confirmationRequired": false, "elicitationRequired": true, "prompts": { @@ -133,4 +133,4 @@ } ] } -} +} \ No newline at end of file diff --git a/i18n/models/es-US.json b/i18n/models/es-US.json index d6146d0..d361b40 100644 --- a/i18n/models/es-US.json +++ b/i18n/models/es-US.json @@ -28,11 +28,11 @@ }, { "name": "day", - "type": "AMAZON.Number" + "type": "AMAZON.NUMBER" }, { "name": "year", - "type": "AMAZON.Number" + "type": "AMAZON.FOUR_DIGIT_NUMBER" } ], "samples": [ @@ -78,7 +78,7 @@ }, { "name": "day", - "type": "AMAZON.Ordinal", + "type": "AMAZON.NUMBER", "confirmationRequired": false, "elicitationRequired": true, "prompts": { diff --git a/i18n/models/fr-CA.json b/i18n/models/fr-CA.json index d5c3e89..7e5f726 100644 --- a/i18n/models/fr-CA.json +++ b/i18n/models/fr-CA.json @@ -46,7 +46,7 @@ }, { "name": "year", - "type": "AMAZON.NUMBER", + "type": "AMAZON.FOUR_DIGIT_NUMBER", "samples": [ "je suis né en {year}", "mon année de naissance est {year}", @@ -113,7 +113,7 @@ }, { "name": "year", - "type": "AMAZON.NUMBER", + "type": "AMAZON.FOUR_DIGIT_NUMBER", "confirmationRequired": false, "elicitationRequired": true, "prompts": { diff --git a/i18n/models/fr-FR.json b/i18n/models/fr-FR.json index ab5b6b1..775bd34 100644 --- a/i18n/models/fr-FR.json +++ b/i18n/models/fr-FR.json @@ -46,7 +46,7 @@ }, { "name": "year", - "type": "AMAZON.NUMBER", + "type": "AMAZON.FOUR_DIGIT_NUMBER", "samples": [ "je suis né en {year}", "mon année de naissance est {year}", @@ -109,7 +109,7 @@ }, { "name": "year", - "type": "AMAZON.NUMBER", + "type": "AMAZON.FOUR_DIGIT_NUMBER", "confirmationRequired": false, "elicitationRequired": true, "prompts": { diff --git a/i18n/models/it-IT.json b/i18n/models/it-IT.json index 73b9c49..a51c082 100644 --- a/i18n/models/it-IT.json +++ b/i18n/models/it-IT.json @@ -24,15 +24,22 @@ "slots": [ { "name": "month", - "type": "AMAZON.Month" + "type": "AMAZON.Month", + "samples": [ + "sono nata a {month}", + "sono nato a {month}", + "sono nato ad {month}", + "il mese di {month}", + "{month}" + ] }, { "name": "day", - "type": "AMAZON.Number" + "type": "AMAZON.NUMBER" }, { "name": "year", - "type": "AMAZON.Number" + "type": "AMAZON.FOUR_DIGIT_NUMBER" } ], "samples": [ @@ -78,7 +85,7 @@ }, { "name": "day", - "type": "AMAZON.Ordinal", + "type": "AMAZON.NUMBER", "confirmationRequired": false, "elicitationRequired": true, "prompts": { @@ -87,7 +94,7 @@ }, { "name": "year", - "type": "AMAZON.FOUR_DIGIT_NUMBER", + "type": "AMAZON.NUMBER", "confirmationRequired": false, "elicitationRequired": true, "prompts": { @@ -118,7 +125,11 @@ "variations": [ { "type": "PlainText", - "value": "Sono nata il 6. Che giorno del mese è il tuo compleanno?" +<<<<<<< HEAD + "value": "Io sono nata il sei. Che giorno del mese è il tuo compleanno?" +======= + "value": "Sono nata il seis. Che giorno del mese è il tuo compleanno?" +>>>>>>> perfomed multiple fixes; details on the Pull Request description } ] }, @@ -133,4 +144,4 @@ } ] } -} +} \ No newline at end of file diff --git a/i18n/skill.json b/i18n/skill.json index 0fc996a..60d251d 100644 --- a/i18n/skill.json +++ b/i18n/skill.json @@ -2,42 +2,48 @@ "manifest": { "publishingInformation": { "locales": { - "en-US": { + "de-DE": { + "name": "Herzlichen Glückwunsch" + }, + "en-AU": { + "name": "Cake Walk" + }, + "en-CA": { "name": "Cake Walk" }, "en-GB": { "name": "Cake Walk" }, - "en-CA": { + "en-IN": { "name": "Cake Walk" }, - "fr-FR": { - "name": "Joyeux Anniversaire" + "en-US": { + "name": "Cake Walk" + }, + "es-ES": { + "name": "Feliz Cumpleaños" + }, + "es-MX": { + "name": "Feliz Cumpleaños" + }, + "es-US": { + "name": "Feliz Cumpleaños" }, "fr-CA": { "name": "Bonne Fête" }, + "fr-FR": { + "name": "Joyeux Anniversaire" + }, + "hi-IN": { + "name": "Cake Walk" + }, "it-IT": { "name": "Buon Compleanno" }, "ja-JP": { "name": "ケークウォーク" }, - "en-IN": { - "name": "cake walk" - }, - "hi-IN": { - "name": "cake walk" - }, - "es-ES": { - "name": "feliz cumpleaños" - }, - "es-MX": { - "name": "feliz cumpleaños" - }, - "es-US": { - "name": "feliz cumpleaños" - }, "pt-BR": { "name": "Feliz Aniversário" }, @@ -60,4 +66,4 @@ }, "manifestVersion": "1.0" } -} +} \ No newline at end of file