From 507dede6da09f3ba7807156e40cb616848844b95 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Wed, 19 Oct 2022 09:25:38 +0200 Subject: [PATCH] default to english instead of japanese --- packages/backend/src/server/web/url-preview.ts | 4 ++-- packages/backend/src/services/send-email-notification.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/web/url-preview.ts b/packages/backend/src/server/web/url-preview.ts index b28e813c6..7ff381443 100644 --- a/packages/backend/src/server/web/url-preview.ts +++ b/packages/backend/src/server/web/url-preview.ts @@ -30,10 +30,10 @@ export const urlPreviewHandler = async (ctx: Koa.Context): Promise => { try { const summary = meta.summalyProxy ? await getJson(`${meta.summalyProxy}?${query({ url, - lang: lang ?? 'ja-JP', + lang: lang ?? 'en-US', })}`) : await summaly.default(url, { followRedirects: false, - lang: lang ?? 'ja-JP', + lang: lang ?? 'en-US', }); logger.succ(`Got preview of ${url}: ${summary.title}`); diff --git a/packages/backend/src/services/send-email-notification.ts b/packages/backend/src/services/send-email-notification.ts index 9360cd088..740eacfe6 100644 --- a/packages/backend/src/services/send-email-notification.ts +++ b/packages/backend/src/services/send-email-notification.ts @@ -12,7 +12,7 @@ async function follow(userId: User['id'], follower: User) { /* const userProfile = await UserProfiles.findOneByOrFail({ userId: userId }); if (!userProfile.email || !userProfile.emailNotificationTypes.includes('follow')) return; - const locale = locales[userProfile.lang || 'ja-JP']; + const locale = locales[userProfile.lang || 'en-US']; const i18n = new I18n(locale); // TODO: render user information html sendEmail(userProfile.email, i18n.t('_email._follow.title'), `${follower.name} (@${Acct.toString(follower)})`, `${follower.name} (@${Acct.toString(follower)})`); @@ -23,7 +23,7 @@ async function receiveFollowRequest(userId: User['id'], follower: User) { /* const userProfile = await UserProfiles.findOneByOrFail({ userId: userId }); if (!userProfile.email || !userProfile.emailNotificationTypes.includes('receiveFollowRequest')) return; - const locale = locales[userProfile.lang || 'ja-JP']; + const locale = locales[userProfile.lang || 'en-US']; const i18n = new I18n(locale); // TODO: render user information html sendEmail(userProfile.email, i18n.t('_email._receiveFollowRequest.title'), `${follower.name} (@${Acct.toString(follower)})`, `${follower.name} (@${Acct.toString(follower)})`);