Hello, the botframework-webchat-component module does not translate correctly to es-ES, after investigating the problem, I found that the file is-ES.js located in
% project% \ node_modules \ botframework-webchat-component \ lib \ Localization is not fully
translated, original file:
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function xMinutesAgo(date) {
var now = Date.now();
var deltaInMs = now - new Date(date).getTime();
var deltaInMinutes = Math.floor(deltaInMs / 60000);
var deltaInHours = Math.floor(deltaInMs / 3600000);
if (deltaInMinutes < 1) {
return 'Ahora';
} else if (deltaInMinutes === 1) {
return 'Hace un minuto';
} else if (deltaInHours < 1) {
return "Hace ".concat(deltaInMinutes, " minutos");
} else if (deltaInHours === 1) {
return "Hace una hora";
} else if (deltaInHours < 5) {
return "Hace ".concat(deltaInHours, " horas");
} else if (deltaInHours <= 24) {
return "Hoy";
} else if (deltaInHours <= 48) {
return "Ayer";
} else {
return new Intl.DateTimeFormat('es-ES').format(date);
}
}
var _default = {
FAILED_CONNECTION_NOTIFICATION: 'Imposible conectar.',
// Do not localize {Retry}; it is a placeholder for "Retry". English translation should be, "Send failed. Retry."
SEND_FAILED_KEY: 'No enviado. {Retry}.',
SLOW_CONNECTION_NOTIFICATION: 'Está tardando mucho en conectar.',
'X minutes ago': xMinutesAgo,
'Chat': 'Chat',
'Microphone off': 'Apagar micrófono',
'Microphone on': 'Encender micrófono',
'Download file': 'Descargar archivo',
'New messages': 'Nuevos mensajes',
'Listening…': 'Escuchando…',
'retry': 'reintentar',
'Retry': 'Reintentar',
// Please alter this value if 'Retry' at the beginning of a sentence is written differently than at the end of a sentence.
'Send': 'Enviar',
'Sending': 'Enviando',
'Speak': 'Hablar',
'Starting…': 'Comenzando',
'Tax': 'Impuestos',
'Total': 'Total',
'Type your message': 'Escribe tu mensaje...',
'Upload file': 'Subir archivo',
'VAT': 'IVA'
};
exports.default = _default;
Complete translated file:
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function botSaidSomething(avatarInitials, text, timestamp) {
return "El Bot ".concat(avatarInitials, " dijo, ").concat(text, ", ").concat(xMinutesAgo(timestamp));
}
function userSaidSomething(avatarInitials, text, timestamp) {
return "El usuario ".concat(avatarInitials, " dijo, ").concat(text, ", ").concat(xMinutesAgo(timestamp));
}
function xMinutesAgo(dateStr) {
var date = new Date(dateStr);
var dateTime = date.getTime();
if (isNaN(dateTime)) {
return dateStr;
}
var now = Date.now();
var deltaInMs = now - dateTime;
var deltaInMinutes = Math.floor(deltaInMs / 60000);
var deltaInHours = Math.floor(deltaInMs / 3600000);
if (deltaInMinutes < 1) {
return 'Ahora';
} else if (deltaInMinutes === 1) {
return 'Hace un minuto';
} else if (deltaInHours < 1) {
return "Hace ".concat(deltaInMinutes, " minutos");
} else if (deltaInHours === 1) {
return "Hace una hora";
} else if (deltaInHours < 5) {
return "Hace ".concat(deltaInHours, " horas");
} else if (deltaInHours <= 24) {
return "Hoy";
} else if (deltaInHours <= 48) {
return "Ayer";
} else if (window.Intl) {
return new Intl.DateTimeFormat('en-US').format(date);
} else {
return date.toLocaleString('en-US', {
day: '2-digit',
hour: '2-digit',
hour12: false,
minute: '2-digit',
month: '2-digit',
year: 'numeric'
});
}
}
var _default = {
FAILED_CONNECTION_NOTIFICATION: 'No se puede establecer conexion.',
// Do not localize {Retry}; it is a placeholder for "Retry". English translation should be, "Send failed. Retry."
SEND_FAILED_KEY: 'No enviado. {Retry}.',
SLOW_CONNECTION_NOTIFICATION: 'Tomando más de lo usuar para conectarse.',
'Bot said something': botSaidSomething,
'User said something': userSaidSomething,
'X minutes ago': xMinutesAgo,
// '[File of type '%1']': '[File of type '%1']",
// '[Unknown Card '%1']': '[Unknown Card '%1']',
'Adaptive Card parse error': 'Adaptive Card parse error',
'Adaptive Card render error': 'Adaptive Card render error',
'Chat': 'Chat',
'Download file': 'Descargar archivo',
'Microphone off': 'Apagar microfono',
'Microphone on': 'Encender microfono',
'Left': 'Izquierda',
'Listening…': 'Escuchando...',
'New messages': 'Nuevos mensajes',
'Right': 'Derecha',
'retry': 'reintentar',
'Retry': 'Reintentar',
'Send': 'Enviar',
'Sending': 'Enviando',
'Speak': 'Hablar',
'Starting…': 'Comenzando…',
'Tax': 'Impuesto',
'Total': 'Total',
'Type your message': 'Escribe tu mensaje...',
'Upload file': 'Subir archivo',
'VAT': 'IVA'
};
exports.default = _default;
example with original file:

example replacing original file by translated:

I would like the issue to be analyzed so that the full translation of the module is carried out and to avoid having to manually replace the file es-ES.js
Hello, the botframework-webchat-component module does not translate correctly to es-ES, after investigating the problem, I found that the file is-ES.js located in
% project% \ node_modules \ botframework-webchat-component \ lib \ Localization is not fully
translated, original file:
Complete translated file:
example with original file:

example replacing original file by translated:
I would like the issue to be analyzed so that the full translation of the module is carried out and to avoid having to manually replace the file es-ES.js