Merge branch 'develop' into pizzax-indexeddb

This commit is contained in:
tamaina 2022-11-17 23:35:55 +09:00
commit 764da890b6
1491 changed files with 65628 additions and 43153 deletions

View file

@ -57,6 +57,7 @@ db:
redis:
host: localhost
port: 6379
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
#pass: example-pass
#prefix: example-prefix
#db: 1

View file

@ -8,7 +8,7 @@ on:
pull_request:
jobs:
mocha:
jest:
runs-on: ubuntu-latest
strategy:
@ -49,7 +49,12 @@ jobs:
- name: Build
run: yarn build
- name: Test
run: yarn mocha
run: yarn jest-and-coverage
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/backend/coverage/coverage-final.json
e2e:
runs-on: ubuntu-latest

3
.gitignore vendored
View file

@ -13,6 +13,9 @@ report.*.json
cypress/screenshots
cypress/videos
# Coverage
coverage
# config
/.config/*
!/.config/example.yml

View file

@ -1 +1 @@
v16.15.0
v18.12.1

View file

@ -11,17 +11,175 @@ You should also include the user name that made the change.
## 12.x.x (unreleased)
### Changes
- Node.js 18.x or later is required
- Elasticsearchのサポートが削除されました
- 代わりに今後任意の検索プロバイダを設定できる仕組みを構想しています。その仕組みを使えば今まで通りElasticsearchも利用できます
- ノートのウォッチ機能が削除されました
### Improvements
### Bugfixes
- Server: 引用内の文章がnyaizeされてしまう問題を修正 @kabo2468
- Server: Bug fix for Pinned Users lookup on instance @squidicuzz
- Client: インスタンスティッカーのfaviconを読み込む際に偽サイト警告が出ることがあるのを修正 @syuilo
## 12.119.0 (2022/09/10)
### Improvements
- Client: Add following badge to user preview popup @nvisser
- Client: mobile twitter url can be used as widget @caipira113
- Client: Improve clock widget @syuilo
### Bugfixes
- マイグレーションに失敗する問題を修正
- Server: 他人の通知を既読にできる可能性があるのを修正 @syuilo
- Client: アクセストークン管理画面、アカウント管理画面表示できないのを修正 @futchitwo
## 12.118.1 (2022/08/08)
### Bugfixes
- Client: can not show some setting pages @syuilo
## 12.118.0 (2022/08/07)
### Improvements
- Client: 設定のバックアップ/リストア機能
- Client: Add vi-VN language support
- Client: Add unix time widget @syuilo
### Bugfixes
- Server: リモートユーザーを正しくブロックできるように修正する @xianonn
- Client: 一度作ったwebhookの設定画面を開こうとするとページがフリーズする @syuilo
- Client: MiAuth認証ページが機能していない @syuilo
- Client: 一部のアプリからファイルを投稿フォームへドロップできない場合がある問題を修正 @m-hayabusa
## 12.117.1 (2022/07/19)
### Improvements
- Client: UIのブラッシュアップ @syuilo
### Bugfixes
- Server: ファイルのアップロードに失敗することがある問題を修正 @acid-chicken
- Client: リアクションピッカーがアプリ内ウィンドウの後ろに表示されてしまう問題を修正 @syuilo
- Client: ユーザー情報の取得の再試行を修正 @xianonn
- Client: MFMチートシートの挙動を修正 @syuilo
- Client: 「インスタンスからのお知らせを受け取る」の設定を変更できない問題を修正 @syuilo
## 12.117.0 (2022/07/18)
### Improvements
- Client: ウィンドウを最大化できるように @syuilo
- Client: Shiftキーを押した状態でリンクをクリックするとアプリ内ウィンドウで開くように @syuilo
- Client: デッキを使用している際、Ctrlキーを押した状態でリンクをクリックするとページ遷移を強制できるように @syuilo
- Client: UIのブラッシュアップ @syuilo
## 12.116.1 (2022/07/17)
### Bugfixes
- Client: デッキUI時に ページで表示 ボタンが機能しない問題を修正 @syuilo
- Error During Migration Run to 12.111.x
## 12.116.0 (2022/07/16)
### Improvements
- Client: registry editor @syuilo
- Client: UIのブラッシュアップ @syuilo
### Bugfixes
- Error During Migration Run to 12.111.x
- Server: TypeError: Cannot convert undefined or null to object @syuilo
## 12.115.0 (2022/07/16)
### Improvements
- Client: Deckのプロファイル切り替えを簡単に @syuilo
- Client: UIのブラッシュアップ @syuilo
## 12.114.0 (2022/07/15)
### Improvements
- RSSティッカーで表示順序をシャッフルできるように @syuilo
### Bugfixes
- クライアントが起動しなくなることがある問題を修正 @syuilo
## 12.113.0 (2022/07/13)
### Improvements
- Support <plain> syntax for MFM
### Bugfixes
- Server: Fix crash at startup if TensorFlow is not supported @mei23
- Client: URLエンコードされたルーティングを修正
## 12.112.3 (2022/07/09)
### Improvements
- Make active email validation configurable
### Bugfixes
- Server: Fix Attempts to update all notifications @mei23
## 12.112.2 (2022/07/08)
### Bugfixes
- Fix Docker doesn't work @mei23
Still not working on arm64 environment. (See 12.112.0)
## 12.112.1 (2022/07/07)
same as 12.112.0
## 12.112.0 (2022/07/07)
### Known issues
- 現在arm64環境ではインストールに失敗します。これは次のバージョンで修正される予定です。
### Changes
- ハイライトがみつけるに統合されました
- カスタム絵文字ページはインスタンス情報ページに統合されました
- 連合ページはインスタンス情報ページに統合されました
- メンション一覧ページは通知一覧ページに統合されました
- ダイレクト投稿一覧ページは通知一覧ページに統合されました
- メニューからアンテナタイムラインを表示する方法は廃止され、タイムライン上部のアイコンからアクセスするようになりました
- メニューからリストタイムラインを表示する方法は廃止され、タイムライン上部のアイコンからアクセスするようになりました
### Improvements
- Server: Allow GET method for some endpoints @syuilo
- Server: Auto NSFW detection @syuilo
- Server: Add rate limit to i/notifications @tamaina
- Client: Improve files page of control panel @syuilo
- Client: Improve control panel @syuilo
- Client: Show warning in control panel when there is an unresolved abuse report @syuilo
- Client: Statusbars @syuilo
- Client: Add instance-cloud widget @syuilo
- Client: Add rss-ticker widget @syuilo
- Client: Removing entries from a clip @futchitwo
- Client: Poll highlights in explore page @syuilo
- Client: Improve deck UI @syuilo
- Client: Word mute also checks content warnings @Johann150
- Client: メニューからページをリロードできるように @syuilo
- Client: Improve emoji picker performance @syuilo
- Client: For notes with specified visibility, show recipients when hovering over visibility symbol. @Johann150
- Client: Make widgets available again on a tablet @syuilo
- ユーザーにモデレーションメモを残せる機能 @syuilo
- Make possible to delete an account by admin @syuilo
- Improve player detection in URL preview @mei23
- Add Badge Image to Push Notification #8012 @tamaina
- Server: Improve performance
- Server: Supports IPv6 on Redis transport. @mei23
IPv4/IPv6 is used by default. You can tune this behavior via `redis.family`.
- Server: Add possibility to log IP addresses of users @syuilo
- Add additional drive capacity change support @CyberRex0
### Bugfixes
- Server: Fix GenerateVideoThumbnail failed @mei23
- Server: Ensure temp directory cleanup @Johann150
- favicons of federated instances not showing @syuilo
- Admin: The checkbox for blocking an instance works again @Johann150
- Client: Prevent access to user pages when not logged in @pixeldesu @Johann150
- Client: Disable some hotkeys (e.g. for creating a post) for not logged in users @pixeldesu
- Client: Ask users that are not logged in to log in when trying to vote in a poll @Johann150
- Instance mutes also apply in antennas etc. @Johann150
## 12.111.1 (2022/06/13)

View file

@ -124,7 +124,7 @@ npm run test
#### Run specify test
```
npx cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT="./test/tsconfig.json" npx mocha test/foo.ts --require ts-node/register
npm run jest -- foo.ts
```
### e2e tests
@ -140,6 +140,34 @@ Misskey uses Vue(v3) as its front-end framework.
- **When creating a new component, please use the Composition API (with [setup sugar](https://v3.vuejs.org/api/sfc-script-setup.html) and [ref sugar](https://github.com/vuejs/rfcs/discussions/369)) instead of the Options API.**
- Some of the existing components are implemented in the Options API, but it is an old implementation. Refactors that migrate those components to the Composition API are also welcome.
## nirax
niraxは、Misskeyで使用しているオリジナルのフロントエンドルーティングシステムです。
**vue-routerから影響を多大に受けているので、まずはvue-routerについて学ぶことをお勧めします。**
### ルート定義
ルート定義は、以下の形式のオブジェクトの配列です。
``` ts
{
name?: string;
path: string;
component: Component;
query?: Record<string, string>;
loginRequired?: boolean;
hash?: string;
globalCacheKey?: string;
children?: RouteDef[];
}
```
> **Warning**
> 現状、ルートは定義された順に評価されます。
> たとえば、`/foo/:id`ルート定義の次に`/foo/bar`ルート定義がされていた場合、後者がマッチすることはありません。
### 複数のルーター
vue-routerとの最大の違いは、niraxは複数のルーターが存在することを許可している点です。
これにより、アプリ内ウィンドウでブラウザとは個別にルーティングすることなどが可能になります。
## Notes
### How to resolve conflictions occurred at yarn.lock?

View file

@ -1,5 +1,5 @@
Unless otherwise stated this repository is
Copyright © 2014-2020 syuilo and contributers
Copyright © 2014-2022 syuilo and contributers
And is distributed under The GNU Affero General Public License Version 3, you should have received a copy of the license file as LICENSE.
@ -13,3 +13,7 @@ https://github.com/muan/emojilib/blob/master/LICENSE
RsaSignature2017 implementation by Transmute Industries Inc
License: MIT
https://github.com/transmute-industries/RsaSignature2017/blob/master/LICENSE
Machine learning model for sensitive images by Infinite Red, Inc.
License: MIT
https://github.com/infinitered/nsfwjs/blob/master/LICENSE

View file

@ -1,28 +1,24 @@
FROM node:18.0.0-alpine3.15 AS base
FROM node:18.12.1-bullseye AS builder
ARG NODE_ENV=production
WORKDIR /misskey
ENV BUILD_DEPS autoconf automake file g++ gcc libc-dev libtool make nasm pkgconfig python3 zlib-dev git
FROM base AS builder
COPY . ./
RUN apk add --no-cache $BUILD_DEPS && \
git submodule update --init && \
yarn install && \
yarn build && \
rm -rf .git
RUN apt-get update
RUN apt-get install -y build-essential
RUN git submodule update --init
RUN yarn install
RUN yarn build
RUN rm -rf .git
FROM base AS runner
FROM node:18.12.1-bullseye-slim AS runner
RUN apk add --no-cache \
ffmpeg \
tini
WORKDIR /misskey
ENTRYPOINT ["/sbin/tini", "--"]
RUN apt-get update
RUN apt-get install -y ffmpeg tini
COPY --from=builder /misskey/node_modules ./node_modules
COPY --from=builder /misskey/built ./built
@ -32,5 +28,5 @@ COPY --from=builder /misskey/packages/client/node_modules ./packages/client/node
COPY . ./
ENV NODE_ENV=production
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["npm", "run", "migrateandstart"]

View file

@ -14,7 +14,12 @@ This is the phase we are at now. We need to make a high-maintenance environment
- Fix random test failures - https://github.com/misskey-dev/misskey/issues/7985 and https://github.com/misskey-dev/misskey/issues/7986
- Add more tests
- May need to implement a mechanism that allows for DI
- https://github.com/misskey-dev/misskey/pull/9085
- Measure coverage
- https://github.com/misskey-dev/misskey/pull/9081
- Improve documentation
- Refactoring
- Extract the logic of each endpoint definition into a service and just call it
## (2) Improve functionality
Once Phase 1 is complete and an environment conducive to the development of a stable system is in place, the implementation of new functions can begin gradually.

View file

@ -52,6 +52,7 @@ searchUser: "ابحث عن مستخدمين"
reply: "رد"
loadMore: "عرض المزيد"
showMore: "عرض المزيد"
showLess: "اغلق"
youGotNewFollower: "يتابعك"
receiveFollowRequest: "تلقيت طلب متابعة"
followRequestAccepted: "قُبل طلب المتابعة"
@ -803,6 +804,12 @@ oneHour: "ساعة"
oneDay: "يوم"
oneWeek: "أسبوع"
failedToFetchAccountInformation: "تعذر جلب معلومات الحساب"
file: "الملفات"
reverse: "اقلب"
colored: "ملوّن"
label: "التسمية"
localOnly: "المحلي فقط"
account: "الحسابات"
_emailUnavailable:
used: "هذا البريد الإلكتروني مستخدم"
format: "صيغة البريد الإلكتروني غير صالحة"

View file

@ -52,6 +52,7 @@ searchUser: "ব্যবহারকারী খুঁজুন..."
reply: "জবাব"
loadMore: "আরও দেখুন"
showMore: "আরও দেখুন"
showLess: "বন্ধ"
youGotNewFollower: "আপনাকে অনুসরণ করছে"
receiveFollowRequest: "অনুসরণ করার জন্য অনুরোধ পাওয়া গেছে"
followRequestAccepted: "অনুসরণ করার অনুরোধ গৃহীত হয়েছে"
@ -843,6 +844,12 @@ oneWeek: "এক সপ্তাহ"
reflectMayTakeTime: "এটির কাজ দেখা যেতে কিছুটা সময় লাগতে পারে।"
failedToFetchAccountInformation: "অ্যাকাউন্টের তথ্য উদ্ধার করা যায়নি"
rateLimitExceeded: "রেট লিমিট ছাড়িয়ে গেছে "
file: "ফাইলগুলি"
reverse: "উল্টান"
colored: "রঙ্গিন"
label: "লেবেল"
localOnly: "শুধুমাত্র লোকাল"
account: "অ্যাকাউন্টগুলি"
_emailUnavailable:
used: "এই ইমেইল ঠিকানাটি ইতোমধ্যে ব্যবহৃত হয়েছে"
format: "এই ইমেল ঠিকানাটি সঠিকভাবে লিখা হয়নি"
@ -1638,9 +1645,8 @@ _notification:
_deck:
alwaysShowMainColumn: "সর্বদা মেইন কলাম দেখান"
columnAlign: "কলাম সাজান"
columnMargin: "কলামের মধ্যবর্তী মার্জিন"
columnHeaderHeight: "কলামের হেডারের উচ্চতা"
addColumn: "কলাম যুক্ত করুন"
configureColumn: "কলাম সেটিংস"
swapLeft: "বামে সরান"
swapRight: "ডানে সরান"
swapUp: "উপরে উঠান"

View file

@ -111,6 +111,14 @@ reactionSettingDescription2: "Arrossega per reordenar, fes clic per suprimir, pr
rememberNoteVisibility: "Recorda la configuració de visibilitat de les notes"
attachCancel: "Eliminar el fitxer adjunt"
markAsSensitive: "Marcar com a NSFW"
unmarkAsSensitive: "Deixar de marcar com a sensible"
enterFileName: "Defineix nom del fitxer"
mute: "Silencia"
unmute: "Deixa de silenciar"
block: "Bloqueja"
unblock: "Desbloqueja"
suspend: "Suspèn"
unsuspend: "Deixa de suspendre"
instances: "Instàncies"
remove: "Eliminar"
nsfw: "NSFW"
@ -120,6 +128,7 @@ smtpUser: "Nom d'usuari"
smtpPass: "Contrasenya"
user: "Usuaris"
searchByGoogle: "Cercar"
file: "Fitxers"
_email:
_follow:
title: "t'ha seguit"
@ -147,6 +156,8 @@ _profile:
username: "Nom d'usuari"
_exportOrImport:
followingList: "Seguint"
muteList: "Silencia"
blockingList: "Bloqueja"
userLists: "Llistes"
_pages:
script:

View file

@ -52,6 +52,7 @@ searchUser: "Vyhledat uživatele"
reply: "Odpovědět"
loadMore: "Zobrazit více"
showMore: "Zobrazit více"
showLess: "Zavřít"
youGotNewFollower: "Máte nového následovníka"
receiveFollowRequest: "Žádost o sledování přijata"
followRequestAccepted: "Žádost o sledování přijata"
@ -205,6 +206,7 @@ instanceFollowers: "Následovníci na instanci"
instanceUsers: "Uživatelé této instance"
changePassword: "Změnit heslo"
security: "Zabezpečení"
retypedNotMatch: "Zadané údaje se neshodují."
currentPassword: "Současné heslo"
newPassword: "Nové heslo"
newPasswordRetype: "Nové heslo (znovu)"
@ -267,6 +269,7 @@ addFile: "Přidat soubor"
emptyFolder: "Tato složka je prázdná"
unableToDelete: "Nelze smazat"
inputNewFileName: "Zadejte nový název"
inputNewFolderName: "Zadejte název nové složky"
copyUrl: "Kopírovat URL"
rename: "Přejmenovat"
avatar: "Avatar"
@ -309,9 +312,11 @@ pinnedUsers: "Připnutí uživatelé"
pinnedNotes: "Připnutá poznámka"
hcaptcha: "hCaptcha"
enableHcaptcha: "Aktivovat hCaptchu"
hcaptchaSiteKey: "Klíč stránky"
hcaptchaSecretKey: "Tajný Klíč (Secret Key)"
recaptcha: "reCAPTCHA"
enableRecaptcha: "Zapnout ReCAPTCHu"
recaptchaSiteKey: "Klíč stránky"
recaptchaSecretKey: "Tajný Klíč (Secret Key)"
antennas: "Antény"
manageAntennas: "Spravovat Antény"
@ -320,6 +325,10 @@ antennaSource: "Zdroj Antény"
enableServiceworker: "Povolit ServiceWorker"
caseSensitive: "Rozlišuje malá a velká písmena"
connectedTo: "Následující účty jsou připojeny"
notesAndReplies: "Poznámky a odpovědi"
withFiles: "Včetně souborů"
popularUsers: "Populární uživatelé"
recentlyUpdatedUsers: "Nedávno aktívni uživatelé"
popularTags: "Populární tagy"
userList: "Seznamy"
about: "Informace"
@ -364,10 +373,14 @@ next: "Další"
retype: "Zadejte znovu"
noteOf: "{user} poznámky"
inviteToGroup: "Pozvat do skupiny"
quoteAttached: "Citace"
quoteQuestion: "Přiložit jako citaci?"
noMessagesYet: "Zatím tu nejsou žádné zprávy"
newMessageExists: "Máte novou zprávu"
onlyOneFileCanBeAttached: "Ke zprávě můžete přiložit jenom jeden soubor"
signinRequired: "Přihlašte se, prosím"
invitations: "Pozvat"
invitationCode: "Kód pozvánky"
checking: "Ověřuji"
available: "K dispozici"
unavailable: "Není k dispozici"
@ -381,6 +394,7 @@ passwordMatched: "Hesla se schodují"
passwordNotMatched: "Hesla se neschodují"
signinWith: "Přihlásit se s {x}"
signinFailed: "Nelze se přihlásit. Zkontrolujte prosím své uživatelské jméno a heslo."
tapSecurityKey: "Ťukněte na bezpečnostní klíč"
or: "Nebo"
language: "Jazyk"
uiLanguage: "Jazyk uživatelského rozhraní"
@ -410,9 +424,20 @@ accountSettings: "Nastavení účtu"
promotion: "Propagace"
promote: "Propagovat"
numberOfDays: "Počet dní"
objectStorageBaseUrl: "Base URL"
objectStorageBucket: "Bucket"
objectStoragePrefix: "Předpona"
objectStorageEndpoint: "Endpoint"
objectStorageRegion: "Región"
objectStorageUseSSL: "Použít SSL"
deleteAll: "Smazat vše"
showFixedPostForm: "Zobrazit formulář pro nové příspěvky nad časovou osou"
listen: "Poslouchat"
showInPage: "Zobrazit na stránce"
popout: "Pop-out"
volume: "Hlasitost"
masterVolume: "Celková hlasitost"
details: "Detaily"
chooseEmoji: "Vybrat emotikon"
unableToProcess: "Operace nebyla dokončena."
recentUsed: "Naposledy použité"
@ -433,13 +458,20 @@ deleteAllFiles: "Smazat všechny soubory"
deleteAllFilesConfirm: "Jste si jistí že chcete smazat všechny soubory?"
userSuspended: "Tomuto uživateli byl pozastaven účet."
menu: "Menu"
divider: "Dělící čára"
addItem: "Přidat položku"
relays: "Relay"
addRelay: "Přidat Relay"
inboxUrl: "Inbox URL"
deletedNote: "Odstraněné příspěvky"
invisibleNote: "Skryté příspěvky"
description: "Popis"
author: "Autor"
manage: "Administrace"
width: "Šířka"
height: "Výška"
large: "Velké"
medium: "Střední"
small: "Malé"
generateAccessToken: "Vygenerovat přístupový token"
permission: "Oprávnění"
@ -457,11 +489,16 @@ smtpPort: "Port"
smtpUser: "Uživatelské jméno"
smtpPass: "Heslo"
smtpSecureInfo: "Toto vypněte pokud používáte STARTTLS"
testEmail: "Otestovat doručení emailů"
makeActive: "Aktivovat"
display: "Zobrazit"
copy: "Kopírovat"
metrics: "Metriky"
overview: "Shrnutí"
logs: "Logy"
delayed: "Prodleva"
database: "Databáze"
channel: "Kanály"
create: "Vytvořit"
notificationSetting: "Nastavení oznámení"
useGlobalSetting: "Použít globální nastavení"
@ -469,78 +506,415 @@ other: "Ostatní"
fileIdOrUrl: "ID nebo URL souboru"
behavior: "Chování"
sample: "Ukázka"
send: "Odeslat"
openInNewTab: "Otevřít v nové kartě"
random: "Náhodně"
system: "Systém"
desktop: "Plocha"
clip: "Oříznout"
createNew: "Vytvořit nový"
optional: "Volitelné"
yes: "Ano"
no: "Ne"
notSet: "Není nastaveno"
emailVerified: "Váš e-mail byl ověřen"
contact: "Kontakt"
useSystemFont: "Použít výchozí font systému"
clips: "Oříznout"
experimentalFeatures: "Experimentální funkce"
developer: "Vývojář"
duplicate: "Duplikovat"
left: "Vlevo"
center: "Uprostřed"
wide: "Široké"
narrow: "Úzké"
clearCache: "Vyprázdnit mezipaměť"
nUsers: "{n} užívatelů"
nNotes: "{n} poznámek"
myTheme: "Moje vzhledy"
backgroundColor: "Pozadí"
accentColor: "Akcent"
textColor: "Barva textu"
saveAs: "Uložit jako…"
advanced: "Pokročilé"
value: "Hodnota"
createdAt: "Vytvořeno"
updatedAt: "Upraveno"
saveConfirm: "Uložit změny?"
deleteConfirm: "Opravdu smazat?"
invalidValue: "Neplatná hodnota."
registry: "Registr"
info: "Informace"
unknown: "Neznámý"
onlineStatus: "Online status"
hideOnlineStatus: "Skrýt Váš online status"
hideOnlineStatusDescription: "Skrytí vašeho online stavu může snížit funkcionalitu některých funkcí, například vyhledávání."
online: "Online"
active: "Aktivní"
offline: "Offline"
notRecommended: "Nedoporučuje se"
botProtection: "Bot ochrana"
instanceBlocking: "Blokované instance"
selectAccount: "Vybrat účet"
switchAccount: "Přepnout účet"
enabled: "Zapnuto"
disabled: "Vypnuto"
quickAction: "Rychlé akce"
user: "Uživatelé"
administration: "Administrace"
accounts: "Účty"
switch: "Přepnout"
configure: "Nastavit"
gallery: "Galerie"
recentPosts: "Poslední příspěvky"
ads: "Reklamy"
memo: "Memo"
priority: "Priorita"
high: "Vysoká"
middle: "Střední"
low: "Nízká"
emailNotConfiguredWarning: "E-mailová adresa není nastavena."
ratio: "Poměr"
global: "Globální"
sent: "Odeslat"
hashtags: "Hashtagy"
troubleshooting: "Poradce při potížích"
whatIsNew: "Zobrazit změny"
translate: "Přeložit"
hide: "Skrýt"
smartphone: "Telefon"
tablet: "Tablet"
auto: "Auto"
size: "Velikost"
numberOfColumn: "Počet sloupců"
searchByGoogle: "Vyhledávání"
indefinitely: "Navždy"
tenMinutes: "10 minut"
oneHour: "1 hodina"
oneDay: "1 den"
oneWeek: "1 týden"
reflectMayTakeTime: "Může trvat nějakou dobu, než se projeví změny."
cropImage: "Oříznout obrázek"
file: "Soubor(ů)"
recentNHours: "Posledních {n} hodin"
recentNDays: "Posledních {n} dnů"
recommended: "Doporučeno"
deleteAccount: "Odstranit účet"
document: "Dokumentace"
logoutConfirm: "Opravdu se chcete odhlásit?"
pleaseSelect: "Vybrat možnost"
reverse: "Otočit"
colored: "Barevné"
type: "Typ"
speed: "Rychlost"
slow: "Pomalá"
fast: "Rychlá"
account: "Účty"
_ad:
back: "Zpět"
_gallery:
my: "Moje galerie"
_email:
_follow:
title: "Máte nového následovníka"
_plugin:
install: "Instalovat plugin"
manage: "Správce pluginů"
_preferencesBackups:
list: "Vytvořit backup"
loadFile: "Načíst ze souboru"
save: "Uložit změny"
_registry:
scope: "Rozsah"
key: "Klíč"
keys: "Klíče"
domain: "Doména"
createKey: "Vytvořit klíč"
_aboutMisskey:
allContributors: "Všichni přispěvatelé"
source: "Zdrojový kód"
_mfm:
mention: "Zmínění"
hashtag: "Hashtag"
link: "Odkaz"
bold: "Tučně"
quote: "Citovat"
emoji: "Vlastní emoji"
search: "Vyhledávání"
flip: "Otočit"
tada: "Animace (tadá)"
blur: "Rozmazání"
font: "Font"
rainbow: "Duha"
_channel:
featured: "Trendy"
_menuDisplay:
top: "Nahoru"
hide: "Skrýt"
_theme:
install: "Nainstalovat vzhled"
manage: "Správa vzhledů"
code: "Kód vzhledu"
description: "Popis"
installedThemes: "Nainstalované vzhledy"
constant: "Konstanta"
defaultValue: "Výchozí hodnota"
color: "Barva"
key: "Klíč"
func: "Funkce "
keys:
shadow: "Stín"
header: "Nadpis"
link: "Odkaz"
hashtag: "Hashtag"
mention: "Zmínění"
renote: "Přeposlat"
divider: "Dělící čára"
_sfx:
note: "Poznámky"
notification: "Oznámení"
chat: "Zprávy"
_ago:
future: "Budoucí"
justNow: "Teď"
_time:
second: "Sekund"
minute: "Minut"
hour: "Hodin"
_2fa:
registerDevice: "Přidat zařízení"
registerKey: "Přidat bezpečnostní klíč"
_weekday:
sunday: "Neděle"
monday: "Pondělí"
tuesday: "Úterý"
wednesday: "Středa"
thursday: "Čtvrtek"
friday: "Pátek"
saturday: "Sobota"
_widgets:
notifications: "Oznámení"
timeline: "Časová osa"
calendar: "Kalendář"
trends: "Trendy"
clock: "Hodiny"
rss: "RSS čtečka"
activity: "Aktivita"
photos: "Fotky"
digitalClock: "Digitální hodiny"
federation: "Federace"
slideshow: "Prezentace"
button: "Tlačítko"
onlineUsers: "Online uživatelé"
jobQueue: "Fronta úloh"
aiscript: "AiScript conzole"
aichan: "Ai"
_cw:
hide: "Skrýt"
show: "Zobrazit více"
_poll:
noMore: "Více už přidat nemůžete"
infinite: "Nikdy"
deadlineDate: "Datum ukončení"
deadlineTime: "Hodin"
duration: "Trvání"
_visibility:
home: "Domů"
followers: "Sledující"
_postForm:
_placeholders:
f: "Čekám, až něco napíšete..."
_profile:
name: "Jméno"
username: "Uživatelské jméno"
description: "O mně"
youCanIncludeHashtags: "V popisku o Vás můžete použít i hastagy."
metadata: "Doplňující informace"
metadataContent: "Obsah"
_exportOrImport:
allNotes: "Všechny poznámky"
followingList: "Sledovaní"
muteList: "Ztlumit"
blockingList: "Zablokovat"
userLists: "Seznamy"
_charts:
federation: "Federace"
apRequest: "Požadavek"
usersTotal: "Celkem uživatelů"
activeUsers: "Aktivní uživatelé"
notesTotal: "Celkový počet poznámek"
_timelines:
home: "Domů"
global: "Globální"
_pages:
newPage: "Vytvořit novou stránku"
editPage: "Upravit stránku"
created: "Stránka byla úspěšně vytvořena"
updated: "Stránka byla úspěšně aktualizována"
deleted: "Stránka byla úspěšně smazána"
pageSetting: "Nastavení stránky"
invalidNameText: "Ujistěte se že jméno stránky je vyplněno"
contents: "Obsah"
fontSerif: "Serif"
fontSansSerif: "Sans Serif"
chooseBlock: "Přidat blok"
selectType: "Vyberte typ"
contentBlocks: "Obsah"
inputBlocks: "Vstup"
specialBlocks: "Speciální"
blocks:
text: "Text"
textarea: "Textové pole"
section: "Sekce"
image: "Obrázky"
button: "Tlačítko"
if: "Pokud"
_if:
variable: "Proměnná"
_post:
text: "Obsah"
canvasId: "Canvas ID"
_textInput:
name: "Jméno proměnné"
text: "Titulek"
default: "Výchozí hodnota"
_textareaInput:
name: "Jméno proměnné"
text: "Titulek"
default: "Výchozí hodnota"
_numberInput:
name: "Jméno proměnné"
text: "Titulek"
default: "Výchozí hodnota"
canvas: "Canvas"
_canvas:
id: "Canvas ID"
width: "Šířka"
height: "Výška"
_switch:
name: "Jméno proměnné"
text: "Titulek"
default: "Výchozí hodnota"
_counter:
name: "Jméno proměnné"
text: "Titulek"
inc: "Krok"
_button:
text: "Titulek"
colored: "Barevné"
_action:
_dialog:
content: "Obsah"
_radioButton:
name: "Jméno proměnné"
default: "Výchozí hodnota"
script:
categories:
list: "Seznamy"
blocks:
text: "Text"
_strLen:
arg1: "Text"
_strPick:
arg1: "Text"
_strReplace:
arg1: "Text"
_strReverse:
arg1: "Text"
_join:
arg1: "Seznamy"
_subtract:
arg1: "A"
arg2: "B"
_multiply:
arg1: "A"
arg2: "B"
_divide:
arg1: "A"
arg2: "B"
_mod:
arg1: "A"
arg2: "B"
round: "Zaokrouhlení zlomku"
_round:
arg1: "Číselná hodnota"
eq: "A a B jsou stejné"
_eq:
arg1: "A"
arg2: "B"
notEq: "A a B jsou odlišné"
_notEq:
arg1: "A"
arg2: "B"
_and:
arg1: "A"
arg2: "B"
_or:
arg1: "A"
arg2: "B"
_lt:
arg1: "A"
arg2: "B"
_gt:
arg1: "A"
arg2: "B"
_ltEq:
arg1: "A"
arg2: "B"
_gtEq:
arg1: "A"
arg2: "B"
if: "Větev"
_if:
arg1: "Pokud"
arg2: "Potom"
arg3: "Nebo"
random: "Náhodně"
_random:
arg1: "Pravděpodobnost"
rannum: "Náhodné číslo"
_rannum:
arg1: "Minimální hodnota"
arg2: "Maximální hodnota"
_randomPick:
arg1: "Seznamy"
_dailyRandom:
arg1: "Pravděpodobnost"
_dailyRannum:
arg1: "Minimální hodnota"
arg2: "Maximální hodnota"
_dailyRandomPick:
arg1: "Seznamy"
_seedRandom:
arg2: "Pravděpodobnost"
_seedRannum:
arg2: "Minimální hodnota"
arg3: "Maximální hodnota"
_seedRandomPick:
arg2: "Seznamy"
_pick:
arg1: "Seznamy"
_listLen:
arg1: "Seznamy"
number: "Číselná hodnota"
_stringToNumber:
arg1: "Text"
_numberToString:
arg1: "Číselná hodnota"
_splitStrByLine:
arg1: "Text"
types:
string: "Text"
number: "Číselná hodnota"
array: "Seznamy"
_notification:
youWereFollowed: "Máte nového následovníka"
youWereInvitedToGroup: "Pozvat do skupiny"
_types:
all: "Vše"
follow: "Sledovaní"
mention: "Zmínění"
reply: "Odpovědi"
renote: "Přeposlat"
quote: "Citovat"
reaction: "Reakce"

View file

@ -52,6 +52,7 @@ searchUser: "Nach einem Benutzer suchen"
reply: "Antworten"
loadMore: "Mehr laden"
showMore: "Mehr anzeigen"
showLess: "Schließen"
youGotNewFollower: "ist dir gefolgt"
receiveFollowRequest: "Follow-Anfrage erhalten"
followRequestAccepted: "Follow-Anfrage akzeptiert"
@ -203,6 +204,7 @@ done: "Fertig"
processing: "In Bearbeitung …"
preview: "Vorschau"
default: "Standard"
defaultValueIs: "Standardwert: {value}"
noCustomEmojis: "Keine benutzerdefinierten Emojis gefunden"
noJobs: "Keine Jobs vorhanden"
federating: "Wird föderiert"
@ -356,7 +358,7 @@ antennaExcludeKeywords: "Zu ignorierende Schlüsselwörter"
antennaKeywordsDescription: "Zum Nutzen einer \"UND\"-Verknüpfung Einträge mit Leerzeichen trennen, zum Nutzen einer \"ODER\"-Verknüpfung Einträge mit einem Zeilenumbruch trennen"
notifyAntenna: "Über neue Notizen benachrichtigen"
withFileAntenna: "Nur Notizen mit Dateien"
enableServiceworker: "ServiceWorker aktivieren"
enableServiceworker: "Push-Benachrichtigungen im Browser aktivieren"
antennaUsersDescription: "Benutzernamen getrennt durch Zeilenumbrüche angeben"
caseSensitive: "Groß-/Kleinschreibung unterscheiden"
withReplies: "Antworten beinhalten"
@ -381,6 +383,7 @@ administrator: "Administrator"
token: "Token"
twoStepAuthentication: "Zwei-Faktor-Authentifizierung"
moderator: "Moderator"
moderation: "Moderation"
nUsersMentioned: "Von {n} Benutzern erwähnt"
securityKey: "Sicherheitsschlüssel"
securityKeyName: "Schlüsselname"
@ -425,7 +428,7 @@ quoteQuestion: "Als Zitat anhängen?"
noMessagesYet: "Noch keine Nachrichten vorhanden"
newMessageExists: "Du hast eine neue Nachricht"
onlyOneFileCanBeAttached: "Es kann pro Nachricht nur eine Datei angehängt werden"
signinRequired: "Bitte melde dich an"
signinRequired: "Bitte registriere oder melde dich an, um fortzufahren"
invitations: "Einladungen"
invitationCode: "Einladungscode"
checking: "Wird überprüft …"
@ -559,6 +562,7 @@ author: "Autor"
leaveConfirm: "Es gibt unspeicherte Änderungen. Möchtest du diese verwerfen?"
manage: "Verwaltung"
plugins: "Plugins"
preferencesBackups: "Einstellungsbackups"
deck: "Deck"
undeck: "Deck verlassen"
useBlurEffectForModal: "Weichzeichnungseffekt für Modals verwenden"
@ -643,6 +647,8 @@ clip: "Clip erstellen"
createNew: "Neu erstellen"
optional: "Optional"
createNewClip: "Neuen Clip erstellen"
unclip: "Aus Clip entfernen"
confirmToUnclipAlreadyClippedNote: "Diese Notiz ist bereits im \"{name}\" Clip enthalten. Möchtest du sie aus diesem Clip entfernen?"
public: "Öffentlich"
i18nInfo: "Misskey wird durch freiwillige Helfer in viele verschiedene Sprachen übersetzt. Auf {link} kannst du mithelfen."
manageAccessTokens: "Zugriffstokens verwalten"
@ -830,7 +836,7 @@ auto: "Automatisch"
themeColor: "Farbe der Instanz-Information"
size: "Größe"
numberOfColumn: "Spaltenanzahl"
searchByGoogle: "Googlen"
searchByGoogle: "Suchen"
instanceDefaultLightTheme: "Instanzweites Standardfarbschema (Hell)"
instanceDefaultDarkTheme: "Instanzweites Standardfarbschema (Dunkel)"
instanceDefaultThemeDescription: "Gib den Farbschemencode im Objektformat ein."
@ -845,6 +851,56 @@ failedToFetchAccountInformation: "Benutzerkontoinformationen konnten nicht abgef
rateLimitExceeded: "Versuchsanzahl überschritten"
cropImage: "Bild zuschneiden"
cropImageAsk: "Möchtest du das Bild zuschneiden?"
file: "Datei"
recentNHours: "Letzten {n} Stunden"
recentNDays: "Letzten {n} Tage"
noEmailServerWarning: "Es ist kein Email-Server konfiguriert."
thereIsUnresolvedAbuseReportWarning: "Es liegen ungelöste Meldungen vor."
recommended: "Empfehlung"
check: "Check"
driveCapOverrideLabel: "Die Drive-Kapazität dieses Nutzers verändern"
driveCapOverrideCaption: "Gib einen Wert von 0 oder weniger ein, um die Kapazität auf den Standard zurückzusetzen."
requireAdminForView: "Melde dich mit einem Administratorkonto an, um dies einzusehen."
isSystemAccount: "Ein Benutzerkonto, dass durch das System erstellt und automatisch kontrolliert wird."
typeToConfirm: "Bitte gib zur Bestätigung {x} ein"
deleteAccount: "Benutzerkonto löschen"
document: "Dokumentation"
numberOfPageCache: "Seitencachegröße"
numberOfPageCacheDescription: "Das Erhöhen dieses Caches führt zu einer angenehmerern Benutzererfahrung, erhöht aber Serverlast und Arbeitsspeicherauslastung."
logoutConfirm: "Wirklich abmelden?"
lastActiveDate: "Zuletzt verwendet am"
statusbar: "Statusleiste"
pleaseSelect: "Wähle eine Option"
reverse: "Umkehren"
colored: "Farbig"
refreshInterval: "Aktualisierungsrate"
label: "Beschriftung"
type: "Art"
speed: "Geschwindigkeit"
slow: "Langsam"
fast: "Schnell"
sensitiveMediaDetection: "Erkennung von NSFW-Medien"
localOnly: "Nur Lokal"
remoteOnly: "Nur für fremde Instanzen"
failedToUpload: "Hochladen fehlgeschlagen"
cannotUploadBecauseInappropriate: "Diese Datei kann nicht hochgeladen werden, da Anteile der Datei als möglicherweise NSFW festgestellt wurden."
cannotUploadBecauseNoFreeSpace: "Die Datei konnte nicht hochgeladen werden, da dein Drive-Speicherplatz aufgebraucht ist."
beta: "Beta"
enableAutoSensitive: "NSFW-Automarkierung"
enableAutoSensitiveDescription: "Setzt soweit möglich durch Verwendung von Machine Learning automatisch NSFW-Markierungen für Medien, die NSFW-Anteile beinhalten. Auch wenn du diese Option deaktiviert hast, ist sie möglicherweise auf Instanzebene aktiviert."
activeEmailValidationDescription: "Aktivert strengere Überprüfung von E-Mail-Adressen, d.h. Testen auf Wegwerfadressen und darauf, ob mit der Adresse tatsächlich kommuniziert werden kann. Ist dies deaktiviert, so wird nur das Format der E-Mail überprüft."
navbar: "Navigationsleiste"
shuffle: "Mischen"
account: "Benutzerkonto"
move: "Verschieben"
_sensitiveMediaDetection:
description: "Ermöglicht eine Erleichterung der Servermoderation durch die automatische Erkennungen von NSFW-Medien unter Verwendung von Machine Learning. Hierdurch wird die Serverlast etwas erhöht."
sensitivity: "Erkennungssensitivität"
sensitivityDescription: "Durch das Senken der Sensitivität kann die Anzahl an Fehlerkennungen (sog. false positives) reduziert werden. Durch ein Erhöhen dieser kann die Anzahl an verpassten Erkennungen (sog. false negatives) reduziert werden."
setSensitiveFlagAutomatically: "Als NSFW markieren"
setSensitiveFlagAutomaticallyDescription: "Die Resultate der internen Erkennung werden beibehalten, auch wenn diese Option deaktiviert ist."
analyzeVideos: "Videoanalyse aktivieren"
analyzeVideosDescription: "Analysiert zusätzlich zu Bildern auch Videos. Die Last des Servers wird hierdurch etwas erhöht."
_emailUnavailable:
used: "Diese Email-Adresse wird bereits verwendet"
format: "Das Format dieser Email-Adresse ist ungültig"
@ -887,6 +943,24 @@ _plugin:
install: "Plugins installieren"
installWarn: "Installiere bitte nur vertrauenswürdige Plugins."
manage: "Plugins verwalten"
_preferencesBackups:
list: "Erstellte Backups"
saveNew: "Neu erstellen"
loadFile: "Von Datei laden"
apply: "Auf dieses Gerät anwenden"
save: "Speichern"
inputName: "Gib einen Namen für dieses Backup ein"
cannotSave: "Speichern fehlgeschlagen"
nameAlreadyExists: "Es existiert bereits ein Backup unter dem Namen \"{name}\". Bitte gib einen anderen Namen ein."
applyConfirm: "Wirklich das Backup \"{name}\" auf dieses Gerät anwenden? Bestehende Einstellungen darauf werden überschrieben."
saveConfirm: "Als {name} speichern?"
deleteConfirm: "Das Backup {name} löschen?"
renameConfirm: "Soll dieses Backup von \"{old}\" zu \"{new}\" umbenannt werden?"
noBackups: "Keine Backups existieren. Backups können über \"Neu erstellen\" erstelllt werden."
createdAt: "Erstellt am: {date} {time}"
updatedAt: "Aktualisiert am: {date} {time}"
cannotLoad: "Laden fehlgeschlagen"
invalidFile: "Ungültiges Dateiformat."
_registry:
scope: "Scope"
key: "Schlüssel"
@ -970,6 +1044,8 @@ _mfm:
sparkleDescription: "Verleiht Inhalt einen glitzernden Partikeleffekt."
rotate: "Drehen"
rotateDescription: "Dreht den Inhalt um einen angegebenen Winkel."
plain: "Schlicht"
plainDescription: "Deaktiviert jegliche MFM-Syntax, die sich innerhalb dieses MFM-Effekts befindet."
_instanceTicker:
none: "Nie anzeigen"
remote: "Für Benutzer fremder Instanzen anzeigen"
@ -1199,10 +1275,13 @@ _widgets:
trends: "Trends"
clock: "Uhr"
rss: "RSS-Reader"
rssTicker: "RSS-Ticker"
activity: "Aktivität"
photos: "Fotos"
digitalClock: "Digitaluhr"
unixClock: "UNIX-Uhr"
federation: "Föderation"
instanceCloud: "Instanzwolke"
postForm: "Notizfenster"
slideshow: "Diashow"
button: "Knopf"
@ -1640,9 +1719,8 @@ _notification:
_deck:
alwaysShowMainColumn: "Hauptspalte immer zeigen"
columnAlign: "Spaltenausrichtung"
columnMargin: "Spaltenabstand"
columnHeaderHeight: "Spaltenkopfhöhe"
addColumn: "Spalte hinzufügen"
configureColumn: "Spalteneinstellungen"
swapLeft: "Mit linker Spalte tauschen"
swapRight: "Mit rechter Spalte tauschen"
swapUp: "Mit oberer Spalte tauschen"
@ -1650,6 +1728,11 @@ _deck:
stackLeft: "Auf linke Spalte stapeln"
popRight: "Nach rechts vom Stapel nehmen"
profile: "Profil"
newProfile: "Neues Profil"
deleteProfile: "Profil löschen"
introduction: "Erstelle eine auf dich zugeschneiderte Benutzeroberfläche durch das Aneinanderreihen von Spalten!"
introduction2: "Klicke auf das + rechts um wann immer du möchtest neue Spalten hinzuzufügen."
widgetsIntroduction: "Drücke bitte \"Widgets bearbeiten\" im Spaltenmenü und füge ein Widget hinzu."
_columns:
main: "Hauptspalte"
widgets: "Widgets"

View file

@ -52,6 +52,7 @@ searchUser: "Search for a user"
reply: "Reply"
loadMore: "Load more"
showMore: "Show more"
showLess: "Close"
youGotNewFollower: "followed you"
receiveFollowRequest: "Follow request received"
followRequestAccepted: "Follow request accepted"
@ -203,6 +204,7 @@ done: "Done"
processing: "Processing..."
preview: "Preview"
default: "Default"
defaultValueIs: "Default: {value}"
noCustomEmojis: "There are no emoji"
noJobs: "There are no jobs"
federating: "Federating"
@ -356,7 +358,7 @@ antennaExcludeKeywords: "Keywords to exclude"
antennaKeywordsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition."
notifyAntenna: "Notify about new notes"
withFileAntenna: "Only notes with files"
enableServiceworker: "Enable ServiceWorker"
enableServiceworker: "Enable Push-Notifications for your Browser"
antennaUsersDescription: "List one username per line"
caseSensitive: "Case sensitive"
withReplies: "Include replies"
@ -381,6 +383,7 @@ administrator: "Administrator"
token: "Token"
twoStepAuthentication: "Two-factor authentication"
moderator: "Moderator"
moderation: "Moderation"
nUsersMentioned: "Mentioned by {n} users"
securityKey: "Security key"
securityKeyName: "Key name"
@ -425,7 +428,7 @@ quoteQuestion: "Append as quote?"
noMessagesYet: "No messages yet"
newMessageExists: "There are new messages"
onlyOneFileCanBeAttached: "You can only attach one file to a message"
signinRequired: "Please sign in"
signinRequired: "Please register or sign in before continuing"
invitations: "Invites"
invitationCode: "Invitation code"
checking: "Checking..."
@ -559,6 +562,7 @@ author: "Author"
leaveConfirm: "There are unsaved changes. Do you want to discard them?"
manage: "Management"
plugins: "Plugins"
preferencesBackups: "Preference backups"
deck: "Deck"
undeck: "Leave Deck"
useBlurEffectForModal: "Use blur effect for modals"
@ -643,6 +647,8 @@ clip: "Clip"
createNew: "Create new"
optional: "Optional"
createNewClip: "Create new clip"
unclip: "Unclip"
confirmToUnclipAlreadyClippedNote: "This note is already part of the \"{name}\" clip. Do you want to remove it from this clip instead?"
public: "Public"
i18nInfo: "Misskey is being translated into various languages by volunteers. You can help at {link}."
manageAccessTokens: "Manage access tokens"
@ -830,7 +836,7 @@ auto: "Auto"
themeColor: "Instance Ticker Color"
size: "Size"
numberOfColumn: "Number of columns"
searchByGoogle: "Google"
searchByGoogle: "Search"
instanceDefaultLightTheme: "Instance-wide default light theme"
instanceDefaultDarkTheme: "Instance-wide default dark theme"
instanceDefaultThemeDescription: "Enter the theme code in object format."
@ -845,6 +851,56 @@ failedToFetchAccountInformation: "Could not fetch account information"
rateLimitExceeded: "Rate limit exceeded"
cropImage: "Crop image"
cropImageAsk: "Do you want to crop this image?"
file: "File"
recentNHours: "Last {n} hours"
recentNDays: "Last {n} days"
noEmailServerWarning: "Email server not configured."
thereIsUnresolvedAbuseReportWarning: "There are unsolved reports."
recommended: "Recommended"
check: "Check"
driveCapOverrideLabel: "Change the drive capacity for this user"
driveCapOverrideCaption: "Reset the capacity to default by inputting a value of 0 or lower."
requireAdminForView: "You must log in with an administrator account to view this."
isSystemAccount: "An account created and automatically operated by the system."
typeToConfirm: "Please enter {x} to confirm"
deleteAccount: "Delete account"
document: "Documentation"
numberOfPageCache: "Number of cached pages"
numberOfPageCacheDescription: "Increasing this number will improve convenience for users but cause more server load as well as more memory to be used."
logoutConfirm: "Really log out?"
lastActiveDate: "Last used at"
statusbar: "Status bar"
pleaseSelect: "Select an option"
reverse: "Reverse"
colored: "Colored"
refreshInterval: "Update interval "
label: "Label"
type: "Type"
speed: "Speed"
slow: "Slow"
fast: "Fast"
sensitiveMediaDetection: "Detection of NSFW media"
localOnly: "Local only"
remoteOnly: "Remote only"
failedToUpload: "Upload failed"
cannotUploadBecauseInappropriate: "This file could not be uploaded because parts of it have been detected as potentially NSFW."
cannotUploadBecauseNoFreeSpace: "Upload failed due to lack of Drive capacity."
beta: "Beta"
enableAutoSensitive: "Automatic NSFW-Marking"
enableAutoSensitiveDescription: "Allows automatic detection and marking of NSFW media through Machine Learning where possible. Even if this option is disabled, it may be enabled instance-wide."
activeEmailValidationDescription: "Enables stricter validation of email addresses, which includes checking for disposable addresses and by whether it can actually be communicated with. When unchecked, only the format of the email is validated."
navbar: "Navigation bar"
shuffle: "Shuffle"
account: "Account"
move: "Move"
_sensitiveMediaDetection:
description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server."
sensitivity: "Detection sensitivity"
sensitivityDescription: "Reducing the sensitivity will lead to fewer misdetections (false positives) whereas increasing it will lead to fewer missed detections (false negatives)."
setSensitiveFlagAutomatically: "Mark as NSFW"
setSensitiveFlagAutomaticallyDescription: "The results of the internal detection will be retained even if this option is turned off."
analyzeVideos: "Enable analysis of videos"
analyzeVideosDescription: "Analyzes videos in addition to images. This will slightly increase the load on the server."
_emailUnavailable:
used: "This email address is already being used"
format: "The format of this email address is invalid"
@ -887,6 +943,24 @@ _plugin:
install: "Install plugins"
installWarn: "Please do not install untrustworthy plugins."
manage: "Manage plugins"
_preferencesBackups:
list: "Created backups"
saveNew: "Save new backup"
loadFile: "Load from file"
apply: "Apply to this device"
save: "Save changes"
inputName: "Please enter a name for this backup"
cannotSave: "Saving failed"
nameAlreadyExists: "A backup called \"{name}\" already exists. Please enter a different name."
applyConfirm: "Do you really want to apply the \"{name}\" backup to this device? Existing settings of this device will be overwritten."
saveConfirm: "Save backup as {name}?"
deleteConfirm: "Delete the {name} backup?"
renameConfirm: "Rename this backup from \"{old}\" to \"{new}\"?"
noBackups: "No backups exist. You may backup your client settings on this server by using \"Create new backup\"."
createdAt: "Created at: {date} {time}"
updatedAt: "Updated at: {date} {time}"
cannotLoad: "Loading failed"
invalidFile: "Invalid file format"
_registry:
scope: "Scope"
key: "Key"
@ -970,6 +1044,8 @@ _mfm:
sparkleDescription: "Gives content a sparkling particle effect."
rotate: "Rotate"
rotateDescription: "Turns content by a specified angle."
plain: "Plain"
plainDescription: "Deactivates the effects of all MFM contained within this MFM effect."
_instanceTicker:
none: "Never show"
remote: "Show for remote users"
@ -1199,10 +1275,13 @@ _widgets:
trends: "Trending"
clock: "Clock"
rss: "RSS reader"
rssTicker: "RSS-Ticker"
activity: "Activity"
photos: "Photos"
digitalClock: "Digital clock"
unixClock: "UNIX clock"
federation: "Federation"
instanceCloud: "Instance cloud"
postForm: "Posting form"
slideshow: "Slideshow"
button: "Button"
@ -1640,9 +1719,8 @@ _notification:
_deck:
alwaysShowMainColumn: "Always show main column"
columnAlign: "Align columns"
columnMargin: "Margin between columns"
columnHeaderHeight: "Column header height"
addColumn: "Add column"
configureColumn: "Column settings"
swapLeft: "Swap with the left column"
swapRight: "Swap with the right column"
swapUp: "Swap with the above column"
@ -1650,6 +1728,11 @@ _deck:
stackLeft: "Stack with the left column"
popRight: "Pop column to the right"
profile: "Profile"
newProfile: "New profile"
deleteProfile: "Delete profile"
introduction: "Create the perfect interface for you by arranging columns freely!"
introduction2: "Click on the + on the right of the screen to add new colums whenever you want."
widgetsIntroduction: "Please select \"Edit widgets\" in the column menu and add a widget."
_columns:
main: "Main"
widgets: "Widgets"

View file

@ -1,16 +1,16 @@
---
_lang_: "Español"
headlineMisskey: "Red conectada por notas"
introMisskey: "¡Bienvenido/a! Misskey es un servicio de microblogging descentralizado de código abierto.\nEscribe \"notas\" para compartir lo que te ocurre ahora o para contar sobre ti a todos 📡\nCon la función de \"reacciones\", puedes también añadir una reacción rápida a las notas de todos 👍\nExplora un nuevo mundo 🚀"
introMisskey: "¡Bienvenido/a! Misskey es un servicio de microblogging descentralizado de código abierto.\nEscribe \"notas\" para compartir lo que te ocurre ahora o para contar sobre ti a todos 📡\nCon la función de \"reacciones\", puedes también añadir una reacción rápida a las notas de todos 👍\n¡Exploremos juntos un nuevo mundo! 🚀"
monthAndDay: "{day}/{month}"
search: "Buscar"
notifications: "Notificaciones"
username: "Nombre de usuario"
password: "Contraseña"
forgotPassword: "Olvidé mi Contraseña"
fetchingAsApObject: "Buscando en el fediverso"
fetchingAsApObject: "Recuperando desde el Fediverso..."
ok: "OK"
gotIt: "Entendido"
gotIt: "¡Lo tengo!"
cancel: "Cancelar"
enterUsername: "Introduce el nombre de usuario"
renotedBy: "Renotado por {user}"
@ -22,36 +22,37 @@ basicSettings: "Configuración Básica"
otherSettings: "Configuración avanzada"
openInWindow: "Abrir en una ventana"
profile: "Perfil"
timeline: "Linea de tiempo"
noAccountDescription: "Este usuario no tiene una descripción"
timeline: "Línea de tiempo"
noAccountDescription: "Este usuario no ha escrito su biografía aún"
login: "Iniciar sesión"
loggingIn: "Iniciando sesión"
logout: "Cerrar sesión"
signup: "Registrarse"
uploading: "Cargando"
uploading: "Cargando..."
save: "Guardar"
users: "Usuarios"
addUser: "Agregar usuario"
favorite: "Favorito"
favorite: "Añadir a favoritos"
favorites: "Favoritos"
unfavorite: "Quitar de favoritos"
favorited: "Añadido a favoritos"
favorited: "Añadido a favoritos."
alreadyFavorited: "Ya había sido añadido a favoritos"
cantFavorite: "No fue añadido a favoritos"
pin: "Fijar"
cantFavorite: "No se puede añadir a favoritos."
pin: "Fijar al perfil"
unpin: "Desfijar"
copyContent: "Copiar contenido"
copyLink: "Copiar enlace"
delete: "Borrar"
deleteAndEdit: "Borrar y editar"
deleteAndEditConfirm: "¿Quieres borrar y editar este nota? Las reacciones, renotes, respuestas y todo desaparecerán."
deleteAndEditConfirm: "¿Estás seguro de que quieres borrar esta nota y editarla? Perderás todas las reacciones, renotas y respuestas."
addToList: "Agregar a lista"
sendMessage: "Énviar mensaje"
sendMessage: "Enviar un mensaje"
copyUsername: "Copiar nombre de usuario"
searchUser: "Búsqueda de usuarios"
searchUser: "Buscar un usuario"
reply: "Responder"
loadMore: "Ver más"
showMore: "Ver más"
showLess: "Cerrar"
youGotNewFollower: "te ha seguido"
receiveFollowRequest: "Recibiste una solicitud de seguimiento"
followRequestAccepted: "La solicitud de seguimiento fue aceptada"
@ -87,11 +88,11 @@ enterListName: "Ingrese nombre de lista"
privacy: "Privacidad"
makeFollowManuallyApprove: "Aprobar manualmente las solicitudes de seguimiento"
defaultNoteVisibility: "Visibilidad por defecto"
follow: "Sigue"
followRequest: "Solicitud de seguimiento"
follow: "Seguir"
followRequest: "Enviar solicitud de seguimiento"
followRequests: "Solicitudes de seguimiento"
unfollow: "Dejar de seguir"
followRequestPending: "Solicitudes de seguimiento pendientes"
followRequestPending: "Solicitudes de seguimiento pendiente"
enterEmoji: "Ingresar emojis"
renote: "Renotar"
unrenote: "Quitar renota"
@ -100,7 +101,7 @@ cantRenote: "No se puede renotar este post"
cantReRenote: "No se puede renotar una renota"
quote: "Citar"
pinnedNote: "Nota fijada"
pinned: "Fijar"
pinned: "Fijar al perfil"
you: "Tú"
clickToShow: "Click para ver"
sensitive: "Marcado como sensible"
@ -203,6 +204,7 @@ done: "Terminado"
processing: "Procesando"
preview: "Vista previa"
default: "Predeterminado"
defaultValueIs: "Predeterminado"
noCustomEmojis: "No hay emojis personalizados"
noJobs: "No hay trabajos"
federating: "Federando"
@ -381,6 +383,7 @@ administrator: "Administrador"
token: "Token"
twoStepAuthentication: "Autenticación de dos factores"
moderator: "Moderador"
moderation: "Moderación"
nUsersMentioned: "{n} usuarios mencionados"
securityKey: "Clave de seguridad"
securityKeyName: "Nombre de la Clave"
@ -559,6 +562,7 @@ author: "Autor"
leaveConfirm: "Hay modificaciones sin guardar. ¿Desea descartarlas?"
manage: "Administrar"
plugins: "Plugins"
preferencesBackups: "Respaldo de preferencias"
deck: "Deck"
undeck: "Quitar deck"
useBlurEffectForModal: "Usar efecto borroso en modales"
@ -592,6 +596,8 @@ smtpSecure: "Usar SSL/TLS implícito en la conexión SMTP"
smtpSecureInfo: "Apagar cuando se use STARTTLS"
testEmail: "Prueba de envío"
wordMute: "Silenciar palabras"
regexpError: "Error de la expresión regular"
regexpErrorDescription: "Ocurrió un error en la expresión regular en la linea {line} de las palabras muteadas {tab}"
instanceMute: "Instancias silenciadas"
userSaysSomething: "{name} dijo algo"
makeActive: "Activar"
@ -620,8 +626,9 @@ reportAbuse: "Reportar"
reportAbuseOf: "Reportar a {name}"
fillAbuseReportDescription: "Ingrese los detalles del reporte. Si hay una nota en particular, ingrese la URL de esta."
abuseReported: "Se ha enviado el reporte. Muchas gracias."
reporteeOrigin: "Informar a"
reporterOrigin: "Origen del informe"
reporter: "Reportador"
reporteeOrigin: "Reportar a"
reporterOrigin: "Origen del reporte"
forwardReport: "Transferir un informe a una instancia remota"
forwardReportIsAnonymous: "No puede ver su información de la instancia remota y aparecerá como una cuenta anónima del sistema"
send: "Enviar"
@ -640,6 +647,8 @@ clip: "Clip"
createNew: "Crear"
optional: "Opcional"
createNewClip: "Crear clip nuevo"
unclip: "Quitar clip"
confirmToUnclipAlreadyClippedNote: "Esta nota ya está incluida en el clip \"{name}\". ¿Quiere quitar la nota del clip?"
public: "Público"
i18nInfo: "Misskey está siendo traducido a varios idiomas gracias a voluntarios. Se puede colaborar traduciendo en {link}"
manageAccessTokens: "Administrar tokens de acceso"
@ -727,6 +736,7 @@ showingPastTimeline: "Mostrar líneas de tiempo antiguas"
clear: "Limpiar"
markAllAsRead: "Marcar todo como leído"
goBack: "Deseleccionar"
unlikeConfirm: "¿Quitar como favorito?"
fullView: "Vista completa"
quitFullView: "quitar vista completa"
addDescription: "Agregar descripción"
@ -794,6 +804,7 @@ pubSub: "Cuentas Pub/Sub"
lastCommunication: "Última comunicación"
resolved: "Resuelto"
unresolved: "Sin resolver"
breakFollow: "Dejar de seguir"
itsOn: "¡Está encendido!"
itsOff: "¡Está apagado!"
emailRequiredForSignup: "Se requere una dirección de correo electrónico para el registro de la cuenta"
@ -807,16 +818,116 @@ classic: "Clásico"
muteThread: "Ocultar hilo"
unmuteThread: "Mostrar hilo"
ffVisibility: "Visibilidad de seguidores y seguidos"
ffVisibilityDescription: "Puedes configurar quien puede ver a quienes sigues y quienes te siguen"
continueThread: "Ver la continuación del hilo"
deleteAccountConfirm: "La cuenta será borrada. ¿Está seguro?"
incorrectPassword: "La contraseña es incorrecta"
voteConfirm: "¿Confirma su voto a {choice}?"
hide: "Ocultar"
leaveGroup: "Dejar el grupo"
leaveGroupConfirm: "¿Desea salir de {name}?"
useDrawerReactionPickerForMobile: "Mostrar panel de reacciones en móviles"
welcomeBackWithName: "Bienvenido otra vez, {name}"
clickToFinishEmailVerification: "Cliquée {ok} y verifique su correo"
overridedDeviceKind: "Tipo de dispositivo"
smartphone: "Teléfono smartphone"
tablet: "Tablet"
auto: "Automático"
themeColor: "Color del tema"
size: "Tamaño"
numberOfColumn: "Cantidad de columnas"
searchByGoogle: "Buscar"
instanceDefaultLightTheme: "Tema claro por defecto de la instancia"
instanceDefaultDarkTheme: "Tema oscuro por defecto de la instancia"
instanceDefaultThemeDescription: "Ingrese el código del tema en formato objeto"
mutePeriod: "Período de silenciamiento"
indefinitely: "Sin límite de tiempo"
tenMinutes: "10 minutos"
oneHour: "1 hora"
oneDay: "1 día"
oneWeek: "1 semana"
reflectMayTakeTime: "Puede pasar un tiempo hasta que se reflejen los cambios"
failedToFetchAccountInformation: "No se pudo obtener información de la cuenta"
rateLimitExceeded: "Se excedió el límite de peticiones"
cropImage: "Recortar imágen"
cropImageAsk: "¿Desea recortar la imagen?"
file: "Archivos"
recentNHours: "Últimas {n} horas"
recentNDays: "Últimos {n} días"
noEmailServerWarning: "No se ha configurado un servidor de correo electrónico."
thereIsUnresolvedAbuseReportWarning: "Hay reportes sin resolver"
recommended: "Recomendado"
check: "Verificar"
driveCapOverrideLabel: "Cambiar la capacidad de la unidad para este usuario"
driveCapOverrideCaption: "Restablecer la capacidad a su predeterminado ingresando un valor de 0 o menos"
requireAdminForView: "Necesitas iniciar sesión como administrador para ver esto."
isSystemAccount: "Cuenta creada y operada automáticamente por el sistema"
typeToConfirm: "Ingrese {x} para confirmar"
deleteAccount: "Borrar cuenta"
document: "Documento"
numberOfPageCache: "Cantidad de páginas cacheadas"
numberOfPageCacheDescription: "Al aumentar el número mejora la conveniencia pero tambien puede aumentar la carga y la memoria a usarse"
logoutConfirm: "¿Cerrar sesión?"
lastActiveDate: "Utilizado por última vez el"
statusbar: "Barra de estado"
pleaseSelect: "Selecciona una opción"
reverse: "Echar de un capirotazo"
colored: "Color"
refreshInterval: "Intervalo de actualización"
label: "Etiqueta"
type: "Tipo"
speed: "Velocidad"
slow: "Lento"
fast: "Rápido"
sensitiveMediaDetection: "Detección de contenido NSFW"
localOnly: "Solo local"
remoteOnly: "Sólo remoto"
failedToUpload: "La subida falló"
cannotUploadBecauseInappropriate: "Este archivo no se puede subir debido a que algunas partes han sido detectadas comoNSFW."
cannotUploadBecauseNoFreeSpace: "La subida falló debido a falta de espacio libre en la unidad del usuario."
beta: "Beta"
enableAutoSensitive: "Marcar automáticamente contenido NSFW"
enableAutoSensitiveDescription: "Permite la detección y marcado automático de contenido NSFW usando 'Machine Learning' cuando sea posible. Incluso si esta opción está desactivada, puede ser activado para toda la instancia."
activeEmailValidationDescription: "Habilita la validación estricta de direcciones de correo electrónico, lo cual incluye la revisión de direcciones desechables y si se puede comunicar con éstas. Cuando está deshabilitado, sólo el formato de la dirección es validado."
navbar: "Barra de navegación"
shuffle: "Aleatorio"
account: "Cuentas"
move: "Mover"
_sensitiveMediaDetection:
description: "Reduce el esfuerzo de la moderación el el servidor a través del reconocimiento automático de contenido NSFW usando 'Machine Learning'. Esto puede incrementar ligeramente la carga en el servidor."
sensitivity: "Sensibilidad de detección"
sensitivityDescription: "Reducir la sensibilidad puede acarrear a varios falsos positivos, mientras que incrementarla puede reducir las detecciones (falsos negativos)."
setSensitiveFlagAutomatically: "Marcar como NSFW"
setSensitiveFlagAutomaticallyDescription: "Los resultados de la detección interna pueden ser retenidos incluso si la opción está desactivada."
analyzeVideos: "Habilitar el análisis de videos"
analyzeVideosDescription: "Analizar videos en adición a las imágenes. Esto puede incrementar ligeramente la carga del servidor."
_emailUnavailable:
used: "Ya fue usado"
format: "Formato no válido."
disposable: "No es un correo reutilizable"
mx: "Servidor de correo inválido"
smtp: "Servidor de correo no disponible"
_ffVisibility:
public: "Publicar"
followers: "Visible solo para seguidores"
private: "Privado"
_signup:
almostThere: "Ya falta poco"
emailAddressInfo: "Ingrese el correo electrónico que usa. Este no se hará público."
emailSent: "Se envió un correo de verificación a la dirección {email}. Acceda al link enviado en el correo para completar el ingreso."
_accountDelete:
accountDelete: "Eliminar Cuenta"
mayTakeTime: "La eliminación de la cuenta es un proceso que precisa de carga. Puede pasar un tiempo hasta que se complete si es mucho el contenido creado y los archivos subidos."
sendEmail: "Cuando se termine de borrar la cuenta, se enviará un correo a la dirección usada para el registro."
requestAccountDelete: "Pedir la eliminación de la cuenta."
started: "El proceso de eliminación ha comenzado."
inProgress: "La eliminación está en proceso."
_ad:
back: "Deseleccionar"
reduceFrequencyOfThisAd: "Mostrar menos este anuncio."
_forgotPassword:
enterEmail: "Ingrese el correo usado para registrar la cuenta. Se enviará un link para resetear la contraseña."
ifNoEmail: "Si no utilizó un correo para crear la cuenta, contáctese con el administrador."
contactAdmin: "Esta instancia no admite el uso de direcciones de correo electrónico, póngase en contacto con el administrador de la instancia para restablecer su contraseña"
_gallery:
my: "Mi galería"
@ -832,6 +943,24 @@ _plugin:
install: "Instalar plugins"
installWarn: "Por favor no instale plugins que no son de confianza"
manage: "Gestionar plugins"
_preferencesBackups:
list: "Respaldos creados"
saveNew: "Guardar nuevo respaldo"
loadFile: "Cargar desde archivo"
apply: "Aplicar a este dispositivo"
save: "Guardar cambios"
inputName: "Por favor, ingresa un nombre para este respaldo"
cannotSave: "Fallo al guardar"
nameAlreadyExists: "Un respaldo llamado \"{name}\" ya existe. Por favor ingresa un nombre diferente"
applyConfirm: "¿Realmente quieres aplicar los cambios desde el archivo \"{name}\" a este dispositivo? Las configuraciones existentes serán sobreescritas. "
saveConfirm: "¿Guardar respaldo como \"{name}\"?"
deleteConfirm: "¿Borrar el respaldo \"{name}\"?"
renameConfirm: "¿Renombrar este respaldo de \"{old}\" a \"{new}\"?"
noBackups: "No existen respaldos. Deberás respaldar las configuraciones del cliente en este servidor usando \"Crear nuevo respaldo\""
createdAt: "Creado: {date} {time}"
updatedAt: "Actualizado: {date} {time}"
cannotLoad: "La carga falló"
invalidFile: "Formato de archivo inválido"
_registry:
scope: "Alcance"
key: "Clave"
@ -858,20 +987,65 @@ _mfm:
mention: "Menciones"
mentionDescription: "El signo @ seguido de un nombre de usuario se puede utilizar para notificar a un usuario en particular."
hashtag: "Hashtag"
hashtagDescription: "Puede especificar un hashtag con un numeral y el texto."
url: "URL"
urlDescription: "Se pueden mostrar las URL"
link: "Vínculo"
linkDescription: "Se pueden asociar partes de texto a la URL"
bold: "Negrita"
boldDescription: "Muestra el texto con las letras más gruesas"
small: "Pequeño"
smallDescription: "Muestra el texto más pequeño y delgado"
center: "Centrar"
centerDescription: "Muestra el texto centrado"
inlineCode: "Código (insertado)"
inlineCodeDescription: "Muestra el código de un programa resaltando su sintaxis"
blockCode: "Código (bloque)"
blockCodeDescription: "Código de resaltado de sintaxis, como programas de varias líneas con bloques."
inlineMath: "Fórmula (insertado)"
inlineMathDescription: "Muestra fórmulas (KaTeX) insertadas"
blockMath: "Fórmula (bloque)"
blockMathDescription: "Muestra fórmulas (KaTeX) de varias líneas en un bloque"
quote: "Citar"
quoteDescription: "Muestra el contenido como una cita"
emoji: "Emojis personalizados"
emojiDescription: "Muestra los emojis personalizados encerrados entre dos puntos."
search: "Buscar"
searchDescription: "Muestra una caja de búsqueda con texto pre-escrito"
flip: "Echar de un capirotazo"
flipDescription: "Voltea el contenido hacia arriba / abajo o hacia la izquierda / derecha."
jelly: "Animación (gelatina)"
jellyDescription: "Aplica un efecto de animación tipo gelatina"
tada: "Animación (tadá)"
tadaDescription: "Aplica un efecto de animación al estilo \"Tadá\""
jump: "Animación (saltar)"
jumpDescription: "Aplica un efecto de animación tipo salto"
bounce: "Animación (rebotar)"
bounceDescription: "Aplica un efecto de animación tipo rebote"
shake: "Animación (temblor)"
shakeDescription: "Aplica un efecto de animación tipo temblor"
twitch: "Animación (sacudida)"
twitchDescription: "Aplica un efecto de animación tipo sacudida"
spin: "Animación (giro)"
spinDescription: "Aplica un efecto de animación tipo rotación"
x2: "Grande"
x2Description: "Muestra el contenido más grande"
x3: "Muy grande"
x3Description: "Muestra el contenido mucho más grande"
x4: "Totalmente grande"
x4Description: "Muestra el contenido totalmente grande"
blur: "Desenfoque"
blurDescription: "Para desenfocar el contenido. Se muestra claramente al colocar el puntero encima."
font: "Fuente"
fontDescription: "Elegir la fuente del contenido"
rainbow: "Arcoíris"
rainbowDescription: "Muestra el contenido con los colores del arcoíris"
sparkle: "Parpadeante"
sparkleDescription: "Aplica un efecto de partículas parpadeantes"
rotate: "Rotar"
rotateDescription: "Rota el contenido a un ángulo especificado."
plain: "Plano"
plainDescription: "Desactiva los efectos de todo el contenido MFM con este efecto MFM."
_instanceTicker:
none: "No mostrar"
remote: "Mostrar a usuarios remotos"
@ -893,6 +1067,7 @@ _channel:
_menuDisplay:
sideFull: "Horizontal"
sideIcon: "Horizontal (ícono)"
top: "Arriba"
hide: "Ocultar"
_wordMute:
muteWords: "Palabras que silenciar"
@ -915,6 +1090,8 @@ _theme:
code: "Código del tema"
description: "Descripción"
installed: "{name} ha sido instalado"
installedThemes: "Temas instalados"
builtinThemes: "Temas integrados"
alreadyInstalled: "Este tema ya está instalado"
invalid: "El formato del tema no es válido"
make: "Crear tema"
@ -1032,6 +1209,7 @@ _2fa:
registerKey: "Registrar clave"
step1: "Primero, instale en su dispositivo la aplicación de autenticación {a} o {b} u otra."
step2: "Luego, escanee con la aplicación el código QR mostrado en pantalla."
step2Url: "En una aplicación de escritorio se puede ingresar la siguiente URL:"
step3: "Para terminar, ingrese el token mostrado en la aplicación."
step4: "Ahora cuando inicie sesión, ingrese el mismo token"
securityKeyInfo: "Se puede configurar el inicio de sesión usando una clave de seguridad de hardware que soporte FIDO2 o con un certificado de huella digital o con un PIN"
@ -1064,6 +1242,10 @@ _permissions:
"write:user-groups": "Administrar grupos de usuarios"
"read:channels": "Ver canal"
"write:channels": "Modificar canal"
"read:gallery": "Ver galería"
"write:gallery": "Editar galería"
"read:gallery-likes": "Ver favoritos de la galería"
"write:gallery-likes": "Editar favoritos de la galería"
_auth:
shareAccess: "¿Desea permitir el acceso a la cuenta \"{name}\"?"
shareAccessAsk: "¿Está seguro de que desea autorizar esta aplicación para acceder a su cuenta?"
@ -1093,13 +1275,21 @@ _widgets:
trends: "Tendencias"
clock: "Reloj"
rss: "Lector RSS"
rssTicker: "Ticker-RSS"
activity: "Actividad"
photos: "Fotos"
digitalClock: "Reloj digital"
unixClock: "Reloj UNIX"
federation: "Federación"
instanceCloud: "Nube de palabras de la instancia"
postForm: "Formulario"
slideshow: "Diapositivas"
button: "Botón"
onlineUsers: "Usuarios en linea"
jobQueue: "Cola de trabajos"
serverMetric: "Estadísticas del servidor"
aiscript: "Consola de AiScript"
aichan: "indigo"
_cw:
hide: "Ocultar"
show: "Ver más"
@ -1154,14 +1344,21 @@ _profile:
username: "Nombre de usuario"
description: "Descripción"
youCanIncludeHashtags: "Puedes añadir hashtags"
metadata: "información adicional"
metadataEdit: "Editar información adicional"
metadataDescription: "Muestra la información adicional en el perfil"
metadataLabel: "Etiqueta"
metadataContent: "Contenido"
changeAvatar: "Cambiar avatar"
changeBanner: "Cambiar banner"
_exportOrImport:
allNotes: "Todas las notas"
followingList: "Siguiendo"
muteList: "Silenciados"
blockingList: "Bloqueados"
userLists: "Listas"
excludeMutingUsers: "Excluir usuarios silenciados"
excludeInactiveUsers: "Excluir usuarios inactivos"
_charts:
federation: "Federación"
apRequest: "Pedidos"
@ -1200,6 +1397,7 @@ _pages:
created: "La página fue creada"
updated: "La página fue actualizada"
deleted: "La página borrada"
pageSetting: "Configurar página"
nameAlreadyExists: "La URL de la página especificada ya existe"
invalidNameTitle: "URL inválida"
invalidNameText: "Verifique que no tenga espacios en blanco"
@ -1210,6 +1408,7 @@ _pages:
unlike: "Quitar me gusta"
my: "Mis páginas"
liked: "Páginas que me gustan"
featured: "Popular"
inspector: "Inspector"
contents: "Contenido"
content: "Bloque de página"
@ -1265,6 +1464,11 @@ _pages:
id: "Lienzo ID"
width: "Ancho"
height: "Altura"
note: "Nota embebida"
_note:
id: "Id de la nota"
idDescription: "Pega la URL de la nota para configurarla"
detailed: "Ver Detalles"
switch: "Interruptor"
_switch:
name: "Nombre de variable"
@ -1492,6 +1696,8 @@ _notification:
youReceivedFollowRequest: "Has mandado una solicitud de seguimiento"
yourFollowRequestAccepted: "Tu solicitud de seguimiento fue aceptada"
youWereInvitedToGroup: "Invitado al grupo"
pollEnded: "Estan disponibles los resultados de la encuesta"
emptyPushNotificationMessage: "Se han actualizado las notificaciones push"
_types:
all: "Todo"
follow: "Siguiendo"
@ -1501,24 +1707,34 @@ _notification:
quote: "Citar"
reaction: "Reacción"
pollVote: "Votado en la encuesta"
pollEnded: "La encuesta terminó"
receiveFollowRequest: "Recibió una solicitud de seguimiento"
followRequestAccepted: "El seguimiento fue aceptado"
groupInvited: "Invitado al grupo"
app: "Notificaciones desde aplicaciones"
_actions:
followBack: "Te sigue de vuelta"
reply: "Responder"
renote: "Renotar"
_deck:
alwaysShowMainColumn: "Siempre mostrar la columna principal"
columnAlign: "Alinear columnas"
addColumn: "Agregar columna"
configureColumn: "Ajustes de columna"
swapLeft: "Mover a la izquierda"
swapRight: "Mover a la derecha"
swapUp: "Mover arriba"
swapDown: "Mover abajo"
stackLeft: "Apilar a la izquierda"
popRight: "Sacar a la derecha"
profile: "Perfil"
newProfile: "Nuevo perfil"
deleteProfile: "Eliminar perfil"
introduction: "¡Crea la interfaz perfecta para tí organizando las columnas libremente!"
introduction2: "Presiona en la + de la derecha de la pantalla para añadir nuevas columnas donde quieras."
widgetsIntroduction: "Por favor selecciona \"Editar Widgets\" en el menú columna y agrega un widget."
_columns:
main: "Principal"
widgets: "Widgets"
notifications: "Notificaciones"
tl: "Linea de tiempo"

View file

@ -52,6 +52,7 @@ searchUser: "Chercher un·e utilisateur·rice"
reply: "Répondre"
loadMore: "Afficher plus …"
showMore: "Afficher plus …"
showLess: "Fermer"
youGotNewFollower: "Vous suit"
receiveFollowRequest: "Demande dabonnement reçue"
followRequestAccepted: "La demande dabonnement a été acceptée"
@ -815,6 +816,7 @@ voteConfirm: "Confirmez-vous votre vote pour « {choice} » ?"
hide: "Masquer"
leaveGroup: "Quitter le groupe"
leaveGroupConfirm: "Êtes vous sûr de vouloir quitter \"{name}\" ?"
useDrawerReactionPickerForMobile: "Afficher le sélecteur de réactions en tant que panneau sur mobile"
welcomeBackWithName: "Heureux de vous revoir, {name}"
clickToFinishEmailVerification: "Veuillez cliquer sur [{ok}] afin de compléter la vérification par courriel."
overridedDeviceKind: "Type dappareil"
@ -827,15 +829,26 @@ numberOfColumn: "Nombre de colonnes"
searchByGoogle: "Google"
instanceDefaultLightTheme: "Thème clair par défaut sur toute linstance"
instanceDefaultDarkTheme: "Thème sombre par défaut sur toute linstance"
instanceDefaultThemeDescription: "Saisissez le code du thème en format objet."
mutePeriod: "Durée de mise en sourdine"
indefinitely: "Illimité"
tenMinutes: "10 minutes"
oneHour: "1 heure"
oneDay: "1 jour"
oneWeek: "1 semaine"
rateLimitExceeded: "Limite de taux dépassée"
cropImage: "Recadrer l'image"
cropImageAsk: "Voulez-vous recadrer cette image ?"
file: "Fichiers"
reverse: "Inverser"
colored: "Coloré"
label: "Étiquette"
localOnly: "Local seulement"
account: "Comptes"
_emailUnavailable:
used: "Non disponible"
format: "Le format de cette adresse de courriel est invalide"
disposable: "Les adresses e-mail jetables ne peuvent pas être utilisées"
mx: "Ce serveur de courriels est invalide"
smtp: "Ce serveur de courriels ne répond pas"
_ffVisibility:
@ -1118,6 +1131,7 @@ _2fa:
registerKey: "Enregistrer une clef"
step1: "Tout d'abord, installez une application d'authentification, telle que {a} ou {b}, sur votre appareil."
step2: "Ensuite, scannez le code QR affiché sur lécran."
step2Url: "Vous pouvez également saisir cette URL si vous utilisez un programme de bureau :"
step3: "Entrez le jeton affiché sur votre application pour compléter la configuration."
step4: "À partir de maintenant, ce même jeton vous sera demandé à chacune de vos connexions."
securityKeyInfo: "Vous pouvez configurer l'authentification WebAuthN pour sécuriser davantage le processus de connexion grâce à une clé de sécurité matérielle qui prend en charge FIDO2, ou bien en configurant l'authentification par empreinte digitale ou par code PIN sur votre appareil."
@ -1601,6 +1615,8 @@ _notification:
youReceivedFollowRequest: "Vous avez reçu une demande dabonnement"
yourFollowRequestAccepted: "Votre demande dabonnement a été accepté"
youWereInvitedToGroup: "Invité·e au groupe"
pollEnded: "Les résultats du sondage sont disponibles"
emptyPushNotificationMessage: "Les notifications push ont été mises à jour"
_types:
all: "Toutes"
follow: "Nouvel·le abonné·e"
@ -1615,13 +1631,12 @@ _notification:
groupInvited: "Invitation à un groupe"
app: "Notifications provenant des apps"
_actions:
followBack: "Suivre"
reply: "Répondre"
renote: "Renoter"
_deck:
alwaysShowMainColumn: "Toujours afficher la colonne principale"
columnAlign: "Aligner les colonnes"
columnMargin: "Marge entre les colonnes"
columnHeaderHeight: "Taille de l'en-tête de colonne"
addColumn: "Ajouter une colonne"
swapLeft: "Déplacer à gauche"
swapRight: "Déplacer à droite"

View file

@ -52,6 +52,7 @@ searchUser: "Cari pengguna"
reply: "Balas"
loadMore: "Selebihnya"
showMore: "Selebihnya"
showLess: "Tutup"
youGotNewFollower: "Mengikuti kamu"
receiveFollowRequest: "Ingin mengikuti kamu"
followRequestAccepted: "Permintaan mengikuti telah disetujui"
@ -81,7 +82,7 @@ somethingHappened: "Terjadi kesalahan"
retry: "Coba lagi"
pageLoadError: "Gagal memuat halaman."
pageLoadErrorDescription: "Umumnya disebabkan jaringan atau tembolok perambah. Cobalah bersihkan tembolok peramban lalu tunggu sesaat sebelum mencoba kembali."
serverIsDead: "Tidak ada respon dari server. Mohon tunggu dan coba beberapa saat lagi."
serverIsDead: "Tidak ada respon dari peladen. Mohon tunggu dan coba beberapa saat lagi."
youShouldUpgradeClient: "Untuk melihat halaman ini, mohon muat ulang untuk memutakhirkan klienmu."
enterListName: "Masukkan nama daftar"
privacy: "Privasi"
@ -294,8 +295,8 @@ rename: "Ubah nama"
avatar: "Avatar"
banner: "Banner"
nsfw: "Konten sensitif"
whenServerDisconnected: "Ketika kehilangan koneksi dengan server"
disconnectedFromServer: "Terputus koneksi dari server"
whenServerDisconnected: "Ketika kehilangan koneksi dengan peladen"
disconnectedFromServer: "Terputus koneksi dari peladen"
reload: "Muat ulang"
doNothing: "Abaikan"
reloadConfirm: "Apakah kamu ingin memuat ulang linimasa?"
@ -495,7 +496,7 @@ objectStorageUseSSLDesc: "Matikan ini jika kamu tidak akan menggunakan HTTPS unt
objectStorageUseProxy: "Hubungkan melalui Proxy"
objectStorageUseProxyDesc: "Matikan ini jika kamu tidak akan menggunakan Proxy untuk koneksi ObjectStorage"
objectStorageSetPublicRead: "Setel \"public-read\" disaat mengunggah"
serverLogs: "Log Server"
serverLogs: "Log Peladen"
deleteAll: "Hapus semua"
showFixedPostForm: "Tampilkan form posting di atas linimasa."
newNoteRecived: "Kamu mendapat catatan baru"
@ -533,7 +534,7 @@ removeAllFollowingDescription: "Batal mengikuti semua akun dari {host}. Mohon ja
userSuspended: "Pengguna ini telah dibekukan."
userSilenced: "Pengguna ini telah dibungkam."
yourAccountSuspendedTitle: "Akun ini dibekukan"
yourAccountSuspendedDescription: "Akun ini dibekukan karena melanggar ketentuan penggunaan layanan server atau semacamnya. Hubungi admin apabila ingin tahu alasan lebih lanjut. Mohon untuk tidak membuat akun baru."
yourAccountSuspendedDescription: "Akun ini dibekukan karena melanggar ketentuan penggunaan layanan peladen atau semacamnya. Hubungi admin apabila ingin tahu alasan lebih lanjut. Mohon untuk tidak membuat akun baru."
menu: "Menu"
divider: "Pembagi"
addItem: "Tambahkan item"
@ -577,12 +578,12 @@ pluginTokenRequestedDescription: "Plugin ini dapat menggunakan setelan ijin disi
notificationType: "Jenis pemberitahuan"
edit: "Sunting"
useStarForReactionFallback: "Gunakan ★ sebagai fallback jika reaksi emoji tidak diketahui"
emailServer: "Server surel"
emailServer: "Peladen surel"
enableEmail: "Nyalakan distribusi surel"
emailConfigInfo: "Digunakan untuk mengonfirmasi surel kamu disaat mendaftar dan lupa kata sandi"
email: "Surel"
emailAddress: "Alamat surel"
smtpConfig: "Konfigurasi server SMTP"
smtpConfig: "Konfigurasi peladen SMTP"
smtpHost: "Host"
smtpPort: "Port"
smtpUser: "Nama Pengguna"
@ -643,6 +644,8 @@ clip: "Klip"
createNew: "Buat baru"
optional: "Opsional"
createNewClip: "Buat klip baru"
unclip: "Batalkan klip"
confirmToUnclipAlreadyClippedNote: "Catatan ini sudah disertakan di klip \"{name}\". Yakin ingin membatalkan catatan dari klip ini?"
public: "Publik"
i18nInfo: "Misskey diterjemahkan ke dalam banyak bahasa oleh sukarelawan. Kamu dapat ikut membantu di {link}."
manageAccessTokens: "Kelola access token"
@ -791,7 +794,7 @@ whatIsNew: "Lihat perubahan pemutakhiran"
translate: "Terjemahkan"
translatedFrom: "Terjemahkan dari {x}"
accountDeletionInProgress: "Penghapusan akun sedang dalam proses"
usernameInfo: "Nama yang mengidentifikasikan akun kamu dari yang lain pada server ini. Kamu dapat menggunakan alfabet (a~z, A~Z), digit (0~9) atau garis bawah (_). Username tidak dapat diubah setelahnya."
usernameInfo: "Nama yang mengidentifikasikan akun kamu dari yang lain pada peladen ini. Kamu dapat menggunakan alfabet (a~z, A~Z), digit (0~9) atau garis bawah (_). Username tidak dapat diubah setelahnya."
aiChanMode: "Mode Ai"
keepCw: "Biarkan Peringatan Konten"
pubSub: "Akun Pub/Sub"
@ -804,7 +807,7 @@ itsOff: "Nonaktif"
emailRequiredForSignup: "Membutuhkan alamat surel untuk mendaftar"
unread: "Belum dibaca"
filter: "Saring"
controlPanel: "Panel kontrol"
controlPanel: "Panel kendali"
manageAccounts: "Kelola Akun"
makeReactionsPublic: "Tampilkan riwayat reaksi ke publik"
makeReactionsPublicDescription: "Pengaturan ini akan membuat daftar dari semua reaksi masa lalu kamu ditampilkan secara publik."
@ -845,12 +848,18 @@ failedToFetchAccountInformation: "Gagal untuk mendapatkan informasi akun"
rateLimitExceeded: "Batas sudah terlampaui"
cropImage: "potong gambar"
cropImageAsk: "Ingin memotong gambar?"
file: "Berkas"
reverse: "Balik"
colored: "Diwarnai"
label: "Label"
localOnly: "Hanya lokal"
account: "Akun"
_emailUnavailable:
used: "Alamat surel ini telah digunakan"
format: "Format tidak valid."
disposable: "Alamat surel temporer tidak dapat digunakan"
mx: "Server alamat surel ini tidak valid"
smtp: "Server alamat surel ini tidak merespon"
mx: "Peladen alamat surel ini tidak valid"
smtp: "Peladen alamat surel ini tidak merespon"
_ffVisibility:
public: "Terbitkan"
followers: "Tampil untuk pengikut saja"
@ -1208,7 +1217,7 @@ _widgets:
button: "Tombol"
onlineUsers: "Pengguna online"
jobQueue: "Antrian kerja"
serverMetric: "Statistik server"
serverMetric: "Statistik peladen"
aiscript: "Konsol AiScript"
aichan: "Ai"
_cw:
@ -1640,8 +1649,6 @@ _notification:
_deck:
alwaysShowMainColumn: "Selalu tampilkan kolom utama"
columnAlign: "Luruskan kolom"
columnMargin: "Batas antar kolom"
columnHeaderHeight: "Tinggi kolom header"
addColumn: "Tambahkan kolom"
swapLeft: "Pindah ke kiri"
swapRight: "Pindah ke kanan"

View file

@ -36,6 +36,7 @@ const languages = [
'sk-SK',
'ug-CN',
'uk-UA',
'vi-VN',
'zh-CN',
'zh-TW',
];

View file

@ -52,6 +52,7 @@ searchUser: "Cerca utente"
reply: "Rispondi"
loadMore: "Mostra di più"
showMore: "Mostra di più"
showLess: "Chiudi"
youGotNewFollower: "Ha iniziato a seguirti"
receiveFollowRequest: "Hai ricevuto una richiesta di follow."
followRequestAccepted: "Richiesta di follow accettata"
@ -809,6 +810,12 @@ tenMinutes: "10 minuti"
oneHour: "1 ora"
oneDay: "1 giorno"
oneWeek: "1 settimana"
file: "Allegati"
reverse: "Inverti"
colored: "Colorato"
label: "Etichetta"
localOnly: "Soltanto locale"
account: "Account"
_emailUnavailable:
used: "Email già in uso"
format: "Formato email non valido"
@ -1443,8 +1450,6 @@ _notification:
_deck:
alwaysShowMainColumn: "Mostra sempre la colonna principale"
columnAlign: "Allineare colonne"
columnMargin: "Margine tra le colonne"
columnHeaderHeight: "Dimensioni dell'intestazione della colonna"
addColumn: "Aggiungi colonna"
swapLeft: "Sposta a sinistra"
swapRight: "Sposta a destra"

View file

@ -2,6 +2,7 @@ _lang_: "日本語"
headlineMisskey: "ノートでつながるネットワーク"
introMisskey: "ようこそMisskeyは、オープンソースの分散型マイクロブログサービスです。\n「ート」を作成して、いま起こっていることを共有したり、あなたについて皆に発信しよう📡\n「リアクション」機能で、皆のートに素早く反応を追加することもできます👍\n新しい世界を探検しよう🚀"
poweredByMisskeyDescription: "{name}は、オープンソースのプラットフォーム<b>Misskey</b>を使ったサービス(Misskeyインスタンスと呼ばれます)のひとつです。"
monthAndDay: "{month}月 {day}日"
search: "検索"
notifications: "通知"
@ -52,6 +53,7 @@ searchUser: "ユーザーを検索"
reply: "返信"
loadMore: "もっと見る"
showMore: "もっと見る"
showLess: "閉じる"
youGotNewFollower: "フォローされました"
receiveFollowRequest: "フォローリクエストされました"
followRequestAccepted: "フォローが承認されました"
@ -203,6 +205,7 @@ done: "完了"
processing: "処理中"
preview: "プレビュー"
default: "デフォルト"
defaultValueIs: "デフォルト: {value}"
noCustomEmojis: "絵文字はありません"
noJobs: "ジョブはありません"
federating: "連合中"
@ -346,6 +349,10 @@ recaptcha: "reCAPTCHA"
enableRecaptcha: "reCAPTCHAを有効にする"
recaptchaSiteKey: "サイトキー"
recaptchaSecretKey: "シークレットキー"
turnstile: "Turnstile"
enableTurnstile: "Turnstileを有効にする"
turnstileSiteKey: "サイトキー"
turnstileSecretKey: "シークレットキー"
avoidMultiCaptchaConfirm: "複数のCaptchaを使用すると干渉を起こす可能性があります。他のCaptchaを無効にしますかキャンセルして複数のCaptchaを有効化したままにすることも可能です。"
antennas: "アンテナ"
manageAntennas: "アンテナの管理"
@ -381,6 +388,7 @@ administrator: "管理者"
token: "トークン"
twoStepAuthentication: "二段階認証"
moderator: "モデレーター"
moderation: "モデレーション"
nUsersMentioned: "{n}人が投稿"
securityKey: "セキュリティキー"
securityKeyName: "キーの名前"
@ -541,7 +549,7 @@ relays: "リレー"
addRelay: "リレーの追加"
inboxUrl: "inboxのURL"
addedRelays: "追加済みのリレー"
serviceworkerInfo: "プッシュ通知を行うには有効する必要があります。"
serviceworkerInfo: "プッシュ通知を行うには有効する必要があります。"
deletedNote: "削除された投稿"
invisibleNote: "非公開の投稿"
enableInfiniteScroll: "自動でもっと見る"
@ -559,8 +567,7 @@ author: "作者"
leaveConfirm: "未保存の変更があります。破棄しますか?"
manage: "管理"
plugins: "プラグイン"
preferencesRegistry: "クライアント設定のレジストリ"
preferencesRegistryShort: "レジストリ"
preferencesBackups: "設定のバックアップ"
deck: "デッキ"
undeck: "デッキ解除"
useBlurEffectForModal: "モーダルにぼかし効果を使用"
@ -856,6 +863,50 @@ noEmailServerWarning: "メールサーバーの設定がされていません。
thereIsUnresolvedAbuseReportWarning: "未対応の通報があります。"
recommended: "推奨"
check: "チェック"
driveCapOverrideLabel: "このユーザーのドライブ容量上限を変更"
driveCapOverrideCaption: "0以下を指定すると解除されます。"
requireAdminForView: "閲覧するには管理者アカウントでログインしている必要があります。"
isSystemAccount: "システムにより自動で作成・管理されているアカウントです。"
typeToConfirm: "この操作を行うには {x} と入力してください"
deleteAccount: "アカウント削除"
document: "ドキュメント"
numberOfPageCache: "ページキャッシュ数"
numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。"
logoutConfirm: "ログアウトしますか?"
lastActiveDate: "最終利用日時"
statusbar: "ステータスバー"
pleaseSelect: "選択してください"
reverse: "反転"
colored: "色付き"
refreshInterval: "更新間隔"
label: "ラベル"
type: "タイプ"
speed: "速度"
slow: "遅い"
fast: "速い"
sensitiveMediaDetection: "センシティブなメディアの検出"
localOnly: "ローカルのみ"
remoteOnly: "リモートのみ"
failedToUpload: "アップロード失敗"
cannotUploadBecauseInappropriate: "不適切な内容を含む可能性があると判定されたためアップロードできません。"
cannotUploadBecauseNoFreeSpace: "ドライブの空き容量が無いためアップロードできません。"
beta: "ベータ"
enableAutoSensitive: "自動NSFW判定"
enableAutoSensitiveDescription: "利用可能な場合は、機械学習を利用して自動でメディアにNSFWフラグを設定します。この機能をオフにしても、インスタンスによっては自動で設定されることがあります。"
activeEmailValidationDescription: "ユーザーのメールアドレスのバリデーションを、捨てアドかどうかや実際に通信可能かどうかなどを判定しより積極的に行います。オフにすると単に文字列として正しいかどうかのみチェックされます。"
navbar: "ナビゲーションバー"
shuffle: "シャッフル"
account: "アカウント"
move: "移動"
_sensitiveMediaDetection:
description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てることができます。サーバーの負荷が少し増えます。"
sensitivity: "検出感度"
sensitivityDescription: "感度を低くすると、誤検知(偽陽性)が減ります。感度を高くすると、検知漏れ(偽陰性)が減ります。"
setSensitiveFlagAutomatically: "NSFWフラグを設定する"
setSensitiveFlagAutomaticallyDescription: "この設定をオフにしても内部的に判定結果は保持されます。"
analyzeVideos: "動画の解析を有効化"
analyzeVideosDescription: "静止画に加えて動画も解析するようにします。サーバーの負荷が少し増えます。"
_emailUnavailable:
used: "既に使用されています"
@ -908,24 +959,20 @@ _plugin:
installWarn: "信頼できないプラグインはインストールしないでください。"
manage: "プラグインの管理"
_preferencesRegistry:
list: "一覧"
_preferencesBackups:
list: "作成したバックアップ"
saveNew: "新規保存"
loadFile: "ファイルを読み込み"
apply: "このデバイスに適用"
delete: "削除"
save: "上書き保存"
rename: "名称変更"
download: "ダウンロード"
saveNewDescription: "現在のデバイスの状態をサーバーに保存します。"
inputName: "レジストリ名を入力"
inputName: "バックアップ名を入力"
cannotSave: "保存できません"
nameAlreadyExists: "レジストリ名「{name}」は既に存在します。違うレジストリ名を指定してください。"
applyConfirm: "ロファイル「{name}」を現在のデバイスに適用しますか?現在のデバイス設定は失われます。"
nameAlreadyExists: "バックアップ名「{name}」は既に存在します。違う名前を指定してください。"
applyConfirm: "バックアップ「{name}」を現在のデバイスに適用しますか?現在のデバイス設定は失われます。"
saveConfirm: "{name}に上書き保存しますか?"
deleteConfirm: "{name}を削除しますか?"
renameConfirm: "「{old}」を「{new}」に変更しますか?"
noRegistries: "レジストリは登録されていません。「新規保存」で現在のクライアント設定をサーバーに保存できます。"
noBackups: "バックアップはありません。「新規保存」で現在のクライアント設定をサーバーに保存できます。"
createdAt: "作成日時: {date} {time}"
updatedAt: "更新日時: {date} {time}"
cannotLoad: "読み込みできません"
@ -1017,6 +1064,8 @@ _mfm:
sparkleDescription: "キラキラしたパーティクルのエフェクトを追加します。"
rotate: "回転"
rotateDescription: "指定した角度で回転させます。"
plain: "プレーン"
plainDescription: "内側の構文を全て無効にします。"
_instanceTicker:
none: "表示しない"
@ -1264,10 +1313,13 @@ _widgets:
trends: "トレンド"
clock: "時計"
rss: "RSSリーダー"
rssTicker: "RSSティッカー"
activity: "アクティビティ"
photos: "フォト"
digitalClock: "デジタル時計"
unixClock: "UNIX時計"
federation: "連合"
instanceCloud: "インスタンスクラウド"
postForm: "投稿フォーム"
slideshow: "スライドショー"
button: "ボタン"
@ -1732,9 +1784,8 @@ _notification:
_deck:
alwaysShowMainColumn: "常にメインカラムを表示"
columnAlign: "カラムの寄せ"
columnMargin: "カラム間のマージン"
columnHeaderHeight: "カラムのヘッダー幅"
addColumn: "カラムを追加"
configureColumn: "カラムの設定"
swapLeft: "左に移動"
swapRight: "右に移動"
swapUp: "上に移動"
@ -1742,6 +1793,11 @@ _deck:
stackLeft: "左に重ねる"
popRight: "右に出す"
profile: "プロファイル"
newProfile: "新規プロファイル"
deleteProfile: "プロファイルを削除"
introduction: "カラムを組み合わせて自分だけのインターフェイスを作りましょう!"
introduction2: "画面の右にある + を押して、いつでもカラムを追加できます。"
widgetsIntroduction: "カラムのメニューから、「ウィジェットの編集」を選択してウィジェットを追加してください"
_columns:
main: "メイン"

View file

@ -52,6 +52,7 @@ searchUser: "ユーザーを検索"
reply: "返事"
loadMore: "まだまだあるで!"
showMore: "まだまだあるで!"
showLess: "閉じる"
youGotNewFollower: "フォローされたで"
receiveFollowRequest: "フォローリクエストされたで"
followRequestAccepted: "フォローが承認されたで"
@ -203,6 +204,7 @@ done: "でけた"
processing: "処理しとる"
preview: "プレビュー"
default: "デフォルト"
defaultValueIs: "デフォルト"
noCustomEmojis: "絵文字はあらへん"
noJobs: "ジョブはあらへん"
federating: "連合しとる"
@ -317,6 +319,8 @@ monthX: "{month}月"
yearX: "{year}年"
pages: "ページ"
integration: "連携"
connectService: "つなげるで"
disconnectService: "切るで"
enableLocalTimeline: "ローカルタイムラインを使えるようにする"
enableGlobalTimeline: "グローバルタイムラインを使えるようにする"
disablingTimelinesInfo: "ここらへんのタイムラインを使えんようにしてしもても、管理者とモデレーターは使えるままになってるで、そうやなかったら不便やからな。"
@ -328,10 +332,13 @@ driveCapacityPerRemoteAccount: "リモートユーザーひとりあたりのド
inMb: "メガバイト単位"
iconUrl: "アイコン画像のURL"
bannerUrl: "バナー画像のURL"
backgroundImageUrl: "背景画像のURL"
basicInfo: "基本情報"
pinnedUsers: "ピン留めしたユーザー"
pinnedUsersDescription: "「みつける」ページとかにピン留めしたいユーザーをここに書けばええんやで。他ん人との名前は改行で区切ればええんやで。"
pinnedPages: "ピン留めページ"
pinnedPagesDescription: "インスタンスのいっちゃん上にピン留めしたいページのパスを改行で区切って記述してな"
pinnedClipId: "ピン留めするクリップのID"
pinnedNotes: "ピン留めされとるノート"
hcaptcha: "hCaptchaキャプチャ"
enableHcaptcha: "hCaptchaキャプチャをつけとく"
@ -376,6 +383,7 @@ administrator: "管理者"
token: "トークン"
twoStepAuthentication: "二段階認証"
moderator: "モデレーター"
moderation: "モデレーション"
nUsersMentioned: "{n}人が投稿"
securityKey: "セキュリティキー"
securityKeyName: "キーの名前"
@ -435,13 +443,17 @@ strongPassword: "ええ感じのパスワード"
passwordMatched: "よし!一致や!"
passwordNotMatched: "一致しとらんで?"
signinWith: "{x}でログイン"
signinFailed: "ログインできんかったで。もっかいユーザー名とパスワードを確認してみてな。"
tapSecurityKey: "セキュリティキーにタッチしてな"
or: "それか"
language: "言語"
uiLanguage: "UIの表示言語"
groupInvited: "グループに招待されとるで"
aboutX: "{x}について"
useOsNativeEmojis: "OSネイティブの絵文字を使う"
disableDrawer: "メニューをドロワーで表示せぇへん"
youHaveNoGroups: "グループがあらへんねぇ。"
joinOrCreateGroup: "既存のグループに招待してもらうか、新しくグループ作ってからやってな"
noHistory: "履歴はあらへんねぇ。"
signinHistory: "ログイン履歴"
disableAnimatedMfm: "動きがやかましいMFMを止める"
@ -450,6 +462,7 @@ category: "カテゴリ"
tags: "タグ"
docSource: "このドキュメントのソース"
createAccount: "アカウントを作成"
existingAccount: "既存のアカウント"
regenerate: "再生成"
fontSize: "フォントサイズ"
noFollowRequests: "フォロー申請はあらへんで"
@ -473,10 +486,15 @@ useObjectStorage: "オブジェクトストレージを使う"
objectStorageBaseUrl: "Base URL"
objectStorageBaseUrlDesc: "参照に使うにURLやで。CDNやProxyを使用してるんならそのURL、S3: 'https://<bucket>.s3.amazonaws.com'、GCSとかなら: 'https://storage.googleapis.com/<bucket>'。"
objectStorageBucket: "Bucket"
objectStorageBucketDesc: "使ってるサービスのbucket名を選んでな"
objectStoragePrefix: "Prefix"
objectStoragePrefixDesc: "このprefixのディレクトリ下に格納されるで"
objectStorageEndpoint: "Endpoint"
objectStorageEndpointDesc: "S3のときは空、それ以外は各サービスのendpointを指定してなー。'<host>'ってやるか'<host>:<port>'みたいに指定するんやで。"
objectStorageRegion: "Region"
objectStorageRegionDesc: "'xx-east-1'みたいなregionを指定したってやー。使ってるサービスにregionの概念がないときは、空か'us-east-1'にするんやで。"
objectStorageUseSSL: "SSLを使う"
objectStorageUseSSLDesc: "API接続にhttpsを使わん場合はオフにするんやで"
objectStorageUseProxy: "Proxyを使う"
objectStorageUseProxyDesc: "API接続にproxy使わんのやったら切ってくれへん"
objectStorageSetPublicRead: "アップロードした時に'public-read'を設定してや"
@ -517,29 +535,52 @@ removeAllFollowing: "フォローを全解除"
removeAllFollowingDescription: "{host}からのフォローをすべて解除するで。そのインスタンスが消えて無くなった時とかには便利な機能やで。"
userSuspended: "このユーザーは...凍結されとる。"
userSilenced: "このユーザーは...サイレンスされとる。"
yourAccountSuspendedTitle: "あんたのアカウント凍結されとるで"
yourAccountSuspendedDescription: "あんたのアカウントは、サーバーの利用規約に違反したとかの理由で、凍結されとるで。細かいことは管理者までお問い合わせたってなー。絶対に新しいアカウント作ったらあかんで。絶対やで。"
menu: "メニュー"
divider: "分割線"
addItem: "項目を追加"
relays: "リレー"
addRelay: "リレーの追加"
inboxUrl: "inboxのURL"
addedRelays: "追加済みのリレー"
serviceworkerInfo: "プッシュ通知をするんなら有効にせなあかんで。"
deletedNote: "消された投稿"
invisibleNote: "非公開の投稿"
enableInfiniteScroll: "自動でもっと見る"
visibility: "公開範囲"
poll: "アンケート"
useCw: "内容を隠す"
enablePlayer: "プレイヤーを開く"
disablePlayer: "プレイヤーを閉じる"
expandTweet: "ツイートを展開する"
themeEditor: "テーマエディター"
description: "説明"
describeFile: "キャプションを付ける"
enterFileDescription: "キャプションを入力"
author: "作者"
leaveConfirm: "未保存の変更があるで!ほかしてええか?"
manage: "管理"
plugins: "プラグイン"
deck: "デッキ"
undeck: "デッキ解除"
useBlurEffectForModal: "モーダルにぼかし効果を使用"
useFullReactionPicker: "フル機能にリアクションピッカーを使用"
width: "幅"
height: "高さ"
large: "大"
medium: "中"
small: "小"
generateAccessToken: "アクセストークンの発行"
permission: "権限"
enableAll: "全部使えるようにする"
disableAll: "全部使えへんようにする"
tokenRequested: "アカウントへのアクセス許可"
pluginTokenRequestedDescription: "このプラグインはここで設定した権限を使えるようになるで。"
notificationType: "通知の種類"
edit: "編集"
useStarForReactionFallback: "リアクションがようわからん場合、★を使う"
emailServer: "メールサーバー"
enableEmail: "メール配信を受け取る"
emailConfigInfo: "メールアドレスの確認とかパスワードリセットの時に使うで"
email: "メール"
@ -551,8 +592,12 @@ smtpUser: "ユーザー名"
smtpPass: "パスワード"
emptyToDisableSmtpAuth: "ユーザー名とパスワードになんも入れんかったら、SMTP認証を無効化するで"
smtpSecure: "SMTP 接続に暗黙的なSSL/TLSを使用する"
smtpSecureInfo: "STARTTLS使っとる時はオフにするで。"
testEmail: "配信テスト"
wordMute: "ワードミュート"
regexpError: "正規表現エラー"
regexpErrorDescription: "{tab}ワードミュートの{line}行目の正規表現にエラーが出てきたで:"
instanceMute: "インスタンスミュート"
userSaysSomething: "{name}が何か言ったようやで"
makeActive: "使うで"
display: "表示"
@ -567,13 +612,24 @@ create: "作成"
notificationSetting: "通知設定"
notificationSettingDesc: "表示する通知の種類えらんでや。"
useGlobalSetting: "グローバル設定を使ってや"
useGlobalSettingDesc: "オンにすると、アカウントの通知設定が使われるで。オフにすると、別々に設定できるようになるで。"
other: "その他"
regenerateLoginToken: "ログイントークンを再生成"
regenerateLoginTokenDescription: "ログインに使われる内部トークンをもっかい作るで。いつもならこれをやる必要はないで。もっかい作ると、全部のデバイスでログアウトされるで気ぃつけてなー。"
setMultipleBySeparatingWithSpace: "スペースで区切って複数設定できるで。"
fileIdOrUrl: "ファイルIDかURL"
behavior: "動作"
sample: "サンプル"
abuseReports: "通報"
reportAbuse: "通報"
reportAbuseOf: "{name}を通報する"
fillAbuseReportDescription: "細かい通報理由を書いてなー。対象ートがある時はそのURLも書いといてなー。"
abuseReported: "無事内容が送信されたみたいやで。おおきに〜。"
reporter: "通報者"
reporteeOrigin: "通報先"
reporterOrigin: "通報元"
forwardReport: "リモートインスタンスに通報を転送するで"
forwardReportIsAnonymous: "リモートインスタンスからはあんたの情報は見れへんくって、匿名のシステムアカウントとして表示されるで。"
send: "送信"
abuseMarkAsResolved: "対応したで"
openInNewTab: "新しいタブで開く"
@ -587,22 +643,57 @@ system: "システム"
switchUi: "UI切り替え"
desktop: "デスクトップ"
clip: "クリップ"
createNew: "新しく作るで"
optional: "任意"
createNewClip: "新しいクリップを作るで"
unclip: "クリップ解除するで"
confirmToUnclipAlreadyClippedNote: "このノートはすでにクリップ「{name}」に含まれとるで。ノートをこのクリップから除外したる?"
public: "パブリック"
i18nInfo: "Misskeyは有志によっていろんな言語に翻訳されとるで。{link}で翻訳に協力したってやー。"
manageAccessTokens: "アクセストークンの管理"
accountInfo: "アカウント情報"
notesCount: "ノートの数やで"
repliesCount: "返信した数やで"
renotesCount: "Renoteした数やで"
repliedCount: "返信された数やで"
renotedCount: "Renoteされた数やで"
followingCount: "フォロー数やで"
followersCount: "フォロワー数やで"
sentReactionsCount: "リアクションした数やで"
receivedReactionsCount: "リアクションされた数"
pollVotesCount: "アンケートに投票した数"
pollVotedCount: "アンケートに投票された数"
yes: "はい"
no: "いいえ"
driveFilesCount: "ドライブのファイル数"
driveUsage: "ドライブ使用量やで"
noCrawle: "クローラーによるインデックスを拒否するで"
noCrawleDescription: "検索エンジンにあんたのユーザーページ、ート、Pagesとかのコンテンツを登録(インデックス)せぇへんように頼むで。"
lockedAccountInfo: "フォローを承認制にしとっても、ノートの公開範囲を「フォロワー」にせぇへん限り、誰でもあんたのノートを見れるで。"
alwaysMarkSensitive: "デフォルトでメディアを閲覧注意にするで"
loadRawImages: "添付画像のサムネイルをオリジナル画質にするで"
disableShowingAnimatedImages: "アニメーション画像を再生しやへんで"
verificationEmailSent: "無事確認のメールを送れたで。メールに書いてあるリンクにアクセスして、設定を完了してなー。"
notSet: "未設定"
emailVerified: "メールアドレスは確認されたで"
noteFavoritesCount: "お気に入りノートの数やで"
pageLikesCount: "Pageにええやんと思った数"
pageLikedCount: "Pageにええやんと思ってくれた数"
contact: "連絡先"
useSystemFont: "システムのデフォルトのフォントを使うで"
clips: "クリップ"
experimentalFeatures: "実験的機能やで"
developer: "開発者やで"
makeExplorable: "アカウントを見つけやすくするで"
makeExplorableDescription: "オフにすると、「みつける」にアカウントが載らんくなるで。"
showGapBetweenNotesInTimeline: "タイムラインのノートを放して表示するで"
duplicate: "複製"
left: "左"
center: "中央"
wide: "広い"
narrow: "狭い"
reloadToApplySetting: "設定はページリロード後に反映されるで。今リロードしとくか?"
needReloadToApply: "反映には再起動せなあかんで"
showTitlebar: "タイトルバーを見せる"
clearCache: "キャッシュをほかす"
onlineUsersCount: "{n}人が起きとるで"
@ -621,6 +712,7 @@ createdAt: "作成した日"
updatedAt: "更新日時"
saveConfirm: "保存するで?"
deleteConfirm: "ホンマに削除するで?"
invalidValue: "有効な値じゃないみたいやで。"
registry: "レジストリ"
closeAccount: "アカウントを閉鎖する"
currentVersion: "現在のバージョン"
@ -634,6 +726,7 @@ editCode: "コードを編集"
apply: "適用"
receiveAnnouncementFromInstance: "インスタンスからのお知らせを受け取る"
emailNotification: "メール通知"
publish: "公開"
inChannelSearch: "チャンネル内検索"
useReactionPickerForContextMenu: "右クリックでリアクションピッカーを開くようにする"
typingUsers: "{users}が今書きよるで"
@ -642,21 +735,121 @@ showingPastTimeline: "過去のタイムラインを表示してるで"
clear: "クリア"
markAllAsRead: "もうみな読んでもうたわ"
goBack: "戻る"
unlikeConfirm: "いいね解除するんか?"
fullView: "フルビュー"
quitFullView: "フルビュー解除"
addDescription: "説明を追加するで"
userPagePinTip: "個々のノートのメニューから「ピン留め」を選んどくと、ここにノートを表示しておけるで。"
notSpecifiedMentionWarning: "宛先に含まれてへんメンションがあるで"
info: "情報"
userInfo: "ユーザー情報やで"
unknown: "不明"
onlineStatus: "オンライン状態"
hideOnlineStatus: "オンライン状態を隠すで"
hideOnlineStatusDescription: "オンライン状態を隠すと、検索とかの一部の機能で使いにくくなるかもしれんよ。"
online: "オンライン"
active: "アクティブ"
offline: "オフライン"
notRecommended: "あんま推奨しやんで"
botProtection: "Botプロテクション"
instanceBlocking: "インスタンスブロック"
selectAccount: "アカウントを選んでなー"
switchAccount: "アカウントを変えるで"
enabled: "有効"
disabled: "無効"
quickAction: "クイックアクション"
user: "ユーザー"
administration: "管理"
accounts: "アカウント"
switch: "切り替え"
noMaintainerInformationWarning: "管理者情報が設定されてへんで"
noBotProtectionWarning: "Botプロテクションが設定されてへんで。"
configure: "設定する"
postToGallery: "ギャラリーへ投稿"
gallery: "ギャラリー"
recentPosts: "最近の投稿"
popularPosts: "人気の投稿"
shareWithNote: "ノートで共有"
ads: "広告"
expiration: "期限"
memo: "メモ"
priority: "優先度"
high: "高い"
middle: "中"
low: "低い"
emailNotConfiguredWarning: "メアドの設定がされてへんで。"
ratio: "比率"
previewNoteText: "本文を下見するで"
customCss: "カスタムCSS"
customCssWarn: "この設定は必ず知識のある人がやらなあかんで。あんま良くない設定をしたるとクライアントがちゃんと使えへんくなってくで。"
global: "グローバル"
squareAvatars: "アイコンを四角形で表示するで"
sent: "送信"
received: "受信"
searchResult: "検索結果やで"
hashtags: "ハッシュタグ"
troubleshooting: "トラブルシューティング"
useBlurEffect: "UIにぼかし効果を使うで"
learnMore: "詳しく"
misskeyUpdated: "Misskeyが更新されたで\nモデレーターの人らに感謝せなあかんで"
whatIsNew: "更新情報を見るで"
translate: "翻訳"
translatedFrom: "{x}から翻訳するで"
accountDeletionInProgress: "アカウント削除しとるで待っとってなー"
usernameInfo: "サーバー上であんたのアカウントをあんたやと分かるようにするための名前やで。アルファベット(a~z, A~Z)、数字(0~9)、それとアンダーバー(_)が使って考えてな。この名前は後から変更することはできへんからちゃんと考えるんやで。"
aiChanMode: "藍モードやで"
keepCw: "CWを維持するで"
pubSub: "Pub/Subのアカウント"
lastCommunication: "直近の通信"
resolved: "解決したで"
unresolved: "まだ解決してないで"
breakFollow: "フォロワーを解除するで"
itsOn: "オンになっとるよ"
hide: "隠す"
searchByGoogle: "探す"
indefinitely: "無期限"
file: "ファイル"
requireAdminForView: "これを見るには管理者アカウントでログインしとらなあかんで。"
isSystemAccount: "システムが自動で作成・管理しとるアカウントやで。"
typeToConfirm: "この操作をやるんなら {x} と入力してなー"
deleteAccount: "アカウント削除するで"
document: "ドキュメント"
numberOfPageCache: "ページキャッシュ数やで"
numberOfPageCacheDescription: "増やすと使いやすくなる、負荷とメモリ使用量が増えてくで。一長一短やな。"
logoutConfirm: "ログアウトしまっか?"
lastActiveDate: "最後に使った日時"
statusbar: "ステータスバー"
pleaseSelect: "選択したってやー"
reverse: "反転"
colored: "色付き"
refreshInterval: "更新間隔"
label: "ラベル"
type: "タイプ"
speed: "速度"
slow: "遅い"
fast: "速い"
sensitiveMediaDetection: "センシティブなメディアの検出"
localOnly: "ローカルのみ"
remoteOnly: "リモートのみ"
failedToUpload: "アップロードに失敗したで"
cannotUploadBecauseInappropriate: "不適切な内容を含むかもしれへんって判定されたでアップロードできまへん。"
cannotUploadBecauseNoFreeSpace: "ドライブの空き容量が無いでアップロードできまへん。"
beta: "ベータ"
enableAutoSensitive: "自動NSFW判定"
enableAutoSensitiveDescription: "使える時は、機械学習を使って自動でメディアにNSFWフラグを設定するで。この機能をオフにしても、インスタンスによっては自動で設定されることがあるで。"
activeEmailValidationDescription: "ユーザーのメールアドレスのバリデーションを、捨てアドかどうかや実際に通信可能かどうかとかを判定して積極的に行うで。オフにすると単に文字列として正しいかどうかだけチェックするで。"
navbar: "ナビゲーションバー"
shuffle: "シャッフルするで"
account: "アカウント"
move: "移動するで"
_sensitiveMediaDetection:
description: "機械学習を使って自動でセンシティブなメディアを検出して、モデレーションに役立てることができるで。サーバーの負荷が少し増えてまうなあ。"
sensitivity: "検出感度やで"
sensitivityDescription: "感度を低くすると、誤検知(偽陽性)が減るで。感度を高くすると、検知漏れ(偽陰性)が減るで。"
setSensitiveFlagAutomatically: "NSFWフラグを設定するで"
setSensitiveFlagAutomaticallyDescription: "この設定をオフにしても内部的に判定結果は保持されるで。"
_ffVisibility:
public: "公開"
_ad:
back: "戻る"
_gallery:
@ -1207,8 +1400,6 @@ _notification:
_deck:
alwaysShowMainColumn: "いつもメインカラムを表示"
columnAlign: "カラムの寄せ"
columnMargin: "カラム間のマージン"
columnHeaderHeight: "カラムのヘッダー幅"
addColumn: "カラムを追加"
swapLeft: "左に移動"
swapRight: "右に移動"

View file

@ -56,6 +56,8 @@ emailNotification: "Ilɣa imayl"
selectAccount: "Fren amiḍan"
accounts: "Imiḍan"
searchByGoogle: "Nadi"
file: "Ifuyla"
account: "Imiḍan"
_email:
_follow:
title: "Yeṭṭafaṛ-ik·em-id"

View file

@ -60,6 +60,7 @@ smtpUser: "ಬಳಕೆಹೆಸರು"
smtpPass: "ಗುಪ್ತಪದ"
user: "ಬಳಕೆದಾರ"
searchByGoogle: "ಹುಡುಕು"
file: "ಕಡತಗಳು"
_email:
_follow:
title: "ಹಿಂಬಾಲಿಸಿದರು"

View file

@ -52,6 +52,7 @@ searchUser: "사용자 검색"
reply: "답글"
loadMore: "더 보기"
showMore: "더 보기"
showLess: "닫기"
youGotNewFollower: "새로운 팔로워가 있습니다"
receiveFollowRequest: "새로운 팔로우 요청이 있습니다"
followRequestAccepted: "팔로우가 수락되었습니다"
@ -203,6 +204,7 @@ done: "완료"
processing: "처리중"
preview: "미리보기"
default: "기본값"
defaultValueIs: "기본값: {value}"
noCustomEmojis: "이모지가 없습니다"
noJobs: "작업이 없습니다"
federating: "연합 중"
@ -381,6 +383,7 @@ administrator: "관리자"
token: "토큰"
twoStepAuthentication: "2단계 인증"
moderator: "모더레이터"
moderation: "모더레이션"
nUsersMentioned: "{n}명이 언급함"
securityKey: "보안 키"
securityKeyName: "키 이름"
@ -559,6 +562,7 @@ author: "작성자"
leaveConfirm: "저장하지 않은 변경사항이 있습니다. 취소하시겠습니까?"
manage: "관리"
plugins: "플러그인"
preferencesBackups: "환경설정 백업"
deck: "덱"
undeck: "덱 해제"
useBlurEffectForModal: "모달에 흐림 효과 사용"
@ -609,7 +613,7 @@ create: "생성"
notificationSetting: "알림 설정"
notificationSettingDesc: "표시할 알림의 종류를 선택해 주세요."
useGlobalSetting: "글로벌 설정을 사용하기"
useGlobalSettingDesc: "활성화하면 계정의 알림 설정이 적용니다. 비활성화하면 개별적으로 설정할 수 있게 됩니다."
useGlobalSettingDesc: "활성화하면 계정의 알림 설정이 적용니다. 비활성화하면 개별적으로 설정할 수 있게 됩니다."
other: "기타"
regenerateLoginToken: "로그인 토큰을 재생성"
regenerateLoginTokenDescription: "로그인할 때 사용되는 내부 토큰을 재생성합니다. 일반적으로 이 작업을 실행할 필요는 없습니다. 이 기능을 사용하면 이 계정으로 로그인한 모든 기기에서 로그아웃됩니다."
@ -643,6 +647,8 @@ clip: "클립"
createNew: "새로 만들기"
optional: "옵션"
createNewClip: "새 클립 만들기"
unclip: "클립 해제"
confirmToUnclipAlreadyClippedNote: "이 노트는 이미 \"{name}\" 클립에 포함되어 있습니다. 클립을 해제하시겠습니까?"
public: "공개"
i18nInfo: "Misskey는 자원봉사자들에 의해 다양한 언어로 번역되고 있습니다. {link}에서 번역에 참가할 수 있습니다."
manageAccessTokens: "액세스 토큰 관리"
@ -845,6 +851,55 @@ failedToFetchAccountInformation: "계정 정보를 가져오지 못했습니다"
rateLimitExceeded: "요청 제한 횟수를 초과하였습니다"
cropImage: "이미지 자르기"
cropImageAsk: "이미지를 자르시겠습니까?"
file: "파일"
recentNHours: "최근 {n}시간"
recentNDays: "최근 {n}일"
noEmailServerWarning: "메일 서버가 설정되어 있지 않습니다."
thereIsUnresolvedAbuseReportWarning: "해결되지 않은 신고가 있습니다."
recommended: "추천"
check: "체크"
driveCapOverrideLabel: "이 유저의 드라이브 용량을 변경"
driveCapOverrideCaption: "0 이하를 지정하면 해제됩니다."
requireAdminForView: "열람하려면 관리자 계정으로 로그인해야 합니다."
isSystemAccount: "시스템에 의해 자동으로 생성되어 관리되는 계정입니다."
typeToConfirm: "계속하시려면 {x} 을 입력하세요"
deleteAccount: "계정 삭제"
document: "문서"
numberOfPageCache: "페이지 캐시 수"
numberOfPageCacheDescription: "숫자가 클 수록 편리성이 높아지지만, 시스템 자원과 메모리를 더 많이 사용합니다."
logoutConfirm: "로그아웃 하시겠습니까?"
lastActiveDate: "마지막 이용"
pleaseSelect: "선택해 주세요"
reverse: "플립"
colored: "색 입히기"
refreshInterval: "업데이트 주기"
label: "라벨"
type: "종류"
speed: "속도"
slow: "느리게"
fast: "빠르게"
sensitiveMediaDetection: "민감한 미디어 탐지"
localOnly: "로컬에만"
remoteOnly: "리모트만"
failedToUpload: "업로드 실패"
cannotUploadBecauseInappropriate: "이 파일은 부적절한 내용을 포함한다고 판단되어 업로드할 수 없습니다."
cannotUploadBecauseNoFreeSpace: "드라이브 용량이 부족하여 업로드할 수 없습니다."
beta: "베타"
enableAutoSensitive: "자동 NSFW 탐지"
enableAutoSensitiveDescription: "이용 가능할 경우 기계학습을 통해 자동으로 미디어 NSFW를 설정합니다. 이 기능을 해제하더라도, 인스턴스 정책에 따라 자동으로 설정될 수 있습니다."
activeEmailValidationDescription: "유저가 입력한 메일 주소가 일회용 메일인지, 실제로 통신할 수 있는 지 엄격하게 검사합니다. 해제할 경우 이메일 형식에 대해서만 검사합니다."
navbar: "네비게이션 바"
shuffle: "셔플"
account: "계정"
move: "이동"
_sensitiveMediaDetection:
description: "기계학습을 통해 자동으로 민감한 미디어를 탐지하여, 모더레이션에 참고할 수 있도록 합니다. 서버의 부하를 약간 증가시킵니다."
sensitivity: "탐지 민감도"
sensitivityDescription: "민감도가 낮을수록 안전한 미디어가 잘못 탐지될 확률이 줄어들며, 높을수록 민감한 미디어가 탐지되지 않을 확률이 줄어듭니다."
setSensitiveFlagAutomatically: "자동으로 NSFW로 설정하기"
setSensitiveFlagAutomaticallyDescription: "이 설정을 해제해도 탐지 결과는 유지됩니다."
analyzeVideos: "동영상도 같이 확인하기"
analyzeVideosDescription: "사진 뿐만 아니라 동영상의 NSFW 여부도 탐지합니다. 서버의 부하를 약간 증가시킵니다."
_emailUnavailable:
used: "이 메일 주소는 사용중입니다"
format: "형식이 올바르지 않습니다"
@ -887,6 +942,24 @@ _plugin:
install: "플러그인 설치"
installWarn: "신뢰할 수 없는 플러그인은 설치하지 않는 것이 좋습니다."
manage: "플러그인 관리"
_preferencesBackups:
list: "생성한 백업"
saveNew: "새 백업 만들기"
loadFile: "파일 가져오기"
apply: "이 기기에 적용"
save: "현재 설정으로 덮어쓰기"
inputName: "백업 이름을 입력하세요"
cannotSave: "저장하지 못했습니다"
nameAlreadyExists: "\"{name}\" 백업이 이미 존재합니다. 다른 이름을 설정하여 주십시오."
applyConfirm: "\"{name}\" 백업을 현재 기기에 적용하시겠습니까? 현재 설정은 덮어 씌워집니다."
saveConfirm: "{name} 을 덮어쓰시겠습니까?"
deleteConfirm: "{name} 을(를) 삭제하시겠습니까?"
renameConfirm: "\"{old}\" 백업을 \"{new}\"(으)로 바꾸시겠습니까?"
noBackups: "저장된 백업이 없습니다. \"새 백업 만들기\"를 눌러 현재 클라이언트 설정을 서버에 백업할 수 있습니다."
createdAt: "생성 날짜: {date} {time}"
updatedAt: "갱신 날짜: {date} {time}"
cannotLoad: "가져오기에 실패했습니다"
invalidFile: "파일 형식이 올바르지 않습니다."
_registry:
scope: "범위"
key: "키"
@ -970,6 +1043,8 @@ _mfm:
sparkleDescription: "반짝이는 파티클 효과를 추가합니다."
rotate: "회전"
rotateDescription: "지정한 각도로 회전시킵니다."
plain: "평문"
plainDescription: "안에 있는 MFM 구문을 모두 무시하고 평문으로 표시합니다."
_instanceTicker:
none: "보이지 않음"
remote: "리모트 유저에게만 보이기"
@ -1202,7 +1277,9 @@ _widgets:
activity: "활동"
photos: "사진"
digitalClock: "디지털 시계"
unixClock: "UNIX 시계"
federation: "연합"
instanceCloud: "인스턴스 구름"
postForm: "글 입력란"
slideshow: "슬라이드 쇼"
button: "버튼"
@ -1640,9 +1717,8 @@ _notification:
_deck:
alwaysShowMainColumn: "메인 칼럼 항상 표시"
columnAlign: "칼럼 정렬"
columnMargin: "칼럼 간 여백"
columnHeaderHeight: "칼럼 헤더 폭"
addColumn: "칼럼 추가"
configureColumn: "칼럼 설정"
swapLeft: "왼쪽으로 이동"
swapRight: "오른쪽으로 이동"
swapUp: "위로 이동"
@ -1650,6 +1726,11 @@ _deck:
stackLeft: "왼쪽에 쌓기"
popRight: "오른쪽으로 빼기"
profile: "프로파일"
newProfile: "새 프로파일"
deleteProfile: "프로파일 삭제"
introduction: "칼럼을 조합해서 나만의 인터페이스를 구성해 보아요!"
introduction2: "나중에라도 화면 우측의 + 버튼을 눌러 새 칼럼을 추가할 수 있습니다."
widgetsIntroduction: "칼럼 메뉴의 \"위젯 편집\"에서 위젯을 추가해 주세요"
_columns:
main: "메인"
widgets: "위젯"

View file

@ -305,6 +305,7 @@ hide: "Verbergen"
searchByGoogle: "Zoeken"
cropImage: "Afbeelding bijsnijden"
cropImageAsk: "Bijsnijdengevraagd"
file: "Bestanden"
_email:
_follow:
title: "volgde jou"

View file

@ -1,5 +1,5 @@
---
_lang_: "język polski"
_lang_: "Polski"
headlineMisskey: "Sieć połączona wpisami"
introMisskey: "Misskey jest serwisem mikroblogowym typu open source.\nMisskey to opensource'owy serwis mikroblogowy, w którym możesz tworzyć \"notatki\", aby dzielić się tym, co się dzieje i opowiadać wszystkim o sobie.\nMożesz również użyć funkcji \"Reakcje\", aby szybko dodać własne reakcje do notatek innych użytkowników👍.\nOdkrywaj nowy świat🚀!"
monthAndDay: "{month}-{day}"
@ -52,6 +52,7 @@ searchUser: "Wyszukiwanie użytkowników"
reply: "Odpowiedz"
loadMore: "Załaduj więcej"
showMore: "Załaduj więcej"
showLess: "Zamknij"
youGotNewFollower: "Zaobserwował(a) Cię"
receiveFollowRequest: "Otrzymano prośbę o możliwość obserwacji"
followRequestAccepted: "Zaakceptowano prośbę o możliwość obserwacji"
@ -87,7 +88,7 @@ enterListName: "Nazwa listy"
privacy: "Prywatność"
makeFollowManuallyApprove: "Prośby o możliwość obserwacji wymagają zatwierdzenia"
defaultNoteVisibility: "Domyślna widoczność"
follow: "Obserwowani"
follow: "Obserwuj"
followRequest: "Poproś o możliwość obserwacji"
followRequests: "Prośby o możliwość obserwacji"
unfollow: "Przestań obserwować"
@ -126,7 +127,7 @@ unsuspendConfirm: "Czy na pewno chcesz cofnąć zawieszenie tego konta?"
selectList: "Wybierz listę"
selectAntenna: "Wybierz Antennę"
selectWidget: "Wybierz widżet"
editWidgets: "Edytuj widżet"
editWidgets: "Edytuj widżety"
editWidgetsExit: "Gotowe"
customEmojis: "Niestandardowe emoji"
emoji: "Emoji"
@ -141,6 +142,7 @@ flagAsBot: "To konto jest botem"
flagAsBotDescription: "Jeżeli ten kanał jest kontrolowany przez jakiś program, ustaw tę opcję. Jeżeli włączona, będzie działać jako flaga informująca innych programistów, aby zapobiegać nieskończonej interakcji z różnymi botami i dostosowywać wewnętrzne systemy Misskey, traktując konto jako bota."
flagAsCat: "To konto jest kotem"
flagAsCatDescription: "Przełącz tę opcję, aby konto było oznaczone jako kot."
flagShowTimelineReplies: "Pokazuj odpowiedzi na osi czasu"
autoAcceptFollowed: "Automatycznie przyjmuj prośby o możliwość obserwacji od użytkowników, których obserwujesz"
addAccount: "Dodaj konto"
loginFailed: "Nie udało się zalogować"
@ -200,6 +202,7 @@ done: "Gotowe"
processing: "Przetwarzanie"
preview: "Podgląd"
default: "Domyślne"
defaultValueIs: "Domyślne: {value}"
noCustomEmojis: "Brak emoji"
noJobs: "Brak zadań"
federating: "Federowanie"
@ -234,6 +237,7 @@ resetAreYouSure: "Czy na pewno chcesz zresetować?"
saved: "Zapisano"
messaging: "Wiadomości"
upload: "Wyślij"
keepOriginalUploading: "Zachowaj oryginalny obraz"
fromDrive: "Z dysku"
fromUrl: "Z adresu URL"
uploadFromUrl: "Wyślij z adresu URL"
@ -376,6 +380,7 @@ administrator: "Admin"
token: "Token"
twoStepAuthentication: "Uwierzytelnianie dwuskładnikowe"
moderator: "Moderator"
moderation: "Moderacja"
nUsersMentioned: "{n} wspomnianych użytkowników"
securityKey: "Klucz bezpieczeństwa"
securityKeyName: "Nazwa klucza"
@ -443,11 +448,13 @@ uiLanguage: "Język wyświetlania UI"
groupInvited: "Zaproszony(-a) do grupy"
aboutX: "O {x}"
useOsNativeEmojis: "Używaj natywnych Emoji systemu"
disableDrawer: "Nie używaj menu w stylu szuflady"
youHaveNoGroups: "Nie masz żadnych grup"
joinOrCreateGroup: "Uzyskaj zaproszenie do dołączenia do grupy lub utwórz własną grupę."
noHistory: "Brak historii"
signinHistory: "Historia logowania"
disableAnimatedMfm: "Wyłącz MFM z animacją"
doing: "Przetwarzanie..."
category: "Kategoria"
tags: "Tagi"
docSource: "Źródło tego dokumentu"
@ -522,6 +529,9 @@ deleteAllFilesConfirm: "Czy na pewno chcesz usunąć wszystkie pliki?"
removeAllFollowingDescription: "Przestań obserwować wszystkie konta z {host}. Wykonaj to, jeżeli instancja już nie istnieje."
userSuspended: "To konto zostało zawieszone."
userSilenced: "Ten użytkownik został wyciszony."
yourAccountSuspendedTitle: "To konto jest zawieszone"
yourAccountSuspendedDescription: "To konto zostało zawieszone z powodu złamania regulaminu serwera lub innych podobnych. Skontaktuj się z administratorem, jeśli chciałbyś poznać bardziej szczegółowy powód. Proszę nie zakładać nowego konta."
menu: "Menu"
divider: "Rozdzielacz"
addItem: "Dodaj element"
relays: "Przekaźniki"
@ -540,7 +550,7 @@ disablePlayer: "Zamknij odtwarzacz wideo"
expandTweet: "Rozwiń tweet"
themeEditor: "Edytor motywu"
description: "Opis"
describeFile: "dodaj podpis"
describeFile: "Dodaj podpis"
enterFileDescription: "Wprowadź napis"
author: "Autor"
leaveConfirm: "Są niezapisane zmiany. Czy chcesz je odrzucić?"
@ -577,6 +587,7 @@ emptyToDisableSmtpAuth: "Pozostaw adres e-mail i hasło puste, aby wyłączyć w
smtpSecureInfo: "Wyłącz, jeżeli używasz STARTTLS"
testEmail: "Przetestuj dostarczanie wiadomości e-mail"
wordMute: "Wyciszenie słowa"
instanceMute: "Wyciszone instancje"
userSaysSomething: "{name} powiedział(-a) coś"
makeActive: "Aktywuj"
display: "Wyświetlanie"
@ -606,6 +617,7 @@ fillAbuseReportDescription: "Wypełnij szczegóły zgłoszenia. Jeżeli dotyczy
abuseReported: "Twoje zgłoszenie zostało wysłane. Dziękujemy."
reporteeOrigin: "Pochodzenie zgłoszonego"
reporterOrigin: "Pochodzenie zgłaszającego"
forwardReport: "Przekaż zgłoszenie do innej instancji"
send: "Wyślij"
abuseMarkAsResolved: "Oznacz zgłoszenie jako rozwiązane"
openInNewTab: "Otwórz w nowej karcie"
@ -618,8 +630,12 @@ random: "Losowe"
system: "System"
switchUi: "Przełącz interfejs użytkownika"
desktop: "Pulpit"
clip: "Klip"
createNew: "Utwórz nowy"
optional: "Nieobowiązkowe"
createNewClip: "Utwórz nowy klip"
unclip: "Odczep"
confirmToUnclipAlreadyClippedNote: "Ten wpis jest już częścią klipu \"{name}\". Czy chcesz ją usunąć z tego klipu?"
public: "Publiczny"
i18nInfo: "Misskey jest tłumaczone na wiele języków przez wolontariuszy. Możesz pomóc na {link}."
manageAccessTokens: "Zarządzaj tokenami dostępu"
@ -653,6 +669,7 @@ pageLikesCount: "Liczba otrzymanych polubień stron"
pageLikedCount: "Liczba polubionych stron"
contact: "Kontakt"
useSystemFont: "Używaj domyślnej czcionki systemu"
clips: "Klipy"
experimentalFeatures: "Eksperymentalne funkcje"
developer: "Programista"
makeExplorable: "Pokazuj konto na stronie „Eksploruj”"
@ -724,6 +741,7 @@ notRecommended: "Nie zalecane"
botProtection: "Zabezpieczenie przed botami"
instanceBlocking: "Zablokowane instancje"
selectAccount: "Wybierz konto"
switchAccount: "Przełącz konto"
enabled: "Właczono"
disabled: "Wyłączono"
quickAction: "Szybkie działania"
@ -755,17 +773,103 @@ global: "Globalna"
squareAvatars: "Wyświetlaj kwadratowe awatary"
sent: "Wyślij"
received: "Otrzymane"
searchResult: "Wyniki wyszukiwania"
hashtags: "Hashtag"
troubleshooting: "Rozwiązywanie problemów"
useBlurEffect: "Użyj efektów rozmycia w UI"
learnMore: "Dowiedz się więcej"
misskeyUpdated: "Misskey zostało zaktualizowane!"
whatIsNew: "Pokaż zmiany"
translate: "Przetłumacz"
translatedFrom: "Przetłumaczone z {x}"
accountDeletionInProgress: "Trwa usuwanie konta"
usernameInfo: "Nazwa, która identyfikuje Twoje konto spośród innych na tym serwerze. Możesz użyć alfabetu (a~z, A~Z), cyfr (0~9) lub podkreślników (_). Nazwy użytkownika nie mogą być później zmieniane."
aiChanMode: "Tryb Ai"
keepCw: "Zostaw ostrzeżenia o zawartości"
pubSub: "Konta Pub/Sub"
resolved: "Rozwiązane"
unresolved: "Nierozwiązane"
breakFollow: "Usuń obserwującego"
itsOn: "Włączone"
itsOff: "Wyłączone"
unread: "Nieodczytane"
filter: "Filtr"
controlPanel: "Panel sterowania"
manageAccounts: "Zarządzaj kontami"
makeReactionsPublic: "Ustawić historię reakcji jako publiczną"
makeReactionsPublicDescription: "To spowoduje, że lista wszystkich Twoich dotychczasowych reakcji będzie publicznie widoczna."
classic: "Klasyczny"
muteThread: "Wycisz wątek"
unmuteThread: "Wyłącz wyciszenie wątku"
ffVisibility: "Widoczność obserwowanych/obserwujących"
ffVisibilityDescription: "Pozwala skonfigurować, kto może zobaczyć, kogo obserwujesz i kto Cię obserwuje."
continueThread: "Pokaż kontynuację wątku"
deleteAccountConfirm: "Spowoduje to nieodwracalne usunięcie Twojego konta. Kontynuować?"
incorrectPassword: "Nieprawidłowe hasło."
voteConfirm: "Potwierdzić swój głos na \"{choice}\"?"
hide: "Ukryj"
leaveGroup: "Opuść grupę"
leaveGroupConfirm: "Czy na pewno chcesz opuścić \"{name}\"?"
useDrawerReactionPickerForMobile: "Wyświetlaj wybornik reakcji jako szufladę na urządzeniach mobilnych"
welcomeBackWithName: "Witaj z powrotem, {name}"
clickToFinishEmailVerification: "Kliknij [{ok}], aby zakończyć weryfikację e-mail."
overridedDeviceKind: "Typ urządzenia"
smartphone: "Smartfon"
tablet: "Tablet"
auto: "Automatycznie"
size: "Rozmiar"
numberOfColumn: "Liczba kolumn"
searchByGoogle: "Szukaj"
indefinitely: "Nigdy"
file: "Pliki"
logoutConfirm: "Czy na pewno chcesz się wylogować?"
lastActiveDate: "Ostatnio użyte w"
statusbar: "Pasek stanu"
pleaseSelect: "Wybierz opcję"
reverse: "Odwróć"
colored: "Kolorowe"
label: "Etykieta"
type: "Typ"
speed: "Prędkość"
localOnly: "Lokalne tylko"
failedToUpload: "Przesyłanie nie powiodło się"
cannotUploadBecauseInappropriate: "Nie można przesłać tego pliku, ponieważ jego części zostały wykryte jako potencjalnie nieodpowiednie."
cannotUploadBecauseNoFreeSpace: "Przesyłanie nie powiodło się z powodu braku miejsca na dysku."
beta: "Beta"
enableAutoSensitive: "Automatyczne oznaczanie NSFW"
enableAutoSensitiveDescription: "Umożliwia automatyczne wykrywanie i oznaczanie zawartości NSFW za pomocą uczenia maszynowego. Nawet jeśli ta opcja jest wyłączona, może być włączona w całej instancji."
navbar: "Pasek nawigacyjny"
account: "Konta"
move: "Przenieś"
_sensitiveMediaDetection:
description: "Zmniejsza wysiłek związany z moderacją serwera dzięki automatycznemu rozpoznawaniu zawartości NSFW za pomocą uczenia maszynowego. To nieznacznie zwiększy obciążenie serwera."
setSensitiveFlagAutomatically: "Oznacz jako NSFW"
_emailUnavailable:
used: "Ten adres e-mail jest już używany"
format: "Format tego adresu e-mail jest nieprawidłowy"
disposable: "Nie można używać jednorazowych adresów e-mail"
mx: "Ten serwer e-mail jest nieprawidłowy"
smtp: "Ten serwer e-mail nie odpowiada"
_ffVisibility:
public: "Publikuj"
public: "Publiczne"
followers: "Widoczne tylko dla obserwujących"
private: "Prywatne"
_signup:
almostThere: "Prawie na miejscu"
emailAddressInfo: "Podaj swój adres e-mail. Nie zostanie on upubliczniony."
emailSent: "E-mail z potwierdzeniem został wysłany na Twój adres e-mail ({email}). Kliknij dołączony link, aby dokończyć tworzenie konta."
_accountDelete:
accountDelete: "Usuń konto"
mayTakeTime: "Ponieważ usuwanie konta jest procesem wymagającym dużej ilości zasobów, jego ukończenie może zająć trochę czasu, w zależności od ilości utworzonej zawartości i liczby przesłanych plików."
sendEmail: "Po zakończeniu usuwania konta na adres e-mail zarejestrowany na tym koncie zostanie wysłana wiadomość e-mail."
requestAccountDelete: "Poproś o usunięcie konta"
started: "Usuwanie się rozpoczęło."
inProgress: "Usuwanie jest obecnie w toku"
_ad:
back: "Wróć"
reduceFrequencyOfThisAd: "Pokazuj tę reklamę rzadziej"
_forgotPassword:
enterEmail: "Wpisz adres e-mail użyty do rejestracji. Zostanie do niego wysłany link, za pomocą którego możesz zresetować hasło."
ifNoEmail: "Jeżeli nie podano adresu e-mail podczas rejestracji, skontaktuj się z administratorem zamiast tego."
contactAdmin: "Jeżeli Twoja instancja nie obsługuje adresów e-mail, skontaktuj się zamiast tego z administratorem, aby zresetować hasło."
_gallery:
@ -782,6 +886,23 @@ _plugin:
install: "Zainstaluj wtyczki"
installWarn: "Nie instaluj niezaufanych wtyczek."
manage: "Zarządzanie wtyczkami"
_preferencesBackups:
list: "Utworzone kopie zapasowe"
saveNew: "Zapisz nową kopię zapasową"
loadFile: "Załaduj z pliku"
apply: "Zastosuj do tego urządzenia"
save: "Zapisz zmiany"
inputName: "Proszę podać nazwę dla tej kopii zapasowej"
cannotSave: "Zapisanie nie powiodło się"
nameAlreadyExists: "Kopia zapasowa o nazwie \"{name}\" już istnieje. Proszę podać inną nazwę."
applyConfirm: "Czy na pewno chcesz zastosować kopię zapasową \"{name}\" na tym urządzeniu? Istniejące ustawienia tego urządzenia zostaną nadpisane."
saveConfirm: "Zapisać kopię zapasową jako {name}?"
deleteConfirm: "Usunąć kopię zapasową {name}?"
renameConfirm: "Zmienić nazwę kopii zapasowej z \"{old}\" na \"{new}\"?"
createdAt: "Utworzony w: {date} {time}"
updatedAt: "Zaktualizowano w: {date} {time}"
cannotLoad: "Ładowanie nie powiodło się"
invalidFile: "Nieprawidłowy format pliku"
_registry:
scope: "Zakres"
key: "Klucz"
@ -816,10 +937,13 @@ _mfm:
bold: "Pogrubienie"
boldDescription: "Wyróżnia litery pogrubiając je."
small: "Małe"
smallDescription: "Wyświetla treść jako małą i cienką."
center: "Wyśrodkowanie"
centerDescription: "Wyśrodkowuje zawartość."
inlineCode: "Kod (w wierszu)"
blockCode: "Kod (blok)"
blockCodeDescription: "Wyświetla kod z podświetlaną składnią składający się z wielu linii."
blockMath: "Matematyka (Blok)"
quote: "Cytuj"
quoteDescription: "Wyświetla treść jako cytat."
emoji: "Niestandardowe emoji"
@ -828,6 +952,20 @@ _mfm:
searchDescription: "Wyświetla pole wyszukiwania z wcześniej wpisanym tekstem."
flip: "Odwróć"
flipDescription: "Przerzuca treść poziomo lub pionowo."
jelly: "Animacja (Galaretka)"
jellyDescription: "Nadaje treści galaretowatą animację."
tada: "Animation (Tada)"
tadaDescription: "Nadaje treści animację podobną do \"Tada!\"."
jump: "Animacja (Skok)"
jumpDescription: "Nadaje treści animację skakania."
bounce: "Animacja (Odbijanie)"
bounceDescription: "Nadaje treści animację odbijania się."
shake: "Animacja (Wstrząsanie)"
shakeDescription: "Nadaje treści animację wstrząsania."
twitch: "Animacja (Drganie)"
twitchDescription: "Nadaje treści mocno drgającą animację."
spin: "Animacja (Obrót)"
spinDescription: "Nadaje treści animację obracania."
x2: "Duże"
x2Description: "Czyni treść większą."
x3: "Bardzo duże"
@ -835,9 +973,17 @@ _mfm:
x4: "Ogromne"
x4Description: "Czyni treść jeszcze większą niż jeszcze większa."
blur: "Rozmycie"
blurDescription: "Rozmywa treść. Zostanie wyraźnie wyświetlona po najechaniu."
font: "Czcionka"
fontDescription: "Wybiera czcionkę do wyświetlania treści."
rainbow: "Tęcza"
rainbowDescription: "Sprawia, że zawartość pojawia się w kolorach tęczy."
sparkle: "Blask"
sparkleDescription: "Nadaje zawartości efekt lśniącego brokatu."
rotate: "Obróć"
rotateDescription: "Obraca zawartość o określony kąt."
plain: "Zwyczajny"
plainDescription: "Wyłącza efekty wszystkich MFM zawartych w tym efekcie MFM."
_instanceTicker:
none: "Nigdy nie pokazuj"
remote: "Pokaż dla zdalnych użytkowników"
@ -857,6 +1003,7 @@ _channel:
usersCount: "{n} uczestnicy"
notesCount: "{n} wpisy"
_menuDisplay:
top: "Góra"
hide: "Ukryj"
_wordMute:
muteWords: "Słowo do wyciszenia"
@ -864,6 +1011,9 @@ _wordMute:
soft: "Łagodny"
hard: "Twardy"
mutedNotes: "Wyciszone wpisy"
_instanceMute:
title: "Ukrywa wpisy z wymienionych instancji."
heading: "Lista instancji do wyciszenia"
_theme:
explore: "Przeglądaj motywy"
install: "Zainstaluj motyw"
@ -944,6 +1094,7 @@ _sfx:
notification: "Powiadomienia"
chat: "Wiadomości"
chatBg: "Rozmowy (tło)"
antenna: "Anteny"
channel: "Powiadomienia kanału"
_ago:
future: "W przyszłości"
@ -963,12 +1114,30 @@ _time:
_tutorial:
title: "Jak korzystać z Misskey"
step1_1: "Witaj!"
step1_2: "Ta strona nazywa się „oś czasu”. Pokazuje chronologicznie uporządkowane wpisy osób, które „śledzisz”."
step1_3: "Twoja oś czasu jest jeszcze pusta, ponieważ nie opublikowałeś(-aś) jeszcze żadnych wpisów i nie obserwujesz jeszcze nikogo."
step2_1: "Ukończmy konfigurację profilu zanim utworzymy wpis lub zaczniemy kogoś obserwować."
step2_2: "Podanie pewnych informacji o tym, kim jesteś, ułatwi innym określenie, czy chcą widzieć Twoje wpisy lub Cię obserwować."
step3_1: "Zakończyłeś(-aś) konfigurację profilu?"
step3_2: "Następnie spróbujmy opublikować wpis. Możesz to zrobić, naciskając przycisk z ikoną ołówka na ekranie."
step3_3: "Wypełnij pole i kliknij przycisk w prawym górnym rogu by wysłać post."
step3_4: "Nie masz nic do powiedzenia? Spróbuj \"ustawiam swój misskey\"!"
step4_1: "Zakończyłeś publikowanie pierwszego wpisu?"
step4_2: "Hurra! Teraz Twój pierwszy wpis powinien być wyświetlany na Twojej osi czasu."
step5_1: "Teraz spróbujmy ożywić Twoją oś czasu, przez zaobserwowanie innych ludzi."
step5_2: "{featured} pokaże Ci popularne wpisy na tej instancji. {explore} pozwoli Ci znaleźć popularnych użytkowników. Spróbuj znaleźć tam osoby, które chcesz obserwować!"
step5_3: "Aby obserwować innych użytkowników, kliknij ich ikonę i naciśnij przycisk \"Obserwuj\" na ich profilu."
step5_4: "Jeśli inny użytkownik ma ikonę kłódki obok swojej nazwy, może minąć trochę czasu, zanim ten użytkownik ręcznie zatwierdzi Twoją prośbę o obserwowanie."
step6_1: "Powinieneś teraz widzieć wpisy innych użytkowników na swojej osi czasu."
step6_2: "Możesz także umieścić „reakcje” na wpisach innych osób, aby szybko na nie odpowiedzieć."
step6_3: "Aby dodać \"reakcję\", naciśnij znak \"+\" na wpisie innego użytkownika i wybierz emotikonę, którą chcesz zareagować."
step7_1: "Gratulacje! Ukończyłeś podstawowy samouczek Misskey."
step7_2: "Jeśli chcesz dowiedzieć się więcej o Misskey, wypróbuj sekcję {help}."
step7_3: "A teraz powodzenia i baw się dobrze z Misskey! 🚀"
_2fa:
alreadyRegistered: "Zarejestrowałeś już urządzenie do uwierzytelniania dwuskładnikowego."
registerDevice: "Zarejestruj nowe urządzenie"
registerKey: "Zarejestruj klucz bezpieczeństwa"
step1: "Najpierw, zainstaluj aplikację uwierzytelniającą (taką jak {a} lub {b}) na swoim urządzeniu."
step2: "Następnie, zeskanuje kod QR z ekranu."
step3: "Wprowadź token podany w aplikacji, aby ukończyć konfigurację."
@ -984,6 +1153,7 @@ _permissions:
"write:favorites": "Edycja Twojej listy ulubionych."
"read:following": "Wyświetlanie informacji o obserwowanych"
"write:following": "Obserwowanie lub cofanie obserwacji innych kont"
"read:messaging": "Zobacz swoje czaty"
"read:mutes": "Wyświetlanie listy osób, które wyciszyłeś(-aś)"
"write:mutes": "Edycja listy osób, które wyciszyłeś(-aś)"
"read:notifications": "Wyświetlanie powiadomień"
@ -997,6 +1167,10 @@ _permissions:
"write:page-likes": "Edycja polubień na stronach"
"read:user-groups": "Wyświetlanie grup użytkownika"
"write:user-groups": "Edycja lub usuwanie grup użytkownika"
"read:channels": "Zobacz swoje kanały"
"write:channels": "Edytuj swoje kanały"
"read:gallery": "Zobacz swoją galerię"
"write:gallery": "Edytuj swoją galerię"
_auth:
shareAccess: "Czy chcesz autoryzować „{name}” do dostępu do tego konta?"
permissionAsk: "Ta aplikacja wymaga następujących uprawnień:"
@ -1015,12 +1189,21 @@ _widgets:
calendar: "Kalendarz"
trends: "Na czasie"
clock: "Zegar"
rss: "Czytnik RSS"
activity: "Aktywność"
photos: "Zdjęcia"
digitalClock: "Zegar cyfrowy"
unixClock: "Zegar UNIX"
federation: "Federacja"
postForm: "Utwórz wpis"
instanceCloud: "Chmura instancji"
postForm: "Formularz tworzenia wpisu"
slideshow: "Pokaz slajdów"
button: "Przycisk"
onlineUsers: "Użytkownicy online"
jobQueue: "Kolejka zadań"
serverMetric: "Metryka serwera"
aiscript: "Konsola AiScript"
aichan: "Ai"
_cw:
hide: "Ukryj"
show: "Załaduj więcej"
@ -1387,9 +1570,11 @@ _notification:
youReceivedFollowRequest: "Otrzymałeś(-aś) prośbę o możliwość obserwacji"
yourFollowRequestAccepted: "Twoja prośba o możliwość obserwacji została przyjęta"
youWereInvitedToGroup: "Zaproszony(-a) do grupy"
pollEnded: "Wyniki ankiety stały się dostępne"
emptyPushNotificationMessage: "Powiadomienia push zostały zaktualizowane"
_types:
all: "Wszystkie"
follow: "Obserwowani"
follow: "Nowi obserwujący"
mention: "Wspomnij"
reply: "Odpowiedzi"
renote: "Udostępnij"
@ -1401,14 +1586,14 @@ _notification:
groupInvited: "Zaproszono do grup"
app: "Powiadomienia z aplikacji"
_actions:
followBack: "zaobserwował cię z powrotem"
reply: "Odpowiedz"
renote: "Udostępnij"
_deck:
alwaysShowMainColumn: "Zawsze pokazuj główną kolumnę"
columnAlign: "Wyrównaj kolumny"
columnMargin: "Odstęp między kolumnami"
columnHeaderHeight: "Wysokość nagłówka kolumny"
addColumn: "Dodaj kolumnę"
configureColumn: "Ustawienia kolumny"
swapLeft: "Przesuń w lewo"
swapRight: "Przesuń w prawo"
swapUp: "Zamień z powyższym"
@ -1416,6 +1601,9 @@ _deck:
stackLeft: "Przypnij do lewej"
popRight: "Odepnij w prawo"
profile: "Profil"
newProfile: "Nowy profil"
deleteProfile: "Usuń profil"
widgetsIntroduction: "Wybierz \"Edytuj widżety\" w menu kolumny i dodaj widżet."
_columns:
main: "Główna"
widgets: "Widżety"

View file

@ -1,9 +1,9 @@
---
_lang_: "Português"
headlineMisskey: "Rede conectada por notas"
headlineMisskey: "Uma rede ligada por notas"
introMisskey: "Bem-vindo! Misskey é um serviço de microblogue descentralizado de código aberto.\nCria \"notas\" e partilha o que te ocorre com todos à tua volta. 📡\nCom \"reações\" podes também expressar logo o que sentes às notas de todos. 👍\nExploremos um novo mundo! 🚀"
monthAndDay: "{day}/{month}"
search: "Pesquisar"
search: "Buscar"
notifications: "Notificações"
username: "Nome de usuário"
password: "Senha"
@ -52,6 +52,7 @@ searchUser: "Pesquisar utilizador"
reply: "Responder"
loadMore: "Carregar mais"
showMore: "Ver mais"
showLess: "Fechar"
youGotNewFollower: "Você tem um novo seguidor"
receiveFollowRequest: "Pedido de seguimento recebido"
followRequestAccepted: "Pedido de seguir aceito"
@ -94,6 +95,7 @@ unfollow: "Deixar de seguir"
followRequestPending: "Pedido de seguimento pendente"
enterEmoji: "Inserir emoji"
renote: "Repostar"
unrenote: "Desmarcar"
renoted: "Repostado"
cantRenote: "Não pode repostar"
cantReRenote: "Não pode repostar este repost"
@ -106,6 +108,7 @@ sensitive: "Conteúdo sensível"
add: "Adicionar"
reaction: "Reações"
reactionSetting: "Quais reações a mostrar no selecionador de reações"
reactionSettingDescription2: "Arraste para reordenar, clique para excluir, pressione + para adicionar."
rememberNoteVisibility: "Lembrar das configurações de visibilidade de notas"
attachCancel: "Remover anexo"
markAsSensitive: "Marcar como sensível"
@ -133,35 +136,339 @@ emojiName: "Nome do Emoji"
emojiUrl: "URL do Emoji"
addEmoji: "Adicionar um Emoji"
settingGuide: "Guia de configuração"
cacheRemoteFiles: "Memória transitória de arquivos remotos"
cacheRemoteFilesDescription: "Se você desabilitar essa configuração, os arquivos remotos não serão armazenados em memória transitória e serão vinculados diretamente. Economiza o armazenamento do servidor, mas não gera miniaturas, o que aumenta o tráfego."
flagAsBot: "Marcar conta como robô"
flagAsBotDescription: "Se esta conta for operada por um programa, ative este sinalizador. Quando ativado, serve como um sinalizador para evitar o encadeamento de reações para outros programadores, e o manuseio do sistema do Misskey é adequado para bots."
flagAsCat: "Marcar conta como gato"
flagAsCatDescription: "Ative essa opção para marcar essa conta como gato."
flagShowTimelineReplies: "Mostrar respostas na linha de tempo"
flagShowTimelineRepliesDescription: "Quando ativado, a linha do tempo mostra as respostas às outras notas do utilizador, além da nota do utilizador."
autoAcceptFollowed: "Aprove automaticamente os seguidores dos seguintes utilizadores"
addAccount: "Adicionar Conta"
loginFailed: "Não consegui logar"
showOnRemote: "Exibir remotamente"
general: "Geral"
wallpaper: "Papel de parede"
setWallpaper: "Definir papel de parede"
removeWallpaper: "Remover papel de parede"
searchWith: "Buscar: {q}"
youHaveNoLists: "Não tem nenhuma lista"
followConfirm: "Tem certeza que quer deixar de seguir {name}?"
proxyAccount: "Conta proxy"
proxyAccountDescription: "Uma conta proxy é uma conta que atua como seguidora remota para utilizadores sob determinadas condições. Por exemplo, quando um utilizador lista um utilizador remoto, a atividade não será entregue à instância, a menos que alguém esteja seguindo o utilizador listado, portanto, a conta proxy deve seguir."
host: "hospedeiro"
selectUser: "Selecionar utilizador"
recipient: "Morada"
annotation: "Anotação"
federation: "União"
instances: "Instância"
registeredAt: "Registrado em"
latestRequestSentAt: "Enviar a solicitação mais recente"
latestRequestReceivedAt: "Recebeu a última solicitação"
latestStatus: "Status mais recente"
storageUsage: "Uso de armazenamento"
charts: "gráfico"
perHour: "por hora"
perDay: "por dia"
stopActivityDelivery: "Parar a entrega de atividades"
blockThisInstance: "Bloquear esta instância"
operations: "operar"
software: "Programas"
version: "versão"
metadata: "Metadados"
withNFiles: "{n} Um arquivo"
monitor: "monitor"
jobQueue: "Fila de trabalhos"
cpuAndMemory: "CPU e memória"
network: "rede"
disk: "disco"
instanceInfo: "Informações da instância"
statistics: "Estatisticas"
clearQueue: "Limpar a fila"
clearQueueConfirmTitle: "Quer limpar a fila?"
clearQueueConfirmText: "Postagens não entregues não serão mais entregues. Normalmente você não precisa fazer isso."
clearCachedFiles: "Limpar memória transitória"
clearCachedFilesConfirm: "Tem certeza de que deseja excluir todos os arquivos remotos armazenados em memória transitória?"
blockedInstances: "Instância bloqueada"
blockedInstancesDescription: "Defina os anfitriões das instâncias que deseja bloquear, separados por quebras de linha. Uma instância bloqueada não poderá interagir com esta instância."
muteAndBlock: "Silenciar e bloquear"
mutedUsers: "Silenciar utilizador"
blockedUsers: "Utilizadores bloqueados"
noUsers: "Sem usuários"
editProfile: "Editar Perfil"
noteDeleteConfirm: "Deseja excluir esta nota?"
pinLimitExceeded: "Não consigo mais fixar"
intro: "A instalação do Misskey está completa! Crie uma conta de administrador."
done: "Concluído"
processing: "Em Progresso"
preview: "Pré-visualizar"
default: "Padrão"
noCustomEmojis: "Não há emojis"
noJobs: "Sem trabalho"
federating: "federar"
blocked: "Bloqueado"
suspended: "Cancelar subscrição"
all: "Todos"
subscribing: "Subscrito"
publishing: "Executando"
notResponding: "Sem resposta"
instanceFollowing: "Seguir a instância"
instanceFollowers: "Seguidores da instância"
instanceUsers: "Utilizador da instância"
changePassword: "Mudar senha"
security: "Segurança"
retypedNotMatch: "As entradas não coincidem."
currentPassword: "Palavra-passe atual"
newPassword: "Nova palavra-passe"
newPasswordRetype: "Nova senha (redigite)"
attachFile: "Anexar arquivo"
more: "Mais!"
featured: "Destaques"
usernameOrUserId: "Nome de utilizador ou ID de utilizador"
noSuchUser: "Utilizador não encontrado"
lookup: "Buscando"
announcements: "Notícia"
imageUrl: "URL da imagem"
remove: "Eliminar"
removed: "Foi deletado"
removeAreYouSure: "Deseja excluir \"{x}\"?"
deleteAreYouSure: "Deseja excluir \"{x}\"?"
resetAreYouSure: "Redefinir agora?"
saved: "Salvo"
messaging: "Chat"
upload: "Enviando"
keepOriginalUploading: "Manter a imagem original"
keepOriginalUploadingDescription: "Mantenha a versão original ao carregar a imagem. Quando desligado, a imagem para publicação na web será gerada no navegador no momento do upload."
fromDrive: "\nDa unidade"
fromUrl: "Da URL"
uploadFromUrl: "Carregamento de URL"
uploadFromUrlDescription: "URL do arquivo que você deseja enviar"
uploadFromUrlRequested: "Upload solicitado"
uploadFromUrlMayTakeTime: "Pode levar algum tempo para que o upload seja concluído."
explore: "Explorar"
messageRead: "Lida"
noMoreHistory: "Sem mais história"
startMessaging: "Iniciar conversação"
nUsersRead: "{n} Pessoas leem"
agreeTo: "Eu concordo com {0}"
tos: "Termos de serviço"
start: "começar"
home: "casa"
remoteUserCaution: "As informações estão incompletas porque é um utilizador remoto."
activity: "atividade"
images: "imagem"
birthday: "aniversário"
yearsOld: "{age} anos"
registeredDate: "Data de registro"
location: "Lugar, colocar"
theme: "tema"
themeForLightMode: "Temas usados no modo de luz"
themeForDarkMode: "Temas usados no modo escuro"
light: "Claro"
dark: "Escuro"
lightThemes: "Tema claro"
darkThemes: "Tema escuro"
syncDeviceDarkMode: "Sincronize com o modo escuro do dispositivo"
drive: "Unidades"
fileName: "Nome do Ficheiro"
selectFile: "Selecione os arquivos"
selectFiles: "Selecione os arquivos"
selectFolder: "Selecionar uma pasta"
selectFolders: "Selecionar uma pasta"
renameFile: "Renomear ficheiro"
folderName: "Nome da pasta"
createFolder: "Criar pasta"
renameFolder: "Renomear Pasta"
deleteFolder: "Eliminar Pasta"
addFile: "Adicionar arquivo"
emptyDrive: "A unidade está vazia"
emptyFolder: "A pasta está vazia"
unableToDelete: "Não é possível eliminar"
inputNewFileName: "Por favor, digite um novo nome para a pasta!"
inputNewDescription: "Insira uma nova legenda"
inputNewFolderName: "Por favor, digite um novo nome para a pasta!"
circularReferenceFolder: "A pasta de destino é uma subpasta da pasta que você deseja mover."
hasChildFilesOrFolders: "Esta pasta não está vazia e não pode ser excluída."
copyUrl: "Copiar URL"
rename: "Renomear"
avatar: "Avatar"
banner: "Capa"
nsfw: "Conteúdo sensível"
whenServerDisconnected: "Quando a conexão com o servidor é perdida"
disconnectedFromServer: "Desconectado do servidor"
reload: "Recarregar"
doNothing: "Nenhuma ação adicional"
reloadConfirm: "Quer recarregar?"
watch: "ver"
unwatch: "Não observar"
accept: "Aceitar"
reject: "Rejeitar"
normal: "Normal"
instanceName: "Nome da instância"
instanceDescription: "Descrição da instância"
maintainerName: "Nome do administrador"
maintainerEmail: "E-mail do Administrador:"
tosUrl: "URL dos Termos de Uso"
thisYear: "Este ano"
thisMonth: "Este mês"
today: "Hoje"
dayX: " Dia {day}"
monthX: "mês de {month}"
yearX: "Ano {year}"
pages: "Páginas"
integration: "Integração"
connectService: "Conectar"
disconnectService: "Desconectar"
enableLocalTimeline: "Ativar linha do tempo local"
enableGlobalTimeline: "Ativar linha do tempo global"
disablingTimelinesInfo: "Se você desabilitar essas linhas do tempo, administradores e moderadores ainda poderão usá-las por conveniência."
registration: "Registar"
enableRegistration: "Permitir que qualquer pessoa se registre"
invite: "Convidar"
driveCapacityPerLocalAccount: "Capacidade da unidade por utilizador local"
driveCapacityPerRemoteAccount: "Capacidade da unidade por utilizador remoto"
inMb: "Em megabytes"
iconUrl: "URL da imagem do ícone (favicon, etc.)"
bannerUrl: "URL da imagem do banner"
backgroundImageUrl: "URL da imagem de fundo"
basicInfo: "Informações básicas"
pinnedUsers: "Utilizador fixado"
pinnedUsersDescription: "Descreva os utilizadores que você deseja fixar na página \"Localizar\", etc., separados por quebras de linha."
pinnedPages: "Página fixada"
pinnedPagesDescription: "Descreva o caminho da página que você deseja fixar na página superior da instância, separada por quebras de linha."
pinnedClipId: "ID do clipe a ser fixado"
pinnedNotes: "Post fixado"
hcaptcha: "hCaptcha"
enableHcaptcha: "Ativar hCaptcha"
hcaptchaSiteKey: "Chave do sítio web"
hcaptchaSecretKey: "Chave secreta"
recaptcha: "reCAPTCHA"
enableRecaptcha: "Habilitar reCAPTCHA"
recaptchaSiteKey: "Chave do sítio web"
recaptchaSecretKey: "Chave secreta"
avoidMultiCaptchaConfirm: "O uso de vários captchas pode causar interferência. Deseja desativar outros captchas? Você também pode cancelar e deixar vários captchas ativados."
antennas: "Antenas"
manageAntennas: "Gestão de antena"
name: "Nome"
antennaSource: "Origem de entrada"
antennaKeywords: "Palavras-chave recebidas"
antennaExcludeKeywords: "Palavras-chave negativas"
antennaKeywordsDescription: "Se você separá-lo com um espaço, será uma especificação AND, e se você separá-lo com uma quebra de linha, será uma especificação OR."
notifyAntenna: "Notificar novas notas"
withFileAntenna: "Apenas notas com arquivos anexados"
enableServiceworker: "Ative as notificações push para o seu navegador"
antennaUsersDescription: "Especificar nomes de utilizador separados por quebras de linha"
caseSensitive: "Maiúsculas e minúsculas"
withReplies: "Incluindo resposta"
connectedTo: "Você está conectado à seguinte conta"
notesAndReplies: "Publicações e respostas"
withFiles: "Com arquivo"
silence: "Silenciado"
silenceConfirm: "Quer silenciar?"
unsilence: "Liberar silenciar"
unsilenceConfirm: "Quer liberar o silêncio?"
popularUsers: "Utilizadores populares"
recentlyUpdatedUsers: "Utilizadores postados recentemente"
recentlyRegisteredUsers: "Utilizadores registrados recentemente"
recentlyDiscoveredUsers: "Utilizadores descobertos recentemente"
exploreUsersCount: "Há um utilizador de {count}"
exploreFediverse: "Explorar Fediverse"
popularTags: "Tags populares"
userList: "Listas"
about: "Informações"
aboutMisskey: "Sobre Misskey"
administrator: "Administrador"
token: "Símbolo"
twoStepAuthentication: "Verificação em duas etapas"
moderator: "Moderador"
nUsersMentioned: "Postado por {n} pessoas"
securityKey: "Chave de segurança"
securityKeyName: "Nome chave"
registerSecurityKey: "Registre a chave de segurança"
lastUsed: "Último uso"
unregister: "Cancelar registro"
passwordLessLogin: "Entrar sem senha"
resetPassword: "Redefinir senha"
newPasswordIs: "A nova senha é \"{password}\""
reduceUiAnimation: "Reduzir a animação da interface do utilizador"
share: "Compartilhar"
notFound: "Não encontrado"
notFoundDescription: "Não havia página correspondente ao URL especificado."
uploadFolder: "Destino de upload padrão"
cacheClear: "Excluir memória transitória"
markAsReadAllNotifications: "Marcar todas as notificações como lidas"
markAsReadAllUnreadNotes: "Marcar todas as postagens como lidas"
markAsReadAllTalkMessages: "Marcar todas as conversas como lidas"
help: "Ajuda"
inputMessageHere: "Escrever mensagem aqui"
close: "Fechar"
group: "Grupos"
groups: "Grupos"
createGroup: "Criar grupo"
ownedGroups: "Grupo próprio"
invites: "Convidar"
invitations: "Convidar"
tags: "Etiquetas"
docSource: "Fonte deste documento"
createAccount: "Criar conta"
existingAccount: "Contas existentes"
regenerate: "Gerar novamente"
fontSize: "Tamanho do texto"
noFollowRequests: "Não há aplicação de acompanhamento"
openImageInNewTab: "Abrir a imagem numa nova aba"
dashboard: "Painel de controle"
local: "Local"
remote: "Remoto"
total: "Total"
weekOverWeekChanges: "Em comparação com a semana anterior"
dayOverDayChanges: "Dia anterior"
appearance: "Aparência"
clientSettings: "Configurações do cliente"
accountSettings: "Configurações da conta"
promotion: "Promoção"
promote: "Promover"
numberOfDays: "Dias"
hideThisNote: "Ocultar esta nota"
showFeaturedNotesInTimeline: "Mostrar notas recomendadas na linha do tempo"
objectStorage: "Armazenamento de objetos"
useObjectStorage: "Usar armazenamento de objetos"
objectStorageBaseUrl: "URL base"
objectStorageBaseUrlDesc: "O URL usado para referência. Se você estiver usando um CDN ou Proxy, seu URL, S3:'https: // <bucket> .s3.amazonaws.com', GCS, etc .:'https://storage.googleapis.com/ <bucket>' ."
objectStorageBucket: "Bucket"
objectStorageBucketDesc: "Especifique o nome do bucket do serviço a ser usado."
objectStoragePrefix: "Prefixo"
objectStoragePrefixDesc: "Ele é armazenado neste diretório de prefixo."
objectStorageEndpoint: "Ponto final"
objectStorageEndpointDesc: "Especifique vazio para S3, caso contrário, especifique o ponto final para cada serviço. Especifique como'<host>'ou'<host>: <port>'."
objectStorageRegion: "Região"
objectStorageRegionDesc: "Especifique uma região como 'xx-east-1'. Caso seu serviço não tenha o conceito de região, ele deve estar vazio ou 'us-east-1'."
objectStorageUseSSL: "Usar SSL"
objectStorageUseSSLDesc: "Desative-o se não quiser usar https para conexões de API"
objectStorageUseProxy: "Usar proxy"
objectStorageUseProxyDesc: "Se você não usa proxy para conexão de API, desative-o."
objectStorageSetPublicRead: "Definir 'public-read' ao fazer o upload"
serverLogs: "Registro do servidor"
deleteAll: "Apagar Tudo"
showFixedPostForm: "Exibir o formulário de postagem na parte superior da linha do tempo"
newNoteRecived: "Nova nota recebida"
sounds: "Sons"
listen: "Ouvir"
none: "Nenhum"
showInPage: "Ver na página"
popout: "Sair"
volume: "Volume"
masterVolume: "volume principal"
details: "Detalhes"
output: "Resultado"
smtpHost: "hospedeiro"
smtpUser: "Nome de usuário"
smtpPass: "Senha"
clearCache: "Limpar memória transitória"
info: "Informações"
user: "Usuários"
searchByGoogle: "Pesquisar"
searchByGoogle: "Buscar"
file: "Ficheiros"
_email:
_follow:
title: "Você tem um novo seguidor"
@ -169,7 +476,7 @@ _mfm:
mention: "Menção"
quote: "Citar"
emoji: "Emoji personalizado"
search: "Pesquisar"
search: "Buscar"
_theme:
keys:
mention: "Menção"
@ -177,22 +484,33 @@ _theme:
_sfx:
note: "Posts"
notification: "Notificações"
chat: "Chat"
_widgets:
notifications: "Notificações"
timeline: "Timeline"
activity: "atividade"
federation: "União"
jobQueue: "Fila de trabalhos"
_cw:
show: "Carregar mais"
_visibility:
home: "casa"
followers: "Seguidores"
_profile:
name: "Nome"
username: "Nome de usuário"
_exportOrImport:
followingList: "Seguindo"
muteList: "Silenciar"
blockingList: "Bloquear"
userLists: "Listas"
_charts:
federation: "União"
_timelines:
home: "casa"
_pages:
blocks:
image: "imagem"
_button:
_action:
_pushEvent:
@ -397,8 +715,6 @@ _notification:
_deck:
alwaysShowMainColumn: "Sempre mostrar a coluna principal"
columnAlign: "Alinhar colunas"
columnMargin: "Margem entre colunas"
columnHeaderHeight: "Altura do cabeçalho de coluna"
addColumn: "Adicionar coluna"
swapLeft: "Trocar de posição com a coluna à esquerda"
swapRight: "Trocar de posição com a coluna à direita"

View file

@ -52,6 +52,7 @@ searchUser: "Caută un utilizator"
reply: "Răspunde"
loadMore: "Incarcă mai mult"
showMore: "Arată mai mult"
showLess: "Închide"
youGotNewFollower: "te-a urmărit"
receiveFollowRequest: "Cerere de urmărire primită"
followRequestAccepted: "Cerere de urmărire acceptată"
@ -644,6 +645,7 @@ administration: "Gestionare"
middle: "Mediu"
sent: "Trimite"
searchByGoogle: "Caută"
file: "Fișiere"
_email:
_follow:
title: "te-a urmărit"

View file

@ -52,6 +52,7 @@ searchUser: "Поиск людей"
reply: "Ответить"
loadMore: "Показать еще"
showMore: "Показать еще"
showLess: "Закрыть"
youGotNewFollower: "Новый подписчик"
receiveFollowRequest: "Получен запрос на подписку"
followRequestAccepted: "Запрос на подписку принят"
@ -203,6 +204,7 @@ done: "Готово"
processing: "Обработка"
preview: "Предпросмотр"
default: "По умолчанию"
defaultValueIs: "По умолчанию: {value}"
noCustomEmojis: "Собственные эмодзи отсутствуют"
noJobs: "Нет заданий"
federating: "Федерируется"
@ -381,6 +383,7 @@ administrator: "Администратор"
token: "Токен"
twoStepAuthentication: "Двухфакторная аутентификация"
moderator: "Модератор"
moderation: "Модерация"
nUsersMentioned: "Упомянуло пользователей: {n}"
securityKey: "Ключ безопасности"
securityKeyName: "Имя ключа"
@ -559,6 +562,7 @@ author: "Автор"
leaveConfirm: "Вы не сохранили изменения. Хотите выйти и потерять их?"
manage: "Управление"
plugins: "Расширения"
preferencesBackups: "Резервная копия"
deck: "Пульт"
undeck: "Покинуть пульт"
useBlurEffectForModal: "Размывка под формой поверх всего"
@ -636,7 +640,7 @@ waitingFor: "Ждём, когда {x} ответит"
random: "Случайные"
system: "Система"
switchUi: "Выбор вида"
desktop: "Стол"
desktop: "Компьютер"
clip: "Подборка"
createNew: "Новый документ"
optional: "Необязательно"
@ -832,6 +836,21 @@ searchByGoogle: "Поиск"
instanceDefaultLightTheme: "Светлая тема по умолчанию"
instanceDefaultDarkTheme: "Темная тема по умолчанию"
indefinitely: "вечно"
file: "Файлы"
recommended: "Рекомендуем"
check: "Проверить"
driveCapOverrideLabel: "Изменение лимита дискового пространства для этого пользователя"
reverse: "Переворот"
colored: "Выделена цветом"
label: "Метка"
localOnly: "Локально"
beta: "Бета"
enableAutoSensitive: "Автоматическое определение NSFW"
enableAutoSensitiveDescription: "Если доступно, используйте машинное обучение для автоматической установки флага NSFW на носителе. Даже если эта функция отключена, она может быть установлена ​​автоматически в зависимости от инстанта."
account: "Учётные записи"
_sensitiveMediaDetection:
description: "Машинное обучение может быть использовано для автоматического обнаружения чувствительных медиа для модерации. Нагрузка на сервер увеличивается незначительно."
setSensitiveFlagAutomatically: "Установить флаг NSFW"
_emailUnavailable:
used: "Уже используется"
format: "Неверный формат"
@ -1619,9 +1638,8 @@ _notification:
_deck:
alwaysShowMainColumn: "Всегда показывать главную колонку"
columnAlign: "Выравнивание колонок"
columnMargin: "Расстояние между колонками"
columnHeaderHeight: "Высота заголовка колонки"
addColumn: "Добавить колонку"
configureColumn: "Настройки колонок"
swapLeft: "Переставить левее"
swapRight: "Переставить правее"
swapUp: "Переставить выше"

View file

@ -52,6 +52,7 @@ searchUser: "Hľadať používateľov"
reply: "Odpovedať"
loadMore: "Zobraziť viac"
showMore: "Zobraziť viac"
showLess: "Zavrieť"
youGotNewFollower: "Máte nového sledujúceho"
receiveFollowRequest: "Žiadosť o sledovanie prijatá"
followRequestAccepted: "Žiadosť o sledovanie akceptovaná"
@ -203,6 +204,7 @@ done: "Hotovo"
processing: "Pracujem..."
preview: "Náhľad"
default: "Predvolené"
defaultValueIs: "Predvolené: {value}"
noCustomEmojis: "Žiadne emoji"
noJobs: "Žiadne úlohy"
federating: "Federácia"
@ -381,6 +383,7 @@ administrator: "Administrátor"
token: "Token"
twoStepAuthentication: "Dvojfaktorová autentifikácia"
moderator: "Moderátor"
moderation: "Moderovanie"
nUsersMentioned: "{n} používateľov spomenulo"
securityKey: "Bezpečnostný kľúč"
securityKeyName: "Názov kľúča"
@ -559,6 +562,7 @@ author: "Autor"
leaveConfirm: "Máte neuložené zmeny. Chcete ich zahodiť?"
manage: "Administrácia"
plugins: "Pluginy"
preferencesBackups: "Zálohy nastavení"
deck: "Deck"
useBlurEffectForModal: "Použiť efekt rozmazania na okná"
useFullReactionPicker: "Použiť plnú veľkosť výberu reakcií"
@ -642,6 +646,8 @@ clip: "Klip"
createNew: "Vytvoriť nový"
optional: "Voliteľné"
createNewClip: "Vytvoriť nový klip"
unclip: "Odopnúť"
confirmToUnclipAlreadyClippedNote: "Táto poznámka je už pripnutá ako \"{name}\". Naozaj ju chcete odopnúť?"
public: "Verejné"
i18nInfo: "Misskey je prekladaný do rôznych jazykov dobrovoľníkmi. Pomôcť môžete na {link}."
manageAccessTokens: "Spravovať prístupové tokeny"
@ -842,6 +848,54 @@ oneWeek: "1 týždeň"
reflectMayTakeTime: "Zmeny môžu chvíľu trvať kým sa prejavia."
failedToFetchAccountInformation: "Nepodarilo sa načítať informácie o účte."
rateLimitExceeded: "Prekročený limit rýchlosti"
cropImage: "Orezanie obrázku"
cropImageAsk: "Chcete orezať obrázok?"
file: "Súbor/y"
recentNHours: "Posledných {n} hodín"
recentNDays: "Posledných {n} dní"
noEmailServerWarning: "Nie je nastavený emailový server."
thereIsUnresolvedAbuseReportWarning: "Existuje nevyriešené nahlásenie zneužitia."
recommended: "Odporúčané"
driveCapOverrideLabel: "Zmena limitu úložiska pre tohoto používateľa"
driveCapOverrideCaption: "Ak je zadaná hodnota menšia alebo rovná 0, zruší sa."
isSystemAccount: "Tieto účty automaticky vytvoril a spravuje systém."
typeToConfirm: "Ak chcete vykonať túto operáciu, napíšte {x}"
deleteAccount: "Vymazať účet"
document: "Dokument"
numberOfPageCache: "Počet cachí pre stránky"
numberOfPageCacheDescription: "Zvýši rýchlosť ale tiež nároky na pamäť."
logoutConfirm: "Naozaj sa chcete odhlásiť?"
statusbar: "Stavový riadok"
pleaseSelect: "Prosím vyberte"
reverse: "Preklopiť"
colored: "Farebné"
refreshInterval: "Interval obnovenia"
label: "Popisok"
type: "Typ"
speed: "Rýchlosť"
slow: "Pomaly"
fast: "Rýchlo"
sensitiveMediaDetection: "Detekcia citlivých médií."
localOnly: "Iba lokálne"
remoteOnly: "Len vzdialené"
failedToUpload: "Nahrávanie zlyhalo"
cannotUploadBecauseInappropriate: "Nemožno nahrať, pretože pravdepodobne obsahuje nevhodný obsah."
cannotUploadBecauseNoFreeSpace: "Nemožno nahrať kvôli nedostatku voľného úložiska."
beta: "Beta"
enableAutoSensitive: "Automatická detekcia NSFW"
enableAutoSensitiveDescription: "Ak je zapnuté, príznak NSFW sa na médiách automaticky nastaví pomocou strojového učenia. Aj keď je táto funkcia vypnutá, v niektorých prípadoch sa môže nastaviť automaticky."
activeEmailValidationDescription: "Dôkladnejšie overí e-mailovú adresu používateľa tým, že zistí, či ide o vyradenú e-mailovú adresu a či sa s ňou dá skutočne komunikovať. Ak nie je začiarknuté, e-mailová adresa sa kontroluje len ako text."
navbar: "Navigačný panel"
account: "Účty"
move: "Pohyb"
_sensitiveMediaDetection:
description: "Strojové učenie sa použije na automatickú detekciu citlivých médií na účely ich moderovania. Mierne sa zvýši zaťaženie servera."
sensitivity: "Citlivosť detekcie"
sensitivityDescription: "Nižšia citlivosť znižuje počet falošne pozitívnych výsledkov (false positives). Vyššia citlivosť znižuje počet falošne negatívnych výsledkov (false negatives)."
setSensitiveFlagAutomatically: "Nastaviť príznak NSFW"
setSensitiveFlagAutomaticallyDescription: "Aj keď je toto nastavenie vypnuté, výsledok rozhodnutia je interne uložený."
analyzeVideos: "Zapnúť analýzu videa"
analyzeVideosDescription: "Okrem obrázkov zapne detekciu aj pre videá. Zaťaženie servera sa mierne zvýši."
_emailUnavailable:
used: "Táto emailová adresa sa už používa"
format: "Formát emailovej adresy je nesprávny"
@ -884,6 +938,24 @@ _plugin:
install: "Inštalova pluginy"
installWarn: "Prosím neinštalujte nedôveryhodné pluginy."
manage: "Spravovanie pluginov"
_preferencesBackups:
list: "Vytvorené zálohy"
saveNew: "Uložiť novú"
loadFile: "Nahrať súbor"
apply: "Použiť na toto zariadenie"
save: "Uložiť"
inputName: "Názov zálohy"
cannotSave: "Nedá sa uložiť"
nameAlreadyExists: "Záloha s názvom \"{name}\" už existuje. Zadajte iný názov."
applyConfirm: "Chcete použiť zálohu '{name}' na aktuálne zariadenie? Aktuálne nastavenia zariadenia sa stratia."
saveConfirm: "Chcete prepísať {name}?"
deleteConfirm: "Naozaj chcete odstrániť \"{name}\"?"
renameConfirm: "Chcete zmeniť \"{old}\" na \"{new}\"?"
noBackups: "Nie je k dispozícii žiadna záloha. \"Uložiť novú\" umožňuje uložiť aktuálnu konfiguráciu zariadenia na server."
createdAt: "Dátum vytvorenia: {date} {time}"
updatedAt: "Dátum úpravy: {date} {time}"
cannotLoad: "Nedá sa nahrať"
invalidFile: "Neplatný formát súboru"
_registry:
scope: "Oblasť"
key: "Kľúč"
@ -967,6 +1039,8 @@ _mfm:
sparkleDescription: "Obsahu dodá trblietajúci efekt."
rotate: "Otáčať"
rotateDescription: "Otočí obsah o určitý uhol."
plain: "Obyčajné"
plainDescription: "Bez akejkoľvej syntaxe"
_instanceTicker:
none: "Nikdy nezobrazovať"
remote: "Zobraziť pre vzdialených používateľov"
@ -1196,10 +1270,13 @@ _widgets:
trends: "Trendy"
clock: "Hodiny"
rss: "RSS čítačka"
rssTicker: "RSS Ticker"
activity: "Aktivita"
photos: "Fotky"
digitalClock: "Digitálne hodiny"
unixClock: "UNIX čas"
federation: "Federácia"
instanceCloud: "Cloud serverov"
postForm: "Napísať poznámku"
slideshow: "Prezentácia"
button: "Tlačidlo"
@ -1615,6 +1692,7 @@ _notification:
yourFollowRequestAccepted: "Vaša žiadosť o sledovanie bola prijatá"
youWereInvitedToGroup: "Pozvať do skupiny"
pollEnded: "Výsledky hlasovania sú k dispozícii."
emptyPushNotificationMessage: "Push notifikácie aktualizované"
_types:
all: "Všetky"
follow: "Sledujete"
@ -1636,9 +1714,8 @@ _notification:
_deck:
alwaysShowMainColumn: "Vždy zobraziť v hlavnom stĺpci"
columnAlign: "Zarovnať stĺpce"
columnMargin: "Rozostup medzi stĺpcami"
columnHeaderHeight: "Výška hlavičky stĺpca"
addColumn: "Pridať stĺpec"
configureColumn: "Nastavenie stĺpcov"
swapLeft: "Vymeniť vľavo"
swapRight: "Vymeniť vpravo"
swapUp: "Vymeniť hore"
@ -1646,6 +1723,11 @@ _deck:
stackLeft: "Priložiť do ľavého stĺpca"
popRight: "Vybrať napravo"
profile: "Profil"
newProfile: "Nový profil"
deleteProfile: "Odstrániť profil"
introduction: "Kombinujte stĺpce a vytvorte si svoje vlastné rozhranie!"
introduction2: "Stlačením tlačidla + v pravej časti obrazovky môžete kedykoľvek pridať stĺpce."
widgetsIntroduction: "V ponuke stĺpca vyberte možnosť \"Upraviť widget\" a pridajte widget"
_columns:
main: "Hlavný"
widgets: "Widgety"

View file

@ -203,6 +203,7 @@ done: "Klar"
processing: "Bearbetar..."
preview: "Förhandsvisning"
default: "Standard"
defaultValueIs: "Standard: {value}"
noCustomEmojis: "Det finns ingen emoji"
noJobs: "Det finns inga jobb"
federating: "Federerar"
@ -247,6 +248,7 @@ smtpPass: "Lösenord"
clearCache: "Rensa cache"
user: "Användare"
searchByGoogle: "Sök"
file: "Filer"
_email:
_follow:
title: "följde dig"

File diff suppressed because it is too large Load diff

View file

@ -52,6 +52,7 @@ searchUser: "Пошук користувачів"
reply: "Відповісти"
loadMore: "Показати більше"
showMore: "Показати більше"
showLess: "Закрити"
youGotNewFollower: "Новий підписник"
receiveFollowRequest: "Отримано запит на підписку"
followRequestAccepted: "Підписка прийнята"
@ -737,6 +738,11 @@ hashtags: "Хештеґ"
hide: "Сховати"
searchByGoogle: "Пошук"
indefinitely: "Ніколи"
file: "Файли"
reverse: "Перевернути"
colored: "Кольоровий"
label: "Назва"
localOnly: "Локально"
_ffVisibility:
public: "Опублікувати"
_ad:
@ -1434,8 +1440,6 @@ _notification:
_deck:
alwaysShowMainColumn: "Завжди показувати головну колонку"
columnAlign: "Вирівняти стовпці"
columnMargin: "Відступ між стовпцями"
columnHeaderHeight: "Висота заголовку колони"
addColumn: "Додати стовпець"
swapLeft: "Пересунути ліворуч"
swapRight: "Пересунути праворуч"

View file

@ -52,6 +52,7 @@ searchUser: "Tìm kiếm người dùng"
reply: "Trả lời"
loadMore: "Tải thêm"
showMore: "Xem thêm"
showLess: "Đóng"
youGotNewFollower: "đã theo dõi bạn"
receiveFollowRequest: "Đã yêu cầu theo dõi"
followRequestAccepted: "Đã chấp nhận yêu cầu theo dõi"
@ -203,6 +204,7 @@ done: "Xong"
processing: "Đang xử lý"
preview: "Xem trước"
default: "Mặc định"
defaultValueIs: "Mặc định: {value}"
noCustomEmojis: "Không có emoji"
noJobs: "Không có công việc"
federating: "Đang liên hợp"
@ -381,6 +383,7 @@ administrator: "Quản trị viên"
token: "Token"
twoStepAuthentication: "Xác minh 2 bước"
moderator: "Kiểm duyệt viên"
moderation: "Kiểm duyệt"
nUsersMentioned: "Dùng bởi {n} người"
securityKey: "Khóa bảo mật"
securityKeyName: "Tên khoá"
@ -559,6 +562,7 @@ author: "Tác giả"
leaveConfirm: "Có những thay đổi chưa được lưu. Bạn có muốn bỏ chúng không?"
manage: "Quản lý"
plugins: "Plugin"
preferencesBackups: "Sao lưu thiết lập"
deck: "Deck"
undeck: "Bỏ Deck"
useBlurEffectForModal: "Sử dụng hiệu ứng mờ cho các hộp thoại"
@ -643,6 +647,8 @@ clip: "Ghim"
createNew: "Tạo mới"
optional: "Không bắt buộc"
createNewClip: "Tạo một ghim mới"
unclip: "Bỏ ghim"
confirmToUnclipAlreadyClippedNote: "Bài đăng này là một phần của \"{name}\" ghim. Bạn có muốn bỏ khỏi ghim?"
public: "Công khai"
i18nInfo: "Misskey đang được các tình nguyện viên dịch sang nhiều thứ tiếng khác nhau. Bạn có thể hỗ trợ tại {link}."
manageAccessTokens: "Tạo mã truy cập"
@ -843,6 +849,58 @@ oneWeek: "1 tuần"
reflectMayTakeTime: "Có thể mất một thời gian để điều này được áp dụng."
failedToFetchAccountInformation: "Không thể lấy thông tin tài khoản"
rateLimitExceeded: "Giới hạn quá mức"
cropImage: "Cắt hình ảnh"
cropImageAsk: "Bạn có muốn cắt ảnh này?"
file: "Tập tin"
recentNHours: "{n}h trước"
recentNDays: "{n} ngày trước"
noEmailServerWarning: "Chưa đặt máy chủ email."
thereIsUnresolvedAbuseReportWarning: "Có báo cáo chưa xử lí."
recommended: "Được đề xuất"
check: "Kiểm tra"
driveCapOverrideLabel: "Thay đổi dung lượng drive cho người này"
driveCapOverrideCaption: "Đặt dung lượng drive về mặc định bằng cách nhập 0 hoặc số âm."
requireAdminForView: "Bạn phải đăng nhập như là quản trị viên mới xem được."
isSystemAccount: "Đã tạo một tài khoản và tự động vận hành bởi hệ thống."
typeToConfirm: "Nhấn {x} để xác nhận"
deleteAccount: "Xóa tài khoản"
document: "Tài liệu"
numberOfPageCache: "Số lượng trang bộ nhớ đệm"
numberOfPageCacheDescription: "Việc tăng con số này sẽ cải thiện sự thuận tiện cho người dùng nhưng gây ra nhiều áp lực hơn cho máy chủ cũng như sử dụng nhiều bộ nhớ hơn."
logoutConfirm: "Bạn có chắc muốn đăng xuất?"
lastActiveDate: "Lần cuối vào"
statusbar: "Thanh trạng thái"
pleaseSelect: "Chọn một lựa chọn"
reverse: "Lật"
colored: "Với màu"
refreshInterval: "Cập nhật nội bộ"
label: "Nhãn"
type: "Loại"
speed: "Tốc độ"
slow: "Chậm"
fast: "Nhanh"
sensitiveMediaDetection: "Tự động phát hiện NSFW"
localOnly: "Chỉ trên máy chủ"
remoteOnly: "Chỉ máy chủ từ xa"
failedToUpload: "Tải lên thất bại"
cannotUploadBecauseInappropriate: "Không thể tải lên tập tin này vì các phần của tập tin đã được phát hiện có khả năng là NSFW."
cannotUploadBecauseNoFreeSpace: "Tải lên không thành công do thiếu dung lượng Drive."
beta: "Beta"
enableAutoSensitive: "Tự động đánh dấu NSFW"
enableAutoSensitiveDescription: "Cho phép tự động phát hiện và đánh dấu media NSFW thông qua học máy, nếu có thể. Ngay cả khi tùy chọn này bị tắt, nó vẫn có thể được bật trên toàn máy chủ."
activeEmailValidationDescription: "Cho phép xác minh địa chỉ email chặt chẽ hơn, bao gồm việc kiểm tra các địa chỉ dùng một lần và xem nó có thực sự được giao tiếp hay không. Khi bỏ chọn, chỉ định dạng của email được xác minh."
navbar: "Thanh điều hướng"
shuffle: "Xáo trộn"
account: "Tài khoản của bạn"
move: "Di chuyển"
_sensitiveMediaDetection:
description: "Giảm nỗ lực kiểm duyệt máy chủ thông qua việc tự động nhận dạng media NSFW thông qua học máy. Điều này sẽ làm tăng một chút áp lực trên máy chủ."
sensitivity: "Phát hiện nhạy cảm"
sensitivityDescription: "Giảm độ nhạy sẽ dẫn đến ít phát hiện sai hơn (dương tính giả), tăng nó sẽ dẫn đến ít phát hiện sai hơn (âm tính giả)."
setSensitiveFlagAutomatically: "Đánh dấu là NSFW"
setSensitiveFlagAutomaticallyDescription: "Kết quả của phát hiện nội bộ sẽ được giữ lại ngay cả khi tùy chọn này bị tắt."
analyzeVideos: "Bật chuẩn đoán video"
analyzeVideosDescription: "Phân tích video bên cạnh hình ảnh. Điều này sẽ làm tăng một chút áp lực trên máy chủ."
_emailUnavailable:
used: "Địa chỉ email đã được sử dụng"
format: "Địa chỉ email không hợp lệ"
@ -885,6 +943,24 @@ _plugin:
install: "Cài đặt tiện ích"
installWarn: "Vui lòng không cài đặt những tiện ích đáng ngờ."
manage: "Quản lý plugin"
_preferencesBackups:
list: "Tạo sao lưu"
saveNew: "Lưu bản sao lưu"
loadFile: "Nhập tập tin"
apply: "Áp dụng lên thiết bị này"
save: "Lưu thay đổi"
inputName: "Nhập tên bản sao lưu"
cannotSave: "Không thể lưu"
nameAlreadyExists: "Bản sao lưu \"{name}\" đã tồn tại. Xin nhập tên khác."
applyConfirm: "Bạn có chắc muốn áp dụng bản sao lưu \"{name}\" cho thiết bị này? Thiết lập hiện tại sẽ bị ghi đè."
saveConfirm: "Lưu bản sao lưu {name}?"
deleteConfirm: "Xóa bản sao lưu {name}?"
renameConfirm: "Đổi tên bản sao lưu \"{old}\" thành \"{new}\"?"
noBackups: "Chưa có bản sao lưu. Bạn có thể sao lưu thiết lập trên máy chủ này bằng cách sử dụng \"Tạo sao lưu\"."
createdAt: "Tạo vào: {time} {date}"
updatedAt: "Cập nhật: {time} {date}"
cannotLoad: "Tải thất bại"
invalidFile: "Sai định dạng tập tin"
_registry:
scope: "Phạm vi"
key: "Mã"
@ -968,6 +1044,8 @@ _mfm:
sparkleDescription: "Làm cho nội dung hiệu ứng hạt lấp lánh."
rotate: "Xoay"
rotateDescription: "Xoay nội dung theo một góc cụ thể."
plain: "Đơn giản"
plainDescription: "Vô hiệu hóa mọi hiệu ứng MFM chứa trong hiệu ứng MFM này."
_instanceTicker:
none: "Không hiển thị"
remote: "Hiện cho người dùng từ máy chủ khác"
@ -1197,10 +1275,13 @@ _widgets:
trends: "Xu hướng"
clock: "Đồng hồ"
rss: "Trình đọc RSS"
rssTicker: "RSS-Ticker"
activity: "Hoạt động"
photos: "Kho ảnh"
digitalClock: "Đồng hồ số"
unixClock: "Đồng hồ UNIX"
federation: "Liên hợp"
instanceCloud: "Instance cloud"
postForm: "Mẫu đăng"
slideshow: "Trình chiếu"
button: "Nút"
@ -1638,9 +1719,8 @@ _notification:
_deck:
alwaysShowMainColumn: "Luôn hiện cột chính"
columnAlign: "Căn cột"
columnMargin: "Căn lề giữa các cột"
columnHeaderHeight: "Chiều rộng cột ảnh bìa"
addColumn: "Thêm cột"
configureColumn: "Cài đặt cột"
swapLeft: "Hoán đổi với cột bên trái"
swapRight: "Hoán đổi với cột bên phải"
swapUp: "Hoán đổi với cột trên"
@ -1648,6 +1728,11 @@ _deck:
stackLeft: "Xếp chồng với cột bên trái"
popRight: "Xếp chồng với cột bên trái"
profile: "Hồ sơ"
newProfile: "Hồ sơ mới"
deleteProfile: "Xóa hồ sơ"
introduction: "Kết hợp các cột để tạo giao diện của riêng bạn!"
introduction2: "Bạn có thể thêm cột bất kỳ lúc nào bằng cách nhấn + ở bên phải màn hình."
widgetsIntroduction: "Chọn \"Sửa widget\" trong menu cột và thêm một widget."
_columns:
main: "Chính"
widgets: "Tiện ích"

View file

@ -52,6 +52,7 @@ searchUser: "搜索用户"
reply: "回复"
loadMore: "查看更多"
showMore: "查看更多"
showLess: "关闭"
youGotNewFollower: "你有新的关注者"
receiveFollowRequest: "您收到了关注请求"
followRequestAccepted: "您的关注请求被通过了"
@ -140,7 +141,7 @@ cacheRemoteFilesDescription: "当禁用此设定时远程文件将直接从远
flagAsBot: "这是一个机器人账号"
flagAsBotDescription: "如果此帐户由程序控制请启用此项。启用后此标志可以帮助其他开发人员防止机器人之间产生无限互动的行为并让Misskey的内部系统将此帐户识别为机器人。"
flagAsCat: "将这个账户设定为一只猫"
flagAsCatDescription: "如果您想表明此帐户是一只猫,请打开此标志。"
flagAsCatDescription: "如果您想表明此帐户是一只猫,请打开此标志。\n开启后会在您的头像上出现猫耳朵并将你的帖子中的「na」替换为「nya」日文同理。"
flagShowTimelineReplies: "在时间线上显示帖子的回复"
flagShowTimelineRepliesDescription: "启用时,时间线除了显示用户的帖子外,还会显示其他用户对帖子的回复。"
autoAcceptFollowed: "自动允许关注者的关注"
@ -203,6 +204,7 @@ done: "完成"
processing: "正在处理"
preview: "预览"
default: "默认"
defaultValueIs: "默认值: {value}"
noCustomEmojis: "没有自定义表情符号"
noJobs: "没有任务"
federating: "联合中"
@ -250,7 +252,7 @@ messageRead: "已读"
noMoreHistory: "没有更多的历史记录"
startMessaging: "添加聊天"
nUsersRead: "{n}人已读"
agreeTo: "{0}勾选则表示已阅读并同意"
agreeTo: "勾选则表示已阅读并同意{0}"
tos: "服务条款"
start: "开始"
home: "首页"
@ -336,7 +338,7 @@ pinnedUsers: "置顶用户"
pinnedUsersDescription: "在「发现」页面中使用换行标记想要置顶的用户。"
pinnedPages: "固定页面"
pinnedPagesDescription: "输入您要固定到实例首页的页面路径,以换行符分隔。"
pinnedClipId: "置顶的签ID"
pinnedClipId: "置顶的便签ID"
pinnedNotes: "已置顶的帖子"
hcaptcha: "hCaptcha"
enableHcaptcha: "启用 hCaptcha"
@ -381,6 +383,7 @@ administrator: "管理员"
token: "Token (令牌)"
twoStepAuthentication: "两步验证"
moderator: "监察员"
moderation: "管理"
nUsersMentioned: "{n} 被提到"
securityKey: "安全密钥"
securityKeyName: "密钥名称"
@ -481,13 +484,13 @@ showFeaturedNotesInTimeline: "在时间线上显示热门推荐"
objectStorage: "对象存储"
useObjectStorage: "使用对象存储"
objectStorageBaseUrl: "Base URL"
objectStorageBaseUrlDesc: "URL前缀用于构造URL到对象媒体的引用如果您使用的是CDN或反向代理请指定其URL否则请根据您使用的服务指定可公开访问的地址。例如“https://<bucket>.s3.amazonaws.com”用于AWS S3“https://storage.googleapis.com/<bucket>”用于GCS"
objectStorageBaseUrlDesc: "用于引用的URL。如果您正在使用CDN或反向代理请指定其URL例如S3“https://<bucket>.s3.amazonaws.com”GCS“https://storage.googleapis.com/<bucket>”"
objectStorageBucket: "存储桶"
objectStorageBucketDesc: "请指定使用的对象存储服务的存储桶名称。"
objectStoragePrefix: "前缀"
objectStoragePrefixDesc: "文件将存储在此前缀的目录下。"
objectStorageEndpoint: "端点"
objectStorageEndpointDesc: "如果你希望使用AWS S3请留空。否则请根据你使用的服务来进行设置指定端点形式为“<host>”或“<host>:<port>”。"
objectStorageEndpointDesc: "如果你使用AWS S3请留空。否则请根据你使用的服务商的说明来进行设置,指定端点形式为“<host>”或“<host>:<port>”。"
objectStorageRegion: "可用区"
objectStorageRegionDesc: "指定一个可用区例如“xx-east-1”。 如果您的对象存储服务没有可用区概念请将其留空或填写“us-east-1”。"
objectStorageUseSSL: "使用SSL"
@ -559,6 +562,7 @@ author: "作者"
leaveConfirm: "存在未保存的更改。要放弃更改吗?"
manage: "管理"
plugins: "插件"
preferencesBackups: "备份设置"
deck: "Deck"
undeck: "取消Deck"
useBlurEffectForModal: "对话框使用模糊效果"
@ -639,10 +643,12 @@ random: "随机"
system: "系统"
switchUi: "切换界面"
desktop: "桌面"
clip: "签"
clip: "便签"
createNew: "新建"
optional: "可选"
createNewClip: "新建书签"
createNewClip: "新建便签"
unclip: "移除便签"
confirmToUnclipAlreadyClippedNote: "本帖已包含在便签\"{name}\"里。您想要将本帖从该便签中移除吗?"
public: "公开"
i18nInfo: "Misskey已经被志愿者们翻译成了各种语言。如果你也有兴趣可以通过{link}帮助翻译。"
manageAccessTokens: "管理 Access Tokens"
@ -662,7 +668,7 @@ yes: "是"
no: "否"
driveFilesCount: "网盘的文件数"
driveUsage: "网盘的空间用量"
noCrawle: "要求搜索引擎不索引该站点"
noCrawle: "要求搜索引擎不索引该用户"
noCrawleDescription: "要求搜索引擎不要收录(索引)您的用户页面,帖子,页面等。"
lockedAccountInfo: "即使通过了关注请求,只要您不将帖子可见范围设置成“关注者”,任何人都可以看到您的帖子。"
alwaysMarkSensitive: "默认将媒体文件标记为敏感内容"
@ -676,7 +682,7 @@ pageLikesCount: "页面点赞次数"
pageLikedCount: "页面被点赞次数"
contact: "联系人"
useSystemFont: "使用系统默认字体"
clips: "签"
clips: "便签"
experimentalFeatures: "实验性功能"
developer: "开发者"
makeExplorable: "使账号可见。"
@ -741,7 +747,7 @@ userInfo: "用户信息"
unknown: "未知"
onlineStatus: "在线状态"
hideOnlineStatus: "隐藏在线状态"
hideOnlineStatusDescription: "隐藏在线状态后,可能会降低例如搜索等功能的便利性。"
hideOnlineStatusDescription: "隐藏在线状态后,可能会降低搜索等功能的便利性。"
online: "在线"
active: "活动"
offline: "离线"
@ -842,6 +848,59 @@ oneDay: "1天"
oneWeek: "1周"
reflectMayTakeTime: "可能需要一些时间才能体现出效果。"
failedToFetchAccountInformation: "获取账户信息失败"
rateLimitExceeded: "已超過速率限制"
cropImage: "剪裁图像"
cropImageAsk: "是否要裁剪图像?"
file: "文件"
recentNHours: "最近{n}小时"
recentNDays: "最近{n}天"
noEmailServerWarning: "电子邮件服务器未设置。"
thereIsUnresolvedAbuseReportWarning: "有未解决的报告"
recommended: "推荐"
check: "检查"
driveCapOverrideLabel: "變更此用戶的雲端硬碟容量上限"
driveCapOverrideCaption: "设定为 0 以下则会解除此限制。"
requireAdminForView: "需要使用管理员账户登录才能查看。"
isSystemAccount: "该账号由系统自动创建和管理。"
typeToConfirm: "输入 {x} 以确认操作。"
deleteAccount: "删除账户"
document: "文档"
numberOfPageCache: "缓存页数"
numberOfPageCacheDescription: "设置较高的值会更方便用户,但设备的负载和内存使用量会增加。"
logoutConfirm: "是否确认登出?"
lastActiveDate: "最后活跃时间"
statusbar: "状态栏"
pleaseSelect: "请选择"
reverse: "翻转"
colored: "彩色"
refreshInterval: "刷新间隔"
label: "标签"
type: "类型"
speed: "速度"
slow: "慢"
fast: "快"
sensitiveMediaDetection: "检测到敏感媒体"
localOnly: "仅限本地"
remoteOnly: "仅远程"
failedToUpload: "上传失败"
cannotUploadBecauseInappropriate: "因为可能含有不适宜的内容,无法上传。"
cannotUploadBecauseNoFreeSpace: "因为已无可用空间,无法上传。"
beta: "测试"
enableAutoSensitive: "自动 NSFW 识别"
enableAutoSensitiveDescription: "如果可用,请使用机器学习在媒体上自动设置 NSFW 标志。即使关闭此功能,也可能会根据实例自动设置。"
activeEmailValidationDescription: "积极地验证用户的电子邮件地址,判断它是一次性的电子邮件地址,还是可以实际通信的地址。关闭时,则只检查字符串是否正确。"
navbar: "导航栏"
shuffle: "随机"
account: "账户"
move: "移动"
_sensitiveMediaDetection:
description: "可以使用机器学习技术自动检测敏感媒体,以便进行审核。服务器负载将略微增加。"
sensitivity: "检测敏感度"
sensitivityDescription: "敏感度较低,则误检(假阳性)会减少;敏感度较高,则漏检(假阴性)会减少。"
setSensitiveFlagAutomatically: "自动设置 NSFW 标签"
setSensitiveFlagAutomaticallyDescription: "即使关闭此配置,识别结果也会在内部保存。"
analyzeVideos: "启用对视频的检测"
analyzeVideosDescription: "除了静止图像之外,还对视频进行分析。服务器负载会略微增加。"
_emailUnavailable:
used: "已经被使用过"
format: "无效的格式"
@ -884,6 +943,24 @@ _plugin:
install: "安装插件"
installWarn: "请不要安装不可信的插件。"
manage: "管理插件..."
_preferencesBackups:
list: "已创建的备份"
saveNew: "另存为"
loadFile: "导入文件"
apply: "应用于本设备"
save: "覆盖存档"
inputName: "请输入备份的名称"
cannotSave: "无法保存"
nameAlreadyExists: "备份名称\"{name}\"已经存在,请指定其他名称。"
applyConfirm: "您是否要将备份\"{name}\"应用到当前设备上?当前设备现有配置将被丢弃。"
saveConfirm: "您确定要覆盖保存 {name} 吗?"
deleteConfirm: "您确定要删除 {name} 吗?"
renameConfirm: "您确定要把“{old}”改为“{new}”吗?"
noBackups: "当前没有备份,“另存为”允许您在服务器上保存当前客户端的配置。"
createdAt: "创建日期:{date} {time}"
updatedAt: "更新日期:{date} {time}"
cannotLoad: "无法加载"
invalidFile: "无效的的文件格式。"
_registry:
scope: "范围"
key: "主要"
@ -967,6 +1044,8 @@ _mfm:
sparkleDescription: "添加发光粒子效果。"
rotate: "旋转"
rotateDescription: "旋转指定的角度。"
plain: "简洁"
plainDescription: "禁用所有内部语法。"
_instanceTicker:
none: "不显示"
remote: "仅远程用户"
@ -1196,10 +1275,13 @@ _widgets:
trends: "趋势"
clock: "时钟"
rss: "RSS阅读器"
rssTicker: "RSS Ticker"
activity: "活动"
photos: "照片"
digitalClock: "数字时钟"
unixClock: "UNIX时钟"
federation: "联邦宇宙"
instanceCloud: "实例云"
postForm: "投稿窗口"
slideshow: "幻灯片展示"
button: "按钮"
@ -1637,16 +1719,20 @@ _notification:
_deck:
alwaysShowMainColumn: "总是显示主列"
columnAlign: "列对齐"
columnMargin: "列间距"
columnHeaderHeight: "列标题高度"
addColumn: "添加列"
configureColumn: "列设置"
swapLeft: "向左移动"
swapRight: "向右移动"
swapUp: "向上移动"
swapDown: "向下移动"
stackLeft: "向左折叠"
popRight: "向右弹出"
profile: "个人资料"
profile: "配置文件"
newProfile: "新建配置文件"
deleteProfile: "删除配置文件"
introduction: "将各列进行组合以创建您自己的界面!"
introduction2: "您可以随时通过屏幕右侧的 + 来添加列"
widgetsIntroduction: "从列菜单中,选择“小工具编辑”来添加小工具"
_columns:
main: "主列"
widgets: "小工具"

View file

@ -1,7 +1,7 @@
---
_lang_: "繁體中文"
headlineMisskey: "貼文連繫網路"
introMisskey: "歡迎! Misskey是一個開放原始碼且去中心化的社群網路。\n透過「貼文」分享周邊新鮮事並告訴其他人您的想法📡\n透過「情感」功能,對大家的貼文表達情感!👍\n一起來探索這個新的世界吧🚀"
introMisskey: "歡迎! Misskey是一個開放原始碼且去中心化的社群網路。\n透過「貼文」分享周邊新鮮事並告訴其他人您的想法📡\n透過「反應」功能,對大家的貼文表達情感!👍\n一起來探索這個新的世界吧🚀"
monthAndDay: "{month}月 {day}日"
search: "搜尋"
notifications: "通知"
@ -52,6 +52,7 @@ searchUser: "搜尋使用者"
reply: "回覆"
loadMore: "載入更多"
showMore: "載入更多"
showLess: "關閉"
youGotNewFollower: "您有新的追隨者"
receiveFollowRequest: "您有新的追隨請求"
followRequestAccepted: "追隨請求已接受"
@ -155,7 +156,7 @@ searchWith: "搜尋: {q}"
youHaveNoLists: "你沒有任何清單"
followConfirm: "你真的要追隨{name}嗎?"
proxyAccount: "代理帳戶"
proxyAccountDescription: "代理帳戶是在某些情況下充當其他伺服器用戶的帳戶。例如,當使用者將一個來自其他伺服器的帳戶放在列表中時,由於沒有其他使用者關注該帳戶,該指令不會傳送到該伺服器上,因此會由代理帳戶關注。"
proxyAccountDescription: "代理帳戶是在某些情況下充當其他伺服器用戶的帳戶。例如,當使用者將一個來自其他伺服器的帳戶放在列表中時,由於沒有其他使用者追蹤該帳戶,該指令不會傳送到該伺服器上,因此會由代理帳戶追蹤。"
host: "主機"
selectUser: "選取使用者"
recipient: "收件人"
@ -203,6 +204,7 @@ done: "完成"
processing: "處理中"
preview: "預覽"
default: "預設"
defaultValueIs: "預設值:{value}"
noCustomEmojis: "沒有自訂的表情符號"
noJobs: "沒有任務"
federating: "整合搜索中"
@ -381,6 +383,7 @@ administrator: "管理員"
token: "權杖"
twoStepAuthentication: "兩階段驗證"
moderator: "板主"
moderation: "言論調節"
nUsersMentioned: "提到了{n}"
securityKey: "安全金鑰"
securityKeyName: "金鑰名稱"
@ -559,6 +562,7 @@ author: "作者"
leaveConfirm: "有未保存的更改。要放棄嗎?"
manage: "管理"
plugins: "外掛"
preferencesBackups: "備份設定檔"
deck: "多欄模式"
undeck: "取消多欄模式"
useBlurEffectForModal: "在模態框使用模糊效果"
@ -643,6 +647,8 @@ clip: "摘錄"
createNew: "新建"
optional: "可選"
createNewClip: "建立新摘錄"
unclip: "解除摘錄"
confirmToUnclipAlreadyClippedNote: "此貼文已包含在摘錄「{name}」中。 你想將貼文從這個摘錄中排除嗎?"
public: "公開"
i18nInfo: "Misskey已經被志願者們翻譯成各種語言版本如果想要幫忙的話可以進入{link}幫助翻譯。"
manageAccessTokens: "管理存取權杖"
@ -723,7 +729,7 @@ receiveAnnouncementFromInstance: "接收由本實例發出的電郵通知"
emailNotification: "郵件通知"
publish: "發佈"
inChannelSearch: "頻道内搜尋"
useReactionPickerForContextMenu: "點擊右鍵開啟應工具欄"
useReactionPickerForContextMenu: "點擊右鍵開啟應工具欄"
typingUsers: "{users}輸入中..."
jumpToSpecifiedDate: "跳轉到特定日期"
showingPastTimeline: "顯示過往的時間線"
@ -806,8 +812,8 @@ unread: "未讀"
filter: "篩選"
controlPanel: "控制台"
manageAccounts: "管理帳戶"
makeReactionsPublic: "將應設為公開"
makeReactionsPublicDescription: "將您做過的應設為公開可見。"
makeReactionsPublic: "將應設為公開"
makeReactionsPublicDescription: "將您做過的應設為公開可見。"
classic: "經典"
muteThread: "將貼文串設為靜音"
unmuteThread: "將貼文串的靜音解除"
@ -842,6 +848,59 @@ oneDay: "1天"
oneWeek: "1週"
reflectMayTakeTime: "可能需要一些時間才會出現效果。"
failedToFetchAccountInformation: "取得帳戶資訊失敗"
rateLimitExceeded: "已超過速率限制"
cropImage: "圖片裁剪"
cropImageAsk: "要剪裁圖片嗎?"
file: "檔案"
recentNHours: "過去{n}小時"
recentNDays: "過去{n}天"
noEmailServerWarning: "尚未設定電子郵件伺服器。"
thereIsUnresolvedAbuseReportWarning: "有尚未處理的檢舉。"
recommended: "推薦"
check: "檢查"
driveCapOverrideLabel: "更改這個使用者的雲端硬碟容量上限"
driveCapOverrideCaption: "如果指定0以下的值就會被取消。"
requireAdminForView: "必須以管理者帳號登入才可以檢視。"
isSystemAccount: "由系統自動建立與管理的帳號。"
typeToConfirm: "要執行這項操作,請輸入 {x} "
deleteAccount: "刪除帳號"
document: "文件"
numberOfPageCache: "快取頁面數"
numberOfPageCacheDescription: "增加數量會提高便利性,但也會增加負荷與記憶體使用量。"
logoutConfirm: "確定要登出嗎?"
lastActiveDate: "上次使用日期及時間"
statusbar: "狀態列"
pleaseSelect: "請選擇"
reverse: "翻轉"
colored: "彩色"
refreshInterval: "更新間隔"
label: "標籤"
type: "類型"
speed: "速度"
slow: "慢"
fast: "快"
sensitiveMediaDetection: "敏感性媒體的檢測"
localOnly: "僅限本地"
remoteOnly: "僅限遠端"
failedToUpload: "上傳失敗"
cannotUploadBecauseInappropriate: "由於判定可能包含不適當的內容,因此無法上傳。"
cannotUploadBecauseNoFreeSpace: "由於雲端硬碟沒有可用空間,因此無法上傳。"
beta: "Beta"
enableAutoSensitive: "自動NSFW判定"
enableAutoSensitiveDescription: "如果可用,請利用機器學習在媒體上自動設置 NSFW 旗標。 即使關閉此功能,依實例而定也可能會自動設置。"
activeEmailValidationDescription: "積極地驗證用戶的電子郵件地址,判斷它是否為免洗地址,或者它是否可以通信。 若關閉,則只會檢查字元是否正確。"
navbar: "導覽列"
shuffle: "隨機"
account: "帳戶"
move: "移動 "
_sensitiveMediaDetection:
description: "您可以使用機器學習自動檢測敏感媒體並將其用於審核。 伺服器的負荷會稍微增加。"
sensitivity: "檢測敏感度"
sensitivityDescription: "敏感度低時,誤檢測(偽陽性)會減少。敏感度高時,漏檢(偽陰性)會減少。"
setSensitiveFlagAutomatically: "設定 NSFW 旗標"
setSensitiveFlagAutomaticallyDescription: "即使將此設定關閉,判定結果也會保留在內部。"
analyzeVideos: "啟用影片分析"
analyzeVideosDescription: "除了靜止影像以外,也分析影片。伺服器的負荷會稍微增加。"
_emailUnavailable:
used: "已經在使用中"
format: "格式無效"
@ -858,7 +917,7 @@ _signup:
emailSent: "已將確認郵件發送至您輸入的電子郵件地址 ({email})。請開啟電子郵件中的連結以完成帳戶創建。"
_accountDelete:
accountDelete: "刪除帳戶"
mayTakeTime: "刪除帳戶的處理負荷較大,如果帳戶產生的內容數量上的檔案數量較多的話,就需要花费一段時間才能完成。"
mayTakeTime: "刪除帳戶的處理負荷較大,如果帳戶產生的內容數量上的檔案數量較多的話,就需要花费一段時間才能完成。"
sendEmail: "帳戶删除完成後,將向註冊地電子郵件地址發送通知。"
requestAccountDelete: "刪除帳戶請求"
started: "已開始刪除作業。"
@ -884,6 +943,24 @@ _plugin:
install: "安裝外掛組件"
installWarn: "請不要安裝來源不明的外掛組件。"
manage: "管理外掛"
_preferencesBackups:
list: "已備份的設定檔"
saveNew: "另存新檔"
loadFile: "讀取檔案"
apply: "套用在此裝置"
save: "覆蓋存檔"
inputName: "輸入備份檔名稱"
cannotSave: "無法儲存"
nameAlreadyExists: "備份檔名稱「{name}」已經存在。請指定不同的名稱。"
applyConfirm: "將備份檔「{name}」套用在現在的裝置嗎?現在的裝置設定將會消失。"
saveConfirm: "要覆蓋存檔{name}嗎?"
deleteConfirm: "要刪除{name}嗎?"
renameConfirm: "要將「{old}」變更為「{new}」嗎?"
noBackups: "沒有備份檔。您可以用「另存新檔」將現在的客戶端設定儲存在伺服器上。"
createdAt: "建立日期:{date} {time}"
updatedAt: "更新日期:{date} {time}"
cannotLoad: "無法讀取"
invalidFile: "檔案形式錯誤。"
_registry:
scope: "範圍"
key: "機碼"
@ -967,6 +1044,8 @@ _mfm:
sparkleDescription: "添加閃閃發光的粒子效果。"
rotate: "旋轉"
rotateDescription: "以指定的角度旋轉。"
plain: "簡潔"
plainDescription: "停用全部的內部語法。"
_instanceTicker:
none: "隱藏"
remote: "向遠端使用者顯示"
@ -1196,10 +1275,13 @@ _widgets:
trends: "發燒貼文"
clock: "時鐘"
rss: "RSS閱讀器"
rssTicker: "RSS跑馬燈"
activity: "動態"
photos: "照片"
digitalClock: "電子時鐘"
unixClock: "UNIX時間"
federation: "聯邦宇宙"
instanceCloud: "實例雲"
postForm: "發佈窗口"
slideshow: "幻燈片"
button: "按鈕"
@ -1637,9 +1719,8 @@ _notification:
_deck:
alwaysShowMainColumn: "總是顯示主欄"
columnAlign: "對齊欄位"
columnMargin: "列之間的邊距"
columnHeaderHeight: "欄位標題高度"
addColumn: "新增欄位"
configureColumn: "欄位的設定"
swapLeft: "向左移動"
swapRight: "向右移動"
swapUp: "往上移動"
@ -1647,6 +1728,11 @@ _deck:
stackLeft: "向左折疊"
popRight: "向右彈出"
profile: "個人檔案"
newProfile: "新建個人檔案"
deleteProfile: "刪除個人檔案"
introduction: "組合欄位來製作屬於自己的介面吧!"
introduction2: "您可以隨時透過按畫面右方的 + 來添加欄位。"
widgetsIntroduction: "請從欄位的選單中,選擇「編輯小工具」來添加小工具"
_columns:
main: "主列"
widgets: "小工具"

View file

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "12.111.1-test.1",
"version": "12.120.0-alpha.8",
"codename": "indigo",
"repository": {
"type": "git",
@ -10,8 +10,8 @@
"scripts": {
"postinstall": "node ./scripts/install-packages.js",
"build": "node ./scripts/build.js",
"start": "cd packages/backend && node --experimental-json-modules ./built/index.js",
"start:test": "cd packages/backend && cross-env NODE_ENV=test node --experimental-json-modules ./built/index.js",
"start": "cd packages/backend && node --experimental-json-modules ./built/boot/index.js",
"start:test": "cd packages/backend && cross-env NODE_ENV=test node --experimental-json-modules ./built/boot/index.js",
"init": "npm run migrate",
"migrate": "cd packages/backend && npx typeorm migration:run -d ormconfig.js",
"migrateandstart": "npm run migrate && npm run start",
@ -22,8 +22,10 @@
"cy:open": "cypress open --browser --e2e --config-file=cypress.config.ts",
"cy:run": "cypress run",
"e2e": "start-server-and-test start:test http://localhost:61812 cy:run",
"mocha": "cd packages/backend && cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" npx mocha",
"test": "npm run mocha",
"jest": "cd packages/backend && cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --runInBand",
"jest-and-coverage": "cd packages/backend && cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --coverage --forceExit --runInBand",
"test": "npm run jest",
"test-and-coverage": "npm run jest-and-coverage",
"format": "gulp format",
"clean": "node ./scripts/clean.js",
"clean-all": "node ./scripts/clean-all.js",
@ -41,10 +43,10 @@
"devDependencies": {
"@types/gulp": "4.0.9",
"@types/gulp-rename": "2.0.1",
"@typescript-eslint/parser": "5.27.1",
"@typescript-eslint/parser": "5.42.1",
"cross-env": "7.0.3",
"cypress": "10.0.3",
"cypress": "11.0.1",
"start-server-and-test": "1.14.0",
"typescript": "4.7.3"
"typescript": "4.8.4"
}
}

View file

@ -0,0 +1,3 @@
{
"tsConfig": "./tsconfig.json"
}

View file

@ -1,10 +0,0 @@
{
"extension": ["ts","js","cjs","mjs"],
"node-option": [
"experimental-specifier-resolution=node",
"loader=./test/loader.js"
],
"slow": 1000,
"timeout": 10000,
"exit": true
}

15
packages/backend/.swcrc Normal file
View file

@ -0,0 +1,15 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
}
},
"minify": false
}

View file

@ -0,0 +1,14 @@
// https://github.com/facebook/jest/issues/12270#issuecomment-1194746382
const nativeModule = require('node:module');
function resolver(module, options) {
const { basedir, defaultResolver } = options;
try {
return defaultResolver(module, options);
} catch (error) {
return nativeModule.createRequire(basedir).resolve(module);
}
}
module.exports = resolver;

View file

@ -0,0 +1,202 @@
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/en/configuration.html
*/
module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,
// Stop running tests after `n` failures
// bail: 0,
// The directory where Jest should store its cached dependency information
// cacheDirectory: "C:\\Users\\ai\\AppData\\Local\\Temp\\jest",
// Automatically clear mock calls and instances between every test
// clearMocks: false,
// Indicates whether the coverage information should be collected while executing the test
// collectCoverage: false,
// An array of glob patterns indicating a set of files for which coverage information should be collected
collectCoverageFrom: ['src/**/*.ts'],
// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "\\\\node_modules\\\\"
// ],
// Indicates which provider should be used to instrument code for coverage
coverageProvider: "v8",
// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],
// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,
// A path to a custom dependency extractor
// dependencyExtractor: undefined,
// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,
// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],
// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: undefined,
// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: undefined,
// A set of global variables that need to be available in all test environments
globals: {
},
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",
// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
// "node_modules"
// ],
// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "json",
// "jsx",
// "ts",
// "tsx",
// "node"
// ],
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
"^@/(.*?).js": "<rootDir>/src/$1.ts",
'^(\\.{1,2}/.*)\\.js$': '$1',
},
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
// Activates notifications for test results
// notify: false,
// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",
// A preset that is used as a base for Jest's configuration
//preset: "ts-jest/presets/js-with-ts-esm",
// Run tests from one or more projects
// projects: undefined,
// Use this configuration option to add custom reporters to Jest
// reporters: undefined,
// Automatically reset mock state between every test
// resetMocks: false,
// Reset the module registry before running each individual test
// resetModules: false,
// A path to a custom resolver
resolver: './jest-resolver.cjs',
// Automatically restore mock state between every test
// restoreMocks: false,
// The root directory that Jest should scan for tests and modules within
// rootDir: undefined,
// A list of paths to directories that Jest should use to search for files in
roots: [
"<rootDir>"
],
// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",
// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],
// A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [],
// The number of seconds after which a test is considered as slow and reported as such in the results.
// slowTestThreshold: 5,
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
// snapshotSerializers: [],
// The test environment that will be used for testing
testEnvironment: "node",
// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
// Adds a location field to test results
// testLocationInResults: false,
// The glob patterns Jest uses to detect test files
testMatch: [
"<rootDir>/test/unit/**/*.ts",
//"<rootDir>/test/e2e/**/*.ts"
],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "\\\\node_modules\\\\"
// ],
// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
// This option allows the use of a custom results processor
// testResultsProcessor: undefined,
// This option allows use of a custom test runner
// testRunner: "jasmine2",
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",
// A map from regular expressions to paths to transformers
transform: {
"^.+\\.(t|j)sx?$": ["@swc/jest"],
},
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "\\\\node_modules\\\\",
// "\\.pnp\\.[^\\\\]+$"
// ],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
// Indicates whether each individual test should be reported during the run
// verbose: undefined,
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],
// Whether to use watchman for file crawling
// watchman: true,
extensionsToTreatAsEsm: ['.ts'],
};

View file

@ -28,11 +28,11 @@ export class foreignKeyReports1651224615271 {
queryRunner.query(`CREATE INDEX "IDX_315c779174fe8247ab324f036e" ON "drive_file" ("isLink")`),
queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId")`),
queryRunner.query(`CREATE INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5" ON "abuse_user_report" ("targetUserId")`),
//queryRunner.query(`CREATE INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5" ON "abuse_user_report" ("targetUserId")`),
queryRunner.query(`DELETE FROM "abuse_user_report" WHERE "targetUserId" NOT IN (SELECT "id" FROM "user")`).then(() => {
queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f" FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
}),
//queryRunner.query(`DELETE FROM "abuse_user_report" WHERE "targetUserId" NOT IN (SELECT "id" FROM "user")`).then(() => {
// queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f" FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
//}),
queryRunner.query(`ALTER TABLE "poll" ADD CONSTRAINT "UQ_da851e06d0dfe2ef397d8b1bf1b" UNIQUE ("noteId")`),
queryRunner.query(`ALTER TABLE "user_keypair" ADD CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6" UNIQUE ("userId")`),

View file

@ -0,0 +1,23 @@
export class nsfwDetection1655368940105 {
name = 'nsfwDetection1655368940105'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "drive_file" ADD "forceIsSensitive" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "drive_file" ADD "predictedIsSensitive" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."predictedIsSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`);
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetection_enum" AS ENUM('none', 'all', 'local', 'remote')`);
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetection" "public"."meta_sensitiveimagedetection_enum" NOT NULL DEFAULT 'none'`);
await queryRunner.query(`ALTER TABLE "meta" ADD "forceIsSensitiveWhenPredicted" boolean NOT NULL DEFAULT true`);
await queryRunner.query(`CREATE INDEX "IDX_fc2d74a6d7d8b11292a851d8f8" ON "drive_file" ("predictedIsSensitive") `);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "public"."IDX_fc2d74a6d7d8b11292a851d8f8"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "forceIsSensitiveWhenPredicted"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetection"`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetection_enum"`);
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."predictedIsSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`);
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "predictedIsSensitive"`);
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "forceIsSensitive"`);
}
}

View file

@ -0,0 +1,15 @@
export class nsfwDetection21655371960534 {
name = 'nsfwDetection21655371960534'
async up(queryRunner) {
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high')`);
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetectionSensitivity" "public"."meta_sensitiveimagedetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`);
await queryRunner.query(`ALTER TABLE "meta" ADD "disallowUploadWhenPredictedAsPorn" boolean NOT NULL DEFAULT false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "disallowUploadWhenPredictedAsPorn"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetectionSensitivity"`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`);
}
}

View file

@ -0,0 +1,21 @@
export class nsfwDetection31655388169582 {
name = 'nsfwDetection31655388169582'
async up(queryRunner) {
await queryRunner.query(`ALTER TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" RENAME TO "meta_sensitiveimagedetectionsensitivity_enum_old"`);
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" DROP DEFAULT`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" USING "sensitiveImageDetectionSensitivity"::"text"::"public"."meta_sensitiveimagedetectionsensitivity_enum"`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" SET DEFAULT 'medium'`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old"`);
}
async down(queryRunner) {
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" AS ENUM('medium', 'low', 'high')`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" DROP DEFAULT`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" USING "sensitiveImageDetectionSensitivity"::"text"::"public"."meta_sensitiveimagedetectionsensitivity_enum_old"`);
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" SET DEFAULT 'medium'`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`);
await queryRunner.query(`ALTER TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" RENAME TO "meta_sensitiveimagedetectionsensitivity_enum"`);
}
}

View file

@ -0,0 +1,25 @@
export class nsfwDetection41655393015659 {
name = 'nsfwDetection41655393015659'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetection"`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetection_enum"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetectionSensitivity"`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`);
await queryRunner.query(`CREATE TYPE "public"."meta_sensitivemediadetection_enum" AS ENUM('none', 'all', 'local', 'remote')`);
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveMediaDetection" "public"."meta_sensitivemediadetection_enum" NOT NULL DEFAULT 'none'`);
await queryRunner.query(`CREATE TYPE "public"."meta_sensitivemediadetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`);
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveMediaDetectionSensitivity" "public"."meta_sensitivemediadetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetectionSensitivity"`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitivemediadetectionsensitivity_enum"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetection"`);
await queryRunner.query(`DROP TYPE "public"."meta_sensitivemediadetection_enum"`);
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`);
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetectionSensitivity" "public"."meta_sensitiveimagedetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`);
await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetection_enum" AS ENUM('none', 'all', 'local', 'remote')`);
await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetection" "public"."meta_sensitiveimagedetection_enum" NOT NULL DEFAULT 'none'`);
}
}

View file

@ -0,0 +1,13 @@
export class driveCapacityOverrideMb1655813815729 {
name = 'driveCapacityOverrideMb1655813815729'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" ADD "driveCapacityOverrideMb" integer`);
await queryRunner.query(`COMMENT ON COLUMN "user"."driveCapacityOverrideMb" IS 'Overrides user drive capacity limit'`);
}
async down(queryRunner) {
await queryRunner.query(`COMMENT ON COLUMN "user"."driveCapacityOverrideMb" IS 'Overrides user drive capacity limit'`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "driveCapacityOverrideMb"`);
}
}

View file

@ -0,0 +1,17 @@
export class userIp1655918165614 {
name = 'userIp1655918165614'
async up(queryRunner) {
await queryRunner.query(`CREATE TABLE "user_ip" ("id" SERIAL NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "ip" character varying(128) NOT NULL, CONSTRAINT "PK_2c44ddfbf7c0464d028dcef325e" PRIMARY KEY ("id"))`);
await queryRunner.query(`CREATE INDEX "IDX_7f7f1c66f48e9a8e18a33bc515" ON "user_ip" ("userId") `);
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_361b500e06721013c124b7b6c5" ON "user_ip" ("userId", "ip") `);
await queryRunner.query(`ALTER TABLE "user_ip" ADD CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_ip" DROP CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150"`);
await queryRunner.query(`DROP INDEX "public"."IDX_361b500e06721013c124b7b6c5"`);
await queryRunner.query(`DROP INDEX "public"."IDX_7f7f1c66f48e9a8e18a33bc515"`);
await queryRunner.query(`DROP TABLE "user_ip"`);
}
}

View file

@ -0,0 +1,13 @@
export class fileIp1656122560740 {
name = 'fileIp1656122560740'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "drive_file" ADD "requestHeaders" jsonb DEFAULT '{}'`);
await queryRunner.query(`ALTER TABLE "drive_file" ADD "requestIp" character varying(128)`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "requestIp"`);
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "requestHeaders"`);
}
}

View file

@ -0,0 +1,33 @@
export class nsfwDetection51656251734807 {
name = 'nsfwDetection51656251734807'
async up(queryRunner) {
await queryRunner.query(`DROP INDEX "public"."IDX_fc2d74a6d7d8b11292a851d8f8"`);
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "forceIsSensitive"`);
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "predictedIsSensitive"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "forceIsSensitiveWhenPredicted"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "disallowUploadWhenPredictedAsPorn"`);
await queryRunner.query(`ALTER TABLE "drive_file" ADD "maybeSensitive" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."maybeSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`);
await queryRunner.query(`ALTER TABLE "drive_file" ADD "maybePorn" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "meta" ADD "setSensitiveFlagAutomatically" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "user_profile" ADD "autoSensitive" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`CREATE INDEX "IDX_3b33dff77bb64b23c88151d23e" ON "drive_file" ("maybeSensitive") `);
await queryRunner.query(`CREATE INDEX "IDX_8bdcd3dd2bddb78014999a16ce" ON "drive_file" ("maybePorn") `);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "public"."IDX_8bdcd3dd2bddb78014999a16ce"`);
await queryRunner.query(`DROP INDEX "public"."IDX_3b33dff77bb64b23c88151d23e"`);
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "autoSensitive"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "setSensitiveFlagAutomatically"`);
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "maybePorn"`);
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."maybeSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`);
await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "maybeSensitive"`);
await queryRunner.query(`ALTER TABLE "meta" ADD "disallowUploadWhenPredictedAsPorn" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "meta" ADD "forceIsSensitiveWhenPredicted" boolean NOT NULL DEFAULT true`);
await queryRunner.query(`ALTER TABLE "drive_file" ADD "predictedIsSensitive" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "drive_file" ADD "forceIsSensitive" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`CREATE INDEX "IDX_fc2d74a6d7d8b11292a851d8f8" ON "drive_file" ("predictedIsSensitive") `);
}
}

View file

@ -0,0 +1,13 @@
export class ip21656328812281 {
name = 'ip21656328812281'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_ip" DROP CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150"`);
await queryRunner.query(`ALTER TABLE "meta" ADD "enableIpLogging" boolean NOT NULL DEFAULT false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableIpLogging"`);
await queryRunner.query(`ALTER TABLE "user_ip" ADD CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
}
}

View file

@ -0,0 +1,11 @@
export class nsfwDetection61656408772602 {
name = 'nsfwDetection61656408772602'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "enableSensitiveMediaDetectionForVideos" boolean NOT NULL DEFAULT false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableSensitiveMediaDetectionForVideos"`);
}
}

View file

@ -0,0 +1,11 @@
export class userModerationNote1656772790599 {
name = 'userModerationNote1656772790599'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_profile" ADD "moderationNote" character varying(8192) NOT NULL DEFAULT ''`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "moderationNote"`);
}
}

View file

@ -0,0 +1,11 @@
export class activeEmailValidation1657346559800 {
name = 'activeEmailValidation1657346559800'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "enableActiveEmailValidation" boolean NOT NULL DEFAULT true`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableActiveEmailValidation"`);
}
}

View file

@ -0,0 +1,15 @@
export class turnstile1664694635394 {
name = 'turnstile1664694635394'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "enableTurnstile" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "meta" ADD "turnstileSiteKey" character varying(64)`);
await queryRunner.query(`ALTER TABLE "meta" ADD "turnstileSecretKey" character varying(64)`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "turnstileSecretKey"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "turnstileSiteKey"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableTurnstile"`);
}
}

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,8 @@
import { DataSource } from 'typeorm';
import config from './built/config/index.js';
import { entities } from './built/db/postgre.js';
import { loadConfig } from './built/config.js';
import { entities } from './built/postgre.js';
const config = loadConfig();
export default new DataSource({
type: 'postgres',

View file

@ -1,60 +1,69 @@
{
"main": "./index.js",
"private": true,
"type": "module",
"scripts": {
"build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json",
"watch": "node watch.mjs",
"lint": "eslint --quiet \"src/**/*.ts\"",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
"test": "npm run mocha"
"jest": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --runInBand",
"jest-and-coverage": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --coverage --forceExit --runInBand",
"jest-clear": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --clearCache",
"test": "npm run jest",
"test-and-coverage": "npm run jest-and-coverage"
},
"resolutions": {
"chokidar": "^3.3.1",
"lodash": "^4.17.21"
},
"optionalDependencies": {
"@tensorflow/tfjs-node": "4.0.0"
},
"dependencies": {
"@bull-board/koa": "3.11.1",
"@bull-board/koa": "4.3.1",
"@discordapp/twemoji": "14.0.2",
"@elastic/elasticsearch": "7.11.0",
"@koa/cors": "3.1.0",
"@koa/multer": "3.0.0",
"@koa/router": "9.0.1",
"@peertube/http-signature": "1.6.0",
"@sinonjs/fake-timers": "9.1.2",
"@nestjs/common": "9.2.0",
"@nestjs/core": "9.2.0",
"@nestjs/testing": "9.2.0",
"@peertube/http-signature": "1.7.0",
"@sinonjs/fake-timers": "10.0.0",
"@syuilo/aiscript": "0.11.1",
"abort-controller": "3.0.0",
"ajv": "8.11.0",
"archiver": "5.3.1",
"autobind-decorator": "2.4.0",
"autwh": "0.1.0",
"aws-sdk": "2.1152.0",
"aws-sdk": "2.1253.0",
"bcryptjs": "2.4.3",
"blurhash": "1.1.5",
"bull": "4.8.3",
"cacheable-lookup": "6.0.4",
"bull": "4.10.1",
"cacheable-lookup": "6.1.0",
"cbor": "8.1.0",
"chalk": "5.0.1",
"chalk": "5.1.2",
"chalk-template": "0.4.0",
"chokidar": "3.5.3",
"cli-highlight": "2.1.11",
"color-convert": "2.0.1",
"content-disposition": "0.5.4",
"date-fns": "2.28.0",
"date-fns": "2.29.3",
"deep-email-validator": "0.1.21",
"escape-regexp": "0.0.1",
"feed": "4.2.2",
"file-type": "17.1.2",
"file-type": "18.0.0",
"fluent-ffmpeg": "2.1.2",
"got": "12.1.0",
"hpagent": "0.1.2",
"got": "12.5.2",
"hpagent": "1.2.0",
"ioredis": "4.28.5",
"ip-cidr": "3.0.10",
"is-svg": "4.3.2",
"js-yaml": "4.1.0",
"jsdom": "19.0.0",
"jsdom": "20.0.2",
"json5": "2.2.1",
"json5-loader": "4.0.1",
"jsonld": "6.0.0",
"jsrsasign": "10.5.24",
"jsonld": "8.1.0",
"jsrsasign": "10.6.0",
"koa": "2.13.4",
"koa-bodyparser": "4.3.0",
"koa-favicon": "2.1.0",
@ -64,76 +73,77 @@
"koa-send": "5.0.1",
"koa-slow": "2.1.0",
"koa-views": "7.0.2",
"mfm-js": "0.22.1",
"mfm-js": "0.23.0",
"mime-types": "2.1.35",
"misskey-js": "0.0.14",
"mocha": "10.0.0",
"ms": "3.0.0-canary.1",
"multer": "1.4.4",
"nested-property": "4.0.0",
"node-fetch": "3.2.6",
"nodemailer": "6.7.5",
"node-fetch": "3.3.0",
"nodemailer": "6.8.0",
"nsfwjs": "2.4.2",
"os-utils": "0.0.14",
"parse5": "6.0.1",
"pg": "8.7.3",
"private-ip": "2.3.3",
"parse5": "7.1.1",
"pg": "8.8.0",
"private-ip": "2.3.4",
"probe-image-size": "7.2.3",
"promise-limit": "2.7.0",
"pug": "3.0.2",
"punycode": "2.1.1",
"pureimage": "0.3.8",
"qrcode": "1.5.0",
"pureimage": "0.3.14",
"qrcode": "1.5.1",
"random-seed": "0.3.0",
"ratelimiter": "3.4.1",
"re2": "1.17.4",
"redis": "3.1.2",
"re2": "1.17.7",
"redis-lock": "0.1.4",
"reflect-metadata": "0.1.13",
"rename": "1.0.4",
"require-all": "3.0.0",
"rndstr": "1.0.0",
"rss-parser": "3.12.0",
"rxjs": "7.5.7",
"s-age": "1.1.2",
"sanitize-html": "2.7.0",
"semver": "7.3.7",
"sanitize-html": "2.7.3",
"semver": "7.3.8",
"sharp": "0.29.3",
"speakeasy": "2.0.0",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
"style-loader": "3.3.1",
"summaly": "2.6.0",
"summaly": "2.7.0",
"syslog-pro": "1.0.0",
"systeminformation": "5.11.16",
"systeminformation": "5.12.14",
"tinycolor2": "1.4.2",
"tmp": "0.2.1",
"ts-loader": "9.3.0",
"ts-node": "10.8.1",
"tsc-alias": "1.6.9",
"tsconfig-paths": "4.0.0",
"ts-loader": "9.4.1",
"ts-node": "10.9.1",
"tsc-alias": "1.7.1",
"tsconfig-paths": "4.1.0",
"twemoji-parser": "14.0.0",
"typeorm": "0.3.6",
"typeorm": "0.3.10",
"ulid": "2.3.0",
"unzipper": "0.10.11",
"uuid": "8.3.2",
"uuid": "9.0.0",
"web-push": "3.5.0",
"websocket": "1.0.34",
"ws": "8.8.0",
"ws": "8.11.0",
"xev": "3.0.2"
},
"devDependencies": {
"@redocly/openapi-core": "1.0.0-beta.97",
"@types/semver": "7.3.9",
"@redocly/openapi-core": "1.0.0-beta.112",
"@swc/core": "1.3.15",
"@swc/jest": "0.2.23",
"@types/archiver": "5.3.1",
"@types/bcryptjs": "2.4.2",
"@types/bull": "3.15.8",
"@types/bull": "4.10.0",
"@types/cbor": "6.0.0",
"@types/escape-regexp": "0.0.1",
"@types/fluent-ffmpeg": "2.1.20",
"@types/is-url": "1.2.30",
"@types/jest": "29.2.2",
"@types/js-yaml": "4.0.5",
"@types/jsdom": "16.2.14",
"@types/jsonld": "1.5.6",
"@types/jsrsasign": "10.5.1",
"@types/koa": "2.13.4",
"@types/koa-bodyparser": "4.3.7",
"@types/jsdom": "20.0.1",
"@types/jsonld": "1.5.7",
"@types/jsrsasign": "10.5.4",
"@types/koa": "2.13.5",
"@types/koa-bodyparser": "4.3.8",
"@types/koa-cors": "0.0.2",
"@types/koa-favicon": "2.0.21",
"@types/koa-logger": "3.1.2",
@ -143,35 +153,38 @@
"@types/koa__cors": "3.1.1",
"@types/koa__multer": "2.0.4",
"@types/koa__router": "8.0.11",
"@types/mocha": "9.1.1",
"@types/node": "17.0.41",
"@types/mime-types": "2.1.1",
"@types/node": "18.11.9",
"@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.4",
"@types/nodemailer": "6.4.6",
"@types/oauth": "0.9.1",
"@types/parse5": "6.0.3",
"@types/pg": "8.6.5",
"@types/pug": "2.0.6",
"@types/punycode": "2.1.0",
"@types/qrcode": "1.4.2",
"@types/qrcode": "1.5.0",
"@types/random-seed": "0.3.3",
"@types/ratelimiter": "3.4.3",
"@types/ratelimiter": "3.4.4",
"@types/redis": "4.0.11",
"@types/rename": "1.0.4",
"@types/sanitize-html": "2.6.2",
"@types/sharp": "0.30.2",
"@types/semver": "7.3.13",
"@types/sharp": "0.31.0",
"@types/sinonjs__fake-timers": "8.1.2",
"@types/speakeasy": "2.0.7",
"@types/tinycolor2": "1.4.3",
"@types/tmp": "0.2.3",
"@types/unzipper": "0.10.5",
"@types/uuid": "8.3.4",
"@types/web-push": "3.3.2",
"@types/websocket": "1.0.5",
"@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "5.27.1",
"@typescript-eslint/parser": "5.27.1",
"typescript": "4.7.3",
"eslint": "8.17.0",
"eslint-plugin-import": "2.26.0",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@typescript-eslint/parser": "5.42.1",
"cross-env": "7.0.3",
"execa": "6.1.0"
"eslint": "8.27.0",
"eslint-plugin-import": "2.26.0",
"execa": "6.1.0",
"jest": "29.3.1",
"typescript": "4.8.4"
}
}

View file

@ -1,5 +1,5 @@
declare module '@peertube/http-signature' {
import { IncomingMessage, ClientRequest } from 'node:http';
import type { IncomingMessage, ClientRequest } from 'node:http';
interface ISignature {
keyId: string;

View file

@ -1,5 +1,5 @@
declare module 'koa-json-body' {
import { Middleware } from 'koa';
import type { Middleware } from 'koa';
interface IKoaJsonBodyOptions {
strict: boolean;

View file

@ -1,5 +1,5 @@
declare module 'koa-slow' {
import { Middleware } from 'koa';
import type { Middleware } from 'koa';
interface ISlowOptions {
url?: RegExp;

View file

@ -1,5 +1,5 @@
declare module 'probe-image-size' {
import { ReadStream } from 'node:fs';
import type { ReadStream } from 'node:fs';
type ProbeOptions = {
retries: 1;

View file

@ -0,0 +1,13 @@
import { Module } from '@nestjs/common';
import { ServerModule } from '@/server/ServerModule.js';
import { GlobalModule } from '@/GlobalModule.js';
import { QueueProcessorModule } from '@/queue/QueueProcessorModule.js';
@Module({
imports: [
GlobalModule,
ServerModule,
QueueProcessorModule,
],
})
export class AppModule {}

View file

@ -0,0 +1,66 @@
import { Global, Inject, Module } from '@nestjs/common';
import Redis from 'ioredis';
import { DataSource } from 'typeorm';
import { createRedisConnection } from '@/redis.js';
import { DI } from './di-symbols.js';
import { loadConfig } from './config.js';
import { createPostgreDataSource } from './postgre.js';
import { RepositoryModule } from './RepositoryModule.js';
import type { Provider, OnApplicationShutdown } from '@nestjs/common';
const config = loadConfig();
const $config: Provider = {
provide: DI.config,
useValue: config,
};
const $db: Provider = {
provide: DI.db,
useFactory: async (config) => {
const db = createPostgreDataSource(config);
return await db.initialize();
},
inject: [DI.config],
};
const $redis: Provider = {
provide: DI.redis,
useFactory: (config) => {
const redisClient = createRedisConnection(config);
return redisClient;
},
inject: [DI.config],
};
const $redisSubscriber: Provider = {
provide: DI.redisSubscriber,
useFactory: (config) => {
const redisSubscriber = createRedisConnection(config);
redisSubscriber.subscribe(config.host);
return redisSubscriber;
},
inject: [DI.config],
};
@Global()
@Module({
imports: [RepositoryModule],
providers: [$config, $db, $redis, $redisSubscriber],
exports: [$config, $db, $redis, $redisSubscriber, RepositoryModule],
})
export class GlobalModule implements OnApplicationShutdown {
constructor(
@Inject(DI.db) private db: DataSource,
@Inject(DI.redis) private redisClient: Redis.Redis,
@Inject(DI.redisSubscriber) private redisSubscriber: Redis.Redis,
) {}
async onApplicationShutdown(signal: string): Promise<void> {
await Promise.all([
this.db.destroy(),
this.redisClient.disconnect(),
this.redisSubscriber.disconnect(),
]);
}
}

View file

@ -0,0 +1,519 @@
import { Module } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import { User, Note, Announcement, AnnouncementRead, App, NoteFavorite, NoteThreadMuting, NoteReaction, NoteUnread, Notification, Poll, PollVote, UserProfile, UserKeypair, UserPending, AttestationChallenge, UserSecurityKey, UserPublickey, UserList, UserListJoining, UserGroup, UserGroupJoining, UserGroupInvitation, UserNotePining, UserIp, UsedUsername, Following, FollowRequest, Instance, Emoji, DriveFile, DriveFolder, Meta, Muting, Blocking, SwSubscription, Hashtag, AbuseUserReport, RegistrationTicket, AuthSession, AccessToken, Signin, MessagingMessage, Page, PageLike, GalleryPost, GalleryLike, ModerationLog, Clip, ClipNote, Antenna, AntennaNote, PromoNote, PromoRead, Relay, MutedNote, Channel, ChannelFollowing, ChannelNotePining, RegistryItem, Webhook, Ad, PasswordResetRequest } from './models/index.js';
import type { DataSource } from 'typeorm';
import type { Provider } from '@nestjs/common';
const $usersRepository: Provider = {
provide: DI.usersRepository,
useFactory: (db: DataSource) => db.getRepository(User),
inject: [DI.db],
};
const $notesRepository: Provider = {
provide: DI.notesRepository,
useFactory: (db: DataSource) => db.getRepository(Note),
inject: [DI.db],
};
const $announcementsRepository: Provider = {
provide: DI.announcementsRepository,
useFactory: (db: DataSource) => db.getRepository(Announcement),
inject: [DI.db],
};
const $announcementReadsRepository: Provider = {
provide: DI.announcementReadsRepository,
useFactory: (db: DataSource) => db.getRepository(AnnouncementRead),
inject: [DI.db],
};
const $appsRepository: Provider = {
provide: DI.appsRepository,
useFactory: (db: DataSource) => db.getRepository(App),
inject: [DI.db],
};
const $noteFavoritesRepository: Provider = {
provide: DI.noteFavoritesRepository,
useFactory: (db: DataSource) => db.getRepository(NoteFavorite),
inject: [DI.db],
};
const $noteThreadMutingsRepository: Provider = {
provide: DI.noteThreadMutingsRepository,
useFactory: (db: DataSource) => db.getRepository(NoteThreadMuting),
inject: [DI.db],
};
const $noteReactionsRepository: Provider = {
provide: DI.noteReactionsRepository,
useFactory: (db: DataSource) => db.getRepository(NoteReaction),
inject: [DI.db],
};
const $noteUnreadsRepository: Provider = {
provide: DI.noteUnreadsRepository,
useFactory: (db: DataSource) => db.getRepository(NoteUnread),
inject: [DI.db],
};
const $pollsRepository: Provider = {
provide: DI.pollsRepository,
useFactory: (db: DataSource) => db.getRepository(Poll),
inject: [DI.db],
};
const $pollVotesRepository: Provider = {
provide: DI.pollVotesRepository,
useFactory: (db: DataSource) => db.getRepository(PollVote),
inject: [DI.db],
};
const $userProfilesRepository: Provider = {
provide: DI.userProfilesRepository,
useFactory: (db: DataSource) => db.getRepository(UserProfile),
inject: [DI.db],
};
const $userKeypairsRepository: Provider = {
provide: DI.userKeypairsRepository,
useFactory: (db: DataSource) => db.getRepository(UserKeypair),
inject: [DI.db],
};
const $userPendingsRepository: Provider = {
provide: DI.userPendingsRepository,
useFactory: (db: DataSource) => db.getRepository(UserPending),
inject: [DI.db],
};
const $attestationChallengesRepository: Provider = {
provide: DI.attestationChallengesRepository,
useFactory: (db: DataSource) => db.getRepository(AttestationChallenge),
inject: [DI.db],
};
const $userSecurityKeysRepository: Provider = {
provide: DI.userSecurityKeysRepository,
useFactory: (db: DataSource) => db.getRepository(UserSecurityKey),
inject: [DI.db],
};
const $userPublickeysRepository: Provider = {
provide: DI.userPublickeysRepository,
useFactory: (db: DataSource) => db.getRepository(UserPublickey),
inject: [DI.db],
};
const $userListsRepository: Provider = {
provide: DI.userListsRepository,
useFactory: (db: DataSource) => db.getRepository(UserList),
inject: [DI.db],
};
const $userListJoiningsRepository: Provider = {
provide: DI.userListJoiningsRepository,
useFactory: (db: DataSource) => db.getRepository(UserListJoining),
inject: [DI.db],
};
const $userGroupsRepository: Provider = {
provide: DI.userGroupsRepository,
useFactory: (db: DataSource) => db.getRepository(UserGroup),
inject: [DI.db],
};
const $userGroupJoiningsRepository: Provider = {
provide: DI.userGroupJoiningsRepository,
useFactory: (db: DataSource) => db.getRepository(UserGroupJoining),
inject: [DI.db],
};
const $userGroupInvitationsRepository: Provider = {
provide: DI.userGroupInvitationsRepository,
useFactory: (db: DataSource) => db.getRepository(UserGroupInvitation),
inject: [DI.db],
};
const $userNotePiningsRepository: Provider = {
provide: DI.userNotePiningsRepository,
useFactory: (db: DataSource) => db.getRepository(UserNotePining),
inject: [DI.db],
};
const $userIpsRepository: Provider = {
provide: DI.userIpsRepository,
useFactory: (db: DataSource) => db.getRepository(UserIp),
inject: [DI.db],
};
const $usedUsernamesRepository: Provider = {
provide: DI.usedUsernamesRepository,
useFactory: (db: DataSource) => db.getRepository(UsedUsername),
inject: [DI.db],
};
const $followingsRepository: Provider = {
provide: DI.followingsRepository,
useFactory: (db: DataSource) => db.getRepository(Following),
inject: [DI.db],
};
const $followRequestsRepository: Provider = {
provide: DI.followRequestsRepository,
useFactory: (db: DataSource) => db.getRepository(FollowRequest),
inject: [DI.db],
};
const $instancesRepository: Provider = {
provide: DI.instancesRepository,
useFactory: (db: DataSource) => db.getRepository(Instance),
inject: [DI.db],
};
const $emojisRepository: Provider = {
provide: DI.emojisRepository,
useFactory: (db: DataSource) => db.getRepository(Emoji),
inject: [DI.db],
};
const $driveFilesRepository: Provider = {
provide: DI.driveFilesRepository,
useFactory: (db: DataSource) => db.getRepository(DriveFile),
inject: [DI.db],
};
const $driveFoldersRepository: Provider = {
provide: DI.driveFoldersRepository,
useFactory: (db: DataSource) => db.getRepository(DriveFolder),
inject: [DI.db],
};
const $notificationsRepository: Provider = {
provide: DI.notificationsRepository,
useFactory: (db: DataSource) => db.getRepository(Notification),
inject: [DI.db],
};
const $metasRepository: Provider = {
provide: DI.metasRepository,
useFactory: (db: DataSource) => db.getRepository(Meta),
inject: [DI.db],
};
const $mutingsRepository: Provider = {
provide: DI.mutingsRepository,
useFactory: (db: DataSource) => db.getRepository(Muting),
inject: [DI.db],
};
const $blockingsRepository: Provider = {
provide: DI.blockingsRepository,
useFactory: (db: DataSource) => db.getRepository(Blocking),
inject: [DI.db],
};
const $swSubscriptionsRepository: Provider = {
provide: DI.swSubscriptionsRepository,
useFactory: (db: DataSource) => db.getRepository(SwSubscription),
inject: [DI.db],
};
const $hashtagsRepository: Provider = {
provide: DI.hashtagsRepository,
useFactory: (db: DataSource) => db.getRepository(Hashtag),
inject: [DI.db],
};
const $abuseUserReportsRepository: Provider = {
provide: DI.abuseUserReportsRepository,
useFactory: (db: DataSource) => db.getRepository(AbuseUserReport),
inject: [DI.db],
};
const $registrationTicketsRepository: Provider = {
provide: DI.registrationTicketsRepository,
useFactory: (db: DataSource) => db.getRepository(RegistrationTicket),
inject: [DI.db],
};
const $authSessionsRepository: Provider = {
provide: DI.authSessionsRepository,
useFactory: (db: DataSource) => db.getRepository(AuthSession),
inject: [DI.db],
};
const $accessTokensRepository: Provider = {
provide: DI.accessTokensRepository,
useFactory: (db: DataSource) => db.getRepository(AccessToken),
inject: [DI.db],
};
const $signinsRepository: Provider = {
provide: DI.signinsRepository,
useFactory: (db: DataSource) => db.getRepository(Signin),
inject: [DI.db],
};
const $messagingMessagesRepository: Provider = {
provide: DI.messagingMessagesRepository,
useFactory: (db: DataSource) => db.getRepository(MessagingMessage),
inject: [DI.db],
};
const $pagesRepository: Provider = {
provide: DI.pagesRepository,
useFactory: (db: DataSource) => db.getRepository(Page),
inject: [DI.db],
};
const $pageLikesRepository: Provider = {
provide: DI.pageLikesRepository,
useFactory: (db: DataSource) => db.getRepository(PageLike),
inject: [DI.db],
};
const $galleryPostsRepository: Provider = {
provide: DI.galleryPostsRepository,
useFactory: (db: DataSource) => db.getRepository(GalleryPost),
inject: [DI.db],
};
const $galleryLikesRepository: Provider = {
provide: DI.galleryLikesRepository,
useFactory: (db: DataSource) => db.getRepository(GalleryLike),
inject: [DI.db],
};
const $moderationLogsRepository: Provider = {
provide: DI.moderationLogsRepository,
useFactory: (db: DataSource) => db.getRepository(ModerationLog),
inject: [DI.db],
};
const $clipsRepository: Provider = {
provide: DI.clipsRepository,
useFactory: (db: DataSource) => db.getRepository(Clip),
inject: [DI.db],
};
const $clipNotesRepository: Provider = {
provide: DI.clipNotesRepository,
useFactory: (db: DataSource) => db.getRepository(ClipNote),
inject: [DI.db],
};
const $antennasRepository: Provider = {
provide: DI.antennasRepository,
useFactory: (db: DataSource) => db.getRepository(Antenna),
inject: [DI.db],
};
const $antennaNotesRepository: Provider = {
provide: DI.antennaNotesRepository,
useFactory: (db: DataSource) => db.getRepository(AntennaNote),
inject: [DI.db],
};
const $promoNotesRepository: Provider = {
provide: DI.promoNotesRepository,
useFactory: (db: DataSource) => db.getRepository(PromoNote),
inject: [DI.db],
};
const $promoReadsRepository: Provider = {
provide: DI.promoReadsRepository,
useFactory: (db: DataSource) => db.getRepository(PromoRead),
inject: [DI.db],
};
const $relaysRepository: Provider = {
provide: DI.relaysRepository,
useFactory: (db: DataSource) => db.getRepository(Relay),
inject: [DI.db],
};
const $mutedNotesRepository: Provider = {
provide: DI.mutedNotesRepository,
useFactory: (db: DataSource) => db.getRepository(MutedNote),
inject: [DI.db],
};
const $channelsRepository: Provider = {
provide: DI.channelsRepository,
useFactory: (db: DataSource) => db.getRepository(Channel),
inject: [DI.db],
};
const $channelFollowingsRepository: Provider = {
provide: DI.channelFollowingsRepository,
useFactory: (db: DataSource) => db.getRepository(ChannelFollowing),
inject: [DI.db],
};
const $channelNotePiningsRepository: Provider = {
provide: DI.channelNotePiningsRepository,
useFactory: (db: DataSource) => db.getRepository(ChannelNotePining),
inject: [DI.db],
};
const $registryItemsRepository: Provider = {
provide: DI.registryItemsRepository,
useFactory: (db: DataSource) => db.getRepository(RegistryItem),
inject: [DI.db],
};
const $webhooksRepository: Provider = {
provide: DI.webhooksRepository,
useFactory: (db: DataSource) => db.getRepository(Webhook),
inject: [DI.db],
};
const $adsRepository: Provider = {
provide: DI.adsRepository,
useFactory: (db: DataSource) => db.getRepository(Ad),
inject: [DI.db],
};
const $passwordResetRequestsRepository: Provider = {
provide: DI.passwordResetRequestsRepository,
useFactory: (db: DataSource) => db.getRepository(PasswordResetRequest),
inject: [DI.db],
};
@Module({
imports: [
],
providers: [
$usersRepository,
$notesRepository,
$announcementsRepository,
$announcementReadsRepository,
$appsRepository,
$noteFavoritesRepository,
$noteThreadMutingsRepository,
$noteReactionsRepository,
$noteUnreadsRepository,
$pollsRepository,
$pollVotesRepository,
$userProfilesRepository,
$userKeypairsRepository,
$userPendingsRepository,
$attestationChallengesRepository,
$userSecurityKeysRepository,
$userPublickeysRepository,
$userListsRepository,
$userListJoiningsRepository,
$userGroupsRepository,
$userGroupJoiningsRepository,
$userGroupInvitationsRepository,
$userNotePiningsRepository,
$userIpsRepository,
$usedUsernamesRepository,
$followingsRepository,
$followRequestsRepository,
$instancesRepository,
$emojisRepository,
$driveFilesRepository,
$driveFoldersRepository,
$notificationsRepository,
$metasRepository,
$mutingsRepository,
$blockingsRepository,
$swSubscriptionsRepository,
$hashtagsRepository,
$abuseUserReportsRepository,
$registrationTicketsRepository,
$authSessionsRepository,
$accessTokensRepository,
$signinsRepository,
$messagingMessagesRepository,
$pagesRepository,
$pageLikesRepository,
$galleryPostsRepository,
$galleryLikesRepository,
$moderationLogsRepository,
$clipsRepository,
$clipNotesRepository,
$antennasRepository,
$antennaNotesRepository,
$promoNotesRepository,
$promoReadsRepository,
$relaysRepository,
$mutedNotesRepository,
$channelsRepository,
$channelFollowingsRepository,
$channelNotePiningsRepository,
$registryItemsRepository,
$webhooksRepository,
$adsRepository,
$passwordResetRequestsRepository,
],
exports: [
$usersRepository,
$notesRepository,
$announcementsRepository,
$announcementReadsRepository,
$appsRepository,
$noteFavoritesRepository,
$noteThreadMutingsRepository,
$noteReactionsRepository,
$noteUnreadsRepository,
$pollsRepository,
$pollVotesRepository,
$userProfilesRepository,
$userKeypairsRepository,
$userPendingsRepository,
$attestationChallengesRepository,
$userSecurityKeysRepository,
$userPublickeysRepository,
$userListsRepository,
$userListJoiningsRepository,
$userGroupsRepository,
$userGroupJoiningsRepository,
$userGroupInvitationsRepository,
$userNotePiningsRepository,
$userIpsRepository,
$usedUsernamesRepository,
$followingsRepository,
$followRequestsRepository,
$instancesRepository,
$emojisRepository,
$driveFilesRepository,
$driveFoldersRepository,
$notificationsRepository,
$metasRepository,
$mutingsRepository,
$blockingsRepository,
$swSubscriptionsRepository,
$hashtagsRepository,
$abuseUserReportsRepository,
$registrationTicketsRepository,
$authSessionsRepository,
$accessTokensRepository,
$signinsRepository,
$messagingMessagesRepository,
$pagesRepository,
$pageLikesRepository,
$galleryPostsRepository,
$galleryLikesRepository,
$moderationLogsRepository,
$clipsRepository,
$clipNotesRepository,
$antennasRepository,
$antennaNotesRepository,
$promoNotesRepository,
$promoReadsRepository,
$relaysRepository,
$mutedNotesRepository,
$channelsRepository,
$channelFollowingsRepository,
$channelNotePiningsRepository,
$registryItemsRepository,
$webhooksRepository,
$adsRepository,
$passwordResetRequestsRepository,
],
})
export class RepositoryModule {}

View file

@ -1,44 +1,28 @@
/**
* Misskey Entry Point!
*/
import cluster from 'node:cluster';
import { EventEmitter } from 'node:events';
import chalk from 'chalk';
import Xev from 'xev';
import Logger from '@/services/logger.js';
import Logger from '@/logger.js';
import { envOption } from '../env.js';
// for typeorm
import 'reflect-metadata';
import { masterMain } from './master.js';
import { workerMain } from './worker.js';
import 'reflect-metadata';
process.title = `Misskey (${cluster.isPrimary ? 'master' : 'worker'})`;
Error.stackTraceLimit = Infinity;
EventEmitter.defaultMaxListeners = 128;
const logger = new Logger('core', 'cyan');
const clusterLogger = logger.createSubLogger('cluster', 'orange', false);
const ev = new Xev();
/**
* Init process
*/
export default async function() {
process.title = `Misskey (${cluster.isPrimary ? 'master' : 'worker'})`;
if (cluster.isPrimary || envOption.disableClustering) {
await masterMain();
if (cluster.isPrimary) {
ev.mount();
}
}
if (cluster.isWorker || envOption.disableClustering) {
await workerMain();
}
// ユニットテスト時にMisskeyが子プロセスで起動された時のため
// それ以外のときは process.send は使えないので弾く
if (process.send) {
process.send('ok');
}
}
//#region Events
// Listen new workers
@ -77,3 +61,21 @@ process.on('exit', code => {
});
//#endregion
if (cluster.isPrimary || envOption.disableClustering) {
await masterMain();
if (cluster.isPrimary) {
ev.mount();
}
}
if (cluster.isWorker || envOption.disableClustering) {
await workerMain();
}
// ユニットテスト時にMisskeyが子プロセスで起動された時のため
// それ以外のときは process.send は使えないので弾く
if (process.send) {
process.send('ok');
}

View file

@ -6,14 +6,17 @@ import cluster from 'node:cluster';
import chalk from 'chalk';
import chalkTemplate from 'chalk-template';
import semver from 'semver';
import Logger from '@/services/logger.js';
import loadConfig from '@/config/load.js';
import { Config } from '@/config/types.js';
import { lessThan } from '@/prelude/array.js';
import { envOption } from '../env.js';
import { NestFactory } from '@nestjs/core';
import Logger from '@/logger.js';
import { loadConfig } from '@/config.js';
import type { Config } from '@/config.js';
import { lessThan } from '@/misc/prelude/array.js';
import { showMachineInfo } from '@/misc/show-machine-info.js';
import { db, initDb } from '../db/postgre.js';
import { DaemonModule } from '@/daemons/DaemonModule.js';
import { JanitorService } from '@/daemons/JanitorService.js';
import { QueueStatsService } from '@/daemons/QueueStatsService.js';
import { ServerStatsService } from '@/daemons/ServerStatsService.js';
import { envOption } from '../env.js';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
@ -60,7 +63,7 @@ export async function masterMain() {
await showMachineInfo(bootLogger);
showNodejsVersion();
config = loadConfigBoot();
await connectDb();
//await connectDb();
} catch (e) {
bootLogger.error('Fatal error occurred during initialization', null, true);
process.exit(1);
@ -75,9 +78,11 @@ export async function masterMain() {
bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, null, true);
if (!envOption.noDaemons) {
import('../daemons/server-stats.js').then(x => x.default());
import('../daemons/queue-stats.js').then(x => x.default());
import('../daemons/janitor.js').then(x => x.default());
const daemons = await NestFactory.createApplicationContext(DaemonModule);
daemons.enableShutdownHooks();
daemons.get(JanitorService).start();
daemons.get(QueueStatsService).start();
daemons.get(ServerStatsService).start();
}
}
@ -114,8 +119,7 @@ function loadConfigBoot(): Config {
if (typeof exception === 'string') {
configLogger.error(exception);
process.exit(1);
}
if (exception.code === 'ENOENT') {
} else if ((exception as any).code === 'ENOENT') {
configLogger.error('Configuration file not found', null, true);
process.exit(1);
}
@ -127,6 +131,7 @@ function loadConfigBoot(): Config {
return config;
}
/*
async function connectDb(): Promise<void> {
const dbLogger = bootLogger.createSubLogger('db');
@ -136,14 +141,15 @@ async function connectDb(): Promise<void> {
await initDb();
const v = await db.query('SHOW server_version').then(x => x[0].server_version);
dbLogger.succ(`Connected: v${v}`);
} catch (e) {
} catch (err) {
dbLogger.error('Cannot connect', null, true);
dbLogger.error(e);
dbLogger.error(err);
process.exit(1);
}
}
*/
async function spawnWorkers(limit: number = 1) {
async function spawnWorkers(limit = 1) {
const workers = Math.min(limit, os.cpus().length);
bootLogger.info(`Starting ${workers} worker${workers === 1 ? '' : 's'}...`);
await Promise.all([...Array(workers)].map(spawnWorker));
@ -155,7 +161,7 @@ function spawnWorker(): Promise<void> {
const worker = cluster.fork();
worker.on('message', message => {
if (message === 'listenFailed') {
bootLogger.error(`The server Listen failed due to the previous error.`);
bootLogger.error('The server Listen failed due to the previous error.');
process.exit(1);
}
if (message !== 'ready') return;

View file

@ -1,17 +1,29 @@
import cluster from 'node:cluster';
import { initDb } from '../db/postgre.js';
import { NestFactory } from '@nestjs/core';
import { envOption } from '@/env.js';
import { ChartManagementService } from '@/core/chart/ChartManagementService.js';
import { ServerService } from '@/server/ServerService.js';
import { QueueProcessorService } from '@/queue/QueueProcessorService.js';
import { AppModule } from '../AppModule.js';
/**
* Init worker process
*/
export async function workerMain() {
await initDb();
const app = await NestFactory.createApplicationContext(AppModule);
app.enableShutdownHooks();
// start server
await import('../server/index.js').then(x => x.default());
const serverService = app.get(ServerService);
serverService.launch();
// start job queue
import('../queue/index.js').then(x => x.default());
if (!envOption.onlyServer) {
const queueProcessorService = app.get(QueueProcessorService);
queueProcessorService.start();
}
app.get(ChartManagementService).run();
if (cluster.isWorker) {
// Send a 'ready' message to parent process

View file

@ -0,0 +1,149 @@
/**
* Config loader
*/
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as yaml from 'js-yaml';
/**
*
*/
export type Source = {
repository_url?: string;
feedback_url?: string;
url: string;
port: number;
disableHsts?: boolean;
db: {
host: string;
port: number;
db: string;
user: string;
pass: string;
disableCache?: boolean;
extra?: { [x: string]: string };
};
redis: {
host: string;
port: number;
family?: number;
pass: string;
db?: number;
prefix?: string;
};
elasticsearch: {
host: string;
port: number;
ssl?: boolean;
user?: string;
pass?: string;
index?: string;
};
proxy?: string;
proxySmtp?: string;
proxyBypassHosts?: string[];
allowedPrivateNetworks?: string[];
maxFileSize?: number;
accesslog?: string;
clusterLimit?: number;
id: string;
outgoingAddressFamily?: 'ipv4' | 'ipv6' | 'dual';
deliverJobConcurrency?: number;
inboxJobConcurrency?: number;
deliverJobPerSec?: number;
inboxJobPerSec?: number;
deliverJobMaxAttempts?: number;
inboxJobMaxAttempts?: number;
syslog: {
host: string;
port: number;
};
mediaProxy?: string;
proxyRemoteFiles?: boolean;
signToActivityPubGet?: boolean;
};
/**
* Misskeyが自動的に()
*/
export type Mixin = {
version: string;
host: string;
hostname: string;
scheme: string;
wsScheme: string;
apiUrl: string;
wsUrl: string;
authUrl: string;
driveUrl: string;
userAgent: string;
clientEntry: string;
};
export type Config = Source & Mixin;
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
/**
* Path of configuration directory
*/
const dir = `${_dirname}/../../../.config`;
/**
* Path of configuration file
*/
const path = process.env.NODE_ENV === 'test'
? `${dir}/test.yml`
: `${dir}/default.yml`;
export function loadConfig() {
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8'));
const clientManifest = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/_client_dist_/manifest.json`, 'utf-8'));
const config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source;
const mixin = {} as Mixin;
const url = tryCreateUrl(config.url);
config.url = url.origin;
config.port = config.port ?? parseInt(process.env.PORT ?? '', 10);
mixin.version = meta.version;
mixin.host = url.host;
mixin.hostname = url.hostname;
mixin.scheme = url.protocol.replace(/:$/, '');
mixin.wsScheme = mixin.scheme.replace('http', 'ws');
mixin.wsUrl = `${mixin.wsScheme}://${mixin.host}`;
mixin.apiUrl = `${mixin.scheme}://${mixin.host}/api`;
mixin.authUrl = `${mixin.scheme}://${mixin.host}/auth`;
mixin.driveUrl = `${mixin.scheme}://${mixin.host}/files`;
mixin.userAgent = `Misskey/${meta.version} (${config.url})`;
mixin.clientEntry = clientManifest['src/init.ts'];
if (!config.redis.prefix) config.redis.prefix = mixin.host;
return Object.assign(config, mixin);
}
function tryCreateUrl(url: string) {
try {
return new URL(url);
} catch (e) {
throw `url="${url}" is not a valid URL.`;
}
}

View file

@ -1,3 +0,0 @@
import load from './load.js';
export default load();

View file

@ -1,62 +0,0 @@
/**
* Config loader
*/
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as yaml from 'js-yaml';
import { Source, Mixin } from './types.js';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
/**
* Path of configuration directory
*/
const dir = `${_dirname}/../../../../.config`;
/**
* Path of configuration file
*/
const path = process.env.NODE_ENV === 'test'
? `${dir}/test.yml`
: `${dir}/default.yml`;
export default function load() {
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../../built/meta.json`, 'utf-8'));
const clientManifest = JSON.parse(fs.readFileSync(`${_dirname}/../../../../built/_client_dist_/manifest.json`, 'utf-8'));
const config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source;
const mixin = {} as Mixin;
const url = tryCreateUrl(config.url);
config.url = url.origin;
config.port = config.port || parseInt(process.env.PORT || '', 10);
mixin.version = meta.version;
mixin.host = url.host;
mixin.hostname = url.hostname;
mixin.scheme = url.protocol.replace(/:$/, '');
mixin.wsScheme = mixin.scheme.replace('http', 'ws');
mixin.wsUrl = `${mixin.wsScheme}://${mixin.host}`;
mixin.apiUrl = `${mixin.scheme}://${mixin.host}/api`;
mixin.authUrl = `${mixin.scheme}://${mixin.host}/auth`;
mixin.driveUrl = `${mixin.scheme}://${mixin.host}/files`;
mixin.userAgent = `Misskey/${meta.version} (${config.url})`;
mixin.clientEntry = clientManifest['src/init.ts'];
if (!config.redis.prefix) config.redis.prefix = mixin.host;
return Object.assign(config, mixin);
}
function tryCreateUrl(url: string) {
try {
return new URL(url);
} catch (e) {
throw `url="${url}" is not a valid URL.`;
}
}

View file

@ -1,86 +0,0 @@
/**
*
*/
export type Source = {
repository_url?: string;
feedback_url?: string;
url: string;
port: number;
disableHsts?: boolean;
db: {
host: string;
port: number;
db: string;
user: string;
pass: string;
disableCache?: boolean;
extra?: { [x: string]: string };
};
redis: {
host: string;
port: number;
pass: string;
db?: number;
prefix?: string;
};
elasticsearch: {
host: string;
port: number;
ssl?: boolean;
user?: string;
pass?: string;
index?: string;
};
proxy?: string;
proxySmtp?: string;
proxyBypassHosts?: string[];
allowedPrivateNetworks?: string[];
maxFileSize?: number;
accesslog?: string;
clusterLimit?: number;
id: string;
outgoingAddressFamily?: 'ipv4' | 'ipv6' | 'dual';
deliverJobConcurrency?: number;
inboxJobConcurrency?: number;
deliverJobPerSec?: number;
inboxJobPerSec?: number;
deliverJobMaxAttempts?: number;
inboxJobMaxAttempts?: number;
syslog: {
host: string;
port: number;
};
mediaProxy?: string;
proxyRemoteFiles?: boolean;
signToActivityPubGet?: boolean;
};
/**
* Misskeyが自動的に()
*/
export type Mixin = {
version: string;
host: string;
hostname: string;
scheme: string;
wsScheme: string;
apiUrl: string;
wsUrl: string;
authUrl: string;
driveUrl: string;
userAgent: string;
clientEntry: string;
};
export type Config = Source & Mixin;

View file

@ -0,0 +1,38 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import type { User } from '@/models/entities/User.js';
import { ApRendererService } from '@/core/remote/activitypub/ApRendererService.js';
import { RelayService } from '@/core/RelayService.js';
import { ApDeliverManagerService } from '@/core/remote/activitypub/ApDeliverManagerService.js';
import { UserEntityService } from './entities/UserEntityService.js';
@Injectable()
export class AccountUpdateService {
constructor(
@Inject(DI.config)
private config: Config,
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private userEntityService: UserEntityService,
private apRendererService: ApRendererService,
private apDeliverManagerService: ApDeliverManagerService,
private relayService: RelayService,
) {
}
public async publishToFollowers(userId: User['id']) {
const user = await this.usersRepository.findOneBy({ id: userId });
if (user == null) throw new Error('user not found');
// フォロワーがリモートユーザーかつ投稿者がローカルユーザーならUpdateを配信
if (this.userEntityService.isLocalUser(user)) {
const content = this.apRendererService.renderActivity(this.apRendererService.renderUpdate(await this.apRendererService.renderPerson(user), user));
this.apDeliverManagerService.deliverToFollowers(user, content);
this.relayService.deliverToRelays(user, content);
}
}
}

View file

@ -0,0 +1,60 @@
import * as fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import { Inject, Injectable } from '@nestjs/common';
import * as nsfw from 'nsfwjs';
import si from 'systeminformation';
import type { Config } from '@/config.js';
import { DI } from '@/di-symbols.js';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
const REQUIRED_CPU_FLAGS = ['avx2', 'fma'];
let isSupportedCpu: undefined | boolean = undefined;
@Injectable()
export class AiService {
private model: nsfw.NSFWJS;
constructor(
@Inject(DI.config)
private config: Config,
) {
}
public async detectSensitive(path: string): Promise<nsfw.predictionType[] | null> {
try {
if (isSupportedCpu === undefined) {
const cpuFlags = await this.getCpuFlags();
isSupportedCpu = REQUIRED_CPU_FLAGS.every(required => cpuFlags.includes(required));
}
if (!isSupportedCpu) {
console.error('This CPU cannot use TensorFlow.');
return null;
}
const tf = await import('@tensorflow/tfjs-node');
if (this.model == null) this.model = await nsfw.load(`file://${_dirname}/../../nsfw-model/`, { size: 299 });
const buffer = await fs.promises.readFile(path);
const image = await tf.node.decodeImage(buffer, 3) as any;
try {
const predictions = await this.model.classify(image);
return predictions;
} finally {
image.dispose();
}
} catch (err) {
console.error(err);
return null;
}
}
private async getCpuFlags(): Promise<string[]> {
const str = await si.cpuFlags();
return str.split(/\s+/);
}
}

View file

@ -0,0 +1,228 @@
import { Inject, Injectable } from '@nestjs/common';
import Redis from 'ioredis';
import type { Antenna } from '@/models/entities/Antenna.js';
import type { Note } from '@/models/entities/Note.js';
import type { User } from '@/models/entities/User.js';
import { IdService } from '@/core/IdService.js';
import { isUserRelated } from '@/misc/is-user-related.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import * as Acct from '@/misc/acct.js';
import { Cache } from '@/misc/cache.js';
import type { Packed } from '@/misc/schema.js';
import { DI } from '@/di-symbols.js';
import type { MutingsRepository, BlockingsRepository, NotesRepository, AntennaNotesRepository, AntennasRepository, UserGroupJoiningsRepository, UserListJoiningsRepository } from '@/models/index.js';
import { UtilityService } from './UtilityService.js';
import type { OnApplicationShutdown } from '@nestjs/common';
@Injectable()
export class AntennaService implements OnApplicationShutdown {
private antennasFetched: boolean;
private antennas: Antenna[];
private blockingCache: Cache<User['id'][]>;
constructor(
@Inject(DI.redisSubscriber)
private redisSubscriber: Redis.Redis,
@Inject(DI.mutingsRepository)
private mutingsRepository: MutingsRepository,
@Inject(DI.blockingsRepository)
private blockingsRepository: BlockingsRepository,
@Inject(DI.notesRepository)
private notesRepository: NotesRepository,
@Inject(DI.antennaNotesRepository)
private antennaNotesRepository: AntennaNotesRepository,
@Inject(DI.antennasRepository)
private antennasRepository: AntennasRepository,
@Inject(DI.userGroupJoiningsRepository)
private userGroupJoiningsRepository: UserGroupJoiningsRepository,
@Inject(DI.userListJoiningsRepository)
private userListJoiningsRepository: UserListJoiningsRepository,
private utilityService: UtilityService,
private idService: IdService,
private globalEventServie: GlobalEventService,
) {
this.antennasFetched = false;
this.antennas = [];
this.blockingCache = new Cache<User['id'][]>(1000 * 60 * 5);
this.redisSubscriber.on('message', this.onRedisMessage);
}
public onApplicationShutdown(signal?: string | undefined) {
this.redisSubscriber.off('message', this.onRedisMessage);
}
private async onRedisMessage(_: string, data: string): Promise<void> {
const obj = JSON.parse(data);
if (obj.channel === 'internal') {
const { type, body } = obj.message;
switch (type) {
case 'antennaCreated':
this.antennas.push(body);
break;
case 'antennaUpdated':
this.antennas[this.antennas.findIndex(a => a.id === body.id)] = body;
break;
case 'antennaDeleted':
this.antennas = this.antennas.filter(a => a.id !== body.id);
break;
default:
break;
}
}
}
public async addNoteToAntenna(antenna: Antenna, note: Note, noteUser: { id: User['id']; }): Promise<void> {
// 通知しない設定になっているか、自分自身の投稿なら既読にする
const read = !antenna.notify || (antenna.userId === noteUser.id);
this.antennaNotesRepository.insert({
id: this.idService.genId(),
antennaId: antenna.id,
noteId: note.id,
read: read,
});
this.globalEventServie.publishAntennaStream(antenna.id, 'note', note);
if (!read) {
const mutings = await this.mutingsRepository.find({
where: {
muterId: antenna.userId,
},
select: ['muteeId'],
});
// Copy
const _note: Note = {
...note,
};
if (note.replyId != null) {
_note.reply = await this.notesRepository.findOneByOrFail({ id: note.replyId });
}
if (note.renoteId != null) {
_note.renote = await this.notesRepository.findOneByOrFail({ id: note.renoteId });
}
if (isUserRelated(_note, new Set<string>(mutings.map(x => x.muteeId)))) {
return;
}
// 2秒経っても既読にならなかったら通知
setTimeout(async () => {
const unread = await this.antennaNotesRepository.findOneBy({ antennaId: antenna.id, read: false });
if (unread) {
this.globalEventServie.publishMainStream(antenna.userId, 'unreadAntenna', antenna);
}
}, 2000);
}
}
// NOTE: フォローしているユーザーのノート、リストのユーザーのノート、グループのユーザーのノート指定はパフォーマンス上の理由で無効になっている
/**
* noteUserFollowers / antennaUserFollowing
*/
public async checkHitAntenna(antenna: Antenna, note: (Note | Packed<'Note'>), noteUser: { id: User['id']; username: string; host: string | null; }, noteUserFollowers?: User['id'][], antennaUserFollowing?: User['id'][]): Promise<boolean> {
if (note.visibility === 'specified') return false;
// アンテナ作成者がノート作成者にブロックされていたらスキップ
const blockings = await this.blockingCache.fetch(noteUser.id, () => this.blockingsRepository.findBy({ blockerId: noteUser.id }).then(res => res.map(x => x.blockeeId)));
if (blockings.some(blocking => blocking === antenna.userId)) return false;
if (note.visibility === 'followers') {
if (noteUserFollowers && !noteUserFollowers.includes(antenna.userId)) return false;
if (antennaUserFollowing && !antennaUserFollowing.includes(note.userId)) return false;
}
if (!antenna.withReplies && note.replyId != null) return false;
if (antenna.src === 'home') {
if (noteUserFollowers && !noteUserFollowers.includes(antenna.userId)) return false;
if (antennaUserFollowing && !antennaUserFollowing.includes(note.userId)) return false;
} else if (antenna.src === 'list') {
const listUsers = (await this.userListJoiningsRepository.findBy({
userListId: antenna.userListId!,
})).map(x => x.userId);
if (!listUsers.includes(note.userId)) return false;
} else if (antenna.src === 'group') {
const joining = await this.userGroupJoiningsRepository.findOneByOrFail({ id: antenna.userGroupJoiningId! });
const groupUsers = (await this.userGroupJoiningsRepository.findBy({
userGroupId: joining.userGroupId,
})).map(x => x.userId);
if (!groupUsers.includes(note.userId)) return false;
} else if (antenna.src === 'users') {
const accts = antenna.users.map(x => {
const { username, host } = Acct.parse(x);
return this.utilityService.getFullApAccount(username, host).toLowerCase();
});
if (!accts.includes(this.utilityService.getFullApAccount(noteUser.username, noteUser.host).toLowerCase())) return false;
}
const keywords = antenna.keywords
// Clean up
.map(xs => xs.filter(x => x !== ''))
.filter(xs => xs.length > 0);
if (keywords.length > 0) {
if (note.text == null) return false;
const matched = keywords.some(and =>
and.every(keyword =>
antenna.caseSensitive
? note.text!.includes(keyword)
: note.text!.toLowerCase().includes(keyword.toLowerCase()),
));
if (!matched) return false;
}
const excludeKeywords = antenna.excludeKeywords
// Clean up
.map(xs => xs.filter(x => x !== ''))
.filter(xs => xs.length > 0);
if (excludeKeywords.length > 0) {
if (note.text == null) return false;
const matched = excludeKeywords.some(and =>
and.every(keyword =>
antenna.caseSensitive
? note.text!.includes(keyword)
: note.text!.toLowerCase().includes(keyword.toLowerCase()),
));
if (matched) return false;
}
if (antenna.withFile) {
if (note.fileIds && note.fileIds.length === 0) return false;
}
// TODO: eval expression
return true;
}
public async getAntennas() {
if (!this.antennasFetched) {
this.antennas = await this.antennasRepository.find();
this.antennasFetched = true;
}
return this.antennas;
}
}

View file

@ -0,0 +1,40 @@
import { promisify } from 'node:util';
import { Inject, Injectable } from '@nestjs/common';
import redisLock from 'redis-lock';
import Redis from 'ioredis';
import { DI } from '@/di-symbols.js';
/**
* Retry delay (ms) for lock acquisition
*/
const retryDelay = 100;
@Injectable()
export class AppLockService {
private lock: (key: string, timeout?: number) => Promise<() => void>;
constructor(
@Inject(DI.redis)
private redisClient: Redis.Redis,
) {
this.lock = promisify(redisLock(this.redisClient, retryDelay));
}
/**
* Get AP Object lock
* @param uri AP object ID
* @param timeout Lock timeout (ms), The timeout releases previous lock.
* @returns Unlock function
*/
public getApLock(uri: string, timeout = 30 * 1000): Promise<() => void> {
return this.lock(`ap-object:${uri}`, timeout);
}
public getFetchInstanceMetadataLock(host: string, timeout = 30 * 1000): Promise<() => void> {
return this.lock(`instance:${host}`, timeout);
}
public getChartInsertLock(lockKey: string, timeout = 30 * 1000): Promise<() => void> {
return this.lock(`chart-insert:${lockKey}`, timeout);
}
}

View file

@ -0,0 +1,81 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { UsersRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import { HttpRequestService } from './HttpRequestService.js';
type CaptchaResponse = {
success: boolean;
'error-codes'?: string[];
};
@Injectable()
export class CaptchaService {
constructor(
@Inject(DI.config)
private config: Config,
private httpRequestService: HttpRequestService,
) {
}
private async getCaptchaResponse(url: string, secret: string, response: string): Promise<CaptchaResponse> {
const params = new URLSearchParams({
secret,
response,
});
const res = await fetch(url, {
method: 'POST',
body: params,
headers: {
'User-Agent': this.config.userAgent,
},
// TODO
//timeout: 10 * 1000,
agent: (url, bypassProxy) => this.httpRequestService.getAgentByUrl(url, bypassProxy),
}).catch(err => {
throw `${err.message ?? err}`;
});
if (!res.ok) {
throw `${res.status}`;
}
return await res.json() as CaptchaResponse;
}
public async verifyRecaptcha(secret: string, response: string): Promise<void> {
const result = await this.getCaptchaResponse('https://www.recaptcha.net/recaptcha/api/siteverify', secret, response).catch(e => {
throw `recaptcha-request-failed: ${e}`;
});
if (result.success !== true) {
const errorCodes = result['error-codes'] ? result['error-codes'].join(', ') : '';
throw `recaptcha-failed: ${errorCodes}`;
}
}
public async verifyHcaptcha(secret: string, response: string): Promise<void> {
const result = await this.getCaptchaResponse('https://hcaptcha.com/siteverify', secret, response).catch(e => {
throw `hcaptcha-request-failed: ${e}`;
});
if (result.success !== true) {
const errorCodes = result['error-codes'] ? result['error-codes'].join(', ') : '';
throw `hcaptcha-failed: ${errorCodes}`;
}
}
public async verifyTurnstile(secret: string, response: string): Promise<void> {
const result = await this.getCaptchaResponse('https://challenges.cloudflare.com/turnstile/v0/siteverify', secret, response).catch(e => {
throw `turnstile-request-failed: ${e}`;
});
if (result.success !== true) {
const errorCodes = result['error-codes'] ? result['error-codes'].join(', ') : '';
throw `turnstile-failed: ${errorCodes}`;
}
}
}

View file

@ -0,0 +1,706 @@
import { Module } from '@nestjs/common';
import { DI } from '../di-symbols.js';
import { AccountUpdateService } from './AccountUpdateService.js';
import { AiService } from './AiService.js';
import { AntennaService } from './AntennaService.js';
import { AppLockService } from './AppLockService.js';
import { CaptchaService } from './CaptchaService.js';
import { CreateNotificationService } from './CreateNotificationService.js';
import { CreateSystemUserService } from './CreateSystemUserService.js';
import { CustomEmojiService } from './CustomEmojiService.js';
import { DeleteAccountService } from './DeleteAccountService.js';
import { DownloadService } from './DownloadService.js';
import { DriveService } from './DriveService.js';
import { EmailService } from './EmailService.js';
import { FederatedInstanceService } from './FederatedInstanceService.js';
import { FetchInstanceMetadataService } from './FetchInstanceMetadataService.js';
import { GlobalEventService } from './GlobalEventService.js';
import { HashtagService } from './HashtagService.js';
import { HttpRequestService } from './HttpRequestService.js';
import { IdService } from './IdService.js';
import { ImageProcessingService } from './ImageProcessingService.js';
import { InstanceActorService } from './InstanceActorService.js';
import { InternalStorageService } from './InternalStorageService.js';
import { MessagingService } from './MessagingService.js';
import { MetaService } from './MetaService.js';
import { MfmService } from './MfmService.js';
import { ModerationLogService } from './ModerationLogService.js';
import { NoteCreateService } from './NoteCreateService.js';
import { NoteDeleteService } from './NoteDeleteService.js';
import { NotePiningService } from './NotePiningService.js';
import { NoteReadService } from './NoteReadService.js';
import { NotificationService } from './NotificationService.js';
import { PollService } from './PollService.js';
import { PushNotificationService } from './PushNotificationService.js';
import { QueryService } from './QueryService.js';
import { ReactionService } from './ReactionService.js';
import { RelayService } from './RelayService.js';
import { S3Service } from './S3Service.js';
import { SignupService } from './SignupService.js';
import { TwoFactorAuthenticationService } from './TwoFactorAuthenticationService.js';
import { UserBlockingService } from './UserBlockingService.js';
import { UserCacheService } from './UserCacheService.js';
import { UserFollowingService } from './UserFollowingService.js';
import { UserKeypairStoreService } from './UserKeypairStoreService.js';
import { UserListService } from './UserListService.js';
import { UserMutingService } from './UserMutingService.js';
import { UserSuspendService } from './UserSuspendService.js';
import { VideoProcessingService } from './VideoProcessingService.js';
import { WebhookService } from './WebhookService.js';
import { ProxyAccountService } from './ProxyAccountService.js';
import { UtilityService } from './UtilityService.js';
import { FileInfoService } from './FileInfoService.js';
import { ChartLoggerService } from './chart/ChartLoggerService.js';
import FederationChart from './chart/charts/federation.js';
import NotesChart from './chart/charts/notes.js';
import UsersChart from './chart/charts/users.js';
import ActiveUsersChart from './chart/charts/active-users.js';
import InstanceChart from './chart/charts/instance.js';
import PerUserNotesChart from './chart/charts/per-user-notes.js';
import DriveChart from './chart/charts/drive.js';
import PerUserReactionsChart from './chart/charts/per-user-reactions.js';
import HashtagChart from './chart/charts/hashtag.js';
import PerUserFollowingChart from './chart/charts/per-user-following.js';
import PerUserDriveChart from './chart/charts/per-user-drive.js';
import ApRequestChart from './chart/charts/ap-request.js';
import { ChartManagementService } from './chart/ChartManagementService.js';
import { AbuseUserReportEntityService } from './entities/AbuseUserReportEntityService.js';
import { AntennaEntityService } from './entities/AntennaEntityService.js';
import { AppEntityService } from './entities/AppEntityService.js';
import { AuthSessionEntityService } from './entities/AuthSessionEntityService.js';
import { BlockingEntityService } from './entities/BlockingEntityService.js';
import { ChannelEntityService } from './entities/ChannelEntityService.js';
import { ClipEntityService } from './entities/ClipEntityService.js';
import { DriveFileEntityService } from './entities/DriveFileEntityService.js';
import { DriveFolderEntityService } from './entities/DriveFolderEntityService.js';
import { EmojiEntityService } from './entities/EmojiEntityService.js';
import { FollowingEntityService } from './entities/FollowingEntityService.js';
import { FollowRequestEntityService } from './entities/FollowRequestEntityService.js';
import { GalleryLikeEntityService } from './entities/GalleryLikeEntityService.js';
import { GalleryPostEntityService } from './entities/GalleryPostEntityService.js';
import { HashtagEntityService } from './entities/HashtagEntityService.js';
import { InstanceEntityService } from './entities/InstanceEntityService.js';
import { MessagingMessageEntityService } from './entities/MessagingMessageEntityService.js';
import { ModerationLogEntityService } from './entities/ModerationLogEntityService.js';
import { MutingEntityService } from './entities/MutingEntityService.js';
import { NoteEntityService } from './entities/NoteEntityService.js';
import { NoteFavoriteEntityService } from './entities/NoteFavoriteEntityService.js';
import { NoteReactionEntityService } from './entities/NoteReactionEntityService.js';
import { NotificationEntityService } from './entities/NotificationEntityService.js';
import { PageEntityService } from './entities/PageEntityService.js';
import { PageLikeEntityService } from './entities/PageLikeEntityService.js';
import { SigninEntityService } from './entities/SigninEntityService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { UserGroupEntityService } from './entities/UserGroupEntityService.js';
import { UserGroupInvitationEntityService } from './entities/UserGroupInvitationEntityService.js';
import { UserListEntityService } from './entities/UserListEntityService.js';
import { ApAudienceService } from './remote/activitypub/ApAudienceService.js';
import { ApDbResolverService } from './remote/activitypub/ApDbResolverService.js';
import { ApDeliverManagerService } from './remote/activitypub/ApDeliverManagerService.js';
import { ApInboxService } from './remote/activitypub/ApInboxService.js';
import { ApLoggerService } from './remote/activitypub/ApLoggerService.js';
import { ApMfmService } from './remote/activitypub/ApMfmService.js';
import { ApRendererService } from './remote/activitypub/ApRendererService.js';
import { ApRequestService } from './remote/activitypub/ApRequestService.js';
import { ApResolverService } from './remote/activitypub/ApResolverService.js';
import { LdSignatureService } from './remote/activitypub/LdSignatureService.js';
import { RemoteLoggerService } from './remote/RemoteLoggerService.js';
import { ResolveUserService } from './remote/ResolveUserService.js';
import { WebfingerService } from './remote/WebfingerService.js';
import { ApImageService } from './remote/activitypub/models/ApImageService.js';
import { ApMentionService } from './remote/activitypub/models/ApMentionService.js';
import { ApNoteService } from './remote/activitypub/models/ApNoteService.js';
import { ApPersonService } from './remote/activitypub/models/ApPersonService.js';
import { ApQuestionService } from './remote/activitypub/models/ApQuestionService.js';
import { QueueModule } from './queue/QueueModule.js';
import { QueueService } from './QueueService.js';
import { LoggerService } from './LoggerService.js';
import type { Provider } from '@nestjs/common';
//#region 文字列ベースでのinjection用(循環参照対応のため)
const $LoggerService: Provider = { provide: 'LoggerService', useExisting: LoggerService };
const $AccountUpdateService: Provider = { provide: 'AccountUpdateService', useExisting: AccountUpdateService };
const $AiService: Provider = { provide: 'AiService', useExisting: AiService };
const $AntennaService: Provider = { provide: 'AntennaService', useExisting: AntennaService };
const $AppLockService: Provider = { provide: 'AppLockService', useExisting: AppLockService };
const $CaptchaService: Provider = { provide: 'CaptchaService', useExisting: CaptchaService };
const $CreateNotificationService: Provider = { provide: 'CreateNotificationService', useExisting: CreateNotificationService };
const $CreateSystemUserService: Provider = { provide: 'CreateSystemUserService', useExisting: CreateSystemUserService };
const $CustomEmojiService: Provider = { provide: 'CustomEmojiService', useExisting: CustomEmojiService };
const $DeleteAccountService: Provider = { provide: 'DeleteAccountService', useExisting: DeleteAccountService };
const $DownloadService: Provider = { provide: 'DownloadService', useExisting: DownloadService };
const $DriveService: Provider = { provide: 'DriveService', useExisting: DriveService };
const $EmailService: Provider = { provide: 'EmailService', useExisting: EmailService };
const $FederatedInstanceService: Provider = { provide: 'FederatedInstanceService', useExisting: FederatedInstanceService };
const $FetchInstanceMetadataService: Provider = { provide: 'FetchInstanceMetadataService', useExisting: FetchInstanceMetadataService };
const $GlobalEventService: Provider = { provide: 'GlobalEventService', useExisting: GlobalEventService };
const $HashtagService: Provider = { provide: 'HashtagService', useExisting: HashtagService };
const $HttpRequestService: Provider = { provide: 'HttpRequestService', useExisting: HttpRequestService };
const $IdService: Provider = { provide: 'IdService', useExisting: IdService };
const $ImageProcessingService: Provider = { provide: 'ImageProcessingService', useExisting: ImageProcessingService };
const $InstanceActorService: Provider = { provide: 'InstanceActorService', useExisting: InstanceActorService };
const $InternalStorageService: Provider = { provide: 'InternalStorageService', useExisting: InternalStorageService };
const $MessagingService: Provider = { provide: 'MessagingService', useExisting: MessagingService };
const $MetaService: Provider = { provide: 'MetaService', useExisting: MetaService };
const $MfmService: Provider = { provide: 'MfmService', useExisting: MfmService };
const $ModerationLogService: Provider = { provide: 'ModerationLogService', useExisting: ModerationLogService };
const $NoteCreateService: Provider = { provide: 'NoteCreateService', useExisting: NoteCreateService };
const $NoteDeleteService: Provider = { provide: 'NoteDeleteService', useExisting: NoteDeleteService };
const $NotePiningService: Provider = { provide: 'NotePiningService', useExisting: NotePiningService };
const $NoteReadService: Provider = { provide: 'NoteReadService', useExisting: NoteReadService };
const $NotificationService: Provider = { provide: 'NotificationService', useExisting: NotificationService };
const $PollService: Provider = { provide: 'PollService', useExisting: PollService };
const $ProxyAccountService: Provider = { provide: 'ProxyAccountService', useExisting: ProxyAccountService };
const $PushNotificationService: Provider = { provide: 'PushNotificationService', useExisting: PushNotificationService };
const $QueryService: Provider = { provide: 'QueryService', useExisting: QueryService };
const $ReactionService: Provider = { provide: 'ReactionService', useExisting: ReactionService };
const $RelayService: Provider = { provide: 'RelayService', useExisting: RelayService };
const $S3Service: Provider = { provide: 'S3Service', useExisting: S3Service };
const $SignupService: Provider = { provide: 'SignupService', useExisting: SignupService };
const $TwoFactorAuthenticationService: Provider = { provide: 'TwoFactorAuthenticationService', useExisting: TwoFactorAuthenticationService };
const $UserBlockingService: Provider = { provide: 'UserBlockingService', useExisting: UserBlockingService };
const $UserCacheService: Provider = { provide: 'UserCacheService', useExisting: UserCacheService };
const $UserFollowingService: Provider = { provide: 'UserFollowingService', useExisting: UserFollowingService };
const $UserKeypairStoreService: Provider = { provide: 'UserKeypairStoreService', useExisting: UserKeypairStoreService };
const $UserListService: Provider = { provide: 'UserListService', useExisting: UserListService };
const $UserMutingService: Provider = { provide: 'UserMutingService', useExisting: UserMutingService };
const $UserSuspendService: Provider = { provide: 'UserSuspendService', useExisting: UserSuspendService };
const $VideoProcessingService: Provider = { provide: 'VideoProcessingService', useExisting: VideoProcessingService };
const $WebhookService: Provider = { provide: 'WebhookService', useExisting: WebhookService };
const $UtilityService: Provider = { provide: 'UtilityService', useExisting: UtilityService };
const $FileInfoService: Provider = { provide: 'FileInfoService', useExisting: FileInfoService };
const $ChartLoggerService: Provider = { provide: 'ChartLoggerService', useExisting: ChartLoggerService };
const $FederationChart: Provider = { provide: 'FederationChart', useExisting: FederationChart };
const $NotesChart: Provider = { provide: 'NotesChart', useExisting: NotesChart };
const $UsersChart: Provider = { provide: 'UsersChart', useExisting: UsersChart };
const $ActiveUsersChart: Provider = { provide: 'ActiveUsersChart', useExisting: ActiveUsersChart };
const $InstanceChart: Provider = { provide: 'InstanceChart', useExisting: InstanceChart };
const $PerUserNotesChart: Provider = { provide: 'PerUserNotesChart', useExisting: PerUserNotesChart };
const $DriveChart: Provider = { provide: 'DriveChart', useExisting: DriveChart };
const $PerUserReactionsChart: Provider = { provide: 'PerUserReactionsChart', useExisting: PerUserReactionsChart };
const $HashtagChart: Provider = { provide: 'HashtagChart', useExisting: HashtagChart };
const $PerUserFollowingChart: Provider = { provide: 'PerUserFollowingChart', useExisting: PerUserFollowingChart };
const $PerUserDriveChart: Provider = { provide: 'PerUserDriveChart', useExisting: PerUserDriveChart };
const $ApRequestChart: Provider = { provide: 'ApRequestChart', useExisting: ApRequestChart };
const $ChartManagementService: Provider = { provide: 'ChartManagementService', useExisting: ChartManagementService };
const $AbuseUserReportEntityService: Provider = { provide: 'AbuseUserReportEntityService', useExisting: AbuseUserReportEntityService };
const $AntennaEntityService: Provider = { provide: 'AntennaEntityService', useExisting: AntennaEntityService };
const $AppEntityService: Provider = { provide: 'AppEntityService', useExisting: AppEntityService };
const $AuthSessionEntityService: Provider = { provide: 'AuthSessionEntityService', useExisting: AuthSessionEntityService };
const $BlockingEntityService: Provider = { provide: 'BlockingEntityService', useExisting: BlockingEntityService };
const $ChannelEntityService: Provider = { provide: 'ChannelEntityService', useExisting: ChannelEntityService };
const $ClipEntityService: Provider = { provide: 'ClipEntityService', useExisting: ClipEntityService };
const $DriveFileEntityService: Provider = { provide: 'DriveFileEntityService', useExisting: DriveFileEntityService };
const $DriveFolderEntityService: Provider = { provide: 'DriveFolderEntityService', useExisting: DriveFolderEntityService };
const $EmojiEntityService: Provider = { provide: 'EmojiEntityService', useExisting: EmojiEntityService };
const $FollowingEntityService: Provider = { provide: 'FollowingEntityService', useExisting: FollowingEntityService };
const $FollowRequestEntityService: Provider = { provide: 'FollowRequestEntityService', useExisting: FollowRequestEntityService };
const $GalleryLikeEntityService: Provider = { provide: 'GalleryLikeEntityService', useExisting: GalleryLikeEntityService };
const $GalleryPostEntityService: Provider = { provide: 'GalleryPostEntityService', useExisting: GalleryPostEntityService };
const $HashtagEntityService: Provider = { provide: 'HashtagEntityService', useExisting: HashtagEntityService };
const $InstanceEntityService: Provider = { provide: 'InstanceEntityService', useExisting: InstanceEntityService };
const $MessagingMessageEntityService: Provider = { provide: 'MessagingMessageEntityService', useExisting: MessagingMessageEntityService };
const $ModerationLogEntityService: Provider = { provide: 'ModerationLogEntityService', useExisting: ModerationLogEntityService };
const $MutingEntityService: Provider = { provide: 'MutingEntityService', useExisting: MutingEntityService };
const $NoteEntityService: Provider = { provide: 'NoteEntityService', useExisting: NoteEntityService };
const $NoteFavoriteEntityService: Provider = { provide: 'NoteFavoriteEntityService', useExisting: NoteFavoriteEntityService };
const $NoteReactionEntityService: Provider = { provide: 'NoteReactionEntityService', useExisting: NoteReactionEntityService };
const $NotificationEntityService: Provider = { provide: 'NotificationEntityService', useExisting: NotificationEntityService };
const $PageEntityService: Provider = { provide: 'PageEntityService', useExisting: PageEntityService };
const $PageLikeEntityService: Provider = { provide: 'PageLikeEntityService', useExisting: PageLikeEntityService };
const $SigninEntityService: Provider = { provide: 'SigninEntityService', useExisting: SigninEntityService };
const $UserEntityService: Provider = { provide: 'UserEntityService', useExisting: UserEntityService };
const $UserGroupEntityService: Provider = { provide: 'UserGroupEntityService', useExisting: UserGroupEntityService };
const $UserGroupInvitationEntityService: Provider = { provide: 'UserGroupInvitationEntityService', useExisting: UserGroupInvitationEntityService };
const $UserListEntityService: Provider = { provide: 'UserListEntityService', useExisting: UserListEntityService };
const $ApAudienceService: Provider = { provide: 'ApAudienceService', useExisting: ApAudienceService };
const $ApDbResolverService: Provider = { provide: 'ApDbResolverService', useExisting: ApDbResolverService };
const $ApDeliverManagerService: Provider = { provide: 'ApDeliverManagerService', useExisting: ApDeliverManagerService };
const $ApInboxService: Provider = { provide: 'ApInboxService', useExisting: ApInboxService };
const $ApLoggerService: Provider = { provide: 'ApLoggerService', useExisting: ApLoggerService };
const $ApMfmService: Provider = { provide: 'ApMfmService', useExisting: ApMfmService };
const $ApRendererService: Provider = { provide: 'ApRendererService', useExisting: ApRendererService };
const $ApRequestService: Provider = { provide: 'ApRequestService', useExisting: ApRequestService };
const $ApResolverService: Provider = { provide: 'ApResolverService', useExisting: ApResolverService };
const $LdSignatureService: Provider = { provide: 'LdSignatureService', useExisting: LdSignatureService };
const $RemoteLoggerService: Provider = { provide: 'RemoteLoggerService', useExisting: RemoteLoggerService };
const $ResolveUserService: Provider = { provide: 'ResolveUserService', useExisting: ResolveUserService };
const $WebfingerService: Provider = { provide: 'WebfingerService', useExisting: WebfingerService };
const $ApImageService: Provider = { provide: 'ApImageService', useExisting: ApImageService };
const $ApMentionService: Provider = { provide: 'ApMentionService', useExisting: ApMentionService };
const $ApNoteService: Provider = { provide: 'ApNoteService', useExisting: ApNoteService };
const $ApPersonService: Provider = { provide: 'ApPersonService', useExisting: ApPersonService };
const $ApQuestionService: Provider = { provide: 'ApQuestionService', useExisting: ApQuestionService };
//#endregion
@Module({
imports: [
QueueModule,
],
providers: [
LoggerService,
AccountUpdateService,
AiService,
AntennaService,
AppLockService,
CaptchaService,
CreateNotificationService,
CreateSystemUserService,
CustomEmojiService,
DeleteAccountService,
DownloadService,
DriveService,
EmailService,
FederatedInstanceService,
FetchInstanceMetadataService,
GlobalEventService,
HashtagService,
HttpRequestService,
IdService,
ImageProcessingService,
InstanceActorService,
InternalStorageService,
MessagingService,
MetaService,
MfmService,
ModerationLogService,
NoteCreateService,
NoteDeleteService,
NotePiningService,
NoteReadService,
NotificationService,
PollService,
ProxyAccountService,
PushNotificationService,
QueryService,
ReactionService,
RelayService,
S3Service,
SignupService,
TwoFactorAuthenticationService,
UserBlockingService,
UserCacheService,
UserFollowingService,
UserKeypairStoreService,
UserListService,
UserMutingService,
UserSuspendService,
VideoProcessingService,
WebhookService,
UtilityService,
FileInfoService,
ChartLoggerService,
FederationChart,
NotesChart,
UsersChart,
ActiveUsersChart,
InstanceChart,
PerUserNotesChart,
DriveChart,
PerUserReactionsChart,
HashtagChart,
PerUserFollowingChart,
PerUserDriveChart,
ApRequestChart,
ChartManagementService,
AbuseUserReportEntityService,
AntennaEntityService,
AppEntityService,
AuthSessionEntityService,
BlockingEntityService,
ChannelEntityService,
ClipEntityService,
DriveFileEntityService,
DriveFolderEntityService,
EmojiEntityService,
FollowingEntityService,
FollowRequestEntityService,
GalleryLikeEntityService,
GalleryPostEntityService,
HashtagEntityService,
InstanceEntityService,
MessagingMessageEntityService,
ModerationLogEntityService,
MutingEntityService,
NoteEntityService,
NoteFavoriteEntityService,
NoteReactionEntityService,
NotificationEntityService,
PageEntityService,
PageLikeEntityService,
SigninEntityService,
UserEntityService,
UserGroupEntityService,
UserGroupInvitationEntityService,
UserListEntityService,
ApAudienceService,
ApDbResolverService,
ApDeliverManagerService,
ApInboxService,
ApLoggerService,
ApMfmService,
ApRendererService,
ApRequestService,
ApResolverService,
LdSignatureService,
RemoteLoggerService,
ResolveUserService,
WebfingerService,
ApImageService,
ApMentionService,
ApNoteService,
ApPersonService,
ApQuestionService,
QueueService,
//#region 文字列ベースでのinjection用(循環参照対応のため)
$LoggerService,
$AccountUpdateService,
$AiService,
$AntennaService,
$AppLockService,
$CaptchaService,
$CreateNotificationService,
$CreateSystemUserService,
$CustomEmojiService,
$DeleteAccountService,
$DownloadService,
$DriveService,
$EmailService,
$FederatedInstanceService,
$FetchInstanceMetadataService,
$GlobalEventService,
$HashtagService,
$HttpRequestService,
$IdService,
$ImageProcessingService,
$InstanceActorService,
$InternalStorageService,
$MessagingService,
$MetaService,
$MfmService,
$ModerationLogService,
$NoteCreateService,
$NoteDeleteService,
$NotePiningService,
$NoteReadService,
$NotificationService,
$PollService,
$ProxyAccountService,
$PushNotificationService,
$QueryService,
$ReactionService,
$RelayService,
$S3Service,
$SignupService,
$TwoFactorAuthenticationService,
$UserBlockingService,
$UserCacheService,
$UserFollowingService,
$UserKeypairStoreService,
$UserListService,
$UserMutingService,
$UserSuspendService,
$VideoProcessingService,
$WebhookService,
$UtilityService,
$FileInfoService,
$ChartLoggerService,
$FederationChart,
$NotesChart,
$UsersChart,
$ActiveUsersChart,
$InstanceChart,
$PerUserNotesChart,
$DriveChart,
$PerUserReactionsChart,
$HashtagChart,
$PerUserFollowingChart,
$PerUserDriveChart,
$ApRequestChart,
$ChartManagementService,
$AbuseUserReportEntityService,
$AntennaEntityService,
$AppEntityService,
$AuthSessionEntityService,
$BlockingEntityService,
$ChannelEntityService,
$ClipEntityService,
$DriveFileEntityService,
$DriveFolderEntityService,
$EmojiEntityService,
$FollowingEntityService,
$FollowRequestEntityService,
$GalleryLikeEntityService,
$GalleryPostEntityService,
$HashtagEntityService,
$InstanceEntityService,
$MessagingMessageEntityService,
$ModerationLogEntityService,
$MutingEntityService,
$NoteEntityService,
$NoteFavoriteEntityService,
$NoteReactionEntityService,
$NotificationEntityService,
$PageEntityService,
$PageLikeEntityService,
$SigninEntityService,
$UserEntityService,
$UserGroupEntityService,
$UserGroupInvitationEntityService,
$UserListEntityService,
$ApAudienceService,
$ApDbResolverService,
$ApDeliverManagerService,
$ApInboxService,
$ApLoggerService,
$ApMfmService,
$ApRendererService,
$ApRequestService,
$ApResolverService,
$LdSignatureService,
$RemoteLoggerService,
$ResolveUserService,
$WebfingerService,
$ApImageService,
$ApMentionService,
$ApNoteService,
$ApPersonService,
$ApQuestionService,
//#endregion
],
exports: [
QueueModule,
LoggerService,
AccountUpdateService,
AiService,
AntennaService,
AppLockService,
CaptchaService,
CreateNotificationService,
CreateSystemUserService,
CustomEmojiService,
DeleteAccountService,
DownloadService,
DriveService,
EmailService,
FederatedInstanceService,
FetchInstanceMetadataService,
GlobalEventService,
HashtagService,
HttpRequestService,
IdService,
ImageProcessingService,
InstanceActorService,
InternalStorageService,
MessagingService,
MetaService,
MfmService,
ModerationLogService,
NoteCreateService,
NoteDeleteService,
NotePiningService,
NoteReadService,
NotificationService,
PollService,
ProxyAccountService,
PushNotificationService,
QueryService,
ReactionService,
RelayService,
S3Service,
SignupService,
TwoFactorAuthenticationService,
UserBlockingService,
UserCacheService,
UserFollowingService,
UserKeypairStoreService,
UserListService,
UserMutingService,
UserSuspendService,
VideoProcessingService,
WebhookService,
UtilityService,
FileInfoService,
FederationChart,
NotesChart,
UsersChart,
ActiveUsersChart,
InstanceChart,
PerUserNotesChart,
DriveChart,
PerUserReactionsChart,
HashtagChart,
PerUserFollowingChart,
PerUserDriveChart,
ApRequestChart,
ChartManagementService,
AbuseUserReportEntityService,
AntennaEntityService,
AppEntityService,
AuthSessionEntityService,
BlockingEntityService,
ChannelEntityService,
ClipEntityService,
DriveFileEntityService,
DriveFolderEntityService,
EmojiEntityService,
FollowingEntityService,
FollowRequestEntityService,
GalleryLikeEntityService,
GalleryPostEntityService,
HashtagEntityService,
InstanceEntityService,
MessagingMessageEntityService,
ModerationLogEntityService,
MutingEntityService,
NoteEntityService,
NoteFavoriteEntityService,
NoteReactionEntityService,
NotificationEntityService,
PageEntityService,
PageLikeEntityService,
SigninEntityService,
UserEntityService,
UserGroupEntityService,
UserGroupInvitationEntityService,
UserListEntityService,
ApAudienceService,
ApDbResolverService,
ApDeliverManagerService,
ApInboxService,
ApLoggerService,
ApMfmService,
ApRendererService,
ApRequestService,
ApResolverService,
LdSignatureService,
RemoteLoggerService,
ResolveUserService,
WebfingerService,
ApImageService,
ApMentionService,
ApNoteService,
ApPersonService,
ApQuestionService,
QueueService,
//#region 文字列ベースでのinjection用(循環参照対応のため)
$LoggerService,
$AccountUpdateService,
$AiService,
$AntennaService,
$AppLockService,
$CaptchaService,
$CreateNotificationService,
$CreateSystemUserService,
$CustomEmojiService,
$DeleteAccountService,
$DownloadService,
$DriveService,
$EmailService,
$FederatedInstanceService,
$FetchInstanceMetadataService,
$GlobalEventService,
$HashtagService,
$HttpRequestService,
$IdService,
$ImageProcessingService,
$InstanceActorService,
$InternalStorageService,
$MessagingService,
$MetaService,
$MfmService,
$ModerationLogService,
$NoteCreateService,
$NoteDeleteService,
$NotePiningService,
$NoteReadService,
$NotificationService,
$PollService,
$ProxyAccountService,
$PushNotificationService,
$QueryService,
$ReactionService,
$RelayService,
$S3Service,
$SignupService,
$TwoFactorAuthenticationService,
$UserBlockingService,
$UserCacheService,
$UserFollowingService,
$UserKeypairStoreService,
$UserListService,
$UserMutingService,
$UserSuspendService,
$VideoProcessingService,
$WebhookService,
$UtilityService,
$FileInfoService,
$FederationChart,
$NotesChart,
$UsersChart,
$ActiveUsersChart,
$InstanceChart,
$PerUserNotesChart,
$DriveChart,
$PerUserReactionsChart,
$HashtagChart,
$PerUserFollowingChart,
$PerUserDriveChart,
$ApRequestChart,
$ChartManagementService,
$AbuseUserReportEntityService,
$AntennaEntityService,
$AppEntityService,
$AuthSessionEntityService,
$BlockingEntityService,
$ChannelEntityService,
$ClipEntityService,
$DriveFileEntityService,
$DriveFolderEntityService,
$EmojiEntityService,
$FollowingEntityService,
$FollowRequestEntityService,
$GalleryLikeEntityService,
$GalleryPostEntityService,
$HashtagEntityService,
$InstanceEntityService,
$MessagingMessageEntityService,
$ModerationLogEntityService,
$MutingEntityService,
$NoteEntityService,
$NoteFavoriteEntityService,
$NoteReactionEntityService,
$NotificationEntityService,
$PageEntityService,
$PageLikeEntityService,
$SigninEntityService,
$UserEntityService,
$UserGroupEntityService,
$UserGroupInvitationEntityService,
$UserListEntityService,
$ApAudienceService,
$ApDbResolverService,
$ApDeliverManagerService,
$ApInboxService,
$ApLoggerService,
$ApMfmService,
$ApRendererService,
$ApRequestService,
$ApResolverService,
$LdSignatureService,
$RemoteLoggerService,
$ResolveUserService,
$WebfingerService,
$ApImageService,
$ApMentionService,
$ApNoteService,
$ApPersonService,
$ApQuestionService,
//#endregion
],
})
export class CoreModule {}

View file

@ -0,0 +1,114 @@
import { Inject, Injectable } from '@nestjs/common';
import type { MutingsRepository, NotificationsRepository, UserProfilesRepository, UsersRepository } from '@/models/index.js';
import type { User } from '@/models/entities/User.js';
import type { Notification } from '@/models/entities/Notification.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { IdService } from '@/core/IdService.js';
import { DI } from '@/di-symbols.js';
import { NotificationEntityService } from './entities/NotificationEntityService.js';
import { PushNotificationService } from './PushNotificationService.js';
@Injectable()
export class CreateNotificationService {
constructor(
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
@Inject(DI.notificationsRepository)
private notificationsRepository: NotificationsRepository,
@Inject(DI.mutingsRepository)
private mutingsRepository: MutingsRepository,
private notificationEntityService: NotificationEntityService,
private idService: IdService,
private globalEventServie: GlobalEventService,
private pushNotificationService: PushNotificationService,
) {
}
public async createNotification(
notifieeId: User['id'],
type: Notification['type'],
data: Partial<Notification>,
): Promise<Notification | null> {
if (data.notifierId && (notifieeId === data.notifierId)) {
return null;
}
const profile = await this.userProfilesRepository.findOneBy({ userId: notifieeId });
const isMuted = profile?.mutingNotificationTypes.includes(type);
// Create notification
const notification = await this.notificationsRepository.insert({
id: this.idService.genId(),
createdAt: new Date(),
notifieeId: notifieeId,
type: type,
// 相手がこの通知をミュートしているようなら、既読を予めつけておく
isRead: isMuted,
...data,
} as Partial<Notification>)
.then(x => this.notificationsRepository.findOneByOrFail(x.identifiers[0]));
const packed = await this.notificationEntityService.pack(notification, {});
// Publish notification event
this.globalEventServie.publishMainStream(notifieeId, 'notification', packed);
// 2秒経っても(今回作成した)通知が既読にならなかったら「未読の通知がありますよ」イベントを発行する
setTimeout(async () => {
const fresh = await this.notificationsRepository.findOneBy({ id: notification.id });
if (fresh == null) return; // 既に削除されているかもしれない
if (fresh.isRead) return;
//#region ただしミュートしているユーザーからの通知なら無視
const mutings = await this.mutingsRepository.findBy({
muterId: notifieeId,
});
if (data.notifierId && mutings.map(m => m.muteeId).includes(data.notifierId)) {
return;
}
//#endregion
this.globalEventServie.publishMainStream(notifieeId, 'unreadNotification', packed);
this.pushNotificationService.pushNotification(notifieeId, 'notification', packed);
if (type === 'follow') this.emailNotificationFollow(notifieeId, await this.usersRepository.findOneByOrFail({ id: data.notifierId! }));
if (type === 'receiveFollowRequest') this.emailNotificationReceiveFollowRequest(notifieeId, await this.usersRepository.findOneByOrFail({ id: data.notifierId! }));
}, 2000);
return notification;
}
// TODO
//const locales = await import('../../../../locales/index.js');
// TODO: locale ファイルをクライアント用とサーバー用で分けたい
private async emailNotificationFollow(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 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)})`);
*/
}
private async emailNotificationReceiveFollowRequest(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 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)})`);
*/
}
}

View file

@ -0,0 +1,80 @@
import { Inject, Injectable } from '@nestjs/common';
import bcrypt from 'bcryptjs';
import { v4 as uuid } from 'uuid';
import { IsNull, DataSource } from 'typeorm';
import { genRsaKeyPair } from '@/misc/gen-key-pair.js';
import { User } from '@/models/entities/User.js';
import { UserProfile } from '@/models/entities/UserProfile.js';
import { IdService } from '@/core/IdService.js';
import { UserKeypair } from '@/models/entities/UserKeypair.js';
import { UsedUsername } from '@/models/entities/UsedUsername.js';
import { DI } from '@/di-symbols.js';
import generateNativeUserToken from '@/misc/generate-native-user-token.js';
@Injectable()
export class CreateSystemUserService {
constructor(
@Inject(DI.db)
private db: DataSource,
private idService: IdService,
) {
}
public async createSystemUser(username: string): Promise<User> {
const password = uuid();
// Generate hash of password
const salt = await bcrypt.genSalt(8);
const hash = await bcrypt.hash(password, salt);
// Generate secret
const secret = generateNativeUserToken();
const keyPair = await genRsaKeyPair(4096);
let account!: User;
// Start transaction
await this.db.transaction(async transactionalEntityManager => {
const exist = await transactionalEntityManager.findOneBy(User, {
usernameLower: username.toLowerCase(),
host: IsNull(),
});
if (exist) throw new Error('the user is already exists');
account = await transactionalEntityManager.insert(User, {
id: this.idService.genId(),
createdAt: new Date(),
username: username,
usernameLower: username.toLowerCase(),
host: null,
token: secret,
isAdmin: false,
isLocked: true,
isExplorable: false,
isBot: true,
}).then(x => transactionalEntityManager.findOneByOrFail(User, x.identifiers[0]));
await transactionalEntityManager.insert(UserKeypair, {
publicKey: keyPair.publicKey,
privateKey: keyPair.privateKey,
userId: account.id,
});
await transactionalEntityManager.insert(UserProfile, {
userId: account.id,
autoAcceptFollowed: false,
password: hash,
});
await transactionalEntityManager.insert(UsedUsername, {
createdAt: new Date(),
username: username.toLowerCase(),
});
});
return account;
}
}

View file

@ -0,0 +1,175 @@
import { Inject, Injectable } from '@nestjs/common';
import { DataSource, In, IsNull } from 'typeorm';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { IdService } from '@/core/IdService.js';
import type { DriveFile } from '@/models/entities/DriveFile.js';
import type { Emoji } from '@/models/entities/Emoji.js';
import { Cache } from '@/misc/cache.js';
import { query } from '@/misc/prelude/url.js';
import type { Note } from '@/models/entities/Note.js';
import type { EmojisRepository } from '@/models/index.js';
import { UtilityService } from './UtilityService.js';
import { ReactionService } from './ReactionService.js';
/**
*
*/
type PopulatedEmoji = {
name: string;
url: string;
};
@Injectable()
export class CustomEmojiService {
private cache: Cache<Emoji | null>;
constructor(
@Inject(DI.config)
private config: Config,
@Inject(DI.db)
private db: DataSource,
@Inject(DI.emojisRepository)
private emojisRepository: EmojisRepository,
private idService: IdService,
private globalEventServie: GlobalEventService,
private utilityService: UtilityService,
private reactionService: ReactionService,
) {
this.cache = new Cache<Emoji | null>(1000 * 60 * 60 * 12);
}
public async add(data: {
driveFile: DriveFile;
name: string;
category: string | null;
aliases: string[];
host: string | null;
}): Promise<Emoji> {
const emoji = await this.emojisRepository.insert({
id: this.idService.genId(),
updatedAt: new Date(),
name: data.name,
category: data.category,
host: data.host,
aliases: data.aliases,
originalUrl: data.driveFile.url,
publicUrl: data.driveFile.webpublicUrl ?? data.driveFile.url,
type: data.driveFile.webpublicType ?? data.driveFile.type,
}).then(x => this.emojisRepository.findOneByOrFail(x.identifiers[0]));
await this.db.queryResultCache!.remove(['meta_emojis']);
return emoji;
}
private normalizeHost(src: string | undefined, noteUserHost: string | null): string | null {
// クエリに使うホスト
let host = src === '.' ? null // .はローカルホスト (ここがマッチするのはリアクションのみ)
: src === undefined ? noteUserHost // ノートなどでホスト省略表記の場合はローカルホスト (ここがリアクションにマッチすることはない)
: this.utilityService.isSelfHost(src) ? null // 自ホスト指定
: (src || noteUserHost); // 指定されたホスト || ノートなどの所有者のホスト (こっちがリアクションにマッチすることはない)
host = this.utilityService.toPunyNullable(host);
return host;
}
private parseEmojiStr(emojiName: string, noteUserHost: string | null) {
const match = emojiName.match(/^(\w+)(?:@([\w.-]+))?$/);
if (!match) return { name: null, host: null };
const name = match[1];
// ホスト正規化
const host = this.utilityService.toPunyNullable(this.normalizeHost(match[2], noteUserHost));
return { name, host };
}
/**
*
* @param emojiName (:, @. (decodeReactionで可能))
* @param noteUserHost
* @returns , nullは未マッチを意味する
*/
public async populateEmoji(emojiName: string, noteUserHost: string | null): Promise<PopulatedEmoji | null> {
const { name, host } = this.parseEmojiStr(emojiName, noteUserHost);
if (name == null) return null;
const queryOrNull = async () => (await this.emojisRepository.findOneBy({
name,
host: host ?? IsNull(),
})) ?? null;
const emoji = await this.cache.fetch(`${name} ${host}`, queryOrNull);
if (emoji == null) return null;
const isLocal = emoji.host == null;
const emojiUrl = emoji.publicUrl || emoji.originalUrl; // || emoji.originalUrl してるのは後方互換性のため
const url = isLocal ? emojiUrl : `${this.config.url}/proxy/${encodeURIComponent((new URL(emojiUrl)).pathname)}?${query({ url: emojiUrl })}`;
return {
name: emojiName,
url,
};
}
/**
* (, )
*/
public async populateEmojis(emojiNames: string[], noteUserHost: string | null): Promise<PopulatedEmoji[]> {
const emojis = await Promise.all(emojiNames.map(x => this.populateEmoji(x, noteUserHost)));
return emojis.filter((x): x is PopulatedEmoji => x != null);
}
public aggregateNoteEmojis(notes: Note[]) {
let emojis: { name: string | null; host: string | null; }[] = [];
for (const note of notes) {
emojis = emojis.concat(note.emojis
.map(e => this.parseEmojiStr(e, note.userHost)));
if (note.renote) {
emojis = emojis.concat(note.renote.emojis
.map(e => this.parseEmojiStr(e, note.renote!.userHost)));
if (note.renote.user) {
emojis = emojis.concat(note.renote.user.emojis
.map(e => this.parseEmojiStr(e, note.renote!.userHost)));
}
}
const customReactions = Object.keys(note.reactions).map(x => this.reactionService.decodeReaction(x)).filter(x => x.name != null) as typeof emojis;
emojis = emojis.concat(customReactions);
if (note.user) {
emojis = emojis.concat(note.user.emojis
.map(e => this.parseEmojiStr(e, note.userHost)));
}
}
return emojis.filter(x => x.name != null) as { name: string; host: string | null; }[];
}
/**
*
*/
public async prefetchEmojis(emojis: { name: string; host: string | null; }[]): Promise<void> {
const notCachedEmojis = emojis.filter(emoji => this.cache.get(`${emoji.name} ${emoji.host}`) == null);
const emojisQuery: any[] = [];
const hosts = new Set(notCachedEmojis.map(e => e.host));
for (const host of hosts) {
emojisQuery.push({
name: In(notCachedEmojis.filter(e => e.host === host).map(e => e.name)),
host: host ?? IsNull(),
});
}
const _emojis = emojisQuery.length > 0 ? await this.emojisRepository.find({
where: emojisQuery,
select: ['name', 'host', 'originalUrl', 'publicUrl'],
}) : [];
for (const emoji of _emojis) {
this.cache.set(`${emoji.name} ${emoji.host}`, emoji);
}
}
}

View file

@ -0,0 +1,38 @@
import { Inject, Injectable } from '@nestjs/common';
import type { UsersRepository } from '@/models/index.js';
import { QueueService } from '@/core/QueueService.js';
import { UserSuspendService } from '@/core/UserSuspendService.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { DI } from '@/di-symbols.js';
@Injectable()
export class DeleteAccountService {
constructor(
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private userSuspendService: UserSuspendService,
private queueService: QueueService,
private globalEventServie: GlobalEventService,
) {
}
public async deleteAccount(user: {
id: string;
host: string | null;
}): Promise<void> {
// 物理削除する前にDelete activityを送信する
await this.userSuspendService.doPostSuspend(user).catch(e => {});
this.queueService.createDeleteAccountJob(user, {
soft: false,
});
await this.usersRepository.update(user.id, {
isDeleted: true,
});
// Terminate streaming
this.globalEventServie.publishUserEvent(user.id, 'terminate', {});
}
}

View file

@ -0,0 +1,125 @@
import * as fs from 'node:fs';
import * as stream from 'node:stream';
import * as util from 'node:util';
import { Inject, Injectable } from '@nestjs/common';
import IPCIDR from 'ip-cidr';
import PrivateIp from 'private-ip';
import got, * as Got from 'got';
import chalk from 'chalk';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
import { createTemp } from '@/misc/create-temp.js';
import { StatusError } from '@/misc/status-error.js';
import { LoggerService } from '@/core/LoggerService.js';
import type Logger from '@/logger.js';
const pipeline = util.promisify(stream.pipeline);
@Injectable()
export class DownloadService {
private logger: Logger;
constructor(
@Inject(DI.config)
private config: Config,
private httpRequestService: HttpRequestService,
private loggerService: LoggerService,
) {
this.logger = this.loggerService.getLogger('download');
}
public async downloadUrl(url: string, path: string): Promise<void> {
this.logger.info(`Downloading ${chalk.cyan(url)} ...`);
const timeout = 30 * 1000;
const operationTimeout = 60 * 1000;
const maxSize = this.config.maxFileSize ?? 262144000;
const req = got.stream(url, {
headers: {
'User-Agent': this.config.userAgent,
},
timeout: {
lookup: timeout,
connect: timeout,
secureConnect: timeout,
socket: timeout, // read timeout
response: timeout,
send: timeout,
request: operationTimeout, // whole operation timeout
},
agent: {
http: this.httpRequestService.httpAgent,
https: this.httpRequestService.httpsAgent,
},
http2: false, // default
retry: {
limit: 0,
},
}).on('response', (res: Got.Response) => {
if ((process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test') && !this.config.proxy && res.ip) {
if (this.isPrivateIp(res.ip)) {
this.logger.warn(`Blocked address: ${res.ip}`);
req.destroy();
}
}
const contentLength = res.headers['content-length'];
if (contentLength != null) {
const size = Number(contentLength);
if (size > maxSize) {
this.logger.warn(`maxSize exceeded (${size} > ${maxSize}) on response`);
req.destroy();
}
}
}).on('downloadProgress', (progress: Got.Progress) => {
if (progress.transferred > maxSize) {
this.logger.warn(`maxSize exceeded (${progress.transferred} > ${maxSize}) on downloadProgress`);
req.destroy();
}
});
try {
await pipeline(req, fs.createWriteStream(path));
} catch (e) {
if (e instanceof Got.HTTPError) {
throw new StatusError(`${e.response.statusCode} ${e.response.statusMessage}`, e.response.statusCode, e.response.statusMessage);
} else {
throw e;
}
}
this.logger.succ(`Download finished: ${chalk.cyan(url)}`);
}
public async downloadTextFile(url: string): Promise<string> {
// Create temp file
const [path, cleanup] = await createTemp();
this.logger.info(`text file: Temp file is ${path}`);
try {
// write content at URL to temp file
await this.downloadUrl(url, path);
const text = await util.promisify(fs.readFile)(path, 'utf8');
return text;
} finally {
cleanup();
}
}
private isPrivateIp(ip: string): boolean {
for (const net of this.config.allowedPrivateNetworks ?? []) {
const cidr = new IPCIDR(net);
if (cidr.contains(ip)) {
return false;
}
}
return PrivateIp(ip);
}
}

View file

@ -0,0 +1,740 @@
import * as fs from 'node:fs';
import { Inject, Injectable } from '@nestjs/common';
import { v4 as uuid } from 'uuid';
import sharp from 'sharp';
import { IsNull } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { DriveFilesRepository, UsersRepository, DriveFoldersRepository, UserProfilesRepository } from '@/models/index.js';
import type { Config } from '@/config.js';
import Logger from '@/logger.js';
import type { IRemoteUser, User } from '@/models/entities/User.js';
import { MetaService } from '@/core/MetaService.js';
import { DriveFile } from '@/models/entities/DriveFile.js';
import { IdService } from '@/core/IdService.js';
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
import { IdentifiableError } from '@/misc/identifiable-error.js';
import { contentDisposition } from '@/misc/content-disposition.js';
import { GlobalEventService } from '@/core/GlobalEventService.js';
import { VideoProcessingService } from '@/core/VideoProcessingService.js';
import { ImageProcessingService } from '@/core/ImageProcessingService.js';
import type { IImage } from '@/core/ImageProcessingService.js';
import { QueueService } from '@/core/QueueService.js';
import type { DriveFolder } from '@/models/entities/DriveFolder.js';
import { createTemp } from '@/misc/create-temp.js';
import DriveChart from '@/core/chart/charts/drive.js';
import PerUserDriveChart from '@/core/chart/charts/per-user-drive.js';
import InstanceChart from '@/core/chart/charts/instance.js';
import { DownloadService } from '@/core/DownloadService.js';
import { S3Service } from '@/core/S3Service.js';
import { InternalStorageService } from '@/core/InternalStorageService.js';
import { DriveFileEntityService } from './entities/DriveFileEntityService.js';
import { UserEntityService } from './entities/UserEntityService.js';
import { FileInfoService } from './FileInfoService.js';
import type S3 from 'aws-sdk/clients/s3.js';
type AddFileArgs = {
/** User who wish to add file */
user: { id: User['id']; host: User['host']; driveCapacityOverrideMb: User['driveCapacityOverrideMb'] } | null;
/** File path */
path: string;
/** Name */
name?: string | null;
/** Comment */
comment?: string | null;
/** Folder ID */
folderId?: any;
/** If set to true, forcibly upload the file even if there is a file with the same hash. */
force?: boolean;
/** Do not save file to local */
isLink?: boolean;
/** URL of source (URLからアップロードされた場合(ローカル/リモート)の元URL) */
url?: string | null;
/** URL of source (リモートインスタンスのURLからアップロードされた場合の元URL) */
uri?: string | null;
/** Mark file as sensitive */
sensitive?: boolean | null;
requestIp?: string | null;
requestHeaders?: Record<string, string> | null;
};
type UploadFromUrlArgs = {
url: string;
user: { id: User['id']; host: User['host']; driveCapacityOverrideMb: User['driveCapacityOverrideMb'] } | null;
folderId?: DriveFolder['id'] | null;
uri?: string | null;
sensitive?: boolean;
force?: boolean;
isLink?: boolean;
comment?: string | null;
requestIp?: string | null;
requestHeaders?: Record<string, string> | null;
};
@Injectable()
export class DriveService {
private registerLogger: Logger;
private downloaderLogger: Logger;
constructor(
@Inject(DI.config)
private config: Config,
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
@Inject(DI.driveFilesRepository)
private driveFilesRepository: DriveFilesRepository,
@Inject(DI.driveFoldersRepository)
private driveFoldersRepository: DriveFoldersRepository,
private fileInfoService: FileInfoService,
private userEntityService: UserEntityService,
private driveFileEntityService: DriveFileEntityService,
private idService: IdService,
private metaService: MetaService,
private downloadService: DownloadService,
private internalStorageService: InternalStorageService,
private s3Service: S3Service,
private imageProcessingService: ImageProcessingService,
private videoProcessingService: VideoProcessingService,
private globalEventService: GlobalEventService,
private queueService: QueueService,
private driveChart: DriveChart,
private perUserDriveChart: PerUserDriveChart,
private instanceChart: InstanceChart,
) {
const logger = new Logger('drive', 'blue');
this.registerLogger = logger.createSubLogger('register', 'yellow');
this.downloaderLogger = logger.createSubLogger('downloader');
}
/***
* Save file
* @param path Path for original
* @param name Name for original
* @param type Content-Type for original
* @param hash Hash for original
* @param size Size for original
*/
private async save(file: DriveFile, path: string, name: string, type: string, hash: string, size: number): Promise<DriveFile> {
// thunbnail, webpublic を必要なら生成
const alts = await this.generateAlts(path, type, !file.uri);
const meta = await this.metaService.fetch();
if (meta.useObjectStorage) {
//#region ObjectStorage params
let [ext] = (name.match(/\.([a-zA-Z0-9_-]+)$/) ?? ['']);
if (ext === '') {
if (type === 'image/jpeg') ext = '.jpg';
if (type === 'image/png') ext = '.png';
if (type === 'image/webp') ext = '.webp';
if (type === 'image/apng') ext = '.apng';
if (type === 'image/vnd.mozilla.apng') ext = '.apng';
}
// 拡張子からContent-Typeを設定してそうな挙動を示すオブジェクトストレージ (upcloud?) も存在するので、
// 許可されているファイル形式でしか拡張子をつけない
if (!FILE_TYPE_BROWSERSAFE.includes(type)) {
ext = '';
}
const baseUrl = meta.objectStorageBaseUrl
?? `${ meta.objectStorageUseSSL ? 'https' : 'http' }://${ meta.objectStorageEndpoint }${ meta.objectStoragePort ? `:${meta.objectStoragePort}` : '' }/${ meta.objectStorageBucket }`;
// for original
const key = `${meta.objectStoragePrefix}/${uuid()}${ext}`;
const url = `${ baseUrl }/${ key }`;
// for alts
let webpublicKey: string | null = null;
let webpublicUrl: string | null = null;
let thumbnailKey: string | null = null;
let thumbnailUrl: string | null = null;
//#endregion
//#region Uploads
this.registerLogger.info(`uploading original: ${key}`);
const uploads = [
this.upload(key, fs.createReadStream(path), type, name),
];
if (alts.webpublic) {
webpublicKey = `${meta.objectStoragePrefix}/webpublic-${uuid()}.${alts.webpublic.ext}`;
webpublicUrl = `${ baseUrl }/${ webpublicKey }`;
this.registerLogger.info(`uploading webpublic: ${webpublicKey}`);
uploads.push(this.upload(webpublicKey, alts.webpublic.data, alts.webpublic.type, name));
}
if (alts.thumbnail) {
thumbnailKey = `${meta.objectStoragePrefix}/thumbnail-${uuid()}.${alts.thumbnail.ext}`;
thumbnailUrl = `${ baseUrl }/${ thumbnailKey }`;
this.registerLogger.info(`uploading thumbnail: ${thumbnailKey}`);
uploads.push(this.upload(thumbnailKey, alts.thumbnail.data, alts.thumbnail.type));
}
await Promise.all(uploads);
//#endregion
file.url = url;
file.thumbnailUrl = thumbnailUrl;
file.webpublicUrl = webpublicUrl;
file.accessKey = key;
file.thumbnailAccessKey = thumbnailKey;
file.webpublicAccessKey = webpublicKey;
file.webpublicType = alts.webpublic?.type ?? null;
file.name = name;
file.type = type;
file.md5 = hash;
file.size = size;
file.storedInternal = false;
return await this.driveFilesRepository.insert(file).then(x => this.driveFilesRepository.findOneByOrFail(x.identifiers[0]));
} else { // use internal storage
const accessKey = uuid();
const thumbnailAccessKey = 'thumbnail-' + uuid();
const webpublicAccessKey = 'webpublic-' + uuid();
const url = this.internalStorageService.saveFromPath(accessKey, path);
let thumbnailUrl: string | null = null;
let webpublicUrl: string | null = null;
if (alts.thumbnail) {
thumbnailUrl = this.internalStorageService.saveFromBuffer(thumbnailAccessKey, alts.thumbnail.data);
this.registerLogger.info(`thumbnail stored: ${thumbnailAccessKey}`);
}
if (alts.webpublic) {
webpublicUrl = this.internalStorageService.saveFromBuffer(webpublicAccessKey, alts.webpublic.data);
this.registerLogger.info(`web stored: ${webpublicAccessKey}`);
}
file.storedInternal = true;
file.url = url;
file.thumbnailUrl = thumbnailUrl;
file.webpublicUrl = webpublicUrl;
file.accessKey = accessKey;
file.thumbnailAccessKey = thumbnailAccessKey;
file.webpublicAccessKey = webpublicAccessKey;
file.webpublicType = alts.webpublic?.type ?? null;
file.name = name;
file.type = type;
file.md5 = hash;
file.size = size;
return await this.driveFilesRepository.insert(file).then(x => this.driveFilesRepository.findOneByOrFail(x.identifiers[0]));
}
}
/**
* Generate webpublic, thumbnail, etc
* @param path Path for original
* @param type Content-Type for original
* @param generateWeb Generate webpublic or not
*/
public async generateAlts(path: string, type: string, generateWeb: boolean) {
if (type.startsWith('video/')) {
try {
const thumbnail = await this.videoProcessingService.generateVideoThumbnail(path);
return {
webpublic: null,
thumbnail,
};
} catch (err) {
this.registerLogger.warn(`GenerateVideoThumbnail failed: ${err}`);
return {
webpublic: null,
thumbnail: null,
};
}
}
if (!['image/jpeg', 'image/png', 'image/webp', 'image/svg+xml'].includes(type)) {
this.registerLogger.debug('web image and thumbnail not created (not an required file)');
return {
webpublic: null,
thumbnail: null,
};
}
let img: sharp.Sharp | null = null;
let satisfyWebpublic: boolean;
try {
img = sharp(path);
const metadata = await img.metadata();
const isAnimated = metadata.pages && metadata.pages > 1;
// skip animated
if (isAnimated) {
return {
webpublic: null,
thumbnail: null,
};
}
satisfyWebpublic = !!(
type !== 'image/svg+xml' && type !== 'image/webp' &&
!(metadata.exif ?? metadata.iptc ?? metadata.xmp ?? metadata.tifftagPhotoshop) &&
metadata.width && metadata.width <= 2048 &&
metadata.height && metadata.height <= 2048
);
} catch (err) {
this.registerLogger.warn(`sharp failed: ${err}`);
return {
webpublic: null,
thumbnail: null,
};
}
// #region webpublic
let webpublic: IImage | null = null;
if (generateWeb && !satisfyWebpublic) {
this.registerLogger.info('creating web image');
try {
if (['image/jpeg', 'image/webp'].includes(type)) {
webpublic = await this.imageProcessingService.convertSharpToJpeg(img, 2048, 2048);
} else if (['image/png'].includes(type)) {
webpublic = await this.imageProcessingService.convertSharpToPng(img, 2048, 2048);
} else if (['image/svg+xml'].includes(type)) {
webpublic = await this.imageProcessingService.convertSharpToPng(img, 2048, 2048);
} else {
this.registerLogger.debug('web image not created (not an required image)');
}
} catch (err) {
this.registerLogger.warn('web image not created (an error occured)', err as Error);
}
} else {
if (satisfyWebpublic) this.registerLogger.info('web image not created (original satisfies webpublic)');
else this.registerLogger.info('web image not created (from remote)');
}
// #endregion webpublic
// #region thumbnail
let thumbnail: IImage | null = null;
try {
if (['image/jpeg', 'image/webp', 'image/png', 'image/svg+xml'].includes(type)) {
thumbnail = await this.imageProcessingService.convertSharpToWebp(img, 498, 280);
} else {
this.registerLogger.debug('thumbnail not created (not an required file)');
}
} catch (err) {
this.registerLogger.warn('thumbnail not created (an error occured)', err as Error);
}
// #endregion thumbnail
return {
webpublic,
thumbnail,
};
}
/**
* Upload to ObjectStorage
*/
private async upload(key: string, stream: fs.ReadStream | Buffer, type: string, filename?: string) {
if (type === 'image/apng') type = 'image/png';
if (!FILE_TYPE_BROWSERSAFE.includes(type)) type = 'application/octet-stream';
const meta = await this.metaService.fetch();
const params = {
Bucket: meta.objectStorageBucket,
Key: key,
Body: stream,
ContentType: type,
CacheControl: 'max-age=31536000, immutable',
} as S3.PutObjectRequest;
if (filename) params.ContentDisposition = contentDisposition('inline', filename);
if (meta.objectStorageSetPublicRead) params.ACL = 'public-read';
const s3 = this.s3Service.getS3(meta);
const upload = s3.upload(params, {
partSize: s3.endpoint.hostname === 'storage.googleapis.com' ? 500 * 1024 * 1024 : 8 * 1024 * 1024,
});
const result = await upload.promise();
if (result) this.registerLogger.debug(`Uploaded: ${result.Bucket}/${result.Key} => ${result.Location}`);
}
private async deleteOldFile(user: IRemoteUser) {
const q = this.driveFilesRepository.createQueryBuilder('file')
.where('file.userId = :userId', { userId: user.id })
.andWhere('file.isLink = FALSE');
if (user.avatarId) {
q.andWhere('file.id != :avatarId', { avatarId: user.avatarId });
}
if (user.bannerId) {
q.andWhere('file.id != :bannerId', { bannerId: user.bannerId });
}
q.orderBy('file.id', 'ASC');
const oldFile = await q.getOne();
if (oldFile) {
this.deleteFile(oldFile, true);
}
}
/**
* Add file to drive
*
*/
public async addFile({
user,
path,
name = null,
comment = null,
folderId = null,
force = false,
isLink = false,
url = null,
uri = null,
sensitive = null,
requestIp = null,
requestHeaders = null,
}: AddFileArgs): Promise<DriveFile> {
let skipNsfwCheck = false;
const instance = await this.metaService.fetch();
if (user == null) skipNsfwCheck = true;
if (instance.sensitiveMediaDetection === 'none') skipNsfwCheck = true;
if (user && instance.sensitiveMediaDetection === 'local' && this.userEntityService.isRemoteUser(user)) skipNsfwCheck = true;
if (user && instance.sensitiveMediaDetection === 'remote' && this.userEntityService.isLocalUser(user)) skipNsfwCheck = true;
const info = await this.fileInfoService.getFileInfo(path, {
skipSensitiveDetection: skipNsfwCheck,
sensitiveThreshold: // 感度が高いほどしきい値は低くすることになる
instance.sensitiveMediaDetectionSensitivity === 'veryHigh' ? 0.1 :
instance.sensitiveMediaDetectionSensitivity === 'high' ? 0.3 :
instance.sensitiveMediaDetectionSensitivity === 'low' ? 0.7 :
instance.sensitiveMediaDetectionSensitivity === 'veryLow' ? 0.9 :
0.5,
sensitiveThresholdForPorn: 0.75,
enableSensitiveMediaDetectionForVideos: instance.enableSensitiveMediaDetectionForVideos,
});
this.registerLogger.info(`${JSON.stringify(info)}`);
// 現状 false positive が多すぎて実用に耐えない
//if (info.porn && instance.disallowUploadWhenPredictedAsPorn) {
// throw new IdentifiableError('282f77bf-5816-4f72-9264-aa14d8261a21', 'Detected as porn.');
//}
// detect name
const detectedName = name ?? (info.type.ext ? `untitled.${info.type.ext}` : 'untitled');
if (user && !force) {
// Check if there is a file with the same hash
const much = await this.driveFilesRepository.findOneBy({
md5: info.md5,
userId: user.id,
});
if (much) {
this.registerLogger.info(`file with same hash is found: ${much.id}`);
return much;
}
}
//#region Check drive usage
if (user && !isLink) {
const usage = await this.driveFileEntityService.calcDriveUsageOf(user);
const u = await this.usersRepository.findOneBy({ id: user.id });
const instance = await this.metaService.fetch();
let driveCapacity = 1024 * 1024 * (this.userEntityService.isLocalUser(user) ? instance.localDriveCapacityMb : instance.remoteDriveCapacityMb);
if (this.userEntityService.isLocalUser(user) && u?.driveCapacityOverrideMb != null) {
driveCapacity = 1024 * 1024 * u.driveCapacityOverrideMb;
this.registerLogger.debug('drive capacity override applied');
this.registerLogger.debug(`overrideCap: ${driveCapacity}bytes, usage: ${usage}bytes, u+s: ${usage + info.size}bytes`);
}
this.registerLogger.debug(`drive usage is ${usage} (max: ${driveCapacity})`);
// If usage limit exceeded
if (usage + info.size > driveCapacity) {
if (this.userEntityService.isLocalUser(user)) {
throw new IdentifiableError('c6244ed2-a39a-4e1c-bf93-f0fbd7764fa6', 'No free space.');
} else {
// (アバターまたはバナーを含まず)最も古いファイルを削除する
this.deleteOldFile(await this.usersRepository.findOneByOrFail({ id: user.id }) as IRemoteUser);
}
}
}
//#endregion
const fetchFolder = async () => {
if (!folderId) {
return null;
}
const driveFolder = await this.driveFoldersRepository.findOneBy({
id: folderId,
userId: user ? user.id : IsNull(),
});
if (driveFolder == null) throw new Error('folder-not-found');
return driveFolder;
};
const properties: {
width?: number;
height?: number;
orientation?: number;
} = {};
if (info.width) {
properties['width'] = info.width;
properties['height'] = info.height;
}
if (info.orientation != null) {
properties['orientation'] = info.orientation;
}
const profile = user ? await this.userProfilesRepository.findOneBy({ userId: user.id }) : null;
const folder = await fetchFolder();
let file = new DriveFile();
file.id = this.idService.genId();
file.createdAt = new Date();
file.userId = user ? user.id : null;
file.userHost = user ? user.host : null;
file.folderId = folder !== null ? folder.id : null;
file.comment = comment;
file.properties = properties;
file.blurhash = info.blurhash ?? null;
file.isLink = isLink;
file.requestIp = requestIp;
file.requestHeaders = requestHeaders;
file.maybeSensitive = info.sensitive;
file.maybePorn = info.porn;
file.isSensitive = user
? this.userEntityService.isLocalUser(user) && profile!.alwaysMarkNsfw ? true :
(sensitive !== null && sensitive !== undefined)
? sensitive
: false
: false;
if (info.sensitive && profile!.autoSensitive) file.isSensitive = true;
if (info.sensitive && instance.setSensitiveFlagAutomatically) file.isSensitive = true;
if (url !== null) {
file.src = url;
if (isLink) {
file.url = url;
// ローカルプロキシ用
file.accessKey = uuid();
file.thumbnailAccessKey = 'thumbnail-' + uuid();
file.webpublicAccessKey = 'webpublic-' + uuid();
}
}
if (uri !== null) {
file.uri = uri;
}
if (isLink) {
try {
file.size = 0;
file.md5 = info.md5;
file.name = detectedName;
file.type = info.type.mime;
file.storedInternal = false;
file = await this.driveFilesRepository.insert(file).then(x => this.driveFilesRepository.findOneByOrFail(x.identifiers[0]));
} catch (err) {
// duplicate key error (when already registered)
if (isDuplicateKeyValueError(err)) {
this.registerLogger.info(`already registered ${file.uri}`);
file = await this.driveFilesRepository.findOneBy({
uri: file.uri!,
userId: user ? user.id : IsNull(),
}) as DriveFile;
} else {
this.registerLogger.error(err as Error);
throw err;
}
}
} else {
file = await (this.save(file, path, detectedName, info.type.mime, info.md5, info.size));
}
this.registerLogger.succ(`drive file has been created ${file.id}`);
if (user) {
this.driveFileEntityService.pack(file, { self: true }).then(packedFile => {
// Publish driveFileCreated event
this.globalEventService.publishMainStream(user.id, 'driveFileCreated', packedFile);
this.globalEventService.publishDriveStream(user.id, 'fileCreated', packedFile);
});
}
// 統計を更新
this.driveChart.update(file, true);
this.perUserDriveChart.update(file, true);
if (file.userHost !== null) {
this.instanceChart.updateDrive(file, true);
}
return file;
}
public async deleteFile(file: DriveFile, isExpired = false) {
if (file.storedInternal) {
this.internalStorageService.del(file.accessKey!);
if (file.thumbnailUrl) {
this.internalStorageService.del(file.thumbnailAccessKey!);
}
if (file.webpublicUrl) {
this.internalStorageService.del(file.webpublicAccessKey!);
}
} else if (!file.isLink) {
this.queueService.createDeleteObjectStorageFileJob(file.accessKey!);
if (file.thumbnailUrl) {
this.queueService.createDeleteObjectStorageFileJob(file.thumbnailAccessKey!);
}
if (file.webpublicUrl) {
this.queueService.createDeleteObjectStorageFileJob(file.webpublicAccessKey!);
}
}
this.deletePostProcess(file, isExpired);
}
public async deleteFileSync(file: DriveFile, isExpired = false) {
if (file.storedInternal) {
this.internalStorageService.del(file.accessKey!);
if (file.thumbnailUrl) {
this.internalStorageService.del(file.thumbnailAccessKey!);
}
if (file.webpublicUrl) {
this.internalStorageService.del(file.webpublicAccessKey!);
}
} else if (!file.isLink) {
const promises = [];
promises.push(this.deleteObjectStorageFile(file.accessKey!));
if (file.thumbnailUrl) {
promises.push(this.deleteObjectStorageFile(file.thumbnailAccessKey!));
}
if (file.webpublicUrl) {
promises.push(this.deleteObjectStorageFile(file.webpublicAccessKey!));
}
await Promise.all(promises);
}
this.deletePostProcess(file, isExpired);
}
private async deletePostProcess(file: DriveFile, isExpired = false) {
// リモートファイル期限切れ削除後は直リンクにする
if (isExpired && file.userHost !== null && file.uri != null) {
this.driveFilesRepository.update(file.id, {
isLink: true,
url: file.uri,
thumbnailUrl: null,
webpublicUrl: null,
storedInternal: false,
// ローカルプロキシ用
accessKey: uuid(),
thumbnailAccessKey: 'thumbnail-' + uuid(),
webpublicAccessKey: 'webpublic-' + uuid(),
});
} else {
this.driveFilesRepository.delete(file.id);
}
// 統計を更新
this.driveChart.update(file, false);
this.perUserDriveChart.update(file, false);
if (file.userHost !== null) {
this.instanceChart.updateDrive(file, false);
}
}
public async deleteObjectStorageFile(key: string) {
const meta = await this.metaService.fetch();
const s3 = this.s3Service.getS3(meta);
await s3.deleteObject({
Bucket: meta.objectStorageBucket!,
Key: key,
}).promise();
}
public async uploadFromUrl({
url,
user,
folderId = null,
uri = null,
sensitive = false,
force = false,
isLink = false,
comment = null,
requestIp = null,
requestHeaders = null,
}: UploadFromUrlArgs): Promise<DriveFile> {
let name = new URL(url).pathname.split('/').pop() ?? null;
if (name == null || !this.driveFileEntityService.validateFileName(name)) {
name = null;
}
// If the comment is same as the name, skip comment
// (image.name is passed in when receiving attachment)
if (comment !== null && name === comment) {
comment = null;
}
// Create temp file
const [path, cleanup] = await createTemp();
try {
// write content at URL to temp file
await this.downloadService.downloadUrl(url, path);
const driveFile = await this.addFile({ user, path, name, comment, folderId, force, isLink, url, uri, sensitive, requestIp, requestHeaders });
this.downloaderLogger.succ(`Got: ${driveFile.id}`);
return driveFile!;
} catch (err) {
this.downloaderLogger.error(`Failed to create drive file: ${err}`, {
url: url,
e: err,
});
throw err;
} finally {
cleanup();
}
}
}

View file

@ -0,0 +1,177 @@
import * as nodemailer from 'nodemailer';
import { Inject, Injectable } from '@nestjs/common';
import { validate as validateEmail } from 'deep-email-validator';
import { MetaService } from '@/core/MetaService.js';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import type Logger from '@/logger.js';
import type { UserProfilesRepository } from '@/models/index.js';
import { LoggerService } from '@/core/LoggerService.js';
@Injectable()
export class EmailService {
private logger: Logger;
constructor(
@Inject(DI.config)
private config: Config,
@Inject(DI.userProfilesRepository)
private userProfilesRepository: UserProfilesRepository,
private metaService: MetaService,
private loggerService: LoggerService,
) {
this.logger = this.loggerService.getLogger('email');
}
public async sendEmail(to: string, subject: string, html: string, text: string) {
const meta = await this.metaService.fetch(true);
const iconUrl = `${this.config.url}/static-assets/mi-white.png`;
const emailSettingUrl = `${this.config.url}/settings/email`;
const enableAuth = meta.smtpUser != null && meta.smtpUser !== '';
const transporter = nodemailer.createTransport({
host: meta.smtpHost,
port: meta.smtpPort,
secure: meta.smtpSecure,
ignoreTLS: !enableAuth,
proxy: this.config.proxySmtp,
auth: enableAuth ? {
user: meta.smtpUser,
pass: meta.smtpPass,
} : undefined,
} as any);
try {
// TODO: htmlサニタイズ
const info = await transporter.sendMail({
from: meta.email!,
to: to,
subject: subject,
text: text,
html: `<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>${ subject }</title>
<style>
html {
background: #eee;
}
body {
padding: 16px;
margin: 0;
font-family: sans-serif;
font-size: 14px;
}
a {
text-decoration: none;
color: #86b300;
}
a:hover {
text-decoration: underline;
}
main {
max-width: 500px;
margin: 0 auto;
background: #fff;
color: #555;
}
main > header {
padding: 32px;
background: #86b300;
}
main > header > img {
max-width: 128px;
max-height: 28px;
vertical-align: bottom;
}
main > article {
padding: 32px;
}
main > article > h1 {
margin: 0 0 1em 0;
}
main > footer {
padding: 32px;
border-top: solid 1px #eee;
}
nav {
box-sizing: border-box;
max-width: 500px;
margin: 16px auto 0 auto;
padding: 0 32px;
}
nav > a {
color: #888;
}
</style>
</head>
<body>
<main>
<header>
<img src="${ meta.logoImageUrl ?? meta.iconUrl ?? iconUrl }"/>
</header>
<article>
<h1>${ subject }</h1>
<div>${ html }</div>
</article>
<footer>
<a href="${ emailSettingUrl }">${ 'Email setting' }</a>
</footer>
</main>
<nav>
<a href="${ this.config.url }">${ this.config.host }</a>
</nav>
</body>
</html>`,
});
this.logger.info(`Message sent: ${info.messageId}`);
} catch (err) {
this.logger.error(err as Error);
throw err;
}
}
public async validateEmailForAccount(emailAddress: string): Promise<{
available: boolean;
reason: null | 'used' | 'format' | 'disposable' | 'mx' | 'smtp';
}> {
const meta = await this.metaService.fetch();
const exist = await this.userProfilesRepository.countBy({
emailVerified: true,
email: emailAddress,
});
const validated = meta.enableActiveEmailValidation ? await validateEmail({
email: emailAddress,
validateRegex: true,
validateMx: true,
validateTypo: false, // TLDを見ているみたいだけどclubとか弾かれるので
validateDisposable: true, // 捨てアドかどうかチェック
validateSMTP: false, // 日本だと25ポートが殆どのプロバイダーで塞がれていてタイムアウトになるので
}) : { valid: true, reason: null };
const available = exist === 0 && validated.valid;
return {
available,
reason: available ? null :
exist !== 0 ? 'used' :
validated.reason === 'regex' ? 'format' :
validated.reason === 'disposable' ? 'disposable' :
validated.reason === 'mx' ? 'mx' :
validated.reason === 'smtp' ? 'smtp' :
null,
};
}
}

View file

@ -0,0 +1,46 @@
import { Inject, Injectable } from '@nestjs/common';
import type { InstancesRepository } from '@/models/index.js';
import type { Instance } from '@/models/entities/Instance.js';
import { Cache } from '@/misc/cache.js';
import { IdService } from '@/core/IdService.js';
import { DI } from '@/di-symbols.js';
import { UtilityService } from './UtilityService.js';
@Injectable()
export class FederatedInstanceService {
private cache: Cache<Instance>;
constructor(
@Inject(DI.instancesRepository)
private instancesRepository: InstancesRepository,
private utilityService: UtilityService,
private idService: IdService,
) {
this.cache = new Cache<Instance>(1000 * 60 * 60);
}
public async registerOrFetchInstanceDoc(host: string): Promise<Instance> {
host = this.utilityService.toPuny(host);
const cached = this.cache.get(host);
if (cached) return cached;
const index = await this.instancesRepository.findOneBy({ host });
if (index == null) {
const i = await this.instancesRepository.insert({
id: this.idService.genId(),
host,
caughtAt: new Date(),
lastCommunicatedAt: new Date(),
}).then(x => this.instancesRepository.findOneByOrFail(x.identifiers[0]));
this.cache.set(host, i);
return i;
} else {
this.cache.set(host, index);
return index;
}
}
}

View file

@ -0,0 +1,291 @@
import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common';
import { JSDOM } from 'jsdom';
import fetch from 'node-fetch';
import tinycolor from 'tinycolor2';
import type { Instance } from '@/models/entities/Instance.js';
import type { InstancesRepository } from '@/models/index.js';
import { AppLockService } from '@/core/AppLockService.js';
import type Logger from '@/logger.js';
import { DI } from '@/di-symbols.js';
import { LoggerService } from '@/core/LoggerService.js';
import { HttpRequestService } from './HttpRequestService.js';
import type { DOMWindow } from 'jsdom';
type NodeInfo = {
openRegistrations?: unknown;
software?: {
name?: unknown;
version?: unknown;
};
metadata?: {
name?: unknown;
nodeName?: unknown;
nodeDescription?: unknown;
description?: unknown;
maintainer?: {
name?: unknown;
email?: unknown;
};
themeColor?: unknown;
};
};
@Injectable()
export class FetchInstanceMetadataService {
private logger: Logger;
constructor(
@Inject(DI.instancesRepository)
private instancesRepository: InstancesRepository,
private appLockService: AppLockService,
private httpRequestService: HttpRequestService,
private loggerService: LoggerService,
) {
this.logger = this.loggerService.getLogger('metadata', 'cyan');
}
public async fetchInstanceMetadata(instance: Instance, force = false): Promise<void> {
const unlock = await this.appLockService.getFetchInstanceMetadataLock(instance.host);
if (!force) {
const _instance = await this.instancesRepository.findOneBy({ host: instance.host });
const now = Date.now();
if (_instance && _instance.infoUpdatedAt && (now - _instance.infoUpdatedAt.getTime() < 1000 * 60 * 60 * 24)) {
unlock();
return;
}
}
this.logger.info(`Fetching metadata of ${instance.host} ...`);
try {
const [info, dom, manifest] = await Promise.all([
this.fetchNodeinfo(instance).catch(() => null),
this.fetchDom(instance).catch(() => null),
this.fetchManifest(instance).catch(() => null),
]);
const [favicon, icon, themeColor, name, description] = await Promise.all([
this.fetchFaviconUrl(instance, dom).catch(() => null),
this.fetchIconUrl(instance, dom, manifest).catch(() => null),
this.getThemeColor(info, dom, manifest).catch(() => null),
this.getSiteName(info, dom, manifest).catch(() => null),
this.getDescription(info, dom, manifest).catch(() => null),
]);
this.logger.succ(`Successfuly fetched metadata of ${instance.host}`);
const updates = {
infoUpdatedAt: new Date(),
} as Record<string, any>;
if (info) {
updates.softwareName = typeof info.software?.name === 'string' ? info.software.name.toLowerCase() : '?';
updates.softwareVersion = info.software?.version;
updates.openRegistrations = info.openRegistrations;
updates.maintainerName = info.metadata ? info.metadata.maintainer ? (info.metadata.maintainer.name ?? null) : null : null;
updates.maintainerEmail = info.metadata ? info.metadata.maintainer ? (info.metadata.maintainer.email ?? null) : null : null;
}
if (name) updates.name = name;
if (description) updates.description = description;
if (icon || favicon) updates.iconUrl = icon ?? favicon;
if (favicon) updates.faviconUrl = favicon;
if (themeColor) updates.themeColor = themeColor;
await this.instancesRepository.update(instance.id, updates);
this.logger.succ(`Successfuly updated metadata of ${instance.host}`);
} catch (e) {
this.logger.error(`Failed to update metadata of ${instance.host}: ${e}`);
} finally {
unlock();
}
}
private async fetchNodeinfo(instance: Instance): Promise<NodeInfo> {
this.logger.info(`Fetching nodeinfo of ${instance.host} ...`);
try {
const wellknown = await this.httpRequestService.getJson('https://' + instance.host + '/.well-known/nodeinfo')
.catch(err => {
if (err.statusCode === 404) {
throw 'No nodeinfo provided';
} else {
throw err.statusCode ?? err.message;
}
}) as Record<string, unknown>;
if (wellknown.links == null || !Array.isArray(wellknown.links)) {
throw 'No wellknown links';
}
const links = wellknown.links as any[];
const lnik1_0 = links.find(link => link.rel === 'http://nodeinfo.diaspora.software/ns/schema/1.0');
const lnik2_0 = links.find(link => link.rel === 'http://nodeinfo.diaspora.software/ns/schema/2.0');
const lnik2_1 = links.find(link => link.rel === 'http://nodeinfo.diaspora.software/ns/schema/2.1');
const link = lnik2_1 ?? lnik2_0 ?? lnik1_0;
if (link == null) {
throw 'No nodeinfo link provided';
}
const info = await this.httpRequestService.getJson(link.href)
.catch(err => {
throw err.statusCode ?? err.message;
});
this.logger.succ(`Successfuly fetched nodeinfo of ${instance.host}`);
return info as NodeInfo;
} catch (err) {
this.logger.error(`Failed to fetch nodeinfo of ${instance.host}: ${err}`);
throw err;
}
}
private async fetchDom(instance: Instance): Promise<DOMWindow['document']> {
this.logger.info(`Fetching HTML of ${instance.host} ...`);
const url = 'https://' + instance.host;
const html = await this.httpRequestService.getHtml(url);
const { window } = new JSDOM(html);
const doc = window.document;
return doc;
}
private async fetchManifest(instance: Instance): Promise<Record<string, unknown> | null> {
const url = 'https://' + instance.host;
const manifestUrl = url + '/manifest.json';
const manifest = await this.httpRequestService.getJson(manifestUrl) as Record<string, unknown>;
return manifest;
}
private async fetchFaviconUrl(instance: Instance, doc: DOMWindow['document'] | null): Promise<string | null> {
const url = 'https://' + instance.host;
if (doc) {
// https://github.com/misskey-dev/misskey/pull/8220#issuecomment-1025104043
const href = Array.from(doc.getElementsByTagName('link')).reverse().find(link => link.relList.contains('icon'))?.href;
if (href) {
return (new URL(href, url)).href;
}
}
const faviconUrl = url + '/favicon.ico';
const favicon = await fetch(faviconUrl, {
// TODO
//timeout: 10000,
agent: url => this.httpRequestService.getAgentByUrl(url),
});
if (favicon.ok) {
return faviconUrl;
}
return null;
}
private async fetchIconUrl(instance: Instance, doc: DOMWindow['document'] | null, manifest: Record<string, any> | null): Promise<string | null> {
if (manifest && manifest.icons && manifest.icons.length > 0 && manifest.icons[0].src) {
const url = 'https://' + instance.host;
return (new URL(manifest.icons[0].src, url)).href;
}
if (doc) {
const url = 'https://' + instance.host;
// https://github.com/misskey-dev/misskey/pull/8220#issuecomment-1025104043
const links = Array.from(doc.getElementsByTagName('link')).reverse();
// https://github.com/misskey-dev/misskey/pull/8220/files/0ec4eba22a914e31b86874f12448f88b3e58dd5a#r796487559
const href =
[
links.find(link => link.relList.contains('apple-touch-icon-precomposed'))?.href,
links.find(link => link.relList.contains('apple-touch-icon'))?.href,
links.find(link => link.relList.contains('icon'))?.href,
]
.find(href => href);
if (href) {
return (new URL(href, url)).href;
}
}
return null;
}
private async getThemeColor(info: NodeInfo | null, doc: DOMWindow['document'] | null, manifest: Record<string, any> | null): Promise<string | null> {
const themeColor = info?.metadata?.themeColor ?? doc?.querySelector('meta[name="theme-color"]')?.getAttribute('content') ?? manifest?.theme_color;
if (themeColor) {
const color = new tinycolor(themeColor);
if (color.isValid()) return color.toHexString();
}
return null;
}
private async getSiteName(info: NodeInfo | null, doc: DOMWindow['document'] | null, manifest: Record<string, any> | null): Promise<string | null> {
if (info && info.metadata) {
if (typeof info.metadata.nodeName === 'string') {
return info.metadata.nodeName;
} else if (typeof info.metadata.name === 'string') {
return info.metadata.name;
}
}
if (doc) {
const og = doc.querySelector('meta[property="og:title"]')?.getAttribute('content');
if (og) {
return og;
}
}
if (manifest) {
return manifest.name ?? manifest.short_name;
}
return null;
}
private async getDescription(info: NodeInfo | null, doc: DOMWindow['document'] | null, manifest: Record<string, any> | null): Promise<string | null> {
if (info && info.metadata) {
if (typeof info.metadata.nodeDescription === 'string') {
return info.metadata.nodeDescription;
} else if (typeof info.metadata.description === 'string') {
return info.metadata.description;
}
}
if (doc) {
const meta = doc.querySelector('meta[name="description"]')?.getAttribute('content');
if (meta) {
return meta;
}
const og = doc.querySelector('meta[property="og:description"]')?.getAttribute('content');
if (og) {
return og;
}
}
if (manifest) {
return manifest.name ?? manifest.short_name;
}
return null;
}
}

View file

@ -0,0 +1,382 @@
import * as fs from 'node:fs';
import * as crypto from 'node:crypto';
import { join } from 'node:path';
import * as stream from 'node:stream';
import * as util from 'node:util';
import { Inject, Injectable } from '@nestjs/common';
import { FSWatcher } from 'chokidar';
import { fileTypeFromFile } from 'file-type';
import FFmpeg from 'fluent-ffmpeg';
import isSvg from 'is-svg';
import probeImageSize from 'probe-image-size';
import { type predictionType } from 'nsfwjs';
import sharp from 'sharp';
import { encode } from 'blurhash';
import { createTempDir } from '@/misc/create-temp.js';
import { AiService } from '@/core/AiService.js';
const pipeline = util.promisify(stream.pipeline);
export type FileInfo = {
size: number;
md5: string;
type: {
mime: string;
ext: string | null;
};
width?: number;
height?: number;
orientation?: number;
blurhash?: string;
sensitive: boolean;
porn: boolean;
warnings: string[];
};
const TYPE_OCTET_STREAM = {
mime: 'application/octet-stream',
ext: null,
};
const TYPE_SVG = {
mime: 'image/svg+xml',
ext: 'svg',
};
@Injectable()
export class FileInfoService {
constructor(
private aiService: AiService,
) {
}
/**
* Get file information
*/
public async getFileInfo(path: string, opts: {
skipSensitiveDetection: boolean;
sensitiveThreshold?: number;
sensitiveThresholdForPorn?: number;
enableSensitiveMediaDetectionForVideos?: boolean;
}): Promise<FileInfo> {
const warnings = [] as string[];
const size = await this.getFileSize(path);
const md5 = await this.calcHash(path);
let type = await this.detectType(path);
// image dimensions
let width: number | undefined;
let height: number | undefined;
let orientation: number | undefined;
if (['image/jpeg', 'image/gif', 'image/png', 'image/apng', 'image/webp', 'image/bmp', 'image/tiff', 'image/svg+xml', 'image/vnd.adobe.photoshop'].includes(type.mime)) {
const imageSize = await this.detectImageSize(path).catch(e => {
warnings.push(`detectImageSize failed: ${e}`);
return undefined;
});
// うまく判定できない画像は octet-stream にする
if (!imageSize) {
warnings.push('cannot detect image dimensions');
type = TYPE_OCTET_STREAM;
} else if (imageSize.wUnits === 'px') {
width = imageSize.width;
height = imageSize.height;
orientation = imageSize.orientation;
// 制限を超えている画像は octet-stream にする
if (imageSize.width > 16383 || imageSize.height > 16383) {
warnings.push('image dimensions exceeds limits');
type = TYPE_OCTET_STREAM;
}
} else {
warnings.push(`unsupported unit type: ${imageSize.wUnits}`);
}
}
let blurhash: string | undefined;
if (['image/jpeg', 'image/gif', 'image/png', 'image/apng', 'image/webp', 'image/svg+xml'].includes(type.mime)) {
blurhash = await this.getBlurhash(path).catch(e => {
warnings.push(`getBlurhash failed: ${e}`);
return undefined;
});
}
let sensitive = false;
let porn = false;
if (!opts.skipSensitiveDetection) {
await this.detectSensitivity(
path,
type.mime,
opts.sensitiveThreshold ?? 0.5,
opts.sensitiveThresholdForPorn ?? 0.75,
opts.enableSensitiveMediaDetectionForVideos ?? false,
).then(value => {
[sensitive, porn] = value;
}, error => {
warnings.push(`detectSensitivity failed: ${error}`);
});
}
return {
size,
md5,
type,
width,
height,
orientation,
blurhash,
sensitive,
porn,
warnings,
};
}
private async detectSensitivity(source: string, mime: string, sensitiveThreshold: number, sensitiveThresholdForPorn: number, analyzeVideo: boolean): Promise<[sensitive: boolean, porn: boolean]> {
let sensitive = false;
let porn = false;
function judgePrediction(result: readonly predictionType[]): [sensitive: boolean, porn: boolean] {
let sensitive = false;
let porn = false;
if ((result.find(x => x.className === 'Sexy')?.probability ?? 0) > sensitiveThreshold) sensitive = true;
if ((result.find(x => x.className === 'Hentai')?.probability ?? 0) > sensitiveThreshold) sensitive = true;
if ((result.find(x => x.className === 'Porn')?.probability ?? 0) > sensitiveThreshold) sensitive = true;
if ((result.find(x => x.className === 'Porn')?.probability ?? 0) > sensitiveThresholdForPorn) porn = true;
return [sensitive, porn];
}
if (['image/jpeg', 'image/png', 'image/webp'].includes(mime)) {
const result = await this.aiService.detectSensitive(source);
if (result) {
[sensitive, porn] = judgePrediction(result);
}
} else if (analyzeVideo && (mime === 'image/apng' || mime.startsWith('video/'))) {
const [outDir, disposeOutDir] = await createTempDir();
try {
const command = FFmpeg()
.input(source)
.inputOptions([
'-skip_frame', 'nokey', // 可能ならキーフレームのみを取得してほしいとする(そうなるとは限らない)
'-lowres', '3', // 元の画質でデコードする必要はないので 1/8 画質でデコードしてもよいとする(そうなるとは限らない)
])
.noAudio()
.videoFilters([
{
filter: 'select', // フレームのフィルタリング
options: {
e: 'eq(pict_type,PICT_TYPE_I)', // I-Frame のみをフィルタするVP9 とかはデコードしてみないとわからないっぽい)
},
},
{
filter: 'blackframe', // 暗いフレームの検出
options: {
amount: '0', // 暗さに関わらず全てのフレームで測定値を取る
},
},
{
filter: 'metadata',
options: {
mode: 'select', // フレーム選択モード
key: 'lavfi.blackframe.pblack', // フレームにおける暗部の百分率(前のフィルタからのメタデータを参照する)
value: '50',
function: 'less', // 50% 未満のフレームを選択する50% 以上暗部があるフレームだと誤検知を招くかもしれないので)
},
},
{
filter: 'scale',
options: {
w: 299,
h: 299,
},
},
])
.format('image2')
.output(join(outDir, '%d.png'))
.outputOptions(['-vsync', '0']); // 可変フレームレートにすることで穴埋めをさせない
const results: ReturnType<typeof judgePrediction>[] = [];
let frameIndex = 0;
let targetIndex = 0;
let nextIndex = 1;
for await (const path of this.asyncIterateFrames(outDir, command)) {
try {
const index = frameIndex++;
if (index !== targetIndex) {
continue;
}
targetIndex = nextIndex;
nextIndex += index; // fibonacci sequence によってフレーム数制限を掛ける
const result = await this.aiService.detectSensitive(path);
if (result) {
results.push(judgePrediction(result));
}
} finally {
fs.promises.unlink(path);
}
}
sensitive = results.filter(x => x[0]).length >= Math.ceil(results.length * sensitiveThreshold);
porn = results.filter(x => x[1]).length >= Math.ceil(results.length * sensitiveThresholdForPorn);
} finally {
disposeOutDir();
}
}
return [sensitive, porn];
}
private async *asyncIterateFrames(cwd: string, command: FFmpeg.FfmpegCommand): AsyncGenerator<string, void> {
const watcher = new FSWatcher({
cwd,
disableGlobbing: true,
});
let finished = false;
command.once('end', () => {
finished = true;
watcher.close();
});
command.run();
for (let i = 1; true; i++) { // eslint-disable-line @typescript-eslint/no-unnecessary-condition
const current = `${i}.png`;
const next = `${i + 1}.png`;
const framePath = join(cwd, current);
if (await this.exists(join(cwd, next))) {
yield framePath;
} else if (!finished) { // eslint-disable-line @typescript-eslint/no-unnecessary-condition
watcher.add(next);
await new Promise<void>((resolve, reject) => {
watcher.on('add', function onAdd(path) {
if (path === next) { // 次フレームの書き出しが始まっているなら、現在フレームの書き出しは終わっている
watcher.unwatch(current);
watcher.off('add', onAdd);
resolve();
}
});
command.once('end', resolve); // 全てのフレームを処理し終わったなら、最終フレームである現在フレームの書き出しは終わっている
command.once('error', reject);
});
yield framePath;
} else if (await this.exists(framePath)) {
yield framePath;
} else {
return;
}
}
}
private exists(path: string): Promise<boolean> {
return fs.promises.access(path).then(() => true, () => false);
}
/**
* Detect MIME Type and extension
*/
public async detectType(path: string): Promise<{
mime: string;
ext: string | null;
}> {
// Check 0 byte
const fileSize = await this.getFileSize(path);
if (fileSize === 0) {
return TYPE_OCTET_STREAM;
}
const type = await fileTypeFromFile(path);
if (type) {
// XMLはSVGかもしれない
if (type.mime === 'application/xml' && await this.checkSvg(path)) {
return TYPE_SVG;
}
return {
mime: type.mime,
ext: type.ext,
};
}
// 種類が不明でもSVGかもしれない
if (await this.checkSvg(path)) {
return TYPE_SVG;
}
// それでも種類が不明なら application/octet-stream にする
return TYPE_OCTET_STREAM;
}
/**
* Check the file is SVG or not
*/
public async checkSvg(path: string) {
try {
const size = await this.getFileSize(path);
if (size > 1 * 1024 * 1024) return false;
return isSvg(fs.readFileSync(path));
} catch {
return false;
}
}
/**
* Get file size
*/
public async getFileSize(path: string): Promise<number> {
const getStat = util.promisify(fs.stat);
return (await getStat(path)).size;
}
/**
* Calculate MD5 hash
*/
private async calcHash(path: string): Promise<string> {
const hash = crypto.createHash('md5').setEncoding('hex');
await pipeline(fs.createReadStream(path), hash);
return hash.read();
}
/**
* Detect dimensions of image
*/
private async detectImageSize(path: string): Promise<{
width: number;
height: number;
wUnits: string;
hUnits: string;
orientation?: number;
}> {
const readable = fs.createReadStream(path);
const imageSize = await probeImageSize(readable);
readable.destroy();
return imageSize;
}
/**
* Calculate average color of image
*/
private getBlurhash(path: string): Promise<string> {
return new Promise((resolve, reject) => {
sharp(path)
.raw()
.ensureAlpha()
.resize(64, 64, { fit: 'inside' })
.toBuffer((err, buffer, { width, height }) => {
if (err) return reject(err);
let hash;
try {
hash = encode(new Uint8ClampedArray(buffer), width, height, 7, 7);
} catch (e) {
return reject(e);
}
resolve(hash);
});
});
}
}

View file

@ -0,0 +1,109 @@
import { Inject, Injectable } from '@nestjs/common';
import Redis from 'ioredis';
import type { User } from '@/models/entities/User.js';
import type { Note } from '@/models/entities/Note.js';
import type { UserList } from '@/models/entities/UserList.js';
import type { UserGroup } from '@/models/entities/UserGroup.js';
import type { Antenna } from '@/models/entities/Antenna.js';
import type { Channel } from '@/models/entities/Channel.js';
import type {
StreamChannels,
AdminStreamTypes,
AntennaStreamTypes,
BroadcastTypes,
ChannelStreamTypes,
DriveStreamTypes,
GroupMessagingStreamTypes,
InternalStreamTypes,
MainStreamTypes,
MessagingIndexStreamTypes,
MessagingStreamTypes,
NoteStreamTypes,
UserListStreamTypes,
UserStreamTypes,
} from '@/server/api/stream/types.js';
import type { Packed } from '@/misc/schema.js';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
@Injectable()
export class GlobalEventService {
constructor(
@Inject(DI.config)
private config: Config,
@Inject(DI.redis)
private redisClient: Redis.Redis,
) {
}
private publish(channel: StreamChannels, type: string | null, value?: any): void {
const message = type == null ? value : value == null ?
{ type: type, body: null } :
{ type: type, body: value };
this.redisClient.publish(this.config.host, JSON.stringify({
channel: channel,
message: message,
}));
}
public publishInternalEvent<K extends keyof InternalStreamTypes>(type: K, value?: InternalStreamTypes[K]): void {
this.publish('internal', type, typeof value === 'undefined' ? null : value);
}
public publishUserEvent<K extends keyof UserStreamTypes>(userId: User['id'], type: K, value?: UserStreamTypes[K]): void {
this.publish(`user:${userId}`, type, typeof value === 'undefined' ? null : value);
}
public publishBroadcastStream<K extends keyof BroadcastTypes>(type: K, value?: BroadcastTypes[K]): void {
this.publish('broadcast', type, typeof value === 'undefined' ? null : value);
}
public publishMainStream<K extends keyof MainStreamTypes>(userId: User['id'], type: K, value?: MainStreamTypes[K]): void {
this.publish(`mainStream:${userId}`, type, typeof value === 'undefined' ? null : value);
}
public publishDriveStream<K extends keyof DriveStreamTypes>(userId: User['id'], type: K, value?: DriveStreamTypes[K]): void {
this.publish(`driveStream:${userId}`, type, typeof value === 'undefined' ? null : value);
}
public publishNoteStream<K extends keyof NoteStreamTypes>(noteId: Note['id'], type: K, value?: NoteStreamTypes[K]): void {
this.publish(`noteStream:${noteId}`, type, {
id: noteId,
body: value,
});
}
public publishChannelStream<K extends keyof ChannelStreamTypes>(channelId: Channel['id'], type: K, value?: ChannelStreamTypes[K]): void {
this.publish(`channelStream:${channelId}`, type, typeof value === 'undefined' ? null : value);
}
public publishUserListStream<K extends keyof UserListStreamTypes>(listId: UserList['id'], type: K, value?: UserListStreamTypes[K]): void {
this.publish(`userListStream:${listId}`, type, typeof value === 'undefined' ? null : value);
}
public publishAntennaStream<K extends keyof AntennaStreamTypes>(antennaId: Antenna['id'], type: K, value?: AntennaStreamTypes[K]): void {
this.publish(`antennaStream:${antennaId}`, type, typeof value === 'undefined' ? null : value);
}
public publishMessagingStream<K extends keyof MessagingStreamTypes>(userId: User['id'], otherpartyId: User['id'], type: K, value?: MessagingStreamTypes[K]): void {
this.publish(`messagingStream:${userId}-${otherpartyId}`, type, typeof value === 'undefined' ? null : value);
}
public publishGroupMessagingStream<K extends keyof GroupMessagingStreamTypes>(groupId: UserGroup['id'], type: K, value?: GroupMessagingStreamTypes[K]): void {
this.publish(`messagingStream:${groupId}`, type, typeof value === 'undefined' ? null : value);
}
public publishMessagingIndexStream<K extends keyof MessagingIndexStreamTypes>(userId: User['id'], type: K, value?: MessagingIndexStreamTypes[K]): void {
this.publish(`messagingIndexStream:${userId}`, type, typeof value === 'undefined' ? null : value);
}
public publishNotesStream(note: Packed<'Note'>): void {
this.publish('notesStream', null, note);
}
public publishAdminStream<K extends keyof AdminStreamTypes>(userId: User['id'], type: K, value?: AdminStreamTypes[K]): void {
this.publish(`adminStream:${userId}`, type, typeof value === 'undefined' ? null : value);
}
}

View file

@ -0,0 +1,147 @@
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { User } from '@/models/entities/User.js';
import { normalizeForSearch } from '@/misc/normalize-for-search.js';
import { IdService } from '@/core/IdService.js';
import type { Hashtag } from '@/models/entities/Hashtag.js';
import HashtagChart from '@/core/chart/charts/hashtag.js';
import type { HashtagsRepository, UsersRepository } from '@/models/index.js';
import { UserEntityService } from './entities/UserEntityService.js';
@Injectable()
export class HashtagService {
constructor(
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
@Inject(DI.hashtagsRepository)
private hashtagsRepository: HashtagsRepository,
private userEntityService: UserEntityService,
private idService: IdService,
private hashtagChart: HashtagChart,
) {
}
public async updateHashtags(user: { id: User['id']; host: User['host']; }, tags: string[]) {
for (const tag of tags) {
await this.updateHashtag(user, tag);
}
}
public async updateUsertags(user: User, tags: string[]) {
for (const tag of tags) {
await this.updateHashtag(user, tag, true, true);
}
for (const tag of (user.tags ?? []).filter(x => !tags.includes(x))) {
await this.updateHashtag(user, tag, true, false);
}
}
public async updateHashtag(user: { id: User['id']; host: User['host']; }, tag: string, isUserAttached = false, inc = true) {
tag = normalizeForSearch(tag);
const index = await this.hashtagsRepository.findOneBy({ name: tag });
if (index == null && !inc) return;
if (index != null) {
const q = this.hashtagsRepository.createQueryBuilder('tag').update()
.where('name = :name', { name: tag });
const set = {} as any;
if (isUserAttached) {
if (inc) {
// 自分が初めてこのタグを使ったなら
if (!index.attachedUserIds.some(id => id === user.id)) {
set.attachedUserIds = () => `array_append("attachedUserIds", '${user.id}')`;
set.attachedUsersCount = () => '"attachedUsersCount" + 1';
}
// 自分が(ローカル内で)初めてこのタグを使ったなら
if (this.userEntityService.isLocalUser(user) && !index.attachedLocalUserIds.some(id => id === user.id)) {
set.attachedLocalUserIds = () => `array_append("attachedLocalUserIds", '${user.id}')`;
set.attachedLocalUsersCount = () => '"attachedLocalUsersCount" + 1';
}
// 自分が(リモートで)初めてこのタグを使ったなら
if (this.userEntityService.isRemoteUser(user) && !index.attachedRemoteUserIds.some(id => id === user.id)) {
set.attachedRemoteUserIds = () => `array_append("attachedRemoteUserIds", '${user.id}')`;
set.attachedRemoteUsersCount = () => '"attachedRemoteUsersCount" + 1';
}
} else {
set.attachedUserIds = () => `array_remove("attachedUserIds", '${user.id}')`;
set.attachedUsersCount = () => '"attachedUsersCount" - 1';
if (this.userEntityService.isLocalUser(user)) {
set.attachedLocalUserIds = () => `array_remove("attachedLocalUserIds", '${user.id}')`;
set.attachedLocalUsersCount = () => '"attachedLocalUsersCount" - 1';
} else {
set.attachedRemoteUserIds = () => `array_remove("attachedRemoteUserIds", '${user.id}')`;
set.attachedRemoteUsersCount = () => '"attachedRemoteUsersCount" - 1';
}
}
} else {
// 自分が初めてこのタグを使ったなら
if (!index.mentionedUserIds.some(id => id === user.id)) {
set.mentionedUserIds = () => `array_append("mentionedUserIds", '${user.id}')`;
set.mentionedUsersCount = () => '"mentionedUsersCount" + 1';
}
// 自分が(ローカル内で)初めてこのタグを使ったなら
if (this.userEntityService.isLocalUser(user) && !index.mentionedLocalUserIds.some(id => id === user.id)) {
set.mentionedLocalUserIds = () => `array_append("mentionedLocalUserIds", '${user.id}')`;
set.mentionedLocalUsersCount = () => '"mentionedLocalUsersCount" + 1';
}
// 自分が(リモートで)初めてこのタグを使ったなら
if (this.userEntityService.isRemoteUser(user) && !index.mentionedRemoteUserIds.some(id => id === user.id)) {
set.mentionedRemoteUserIds = () => `array_append("mentionedRemoteUserIds", '${user.id}')`;
set.mentionedRemoteUsersCount = () => '"mentionedRemoteUsersCount" + 1';
}
}
if (Object.keys(set).length > 0) {
q.set(set);
q.execute();
}
} else {
if (isUserAttached) {
this.hashtagsRepository.insert({
id: this.idService.genId(),
name: tag,
mentionedUserIds: [],
mentionedUsersCount: 0,
mentionedLocalUserIds: [],
mentionedLocalUsersCount: 0,
mentionedRemoteUserIds: [],
mentionedRemoteUsersCount: 0,
attachedUserIds: [user.id],
attachedUsersCount: 1,
attachedLocalUserIds: this.userEntityService.isLocalUser(user) ? [user.id] : [],
attachedLocalUsersCount: this.userEntityService.isLocalUser(user) ? 1 : 0,
attachedRemoteUserIds: this.userEntityService.isRemoteUser(user) ? [user.id] : [],
attachedRemoteUsersCount: this.userEntityService.isRemoteUser(user) ? 1 : 0,
} as Hashtag);
} else {
this.hashtagsRepository.insert({
id: this.idService.genId(),
name: tag,
mentionedUserIds: [user.id],
mentionedUsersCount: 1,
mentionedLocalUserIds: this.userEntityService.isLocalUser(user) ? [user.id] : [],
mentionedLocalUsersCount: this.userEntityService.isLocalUser(user) ? 1 : 0,
mentionedRemoteUserIds: this.userEntityService.isRemoteUser(user) ? [user.id] : [],
mentionedRemoteUsersCount: this.userEntityService.isRemoteUser(user) ? 1 : 0,
attachedUserIds: [],
attachedUsersCount: 0,
attachedLocalUserIds: [],
attachedLocalUsersCount: 0,
attachedRemoteUserIds: [],
attachedRemoteUsersCount: 0,
} as Hashtag);
}
}
if (!isUserAttached) {
this.hashtagChart.update(tag, user);
}
}
}

View file

@ -0,0 +1,154 @@
import * as http from 'node:http';
import * as https from 'node:https';
import CacheableLookup from 'cacheable-lookup';
import fetch from 'node-fetch';
import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent';
import { Inject, Injectable } from '@nestjs/common';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { StatusError } from '@/misc/status-error.js';
import type { Response } from 'node-fetch';
import type { URL } from 'node:url';
@Injectable()
export class HttpRequestService {
/**
* Get http non-proxy agent
*/
private http: http.Agent;
/**
* Get https non-proxy agent
*/
private https: https.Agent;
/**
* Get http proxy or non-proxy agent
*/
public httpAgent: http.Agent;
/**
* Get https proxy or non-proxy agent
*/
public httpsAgent: https.Agent;
constructor(
@Inject(DI.config)
private config: Config,
) {
const cache = new CacheableLookup({
maxTtl: 3600, // 1hours
errorTtl: 30, // 30secs
lookup: false, // nativeのdns.lookupにfallbackしない
});
this.http = new http.Agent({
keepAlive: true,
keepAliveMsecs: 30 * 1000,
lookup: cache.lookup,
} as http.AgentOptions);
this.https = new https.Agent({
keepAlive: true,
keepAliveMsecs: 30 * 1000,
lookup: cache.lookup,
} as https.AgentOptions);
const maxSockets = Math.max(256, config.deliverJobConcurrency ?? 128);
this.httpAgent = config.proxy
? new HttpProxyAgent({
keepAlive: true,
keepAliveMsecs: 30 * 1000,
maxSockets,
maxFreeSockets: 256,
scheduling: 'lifo',
proxy: config.proxy,
})
: this.http;
this.httpsAgent = config.proxy
? new HttpsProxyAgent({
keepAlive: true,
keepAliveMsecs: 30 * 1000,
maxSockets,
maxFreeSockets: 256,
scheduling: 'lifo',
proxy: config.proxy,
})
: this.https;
}
/**
* Get agent by URL
* @param url URL
* @param bypassProxy Allways bypass proxy
*/
public getAgentByUrl(url: URL, bypassProxy = false): http.Agent | https.Agent {
if (bypassProxy || (this.config.proxyBypassHosts || []).includes(url.hostname)) {
return url.protocol === 'http:' ? this.http : this.https;
} else {
return url.protocol === 'http:' ? this.httpAgent : this.httpsAgent;
}
}
public async getJson(url: string, accept = 'application/json, */*', timeout = 10000, headers?: Record<string, string>): Promise<unknown> {
const res = await this.getResponse({
url,
method: 'GET',
headers: Object.assign({
'User-Agent': this.config.userAgent,
Accept: accept,
}, headers ?? {}),
timeout,
});
return await res.json();
}
public async getHtml(url: string, accept = 'text/html, */*', timeout = 10000, headers?: Record<string, string>): Promise<string> {
const res = await this.getResponse({
url,
method: 'GET',
headers: Object.assign({
'User-Agent': this.config.userAgent,
Accept: accept,
}, headers ?? {}),
timeout,
});
return await res.text();
}
public async getResponse(args: {
url: string,
method: string,
body?: string,
headers: Record<string, string>,
timeout?: number,
size?: number,
}): Promise<Response> {
const timeout = args.timeout ?? 10 * 1000;
const controller = new AbortController();
setTimeout(() => {
controller.abort();
}, timeout * 6);
const res = await fetch(args.url, {
method: args.method,
headers: args.headers,
body: args.body,
timeout,
size: args.size ?? 10 * 1024 * 1024,
agent: (url) => this.getAgentByUrl(url),
signal: controller.signal,
});
if (!res.ok) {
throw new StatusError(`${res.status} ${res.statusText}`, res.status, res.statusText);
}
return res;
}
}

View file

@ -0,0 +1,33 @@
import { Inject, Injectable } from '@nestjs/common';
import { ulid } from 'ulid';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { genAid } from '@/misc/id/aid.js';
import { genMeid } from '@/misc/id/meid.js';
import { genMeidg } from '@/misc/id/meidg.js';
import { genObjectId } from '@/misc/id/object-id.js';
@Injectable()
export class IdService {
private metohd: string;
constructor(
@Inject(DI.config)
private config: Config,
) {
this.metohd = config.id.toLowerCase();
}
public genId(date?: Date): string {
if (!date || (date > new Date())) date = new Date();
switch (this.metohd) {
case 'aid': return genAid(date);
case 'meid': return genMeid(date);
case 'meidg': return genMeidg(date);
case 'ulid': return ulid(date.getTime());
case 'objectid': return genObjectId(date);
default: throw new Error('unrecognized id generation method');
}
}
}

Some files were not shown because too many files have changed in this diff Show more