diff --git a/imports/api/Notifications/server/publications.js b/imports/api/Notifications/server/publications.js index a67cfa6..83ceaaf 100644 --- a/imports/api/Notifications/server/publications.js +++ b/imports/api/Notifications/server/publications.js @@ -5,6 +5,6 @@ import Notifications from '../Notifications'; Meteor.publish('mynotifications', function notifications() { const notif = Notifications.find({ userId: this.userId, type: 'web', webNotified: null }); - console.log(`Notifications for user ${this.userId}: ${notif.count()}`); + // console.log(`Notifications for user ${this.userId}: ${notif.count()}`); return notif; }); diff --git a/imports/api/Users/server/send-welcome-email.js b/imports/api/Users/server/send-welcome-email.js index 6a19a1a..3c11679 100644 --- a/imports/api/Users/server/send-welcome-email.js +++ b/imports/api/Users/server/send-welcome-email.js @@ -1,17 +1,20 @@ +import i18n from 'i18next'; import sendEmail from '../../../modules/server/send-email'; import getOAuthProfile from '../../../modules/get-oauth-profile'; export default (options, user) => { const OAuthProfile = getOAuthProfile(options, user); - const applicationName = '¡Tod@s contra el Fuego!'; + const applicationName = i18n.t('AppName'); const firstName = OAuthProfile ? OAuthProfile.name.first : options.profile.name.first; const emailAddress = OAuthProfile ? OAuthProfile.email : options.email; + const { lang } = user.lang; return sendEmail({ to: emailAddress, from: `${applicationName} `, subject: `[${applicationName}] Welcome, ${firstName}!`, + lang, template: 'welcome', templateVars: { applicationName, diff --git a/imports/api/Utility/server/files.js b/imports/api/Utility/server/files.js new file mode 100644 index 0000000..3e223be --- /dev/null +++ b/imports/api/Utility/server/files.js @@ -0,0 +1,26 @@ +import fs from 'fs'; + +const as = f => `assets/app/${f}`; + +export const getFallbackLang = (lang) => { + if (lang === 'ast' || lang === 'gl' || lang === 'eu' || lang === 'ca') { + return 'es'; + } + return 'en'; +}; + + +export const getFileNameOfLang = (dir, fileName, ext, lang) => { + const base = `${dir}/${fileName}`; + const fallback = getFallbackLang(lang); + let file = `${base}-${lang}.${ext}`; + if (!fs.existsSync(as(file))) { + console.log(`Page '${fileName}' not found for '${lang}' lang`); + file = `${base}-${fallback}.${ext}`; + if (!fs.existsSync(as(file))) { + console.log(`Page '${fileName}' not found for '${fallback}' lang`); + file = `${base}.${ext}`; + } + } + return file; +}; diff --git a/imports/modules/server/send-email.js b/imports/modules/server/send-email.js index 79e8d85..5c131e4 100644 --- a/imports/modules/server/send-email.js +++ b/imports/modules/server/send-email.js @@ -1,15 +1,24 @@ import { Meteor } from 'meteor/meteor'; -import { Email } from 'meteor/email'; +// import { Email } from 'meteor/email'; import getPrivateFile from './get-private-file'; import templateToText from './handlebars-email-to-text'; import templateToHTML from './handlebars-email-to-html'; +import { getFileNameOfLang } from '/imports/api/Utility/server/files.js'; +import sendMail from '/imports/startup/server/email'; +import i18n from 'i18next'; const sendEmail = (options, { resolve, reject }) => { try { Meteor.defer(() => { - // TODO: replace with import sendMail from '/imports/startup/server/email'; - console.log(`Email options: ${options}`); - Email.send(options); + // Meteor email options: + // basic: from, to/cc/bcc/replyTo, subject, html, text, + // others: watchHtml, icalEvent, headers, attachments, mailComposer, inReplyTo, references, messageId + const opts = options; + opts.template = '

{{appName}}

{{{html}}}'; + opts.appName = i18n.t('AppName'); + // console.log(`Email options: ${JSON.stringify(opts)}`); + sendMail(opts, true); + // Email.send(options); resolve(); }); } catch (exception) { @@ -18,14 +27,14 @@ const sendEmail = (options, { resolve, reject }) => { }; export default ({ - text, html, template, templateVars, ...rest + text, html, lang, template, templateVars, ...rest }) => { if (text || html || template) { return new Promise((resolve, reject) => { sendEmail({ ...rest, - text: template ? templateToText(getPrivateFile(`email-templates/${template}.txt`), (templateVars || {})) : text, - html: template ? templateToHTML(getPrivateFile(`email-templates/${template}.html`), (templateVars || {})) : html + text: template ? templateToText(getPrivateFile(getFileNameOfLang('email-templates', template, 'txt', lang)), (templateVars || {})) : text, + html: template ? templateToHTML(getPrivateFile(getFileNameOfLang('email-templates', template, 'html', lang)), (templateVars || {})) : html }, { resolve, reject }); }); } diff --git a/imports/startup/server/accounts/email-templates.js b/imports/startup/server/accounts/email-templates.js index 1e49cae..0daf6b3 100644 --- a/imports/startup/server/accounts/email-templates.js +++ b/imports/startup/server/accounts/email-templates.js @@ -1,10 +1,12 @@ import { Meteor } from 'meteor/meteor'; import { Accounts } from 'meteor/accounts-base'; +import i18n from 'i18next'; +import { getFileNameOfLang } from '/imports/api/Utility/server/files.js'; import getPrivateFile from '../../../modules/server/get-private-file'; import templateToHTML from '../../../modules/server/handlebars-email-to-html'; import templateToText from '../../../modules/server/handlebars-email-to-text'; -const name = '¡Tod@s contra el Fuego!'; +const name = i18n.t('AppName'); const email = ''; const from = `${name} ${email}`; const emailTemplates = Accounts.emailTemplates; @@ -17,7 +19,7 @@ emailTemplates.verifyEmail = { return `[${name}] Verify Your Email Address`; }, html(user, url) { - return templateToHTML(getPrivateFile('email-templates/verify-email.html'), { + return templateToHTML(getPrivateFile(getFileNameOfLang('email-templates', 'verify-email', 'html', user.lang)), { applicationName: name, firstName: user.profile.name.first, verifyUrl: url.replace('#/', '') @@ -26,12 +28,12 @@ emailTemplates.verifyEmail = { text(user, url) { const urlWithoutHash = url.replace('#/', ''); if (Meteor.isDevelopment) console.info(`Verify Email Link: ${urlWithoutHash}`); // eslint-disable-line - return templateToText(getPrivateFile('email-templates/verify-email.txt'), { + return templateToText(getPrivateFile(getFileNameOfLang('email-templates', 'verify-email', 'txt', user.lang)), { applicationName: name, firstName: user.profile.name.first, - verifyUrl: urlWithoutHash, + verifyUrl: urlWithoutHash }); - }, + } }; emailTemplates.resetPassword = { @@ -39,21 +41,21 @@ emailTemplates.resetPassword = { return `[${name}] Reset Your Password`; }, html(user, url) { - return templateToHTML(getPrivateFile('email-templates/reset-password.html'), { + return templateToHTML(getPrivateFile(getFileNameOfLang('email-templates', 'reset-password', 'html', user.lang)), { firstName: user.profile.name.first, applicationName: name, emailAddress: user.emails[0].address, - resetUrl: url.replace('#/', ''), + resetUrl: url.replace('#/', '') }); }, text(user, url) { const urlWithoutHash = url.replace('#/', ''); if (Meteor.isDevelopment) console.info(`Reset Password Link: ${urlWithoutHash}`); // eslint-disable-line - return templateToText(getPrivateFile('email-templates/reset-password.txt'), { + return templateToText(getPrivateFile(getFileNameOfLang('email-templates', 'reset-password', 'txt', user.lang)), { firstName: user.profile.name.first, applicationName: name, emailAddress: user.emails[0].address, - resetUrl: urlWithoutHash, + resetUrl: urlWithoutHash }); - }, + } }; diff --git a/imports/startup/server/accounts/on-create-user.js b/imports/startup/server/accounts/on-create-user.js index 92d8b40..4b22f5e 100644 --- a/imports/startup/server/accounts/on-create-user.js +++ b/imports/startup/server/accounts/on-create-user.js @@ -3,7 +3,15 @@ import sendWelcomeEmail from '../../../api/Users/server/send-welcome-email'; Accounts.onCreateUser((options, user) => { const userToCreate = user; - if (options.profile) userToCreate.profile = options.profile; - sendWelcomeEmail(options, user); + console.log(JSON.stringify(user)); + console.log(JSON.stringify(options)); + if (options.profile) { + userToCreate.profile = options.profile; + userToCreate.lang = options.profile.lang; + delete options.profile.lang; + } else { + // TODO others (google, etc) ? + } + sendWelcomeEmail(options, userToCreate); return userToCreate; }); diff --git a/imports/startup/server/notificationsObserver.js b/imports/startup/server/notificationsObserver.js index 22628ad..68bdeac 100644 --- a/imports/startup/server/notificationsObserver.js +++ b/imports/startup/server/notificationsObserver.js @@ -5,8 +5,9 @@ import { Meteor } from 'meteor/meteor'; import moment from 'moment'; import { dateLongFormat } from '/imports/api/Common/dates'; import Notifications from '/imports/api/Notifications/Notifications'; -import sendMail from '/imports/startup/server/email'; -import { hr } from '/imports/startup/server/email'; +// import sendMail from '/imports/startup/server/email'; +import sendEmail from '/imports/modules/server/send-email'; +// import { hr } from '/imports/startup/server/email'; import getOAuthProfile from '/imports/modules/get-oauth-profile'; import image from 'google-maps-image-api-url'; import { trim } from '/imports/ui/components/NotificationsObserver/util.js'; @@ -40,9 +41,10 @@ Meteor.startup(() => { }); } + /* function imgEl(lat, lng) { return ``; - } + } */ function process(notif) { if (notif.type === 'web' && !notif.emailNotified) { @@ -58,31 +60,41 @@ Meteor.startup(() => { const emailAddress = OAuthProfile ? OAuthProfile.email : user && user.emails[0] && user.emails[0].verified ? user.emails[0].address : null; if (emailAddress) { - const img = imgEl(notif.geo.coordinates[1], notif.geo.coordinates[0]); + const img = imgUrl(notif.geo.coordinates[1], notif.geo.coordinates[0]); // const url = imgUrl(notif.geo.coordinates[1], notif.geo.coordinates[0]); const fireUrl = `${Meteor.absoluteUrl('fire/')}${notif.sealed}`; - const fireHtmlUrl = `${i18n.t('Más información sobre este fuego')}`; + // const fireHtmlUrl = `${i18n.t('Más información sobre este fuego')}`; // TODO get _id of fire - const fireTextUrl = `${i18n.t('Más información sobre este fuego')}:\n${fireUrl}`; + // const fireTextUrl = `${i18n.t('Más información sobre este fuego')}:\n${fireUrl}`; // FIXME use our map as url and static map as img moment.locale(user.lang); // moment user tz ? const message = `${trim(notif.content)} (${i18n.t('fireDetectedAt', { when: dateLongFormat(notif.when) })}).`; - // TODO unsubscribe link - // TODO Address + // TODO Comunes Address const emailOpts = { to: emailAddress, - userName: firstName, - sendAt: new Date(), + // userName: firstName, + // sendAt: new Date(), subject: truncate.apply(message, [50, true]), - text: `${message}\n\n${fireTextUrl}\n\n`, - template: '

{{appName}}

{{{html}}}', - appName: i18n.t('AppName'), - html: `

${message}

${fireHtmlUrl}

${hr}

${img}

` + // text: `${message}\n\n${fireTextUrl}\n\n`, + // template: '

{{appName}}

{{{html}}}', + lang: user.lang, + template: 'new-fire', + templateVars: { + applicationName: i18n.t('AppName'), + firstName, + message, + fireUrl, + img, + subsUrl: Meteor.absoluteUrl('subscriptions') + } }; - sendMail(emailOpts, true); + sendEmail(emailOpts).catch((error) => { + throw new Meteor.Error('500', `${error}`); + }); + // sendMail(emailOpts, true); Notifications.update(notif._id, { $set: { emailNotified: true, emailNotifiedAt: new Date() } }); } } diff --git a/imports/ui/pages/Privacy/Privacy.js b/imports/ui/pages/Privacy/Privacy.js index 0afaa79..f6e4069 100644 --- a/imports/ui/pages/Privacy/Privacy.js +++ b/imports/ui/pages/Privacy/Privacy.js @@ -11,7 +11,7 @@ const Privacy = props => (
diff --git a/imports/ui/pages/Profile/Profile.js b/imports/ui/pages/Profile/Profile.js index 001b952..21d59ed 100644 --- a/imports/ui/pages/Profile/Profile.js +++ b/imports/ui/pages/Profile/Profile.js @@ -48,34 +48,34 @@ class Profile extends React.Component { required() { // Only required if newPassword field has a value. return component.newPassword.value.length > 0; - }, + } }, newPassword: { required() { // Only required if currentPassword field has a value. return component.currentPassword.value.length > 0; - }, - }, + } + } }, messages: { firstName: { - required: this.t("¿Cuál es tu nombre?"), + required: this.t('¿Cuál es tu nombre?') }, lastName: { - required: this.t("¿Cuál es tu apellido?"), + required: this.t('¿Cuál es tu apellido?') }, emailAddress: { - required: this.t("Necesitamos una contraseña aquí."), - email: this.t("¿Es correcto este correo?"), + required: this.t('Necesitamos una contraseña aquí.'), + email: this.t('¿Es correcto este correo?') }, currentPassword: { - required: this.t("Necesito tu contraseña si la quieres cambiar."), + required: this.t('Necesito tu contraseña si la quieres cambiar.') }, newPassword: { - required: this.t("Necesito tu nueva contraseña si la quieres cambiar."), - }, + required: this.t('Necesito tu nueva contraseña si la quieres cambiar.') + } }, - submitHandler() { component.handleSubmit(); }, + submitHandler() { component.handleSubmit(); } }); } @@ -104,16 +104,16 @@ class Profile extends React.Component { profile: { name: { first: this.firstName.value, - last: this.lastName.value, - }, - }, + last: this.lastName.value + } + } }; Meteor.call('users.editProfile', profile, (error) => { if (error) { Bert.alert(T9n.get(`error.accounts.${error.reason}`), 'danger'); } else { - Bert.alert(this.t("¡Perfíl actualizado!"), 'success'); + Bert.alert(this.t('¡Perfíl actualizado!'), 'success'); } }); @@ -134,29 +134,32 @@ class Profile extends React.Component { {Object.keys(user.services).map(service => (
{service} -

{`You're logged in with ${_.capitalize(service)} using the email address ${user.services[service].email}.`}

+

{this.props.t('Has iniciado sesión con {{service}} usando la dirección de correo {{email}}.', { service: _.capitalize(service), email: user.services[service].email })}

+ >{this.t('Editar perfíl en')} {_.capitalize(service)} +
))} ) :
; } renderPasswordUser(loading, user) { - const {t, i18n} = this.props; - const langName = { 'en': 'English', 'es': 'Español', 'gl': 'Galego', 'ast': 'Asturianu', 'ca': 'Català' }; + const { t, i18n } = this.props; + const langName = { + en: 'English', es: 'Español', gl: 'Galego', ast: 'Asturianu', ca: 'Català' + }; return !loading ? (
- {this.t("Nombre")} + {this.t('Nombre')} - {this.t("Apellidos")} + {this.t('Apellidos')} - {this.t("Correo electrónico")} + {this.t('Correo electrónico')} - {this.t("Idioma")} -
- -
- {i18n.languages.map(lang => ( - + {this.t('Idioma')} +
+ +
+ {i18n.languages.map(lang => ( + )) } +
-
- {this.t("Contraseña actual")} + {this.t('Contraseña actual')} - {this.t("Nueva contraseña")} + {this.t('Nueva contraseña')} (this.newPassword = newPassword)} className="form-control" /> - {this.t("Usa al menos seis caracteres.")} + {this.t('Usa al menos seis caracteres.')} - +
) :
; } renderProfileForm(loading, user) { return !loading ? ({ password: this.renderPasswordUser, - oauth: this.renderOAuthUser, + oauth: this.renderOAuthUser }[this.getUserType(user)])(loading, user) :
; } @@ -244,7 +248,7 @@ class Profile extends React.Component { return (
-

{this.t("Editar perfíl")}

+

{this.t('Editar perfíl')}

(this.form = form)} onSubmit={event => event.preventDefault()}> {this.renderProfileForm(loading, user)}
diff --git a/imports/ui/pages/Signup/Signup.js b/imports/ui/pages/Signup/Signup.js index 64ba33a..743b6d9 100644 --- a/imports/ui/pages/Signup/Signup.js +++ b/imports/ui/pages/Signup/Signup.js @@ -1,7 +1,7 @@ /* eslint-disable react/jsx-indent-props */ import React from 'react'; -import { Row, FormGroup, ControlLabel, Button } from 'react-bootstrap'; +import { Row, FormGroup, ControlLabel, Button, Checkbox } from 'react-bootstrap'; import Col from '../../components/Col/Col'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; @@ -15,7 +15,7 @@ import InputHint from '../../components/InputHint/InputHint'; import AccountPageFooter from '../../components/AccountPageFooter/AccountPageFooter'; import validate from '../../../modules/validate'; import './Signup.scss'; -import { translate } from 'react-i18next'; +import { translate, Trans } from 'react-i18next'; import { T9n } from 'meteor-accounts-t9n'; class Signup extends React.Component { @@ -24,7 +24,8 @@ class Signup extends React.Component { this.t = props.t; this.handleSubmit = this.handleSubmit.bind(this); // console.log(props.location.state); - this.state = props.location.state; + this.state = props.location.state ? props.location.state : {}; + this.state.termsAccept = false; } componentDidMount() { @@ -68,12 +69,13 @@ class Signup extends React.Component { } handleSubmit() { - const { history, t } = this.props; + const { history, t, i18n } = this.props; Accounts.createUser({ email: this.emailAddress.value, password: this.password.value, profile: { + lang: i18n.language, name: { first: this.firstName.value, last: this.lastName.value @@ -90,6 +92,10 @@ class Signup extends React.Component { }); } + setTermsAccept(termsAccept) { + this.setState({ termsAccept }); + } + render() { const { t, history } = this.props; return (
@@ -161,7 +167,11 @@ class Signup extends React.Component { /> {t('Usa al menos seis caracteres.')} - + this.setTermsAccept(e.target.checked)}> + Acepto las condiciones de servicio de este sitio + + +

{t('¿Ya tienes un cuenta?')} {t('Iniciar sesión')}.

diff --git a/imports/ui/pages/Terms/Terms.js b/imports/ui/pages/Terms/Terms.js index ca5949c..37adb3a 100644 --- a/imports/ui/pages/Terms/Terms.js +++ b/imports/ui/pages/Terms/Terms.js @@ -11,7 +11,7 @@ const Terms = props => (
diff --git a/private/email-templates/new-fire-en.html b/private/email-templates/new-fire-en.html new file mode 100644 index 0000000..18b97a9 --- /dev/null +++ b/private/email-templates/new-fire-en.html @@ -0,0 +1,325 @@ + + + + + +[{{applicationName}}] Alert of fire + + + + + + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + +
+ Hey, {{firstName}}! +
+ {{message}} +
+ +
+ +
+ Thanks!
+ {{applicationName}} Team +
+
+
+
+ + + diff --git a/private/email-templates/new-fire-en.txt b/private/email-templates/new-fire-en.txt new file mode 100644 index 0000000..61c9eb6 --- /dev/null +++ b/private/email-templates/new-fire-en.txt @@ -0,0 +1,10 @@ +Hey, {{firstName}}! + +{{message}} + +[More information about this fire]({{fireUrl}}) + +Thanks! +{{applicationName}} Team + +Manage your subscriptions to these fire alerts: {{subsUrl}} diff --git a/private/email-templates/new-fire-es.html b/private/email-templates/new-fire-es.html new file mode 100644 index 0000000..b4eafe5 --- /dev/null +++ b/private/email-templates/new-fire-es.html @@ -0,0 +1,325 @@ + + + + + +[{{applicationName}}] Alerta de fuego + + + + + + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + +
+ Hola, {{firstName}}! +
+ {{message}} +
+ +
+ +
+ Gracias!
+ El equipo de {{applicationName}} +
+
+
+
+ + + diff --git a/private/email-templates/new-fire-es.txt b/private/email-templates/new-fire-es.txt new file mode 100644 index 0000000..15a4392 --- /dev/null +++ b/private/email-templates/new-fire-es.txt @@ -0,0 +1,10 @@ +Hola, {{firstName}}! + +{{message}} + +[Más información sobre este fuego]({{fireUrl}}) + +Gracias! +El equipo de {{applicationName}} + +Gestiona tus suscripciones a estas alertas de fuegos: {{subsUrl}} diff --git a/private/email-templates/reset-password.html b/private/email-templates/reset-password-en.html similarity index 98% rename from private/email-templates/reset-password.html rename to private/email-templates/reset-password-en.html index bd7c1f8..9fea27e 100644 --- a/private/email-templates/reset-password.html +++ b/private/email-templates/reset-password-en.html @@ -298,7 +298,7 @@ - Cheers,
+ Thanks!
{{applicationName}} Team @@ -309,7 +309,7 @@
diff --git a/private/email-templates/reset-password.txt b/private/email-templates/reset-password-en.txt similarity index 96% rename from private/email-templates/reset-password.txt rename to private/email-templates/reset-password-en.txt index 5994913..5519476 100644 --- a/private/email-templates/reset-password.txt +++ b/private/email-templates/reset-password-en.txt @@ -6,5 +6,5 @@ To reset the password, visit the following link: [Reset Password]({{resetUrl}}) -Cheers, +Thanks! {{applicationName}} Team diff --git a/private/email-templates/reset-password-es.html b/private/email-templates/reset-password-es.html new file mode 100644 index 0000000..dabde5c --- /dev/null +++ b/private/email-templates/reset-password-es.html @@ -0,0 +1,322 @@ + + + + + +[{{applicationName}}] Resetea tu Contraseña + + + + + + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + +
+ Hola, {{firstName}}! +
+ Se ha solicitado un reseteo de contraseña para la cuenta asociada a este correo ({{emailAddress}}). +
+ Para resetear la contraseña, visita el siguiente enlace: +
+ +
+ Gracias!
+ El equipo de {{applicationName}} +
+
+
+
+ + + diff --git a/private/email-templates/reset-password-es.txt b/private/email-templates/reset-password-es.txt new file mode 100644 index 0000000..9996d66 --- /dev/null +++ b/private/email-templates/reset-password-es.txt @@ -0,0 +1,10 @@ +Hola, {{firstName}}! + +Se ha solicitado un reseteo de contraseña para la cuenta asociada a este correo ({{emailAddress}}). + +Para resetear la contraseña, visita el siguiente enlace: + +[Resetea la contraseña]({{resetUrl}}) + +Gracias! +El equipo de {{applicationName}} diff --git a/private/email-templates/verify-email.html b/private/email-templates/verify-email-en.html similarity index 98% rename from private/email-templates/verify-email.html rename to private/email-templates/verify-email-en.html index 8db2306..9b6450c 100644 --- a/private/email-templates/verify-email.html +++ b/private/email-templates/verify-email-en.html @@ -304,7 +304,7 @@
diff --git a/private/email-templates/verify-email.txt b/private/email-templates/verify-email-en.txt similarity index 100% rename from private/email-templates/verify-email.txt rename to private/email-templates/verify-email-en.txt diff --git a/private/email-templates/verify-email-es.html b/private/email-templates/verify-email-es.html new file mode 100644 index 0000000..1bbb26a --- /dev/null +++ b/private/email-templates/verify-email-es.html @@ -0,0 +1,317 @@ + + + + + +[{{applicationName}}] Verifica tu dirección de correo + + + + + + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + +
+ Hola, {{firstName}}! +
+ ¿Nos puedes hacer un favor y verificar tu correo electrónico? +
+ +
+ Gracias!
+ El equipo de {{applicationName}} +
+
+
+
+ + + diff --git a/private/email-templates/verify-email-es.txt b/private/email-templates/verify-email-es.txt new file mode 100644 index 0000000..361f14b --- /dev/null +++ b/private/email-templates/verify-email-es.txt @@ -0,0 +1,8 @@ +Hola, {{firstName}}! + +¿Nos puedes hacer un favor y verificar tu correo electrónico? + +[Verificar correo electrónico]({{verifyUrl}}) + +Gracias! +El equipo de {{applicationName}} diff --git a/private/email-templates/welcome.html b/private/email-templates/welcome-en.html similarity index 96% rename from private/email-templates/welcome.html rename to private/email-templates/welcome-en.html index a9a6369..7803030 100644 --- a/private/email-templates/welcome.html +++ b/private/email-templates/welcome-en.html @@ -283,7 +283,7 @@ - Welcome to {{applicationName}}. We're excited to have you on board. + Welcome to {{applicationName}}. We thank you for collaborating with us. @@ -293,12 +293,12 @@ - + - Cheers,
+ Thanks,
{{applicationName}} Team @@ -309,7 +309,7 @@
diff --git a/private/email-templates/welcome-en.txt b/private/email-templates/welcome-en.txt new file mode 100644 index 0000000..6dcb0d9 --- /dev/null +++ b/private/email-templates/welcome-en.txt @@ -0,0 +1,10 @@ +Hey, {{firstName}}! + +Welcome to {{applicationName}}. We thank you for collaborating with us. + +Ready to get started? + +[View Your Subscriptions to Fires]({{welcomeUrl}}) + +Thanks, +{{applicationName}} Team diff --git a/private/email-templates/welcome-es.html b/private/email-templates/welcome-es.html new file mode 100644 index 0000000..0882fbb --- /dev/null +++ b/private/email-templates/welcome-es.html @@ -0,0 +1,322 @@ + + + + + +Bienvenido! | {{applicationName}} + + + + + + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + +
+ Hey, {{firstName}}! +
+ Bienvenid@ a {{applicationName}}. Te agradecemos que colabores con nosotr@s. +
+ ¿Preparada para empezar? +
+ +
+ Gracias,
+ El equipo de {{applicationName}} +
+
+
+
+ + + diff --git a/private/email-templates/welcome-es.txt b/private/email-templates/welcome-es.txt new file mode 100644 index 0000000..99dabed --- /dev/null +++ b/private/email-templates/welcome-es.txt @@ -0,0 +1,10 @@ +Hey, {{firstName}}! + +Bienvenid@ a {{applicationName}}. Te agradecemos que colabores con nosotr@s. + +¿Preparada para empezar? + +[Ver tus subscripciones a fuegos]({{welcomeUrl}}) + +Gracias, +El equipo de {{applicationName}} diff --git a/private/email-templates/welcome.txt b/private/email-templates/welcome.txt deleted file mode 100644 index 2aad868..0000000 --- a/private/email-templates/welcome.txt +++ /dev/null @@ -1,10 +0,0 @@ -Hey, {{firstName}}! - -Welcome to Application Name. We're excited to have you on board. - -Ready to get started? - -[View Your Documents]({{welcomeUrl}}) - -Cheers, -Application Name Team diff --git a/public/locales/en/common.json b/public/locales/en/common.json index bd952f1..111c05f 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -111,5 +111,6 @@ "Subscription added", "Suscripción actualizada": "Subscription updated", - "Última actualización, {{when}}": "Last updated, {{when}}" + "Última actualización, {{when}}": "Last updated, {{when}}", + "Has iniciado sesión con {{service}} usando la dirección de correo {{email}}.": "You're logged in with {{service}} using the email address {{email}}." } diff --git a/public/locales/es/common.json b/public/locales/es/common.json index 559a4e2..982ec8a 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -224,5 +224,8 @@ "No recibirás notificaciones de fuegos en este equipo, solo por correo": "No recibirás notificaciones de fuegos en este equipo, solo por correo", "not-found": "Upppps: Esta página no existe", "Más información sobre este fuego": "Más información sobre este fuego", - "Última actualización, {{when}}": "Última actualización, {{when}}" + "Última actualización, {{when}}": "Última actualización, {{when}}", + "termsAccept": "Acepto las <1>condiciones de servicio de este sitio", + "Bienvenid@!": "Bienvenid@!", + "Has iniciado sesión con {{service}} usando la dirección de correo {{email}}.": "Has iniciado sesión con {{service}} usando la dirección de correo {{email}}." }