default to english instead of japanese

This commit is contained in:
Johann150 2022-10-19 09:25:38 +02:00
parent f0f673843e
commit 507dede6da
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
2 changed files with 4 additions and 4 deletions

View file

@ -30,10 +30,10 @@ export const urlPreviewHandler = async (ctx: Koa.Context): Promise<void> => {
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}`);

View file

@ -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)})`);