mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-13 22:28:58 +09:00
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
b4a3e5aa4f
@ -85,7 +85,7 @@ Please see the [Contribution Guide](./CONTRIBUTING.md).
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
:heart: Backers & Sponsors
|
:heart: Backers
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
<!-- PATREON_START -->
|
<!-- PATREON_START -->
|
||||||
<table><tr>
|
<table><tr>
|
||||||
|
@ -360,8 +360,8 @@ common/views/components/user-menu.vue:
|
|||||||
report-abuse: "Report abuse"
|
report-abuse: "Report abuse"
|
||||||
report-abuse-detail: "What kind of nuisance did you encounter?"
|
report-abuse-detail: "What kind of nuisance did you encounter?"
|
||||||
report-abuse-reported: "The issue has been reported to the administrator. Your cooperation is much appreciated."
|
report-abuse-reported: "The issue has been reported to the administrator. Your cooperation is much appreciated."
|
||||||
silence: "Make Silence"
|
silence: "Mute"
|
||||||
unsilence: "Unsilence"
|
unsilence: "Unmute"
|
||||||
suspend: "Suspend"
|
suspend: "Suspend"
|
||||||
unsuspend: "Unsuspend"
|
unsuspend: "Unsuspend"
|
||||||
common/views/components/poll.vue:
|
common/views/components/poll.vue:
|
||||||
@ -1147,8 +1147,8 @@ admin/views/users.vue:
|
|||||||
unsuspend: "Unsuspend"
|
unsuspend: "Unsuspend"
|
||||||
unsuspend-confirm: "Are you sure you want to unsuspend this account?"
|
unsuspend-confirm: "Are you sure you want to unsuspend this account?"
|
||||||
unsuspended: "The user has successfully unsuspended."
|
unsuspended: "The user has successfully unsuspended."
|
||||||
make-silence: "Make Silence"
|
make-silence: "Mute"
|
||||||
unmake-silence: "Unmake Silence"
|
unmake-silence: "Unmute"
|
||||||
verify: "Verify account"
|
verify: "Verify account"
|
||||||
verify-confirm: "Do you want this to be a verified account?"
|
verify-confirm: "Do you want this to be a verified account?"
|
||||||
verified: "The account is now being verified"
|
verified: "The account is now being verified"
|
||||||
|
5
locales/index.d.ts
vendored
Normal file
5
locales/index.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
type Locale = { [key: string]: string };
|
||||||
|
|
||||||
|
declare const locales: { [lang: string]: Locale };
|
||||||
|
|
||||||
|
export default locales;
|
@ -356,7 +356,7 @@ common/views/components/user-menu.vue:
|
|||||||
block: "Zablokuj"
|
block: "Zablokuj"
|
||||||
unblock: "Odblokuj"
|
unblock: "Odblokuj"
|
||||||
push-to-list: "Dodaj do listy"
|
push-to-list: "Dodaj do listy"
|
||||||
select-list: "リストを選択してください"
|
select-list: "Wybierz listę"
|
||||||
report-abuse: "Zgłoś nadużycie"
|
report-abuse: "Zgłoś nadużycie"
|
||||||
report-abuse-detail: "どのような迷惑行為を行っていますか?"
|
report-abuse-detail: "どのような迷惑行為を行っていますか?"
|
||||||
report-abuse-reported: "管理者に報告されました。ご協力ありがとうございました。"
|
report-abuse-reported: "管理者に報告されました。ご協力ありがとうございました。"
|
||||||
@ -395,11 +395,11 @@ common/views/components/signin.vue:
|
|||||||
token: "Token"
|
token: "Token"
|
||||||
signing-in: "Logowanie…"
|
signing-in: "Logowanie…"
|
||||||
signin: "Zaloguj"
|
signin: "Zaloguj"
|
||||||
or: "または"
|
or: "lub"
|
||||||
signin-with-twitter: "Zaloguj się za pomocą Twittera"
|
signin-with-twitter: "Zaloguj się za pomocą Twittera"
|
||||||
signin-with-github: "Zaloguj się za pomocą GitHuba"
|
signin-with-github: "Zaloguj się za pomocą GitHuba"
|
||||||
signin-with-discord: "Zaloguj się za pomocą Discorda"
|
signin-with-discord: "Zaloguj się za pomocą Discorda"
|
||||||
login-failed: "ログインできませんでした。ユーザー名とパスワードを確認してください。"
|
login-failed: "Logowanie nie powiodło się. Upewnij się, że podałeś prawidłową nazwę użytkownika i hasło."
|
||||||
common/views/components/signup.vue:
|
common/views/components/signup.vue:
|
||||||
invitation-code: "Kod zaproszenia"
|
invitation-code: "Kod zaproszenia"
|
||||||
invitation-info: "招待コードをお持ちでない方は、<a href=\"{}\">管理者</a>までご連絡ください。"
|
invitation-info: "招待コードをお持ちでない方は、<a href=\"{}\">管理者</a>までご連絡ください。"
|
||||||
@ -472,13 +472,13 @@ common/views/components/visibility-chooser.vue:
|
|||||||
local-followers: "Dla śledzących (tylko lokalnie)"
|
local-followers: "Dla śledzących (tylko lokalnie)"
|
||||||
common/views/components/trends.vue:
|
common/views/components/trends.vue:
|
||||||
count: "{}人が投稿"
|
count: "{}人が投稿"
|
||||||
empty: "トレンドなし"
|
empty: "Brak popularnych hashtagów"
|
||||||
common/views/components/language-settings.vue:
|
common/views/components/language-settings.vue:
|
||||||
title: "Język"
|
title: "Język"
|
||||||
pick-language: "Wybierz język"
|
pick-language: "Wybierz język"
|
||||||
recommended: "Zalecane"
|
recommended: "Zalecane"
|
||||||
auto: "Automatyczny"
|
auto: "Automatyczny"
|
||||||
specify-language: "言語を指定"
|
specify-language: "Wybierz język"
|
||||||
info: "Musisz odświeżyć stronę, aby zmiany zostały uwzględnione."
|
info: "Musisz odświeżyć stronę, aby zmiany zostały uwzględnione."
|
||||||
common/views/components/profile-editor.vue:
|
common/views/components/profile-editor.vue:
|
||||||
title: "Twój profil"
|
title: "Twój profil"
|
||||||
@ -504,15 +504,15 @@ common/views/components/profile-editor.vue:
|
|||||||
upload-failed: "Wysyłanie nie powiodło się"
|
upload-failed: "Wysyłanie nie powiodło się"
|
||||||
email: "Ustawienia e-mail"
|
email: "Ustawienia e-mail"
|
||||||
email-address: "Adres e-mail"
|
email-address: "Adres e-mail"
|
||||||
email-verified: "メールアドレスが確認されました"
|
email-verified: "Twój adres e-mail został zweryfikowany."
|
||||||
email-not-verified: "メールアドレスが確認されていません。メールボックスをご確認ください。"
|
email-not-verified: "メールアドレスが確認されていません。メールボックスをご確認ください。"
|
||||||
common/views/components/user-list-editor.vue:
|
common/views/components/user-list-editor.vue:
|
||||||
users: "Użytkownicy"
|
users: "Użytkownicy"
|
||||||
rename: "Zmień nazwę listy"
|
rename: "Zmień nazwę listy"
|
||||||
delete: "Usuń listę"
|
delete: "Usuń listę"
|
||||||
remove-user: "Usuń z tej listy"
|
remove-user: "Usuń z tej listy"
|
||||||
delete-are-you-sure: "リスト「$1」を削除しますか?"
|
delete-are-you-sure: "Usunąć listę \"$1\"?"
|
||||||
deleted: "削除しました"
|
deleted: "Usunięto"
|
||||||
common/views/widgets/broadcast.vue:
|
common/views/widgets/broadcast.vue:
|
||||||
fetching: "Sprawdzanie"
|
fetching: "Sprawdzanie"
|
||||||
no-broadcasts: "Brak transmisji"
|
no-broadcasts: "Brak transmisji"
|
||||||
@ -595,7 +595,7 @@ desktop/views/components/activity.vue:
|
|||||||
title: "Aktywność"
|
title: "Aktywność"
|
||||||
toggle: "Przełącz widok"
|
toggle: "Przełącz widok"
|
||||||
desktop/views/components/calendar.vue:
|
desktop/views/components/calendar.vue:
|
||||||
title: "{year}年 {month}月"
|
title: "{year} / {month}"
|
||||||
prev: "Poprzedni miesiąc"
|
prev: "Poprzedni miesiąc"
|
||||||
next: "Następny miesiąc"
|
next: "Następny miesiąc"
|
||||||
go: "Naciśnij, aby przejść"
|
go: "Naciśnij, aby przejść"
|
||||||
@ -706,7 +706,7 @@ desktop/views/components/note.vue:
|
|||||||
add-reaction: "Dodaj reakcję"
|
add-reaction: "Dodaj reakcję"
|
||||||
undo-reaction: "リアクション解除"
|
undo-reaction: "リアクション解除"
|
||||||
detail: "Szczegóły"
|
detail: "Szczegóły"
|
||||||
private: "この投稿は非公開です"
|
private: "Ten wpis jest prywatny"
|
||||||
deleted: "この投稿は削除されました"
|
deleted: "この投稿は削除されました"
|
||||||
desktop/views/components/notes.vue:
|
desktop/views/components/notes.vue:
|
||||||
error: "Ładowanie nie powiodło się."
|
error: "Ładowanie nie powiodło się."
|
||||||
@ -1011,7 +1011,7 @@ admin/views/abuse.vue:
|
|||||||
target: "対象"
|
target: "対象"
|
||||||
reporter: "報告者"
|
reporter: "報告者"
|
||||||
details: "詳細"
|
details: "詳細"
|
||||||
remove-report: "削除"
|
remove-report: "Usuń"
|
||||||
admin/views/instance.vue:
|
admin/views/instance.vue:
|
||||||
instance: "インスタンス"
|
instance: "インスタンス"
|
||||||
instance-name: "インスタンス名"
|
instance-name: "インスタンス名"
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
"@types/is-svg": "3.0.0",
|
"@types/is-svg": "3.0.0",
|
||||||
"@types/is-url": "1.2.28",
|
"@types/is-url": "1.2.28",
|
||||||
"@types/js-yaml": "3.12.0",
|
"@types/js-yaml": "3.12.0",
|
||||||
|
"@types/jsdom": "12.2.1",
|
||||||
"@types/katex": "0.5.0",
|
"@types/katex": "0.5.0",
|
||||||
"@types/koa": "2.0.48",
|
"@types/koa": "2.0.48",
|
||||||
"@types/koa-bodyparser": "5.0.2",
|
"@types/koa-bodyparser": "5.0.2",
|
||||||
@ -220,7 +221,7 @@
|
|||||||
"ts-loader": "5.3.3",
|
"ts-loader": "5.3.3",
|
||||||
"ts-node": "7.0.1",
|
"ts-node": "7.0.1",
|
||||||
"tslint": "5.12.0",
|
"tslint": "5.12.0",
|
||||||
"tslint-sonarts": "1.8.0",
|
"tslint-sonarts": "1.9.0",
|
||||||
"typescript": "3.2.4",
|
"typescript": "3.2.4",
|
||||||
"typescript-eslint-parser": "21.0.2",
|
"typescript-eslint-parser": "21.0.2",
|
||||||
"uglify-es": "3.3.9",
|
"uglify-es": "3.3.9",
|
||||||
|
3
src/@types/const.json.d.ts
vendored
Normal file
3
src/@types/const.json.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
declare module '*/const.json' {
|
||||||
|
const copyright: string;
|
||||||
|
}
|
2
src/@types/deepcopy.d.ts
vendored
2
src/@types/deepcopy.d.ts
vendored
@ -8,7 +8,7 @@ declare namespace deepcopy {
|
|||||||
valueType: DeepcopyCustomizerValueType) => T;
|
valueType: DeepcopyCustomizerValueType) => T;
|
||||||
|
|
||||||
interface DeepcopyOptions<T> {
|
interface DeepcopyOptions<T> {
|
||||||
customizer: DeepcopyCustomizer<T>
|
customizer: DeepcopyCustomizer<T>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deepcopy<T>(
|
export function deepcopy<T>(
|
||||||
|
7
src/@types/escape-regexp.d.ts
vendored
Normal file
7
src/@types/escape-regexp.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
declare module 'escape-regexp' {
|
||||||
|
function escapeRegExp(str: string): string;
|
||||||
|
|
||||||
|
namespace escapeRegExp {} // Hack
|
||||||
|
|
||||||
|
export = escapeRegExp;
|
||||||
|
}
|
14
src/@types/koa-slow.d.ts
vendored
Normal file
14
src/@types/koa-slow.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
declare module 'koa-slow' {
|
||||||
|
import { Middleware } from 'koa';
|
||||||
|
|
||||||
|
interface ISlowOptions {
|
||||||
|
url?: RegExp;
|
||||||
|
delay?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
function slow(options?: ISlowOptions): Middleware;
|
||||||
|
|
||||||
|
namespace slow { } // Hack
|
||||||
|
|
||||||
|
export = slow;
|
||||||
|
}
|
10
src/@types/langmap.d.ts
vendored
Normal file
10
src/@types/langmap.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
declare module 'langmap' {
|
||||||
|
type Lang = {
|
||||||
|
nativeName: string;
|
||||||
|
englishName: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
const langmap: { [lang: string]: Lang };
|
||||||
|
|
||||||
|
export = langmap;
|
||||||
|
}
|
30
src/@types/os-utils.d.ts
vendored
Normal file
30
src/@types/os-utils.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
declare module 'os-utils' {
|
||||||
|
type FreeCommandCallback = (usedmem: number) => void;
|
||||||
|
|
||||||
|
type HarddriveCallback = (total: number, free: number, used: number) => void;
|
||||||
|
|
||||||
|
type GetProcessesCallback = (result: string) => void;
|
||||||
|
|
||||||
|
type CPUCallback = (perc: number) => void;
|
||||||
|
|
||||||
|
export function platform(): NodeJS.Platform;
|
||||||
|
export function cpuCount(): number;
|
||||||
|
export function sysUptime(): number;
|
||||||
|
export function processUptime(): number;
|
||||||
|
|
||||||
|
export function freemem(): number;
|
||||||
|
export function totalmem(): number;
|
||||||
|
export function freememPercentage(): number;
|
||||||
|
export function freeCommand(callback: FreeCommandCallback): void;
|
||||||
|
|
||||||
|
export function harddrive(callback: HarddriveCallback): void;
|
||||||
|
|
||||||
|
export function getProcesses(callback: GetProcessesCallback): void;
|
||||||
|
export function getProcesses(nProcess: number, callback: GetProcessesCallback): void;
|
||||||
|
|
||||||
|
export function allLoadavg(): string;
|
||||||
|
export function loadavg(_time?: number): number;
|
||||||
|
|
||||||
|
export function cpuFree(callback: CPUCallback): void;
|
||||||
|
export function cpuUsage(callback: CPUCallback): void;
|
||||||
|
}
|
16
src/@types/recaptcha-promise.d.ts
vendored
Normal file
16
src/@types/recaptcha-promise.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
declare module 'recaptcha-promise' {
|
||||||
|
interface IVerifyOptions {
|
||||||
|
secret_key?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IVerify {
|
||||||
|
(response: string, remoteAddress?: string): Promise<boolean>;
|
||||||
|
init(options: IVerifyOptions): IVerify;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace recaptchaPromise {} // Hack
|
||||||
|
|
||||||
|
const verify: IVerify;
|
||||||
|
|
||||||
|
export = verify;
|
||||||
|
}
|
@ -3,7 +3,7 @@ import * as sysUtils from 'systeminformation';
|
|||||||
import * as diskusage from 'diskusage';
|
import * as diskusage from 'diskusage';
|
||||||
import * as Deque from 'double-ended-queue';
|
import * as Deque from 'double-ended-queue';
|
||||||
import Xev from 'xev';
|
import Xev from 'xev';
|
||||||
const osUtils = require('os-utils');
|
import * as osUtils from 'os-utils';
|
||||||
|
|
||||||
const ev = new Xev();
|
const ev = new Xev();
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
const jsdom = require('jsdom');
|
import { JSDOM } from 'jsdom';
|
||||||
const { JSDOM } = jsdom;
|
|
||||||
import config from '../config';
|
import config from '../config';
|
||||||
import { INote } from '../models/note';
|
import { INote } from '../models/note';
|
||||||
import { intersperse } from '../prelude/array';
|
import { intersperse } from '../prelude/array';
|
||||||
@ -158,9 +157,9 @@ export function toHtml(tokens: MfmForest, mentionedRemoteUsers: INote['mentioned
|
|||||||
|
|
||||||
text(token) {
|
text(token) {
|
||||||
const el = doc.createElement('span');
|
const el = doc.createElement('span');
|
||||||
const nodes = (token.node.props.text as string).split(/\r\n|\r|\n/).map(x => doc.createTextNode(x));
|
const nodes = (token.node.props.text as string).split(/\r\n|\r|\n/).map(x => doc.createTextNode(x) as Node);
|
||||||
|
|
||||||
for (const x of intersperse('br', nodes)) {
|
for (const x of intersperse<Node | 'br'>('br', nodes)) {
|
||||||
el.appendChild(x === 'br' ? doc.createElement('br') : x);
|
el.appendChild(x === 'br' ? doc.createElement('br') : x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import Hashtag from '../../../../models/hashtag';
|
import Hashtag from '../../../../models/hashtag';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
const escapeRegexp = require('escape-regexp');
|
import * as escapeRegexp from 'escape-regexp';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
desc: {
|
desc: {
|
||||||
|
@ -9,7 +9,7 @@ import getDriveFileUrl from '../../../../misc/get-drive-file-url';
|
|||||||
import { parse, parsePlain } from '../../../../mfm/parse';
|
import { parse, parsePlain } from '../../../../mfm/parse';
|
||||||
import extractEmojis from '../../../../misc/extract-emojis';
|
import extractEmojis from '../../../../misc/extract-emojis';
|
||||||
import extractHashtags from '../../../../misc/extract-hashtags';
|
import extractHashtags from '../../../../misc/extract-hashtags';
|
||||||
const langmap = require('langmap');
|
import * as langmap from 'langmap';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
desc: {
|
desc: {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
const escapeRegexp = require('escape-regexp');
|
import * as escapeRegexp from 'escape-regexp';
|
||||||
import User, { pack, validateUsername, IUser } from '../../../../models/user';
|
import User, { pack, validateUsername, IUser } from '../../../../models/user';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
|
|
||||||
|
@ -8,14 +8,13 @@ import Meta from '../../../models/meta';
|
|||||||
import RegistrationTicket from '../../../models/registration-tickets';
|
import RegistrationTicket from '../../../models/registration-tickets';
|
||||||
import usersChart from '../../../chart/users';
|
import usersChart from '../../../chart/users';
|
||||||
import fetchMeta from '../../../misc/fetch-meta';
|
import fetchMeta from '../../../misc/fetch-meta';
|
||||||
|
import * as recaptcha from 'recaptcha-promise';
|
||||||
|
|
||||||
export default async (ctx: Koa.BaseContext) => {
|
export default async (ctx: Koa.BaseContext) => {
|
||||||
const body = ctx.request.body as any;
|
const body = ctx.request.body as any;
|
||||||
|
|
||||||
const instance = await fetchMeta();
|
const instance = await fetchMeta();
|
||||||
|
|
||||||
const recaptcha = require('recaptcha-promise');
|
|
||||||
|
|
||||||
// Verify recaptcha
|
// Verify recaptcha
|
||||||
// ただしテスト時はこの機構は障害となるため無効にする
|
// ただしテスト時はこの機構は障害となるため無効にする
|
||||||
if (process.env.NODE_ENV !== 'test' && instance.enableRecaptcha) {
|
if (process.env.NODE_ENV !== 'test' && instance.enableRecaptcha) {
|
||||||
|
@ -13,7 +13,7 @@ import * as mount from 'koa-mount';
|
|||||||
import * as compress from 'koa-compress';
|
import * as compress from 'koa-compress';
|
||||||
import * as koaLogger from 'koa-logger';
|
import * as koaLogger from 'koa-logger';
|
||||||
import * as requestStats from 'request-stats';
|
import * as requestStats from 'request-stats';
|
||||||
//const slow = require('koa-slow');
|
//import * as slow from 'koa-slow';
|
||||||
|
|
||||||
import activityPub from './activitypub';
|
import activityPub from './activitypub';
|
||||||
import webFinger from './webfinger';
|
import webFinger from './webfinger';
|
||||||
|
@ -14,9 +14,9 @@ import * as glob from 'glob';
|
|||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
import config from '../../config';
|
import config from '../../config';
|
||||||
import { licenseHtml } from '../../misc/license';
|
import { licenseHtml } from '../../misc/license';
|
||||||
const constants = require('../../const.json');
|
import { copyright } from '../../const.json';
|
||||||
import endpoints from '../api/endpoints';
|
import endpoints from '../api/endpoints';
|
||||||
const locales = require('../../../locales');
|
import locales from '../../../locales';
|
||||||
import * as nestedProperty from 'nested-property';
|
import * as nestedProperty from 'nested-property';
|
||||||
|
|
||||||
function getLang(lang: string): string {
|
function getLang(lang: string): string {
|
||||||
@ -59,7 +59,7 @@ async function genVars(lang: string): Promise<{ [key: string]: any }> {
|
|||||||
|
|
||||||
vars['config'] = config;
|
vars['config'] = config;
|
||||||
|
|
||||||
vars['copyright'] = constants.copyright;
|
vars['copyright'] = copyright;
|
||||||
|
|
||||||
vars['license'] = licenseHtml;
|
vars['license'] = licenseHtml;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user