Compare commits
308 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fe705a712 | |||
| 3a448e9e17 | |||
| 6e4def4cc5 | |||
| 34b8fd83c1 | |||
| d5774078e0 | |||
| a3623412f9 | |||
| 1ed60537cf | |||
| 037d670fb7 | |||
| 8b817d50c5 | |||
| fa48060a94 | |||
| b41e982daf | |||
| 2fcb449ed8 | |||
| 218bc54a5f | |||
| 64f0333497 | |||
| 8aa7a5780d | |||
| 17c398bcee | |||
| 76f1455372 | |||
| 1bcad6d7cd | |||
| 9a58d9bcb7 | |||
| c2dcac4413 | |||
| 394273e866 | |||
| 1bcc70c174 | |||
| 188d4ac063 | |||
| 0fbefe2cdc | |||
| eedd5fe4e9 | |||
| 27a1a56223 | |||
| 8e3322776a | |||
| 3d4336c548 | |||
| 0c8c607aa4 | |||
| 60d6734fe2 | |||
| 8c372aa6fc | |||
| d1a74ca8e6 | |||
| c374e0af4c | |||
| 58e8569048 | |||
| 83dbf2a945 | |||
| d7d6d5f644 | |||
| 9aa9885a89 | |||
| 7fe1e083e0 | |||
| a946823554 | |||
| 3a1872c03e | |||
| 5424f9110f | |||
| a597816617 | |||
| fa7a44f6bb | |||
| dfcdcc1833 | |||
| 6345a57498 | |||
| 87457c0ed1 | |||
| 859a1fd528 | |||
| 5069aab584 | |||
| 033fde38fe | |||
| 7b2bab0f9d | |||
| a419ef5319 | |||
| f77dce9f12 | |||
| 4c2cd92f0d | |||
| dd932e1f15 | |||
| 4376810d96 | |||
| c961f4751b | |||
| 9e5ec0c9df | |||
| 112c034e27 | |||
| 664a3ddeea | |||
| 2ffd357d95 | |||
| 2bc4a13964 | |||
| 58324945cc | |||
| 16953ea907 | |||
| d3c2dc8286 | |||
| ebb0b45299 | |||
| 702aa11ecf | |||
| 33221d386e | |||
| 589c159eb9 | |||
| ea1f4d48d5 | |||
| 462c5a1d42 | |||
| f90d7ddee3 | |||
| 175055cf9d | |||
| fe92d95f6c | |||
| 8e50d95a7a | |||
| 9ed36b2aa3 | |||
| 722165a734 | |||
| 74f99e2588 | |||
| 77c08845b5 | |||
| 2bfc26faf2 | |||
| c26f2623a8 | |||
| 451c3b5c88 | |||
| af5674074d | |||
| 28380021a7 | |||
| 37cbf537bb | |||
| 9345a1b7a9 | |||
| d18f1d6d1d | |||
| 621258481d | |||
| ce285bac17 | |||
| a7e45bee11 | |||
| 73e075e216 | |||
| b7c7b6da9f | |||
| 703328601c | |||
| b2e7664339 | |||
| ed22c6b103 | |||
| 94ccbd6190 | |||
| 77edc4849f | |||
| 07da97f434 | |||
| 89dd6be7dd | |||
| 60c1a4264e | |||
| c4c177c530 | |||
| 4a5bffbd57 | |||
| 49b2296015 | |||
| 0ef4a06565 | |||
| 16b1337d67 | |||
| 6599179174 | |||
| f2411f4607 | |||
| 2c3d429b8e | |||
| 7562cf1e75 | |||
| de1c3f3245 | |||
| 5d38c3ad70 | |||
| b55c2ff2f0 | |||
| 056d68804a | |||
| 347bc653d8 | |||
| 6fcece3bc0 | |||
| e119c5bde9 | |||
| 1bc2749e1b | |||
| 58bb07d11d | |||
| affe24b9c6 | |||
| 0bcf063b05 | |||
| 24ecb15119 | |||
| 208c515d70 | |||
| d0ada7fc53 | |||
| d86bd898cb | |||
| db581a955b | |||
| 0b8b1bf25f | |||
| faab5f6b3b | |||
| 6387a1334b | |||
| 10be055381 | |||
| 24c9c7b5a1 | |||
| ac48744aca | |||
| f2d2ecb247 | |||
| 1d46bf8d50 | |||
| 4353f2a92d | |||
| 1b9aeae53c | |||
| 540b9af873 | |||
| d08d2c6958 | |||
| 348259a14b | |||
| e68ca1151d | |||
| 3c15f5a82f | |||
| 5ba823990a | |||
| c82c38fe52 | |||
| e7ab80d5c8 | |||
| 61b68c3a42 | |||
| 6401cb6fb7 | |||
| 9d37408535 | |||
| ded64e1cf0 | |||
| 3b766fc427 | |||
| ad285898f6 | |||
| 78be49d57d | |||
| 25e52788c5 | |||
| 5d25a64f13 | |||
| 0dc89fbf23 | |||
| 94ed0eec2a | |||
| d70e585b64 | |||
| 8f55e50c6e | |||
| c113c99e1d | |||
| 191239584b | |||
| bd1caaf5da | |||
| 76f7b5e7ac | |||
| afe449b951 | |||
| 29f0712ea1 | |||
| d091c24f79 | |||
| f9e7d2bb23 | |||
| dbf36ddf05 | |||
| 8b00853e88 | |||
| 84a3d53075 | |||
| 7967dd91c2 | |||
| b5eb2628f9 | |||
| 4ef6561cc6 | |||
| 7f54f418a8 | |||
| 8f90ea18bf | |||
| e12528aae4 | |||
| 042a1fd2b0 | |||
| be99fe5f99 | |||
| 4a212e5f9e | |||
| c253bdee54 | |||
| 46fc030df4 | |||
| 02277b1ace | |||
| ac507d1d42 | |||
| 5148349098 | |||
| e817941cc5 | |||
| 06962514fe | |||
| c3c8f6804b | |||
| 6dd730030d | |||
| 6c1dd6608d | |||
| 42fb0cf825 | |||
| 2483303138 | |||
| 47e67d9b64 | |||
| 1d042e1bb2 | |||
| 31418b1079 | |||
| 68d79bfa9c | |||
| a46b718937 | |||
| 5570494a37 | |||
| a0cd9dd6bd | |||
| cd5895d560 | |||
| fc8ee1c3bc | |||
| 2a8cc5f3ba | |||
| 82524c9dca | |||
| 864379fb81 | |||
| aae2073146 | |||
| 69963689f9 | |||
| 6ad3359609 | |||
| 6a2ba2260d | |||
| ccbf2124cb | |||
| a733ece26e | |||
| 16624fd742 | |||
| e18be6ec95 | |||
| 1bfed0294f | |||
| d4d32bcc11 | |||
| 0a148721de | |||
| cfe097edf4 | |||
| 578768d7df | |||
| 996dc309f7 | |||
| 09d9164a1c | |||
| 43f32d30cb | |||
| b1d7b3969d | |||
| 89fa208bec | |||
| a11205324b | |||
| 7d17b12000 | |||
| 885dcf91fe | |||
| 192c0f8efd | |||
| 35e71b0f8a | |||
| 1a24ba44b2 | |||
| 7c00d4a88a | |||
| 476310a217 | |||
| 26ffde726f | |||
| 3fd89e6b48 | |||
| be939cf169 | |||
| 4a15bef34f | |||
| 6eee4b0b65 | |||
| f720dcbe9a | |||
| 33fceddc08 | |||
| dfe83aafc5 | |||
| 0775c8f3f9 | |||
| 4cdc1a3655 | |||
| bbd415c392 | |||
| a236f33269 | |||
| 9b593c76e4 | |||
| 012c8d2026 | |||
| cb05571339 | |||
| 64e4550dea | |||
| ec8c17482d | |||
| f167aad0fb | |||
| 24aac22b89 | |||
| 615a5fe346 | |||
| a6699a7319 | |||
| 0f408bc738 | |||
| 44a7953c20 | |||
| 21069ea18e | |||
| 1e1fd49c8c | |||
| 84621d1d27 | |||
| ba4476bf5a | |||
| f87bc455b7 | |||
| 76ec0d2b13 | |||
| 4d547082e0 | |||
| b9b9af6c44 | |||
| 4a4534d6f3 | |||
| 894c4fee2c | |||
| 27a33c833d | |||
| b52d8e4e26 | |||
| b059fb48fc | |||
| f33b057961 | |||
| 663ca4f530 | |||
| 5892c0b088 | |||
| 044a24eac8 | |||
| b93ebedaf3 | |||
| 8539bdaf72 | |||
| c1abd3d6f9 | |||
| becb40544c | |||
| ee96d2b754 | |||
| 30093d3a9f | |||
| 29f2239e3f | |||
| 7f1b33a567 | |||
| d0dd23a1af | |||
| f8774223d4 | |||
| bca870f1f8 | |||
| 64d38c88e8 | |||
| 3ac94b3e43 | |||
| 254eef6a2a | |||
| f1255f477f | |||
| 6c7b95c1b9 | |||
| e7d17caf9d | |||
| 71dd80f125 | |||
| ed4761e841 | |||
| fe05f9a58e | |||
| 51e5a401a5 | |||
| f1990b782d | |||
| 4e3ed0f4c1 | |||
| fdb58215c0 | |||
| 47c8711933 | |||
| 20a099c16f | |||
| 3824e4ba25 | |||
| b163fc8423 | |||
| b50f723a4d | |||
| b778933c64 | |||
| 12b97ce713 | |||
| 4025a45d52 | |||
| 8a6d832513 | |||
| 0b0b3a158f | |||
| 6b745ca8f0 | |||
| 1f0cb7e05c | |||
| c59821945d | |||
| 1a723b78b7 | |||
| e7ff7e3263 | |||
| 3a6c1aeeef | |||
| 567e011a66 | |||
| eaf63e0b17 | |||
| 63b31a9154 |
@@ -0,0 +1,10 @@
|
||||
[target.wasm32-unknown-unknown]
|
||||
# required for clippy
|
||||
rustflags = [
|
||||
"--cfg", "web_sys_unstable_apis",
|
||||
]
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
rustflags = [
|
||||
"--cfg", "web_sys_unstable_apis",
|
||||
]
|
||||
+13
-9
@@ -10,7 +10,7 @@ executors:
|
||||
type: boolean
|
||||
default: false
|
||||
docker:
|
||||
- image: plumeorg/plume-buildenv:v0.3.0
|
||||
- image: plumeorg/plume-buildenv:v0.4.0
|
||||
- image: <<#parameters.postgres>>circleci/postgres:9.6-alpine<</parameters.postgres>><<^parameters.postgres>>alpine:latest<</parameters.postgres>>
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
@@ -21,6 +21,7 @@ executors:
|
||||
RUST_TEST_THREADS: 1
|
||||
FEATURES: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>>
|
||||
DATABASE_URL: <<#parameters.postgres>>postgres://postgres@localhost/plume<</parameters.postgres>><<^parameters.postgres>>plume.sqlite<</parameters.postgres>>
|
||||
ROCKET_SECRET_KEY: VN5xV1DN7XdpATadOCYcuGeR/dV0hHfgx9mx9TarLdM=
|
||||
|
||||
|
||||
commands:
|
||||
@@ -71,7 +72,7 @@ commands:
|
||||
type: string
|
||||
steps:
|
||||
- run: |
|
||||
export RUSTFLAGS="-Zprofile -Zfewer-names -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads -Clink-arg=-Xlinker -Clink-arg=--no-keep-memory -Clink-arg=-Xlinker -Clink-arg=--reduce-memory-overheads"
|
||||
export RUSTFLAGS="-Zprofile -Zfewer-names -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Clink-arg=-Xlinker -Clink-arg=--no-keep-memory -Clink-arg=-Xlinker -Clink-arg=--reduce-memory-overheads"
|
||||
export CARGO_INCREMENTAL=0
|
||||
<< parameters.cmd >>
|
||||
|
||||
@@ -99,7 +100,7 @@ commands:
|
||||
steps:
|
||||
- run: |
|
||||
cmd="cargo build <<#parameters.release>>--release<</parameters.release>> --no-default-features --features="${FEATURES}" -p <<parameters.package>> -j"
|
||||
for i in 36 4 2 1 1; do
|
||||
for i in 16 4 2 1 1; do
|
||||
$cmd $i && exit 0
|
||||
done
|
||||
exit 1
|
||||
@@ -143,11 +144,14 @@ jobs:
|
||||
cache: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>>
|
||||
- run_with_coverage:
|
||||
cmd: |
|
||||
cargo build -p plume-cli --no-default-features --features=${FEATURES} -j 4
|
||||
./target/debug/plm migration run
|
||||
./target/debug/plm search init
|
||||
cmd="cargo test --all --exclude plume-front --exclude plume-macro --no-run --no-default-features --features=${FEATURES} -j"
|
||||
for i in 36 4 2 1 1; do
|
||||
for i in 16 4 2 1 1; do
|
||||
$cmd $i && break
|
||||
done
|
||||
cargo test --all --exclude plume-front --exclude plume-macro --no-default-features --features="${FEATURES}" -j1 -- --test-threads=1
|
||||
cargo test --all --exclude plume-front --exclude plume-macro --no-default-features --features="${FEATURES}" -j1
|
||||
- upload_coverage:
|
||||
type: unit
|
||||
- cache:
|
||||
@@ -164,18 +168,18 @@ jobs:
|
||||
steps:
|
||||
- restore_env:
|
||||
cache: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>>
|
||||
- run: cargo web deploy -p plume-front
|
||||
- run: wasm-pack build --target web --release plume-front
|
||||
- run_with_coverage:
|
||||
cmd: |
|
||||
cmd="cargo install --debug --no-default-features --features="${FEATURES}",test --force --path . -j"
|
||||
for i in 36 4 2 1 1; do
|
||||
for i in 16 4 2 1 1; do
|
||||
$cmd $i && exit 0
|
||||
done
|
||||
exit 1
|
||||
- run_with_coverage:
|
||||
cmd: |
|
||||
cmd="cargo install --debug --no-default-features --features="${FEATURES}" --force --path plume-cli -j"
|
||||
for i in 36 4 2 1 1; do
|
||||
for i in 16 4 2 1 1; do
|
||||
$cmd $i && exit 0
|
||||
done
|
||||
exit 1
|
||||
@@ -199,7 +203,7 @@ jobs:
|
||||
steps:
|
||||
- restore_env:
|
||||
cache: release-<<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>>
|
||||
- run: cargo web deploy -p plume-front --release
|
||||
- run: wasm-pack build --target web --release plume-front
|
||||
- build:
|
||||
package: plume
|
||||
release: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM debian:buster-20201117
|
||||
FROM debian:buster-20210208
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
|
||||
#install native/circleci/build dependancies
|
||||
@@ -11,12 +11,12 @@ RUN apt update &&\
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#install and configure rust
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2020-12-07 -y &&\
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2021-01-15 -y &&\
|
||||
rustup component add rustfmt clippy &&\
|
||||
rustup component add rust-std --target wasm32-unknown-unknown
|
||||
|
||||
#compile some deps
|
||||
RUN cargo install cargo-web &&\
|
||||
RUN cargo install wasm-pack &&\
|
||||
cargo install grcov &&\
|
||||
strip /root/.cargo/bin/* &&\
|
||||
rm -fr ~/.cargo/registry
|
||||
|
||||
@@ -15,6 +15,9 @@ DATABASE_URL=postgres://plume:plume@localhost/plume
|
||||
# The domain of your instance
|
||||
BASE_URL=plu.me
|
||||
|
||||
# Log level for each crate
|
||||
RUST_LOG=info
|
||||
|
||||
# The secret key for private cookies and CSRF protection
|
||||
# You can generate one with `openssl rand -base64 32`
|
||||
ROCKET_SECRET_KEY=
|
||||
|
||||
@@ -19,3 +19,4 @@ search_index
|
||||
.buildconfig
|
||||
__pycache__
|
||||
.vscode/
|
||||
*-journal
|
||||
|
||||
+28
-1
@@ -4,6 +4,33 @@
|
||||
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
### Added
|
||||
|
||||
- Allow `dir` attributes for LtoR text in RtoL document (#860)
|
||||
- More translation languages (#862)
|
||||
- Proxy support (#829)
|
||||
- Riker a actor system library (#870)
|
||||
- (request-target) and Host header in HTTP Signature (#872)
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade some dependent crates (#858)
|
||||
- Use tracing crate (#868)
|
||||
- Update Rust version to nightly-2021-01-15 (#878)
|
||||
- Upgrade Tantivy to 0.13.3 and lindera-tantivy to 0.7.1 (#878)
|
||||
- Run searcher on actor system (#870)
|
||||
- Use article title as its slug instead of capitalizing and inserting hyphens (#920)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Percent-encode URI for remote_interact (#866, #857)
|
||||
- Menu animation not opening on iOS (#876, #897)
|
||||
- Make actors subscribe to channel once (#913)
|
||||
- Upsert posts and media instead of trying to insert and fail (#912)
|
||||
- Update post's ActivityPub id when published by update (#915)
|
||||
- Calculate media URI properly even when MEDIA_UPLOAD_DIRECTORY configured (#916)
|
||||
- Prevent duplicated posts in 'all' timeline (#917)
|
||||
|
||||
## [[0.6.0]] - 2020-12-29
|
||||
|
||||
### Added
|
||||
@@ -34,7 +61,7 @@
|
||||
|
||||
### Security
|
||||
|
||||
- Validate spoofing of Create activity
|
||||
- Validate spoofing of activity
|
||||
|
||||
## [0.5.0] - 2020-06-21
|
||||
|
||||
|
||||
Generated
+2702
-2285
File diff suppressed because it is too large
Load Diff
+9
-10
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
authors = ["Plume contributors"]
|
||||
name = "plume"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1-dev"
|
||||
repository = "https://github.com/Plume-org/Plume"
|
||||
edition = "2018"
|
||||
|
||||
@@ -10,29 +10,28 @@ activitypub = "0.1.3"
|
||||
askama_escape = "0.1"
|
||||
atom_syndication = "0.6"
|
||||
clap = "2.33"
|
||||
colored = "1.8"
|
||||
dotenv = "0.14"
|
||||
dotenv = "0.15.0"
|
||||
gettext = { git = "https://github.com/Plume-org/gettext/", rev = "294c54d74c699fbc66502b480a37cc66c1daa7f3" }
|
||||
gettext-macros = { git = "https://github.com/Plume-org/gettext-macros/", rev = "a7c605f7edd6bfbfbfe7778026bfefd88d82db10" }
|
||||
gettext-utils = { git = "https://github.com/Plume-org/gettext-macros/", rev = "a7c605f7edd6bfbfbfe7778026bfefd88d82db10" }
|
||||
guid-create = "0.1"
|
||||
heck = "0.3.0"
|
||||
lettre = "0.9.2"
|
||||
lettre_email = "0.9.2"
|
||||
num_cpus = "1.10"
|
||||
rocket = "0.4.5"
|
||||
rocket_contrib = { version = "0.4.5", features = ["json"] }
|
||||
rocket = "=0.4.6"
|
||||
rocket_contrib = { version = "=0.4.5", features = ["json"] }
|
||||
rocket_i18n = { git = "https://github.com/Plume-org/rocket_i18n", rev = "e922afa7c366038b3433278c03b1456b346074f2" }
|
||||
rpassword = "4.0"
|
||||
scheduled-thread-pool = "0.2.2"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_qs = "0.5"
|
||||
shrinkwraprs = "0.2.1"
|
||||
syntect = "3.3"
|
||||
validator = "0.8"
|
||||
validator_derive = "0.8"
|
||||
webfinger = "0.4.1"
|
||||
tracing = "0.1.22"
|
||||
tracing-subscriber = "0.2.15"
|
||||
riker = "0.4.2"
|
||||
|
||||
[[bin]]
|
||||
name = "plume"
|
||||
@@ -48,7 +47,7 @@ version = "3.1.2"
|
||||
|
||||
[dependencies.diesel]
|
||||
features = ["r2d2", "chrono"]
|
||||
version = "*"
|
||||
version = "1.4.5"
|
||||
|
||||
[dependencies.multipart]
|
||||
default-features = false
|
||||
@@ -69,7 +68,7 @@ git = "https://github.com/fdb-hiroshima/rocket_csrf"
|
||||
rev = "29910f2829e7e590a540da3804336577b48c7b31"
|
||||
|
||||
[build-dependencies]
|
||||
ructe = "0.9.0"
|
||||
ructe = "0.13.0"
|
||||
rsass = "0.9"
|
||||
|
||||
[features]
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh
|
||||
|
||||
WORKDIR /app
|
||||
COPY Cargo.toml Cargo.lock rust-toolchain ./
|
||||
RUN cargo install cargo-web
|
||||
RUN cargo install wasm-pack
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ RUN chmod a+x ./wasm-deps.sh && sleep 1 && ./wasm-deps.sh
|
||||
WORKDIR /app
|
||||
COPY Cargo.toml Cargo.lock rust-toolchain ./
|
||||
RUN cargo install diesel_cli --no-default-features --features postgres --version '=1.3.0'
|
||||
RUN cargo install cargo-web
|
||||
RUN cargo install wasm-pack
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ A lot of features are still missing, but what is already here should be quite st
|
||||
- **Media management**: you can upload pictures to illustrate your articles, but also audio files if you host a podcast, and manage them all from Plume.
|
||||
- **Federation**: Plume is part of a network of interconnected websites called the Fediverse. Each of these websites (often called *instances*) have their own
|
||||
rules and thematics, but they can all communicate with each other.
|
||||
- **Collaborative writing**: invite other people to your blogs, and write articles together.
|
||||
- **Collaborative writing**: invite other people to your blogs, and write articles together. (Not implemented yet, but will be in 1.0)
|
||||
|
||||
## Get involved
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
* {
|
||||
font-family: monospace;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
@@ -64,41 +64,41 @@ main header.article {
|
||||
}
|
||||
|
||||
main .article-info {
|
||||
margin: 0 auto 3em;
|
||||
font-size: 0.95em;
|
||||
font-weight: 400;
|
||||
margin: 0 auto 3em;
|
||||
font-size: 0.95em;
|
||||
font-weight: 400;
|
||||
|
||||
.author, .author a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.author, .author a {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
/* The article itself */
|
||||
main article {
|
||||
max-width: $article-width;
|
||||
margin: 2.5em auto;
|
||||
font-family: $lora;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.7;
|
||||
margin: 2.5em auto;
|
||||
font-family: $lora;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.7;
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
margin: 3em auto;
|
||||
max-width: 100%;
|
||||
img {
|
||||
display: block;
|
||||
margin: 3em auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 1em;
|
||||
background: $gray;
|
||||
overflow: auto;
|
||||
padding: 1em;
|
||||
background: $gray;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 5px solid $gray;
|
||||
border-inline-start: 5px solid $gray;
|
||||
margin: 1em auto;
|
||||
padding: 0em 2em;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ main .article-meta {
|
||||
|
||||
> p {
|
||||
margin: 2em $horizontal-margin;
|
||||
font-size: 0.9em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* Article Tags */
|
||||
@@ -157,15 +157,15 @@ main .article-meta {
|
||||
/* Likes & Boosts */
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.likes, .reshares {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.5em 0;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.5em 0;
|
||||
|
||||
p {
|
||||
font-size: 1.5em;
|
||||
@@ -175,34 +175,34 @@ main .article-meta {
|
||||
|
||||
.action {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
color: $text-color;
|
||||
border: none;
|
||||
font-size: 1.1em;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
color: $text-color;
|
||||
border: none;
|
||||
font-size: 1.1em;
|
||||
cursor: pointer;
|
||||
|
||||
svg.feather {
|
||||
transition: background 0.1s ease-in;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
svg.feather {
|
||||
transition: background 0.1s ease-in;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
margin: 0.5em 0;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
margin: 0.5em 0;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
|
||||
border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&.reshared, &.liked {
|
||||
svg.feather {
|
||||
color: $background;
|
||||
font-weight: 900;
|
||||
color: $background;
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,14 +213,14 @@ main .article-meta {
|
||||
|
||||
.action svg.feather {
|
||||
padding: 0.7em;
|
||||
box-sizing: border-box;
|
||||
color: $red;
|
||||
fill: none;
|
||||
border: solid $red thin;
|
||||
box-sizing: border-box;
|
||||
color: $red;
|
||||
fill: none;
|
||||
border: solid $red thin;
|
||||
}
|
||||
|
||||
.action:hover svg.feather {
|
||||
background: transparentize($red, 0.85);
|
||||
background: transparentize($red, 0.85);
|
||||
}
|
||||
|
||||
.action.liked svg.feather {
|
||||
@@ -238,22 +238,22 @@ main .article-meta {
|
||||
|
||||
.action svg.feather {
|
||||
padding: 0.7em;
|
||||
box-sizing: border-box;
|
||||
color: $primary;
|
||||
border: solid $primary thin;
|
||||
font-weight: 600;
|
||||
box-sizing: border-box;
|
||||
color: $primary;
|
||||
border: solid $primary thin;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.action:hover svg.feather {
|
||||
background: transparentize($primary, 0.85);
|
||||
background: transparentize($primary, 0.85);
|
||||
}
|
||||
|
||||
.action.reshared svg.feather {
|
||||
background: $primary;
|
||||
}
|
||||
.action.reshared:hover svg.feather {
|
||||
background: transparentize($primary, 0.75)
|
||||
color: $primary;
|
||||
background: transparentize($primary, 0.75)
|
||||
color: $primary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,9 +262,9 @@ main .article-meta {
|
||||
margin: 0 $horizontal-margin;
|
||||
|
||||
h2 {
|
||||
color: $primary;
|
||||
font-size: 1.5em;
|
||||
font-weight: 600;
|
||||
color: $primary;
|
||||
font-size: 1.5em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
summary {
|
||||
@@ -279,16 +279,16 @@ main .article-meta {
|
||||
|
||||
// Respond & delete comment buttons
|
||||
a.button, form.inline, form.inline input {
|
||||
padding: 0;
|
||||
background: none;
|
||||
color: $text-color;
|
||||
margin-right: 2em;
|
||||
font-family: $route159;
|
||||
padding: 0;
|
||||
background: none;
|
||||
color: $text-color;
|
||||
margin-right: 2em;
|
||||
font-family: $route159;
|
||||
font-weight: normal;
|
||||
|
||||
&::before {
|
||||
color: $primary;
|
||||
padding-right: 0.5em;
|
||||
&::before {
|
||||
color: $primary;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
&:hover { color: $primary; }
|
||||
@@ -296,8 +296,8 @@ main .article-meta {
|
||||
|
||||
.comment {
|
||||
margin: 1em 0;
|
||||
font-size: 1em;
|
||||
border: none;
|
||||
font-size: 1em;
|
||||
border: none;
|
||||
|
||||
.content {
|
||||
background: $gray;
|
||||
@@ -328,36 +328,36 @@ main .article-meta {
|
||||
color: transparentize($text-color, 0.6);
|
||||
}
|
||||
|
||||
.author {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
.author {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
|
||||
* {
|
||||
transition: all 0.1s ease-in;
|
||||
}
|
||||
* {
|
||||
transition: all 0.1s ease-in;
|
||||
}
|
||||
|
||||
.display-name {
|
||||
color: $text-color;
|
||||
.display-name {
|
||||
color: $text-color;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.display-name { color: $primary; }
|
||||
small { opacity: 1; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > .comment {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.text {
|
||||
padding: 1.25em 0;
|
||||
font-family: $lora;
|
||||
font-size: 1.1em;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
.text {
|
||||
padding: 1.25em 0;
|
||||
font-family: $lora;
|
||||
font-size: 1.1em;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
label {
|
||||
display: block;
|
||||
margin: 2em auto .5em;
|
||||
font-size: 1.2em;
|
||||
display: block;
|
||||
margin: 2em auto .5em;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
input, textarea, select {
|
||||
transition: all 0.1s ease-in;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
padding: 1em;
|
||||
box-sizing: border-box;
|
||||
transition: all 0.1s ease-in;
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
padding: 1em;
|
||||
box-sizing: border-box;
|
||||
-webkit-appearance: textarea;
|
||||
|
||||
background: $form-input-background;
|
||||
color: $text-color;
|
||||
border: solid $form-input-border thin;
|
||||
background: $form-input-background;
|
||||
color: $text-color;
|
||||
border: solid $form-input-border thin;
|
||||
|
||||
font-size: 1.2em;
|
||||
font-weight: 400;
|
||||
font-size: 1.2em;
|
||||
font-weight: 400;
|
||||
|
||||
&:focus {
|
||||
border-color: $primary;
|
||||
}
|
||||
&:focus {
|
||||
border-color: $primary;
|
||||
}
|
||||
}
|
||||
form input[type="submit"] {
|
||||
margin: 2em auto;
|
||||
@@ -29,18 +29,18 @@ form input[type="submit"] {
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
resize: vertical;
|
||||
overflow-y: scroll;
|
||||
font-family: $lora;
|
||||
font-size: 1.1em;
|
||||
line-height: 1.5;
|
||||
font-family: $lora;
|
||||
font-size: 1.1em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
display: inline;
|
||||
margin: initial;
|
||||
min-width: initial;
|
||||
width: initial;
|
||||
display: inline;
|
||||
margin: initial;
|
||||
min-width: initial;
|
||||
width: initial;
|
||||
-webkit-appearance: checkbox;
|
||||
}
|
||||
|
||||
@@ -71,31 +71,31 @@ form.inline {
|
||||
}
|
||||
|
||||
.button, .button:visited, input[type="submit"], input[type="submit"].button {
|
||||
transition: all 0.1s ease-in;
|
||||
display: inline-block;
|
||||
transition: all 0.1s ease-in;
|
||||
display: inline-block;
|
||||
-webkit-appearance: none;
|
||||
|
||||
margin: 0.5em auto;
|
||||
padding: 0.75em 1em;
|
||||
margin: 0.5em auto;
|
||||
padding: 0.75em 1em;
|
||||
|
||||
background: $primary;
|
||||
color: $primary-text-color;
|
||||
background: $primary;
|
||||
color: $primary-text-color;
|
||||
font-weight: bold;
|
||||
border: none;
|
||||
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: transparentize($primary, 0.1);
|
||||
}
|
||||
&:hover {
|
||||
background: transparentize($primary, 0.1);
|
||||
}
|
||||
|
||||
&.destructive {
|
||||
background: $red;
|
||||
&.destructive {
|
||||
background: $red;
|
||||
|
||||
&:hover {
|
||||
background: transparentize($red, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.secondary {
|
||||
background: $gray;
|
||||
@@ -115,20 +115,20 @@ input[type="submit"] {
|
||||
form.new-post {
|
||||
max-width: 60em;
|
||||
.title {
|
||||
margin: 0 auto;
|
||||
padding: 0.75em 0;
|
||||
margin: 0 auto;
|
||||
padding: 0.75em 0;
|
||||
|
||||
background: none;
|
||||
border: none;
|
||||
background: none;
|
||||
border: none;
|
||||
|
||||
font-family: $playfair;
|
||||
font-size: 2em;
|
||||
text-align: left;
|
||||
font-family: $playfair;
|
||||
font-size: 2em;
|
||||
text-align: left;
|
||||
}
|
||||
textarea {
|
||||
min-height: 20em;
|
||||
overflow-y: scroll;
|
||||
resize: none;
|
||||
min-height: 20em;
|
||||
overflow-y: scroll;
|
||||
resize: none;
|
||||
-webkit-appearance: textarea;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,43 +6,43 @@ html {
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: $background;
|
||||
color: $text-color;
|
||||
font-family: $route159;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: $background;
|
||||
color: $text-color;
|
||||
font-family: $route159;
|
||||
|
||||
::selection {
|
||||
background: transparentize($primary, 0.7);
|
||||
}
|
||||
::-moz-selection {
|
||||
::-moz-selection {
|
||||
background: transparentize($primary, 0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: $primary;
|
||||
text-decoration: none;
|
||||
color: $primary;
|
||||
text-decoration: none;
|
||||
}
|
||||
a::selection {
|
||||
color: $background;
|
||||
color: $background;
|
||||
}
|
||||
a::-moz-selection {
|
||||
color: $background;
|
||||
color: $background;
|
||||
}
|
||||
small {
|
||||
margin-left: 1em;
|
||||
color: transparentize($text-color, 0.6);
|
||||
font-size: 0.75em;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
margin-left: 1em;
|
||||
color: transparentize($text-color, 0.6);
|
||||
font-size: 0.75em;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
opacity: 0.6;
|
||||
padding: 5em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
opacity: 0.6;
|
||||
padding: 5em;
|
||||
}
|
||||
|
||||
.right {
|
||||
@@ -53,28 +53,28 @@ small {
|
||||
}
|
||||
|
||||
.spaced {
|
||||
margin: 4rem 0;
|
||||
margin: 4rem 0;
|
||||
}
|
||||
|
||||
.banner {
|
||||
background: $gray;
|
||||
padding-top: 2em;
|
||||
padding-bottom: 1em;
|
||||
margin: 3em 0px;
|
||||
background: $gray;
|
||||
padding-top: 2em;
|
||||
padding-bottom: 1em;
|
||||
margin: 3em 0px;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
appearance: none;
|
||||
display: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
/* Main */
|
||||
body > main > *, .h-feed > * {
|
||||
margin: 1em $horizontal-margin;
|
||||
margin: 1em $horizontal-margin;
|
||||
}
|
||||
|
||||
body > main > .h-entry, .h-feed {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body > main {
|
||||
@@ -98,18 +98,18 @@ main {
|
||||
margin-top: 1em;
|
||||
|
||||
&.article {
|
||||
margin: 1em auto 0.5em;
|
||||
font-family: $playfair;
|
||||
font-size: 2.5em;
|
||||
font-weight: normal;
|
||||
margin: 1em auto 0.5em;
|
||||
font-family: $playfair;
|
||||
font-size: 2.5em;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.75em;
|
||||
font-weight: 300;
|
||||
font-size: 1.75em;
|
||||
font-weight: 300;
|
||||
|
||||
&.article {
|
||||
&.article {
|
||||
font-size: 1.25em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
@@ -139,15 +139,15 @@ main {
|
||||
|
||||
/* Errors */
|
||||
p.error {
|
||||
color: $red;
|
||||
font-weight: bold;
|
||||
color: $red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* User page */
|
||||
.user h1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
@@ -156,14 +156,14 @@ p.error {
|
||||
}
|
||||
|
||||
.badge {
|
||||
margin-right: 1em;
|
||||
padding: 0.35em 1em;
|
||||
margin-right: 1em;
|
||||
padding: 0.35em 1em;
|
||||
|
||||
background: $background;
|
||||
color: $primary;
|
||||
border: 1px solid $primary;
|
||||
background: $background;
|
||||
color: $primary;
|
||||
border: 1px solid $primary;
|
||||
|
||||
font-size: 1rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.user-summary {
|
||||
@@ -172,23 +172,25 @@ p.error {
|
||||
|
||||
/* Cards */
|
||||
.cards {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 5%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 5%;
|
||||
margin: 1rem 0 5rem;
|
||||
}
|
||||
.card {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
min-width: 20em;
|
||||
min-height: 20em;
|
||||
margin: 1em;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
background: $gray;
|
||||
min-width: 20em;
|
||||
min-height: 20em;
|
||||
margin: 1em;
|
||||
box-sizing: border-box;
|
||||
|
||||
background: $gray;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -213,38 +215,54 @@ p.error {
|
||||
}
|
||||
|
||||
|
||||
> * {
|
||||
margin: 20px;
|
||||
}
|
||||
> * {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.cover {
|
||||
.cover {
|
||||
min-height: 10em;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
margin: 0px;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0.75em 20px;
|
||||
font-family: $playfair;
|
||||
font-size: 1.75em;
|
||||
font-weight: normal;
|
||||
a {
|
||||
transition: color 0.1s ease-in;
|
||||
color: $text-color;
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
font-family: $playfair;
|
||||
font-size: 1.75em;
|
||||
font-weight: normal;
|
||||
line-height: 1.75;
|
||||
a {
|
||||
display: block;
|
||||
transition: color 0.1s ease-in;
|
||||
color: $text-color;
|
||||
|
||||
&:hover { color: $primary; }
|
||||
}
|
||||
&:hover { color: $primary; }
|
||||
}
|
||||
}
|
||||
|
||||
.controls {
|
||||
float: right;
|
||||
|
||||
.button {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
flex: 1;
|
||||
|
||||
font-family: $lora;
|
||||
font-size: 1em;
|
||||
line-height: 1.25;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
font-family: $lora;
|
||||
font-size: 1em;
|
||||
line-height: 1.25;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,15 +304,15 @@ p.error {
|
||||
|
||||
/* Stats */
|
||||
.stats {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin: 2em;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin: 2em;
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
> div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
p {
|
||||
|
||||
@@ -3,8 +3,8 @@ body > header {
|
||||
|
||||
#content {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
nav#menu {
|
||||
@@ -19,44 +19,44 @@ body > header {
|
||||
|
||||
a {
|
||||
transform: skewX(15deg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: $gray;
|
||||
font-size: 1.33em;
|
||||
}
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: $gray;
|
||||
font-size: 1.33em;
|
||||
}
|
||||
}
|
||||
|
||||
nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
hr {
|
||||
height: 100%;
|
||||
width: 0.2em;
|
||||
background: $primary;
|
||||
border: none;
|
||||
transform: skewX(-15deg);
|
||||
hr {
|
||||
height: 100%;
|
||||
width: 0.2em;
|
||||
background: $primary;
|
||||
border: none;
|
||||
transform: skewX(-15deg);
|
||||
}
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
align-self: stretch;
|
||||
margin: 0;
|
||||
padding: 0 2em;
|
||||
font-size: 1em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
align-self: stretch;
|
||||
margin: 0;
|
||||
padding: 0 2em;
|
||||
font-size: 1em;
|
||||
|
||||
i { font-size: 1.2em; }
|
||||
i { font-size: 1.2em; }
|
||||
|
||||
&.title {
|
||||
margin: 0;
|
||||
&.title {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
padding: 0.5em 1em;
|
||||
font-size: 1.75em;
|
||||
@@ -70,7 +70,7 @@ body > header {
|
||||
margin: 0;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,6 +115,18 @@ body > header {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes menuOpening {
|
||||
from {
|
||||
-webkit-transform: scaleX(0);
|
||||
transform-origin: left;
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
-webkit-transform: scaleX(1);
|
||||
transform-origin: left;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
body > header {
|
||||
flex-direction: column;
|
||||
@@ -132,7 +144,7 @@ body > header {
|
||||
}
|
||||
}
|
||||
|
||||
body > header:focus-within #content, #content.show {
|
||||
body > header:focus-within #content, .show + #content {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -193,34 +205,33 @@ body > header {
|
||||
|
||||
/* Only enable label animations on large screens */
|
||||
@media screen and (min-width: 600px) {
|
||||
header nav a {
|
||||
i {
|
||||
transition: all 0.2s ease;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mobile-label {
|
||||
transition: all 0.2s ease;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
transform: translateZ(0);
|
||||
opacity: 0;
|
||||
font-size: 0.9em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
img + .mobile-label { display: none; }
|
||||
|
||||
&:hover {
|
||||
i { margin-bottom: 0.75em; }
|
||||
.mobile-label {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, 80%);
|
||||
}
|
||||
header nav a {
|
||||
i {
|
||||
transition: all 0.2s ease;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mobile-label {
|
||||
transition: all 0.2s ease;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateZ(0);
|
||||
opacity: 0;
|
||||
font-size: 0.9em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
img + .mobile-label { display: none; }
|
||||
|
||||
&:hover {
|
||||
i { margin-bottom: 0.75em; }
|
||||
.mobile-label {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, 80%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Small screens
|
||||
@@ -237,6 +248,18 @@ body > header {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes menuOpening {
|
||||
from {
|
||||
-webkit-transform: scaleX(0);
|
||||
transform-origin: left;
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
-webkit-transform: scaleX(1);
|
||||
transform-origin: left;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
body > header {
|
||||
flex-direction: column;
|
||||
@@ -254,7 +277,7 @@ body > header {
|
||||
}
|
||||
}
|
||||
|
||||
body > header:focus-within #content, #content.show {
|
||||
body > header:focus-within #content, .show + #content {
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use rsass;
|
||||
|
||||
use ructe::Ructe;
|
||||
use std::process::{Command, Stdio};
|
||||
use std::{ffi::OsStr, fs::*, io::Write, path::*};
|
||||
@@ -50,19 +48,13 @@ fn main() {
|
||||
create_dir_all(&Path::new("static").join("media")).expect("Couldn't init media directory");
|
||||
|
||||
let cache_id = &compute_static_hash()[..8];
|
||||
println!("cargo:rerun-if-changed=target/deploy/plume-front.wasm");
|
||||
copy("target/deploy/plume-front.wasm", "static/plume-front.wasm")
|
||||
.and_then(|_| read_to_string("target/deploy/plume-front.js"))
|
||||
.and_then(|js| {
|
||||
write(
|
||||
"static/plume-front.js",
|
||||
js.replace(
|
||||
"\"plume-front.wasm\"",
|
||||
&format!("\"/static/cached/{}/plume-front.wasm\"", cache_id),
|
||||
),
|
||||
)
|
||||
})
|
||||
.ok();
|
||||
println!("cargo:rerun-if-changed=plume-front/pkg/plume_front_bg.wasm");
|
||||
copy(
|
||||
"plume-front/pkg/plume_front_bg.wasm",
|
||||
"static/plume_front_bg.wasm",
|
||||
)
|
||||
.and_then(|_| copy("plume-front/pkg/plume_front.js", "static/plume_front.js"))
|
||||
.ok();
|
||||
|
||||
println!("cargo:rustc-env=CACHE_ID={}", cache_id)
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX medias_index_file_path;
|
||||
@@ -0,0 +1 @@
|
||||
CREATE INDEX medias_index_file_path ON medias (file_path);
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE instances DROP COLUMN private_key;
|
||||
ALTER TABLE instances DROP COLUMN public_key;
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE instances ADD COLUMN private_key TEXT;
|
||||
ALTER TABLE instances ADD COLUMN public_key TEXT;
|
||||
@@ -0,0 +1 @@
|
||||
DROP INDEX medias_index_file_path;
|
||||
@@ -0,0 +1 @@
|
||||
CREATE INDEX medias_index_file_path ON medias (file_path);
|
||||
@@ -0,0 +1,30 @@
|
||||
CREATE TABLE instances_old (
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
public_domain VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
local BOOLEAN NOT NULL DEFAULT 'f',
|
||||
blocked BOOLEAN NOT NULL DEFAULT 'f',
|
||||
creation_date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
open_registrations BOOLEAN NOT NULL DEFAULT 't',
|
||||
short_description TEXT NOT NULL DEFAULT '',
|
||||
long_description TEXT NOT NULL DEFAULT '',
|
||||
default_license TEXT NOT NULL DEFAULT 'CC-0',
|
||||
long_description_html VARCHAR NOT NULL DEFAULT '',
|
||||
short_description_html VARCHAR NOT NULL DEFAULT ''
|
||||
);
|
||||
INSERT INTO instances_old SELECT
|
||||
id,
|
||||
public_domain,
|
||||
name,
|
||||
local,
|
||||
blocked,
|
||||
creation_date,
|
||||
open_registrations,
|
||||
short_description,
|
||||
long_description,
|
||||
default_license,
|
||||
long_description_html,
|
||||
short_description_html
|
||||
FROM instances;
|
||||
DROP TABLE instances;
|
||||
ALTER TABLE instances_old RENAME TO instances;
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE instances ADD COLUMN private_key TEXT;
|
||||
ALTER TABLE instances ADD COLUMN public_key TEXT;
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "plume-api"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1-dev"
|
||||
authors = ["Plume contributors"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "plume-cli"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1-dev"
|
||||
authors = ["Plume contributors"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -11,11 +11,11 @@ path = "src/main.rs"
|
||||
[dependencies]
|
||||
clap = "2.33"
|
||||
dotenv = "0.14"
|
||||
rpassword = "4.0"
|
||||
rpassword = "5.0.0"
|
||||
|
||||
[dependencies.diesel]
|
||||
features = ["r2d2", "chrono"]
|
||||
version = "*"
|
||||
version = "1.4.5"
|
||||
|
||||
[dependencies.plume-models]
|
||||
path = "../plume-models"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
|
||||
use plume_models::{instance::*, safe_string::SafeString, Connection};
|
||||
use plume_models::{instance::NewInstance, Connection};
|
||||
use std::env;
|
||||
|
||||
pub fn command<'a, 'b>() -> App<'a, 'b> {
|
||||
@@ -53,19 +53,5 @@ fn new<'a>(args: &ArgMatches<'a>, conn: &Connection) {
|
||||
.unwrap_or_else(|| String::from("CC-BY-SA"));
|
||||
let open_reg = !args.is_present("private");
|
||||
|
||||
Instance::insert(
|
||||
conn,
|
||||
NewInstance {
|
||||
public_domain: domain,
|
||||
name,
|
||||
local: true,
|
||||
long_description: SafeString::new(""),
|
||||
short_description: SafeString::new(""),
|
||||
default_license: license,
|
||||
open_registrations: open_reg,
|
||||
short_description_html: String::new(),
|
||||
long_description_html: String::new(),
|
||||
},
|
||||
)
|
||||
.expect("Couldn't save instance");
|
||||
NewInstance::new_local(conn, domain, name, open_reg, license).expect("Couldn't save instance");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
use dotenv;
|
||||
|
||||
use clap::App;
|
||||
use diesel::Connection;
|
||||
use plume_models::{instance::Instance, Connection as Conn, CONFIG};
|
||||
|
||||
@@ -106,7 +106,7 @@ fn refill<'a>(args: &ArgMatches<'a>, conn: &Connection, searcher: Option<Searche
|
||||
searcher.commit();
|
||||
}
|
||||
|
||||
fn unlock<'a>(args: &ArgMatches<'a>) {
|
||||
fn unlock(args: &ArgMatches) {
|
||||
let path = match args.value_of("path") {
|
||||
None => Path::new(&CONFIG.search_index),
|
||||
Some(x) => Path::new(x),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
|
||||
use plume_models::{instance::Instance, users::*, Connection};
|
||||
use rpassword;
|
||||
use std::io::{self, Write};
|
||||
|
||||
pub fn command<'a, 'b>() -> App<'a, 'b> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "plume-common"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1-dev"
|
||||
authors = ["Plume contributors"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -14,15 +14,16 @@ heck = "0.3.0"
|
||||
hex = "0.3"
|
||||
hyper = "0.12.33"
|
||||
openssl = "0.10.22"
|
||||
rocket = "0.4.5"
|
||||
reqwest = "0.9"
|
||||
rocket = "=0.4.6"
|
||||
reqwest = { version = "0.9", features = ["socks"] }
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
shrinkwraprs = "0.2.1"
|
||||
syntect = "3.3"
|
||||
shrinkwraprs = "0.3.0"
|
||||
syntect = "4.5.0"
|
||||
tokio = "0.1.22"
|
||||
regex-syntax = { version = "0.6.17", default-features = false, features = ["unicode-perl"] }
|
||||
tracing = "0.1.22"
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
use reqwest::header::{HeaderValue, ACCEPT};
|
||||
use std::fmt::Debug;
|
||||
|
||||
use super::{request, sign::Signer};
|
||||
use reqwest::{
|
||||
header::{HeaderValue, HOST},
|
||||
Url,
|
||||
};
|
||||
|
||||
/// Represents an ActivityPub inbox.
|
||||
///
|
||||
/// It routes an incoming Activity through the registered handlers.
|
||||
@@ -10,7 +15,8 @@ use std::fmt::Debug;
|
||||
/// ```rust
|
||||
/// # extern crate activitypub;
|
||||
/// # use activitypub::{actor::Person, activity::{Announce, Create}, object::Note};
|
||||
/// # use plume_common::activity_pub::inbox::*;
|
||||
/// # use openssl::{hash::MessageDigest, pkey::PKey, rsa::Rsa};
|
||||
/// # use plume_common::activity_pub::{inbox::*, sign::{gen_keypair, Error as SignatureError, Result as SignatureResult, Signer}};
|
||||
/// # struct User;
|
||||
/// # impl FromId<()> for User {
|
||||
/// # type Error = ();
|
||||
@@ -59,6 +65,42 @@ use std::fmt::Debug;
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// # }
|
||||
/// # struct MySigner {
|
||||
/// # public_key: String,
|
||||
/// # private_key: String,
|
||||
/// # }
|
||||
/// #
|
||||
/// # impl MySigner {
|
||||
/// # fn new() -> Self {
|
||||
/// # let (pub_key, priv_key) = gen_keypair();
|
||||
/// # Self {
|
||||
/// # public_key: String::from_utf8(pub_key).unwrap(),
|
||||
/// # private_key: String::from_utf8(priv_key).unwrap(),
|
||||
/// # }
|
||||
/// # }
|
||||
/// # }
|
||||
/// #
|
||||
/// # impl Signer for MySigner {
|
||||
/// # fn get_key_id(&self) -> String {
|
||||
/// # "mysigner".into()
|
||||
/// # }
|
||||
/// #
|
||||
/// # fn sign(&self, to_sign: &str) -> SignatureResult<Vec<u8>> {
|
||||
/// # let key = PKey::from_rsa(Rsa::private_key_from_pem(self.private_key.as_ref()).unwrap())
|
||||
/// # .unwrap();
|
||||
/// # let mut signer = openssl::sign::Signer::new(MessageDigest::sha256(), &key).unwrap();
|
||||
/// # signer.update(to_sign.as_bytes()).unwrap();
|
||||
/// # signer.sign_to_vec().map_err(|_| SignatureError())
|
||||
/// # }
|
||||
/// #
|
||||
/// # fn verify(&self, data: &str, signature: &[u8]) -> SignatureResult<bool> {
|
||||
/// # let key = PKey::from_rsa(Rsa::public_key_from_pem(self.public_key.as_ref()).unwrap())
|
||||
/// # .unwrap();
|
||||
/// # let mut verifier = openssl::sign::Verifier::new(MessageDigest::sha256(), &key).unwrap();
|
||||
/// # verifier.update(data.as_bytes()).unwrap();
|
||||
/// # verifier.verify(&signature).map_err(|_| SignatureError())
|
||||
/// # }
|
||||
/// # }
|
||||
/// #
|
||||
/// # let mut act = Create::default();
|
||||
/// # act.object_props.set_id_string(String::from("https://test.ap/activity")).unwrap();
|
||||
@@ -69,10 +111,11 @@ use std::fmt::Debug;
|
||||
/// # let activity_json = serde_json::to_value(act).unwrap();
|
||||
/// #
|
||||
/// # let conn = ();
|
||||
/// # let sender = MySigner::new();
|
||||
/// #
|
||||
/// let result: Result<(), ()> = Inbox::handle(&conn, activity_json)
|
||||
/// .with::<User, Announce, Message>()
|
||||
/// .with::<User, Create, Message>()
|
||||
/// let result: Result<(), ()> = Inbox::handle(&conn, &sender, activity_json)
|
||||
/// .with::<User, Announce, Message>(None)
|
||||
/// .with::<User, Create, Message>(None)
|
||||
/// .done();
|
||||
/// ```
|
||||
pub enum Inbox<'a, C, E, R>
|
||||
@@ -84,9 +127,10 @@ where
|
||||
/// # Structure
|
||||
///
|
||||
/// - the context to be passed to each handler.
|
||||
/// - the sender actor to sign request
|
||||
/// - the activity
|
||||
/// - the reason it has not been handled yet
|
||||
NotHandled(&'a C, serde_json::Value, InboxError<E>),
|
||||
NotHandled(&'a C, &'a dyn Signer, serde_json::Value, InboxError<E>),
|
||||
|
||||
/// A matching handler have been found but failed
|
||||
///
|
||||
@@ -139,41 +183,49 @@ where
|
||||
///
|
||||
/// - `ctx`: the context to pass to each handler
|
||||
/// - `json`: the JSON representation of the incoming activity
|
||||
pub fn handle(ctx: &'a C, json: serde_json::Value) -> Inbox<'a, C, E, R> {
|
||||
Inbox::NotHandled(ctx, json, InboxError::NoMatch)
|
||||
pub fn handle(
|
||||
ctx: &'a C,
|
||||
sender: &'a dyn Signer,
|
||||
json: serde_json::Value,
|
||||
) -> Inbox<'a, C, E, R> {
|
||||
Inbox::NotHandled(ctx, sender, json, InboxError::NoMatch)
|
||||
}
|
||||
|
||||
/// Registers an handler on this Inbox.
|
||||
pub fn with<A, V, M>(self) -> Inbox<'a, C, E, R>
|
||||
pub fn with<A, V, M>(self, proxy: Option<&reqwest::Proxy>) -> Inbox<'a, C, E, R>
|
||||
where
|
||||
A: AsActor<&'a C> + FromId<C, Error = E>,
|
||||
V: activitypub::Activity,
|
||||
M: AsObject<A, V, &'a C, Error = E> + FromId<C, Error = E>,
|
||||
M::Output: Into<R>,
|
||||
{
|
||||
if let Inbox::NotHandled(ctx, mut act, e) = self {
|
||||
if let Inbox::NotHandled(ctx, sender, mut act, e) = self {
|
||||
if serde_json::from_value::<V>(act.clone()).is_ok() {
|
||||
let act_clone = act.clone();
|
||||
let act_id = match act_clone["id"].as_str() {
|
||||
Some(x) => x,
|
||||
None => return Inbox::NotHandled(ctx, act, InboxError::InvalidID),
|
||||
None => return Inbox::NotHandled(ctx, sender, act, InboxError::InvalidID),
|
||||
};
|
||||
|
||||
// Get the actor ID
|
||||
let actor_id = match get_id(act["actor"].clone()) {
|
||||
Some(x) => x,
|
||||
None => return Inbox::NotHandled(ctx, act, InboxError::InvalidActor(None)),
|
||||
None => {
|
||||
return Inbox::NotHandled(ctx, sender, act, InboxError::InvalidActor(None))
|
||||
}
|
||||
};
|
||||
|
||||
if Self::is_spoofed_activity(&actor_id, &act) {
|
||||
return Inbox::NotHandled(ctx, act, InboxError::InvalidObject(None));
|
||||
return Inbox::NotHandled(ctx, sender, act, InboxError::InvalidObject(None));
|
||||
}
|
||||
|
||||
// Transform this actor to a model (see FromId for details about the from_id function)
|
||||
let actor = match A::from_id(
|
||||
ctx,
|
||||
sender,
|
||||
&actor_id,
|
||||
serde_json::from_value(act["actor"].clone()).ok(),
|
||||
proxy,
|
||||
) {
|
||||
Ok(a) => a,
|
||||
// If the actor was not found, go to the next handler
|
||||
@@ -181,26 +233,40 @@ where
|
||||
if let Some(json) = json {
|
||||
act["actor"] = json;
|
||||
}
|
||||
return Inbox::NotHandled(ctx, act, InboxError::InvalidActor(Some(e)));
|
||||
return Inbox::NotHandled(
|
||||
ctx,
|
||||
sender,
|
||||
act,
|
||||
InboxError::InvalidActor(Some(e)),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// Same logic for "object"
|
||||
let obj_id = match get_id(act["object"].clone()) {
|
||||
Some(x) => x,
|
||||
None => return Inbox::NotHandled(ctx, act, InboxError::InvalidObject(None)),
|
||||
None => {
|
||||
return Inbox::NotHandled(ctx, sender, act, InboxError::InvalidObject(None))
|
||||
}
|
||||
};
|
||||
let obj = match M::from_id(
|
||||
ctx,
|
||||
sender,
|
||||
&obj_id,
|
||||
serde_json::from_value(act["object"].clone()).ok(),
|
||||
proxy,
|
||||
) {
|
||||
Ok(o) => o,
|
||||
Err((json, e)) => {
|
||||
if let Some(json) = json {
|
||||
act["object"] = json;
|
||||
}
|
||||
return Inbox::NotHandled(ctx, act, InboxError::InvalidObject(Some(e)));
|
||||
return Inbox::NotHandled(
|
||||
ctx,
|
||||
sender,
|
||||
act,
|
||||
InboxError::InvalidObject(Some(e)),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -212,7 +278,7 @@ where
|
||||
} else {
|
||||
// If the Activity type is not matching the expected one for
|
||||
// this handler, try with the next one.
|
||||
Inbox::NotHandled(ctx, act, e)
|
||||
Inbox::NotHandled(ctx, sender, act, e)
|
||||
}
|
||||
} else {
|
||||
self
|
||||
@@ -223,7 +289,7 @@ where
|
||||
pub fn done(self) -> Result<R, E> {
|
||||
match self {
|
||||
Inbox::Handled(res) => Ok(res),
|
||||
Inbox::NotHandled(_, _, err) => Err(E::from(err)),
|
||||
Inbox::NotHandled(_, _, _, err) => Err(E::from(err)),
|
||||
Inbox::Failed(err) => Err(err),
|
||||
}
|
||||
}
|
||||
@@ -290,45 +356,60 @@ pub trait FromId<C>: Sized {
|
||||
/// If absent, the ID will be dereferenced.
|
||||
fn from_id(
|
||||
ctx: &C,
|
||||
sender: &dyn Signer,
|
||||
id: &str,
|
||||
object: Option<Self::Object>,
|
||||
proxy: Option<&reqwest::Proxy>,
|
||||
) -> Result<Self, (Option<serde_json::Value>, Self::Error)> {
|
||||
match Self::from_db(ctx, id) {
|
||||
Ok(x) => Ok(x),
|
||||
_ => match object {
|
||||
Some(o) => Self::from_activity(ctx, o).map_err(|e| (None, e)),
|
||||
None => Self::from_activity(ctx, Self::deref(id)?).map_err(|e| (None, e)),
|
||||
None => Self::from_activity(ctx, Self::deref(id, sender, proxy.cloned())?)
|
||||
.map_err(|e| (None, e)),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Dereferences an ID
|
||||
fn deref(id: &str) -> Result<Self::Object, (Option<serde_json::Value>, Self::Error)> {
|
||||
reqwest::ClientBuilder::new()
|
||||
.connect_timeout(Some(std::time::Duration::from_secs(5)))
|
||||
.build()
|
||||
.map_err(|_| (None, InboxError::DerefError.into()))?
|
||||
.get(id)
|
||||
.header(
|
||||
ACCEPT,
|
||||
HeaderValue::from_str(
|
||||
&super::ap_accept_header()
|
||||
.into_iter()
|
||||
.collect::<Vec<_>>()
|
||||
.join(", "),
|
||||
)
|
||||
fn deref(
|
||||
id: &str,
|
||||
sender: &dyn Signer,
|
||||
proxy: Option<reqwest::Proxy>,
|
||||
) -> Result<Self::Object, (Option<serde_json::Value>, Self::Error)> {
|
||||
let mut headers = request::headers();
|
||||
let url = Url::parse(&id).map_err(|_| (None, InboxError::InvalidID.into()))?;
|
||||
if !url.has_host() {
|
||||
return Err((None, InboxError::InvalidID.into()));
|
||||
}
|
||||
let host_header_value = HeaderValue::from_str(&url.host_str().expect("Unreachable"))
|
||||
.map_err(|_| (None, InboxError::DerefError.into()))?;
|
||||
headers.insert(HOST, host_header_value);
|
||||
if let Some(proxy) = proxy {
|
||||
reqwest::ClientBuilder::new().proxy(proxy)
|
||||
} else {
|
||||
reqwest::ClientBuilder::new()
|
||||
}
|
||||
.connect_timeout(Some(std::time::Duration::from_secs(5)))
|
||||
.build()
|
||||
.map_err(|_| (None, InboxError::DerefError.into()))?
|
||||
.get(id)
|
||||
.headers(headers.clone())
|
||||
.header(
|
||||
"Signature",
|
||||
request::signature(sender, &headers, ("get", url.path(), url.query()))
|
||||
.map_err(|_| (None, InboxError::DerefError.into()))?,
|
||||
)
|
||||
.send()
|
||||
.map_err(|_| (None, InboxError::DerefError))
|
||||
.and_then(|mut r| {
|
||||
let json: serde_json::Value = r
|
||||
.json()
|
||||
.map_err(|_| (None, InboxError::InvalidObject(None)))?;
|
||||
serde_json::from_value(json.clone())
|
||||
.map_err(|_| (Some(json), InboxError::InvalidObject(None)))
|
||||
})
|
||||
.map_err(|(json, e)| (json, e.into()))
|
||||
)
|
||||
.send()
|
||||
.map_err(|_| (None, InboxError::DerefError))
|
||||
.and_then(|mut r| {
|
||||
let json: serde_json::Value = r
|
||||
.json()
|
||||
.map_err(|_| (None, InboxError::InvalidObject(None)))?;
|
||||
serde_json::from_value(json.clone())
|
||||
.map_err(|_| (Some(json), InboxError::InvalidObject(None)))
|
||||
})
|
||||
.map_err(|(json, e)| (json, e.into()))
|
||||
}
|
||||
|
||||
/// Builds a `Self` from its ActivityPub representation
|
||||
@@ -447,8 +528,10 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::super::sign::{gen_keypair, Error as SignatureError, Result as SignatureResult};
|
||||
use super::*;
|
||||
use activitypub::{activity::*, actor::Person, object::Note};
|
||||
use openssl::{hash::MessageDigest, pkey::PKey, rsa::Rsa};
|
||||
|
||||
struct MyActor;
|
||||
impl FromId<()> for MyActor {
|
||||
@@ -546,11 +629,48 @@ mod tests {
|
||||
act
|
||||
}
|
||||
|
||||
struct MySigner {
|
||||
public_key: String,
|
||||
private_key: String,
|
||||
}
|
||||
|
||||
impl MySigner {
|
||||
fn new() -> Self {
|
||||
let (pub_key, priv_key) = gen_keypair();
|
||||
Self {
|
||||
public_key: String::from_utf8(pub_key).unwrap(),
|
||||
private_key: String::from_utf8(priv_key).unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Signer for MySigner {
|
||||
fn get_key_id(&self) -> String {
|
||||
"mysigner".into()
|
||||
}
|
||||
|
||||
fn sign(&self, to_sign: &str) -> SignatureResult<Vec<u8>> {
|
||||
let key = PKey::from_rsa(Rsa::private_key_from_pem(self.private_key.as_ref()).unwrap())
|
||||
.unwrap();
|
||||
let mut signer = openssl::sign::Signer::new(MessageDigest::sha256(), &key).unwrap();
|
||||
signer.update(to_sign.as_bytes()).unwrap();
|
||||
signer.sign_to_vec().map_err(|_| SignatureError())
|
||||
}
|
||||
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> SignatureResult<bool> {
|
||||
let key = PKey::from_rsa(Rsa::public_key_from_pem(self.public_key.as_ref()).unwrap())
|
||||
.unwrap();
|
||||
let mut verifier = openssl::sign::Verifier::new(MessageDigest::sha256(), &key).unwrap();
|
||||
verifier.update(data.as_bytes()).unwrap();
|
||||
verifier.verify(&signature).map_err(|_| SignatureError())
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_inbox_basic() {
|
||||
let act = serde_json::to_value(build_create()).unwrap();
|
||||
let res: Result<(), ()> = Inbox::handle(&(), act)
|
||||
.with::<MyActor, Create, MyObject>()
|
||||
let res: Result<(), ()> = Inbox::handle(&(), &MySigner::new(), act)
|
||||
.with::<MyActor, Create, MyObject>(None)
|
||||
.done();
|
||||
assert!(res.is_ok());
|
||||
}
|
||||
@@ -558,11 +678,11 @@ mod tests {
|
||||
#[test]
|
||||
fn test_inbox_multi_handlers() {
|
||||
let act = serde_json::to_value(build_create()).unwrap();
|
||||
let res: Result<(), ()> = Inbox::handle(&(), act)
|
||||
.with::<MyActor, Announce, MyObject>()
|
||||
.with::<MyActor, Delete, MyObject>()
|
||||
.with::<MyActor, Create, MyObject>()
|
||||
.with::<MyActor, Like, MyObject>()
|
||||
let res: Result<(), ()> = Inbox::handle(&(), &MySigner::new(), act)
|
||||
.with::<MyActor, Announce, MyObject>(None)
|
||||
.with::<MyActor, Delete, MyObject>(None)
|
||||
.with::<MyActor, Create, MyObject>(None)
|
||||
.with::<MyActor, Like, MyObject>(None)
|
||||
.done();
|
||||
assert!(res.is_ok());
|
||||
}
|
||||
@@ -571,9 +691,9 @@ mod tests {
|
||||
fn test_inbox_failure() {
|
||||
let act = serde_json::to_value(build_create()).unwrap();
|
||||
// Create is not handled by this inbox
|
||||
let res: Result<(), ()> = Inbox::handle(&(), act)
|
||||
.with::<MyActor, Announce, MyObject>()
|
||||
.with::<MyActor, Like, MyObject>()
|
||||
let res: Result<(), ()> = Inbox::handle(&(), &MySigner::new(), act)
|
||||
.with::<MyActor, Announce, MyObject>(None)
|
||||
.with::<MyActor, Like, MyObject>(None)
|
||||
.done();
|
||||
assert!(res.is_err());
|
||||
}
|
||||
@@ -620,14 +740,14 @@ mod tests {
|
||||
fn test_inbox_actor_failure() {
|
||||
let act = serde_json::to_value(build_create()).unwrap();
|
||||
|
||||
let res: Result<(), ()> = Inbox::handle(&(), act.clone())
|
||||
.with::<FailingActor, Create, MyObject>()
|
||||
let res: Result<(), ()> = Inbox::handle(&(), &MySigner::new(), act.clone())
|
||||
.with::<FailingActor, Create, MyObject>(None)
|
||||
.done();
|
||||
assert!(res.is_err());
|
||||
|
||||
let res: Result<(), ()> = Inbox::handle(&(), act.clone())
|
||||
.with::<FailingActor, Create, MyObject>()
|
||||
.with::<MyActor, Create, MyObject>()
|
||||
let res: Result<(), ()> = Inbox::handle(&(), &MySigner::new(), act.clone())
|
||||
.with::<FailingActor, Create, MyObject>(None)
|
||||
.with::<MyActor, Create, MyObject>(None)
|
||||
.done();
|
||||
assert!(res.is_ok());
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use activitypub::{Activity, Link, Object};
|
||||
use array_tool::vec::Uniq;
|
||||
use reqwest::r#async::ClientBuilder;
|
||||
use reqwest::{header::HeaderValue, r#async::ClientBuilder, Url};
|
||||
use rocket::{
|
||||
http::Status,
|
||||
request::{FromRequest, Request},
|
||||
response::{Responder, Response},
|
||||
Outcome,
|
||||
};
|
||||
use serde_json;
|
||||
use tokio::prelude::*;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use self::sign::Signable;
|
||||
|
||||
@@ -108,7 +108,7 @@ impl<'a, 'r> FromRequest<'a, 'r> for ApRequest {
|
||||
.unwrap_or(Outcome::Forward(()))
|
||||
}
|
||||
}
|
||||
pub fn broadcast<S, A, T, C>(sender: &S, act: A, to: Vec<T>)
|
||||
pub fn broadcast<S, A, T, C>(sender: &S, act: A, to: Vec<T>, proxy: Option<reqwest::Proxy>)
|
||||
where
|
||||
S: sign::Signer,
|
||||
A: Activity,
|
||||
@@ -132,31 +132,54 @@ where
|
||||
|
||||
let mut rt = tokio::runtime::current_thread::Runtime::new()
|
||||
.expect("Error while initializing tokio runtime for federation");
|
||||
let client = ClientBuilder::new()
|
||||
.connect_timeout(std::time::Duration::from_secs(5))
|
||||
.build()
|
||||
.expect("Can't build client");
|
||||
for inbox in boxes {
|
||||
let body = signed.to_string();
|
||||
let mut headers = request::headers();
|
||||
let url = Url::parse(&inbox);
|
||||
if url.is_err() {
|
||||
warn!("Inbox is invalid URL: {:?}", &inbox);
|
||||
continue;
|
||||
}
|
||||
let url = url.unwrap();
|
||||
if !url.has_host() {
|
||||
warn!("Inbox doesn't have host: {:?}", &inbox);
|
||||
continue;
|
||||
};
|
||||
let host_header_value = HeaderValue::from_str(&url.host_str().expect("Unreachable"));
|
||||
if host_header_value.is_err() {
|
||||
warn!("Header value is invalid: {:?}", url.host_str());
|
||||
continue;
|
||||
}
|
||||
headers.insert("Host", host_header_value.unwrap());
|
||||
headers.insert("Digest", request::Digest::digest(&body));
|
||||
rt.spawn(
|
||||
client
|
||||
.post(&inbox)
|
||||
.headers(headers.clone())
|
||||
.header(
|
||||
"Signature",
|
||||
request::signature(sender, &headers)
|
||||
.expect("activity_pub::broadcast: request signature error"),
|
||||
)
|
||||
.body(body)
|
||||
.send()
|
||||
.and_then(|r| r.into_body().concat2())
|
||||
.map(move |response| {
|
||||
println!("Successfully sent activity to inbox ({})", inbox);
|
||||
println!("Response: \"{:?}\"\n", response)
|
||||
})
|
||||
.map_err(|e| println!("Error while sending to inbox ({:?})", e)),
|
||||
if let Some(proxy) = proxy.clone() {
|
||||
ClientBuilder::new().proxy(proxy)
|
||||
} else {
|
||||
ClientBuilder::new()
|
||||
}
|
||||
.connect_timeout(std::time::Duration::from_secs(5))
|
||||
.build()
|
||||
.expect("Can't build client")
|
||||
.post(&inbox)
|
||||
.headers(headers.clone())
|
||||
.header(
|
||||
"Signature",
|
||||
request::signature(sender, &headers, ("post", url.path(), url.query()))
|
||||
.expect("activity_pub::broadcast: request signature error"),
|
||||
)
|
||||
.body(body)
|
||||
.send()
|
||||
.and_then(move |r| {
|
||||
if r.status().is_success() {
|
||||
debug!("Successfully sent activity to inbox ({})", &inbox);
|
||||
} else {
|
||||
warn!("Error while sending to inbox ({:?})", &r)
|
||||
}
|
||||
r.into_body().concat2()
|
||||
})
|
||||
.map(move |response| debug!("Response: \"{:?}\"\n", response))
|
||||
.map_err(|e| warn!("Error while sending to inbox ({:?})", e)),
|
||||
);
|
||||
}
|
||||
rt.run().unwrap();
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
use base64;
|
||||
use chrono::{offset::Utc, DateTime};
|
||||
use openssl::hash::{Hasher, MessageDigest};
|
||||
use reqwest::header::{HeaderMap, HeaderValue, ACCEPT, CONTENT_TYPE, DATE, USER_AGENT};
|
||||
use std::ops::Deref;
|
||||
use std::time::SystemTime;
|
||||
use tracing::warn;
|
||||
|
||||
use crate::activity_pub::sign::Signer;
|
||||
use crate::activity_pub::{ap_accept_header, AP_CONTENT_TYPE};
|
||||
|
||||
const PLUME_USER_AGENT: &str = concat!("Plume/", env!("CARGO_PKG_VERSION"));
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Error();
|
||||
|
||||
pub struct Digest(String);
|
||||
|
||||
impl Digest {
|
||||
@@ -62,16 +65,16 @@ impl Digest {
|
||||
base64::decode(&self.0[pos..]).expect("Digest::value: invalid encoding error")
|
||||
}
|
||||
|
||||
pub fn from_header(dig: &str) -> Result<Self, ()> {
|
||||
pub fn from_header(dig: &str) -> Result<Self, Error> {
|
||||
if let Some(pos) = dig.find('=') {
|
||||
let pos = pos + 1;
|
||||
if base64::decode(&dig[pos..]).is_ok() {
|
||||
Ok(Digest(dig.to_owned()))
|
||||
} else {
|
||||
Err(())
|
||||
Err(Error())
|
||||
}
|
||||
} else {
|
||||
Err(())
|
||||
Err(Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,27 +113,47 @@ pub fn headers() -> HeaderMap {
|
||||
headers
|
||||
}
|
||||
|
||||
pub fn signature<S: Signer>(signer: &S, headers: &HeaderMap) -> Result<HeaderValue, ()> {
|
||||
let signed_string = headers
|
||||
type Method<'a> = &'a str;
|
||||
type Path<'a> = &'a str;
|
||||
type Query<'a> = &'a str;
|
||||
type RequestTarget<'a> = (Method<'a>, Path<'a>, Option<Query<'a>>);
|
||||
|
||||
pub fn signature(
|
||||
signer: &dyn Signer,
|
||||
headers: &HeaderMap,
|
||||
request_target: RequestTarget,
|
||||
) -> Result<HeaderValue, Error> {
|
||||
let (method, path, query) = request_target;
|
||||
let origin_form = if let Some(query) = query {
|
||||
format!("{}?{}", path, query)
|
||||
} else {
|
||||
path.to_string()
|
||||
};
|
||||
|
||||
let mut headers_vec = Vec::with_capacity(headers.len());
|
||||
for (h, v) in headers.iter() {
|
||||
let v = v.to_str();
|
||||
if v.is_err() {
|
||||
warn!("invalid header error: {:?}", v.unwrap_err());
|
||||
return Err(Error());
|
||||
}
|
||||
headers_vec.push((h.as_str().to_lowercase(), v.expect("Unreachable")));
|
||||
}
|
||||
let request_target = format!("{} {}", method.to_lowercase(), origin_form);
|
||||
headers_vec.push(("(request-target)".to_string(), &request_target));
|
||||
|
||||
let signed_string = headers_vec
|
||||
.iter()
|
||||
.map(|(h, v)| {
|
||||
format!(
|
||||
"{}: {}",
|
||||
h.as_str().to_lowercase(),
|
||||
v.to_str()
|
||||
.expect("request::signature: invalid header error")
|
||||
)
|
||||
})
|
||||
.map(|(h, v)| format!("{}: {}", h, v))
|
||||
.collect::<Vec<String>>()
|
||||
.join("\n");
|
||||
let signed_headers = headers
|
||||
let signed_headers = headers_vec
|
||||
.iter()
|
||||
.map(|(h, _)| h.as_str())
|
||||
.map(|(h, _)| h.as_ref())
|
||||
.collect::<Vec<&str>>()
|
||||
.join(" ")
|
||||
.to_lowercase();
|
||||
.join(" ");
|
||||
|
||||
let data = signer.sign(&signed_string).map_err(|_| ())?;
|
||||
let data = signer.sign(&signed_string).map_err(|_| Error())?;
|
||||
let sign = base64::encode(&data);
|
||||
|
||||
HeaderValue::from_str(&format!(
|
||||
@@ -138,5 +161,63 @@ pub fn signature<S: Signer>(signer: &S, headers: &HeaderMap) -> Result<HeaderVal
|
||||
key_id = signer.get_key_id(),
|
||||
signed_headers = signed_headers,
|
||||
signature = sign
|
||||
)).map_err(|_| ())
|
||||
)).map_err(|_| Error())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::signature;
|
||||
use crate::activity_pub::sign::{
|
||||
gen_keypair, Error as SignatureError, Result as SignatureResult, Signer,
|
||||
};
|
||||
use openssl::{hash::MessageDigest, pkey::PKey, rsa::Rsa};
|
||||
use reqwest::header::HeaderMap;
|
||||
|
||||
struct MySigner {
|
||||
public_key: String,
|
||||
private_key: String,
|
||||
}
|
||||
|
||||
impl MySigner {
|
||||
fn new() -> Self {
|
||||
let (pub_key, priv_key) = gen_keypair();
|
||||
Self {
|
||||
public_key: String::from_utf8(pub_key).unwrap(),
|
||||
private_key: String::from_utf8(priv_key).unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Signer for MySigner {
|
||||
fn get_key_id(&self) -> String {
|
||||
"mysigner".into()
|
||||
}
|
||||
|
||||
fn sign(&self, to_sign: &str) -> SignatureResult<Vec<u8>> {
|
||||
let key = PKey::from_rsa(Rsa::private_key_from_pem(self.private_key.as_ref()).unwrap())
|
||||
.unwrap();
|
||||
let mut signer = openssl::sign::Signer::new(MessageDigest::sha256(), &key).unwrap();
|
||||
signer.update(to_sign.as_bytes()).unwrap();
|
||||
signer.sign_to_vec().map_err(|_| SignatureError())
|
||||
}
|
||||
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> SignatureResult<bool> {
|
||||
let key = PKey::from_rsa(Rsa::public_key_from_pem(self.public_key.as_ref()).unwrap())
|
||||
.unwrap();
|
||||
let mut verifier = openssl::sign::Verifier::new(MessageDigest::sha256(), &key).unwrap();
|
||||
verifier.update(data.as_bytes()).unwrap();
|
||||
verifier.verify(&signature).map_err(|_| SignatureError())
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_signature_request_target() {
|
||||
let signer = MySigner::new();
|
||||
let headers = HeaderMap::new();
|
||||
let result = signature(&signer, &headers, ("post", "/inbox", None)).unwrap();
|
||||
let fields: Vec<&str> = result.to_str().unwrap().split(",").collect();
|
||||
assert_eq!(r#"headers="(request-target)""#, fields[2]);
|
||||
let sign = &fields[3][11..(fields[3].len() - 1)];
|
||||
assert!(signer.verify("post /inbox", sign.as_bytes()).is_ok());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
use super::request;
|
||||
use base64;
|
||||
use chrono::{naive::NaiveDateTime, DateTime, Duration, Utc};
|
||||
use hex;
|
||||
use openssl::{pkey::PKey, rsa::Rsa, sha::sha256};
|
||||
use rocket::http::HeaderMap;
|
||||
use serde_json;
|
||||
|
||||
/// Returns (public key, private key)
|
||||
pub fn gen_keypair() -> (Vec<u8>, Vec<u8>) {
|
||||
@@ -20,19 +17,27 @@ pub fn gen_keypair() -> (Vec<u8>, Vec<u8>) {
|
||||
)
|
||||
}
|
||||
|
||||
pub trait Signer {
|
||||
type Error;
|
||||
#[derive(Debug)]
|
||||
pub struct Error();
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
impl From<openssl::error::ErrorStack> for Error {
|
||||
fn from(_: openssl::error::ErrorStack) -> Self {
|
||||
Self()
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Signer {
|
||||
fn get_key_id(&self) -> String;
|
||||
|
||||
/// Sign some data with the signer keypair
|
||||
fn sign(&self, to_sign: &str) -> Result<Vec<u8>, Self::Error>;
|
||||
fn sign(&self, to_sign: &str) -> Result<Vec<u8>>;
|
||||
/// Verify if the signature is valid
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> Result<bool, Self::Error>;
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> Result<bool>;
|
||||
}
|
||||
|
||||
pub trait Signable {
|
||||
fn sign<T>(&mut self, creator: &T) -> Result<&mut Self, ()>
|
||||
fn sign<T>(&mut self, creator: &T) -> Result<&mut Self>
|
||||
where
|
||||
T: Signer;
|
||||
fn verify<T>(self, creator: &T) -> bool
|
||||
@@ -46,7 +51,7 @@ pub trait Signable {
|
||||
}
|
||||
|
||||
impl Signable for serde_json::Value {
|
||||
fn sign<T: Signer>(&mut self, creator: &T) -> Result<&mut serde_json::Value, ()> {
|
||||
fn sign<T: Signer>(&mut self, creator: &T) -> Result<&mut serde_json::Value> {
|
||||
let creation_date = Utc::now().to_rfc3339();
|
||||
let mut options = json!({
|
||||
"type": "RsaSignature2017",
|
||||
@@ -64,7 +69,7 @@ impl Signable for serde_json::Value {
|
||||
let document_hash = Self::hash(&self.to_string());
|
||||
let to_be_signed = options_hash + &document_hash;
|
||||
|
||||
let signature = base64::encode(&creator.sign(&to_be_signed).map_err(|_| ())?);
|
||||
let signature = base64::encode(&creator.sign(&to_be_signed).map_err(|_| Error())?);
|
||||
|
||||
options["signatureValue"] = serde_json::Value::String(signature);
|
||||
self["signature"] = options;
|
||||
|
||||
Regular → Executable
-3
@@ -2,9 +2,6 @@
|
||||
|
||||
#[macro_use]
|
||||
extern crate activitystreams_derive;
|
||||
use activitystreams_traits;
|
||||
|
||||
use serde;
|
||||
#[macro_use]
|
||||
extern crate shrinkwraprs;
|
||||
#[macro_use]
|
||||
|
||||
@@ -7,7 +7,7 @@ use rocket::{
|
||||
response::{Flash, Redirect},
|
||||
};
|
||||
use std::collections::HashSet;
|
||||
use syntect::html::ClassedHTMLGenerator;
|
||||
use syntect::html::{ClassStyle, ClassedHTMLGenerator};
|
||||
use syntect::parsing::SyntaxSet;
|
||||
|
||||
/// Generates an hexadecimal representation of 32 bytes of random data
|
||||
@@ -27,6 +27,59 @@ pub fn make_actor_id(name: &str) -> String {
|
||||
.collect()
|
||||
}
|
||||
|
||||
/**
|
||||
* Percent-encode characters which are not allowed in IRI path segments.
|
||||
*
|
||||
* Intended to be used for generating Post ap_url.
|
||||
*/
|
||||
pub fn iri_percent_encode_seg(segment: &str) -> String {
|
||||
segment.chars().map(iri_percent_encode_seg_char).collect()
|
||||
}
|
||||
|
||||
pub fn iri_percent_encode_seg_char(c: char) -> String {
|
||||
if c.is_alphanumeric() {
|
||||
c.to_string()
|
||||
} else {
|
||||
match c {
|
||||
'-'
|
||||
| '.'
|
||||
| '_'
|
||||
| '~'
|
||||
| '\u{A0}'..='\u{D7FF}'
|
||||
| '\u{20000}'..='\u{2FFFD}'
|
||||
| '\u{30000}'..='\u{3FFFD}'
|
||||
| '\u{40000}'..='\u{4FFFD}'
|
||||
| '\u{50000}'..='\u{5FFFD}'
|
||||
| '\u{60000}'..='\u{6FFFD}'
|
||||
| '\u{70000}'..='\u{7FFFD}'
|
||||
| '\u{80000}'..='\u{8FFFD}'
|
||||
| '\u{90000}'..='\u{9FFFD}'
|
||||
| '\u{A0000}'..='\u{AFFFD}'
|
||||
| '\u{B0000}'..='\u{BFFFD}'
|
||||
| '\u{C0000}'..='\u{CFFFD}'
|
||||
| '\u{D0000}'..='\u{DFFFD}'
|
||||
| '\u{E0000}'..='\u{EFFFD}'
|
||||
| '!'
|
||||
| '$'
|
||||
| '&'
|
||||
| '\''
|
||||
| '('
|
||||
| ')'
|
||||
| '*'
|
||||
| '+'
|
||||
| ','
|
||||
| ';'
|
||||
| '='
|
||||
| ':'
|
||||
| '@' => c.to_string(),
|
||||
_ => {
|
||||
let s = c.to_string();
|
||||
Uri::percent_encode(&s).to_string()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirects to the login page with a given message.
|
||||
*
|
||||
@@ -60,6 +113,7 @@ fn to_inline(tag: Tag<'_>) -> Tag<'_> {
|
||||
struct HighlighterContext {
|
||||
content: Vec<String>,
|
||||
}
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn highlight_code<'a>(
|
||||
context: &mut Option<HighlighterContext>,
|
||||
evt: Event<'a>,
|
||||
@@ -92,9 +146,13 @@ fn highlight_code<'a>(
|
||||
.find_syntax_by_name(&lang)
|
||||
.unwrap_or_else(|| syntax_set.find_syntax_plain_text())
|
||||
});
|
||||
let mut html = ClassedHTMLGenerator::new(&syntax, &syntax_set);
|
||||
let mut html = ClassedHTMLGenerator::new_with_class_style(
|
||||
&syntax,
|
||||
&syntax_set,
|
||||
ClassStyle::Spaced,
|
||||
);
|
||||
for line in ctx.content {
|
||||
html.parse_html_for_line(&line);
|
||||
html.parse_html_for_line_which_includes_newline(&line);
|
||||
}
|
||||
let q = html.finalize();
|
||||
result.push(Event::Html(q.into()));
|
||||
@@ -115,6 +173,7 @@ fn highlight_code<'a>(
|
||||
_ => Some(vec![evt]),
|
||||
}
|
||||
}
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn flatten_text<'a>(state: &mut Option<String>, evt: Event<'a>) -> Option<Vec<Event<'a>>> {
|
||||
let (s, res) = match evt {
|
||||
Event::Text(txt) => match state.take() {
|
||||
@@ -133,6 +192,7 @@ fn flatten_text<'a>(state: &mut Option<String>, evt: Event<'a>) -> Option<Vec<Ev
|
||||
Some(res)
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn inline_tags<'a>(
|
||||
(state, inline): &mut (Vec<Tag<'a>>, bool),
|
||||
evt: Event<'a>,
|
||||
@@ -469,6 +529,20 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_iri_percent_encode_seg() {
|
||||
assert_eq!(
|
||||
&iri_percent_encode_seg("including whitespace"),
|
||||
"including%20whitespace"
|
||||
);
|
||||
assert_eq!(&iri_percent_encode_seg("%20"), "%2520");
|
||||
assert_eq!(&iri_percent_encode_seg("é"), "é");
|
||||
assert_eq!(
|
||||
&iri_percent_encode_seg("空白入り 日本語"),
|
||||
"空白入り%20日本語"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_inline() {
|
||||
assert_eq!(
|
||||
|
||||
+40
-3
@@ -1,15 +1,52 @@
|
||||
[package]
|
||||
name = "plume-front"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1-dev"
|
||||
authors = ["Plume contributors"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
stdweb = "=0.4.18"
|
||||
stdweb-internal-runtime = "=0.1.4"
|
||||
gettext = { git = "https://github.com/Plume-org/gettext/", rev = "294c54d74c699fbc66502b480a37cc66c1daa7f3" }
|
||||
gettext-macros = { git = "https://github.com/Plume-org/gettext-macros/", rev = "a7c605f7edd6bfbfbfe7778026bfefd88d82db10" }
|
||||
gettext-utils = { git = "https://github.com/Plume-org/gettext-macros/", rev = "a7c605f7edd6bfbfbfe7778026bfefd88d82db10" }
|
||||
lazy_static = "1.3"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
wasm-bindgen = "0.2.70"
|
||||
js-sys = "0.3.47"
|
||||
serde_derive = "1.0.123"
|
||||
console_error_panic_hook = "0.1.6"
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3.47"
|
||||
features = [
|
||||
'console',
|
||||
'ClipboardEvent',
|
||||
'CssStyleDeclaration',
|
||||
'DataTransfer',
|
||||
'Document',
|
||||
'DomStringMap',
|
||||
'DomTokenList',
|
||||
'Element',
|
||||
'EventTarget',
|
||||
'FocusEvent',
|
||||
'History',
|
||||
'HtmlAnchorElement',
|
||||
'HtmlDocument',
|
||||
'HtmlFormElement',
|
||||
'HtmlInputElement',
|
||||
'HtmlSelectElement',
|
||||
'HtmlTextAreaElement',
|
||||
'KeyboardEvent',
|
||||
'Storage',
|
||||
'Location',
|
||||
'MouseEvent',
|
||||
'Navigator',
|
||||
'Node',
|
||||
'NodeList',
|
||||
'Text',
|
||||
'TouchEvent',
|
||||
'Window'
|
||||
]
|
||||
|
||||
+426
-266
@@ -1,10 +1,12 @@
|
||||
use crate::CATALOG;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
use std::sync::Mutex;
|
||||
use stdweb::{
|
||||
unstable::{TryFrom, TryInto},
|
||||
web::{event::*, html_element::*, *},
|
||||
use crate::{document, CATALOG};
|
||||
use js_sys::{encode_uri_component, Date, RegExp};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::{convert::TryInto, sync::Mutex};
|
||||
use wasm_bindgen::{prelude::*, JsCast, JsValue};
|
||||
use web_sys::{
|
||||
console, window, ClipboardEvent, Element, Event, FocusEvent, HtmlAnchorElement, HtmlDocument,
|
||||
HtmlElement, HtmlFormElement, HtmlInputElement, HtmlSelectElement, HtmlTextAreaElement,
|
||||
KeyboardEvent, MouseEvent, Node,
|
||||
};
|
||||
|
||||
macro_rules! mv {
|
||||
@@ -18,30 +20,29 @@ macro_rules! mv {
|
||||
|
||||
fn get_elt_value(id: &'static str) -> String {
|
||||
let elt = document().get_element_by_id(id).unwrap();
|
||||
let inp: Result<InputElement, _> = elt.clone().try_into();
|
||||
let textarea: Result<TextAreaElement, _> = elt.clone().try_into();
|
||||
let select: Result<SelectElement, _> = elt.try_into();
|
||||
inp.map(|i| i.raw_value()).unwrap_or_else(|_| {
|
||||
let inp: Option<&HtmlInputElement> = elt.dyn_ref();
|
||||
let textarea: Option<&HtmlTextAreaElement> = elt.dyn_ref();
|
||||
let select: Option<&HtmlSelectElement> = elt.dyn_ref();
|
||||
inp.map(|i| i.value()).unwrap_or_else(|| {
|
||||
textarea
|
||||
.map(|t| t.value())
|
||||
.unwrap_or_else(|_| select.unwrap().raw_value())
|
||||
.unwrap_or_else(|| select.unwrap().value())
|
||||
})
|
||||
}
|
||||
|
||||
fn set_value<S: AsRef<str>>(id: &'static str, val: S) {
|
||||
let elt = document().get_element_by_id(id).unwrap();
|
||||
let inp: Result<InputElement, _> = elt.clone().try_into();
|
||||
let textarea: Result<TextAreaElement, _> = elt.clone().try_into();
|
||||
let select: Result<SelectElement, _> = elt.try_into();
|
||||
inp.map(|i| i.set_raw_value(val.as_ref()))
|
||||
.unwrap_or_else(|_| {
|
||||
textarea
|
||||
.map(|t| t.set_value(val.as_ref()))
|
||||
.unwrap_or_else(|_| select.unwrap().set_raw_value(val.as_ref()))
|
||||
})
|
||||
let inp: Option<&HtmlInputElement> = elt.dyn_ref();
|
||||
let textarea: Option<&HtmlTextAreaElement> = elt.dyn_ref();
|
||||
let select: Option<&HtmlSelectElement> = elt.dyn_ref();
|
||||
inp.map(|i| i.set_value(val.as_ref())).unwrap_or_else(|| {
|
||||
textarea
|
||||
.map(|t| t.set_value(val.as_ref()))
|
||||
.unwrap_or_else(|| select.unwrap().set_value(val.as_ref()))
|
||||
})
|
||||
}
|
||||
|
||||
fn no_return(evt: KeyDownEvent) {
|
||||
fn no_return(evt: KeyboardEvent) {
|
||||
if evt.key() == "Enter" {
|
||||
evt.prevent_default();
|
||||
}
|
||||
@@ -51,7 +52,6 @@ fn no_return(evt: KeyDownEvent) {
|
||||
pub enum EditorError {
|
||||
NoneError,
|
||||
DOMError,
|
||||
TypeError,
|
||||
}
|
||||
|
||||
impl From<std::option::NoneError> for EditorError {
|
||||
@@ -59,22 +59,7 @@ impl From<std::option::NoneError> for EditorError {
|
||||
EditorError::NoneError
|
||||
}
|
||||
}
|
||||
impl From<stdweb::web::error::InvalidCharacterError> for EditorError {
|
||||
fn from(_: stdweb::web::error::InvalidCharacterError) -> Self {
|
||||
EditorError::DOMError
|
||||
}
|
||||
}
|
||||
impl From<stdweb::private::TODO> for EditorError {
|
||||
fn from(_: stdweb::private::TODO) -> Self {
|
||||
EditorError::DOMError
|
||||
}
|
||||
}
|
||||
impl From<stdweb::private::ConversionError> for EditorError {
|
||||
fn from(_: stdweb::private::ConversionError) -> Self {
|
||||
EditorError::TypeError
|
||||
}
|
||||
}
|
||||
const AUTOSAVE_DEBOUNCE_TIME: u32 = 5000;
|
||||
const AUTOSAVE_DEBOUNCE_TIME: i32 = 5000;
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct AutosaveInformation {
|
||||
contents: String,
|
||||
@@ -85,10 +70,16 @@ struct AutosaveInformation {
|
||||
tags: String,
|
||||
title: String,
|
||||
}
|
||||
js_serializable!(AutosaveInformation);
|
||||
fn is_basic_editor() -> bool {
|
||||
if let Some(basic_editor) = window().local_storage().get("basic-editor") {
|
||||
basic_editor == "true"
|
||||
if let Some(basic_editor) = window()
|
||||
.unwrap()
|
||||
.local_storage()
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.get("basic-editor")
|
||||
.unwrap()
|
||||
{
|
||||
&basic_editor == "true"
|
||||
} else {
|
||||
false
|
||||
}
|
||||
@@ -97,65 +88,58 @@ fn get_title() -> String {
|
||||
if is_basic_editor() {
|
||||
get_elt_value("title")
|
||||
} else {
|
||||
let title_field = HtmlElement::try_from(
|
||||
document()
|
||||
.query_selector("#plume-editor > h1")
|
||||
.ok()
|
||||
.unwrap()
|
||||
.unwrap(),
|
||||
)
|
||||
.ok()
|
||||
.unwrap();
|
||||
title_field.inner_text()
|
||||
document()
|
||||
.query_selector("#plume-editor > h1")
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.dyn_ref::<HtmlElement>()
|
||||
.unwrap()
|
||||
.inner_text()
|
||||
}
|
||||
}
|
||||
fn get_autosave_id() -> String {
|
||||
format!(
|
||||
"editor_contents={}",
|
||||
window().location().unwrap().pathname().unwrap()
|
||||
window().unwrap().location().pathname().unwrap()
|
||||
)
|
||||
}
|
||||
fn get_editor_contents() -> String {
|
||||
if is_basic_editor() {
|
||||
get_elt_value("editor-content")
|
||||
} else {
|
||||
let editor =
|
||||
HtmlElement::try_from(document().query_selector("article").ok().unwrap().unwrap())
|
||||
.ok()
|
||||
.unwrap();
|
||||
editor.child_nodes().iter().fold(String::new(), |md, ch| {
|
||||
let editor = document().query_selector("article").unwrap().unwrap();
|
||||
let child_nodes = editor.child_nodes();
|
||||
let mut md = String::new();
|
||||
for i in 0..child_nodes.length() {
|
||||
let ch = child_nodes.get(i).unwrap();
|
||||
let to_append = match ch.node_type() {
|
||||
NodeType::Element => {
|
||||
if js! { return @{&ch}.tagName; } == "DIV" {
|
||||
(js! { return @{&ch}.innerHTML; })
|
||||
.try_into()
|
||||
.unwrap_or_default()
|
||||
Node::ELEMENT_NODE => {
|
||||
let elt = ch.dyn_ref::<Element>().unwrap();
|
||||
if elt.tag_name() == "DIV" {
|
||||
elt.inner_html()
|
||||
} else {
|
||||
(js! { return @{&ch}.outerHTML; })
|
||||
.try_into()
|
||||
.unwrap_or_default()
|
||||
elt.outer_html()
|
||||
}
|
||||
}
|
||||
NodeType::Text => ch.node_value().unwrap_or_default(),
|
||||
Node::TEXT_NODE => ch.node_value().unwrap_or_default(),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
format!("{}\n\n{}", md, to_append)
|
||||
})
|
||||
md = format!("{}\n\n{}", md, to_append);
|
||||
}
|
||||
md
|
||||
}
|
||||
}
|
||||
fn get_subtitle() -> String {
|
||||
if is_basic_editor() {
|
||||
get_elt_value("subtitle")
|
||||
} else {
|
||||
let subtitle_element = HtmlElement::try_from(
|
||||
document()
|
||||
.query_selector("#plume-editor > h2")
|
||||
.unwrap()
|
||||
.unwrap(),
|
||||
)
|
||||
.ok()
|
||||
.unwrap();
|
||||
subtitle_element.inner_text()
|
||||
document()
|
||||
.query_selector("#plume-editor > h2")
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.dyn_ref::<HtmlElement>()
|
||||
.unwrap()
|
||||
.inner_text()
|
||||
}
|
||||
}
|
||||
fn autosave() {
|
||||
@@ -170,27 +154,31 @@ fn autosave() {
|
||||
};
|
||||
let id = get_autosave_id();
|
||||
match window()
|
||||
.unwrap()
|
||||
.local_storage()
|
||||
.insert(&id, &serde_json::to_string(&info).unwrap())
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.set(&id, &serde_json::to_string(&info).unwrap())
|
||||
{
|
||||
Ok(_) => {}
|
||||
_ => console!(log, "Autosave failed D:"),
|
||||
_ => console::log_1(&"Autosave failed D:".into()),
|
||||
}
|
||||
}
|
||||
//This is only necessary until we go to stdweb 4.20 at least
|
||||
fn confirm(message: &str) -> bool {
|
||||
let result: bool = js! {return confirm(@{message});} == true;
|
||||
result
|
||||
}
|
||||
fn load_autosave() {
|
||||
if let Some(autosave_str) = window().local_storage().get(&get_autosave_id()) {
|
||||
if let Ok(Some(autosave_str)) = window()
|
||||
.unwrap()
|
||||
.local_storage()
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.get(&get_autosave_id())
|
||||
{
|
||||
let autosave_info: AutosaveInformation = serde_json::from_str(&autosave_str).ok().unwrap();
|
||||
let message = i18n!(
|
||||
CATALOG,
|
||||
"Do you want to load the local autosave last edited at {}?";
|
||||
Date::from_time(autosave_info.last_saved).to_date_string()
|
||||
Date::new(&JsValue::from_f64(autosave_info.last_saved)).to_date_string().as_string().unwrap()
|
||||
);
|
||||
if confirm(&message) {
|
||||
if let Ok(true) = window().unwrap().confirm_with_message(&message) {
|
||||
set_value("editor-content", &autosave_info.contents);
|
||||
set_value("title", &autosave_info.title);
|
||||
set_value("subtitle", &autosave_info.subtitle);
|
||||
@@ -203,18 +191,33 @@ fn load_autosave() {
|
||||
}
|
||||
}
|
||||
fn clear_autosave() {
|
||||
window().local_storage().remove(&get_autosave_id());
|
||||
console!(log, &format!("Saved to {}", &get_autosave_id()));
|
||||
window()
|
||||
.unwrap()
|
||||
.local_storage()
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.remove_item(&get_autosave_id())
|
||||
.unwrap();
|
||||
console::log_1(&&format!("Saved to {}", &get_autosave_id()).into());
|
||||
}
|
||||
type TimeoutHandle = i32;
|
||||
lazy_static! {
|
||||
static ref AUTOSAVE_TIMEOUT: Mutex<Option<TimeoutHandle>> = Mutex::new(None);
|
||||
}
|
||||
fn autosave_debounce() {
|
||||
let window = window().unwrap();
|
||||
let timeout = &mut AUTOSAVE_TIMEOUT.lock().unwrap();
|
||||
if let Some(timeout) = timeout.take() {
|
||||
timeout.clear();
|
||||
window.clear_timeout_with_handle(timeout);
|
||||
}
|
||||
**timeout = Some(window().set_clearable_timeout(autosave, AUTOSAVE_DEBOUNCE_TIME));
|
||||
let callback = Closure::once(autosave);
|
||||
**timeout = window
|
||||
.set_timeout_with_callback_and_timeout_and_arguments_0(
|
||||
callback.as_ref().unchecked_ref(),
|
||||
AUTOSAVE_DEBOUNCE_TIME,
|
||||
)
|
||||
.ok();
|
||||
callback.forget();
|
||||
}
|
||||
fn init_widget(
|
||||
parent: &Element,
|
||||
@@ -223,19 +226,33 @@ fn init_widget(
|
||||
content: String,
|
||||
disable_return: bool,
|
||||
) -> Result<HtmlElement, EditorError> {
|
||||
let widget = placeholder(make_editable(tag).try_into()?, &placeholder_text);
|
||||
let widget = placeholder(
|
||||
make_editable(tag).dyn_into::<HtmlElement>().unwrap(),
|
||||
&placeholder_text,
|
||||
);
|
||||
if !content.is_empty() {
|
||||
widget.dataset().insert("edited", "true")?;
|
||||
widget
|
||||
.dataset()
|
||||
.set("edited", "true")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
}
|
||||
widget.append_child(&document().create_text_node(&content));
|
||||
widget
|
||||
.append_child(&document().create_text_node(&content))
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
if disable_return {
|
||||
widget.add_event_listener(no_return);
|
||||
let callback = Closure::wrap(Box::new(no_return) as Box<dyn FnMut(KeyboardEvent)>);
|
||||
widget
|
||||
.add_event_listener_with_callback("keydown", callback.as_ref().unchecked_ref())
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
callback.forget();
|
||||
}
|
||||
|
||||
parent.append_child(&widget);
|
||||
parent
|
||||
.append_child(&widget)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
// We need to do that to make sure the placeholder is correctly rendered
|
||||
widget.focus();
|
||||
widget.blur();
|
||||
widget.focus().map_err(|_| EditorError::DOMError)?;
|
||||
widget.blur().map_err(|_| EditorError::DOMError)?;
|
||||
|
||||
filter_paste(&widget);
|
||||
|
||||
@@ -244,48 +261,88 @@ fn init_widget(
|
||||
|
||||
fn filter_paste(elt: &HtmlElement) {
|
||||
// Only insert text when pasting something
|
||||
js! {
|
||||
@{&elt}.addEventListener("paste", function (evt) {
|
||||
evt.preventDefault();
|
||||
document.execCommand("insertText", false, evt.clipboardData.getData("text"));
|
||||
});
|
||||
};
|
||||
let insert_text = Closure::wrap(Box::new(|evt: ClipboardEvent| {
|
||||
evt.prevent_default();
|
||||
if let Some(data) = evt.clipboard_data() {
|
||||
if let Ok(data) = data.get_data("text") {
|
||||
document()
|
||||
.dyn_ref::<HtmlDocument>()
|
||||
.unwrap()
|
||||
.exec_command_with_show_ui_and_value("insertText", false, &data)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}) as Box<dyn FnMut(ClipboardEvent)>);
|
||||
elt.add_event_listener_with_callback("paste", insert_text.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
insert_text.forget();
|
||||
}
|
||||
|
||||
pub fn init() -> Result<(), EditorError> {
|
||||
if let Some(ed) = document().get_element_by_id("plume-fallback-editor") {
|
||||
load_autosave();
|
||||
ed.add_event_listener(|_: SubmitEvent| clear_autosave());
|
||||
let callback = Closure::wrap(Box::new(|_| clear_autosave()) as Box<dyn FnMut(Event)>);
|
||||
ed.add_event_listener_with_callback("submit", callback.as_ref().unchecked_ref())
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
callback.forget();
|
||||
}
|
||||
// Check if the user wants to use the basic editor
|
||||
if window()
|
||||
.unwrap()
|
||||
.local_storage()
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.get("basic-editor")
|
||||
.map(|x| x == "true")
|
||||
.map(|x| x.is_some() && x.unwrap() == "true")
|
||||
.unwrap_or(true)
|
||||
{
|
||||
if let Some(editor) = document().get_element_by_id("plume-fallback-editor") {
|
||||
if let Ok(Some(title_label)) = document().query_selector("label[for=title]") {
|
||||
let editor_button = document().create_element("a")?;
|
||||
js! { @{&editor_button}.href = "#"; }
|
||||
editor_button.add_event_listener(|_: ClickEvent| {
|
||||
if window()
|
||||
let editor_button = document()
|
||||
.create_element("a")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
editor_button
|
||||
.dyn_ref::<HtmlAnchorElement>()
|
||||
.unwrap()
|
||||
.set_href("#");
|
||||
let disable_basic_editor = Closure::wrap(Box::new(|_| {
|
||||
let window = window().unwrap();
|
||||
if window
|
||||
.local_storage()
|
||||
.insert("basic-editor", "false")
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.set("basic-editor", "false")
|
||||
.is_err()
|
||||
{
|
||||
console!(log, "Failed to write into local storage");
|
||||
console::log_1(&"Failed to write into local storage".into());
|
||||
}
|
||||
window().history().go(0).ok(); // refresh
|
||||
});
|
||||
editor_button.append_child(
|
||||
&document().create_text_node(&i18n!(CATALOG, "Open the rich text editor")),
|
||||
window.history().unwrap().go_with_delta(0).ok(); // refresh
|
||||
})
|
||||
as Box<dyn FnMut(MouseEvent)>);
|
||||
editor_button
|
||||
.add_event_listener_with_callback(
|
||||
"click",
|
||||
disable_basic_editor.as_ref().unchecked_ref(),
|
||||
)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
disable_basic_editor.forget();
|
||||
editor_button
|
||||
.append_child(
|
||||
&document().create_text_node(&i18n!(CATALOG, "Open the rich text editor")),
|
||||
)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
editor
|
||||
.insert_before(&editor_button, Some(&title_label))
|
||||
.ok();
|
||||
let callback = Closure::wrap(
|
||||
Box::new(|_| autosave_debounce()) as Box<dyn FnMut(KeyboardEvent)>
|
||||
);
|
||||
editor.insert_before(&editor_button, &title_label).ok();
|
||||
document()
|
||||
.get_element_by_id("editor-content")
|
||||
.unwrap()
|
||||
.add_event_listener(|_: KeyDownEvent| autosave_debounce());
|
||||
.add_event_listener_with_callback("keydown", callback.as_ref().unchecked_ref())
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
callback.forget();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,14 +355,30 @@ pub fn init() -> Result<(), EditorError> {
|
||||
fn init_editor() -> Result<(), EditorError> {
|
||||
if let Some(ed) = document().get_element_by_id("plume-editor") {
|
||||
// Show the editor
|
||||
js! { @{&ed}.style.display = "block"; };
|
||||
ed.dyn_ref::<HtmlElement>()
|
||||
.unwrap()
|
||||
.style()
|
||||
.set_property("display", "block")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
// And hide the HTML-only fallback
|
||||
let old_ed = document().get_element_by_id("plume-fallback-editor")?;
|
||||
let old_ed = document().get_element_by_id("plume-fallback-editor");
|
||||
if old_ed.is_none() {
|
||||
return Ok(());
|
||||
}
|
||||
let old_ed = old_ed.unwrap();
|
||||
let old_title = document().get_element_by_id("plume-editor-title")?;
|
||||
js! {
|
||||
@{&old_ed}.style.display = "none";
|
||||
@{&old_title}.style.display = "none";
|
||||
};
|
||||
old_ed
|
||||
.dyn_ref::<HtmlElement>()
|
||||
.unwrap()
|
||||
.style()
|
||||
.set_property("display", "none")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
old_title
|
||||
.dyn_ref::<HtmlElement>()
|
||||
.unwrap()
|
||||
.style()
|
||||
.set_property("display", "none")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
|
||||
// Get content from the old editor (when editing an article for instance)
|
||||
let title_val = get_elt_value("title");
|
||||
@@ -327,35 +400,44 @@ fn init_editor() -> Result<(), EditorError> {
|
||||
content_val.clone(),
|
||||
false,
|
||||
)?;
|
||||
js! { @{&content}.innerHTML = @{content_val}; };
|
||||
content.set_inner_html(&content_val);
|
||||
|
||||
// character counter
|
||||
content.add_event_listener(mv!(content => move |_: KeyDownEvent| {
|
||||
window().set_timeout(mv!(content => move || {
|
||||
let character_counter = Closure::wrap(Box::new(mv!(content => move |_| {
|
||||
let update_char_count = Closure::wrap(Box::new(mv!(content => move || {
|
||||
if let Some(e) = document().get_element_by_id("char-count") {
|
||||
let count = chars_left("#plume-fallback-editor", &content).unwrap_or_default();
|
||||
let text = i18n!(CATALOG, "Around {} characters left"; count);
|
||||
HtmlElement::try_from(e).map(|e| {
|
||||
js!{@{e}.innerText = @{text}};
|
||||
}).ok();
|
||||
e.dyn_ref::<HtmlElement>().map(|e| {
|
||||
e.set_inner_text(&text);
|
||||
}).unwrap();
|
||||
};
|
||||
}), 0);
|
||||
})) as Box<dyn FnMut()>);
|
||||
window().unwrap().set_timeout_with_callback_and_timeout_and_arguments(update_char_count.as_ref().unchecked_ref(), 0, &js_sys::Array::new()).unwrap();
|
||||
update_char_count.forget();
|
||||
autosave_debounce();
|
||||
}));
|
||||
})) as Box<dyn FnMut(KeyboardEvent)>);
|
||||
content
|
||||
.add_event_listener_with_callback("keydown", character_counter.as_ref().unchecked_ref())
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
character_counter.forget();
|
||||
|
||||
document().get_element_by_id("publish")?.add_event_listener(
|
||||
mv!(title, subtitle, content, old_ed => move |_: ClickEvent| {
|
||||
let popup = document().get_element_by_id("publish-popup").or_else(||
|
||||
init_popup(&title, &subtitle, &content, &old_ed).ok()
|
||||
).unwrap();
|
||||
let bg = document().get_element_by_id("popup-bg").or_else(||
|
||||
init_popup_bg().ok()
|
||||
).unwrap();
|
||||
let show_popup = Closure::wrap(Box::new(mv!(title, subtitle, content, old_ed => move |_| {
|
||||
let popup = document().get_element_by_id("publish-popup").or_else(||
|
||||
init_popup(&title, &subtitle, &content, &old_ed).ok()
|
||||
).unwrap();
|
||||
let bg = document().get_element_by_id("popup-bg").or_else(||
|
||||
init_popup_bg().ok()
|
||||
).unwrap();
|
||||
|
||||
popup.class_list().add("show").unwrap();
|
||||
bg.class_list().add("show").unwrap();
|
||||
}),
|
||||
);
|
||||
popup.class_list().add_1("show").unwrap();
|
||||
bg.class_list().add_1("show").unwrap();
|
||||
})) as Box<dyn FnMut(MouseEvent)>);
|
||||
document()
|
||||
.get_element_by_id("publish")?
|
||||
.add_event_listener_with_callback("click", show_popup.as_ref().unchecked_ref())
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
show_popup.forget();
|
||||
|
||||
show_errors();
|
||||
setup_close_button();
|
||||
@@ -365,32 +447,47 @@ fn init_editor() -> Result<(), EditorError> {
|
||||
|
||||
fn setup_close_button() {
|
||||
if let Some(button) = document().get_element_by_id("close-editor") {
|
||||
button.add_event_listener(|_: ClickEvent| {
|
||||
let close_editor = Closure::wrap(Box::new(|_| {
|
||||
window()
|
||||
.unwrap()
|
||||
.local_storage()
|
||||
.insert("basic-editor", "true")
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.set("basic-editor", "true")
|
||||
.unwrap();
|
||||
window().history().go(0).unwrap(); // Refresh the page
|
||||
});
|
||||
window()
|
||||
.unwrap()
|
||||
.history()
|
||||
.unwrap()
|
||||
.go_with_delta(0)
|
||||
.unwrap(); // Refresh the page
|
||||
}) as Box<dyn FnMut(MouseEvent)>);
|
||||
button
|
||||
.add_event_listener_with_callback("click", close_editor.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
close_editor.forget();
|
||||
}
|
||||
}
|
||||
|
||||
fn show_errors() {
|
||||
if let Ok(Some(header)) = document().query_selector("header") {
|
||||
let list = document().create_element("header").unwrap();
|
||||
list.class_list().add("messages").unwrap();
|
||||
for error in document().query_selector_all("p.error").unwrap() {
|
||||
let document = document();
|
||||
if let Ok(Some(header)) = document.query_selector("header") {
|
||||
let list = document.create_element("header").unwrap();
|
||||
list.class_list().add_1("messages").unwrap();
|
||||
let errors = document.query_selector_all("p.error").unwrap();
|
||||
for i in 0..errors.length() {
|
||||
let error = errors.get(i).unwrap();
|
||||
error
|
||||
.parent_element()
|
||||
.unwrap()
|
||||
.remove_child(&error)
|
||||
.unwrap();
|
||||
list.append_child(&error);
|
||||
let _ = list.append_child(&error);
|
||||
}
|
||||
header
|
||||
.parent_element()
|
||||
.unwrap()
|
||||
.insert_before(&list, &header.next_sibling().unwrap())
|
||||
.insert_before(&list, header.next_sibling().as_ref())
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
@@ -401,9 +498,17 @@ fn init_popup(
|
||||
content: &HtmlElement,
|
||||
old_ed: &Element,
|
||||
) -> Result<Element, EditorError> {
|
||||
let popup = document().create_element("div")?;
|
||||
popup.class_list().add("popup")?;
|
||||
popup.set_attribute("id", "publish-popup")?;
|
||||
let document = document();
|
||||
let popup = document
|
||||
.create_element("div")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
popup
|
||||
.class_list()
|
||||
.add_1("popup")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
popup
|
||||
.set_attribute("id", "publish-popup")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
|
||||
let tags = get_elt_value("tags")
|
||||
.split(',')
|
||||
@@ -411,112 +516,157 @@ fn init_popup(
|
||||
.map(str::to_string)
|
||||
.collect::<Vec<_>>();
|
||||
let license = get_elt_value("license");
|
||||
make_input(&i18n!(CATALOG, "Tags"), "popup-tags", &popup).set_raw_value(&tags.join(", "));
|
||||
make_input(&i18n!(CATALOG, "License"), "popup-license", &popup).set_raw_value(&license);
|
||||
make_input(&i18n!(CATALOG, "Tags"), "popup-tags", &popup).set_value(&tags.join(", "));
|
||||
make_input(&i18n!(CATALOG, "License"), "popup-license", &popup).set_value(&license);
|
||||
|
||||
let cover_label = document().create_element("label")?;
|
||||
cover_label.append_child(&document().create_text_node(&i18n!(CATALOG, "Cover")));
|
||||
cover_label.set_attribute("for", "cover")?;
|
||||
let cover = document().get_element_by_id("cover")?;
|
||||
let cover_label = document
|
||||
.create_element("label")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
cover_label
|
||||
.append_child(&document.create_text_node(&i18n!(CATALOG, "Cover")))
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
cover_label
|
||||
.set_attribute("for", "cover")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
let cover = document.get_element_by_id("cover")?;
|
||||
cover.parent_element()?.remove_child(&cover).ok();
|
||||
popup.append_child(&cover_label);
|
||||
popup.append_child(&cover);
|
||||
popup
|
||||
.append_child(&cover_label)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
popup
|
||||
.append_child(&cover)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
|
||||
if let Some(draft_checkbox) = document().get_element_by_id("draft") {
|
||||
let draft_label = document().create_element("label")?;
|
||||
draft_label.set_attribute("for", "popup-draft")?;
|
||||
if let Some(draft_checkbox) = document.get_element_by_id("draft") {
|
||||
let draft_checkbox = draft_checkbox.dyn_ref::<HtmlInputElement>().unwrap();
|
||||
let draft_label = document
|
||||
.create_element("label")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
draft_label
|
||||
.set_attribute("for", "popup-draft")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
|
||||
let draft = document().create_element("input").unwrap();
|
||||
js! {
|
||||
@{&draft}.id = "popup-draft";
|
||||
@{&draft}.name = "popup-draft";
|
||||
@{&draft}.type = "checkbox";
|
||||
@{&draft}.checked = @{&draft_checkbox}.checked;
|
||||
};
|
||||
let draft = document.create_element("input").unwrap();
|
||||
draft.set_id("popup-draft");
|
||||
let draft = draft.dyn_ref::<HtmlInputElement>().unwrap();
|
||||
draft.set_name("popup-draft");
|
||||
draft.set_type("checkbox");
|
||||
draft.set_checked(draft_checkbox.checked());
|
||||
|
||||
draft_label.append_child(&draft);
|
||||
draft_label.append_child(&document().create_text_node(&i18n!(CATALOG, "This is a draft")));
|
||||
popup.append_child(&draft_label);
|
||||
draft_label
|
||||
.append_child(&draft)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
draft_label
|
||||
.append_child(&document.create_text_node(&i18n!(CATALOG, "This is a draft")))
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
popup
|
||||
.append_child(&draft_label)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
}
|
||||
|
||||
let button = document().create_element("input")?;
|
||||
js! {
|
||||
@{&button}.type = "submit";
|
||||
@{&button}.value = @{i18n!(CATALOG, "Publish")};
|
||||
};
|
||||
button.append_child(&document().create_text_node(&i18n!(CATALOG, "Publish")));
|
||||
button.add_event_listener(
|
||||
mv!(title, subtitle, content, old_ed => move |_: ClickEvent| {
|
||||
title.focus(); // Remove the placeholder before publishing
|
||||
set_value("title", title.inner_text());
|
||||
subtitle.focus();
|
||||
set_value("subtitle", subtitle.inner_text());
|
||||
content.focus();
|
||||
set_value("editor-content", content.child_nodes().iter().fold(String::new(), |md, ch| {
|
||||
let to_append = match ch.node_type() {
|
||||
NodeType::Element => {
|
||||
if js!{ return @{&ch}.tagName; } == "DIV" {
|
||||
(js!{ return @{&ch}.innerHTML; }).try_into().unwrap_or_default()
|
||||
} else {
|
||||
(js!{ return @{&ch}.outerHTML; }).try_into().unwrap_or_default()
|
||||
}
|
||||
},
|
||||
NodeType::Text => ch.node_value().unwrap_or_default(),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
format!("{}\n\n{}", md, to_append)
|
||||
}));
|
||||
set_value("tags", get_elt_value("popup-tags"));
|
||||
if let Some(draft) = document().get_element_by_id("popup-draft") {
|
||||
js!{
|
||||
document.getElementById("draft").checked = @{draft}.checked;
|
||||
};
|
||||
}
|
||||
let cover = document().get_element_by_id("cover").unwrap();
|
||||
cover.parent_element().unwrap().remove_child(&cover).ok();
|
||||
old_ed.append_child(&cover);
|
||||
set_value("license", get_elt_value("popup-license"));
|
||||
clear_autosave();
|
||||
js! {
|
||||
@{&old_ed}.submit();
|
||||
let button = document
|
||||
.create_element("input")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
button
|
||||
.append_child(&document.create_text_node(&i18n!(CATALOG, "Publish")))
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
let button = button.dyn_ref::<HtmlInputElement>().unwrap();
|
||||
button.set_type("submit");
|
||||
button.set_value(&i18n!(CATALOG, "Publish"));
|
||||
let callback = Closure::wrap(Box::new(mv!(title, subtitle, content, old_ed => move |_| {
|
||||
let document = self::document();
|
||||
title.focus().unwrap(); // Remove the placeholder before publishing
|
||||
set_value("title", title.inner_text());
|
||||
subtitle.focus().unwrap();
|
||||
set_value("subtitle", subtitle.inner_text());
|
||||
content.focus().unwrap();
|
||||
let mut md = String::new();
|
||||
let child_nodes = content.child_nodes();
|
||||
for i in 0..child_nodes.length() {
|
||||
let ch = child_nodes.get(i).unwrap();
|
||||
let to_append = match ch.node_type() {
|
||||
Node::ELEMENT_NODE => {
|
||||
let ch = ch.dyn_ref::<Element>().unwrap();
|
||||
if ch.tag_name() == "DIV" {
|
||||
ch.inner_html()
|
||||
} else {
|
||||
ch.outer_html()
|
||||
}
|
||||
},
|
||||
Node::TEXT_NODE => ch.node_value().unwrap_or_default(),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
}),
|
||||
);
|
||||
popup.append_child(&button);
|
||||
md = format!("{}\n\n{}", md, to_append);
|
||||
}
|
||||
set_value("editor-content", md);
|
||||
set_value("tags", get_elt_value("popup-tags"));
|
||||
if let Some(draft) = document.get_element_by_id("popup-draft") {
|
||||
if let Some(draft_checkbox) = document.get_element_by_id("draft") {
|
||||
let draft_checkbox = draft_checkbox.dyn_ref::<HtmlInputElement>().unwrap();
|
||||
let draft = draft.dyn_ref::<HtmlInputElement>().unwrap();
|
||||
draft_checkbox.set_checked(draft.checked());
|
||||
}
|
||||
}
|
||||
let cover = document.get_element_by_id("cover").unwrap();
|
||||
cover.parent_element().unwrap().remove_child(&cover).ok();
|
||||
old_ed.append_child(&cover).unwrap();
|
||||
set_value("license", get_elt_value("popup-license"));
|
||||
clear_autosave();
|
||||
let old_ed = old_ed.dyn_ref::<HtmlFormElement>().unwrap();
|
||||
old_ed.submit().unwrap();
|
||||
})) as Box<dyn FnMut(MouseEvent)>);
|
||||
button
|
||||
.add_event_listener_with_callback("click", callback.as_ref().unchecked_ref())
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
callback.forget();
|
||||
popup
|
||||
.append_child(&button)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
|
||||
document().body()?.append_child(&popup);
|
||||
document
|
||||
.body()?
|
||||
.append_child(&popup)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
Ok(popup)
|
||||
}
|
||||
|
||||
fn init_popup_bg() -> Result<Element, EditorError> {
|
||||
let bg = document().create_element("div")?;
|
||||
bg.class_list().add("popup-bg")?;
|
||||
bg.set_attribute("id", "popup-bg")?;
|
||||
let bg = document()
|
||||
.create_element("div")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
bg.class_list()
|
||||
.add_1("popup-bg")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
bg.set_attribute("id", "popup-bg")
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
|
||||
document().body()?.append_child(&bg);
|
||||
bg.add_event_listener(|_: ClickEvent| close_popup());
|
||||
document()
|
||||
.body()?
|
||||
.append_child(&bg)
|
||||
.map_err(|_| EditorError::DOMError)?;
|
||||
let callback = Closure::wrap(Box::new(|_| close_popup()) as Box<dyn FnMut(MouseEvent)>);
|
||||
bg.add_event_listener_with_callback("click", callback.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
callback.forget();
|
||||
Ok(bg)
|
||||
}
|
||||
|
||||
fn chars_left(selector: &str, content: &HtmlElement) -> Option<i32> {
|
||||
match document().query_selector(selector) {
|
||||
Ok(Some(form)) => HtmlElement::try_from(form).ok().and_then(|form| {
|
||||
Ok(Some(form)) => form.dyn_ref::<HtmlElement>().and_then(|form| {
|
||||
if let Some(len) = form
|
||||
.get_attribute("content-size")
|
||||
.and_then(|s| s.parse::<i32>().ok())
|
||||
{
|
||||
(js! {
|
||||
let x = encodeURIComponent(@{content}.innerHTML)
|
||||
.replace(/%20/g, "+")
|
||||
.replace(/%0A/g, "%0D%0A")
|
||||
.replace(new RegExp("[!'*()]", "g"), "XXX") // replace exceptions of encodeURIComponent with placeholder
|
||||
.length + 2;
|
||||
console.log(x);
|
||||
return x;
|
||||
})
|
||||
.try_into()
|
||||
.map(|c: i32| len - c)
|
||||
.ok()
|
||||
(encode_uri_component(&content.inner_html())
|
||||
.replace("%20", "+")
|
||||
.replace("%0A", "%0D0A")
|
||||
.replace_by_pattern(&RegExp::new("[!'*()]", "g"), "XXX")
|
||||
.length()
|
||||
+ 2_u32)
|
||||
.try_into()
|
||||
.map(|c: i32| len - c)
|
||||
.ok()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
@@ -526,26 +676,26 @@ fn chars_left(selector: &str, content: &HtmlElement) -> Option<i32> {
|
||||
}
|
||||
|
||||
fn close_popup() {
|
||||
let hide = |x: Element| x.class_list().remove("show");
|
||||
let hide = |x: Element| x.class_list().remove_1("show");
|
||||
document().get_element_by_id("publish-popup").map(hide);
|
||||
document().get_element_by_id("popup-bg").map(hide);
|
||||
}
|
||||
|
||||
fn make_input(label_text: &str, name: &'static str, form: &Element) -> InputElement {
|
||||
let label = document().create_element("label").unwrap();
|
||||
label.append_child(&document().create_text_node(label_text));
|
||||
fn make_input(label_text: &str, name: &'static str, form: &Element) -> HtmlInputElement {
|
||||
let document = document();
|
||||
let label = document.create_element("label").unwrap();
|
||||
label
|
||||
.append_child(&document.create_text_node(label_text))
|
||||
.unwrap();
|
||||
label.set_attribute("for", name).unwrap();
|
||||
|
||||
let inp: InputElement = document()
|
||||
.create_element("input")
|
||||
.unwrap()
|
||||
.try_into()
|
||||
.unwrap();
|
||||
let inp = document.create_element("input").unwrap();
|
||||
let inp = inp.dyn_into::<HtmlInputElement>().unwrap();
|
||||
inp.set_attribute("name", name).unwrap();
|
||||
inp.set_attribute("id", name).unwrap();
|
||||
|
||||
form.append_child(&label);
|
||||
form.append_child(&inp);
|
||||
form.append_child(&label).unwrap();
|
||||
form.append_child(&inp).unwrap();
|
||||
inp
|
||||
}
|
||||
|
||||
@@ -559,36 +709,46 @@ fn make_editable(tag: &'static str) -> Element {
|
||||
}
|
||||
|
||||
fn placeholder(elt: HtmlElement, text: &str) -> HtmlElement {
|
||||
elt.dataset().insert("placeholder", text).unwrap();
|
||||
elt.dataset().insert("edited", "false").unwrap();
|
||||
elt.dataset().set("placeholder", text).unwrap();
|
||||
elt.dataset().set("edited", "false").unwrap();
|
||||
|
||||
elt.add_event_listener(mv!(elt => move |_: FocusEvent| {
|
||||
let callback = Closure::wrap(Box::new(mv!(elt => move |_: FocusEvent| {
|
||||
if elt.dataset().get("edited").unwrap().as_str() != "true" {
|
||||
clear_children(&elt);
|
||||
}
|
||||
}));
|
||||
elt.add_event_listener(mv!(elt => move |_: BlurEvent| {
|
||||
})) as Box<dyn FnMut(FocusEvent)>);
|
||||
elt.add_event_listener_with_callback("focus", callback.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
callback.forget();
|
||||
let callback = Closure::wrap(Box::new(mv!(elt => move |_: Event| {
|
||||
if elt.dataset().get("edited").unwrap().as_str() != "true" {
|
||||
clear_children(&elt);
|
||||
|
||||
let ph = document().create_element("span").expect("Couldn't create placeholder");
|
||||
ph.class_list().add("placeholder").expect("Couldn't add class");
|
||||
ph.append_child(&document().create_text_node(&elt.dataset().get("placeholder").unwrap_or_default()));
|
||||
elt.append_child(&ph);
|
||||
ph.class_list().add_1("placeholder").expect("Couldn't add class");
|
||||
ph.append_child(&document().create_text_node(&elt.dataset().get("placeholder").unwrap_or_default())).unwrap();
|
||||
elt.append_child(&ph).unwrap();
|
||||
}
|
||||
}));
|
||||
elt.add_event_listener(mv!(elt => move |_: KeyUpEvent| {
|
||||
elt.dataset().insert("edited", if elt.inner_text().trim_matches('\n').is_empty() {
|
||||
})) as Box<dyn FnMut(Event)>);
|
||||
elt.add_event_listener_with_callback("blur", callback.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
callback.forget();
|
||||
let callback = Closure::wrap(Box::new(mv!(elt => move |_: KeyboardEvent| {
|
||||
elt.dataset().set("edited", if elt.inner_text().trim_matches('\n').is_empty() {
|
||||
"false"
|
||||
} else {
|
||||
"true"
|
||||
}).expect("Couldn't update edition state");
|
||||
}));
|
||||
})) as Box<dyn FnMut(KeyboardEvent)>);
|
||||
elt.add_event_listener_with_callback("keyup", callback.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
callback.forget();
|
||||
elt
|
||||
}
|
||||
|
||||
fn clear_children(elt: &HtmlElement) {
|
||||
for child in elt.child_nodes() {
|
||||
elt.remove_child(&child).unwrap();
|
||||
let child_nodes = elt.child_nodes();
|
||||
for _ in 0..child_nodes.length() {
|
||||
elt.remove_child(&child_nodes.get(0).unwrap()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+174
@@ -0,0 +1,174 @@
|
||||
#![recursion_limit = "128"]
|
||||
#![feature(decl_macro, proc_macro_hygiene, try_trait)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate gettext_macros;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
use wasm_bindgen::{prelude::*, JsCast};
|
||||
use web_sys::{console, window, Document, Element, Event, HtmlInputElement, TouchEvent};
|
||||
|
||||
init_i18n!(
|
||||
"plume-front",
|
||||
af,
|
||||
ar,
|
||||
bg,
|
||||
ca,
|
||||
cs,
|
||||
cy,
|
||||
da,
|
||||
de,
|
||||
el,
|
||||
en,
|
||||
eo,
|
||||
es,
|
||||
fa,
|
||||
fi,
|
||||
fr,
|
||||
gl,
|
||||
he,
|
||||
hi,
|
||||
hr,
|
||||
hu,
|
||||
it,
|
||||
ja,
|
||||
ko,
|
||||
nb,
|
||||
nl,
|
||||
no,
|
||||
pl,
|
||||
pt,
|
||||
ro,
|
||||
ru,
|
||||
sat,
|
||||
si,
|
||||
sk,
|
||||
sl,
|
||||
sr,
|
||||
sv,
|
||||
tr,
|
||||
uk,
|
||||
vi,
|
||||
zh
|
||||
);
|
||||
|
||||
mod editor;
|
||||
|
||||
compile_i18n!();
|
||||
|
||||
lazy_static! {
|
||||
static ref CATALOG: gettext::Catalog = {
|
||||
let catalogs = include_i18n!();
|
||||
let lang = window().unwrap().navigator().language().unwrap();
|
||||
let lang = lang.splitn(2, '-').next().unwrap_or("en");
|
||||
|
||||
let english_position = catalogs
|
||||
.iter()
|
||||
.position(|(language_code, _)| *language_code == "en")
|
||||
.unwrap();
|
||||
catalogs
|
||||
.iter()
|
||||
.find(|(l, _)| l == &lang)
|
||||
.unwrap_or(&catalogs[english_position])
|
||||
.clone()
|
||||
.1
|
||||
};
|
||||
}
|
||||
|
||||
#[wasm_bindgen(start)]
|
||||
pub fn main() -> Result<(), JsValue> {
|
||||
extern crate console_error_panic_hook;
|
||||
use std::panic;
|
||||
panic::set_hook(Box::new(console_error_panic_hook::hook));
|
||||
|
||||
menu();
|
||||
search();
|
||||
editor::init()
|
||||
.map_err(|e| console::error_1(&&format!("Editor error: {:?}", e).into()))
|
||||
.ok();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Toggle menu on mobile devices
|
||||
///
|
||||
/// It should normally be working fine even without this code
|
||||
/// But :focus-within is not yet supported by Webkit/Blink
|
||||
fn menu() {
|
||||
let document = document();
|
||||
if let Ok(Some(button)) = document.query_selector("#menu a") {
|
||||
if let Some(menu) = document.get_element_by_id("content") {
|
||||
let show_menu = Closure::wrap(Box::new(|_: TouchEvent| {
|
||||
self::document()
|
||||
.get_element_by_id("menu")
|
||||
.map(|menu| {
|
||||
menu.set_attribute("aria-expanded", "true")
|
||||
.map(|_| menu.class_list().add_1("show"))
|
||||
})
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
}) as Box<dyn FnMut(TouchEvent)>);
|
||||
button
|
||||
.add_event_listener_with_callback("touchend", show_menu.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
show_menu.forget();
|
||||
|
||||
let close_menu = Closure::wrap(Box::new(|evt: TouchEvent| {
|
||||
if evt
|
||||
.target()
|
||||
.unwrap()
|
||||
.dyn_ref::<Element>()
|
||||
.unwrap()
|
||||
.closest("a")
|
||||
.unwrap()
|
||||
.is_some()
|
||||
{
|
||||
return;
|
||||
}
|
||||
self::document()
|
||||
.get_element_by_id("menu")
|
||||
.map(|menu| {
|
||||
menu.set_attribute("aria-expanded", "false")
|
||||
.map(|_| menu.class_list().remove_1("show"))
|
||||
})
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
}) as Box<dyn FnMut(TouchEvent)>);
|
||||
menu.add_event_listener_with_callback("touchend", close_menu.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
close_menu.forget();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear the URL of the search page before submitting request
|
||||
fn search() {
|
||||
if let Some(form) = document().get_element_by_id("form") {
|
||||
let normalize_query = Closure::wrap(Box::new(|_: Event| {
|
||||
document()
|
||||
.query_selector_all("#form input")
|
||||
.map(|inputs| {
|
||||
for i in 0..inputs.length() {
|
||||
let input = inputs.get(i).unwrap();
|
||||
let input = input.dyn_ref::<HtmlInputElement>().unwrap();
|
||||
if input.name().is_empty() {
|
||||
input.set_name(&input.dyn_ref::<Element>().unwrap().id());
|
||||
}
|
||||
if !input.name().is_empty() && input.value().is_empty() {
|
||||
input.set_name("");
|
||||
}
|
||||
}
|
||||
})
|
||||
.unwrap();
|
||||
}) as Box<dyn FnMut(Event)>);
|
||||
form.add_event_listener_with_callback("submit", normalize_query.as_ref().unchecked_ref())
|
||||
.unwrap();
|
||||
normalize_query.forget();
|
||||
}
|
||||
}
|
||||
|
||||
fn document() -> Document {
|
||||
window().unwrap().document().unwrap()
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
#![recursion_limit = "128"]
|
||||
#![feature(decl_macro, proc_macro_hygiene, try_trait)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate gettext_macros;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate stdweb;
|
||||
use stdweb::web::{event::*, *};
|
||||
|
||||
init_i18n!(
|
||||
"plume-front",
|
||||
ar,
|
||||
bg,
|
||||
ca,
|
||||
cs,
|
||||
de,
|
||||
en,
|
||||
eo,
|
||||
es,
|
||||
fa,
|
||||
fr,
|
||||
gl,
|
||||
hi,
|
||||
hr,
|
||||
it,
|
||||
ja,
|
||||
nb,
|
||||
pl,
|
||||
pt,
|
||||
ro,
|
||||
ru,
|
||||
sr,
|
||||
sk,
|
||||
sv
|
||||
);
|
||||
|
||||
mod editor;
|
||||
|
||||
compile_i18n!();
|
||||
|
||||
lazy_static! {
|
||||
static ref CATALOG: gettext::Catalog = {
|
||||
let catalogs = include_i18n!();
|
||||
let lang = js! { return navigator.language }.into_string().unwrap();
|
||||
let lang = lang.splitn(2, '-').next().unwrap_or("en");
|
||||
|
||||
let english_position = catalogs
|
||||
.iter()
|
||||
.position(|(language_code, _)| *language_code == "en")
|
||||
.unwrap();
|
||||
catalogs
|
||||
.iter()
|
||||
.find(|(l, _)| l == &lang)
|
||||
.unwrap_or(&catalogs[english_position])
|
||||
.clone()
|
||||
.1
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
menu();
|
||||
search();
|
||||
editor::init()
|
||||
.map_err(|e| console!(error, format!("Editor error: {:?}", e)))
|
||||
.ok();
|
||||
}
|
||||
|
||||
/// Toggle menu on mobile devices
|
||||
///
|
||||
/// It should normally be working fine even without this code
|
||||
/// But :focus-within is not yet supported by Webkit/Blink
|
||||
fn menu() {
|
||||
if let Some(button) = document().get_element_by_id("menu") {
|
||||
if let Some(menu) = document().get_element_by_id("content") {
|
||||
button.add_event_listener(|_: TouchEnd| {
|
||||
document()
|
||||
.get_element_by_id("menu")
|
||||
.map(|menu| menu.class_list().add("show"));
|
||||
});
|
||||
menu.add_event_listener(|_: TouchEnd| {
|
||||
document()
|
||||
.get_element_by_id("menu")
|
||||
.map(|menu| menu.class_list().remove("show"));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Clear the URL of the search page before submitting request
|
||||
fn search() {
|
||||
if let Some(form) = document().get_element_by_id("form") {
|
||||
form.add_event_listener(|_: SubmitEvent| {
|
||||
document()
|
||||
.query_selector_all("#form input")
|
||||
.map(|inputs| {
|
||||
for input in inputs {
|
||||
js! {
|
||||
if (@{&input}.name === "") {
|
||||
@{&input}.name = @{&input}.id
|
||||
}
|
||||
if (@{&input}.name && !@{&input}.value) {
|
||||
@{&input}.name = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.ok();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "plume-macro"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1-dev"
|
||||
authors = ["Trinity Pointard <trinity.pointard@insa-rennes.fr>"]
|
||||
edition = "2018"
|
||||
description = "Plume procedural macros"
|
||||
|
||||
Regular → Executable
+4
-4
@@ -89,12 +89,12 @@ fn file_to_migration(file: &str) -> TokenStream2 {
|
||||
let mut actions = vec![];
|
||||
for line in file.lines() {
|
||||
if sql {
|
||||
if line.starts_with("--#!") {
|
||||
if let Some(acc_str) = line.strip_prefix("--#!") {
|
||||
if !acc.trim().is_empty() {
|
||||
actions.push(quote!(Action::Sql(#acc)));
|
||||
}
|
||||
sql = false;
|
||||
acc = line[4..].to_string();
|
||||
acc = acc_str.to_string();
|
||||
acc.push('\n');
|
||||
} else if line.starts_with("--") {
|
||||
continue;
|
||||
@@ -102,8 +102,8 @@ fn file_to_migration(file: &str) -> TokenStream2 {
|
||||
acc.push_str(line);
|
||||
acc.push('\n');
|
||||
}
|
||||
} else if line.starts_with("--#!") {
|
||||
acc.push_str(&line[4..]);
|
||||
} else if let Some(acc_str) = line.strip_prefix("--#!") {
|
||||
acc.push_str(&acc_str);
|
||||
acc.push('\n');
|
||||
} else if line.starts_with("--") {
|
||||
continue;
|
||||
|
||||
+10
-8
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "plume-models"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1-dev"
|
||||
authors = ["Plume contributors"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -8,30 +8,32 @@ edition = "2018"
|
||||
activitypub = "0.1.1"
|
||||
ammonia = "2.1.1"
|
||||
askama_escape = "0.1"
|
||||
bcrypt = "0.5"
|
||||
bcrypt = "0.10.1"
|
||||
guid-create = "0.1"
|
||||
heck = "0.3.0"
|
||||
itertools = "0.8.0"
|
||||
lazy_static = "1.0"
|
||||
ldap3 = "0.7.1"
|
||||
migrations_internals= "1.4.0"
|
||||
openssl = "0.10.22"
|
||||
rocket = "0.4.5"
|
||||
rocket = "=0.4.6"
|
||||
rocket_i18n = { git = "https://github.com/Plume-org/rocket_i18n", rev = "e922afa7c366038b3433278c03b1456b346074f2" }
|
||||
reqwest = "0.9"
|
||||
scheduled-thread-pool = "0.2.2"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
tantivy = "0.12.0"
|
||||
tantivy = "0.13.3"
|
||||
url = "2.1"
|
||||
walkdir = "2.2"
|
||||
webfinger = "0.4.1"
|
||||
whatlang = "0.7.1"
|
||||
whatlang = "0.11.1"
|
||||
shrinkwraprs = "0.2.1"
|
||||
diesel-derive-newtype = "0.1.2"
|
||||
glob = "0.3.0"
|
||||
lindera-tantivy = { version = "0.1.3", optional = true }
|
||||
lindera-tantivy = { version = "0.7.1", optional = true }
|
||||
tracing = "0.1.22"
|
||||
riker = "0.4.2"
|
||||
once_cell = "1.5.2"
|
||||
|
||||
[dependencies.chrono]
|
||||
features = ["serde"]
|
||||
@@ -39,7 +41,7 @@ version = "0.4"
|
||||
|
||||
[dependencies.diesel]
|
||||
features = ["r2d2", "chrono"]
|
||||
version = "1.4.2"
|
||||
version = "1.4.5"
|
||||
|
||||
[dependencies.plume-api]
|
||||
path = "../plume-api"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -87,7 +87,7 @@ impl BlocklistedEmail {
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
use crate::{instance::tests as instance_tests, tests::rockets, Connection as Conn};
|
||||
use crate::{instance::tests as instance_tests, tests::db, Connection as Conn};
|
||||
use diesel::Connection;
|
||||
|
||||
pub(crate) fn fill_database(conn: &Conn) -> Vec<BlocklistedEmail> {
|
||||
@@ -106,29 +106,28 @@ pub(crate) mod tests {
|
||||
}
|
||||
#[test]
|
||||
fn test_match() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let various = fill_database(conn);
|
||||
let various = fill_database(&conn);
|
||||
let match1 = "user1@bad-actor.com";
|
||||
let match2 = "spammer@lax-administration.com";
|
||||
let no_match = "happy-user@lax-administration.com";
|
||||
assert_eq!(
|
||||
BlocklistedEmail::matches_blocklist(conn, match1)
|
||||
BlocklistedEmail::matches_blocklist(&conn, match1)
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.id,
|
||||
various[0].id
|
||||
);
|
||||
assert_eq!(
|
||||
BlocklistedEmail::matches_blocklist(conn, match2)
|
||||
BlocklistedEmail::matches_blocklist(&conn, match2)
|
||||
.unwrap()
|
||||
.unwrap()
|
||||
.id,
|
||||
various[1].id
|
||||
);
|
||||
assert_eq!(
|
||||
BlocklistedEmail::matches_blocklist(conn, no_match)
|
||||
BlocklistedEmail::matches_blocklist(&conn, no_match)
|
||||
.unwrap()
|
||||
.is_none(),
|
||||
true
|
||||
|
||||
+108
-96
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
ap_url, instance::*, medias::Media, posts::Post, safe_string::SafeString, schema::blogs,
|
||||
search::Searcher, users::User, Connection, Error, PlumeRocket, Result, ITEMS_PER_PAGE,
|
||||
ap_url, db_conn::DbConn, instance::*, medias::Media, posts::Post, safe_string::SafeString,
|
||||
schema::blogs, users::User, Connection, Error, PlumeRocket, Result, CONFIG, ITEMS_PER_PAGE,
|
||||
};
|
||||
use activitypub::{
|
||||
actor::Group,
|
||||
@@ -18,9 +18,9 @@ use openssl::{
|
||||
};
|
||||
use plume_common::activity_pub::{
|
||||
inbox::{AsActor, FromId},
|
||||
sign, ActivityStream, ApSignature, Id, IntoId, PublicKey, Source,
|
||||
sign::{self, Error as SignatureError, Result as SignatureResult},
|
||||
ActivityStream, ApSignature, Id, IntoId, PublicKey, Source,
|
||||
};
|
||||
use serde_json;
|
||||
use url::Url;
|
||||
use webfinger::*;
|
||||
|
||||
@@ -132,25 +132,34 @@ impl Blog {
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn find_by_fqn(c: &PlumeRocket, fqn: &str) -> Result<Blog> {
|
||||
pub fn find_by_fqn(conn: &DbConn, fqn: &str) -> Result<Blog> {
|
||||
let from_db = blogs::table
|
||||
.filter(blogs::fqn.eq(fqn))
|
||||
.first(&*c.conn)
|
||||
.first(&**conn)
|
||||
.optional()?;
|
||||
if let Some(from_db) = from_db {
|
||||
Ok(from_db)
|
||||
} else {
|
||||
Blog::fetch_from_webfinger(c, fqn)
|
||||
Blog::fetch_from_webfinger(conn, fqn)
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch_from_webfinger(c: &PlumeRocket, acct: &str) -> Result<Blog> {
|
||||
fn fetch_from_webfinger(conn: &DbConn, acct: &str) -> Result<Blog> {
|
||||
resolve_with_prefix(Prefix::Group, acct.to_owned(), true)?
|
||||
.links
|
||||
.into_iter()
|
||||
.find(|l| l.mime_type == Some(String::from("application/activity+json")))
|
||||
.ok_or(Error::Webfinger)
|
||||
.and_then(|l| Blog::from_id(c, &l.href?, None).map_err(|(_, e)| e))
|
||||
.and_then(|l| {
|
||||
Blog::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&l.href?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn to_activity(&self, conn: &Connection) -> Result<CustomGroup> {
|
||||
@@ -217,16 +226,16 @@ impl Blog {
|
||||
|
||||
pub fn outbox(&self, conn: &Connection) -> Result<ActivityStream<OrderedCollection>> {
|
||||
let mut coll = OrderedCollection::default();
|
||||
coll.collection_props.items = serde_json::to_value(self.get_activities(conn)?)?;
|
||||
coll.collection_props.items = serde_json::to_value(self.get_activities(conn))?;
|
||||
coll.collection_props
|
||||
.set_total_items_u64(self.get_activities(conn)?.len() as u64)?;
|
||||
.set_total_items_u64(self.get_activities(conn).len() as u64)?;
|
||||
coll.collection_props
|
||||
.set_first_link(Id::new(ap_url(&format!("{}?page=1", &self.outbox_url))))?;
|
||||
coll.collection_props
|
||||
.set_last_link(Id::new(ap_url(&format!(
|
||||
"{}?page={}",
|
||||
&self.outbox_url,
|
||||
(self.get_activities(conn)?.len() as u64 + ITEMS_PER_PAGE as u64 - 1) as u64
|
||||
(self.get_activities(conn).len() as u64 + ITEMS_PER_PAGE as u64 - 1) as u64
|
||||
/ ITEMS_PER_PAGE as u64
|
||||
))))?;
|
||||
Ok(ActivityStream::new(coll))
|
||||
@@ -237,7 +246,7 @@ impl Blog {
|
||||
(min, max): (i32, i32),
|
||||
) -> Result<ActivityStream<OrderedCollectionPage>> {
|
||||
let mut coll = OrderedCollectionPage::default();
|
||||
let acts = self.get_activity_page(&conn, (min, max))?;
|
||||
let acts = self.get_activity_page(&conn, (min, max));
|
||||
//This still doesn't do anything because the outbox
|
||||
//doesn't do anything yet
|
||||
coll.collection_page_props.set_next_link(Id::new(&format!(
|
||||
@@ -253,15 +262,15 @@ impl Blog {
|
||||
coll.collection_props.items = serde_json::to_value(acts)?;
|
||||
Ok(ActivityStream::new(coll))
|
||||
}
|
||||
fn get_activities(&self, _conn: &Connection) -> Result<Vec<serde_json::Value>> {
|
||||
Ok(vec![])
|
||||
fn get_activities(&self, _conn: &Connection) -> Vec<serde_json::Value> {
|
||||
vec![]
|
||||
}
|
||||
fn get_activity_page(
|
||||
&self,
|
||||
_conn: &Connection,
|
||||
(_min, _max): (i32, i32),
|
||||
) -> Result<Vec<serde_json::Value>> {
|
||||
Ok(vec![])
|
||||
) -> Vec<serde_json::Value> {
|
||||
vec![]
|
||||
}
|
||||
|
||||
pub fn get_keypair(&self) -> Result<PKey<Private>> {
|
||||
@@ -318,9 +327,9 @@ impl Blog {
|
||||
.and_then(|c| c.url().ok())
|
||||
}
|
||||
|
||||
pub fn delete(&self, conn: &Connection, searcher: &Searcher) -> Result<()> {
|
||||
pub fn delete(&self, conn: &Connection) -> Result<()> {
|
||||
for post in Post::get_for_blog(conn, &self)? {
|
||||
post.delete(conn, searcher)?;
|
||||
post.delete(conn)?;
|
||||
}
|
||||
diesel::delete(self)
|
||||
.execute(conn)
|
||||
@@ -335,20 +344,20 @@ impl IntoId for Blog {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromId<PlumeRocket> for Blog {
|
||||
impl FromId<DbConn> for Blog {
|
||||
type Error = Error;
|
||||
type Object = CustomGroup;
|
||||
|
||||
fn from_db(c: &PlumeRocket, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(&c.conn, id)
|
||||
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(&conn, id)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, acct: CustomGroup) -> Result<Self> {
|
||||
fn from_activity(conn: &DbConn, acct: CustomGroup) -> Result<Self> {
|
||||
let url = Url::parse(&acct.object.object_props.id_string()?)?;
|
||||
let inst = url.host_str()?;
|
||||
let instance = Instance::find_by_domain(&c.conn, inst).or_else(|_| {
|
||||
let instance = Instance::find_by_domain(conn, inst).or_else(|_| {
|
||||
Instance::insert(
|
||||
&c.conn,
|
||||
conn,
|
||||
NewInstance {
|
||||
public_domain: inst.to_owned(),
|
||||
name: inst.to_owned(),
|
||||
@@ -360,6 +369,8 @@ impl FromId<PlumeRocket> for Blog {
|
||||
open_registrations: true,
|
||||
short_description_html: String::new(),
|
||||
long_description_html: String::new(),
|
||||
private_key: None,
|
||||
public_key: None,
|
||||
},
|
||||
)
|
||||
})?;
|
||||
@@ -371,9 +382,16 @@ impl FromId<PlumeRocket> for Blog {
|
||||
.and_then(|icon| {
|
||||
let owner = icon.object_props.attributed_to_link::<Id>().ok()?;
|
||||
Media::save_remote(
|
||||
&c.conn,
|
||||
conn,
|
||||
icon.object_props.url_string().ok()?,
|
||||
&User::from_id(c, &owner, None).ok()?,
|
||||
&User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&owner,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.ok()?,
|
||||
)
|
||||
.ok()
|
||||
})
|
||||
@@ -387,9 +405,16 @@ impl FromId<PlumeRocket> for Blog {
|
||||
.and_then(|banner| {
|
||||
let owner = banner.object_props.attributed_to_link::<Id>().ok()?;
|
||||
Media::save_remote(
|
||||
&c.conn,
|
||||
conn,
|
||||
banner.object_props.url_string().ok()?,
|
||||
&User::from_id(c, &owner, None).ok()?,
|
||||
&User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&owner,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.ok()?,
|
||||
)
|
||||
.ok()
|
||||
})
|
||||
@@ -401,7 +426,7 @@ impl FromId<PlumeRocket> for Blog {
|
||||
}
|
||||
|
||||
Blog::insert(
|
||||
&c.conn,
|
||||
conn,
|
||||
NewBlog {
|
||||
actor_id: name.clone(),
|
||||
title: acct.object.object_props.name_string().unwrap_or(name),
|
||||
@@ -452,24 +477,22 @@ impl AsActor<&PlumeRocket> for Blog {
|
||||
}
|
||||
|
||||
impl sign::Signer for Blog {
|
||||
type Error = Error;
|
||||
|
||||
fn get_key_id(&self) -> String {
|
||||
format!("{}#main-key", self.ap_url)
|
||||
}
|
||||
|
||||
fn sign(&self, to_sign: &str) -> Result<Vec<u8>> {
|
||||
fn sign(&self, to_sign: &str) -> SignatureResult<Vec<u8>> {
|
||||
let key = self.get_keypair()?;
|
||||
let mut signer = Signer::new(MessageDigest::sha256(), &key)?;
|
||||
signer.update(to_sign.as_bytes())?;
|
||||
signer.sign_to_vec().map_err(Error::from)
|
||||
signer.sign_to_vec().map_err(SignatureError::from)
|
||||
}
|
||||
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> Result<bool> {
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> SignatureResult<bool> {
|
||||
let key = PKey::from_rsa(Rsa::public_key_from_pem(self.public_key.as_ref())?)?;
|
||||
let mut verifier = Verifier::new(MessageDigest::sha256(), &key)?;
|
||||
verifier.update(data.as_bytes())?;
|
||||
verifier.verify(&signature).map_err(Error::from)
|
||||
verifier.verify(&signature).map_err(SignatureError::from)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,14 +520,8 @@ impl NewBlog {
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
use crate::{
|
||||
blog_authors::*,
|
||||
config::CONFIG,
|
||||
instance::tests as instance_tests,
|
||||
medias::NewMedia,
|
||||
search::tests::get_searcher,
|
||||
tests::{db, rockets},
|
||||
users::tests as usersTests,
|
||||
Connection as Conn,
|
||||
blog_authors::*, instance::tests as instance_tests, medias::NewMedia, tests::db,
|
||||
users::tests as usersTests, Connection as Conn,
|
||||
};
|
||||
use diesel::Connection;
|
||||
|
||||
@@ -591,10 +608,10 @@ pub(crate) mod tests {
|
||||
fn get_instance() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
fill_database(conn);
|
||||
fill_database(&conn);
|
||||
|
||||
let blog = Blog::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlog::new_local(
|
||||
"SomeName".to_owned(),
|
||||
"Some name".to_owned(),
|
||||
@@ -606,7 +623,7 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
blog.get_instance(conn).unwrap().id,
|
||||
blog.get_instance(&conn).unwrap().id,
|
||||
Instance::get_local().unwrap().id
|
||||
);
|
||||
// TODO add tests for remote instance
|
||||
@@ -618,10 +635,10 @@ pub(crate) mod tests {
|
||||
fn authors() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (user, _) = fill_database(conn);
|
||||
let (user, _) = fill_database(&conn);
|
||||
|
||||
let b1 = Blog::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlog::new_local(
|
||||
"SomeName".to_owned(),
|
||||
"Some name".to_owned(),
|
||||
@@ -632,7 +649,7 @@ pub(crate) mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
let b2 = Blog::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlog::new_local(
|
||||
"Blog".to_owned(),
|
||||
"Blog".to_owned(),
|
||||
@@ -645,7 +662,7 @@ pub(crate) mod tests {
|
||||
let blog = vec![b1, b2];
|
||||
|
||||
BlogAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlogAuthor {
|
||||
blog_id: blog[0].id,
|
||||
author_id: user[0].id,
|
||||
@@ -655,7 +672,7 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
|
||||
BlogAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlogAuthor {
|
||||
blog_id: blog[0].id,
|
||||
author_id: user[1].id,
|
||||
@@ -665,7 +682,7 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
|
||||
BlogAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlogAuthor {
|
||||
blog_id: blog[1].id,
|
||||
author_id: user[0].id,
|
||||
@@ -675,39 +692,39 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
|
||||
assert!(blog[0]
|
||||
.list_authors(conn)
|
||||
.list_authors(&conn)
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|a| a.id == user[0].id));
|
||||
assert!(blog[0]
|
||||
.list_authors(conn)
|
||||
.list_authors(&conn)
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|a| a.id == user[1].id));
|
||||
assert!(blog[1]
|
||||
.list_authors(conn)
|
||||
.list_authors(&conn)
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|a| a.id == user[0].id));
|
||||
assert!(!blog[1]
|
||||
.list_authors(conn)
|
||||
.list_authors(&conn)
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|a| a.id == user[1].id));
|
||||
|
||||
assert!(Blog::find_for_author(conn, &user[0])
|
||||
assert!(Blog::find_for_author(&conn, &user[0])
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|b| b.id == blog[0].id));
|
||||
assert!(Blog::find_for_author(conn, &user[1])
|
||||
assert!(Blog::find_for_author(&conn, &user[1])
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|b| b.id == blog[0].id));
|
||||
assert!(Blog::find_for_author(conn, &user[0])
|
||||
assert!(Blog::find_for_author(&conn, &user[0])
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|b| b.id == blog[1].id));
|
||||
assert!(!Blog::find_for_author(conn, &user[1])
|
||||
assert!(!Blog::find_for_author(&conn, &user[1])
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|b| b.id == blog[1].id));
|
||||
@@ -717,13 +734,12 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn find_local() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
fill_database(conn);
|
||||
fill_database(&conn);
|
||||
|
||||
let blog = Blog::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlog::new_local(
|
||||
"SomeName".to_owned(),
|
||||
"Some name".to_owned(),
|
||||
@@ -734,7 +750,7 @@ pub(crate) mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(Blog::find_by_fqn(&r, "SomeName").unwrap().id, blog.id);
|
||||
assert_eq!(Blog::find_by_fqn(&conn, "SomeName").unwrap().id, blog.id);
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
@@ -743,10 +759,10 @@ pub(crate) mod tests {
|
||||
fn get_fqn() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
fill_database(conn);
|
||||
fill_database(&conn);
|
||||
|
||||
let blog = Blog::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlog::new_local(
|
||||
"SomeName".to_owned(),
|
||||
"Some name".to_owned(),
|
||||
@@ -766,12 +782,10 @@ pub(crate) mod tests {
|
||||
fn delete() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, blogs) = fill_database(conn);
|
||||
let (_, blogs) = fill_database(&conn);
|
||||
|
||||
blogs[0]
|
||||
.delete(conn, &get_searcher(&CONFIG.search_tokenizers))
|
||||
.unwrap();
|
||||
assert!(Blog::get(conn, blogs[0].id).is_err());
|
||||
blogs[0].delete(&conn).unwrap();
|
||||
assert!(Blog::get(&conn, blogs[0].id).is_err());
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
@@ -780,11 +794,10 @@ pub(crate) mod tests {
|
||||
fn delete_via_user() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let searcher = get_searcher(&CONFIG.search_tokenizers);
|
||||
let (user, _) = fill_database(conn);
|
||||
let (user, _) = fill_database(&conn);
|
||||
|
||||
let b1 = Blog::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlog::new_local(
|
||||
"SomeName".to_owned(),
|
||||
"Some name".to_owned(),
|
||||
@@ -795,7 +808,7 @@ pub(crate) mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
let b2 = Blog::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlog::new_local(
|
||||
"Blog".to_owned(),
|
||||
"Blog".to_owned(),
|
||||
@@ -808,7 +821,7 @@ pub(crate) mod tests {
|
||||
let blog = vec![b1, b2];
|
||||
|
||||
BlogAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlogAuthor {
|
||||
blog_id: blog[0].id,
|
||||
author_id: user[0].id,
|
||||
@@ -818,7 +831,7 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
|
||||
BlogAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlogAuthor {
|
||||
blog_id: blog[0].id,
|
||||
author_id: user[1].id,
|
||||
@@ -828,7 +841,7 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
|
||||
BlogAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewBlogAuthor {
|
||||
blog_id: blog[1].id,
|
||||
author_id: user[0].id,
|
||||
@@ -837,24 +850,23 @@ pub(crate) mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
user[0].delete(conn, &searcher).unwrap();
|
||||
assert!(Blog::get(conn, blog[0].id).is_ok());
|
||||
assert!(Blog::get(conn, blog[1].id).is_err());
|
||||
user[1].delete(conn, &searcher).unwrap();
|
||||
assert!(Blog::get(conn, blog[0].id).is_err());
|
||||
user[0].delete(&conn).unwrap();
|
||||
assert!(Blog::get(&conn, blog[0].id).is_ok());
|
||||
assert!(Blog::get(&conn, blog[1].id).is_err());
|
||||
user[1].delete(&conn).unwrap();
|
||||
assert!(Blog::get(&conn, blog[0].id).is_err());
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn self_federation() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (users, mut blogs) = fill_database(conn);
|
||||
let (users, mut blogs) = fill_database(&conn);
|
||||
blogs[0].icon_id = Some(
|
||||
Media::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewMedia {
|
||||
file_path: "aaa.png".into(),
|
||||
alt_text: String::new(),
|
||||
@@ -870,7 +882,7 @@ pub(crate) mod tests {
|
||||
);
|
||||
blogs[0].banner_id = Some(
|
||||
Media::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewMedia {
|
||||
file_path: "bbb.png".into(),
|
||||
alt_text: String::new(),
|
||||
@@ -884,11 +896,11 @@ pub(crate) mod tests {
|
||||
.unwrap()
|
||||
.id,
|
||||
);
|
||||
let _: Blog = blogs[0].save_changes(conn).unwrap();
|
||||
let _: Blog = blogs[0].save_changes(&**conn).unwrap();
|
||||
|
||||
let ap_repr = blogs[0].to_activity(conn).unwrap();
|
||||
blogs[0].delete(conn, &*r.searcher).unwrap();
|
||||
let blog = Blog::from_activity(&r, ap_repr).unwrap();
|
||||
let ap_repr = blogs[0].to_activity(&conn).unwrap();
|
||||
blogs[0].delete(&conn).unwrap();
|
||||
let blog = Blog::from_activity(&conn, ap_repr).unwrap();
|
||||
|
||||
assert_eq!(blog.actor_id, blogs[0].actor_id);
|
||||
assert_eq!(blog.title, blogs[0].title);
|
||||
@@ -900,8 +912,8 @@ pub(crate) mod tests {
|
||||
assert_eq!(blog.public_key, blogs[0].public_key);
|
||||
assert_eq!(blog.fqn, blogs[0].fqn);
|
||||
assert_eq!(blog.summary_html, blogs[0].summary_html);
|
||||
assert_eq!(blog.icon_url(conn), blogs[0].icon_url(conn));
|
||||
assert_eq!(blog.banner_url(conn), blogs[0].banner_url(conn));
|
||||
assert_eq!(blog.icon_url(&conn), blogs[0].icon_url(&conn));
|
||||
assert_eq!(blog.banner_url(&conn), blogs[0].banner_url(&conn));
|
||||
|
||||
Ok(())
|
||||
})
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use crate::{
|
||||
comment_seers::{CommentSeers, NewCommentSeers},
|
||||
db_conn::DbConn,
|
||||
instance::Instance,
|
||||
medias::Media,
|
||||
mentions::Mention,
|
||||
@@ -8,7 +9,7 @@ use crate::{
|
||||
safe_string::SafeString,
|
||||
schema::comments,
|
||||
users::User,
|
||||
Connection, Error, PlumeRocket, Result,
|
||||
Connection, Error, Result, CONFIG,
|
||||
};
|
||||
use activitypub::{
|
||||
activity::{Create, Delete},
|
||||
@@ -24,7 +25,6 @@ use plume_common::{
|
||||
},
|
||||
utils,
|
||||
};
|
||||
use serde_json;
|
||||
use std::collections::HashSet;
|
||||
|
||||
#[derive(Queryable, Identifiable, Clone, AsChangeset)]
|
||||
@@ -105,13 +105,13 @@ impl Comment {
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub fn to_activity(&self, c: &PlumeRocket) -> Result<Note> {
|
||||
let author = User::get(&c.conn, self.author_id)?;
|
||||
pub fn to_activity(&self, conn: &DbConn) -> Result<Note> {
|
||||
let author = User::get(conn, self.author_id)?;
|
||||
let (html, mentions, _hashtags) = utils::md_to_html(
|
||||
self.content.get().as_ref(),
|
||||
Some(&Instance::get_local()?.public_domain),
|
||||
true,
|
||||
Some(Media::get_media_processor(&c.conn, vec![&author])),
|
||||
Some(Media::get_media_processor(conn, vec![&author])),
|
||||
);
|
||||
|
||||
let mut note = Note::default();
|
||||
@@ -124,8 +124,8 @@ impl Comment {
|
||||
note.object_props.set_content_string(html)?;
|
||||
note.object_props
|
||||
.set_in_reply_to_link(Id::new(self.in_response_to_id.map_or_else(
|
||||
|| Ok(Post::get(&c.conn, self.post_id)?.ap_url),
|
||||
|id| Ok(Comment::get(&c.conn, id)?.ap_url.unwrap_or_default()) as Result<String>,
|
||||
|| Ok(Post::get(conn, self.post_id)?.ap_url),
|
||||
|id| Ok(Comment::get(conn, id)?.ap_url.unwrap_or_default()) as Result<String>,
|
||||
)?))?;
|
||||
note.object_props
|
||||
.set_published_string(chrono::Utc::now().to_rfc3339())?;
|
||||
@@ -134,16 +134,16 @@ impl Comment {
|
||||
note.object_props.set_tag_link_vec(
|
||||
mentions
|
||||
.into_iter()
|
||||
.filter_map(|m| Mention::build_activity(c, &m).ok())
|
||||
.filter_map(|m| Mention::build_activity(conn, &m).ok())
|
||||
.collect::<Vec<link::Mention>>(),
|
||||
)?;
|
||||
Ok(note)
|
||||
}
|
||||
|
||||
pub fn create_activity(&self, c: &PlumeRocket) -> Result<Create> {
|
||||
let author = User::get(&c.conn, self.author_id)?;
|
||||
pub fn create_activity(&self, conn: &DbConn) -> Result<Create> {
|
||||
let author = User::get(&conn, self.author_id)?;
|
||||
|
||||
let note = self.to_activity(c)?;
|
||||
let note = self.to_activity(conn)?;
|
||||
let mut act = Create::default();
|
||||
act.create_props.set_actor_link(author.into_id())?;
|
||||
act.create_props.set_object_object(note.clone())?;
|
||||
@@ -152,7 +152,7 @@ impl Comment {
|
||||
act.object_props
|
||||
.set_to_link_vec(note.object_props.to_link_vec::<Id>()?)?;
|
||||
act.object_props
|
||||
.set_cc_link_vec(vec![Id::new(self.get_author(&c.conn)?.followers_endpoint)])?;
|
||||
.set_cc_link_vec(vec![Id::new(self.get_author(&conn)?.followers_endpoint)])?;
|
||||
Ok(act)
|
||||
}
|
||||
|
||||
@@ -194,16 +194,15 @@ impl Comment {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromId<PlumeRocket> for Comment {
|
||||
impl FromId<DbConn> for Comment {
|
||||
type Error = Error;
|
||||
type Object = Note;
|
||||
|
||||
fn from_db(c: &PlumeRocket, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(&c.conn, id)
|
||||
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(conn, id)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, note: Note) -> Result<Self> {
|
||||
let conn = &*c.conn;
|
||||
fn from_activity(conn: &DbConn, note: Note) -> Result<Self> {
|
||||
let comm = {
|
||||
let previous_url = note.object_props.in_reply_to.as_ref()?.as_str()?;
|
||||
let previous_comment = Comment::find_by_ap_url(conn, previous_url);
|
||||
@@ -236,9 +235,11 @@ impl FromId<PlumeRocket> for Comment {
|
||||
Ok(Post::find_by_ap_url(conn, previous_url)?.id) as Result<i32>
|
||||
})?,
|
||||
author_id: User::from_id(
|
||||
c,
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
¬e.object_props.attributed_to_link::<Id>()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
@@ -255,9 +256,7 @@ impl FromId<PlumeRocket> for Comment {
|
||||
.and_then(|m| {
|
||||
let author = &Post::get(conn, comm.post_id)?.get_authors(conn)?[0];
|
||||
let not_author = m.link_props.href_string()? != author.ap_url.clone();
|
||||
Ok(Mention::from_activity(
|
||||
conn, &m, comm.id, false, not_author,
|
||||
)?)
|
||||
Mention::from_activity(conn, &m, comm.id, false, not_author)
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
@@ -296,7 +295,13 @@ impl FromId<PlumeRocket> for Comment {
|
||||
.collect::<HashSet<_>>() // remove duplicates (don't do a query more than once)
|
||||
.into_iter()
|
||||
.map(|v| {
|
||||
if let Ok(user) = User::from_id(c, &v, None) {
|
||||
if let Ok(user) = User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&v,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
) {
|
||||
vec![user]
|
||||
} else {
|
||||
vec![] // TODO try to fetch collection
|
||||
@@ -322,41 +327,41 @@ impl FromId<PlumeRocket> for Comment {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Create, &PlumeRocket> for Comment {
|
||||
impl AsObject<User, Create, &DbConn> for Comment {
|
||||
type Error = Error;
|
||||
type Output = Self;
|
||||
|
||||
fn activity(self, _c: &PlumeRocket, _actor: User, _id: &str) -> Result<Self> {
|
||||
fn activity(self, _conn: &DbConn, _actor: User, _id: &str) -> Result<Self> {
|
||||
// The actual creation takes place in the FromId impl
|
||||
Ok(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Delete, &PlumeRocket> for Comment {
|
||||
impl AsObject<User, Delete, &DbConn> for Comment {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, _id: &str) -> Result<()> {
|
||||
fn activity(self, conn: &DbConn, actor: User, _id: &str) -> Result<()> {
|
||||
if self.author_id != actor.id {
|
||||
return Err(Error::Unauthorized);
|
||||
}
|
||||
|
||||
for m in Mention::list_for_comment(&c.conn, self.id)? {
|
||||
for n in Notification::find_for_mention(&c.conn, &m)? {
|
||||
n.delete(&c.conn)?;
|
||||
for m in Mention::list_for_comment(conn, self.id)? {
|
||||
for n in Notification::find_for_mention(conn, &m)? {
|
||||
n.delete(conn)?;
|
||||
}
|
||||
m.delete(&c.conn)?;
|
||||
m.delete(conn)?;
|
||||
}
|
||||
|
||||
for n in Notification::find_for_comment(&c.conn, &self)? {
|
||||
n.delete(&c.conn)?;
|
||||
for n in Notification::find_for_comment(&conn, &self)? {
|
||||
n.delete(&**conn)?;
|
||||
}
|
||||
|
||||
diesel::update(comments::table)
|
||||
.filter(comments::in_response_to_id.eq(self.id))
|
||||
.set(comments::in_response_to_id.eq(self.in_response_to_id))
|
||||
.execute(&*c.conn)?;
|
||||
diesel::delete(&self).execute(&*c.conn)?;
|
||||
.execute(&**conn)?;
|
||||
diesel::delete(&self).execute(&**conn)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -392,17 +397,16 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::inbox::{inbox, tests::fill_database, InboxResult};
|
||||
use crate::safe_string::SafeString;
|
||||
use crate::tests::rockets;
|
||||
use crate::tests::db;
|
||||
use diesel::Connection;
|
||||
|
||||
// creates a post, get it's Create activity, delete the post,
|
||||
// "send" the Create to the inbox, and check it works
|
||||
#[test]
|
||||
fn self_federation() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
|
||||
let original_comm = Comment::insert(
|
||||
conn,
|
||||
@@ -418,14 +422,14 @@ mod tests {
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
let act = original_comm.create_activity(&r).unwrap();
|
||||
let act = original_comm.create_activity(&conn).unwrap();
|
||||
inbox(
|
||||
&r,
|
||||
serde_json::to_value(original_comm.build_delete(conn).unwrap()).unwrap(),
|
||||
&conn,
|
||||
serde_json::to_value(original_comm.build_delete(&conn).unwrap()).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
match inbox(&r, serde_json::to_value(act).unwrap()).unwrap() {
|
||||
match inbox(&conn, serde_json::to_value(act).unwrap()).unwrap() {
|
||||
InboxResult::Commented(c) => {
|
||||
// TODO: one is HTML, the other markdown: assert_eq!(c.content, original_comm.content);
|
||||
assert_eq!(c.in_response_to_id, original_comm.in_response_to_id);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use crate::search::TokenizerKind as SearchTokenizer;
|
||||
use rocket::config::Limits;
|
||||
use rocket::Config as RocketConfig;
|
||||
use std::collections::HashSet;
|
||||
use std::env::{self, var};
|
||||
|
||||
#[cfg(not(test))]
|
||||
@@ -21,6 +22,12 @@ pub struct Config {
|
||||
pub default_theme: String,
|
||||
pub media_directory: String,
|
||||
pub ldap: Option<LdapConfig>,
|
||||
pub proxy: Option<ProxyConfig>,
|
||||
}
|
||||
impl Config {
|
||||
pub fn proxy(&self) -> Option<&reqwest::Proxy> {
|
||||
self.proxy.as_ref().map(|p| &p.proxy)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -157,11 +164,8 @@ impl Default for LogoConfig {
|
||||
};
|
||||
let mut custom_icons = env::vars()
|
||||
.filter_map(|(var, val)| {
|
||||
if var.starts_with("PLUME_LOGO_") {
|
||||
Some((var[11..].to_owned(), val))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
var.strip_prefix("PLUME_LOGO_")
|
||||
.map(|size| (size.to_owned(), val))
|
||||
})
|
||||
.filter_map(|(var, val)| var.parse::<u64>().ok().map(|var| (var, val)))
|
||||
.map(|(dim, src)| Icon {
|
||||
@@ -277,6 +281,45 @@ fn get_ldap_config() -> Option<LdapConfig> {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ProxyConfig {
|
||||
pub url: reqwest::Url,
|
||||
pub only_domains: Option<HashSet<String>>,
|
||||
pub proxy: reqwest::Proxy,
|
||||
}
|
||||
|
||||
fn get_proxy_config() -> Option<ProxyConfig> {
|
||||
let url: reqwest::Url = var("PROXY_URL").ok()?.parse().expect("Invalid PROXY_URL");
|
||||
let proxy_url = url.clone();
|
||||
let only_domains: Option<HashSet<String>> = var("PROXY_DOMAINS")
|
||||
.ok()
|
||||
.map(|ods| ods.split(',').map(str::to_owned).collect());
|
||||
let proxy = if let Some(ref only_domains) = only_domains {
|
||||
let only_domains = only_domains.clone();
|
||||
reqwest::Proxy::custom(move |url| {
|
||||
if let Some(domain) = url.domain() {
|
||||
if only_domains.contains(domain)
|
||||
|| only_domains
|
||||
.iter()
|
||||
.any(|target| domain.ends_with(&format!(".{}", target)))
|
||||
{
|
||||
Some(proxy_url.clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
} else {
|
||||
reqwest::Proxy::all(proxy_url).expect("Invalid PROXY_URL")
|
||||
};
|
||||
Some(ProxyConfig {
|
||||
url,
|
||||
only_domains,
|
||||
proxy,
|
||||
})
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
pub static ref CONFIG: Config = Config {
|
||||
base_url: var("BASE_URL").unwrap_or_else(|_| format!(
|
||||
@@ -305,5 +348,6 @@ lazy_static! {
|
||||
media_directory: var("MEDIA_UPLOAD_DIRECTORY")
|
||||
.unwrap_or_else(|_| "static/media".to_owned()),
|
||||
ldap: get_ldap_config(),
|
||||
proxy: get_proxy_config(),
|
||||
};
|
||||
}
|
||||
|
||||
+38
-21
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
ap_url, notifications::*, schema::follows, users::User, Connection, Error, PlumeRocket, Result,
|
||||
CONFIG,
|
||||
ap_url, db_conn::DbConn, instance::Instance, notifications::*, schema::follows, users::User,
|
||||
Connection, Error, Result, CONFIG,
|
||||
};
|
||||
use activitypub::activity::{Accept, Follow as FollowAct, Undo};
|
||||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl, SaveChangesDsl};
|
||||
@@ -116,7 +116,12 @@ impl Follow {
|
||||
.accept_props
|
||||
.set_actor_link::<Id>(target.clone().into_id())?;
|
||||
accept.accept_props.set_object_object(follow)?;
|
||||
broadcast(&*target, accept, vec![from.clone()]);
|
||||
broadcast(
|
||||
&*target,
|
||||
accept,
|
||||
vec![from.clone()],
|
||||
CONFIG.proxy().cloned(),
|
||||
);
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
@@ -136,11 +141,11 @@ impl Follow {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, FollowAct, &PlumeRocket> for User {
|
||||
impl AsObject<User, FollowAct, &DbConn> for User {
|
||||
type Error = Error;
|
||||
type Output = Follow;
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, id: &str) -> Result<Follow> {
|
||||
fn activity(self, conn: &DbConn, actor: User, id: &str) -> Result<Follow> {
|
||||
// Mastodon (at least) requires the full Follow object when accepting it,
|
||||
// so we rebuilt it here
|
||||
let mut follow = FollowAct::default();
|
||||
@@ -148,40 +153,52 @@ impl AsObject<User, FollowAct, &PlumeRocket> for User {
|
||||
follow
|
||||
.follow_props
|
||||
.set_actor_link::<Id>(actor.clone().into_id())?;
|
||||
Follow::accept_follow(&c.conn, &actor, &self, follow, actor.id, self.id)
|
||||
Follow::accept_follow(conn, &actor, &self, follow, actor.id, self.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromId<PlumeRocket> for Follow {
|
||||
impl FromId<DbConn> for Follow {
|
||||
type Error = Error;
|
||||
type Object = FollowAct;
|
||||
|
||||
fn from_db(c: &PlumeRocket, id: &str) -> Result<Self> {
|
||||
Follow::find_by_ap_url(&c.conn, id)
|
||||
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
|
||||
Follow::find_by_ap_url(conn, id)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, follow: FollowAct) -> Result<Self> {
|
||||
let actor =
|
||||
User::from_id(c, &follow.follow_props.actor_link::<Id>()?, None).map_err(|(_, e)| e)?;
|
||||
fn from_activity(conn: &DbConn, follow: FollowAct) -> Result<Self> {
|
||||
let actor = User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&follow.follow_props.actor_link::<Id>()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?;
|
||||
|
||||
let target = User::from_id(c, &follow.follow_props.object_link::<Id>()?, None)
|
||||
.map_err(|(_, e)| e)?;
|
||||
Follow::accept_follow(&c.conn, &actor, &target, follow, actor.id, target.id)
|
||||
let target = User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&follow.follow_props.object_link::<Id>()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?;
|
||||
Follow::accept_follow(conn, &actor, &target, follow, actor.id, target.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Undo, &PlumeRocket> for Follow {
|
||||
impl AsObject<User, Undo, &DbConn> for Follow {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, _id: &str) -> Result<()> {
|
||||
let conn = &*c.conn;
|
||||
fn activity(self, conn: &DbConn, actor: User, _id: &str) -> Result<()> {
|
||||
let conn = conn;
|
||||
if self.follower_id == actor.id {
|
||||
diesel::delete(&self).execute(conn)?;
|
||||
diesel::delete(&self).execute(&**conn)?;
|
||||
|
||||
// delete associated notification if any
|
||||
if let Ok(notif) = Notification::find(conn, notification_kind::FOLLOW, self.id) {
|
||||
diesel::delete(¬if).execute(conn)?;
|
||||
if let Ok(notif) = Notification::find(&conn, notification_kind::FOLLOW, self.id) {
|
||||
diesel::delete(¬if).execute(&**conn)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
+96
-109
@@ -1,13 +1,15 @@
|
||||
use activitypub::activity::*;
|
||||
use serde_json;
|
||||
|
||||
use crate::{
|
||||
comments::Comment,
|
||||
follows, likes,
|
||||
db_conn::DbConn,
|
||||
follows,
|
||||
instance::Instance,
|
||||
likes,
|
||||
posts::{Post, PostUpdate},
|
||||
reshares::Reshare,
|
||||
users::User,
|
||||
Error, PlumeRocket,
|
||||
Error, CONFIG,
|
||||
};
|
||||
use plume_common::activity_pub::inbox::Inbox;
|
||||
|
||||
@@ -46,34 +48,38 @@ impl_into_inbox_result! {
|
||||
Reshare => Reshared
|
||||
}
|
||||
|
||||
pub fn inbox(ctx: &PlumeRocket, act: serde_json::Value) -> Result<InboxResult, Error> {
|
||||
Inbox::handle(ctx, act)
|
||||
.with::<User, Announce, Post>()
|
||||
.with::<User, Create, Comment>()
|
||||
.with::<User, Create, Post>()
|
||||
.with::<User, Delete, Comment>()
|
||||
.with::<User, Delete, Post>()
|
||||
.with::<User, Delete, User>()
|
||||
.with::<User, Follow, User>()
|
||||
.with::<User, Like, Post>()
|
||||
.with::<User, Undo, Reshare>()
|
||||
.with::<User, Undo, follows::Follow>()
|
||||
.with::<User, Undo, likes::Like>()
|
||||
.with::<User, Update, PostUpdate>()
|
||||
.done()
|
||||
pub fn inbox(conn: &DbConn, act: serde_json::Value) -> Result<InboxResult, Error> {
|
||||
Inbox::handle(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
act,
|
||||
)
|
||||
.with::<User, Announce, Post>(CONFIG.proxy())
|
||||
.with::<User, Create, Comment>(CONFIG.proxy())
|
||||
.with::<User, Create, Post>(CONFIG.proxy())
|
||||
.with::<User, Delete, Comment>(CONFIG.proxy())
|
||||
.with::<User, Delete, Post>(CONFIG.proxy())
|
||||
.with::<User, Delete, User>(CONFIG.proxy())
|
||||
.with::<User, Follow, User>(CONFIG.proxy())
|
||||
.with::<User, Like, Post>(CONFIG.proxy())
|
||||
.with::<User, Undo, Reshare>(CONFIG.proxy())
|
||||
.with::<User, Undo, follows::Follow>(CONFIG.proxy())
|
||||
.with::<User, Undo, likes::Like>(CONFIG.proxy())
|
||||
.with::<User, Update, PostUpdate>(CONFIG.proxy())
|
||||
.done()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::InboxResult;
|
||||
use crate::blogs::tests::fill_database as blog_fill_db;
|
||||
use crate::db_conn::DbConn;
|
||||
use crate::safe_string::SafeString;
|
||||
use crate::tests::rockets;
|
||||
use crate::PlumeRocket;
|
||||
use crate::tests::db;
|
||||
use diesel::Connection;
|
||||
|
||||
pub fn fill_database(
|
||||
rockets: &PlumeRocket,
|
||||
conn: &DbConn,
|
||||
) -> (
|
||||
Vec<crate::posts::Post>,
|
||||
Vec<crate::users::User>,
|
||||
@@ -82,9 +88,9 @@ pub(crate) mod tests {
|
||||
use crate::post_authors::*;
|
||||
use crate::posts::*;
|
||||
|
||||
let (users, blogs) = blog_fill_db(&rockets.conn);
|
||||
let (users, blogs) = blog_fill_db(&conn);
|
||||
let post = Post::insert(
|
||||
&rockets.conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "testing".to_owned(),
|
||||
@@ -98,12 +104,11 @@ pub(crate) mod tests {
|
||||
source: String::new(),
|
||||
cover_id: None,
|
||||
},
|
||||
&rockets.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
PostAuthor::insert(
|
||||
&rockets.conn,
|
||||
&conn,
|
||||
NewPostAuthor {
|
||||
post_id: post.id,
|
||||
author_id: users[0].id,
|
||||
@@ -116,10 +121,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn announce_post() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/announce/1",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -127,7 +131,7 @@ pub(crate) mod tests {
|
||||
"type": "Announce",
|
||||
});
|
||||
|
||||
match super::inbox(&r, act).unwrap() {
|
||||
match super::inbox(&conn, act).unwrap() {
|
||||
super::InboxResult::Reshared(r) => {
|
||||
assert_eq!(r.post_id, posts[0].id);
|
||||
assert_eq!(r.user_id, users[0].id);
|
||||
@@ -141,10 +145,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn create_comment() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -159,7 +162,7 @@ pub(crate) mod tests {
|
||||
"type": "Create",
|
||||
});
|
||||
|
||||
match super::inbox(&r, act).unwrap() {
|
||||
match super::inbox(&conn, act).unwrap() {
|
||||
super::InboxResult::Commented(c) => {
|
||||
assert_eq!(c.author_id, users[0].id);
|
||||
assert_eq!(c.post_id, posts[0].id);
|
||||
@@ -175,10 +178,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn spoof_comment() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -194,7 +196,7 @@ pub(crate) mod tests {
|
||||
});
|
||||
|
||||
assert!(matches!(
|
||||
super::inbox(&r, act.clone()),
|
||||
super::inbox(&conn, act.clone()),
|
||||
Err(super::Error::Inbox(
|
||||
box plume_common::activity_pub::inbox::InboxError::InvalidObject(_),
|
||||
))
|
||||
@@ -205,10 +207,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn spoof_comment_by_object_with_id() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -226,7 +227,7 @@ pub(crate) mod tests {
|
||||
});
|
||||
|
||||
assert!(matches!(
|
||||
super::inbox(&r, act.clone()),
|
||||
super::inbox(&conn, act.clone()),
|
||||
Err(super::Error::Inbox(
|
||||
box plume_common::activity_pub::inbox::InboxError::InvalidObject(_),
|
||||
))
|
||||
@@ -236,10 +237,9 @@ pub(crate) mod tests {
|
||||
}
|
||||
#[test]
|
||||
fn spoof_comment_by_object_without_id() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -255,7 +255,7 @@ pub(crate) mod tests {
|
||||
});
|
||||
|
||||
assert!(matches!(
|
||||
super::inbox(&r, act.clone()),
|
||||
super::inbox(&conn, act.clone()),
|
||||
Err(super::Error::Inbox(
|
||||
box plume_common::activity_pub::inbox::InboxError::InvalidObject(_),
|
||||
))
|
||||
@@ -266,10 +266,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn create_post() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, blogs) = fill_database(&r);
|
||||
let (_, users, blogs) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -290,9 +289,9 @@ pub(crate) mod tests {
|
||||
"type": "Create",
|
||||
});
|
||||
|
||||
match super::inbox(&r, act).unwrap() {
|
||||
match super::inbox(&conn, act).unwrap() {
|
||||
super::InboxResult::Post(p) => {
|
||||
assert!(p.is_author(conn, users[0].id).unwrap());
|
||||
assert!(p.is_author(&conn, users[0].id).unwrap());
|
||||
assert_eq!(p.source, "Hello.".to_owned());
|
||||
assert_eq!(p.blog_id, blogs[0].id);
|
||||
assert_eq!(p.content, SafeString::new("Hello."));
|
||||
@@ -307,10 +306,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn spoof_post() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, blogs) = fill_database(&r);
|
||||
let (_, users, blogs) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -332,7 +330,7 @@ pub(crate) mod tests {
|
||||
});
|
||||
|
||||
assert!(matches!(
|
||||
super::inbox(&r, act.clone()),
|
||||
super::inbox(&conn, act.clone()),
|
||||
Err(super::Error::Inbox(
|
||||
box plume_common::activity_pub::inbox::InboxError::InvalidObject(_),
|
||||
))
|
||||
@@ -343,10 +341,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn spoof_post_by_object_with_id() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, blogs) = fill_database(&r);
|
||||
let (_, users, blogs) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -371,7 +368,7 @@ pub(crate) mod tests {
|
||||
});
|
||||
|
||||
assert!(matches!(
|
||||
super::inbox(&r, act.clone()),
|
||||
super::inbox(&conn, act.clone()),
|
||||
Err(super::Error::Inbox(
|
||||
box plume_common::activity_pub::inbox::InboxError::InvalidObject(_),
|
||||
))
|
||||
@@ -382,10 +379,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn spoof_post_by_object_without_id() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, blogs) = fill_database(&r);
|
||||
let (_, users, blogs) = fill_database(&conn);
|
||||
let act = json!({
|
||||
"id": "https://plu.me/comment/1/activity",
|
||||
"actor": users[0].ap_url,
|
||||
@@ -407,7 +403,7 @@ pub(crate) mod tests {
|
||||
});
|
||||
|
||||
assert!(matches!(
|
||||
super::inbox(&r, act.clone()),
|
||||
super::inbox(&conn, act.clone()),
|
||||
Err(super::Error::Inbox(
|
||||
box plume_common::activity_pub::inbox::InboxError::InvalidObject(_),
|
||||
))
|
||||
@@ -420,12 +416,11 @@ pub(crate) mod tests {
|
||||
fn delete_comment() {
|
||||
use crate::comments::*;
|
||||
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
Comment::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewComment {
|
||||
content: SafeString::new("My comment"),
|
||||
in_response_to_id: None,
|
||||
@@ -445,7 +440,7 @@ pub(crate) mod tests {
|
||||
"object": "https://plu.me/comment/1",
|
||||
"type": "Delete",
|
||||
});
|
||||
assert!(super::inbox(&r, fail_act).is_err());
|
||||
assert!(super::inbox(&conn, fail_act).is_err());
|
||||
|
||||
let ok_act = json!({
|
||||
"id": "https://plu.me/comment/1/delete",
|
||||
@@ -453,17 +448,16 @@ pub(crate) mod tests {
|
||||
"object": "https://plu.me/comment/1",
|
||||
"type": "Delete",
|
||||
});
|
||||
assert!(super::inbox(&r, ok_act).is_ok());
|
||||
assert!(super::inbox(&conn, ok_act).is_ok());
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn delete_post() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
|
||||
let fail_act = json!({
|
||||
"id": "https://plu.me/comment/1/delete",
|
||||
@@ -471,7 +465,7 @@ pub(crate) mod tests {
|
||||
"object": posts[0].ap_url,
|
||||
"type": "Delete",
|
||||
});
|
||||
assert!(super::inbox(&r, fail_act).is_err());
|
||||
assert!(super::inbox(&conn, fail_act).is_err());
|
||||
|
||||
let ok_act = json!({
|
||||
"id": "https://plu.me/comment/1/delete",
|
||||
@@ -479,17 +473,16 @@ pub(crate) mod tests {
|
||||
"object": posts[0].ap_url,
|
||||
"type": "Delete",
|
||||
});
|
||||
assert!(super::inbox(&r, ok_act).is_ok());
|
||||
assert!(super::inbox(&conn, ok_act).is_ok());
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn delete_user() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, _) = fill_database(&r);
|
||||
let (_, users, _) = fill_database(&conn);
|
||||
|
||||
let fail_act = json!({
|
||||
"id": "https://plu.me/@/Admin#delete",
|
||||
@@ -497,7 +490,7 @@ pub(crate) mod tests {
|
||||
"object": users[0].ap_url,
|
||||
"type": "Delete",
|
||||
});
|
||||
assert!(super::inbox(&r, fail_act).is_err());
|
||||
assert!(super::inbox(&conn, fail_act).is_err());
|
||||
|
||||
let ok_act = json!({
|
||||
"id": "https://plu.me/@/Admin#delete",
|
||||
@@ -505,8 +498,8 @@ pub(crate) mod tests {
|
||||
"object": users[0].ap_url,
|
||||
"type": "Delete",
|
||||
});
|
||||
assert!(super::inbox(&r, ok_act).is_ok());
|
||||
assert!(crate::users::User::get(conn, users[0].id).is_err());
|
||||
assert!(super::inbox(&conn, ok_act).is_ok());
|
||||
assert!(crate::users::User::get(&conn, users[0].id).is_err());
|
||||
|
||||
Ok(())
|
||||
});
|
||||
@@ -514,10 +507,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn follow() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, _) = fill_database(&r);
|
||||
let (_, users, _) = fill_database(&conn);
|
||||
|
||||
let act = json!({
|
||||
"id": "https://plu.me/follow/1",
|
||||
@@ -525,7 +517,7 @@ pub(crate) mod tests {
|
||||
"object": users[1].ap_url,
|
||||
"type": "Follow",
|
||||
});
|
||||
match super::inbox(&r, act).unwrap() {
|
||||
match super::inbox(&conn, act).unwrap() {
|
||||
InboxResult::Followed(f) => {
|
||||
assert_eq!(f.follower_id, users[0].id);
|
||||
assert_eq!(f.following_id, users[1].id);
|
||||
@@ -539,10 +531,9 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn like() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
|
||||
let act = json!({
|
||||
"id": "https://plu.me/like/1",
|
||||
@@ -550,7 +541,7 @@ pub(crate) mod tests {
|
||||
"object": posts[0].ap_url,
|
||||
"type": "Like",
|
||||
});
|
||||
match super::inbox(&r, act).unwrap() {
|
||||
match super::inbox(&conn, act).unwrap() {
|
||||
InboxResult::Liked(l) => {
|
||||
assert_eq!(l.user_id, users[1].id);
|
||||
assert_eq!(l.post_id, posts[0].id);
|
||||
@@ -566,13 +557,12 @@ pub(crate) mod tests {
|
||||
fn undo_reshare() {
|
||||
use crate::reshares::*;
|
||||
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
|
||||
let announce = Reshare::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewReshare {
|
||||
post_id: posts[0].id,
|
||||
user_id: users[1].id,
|
||||
@@ -587,7 +577,7 @@ pub(crate) mod tests {
|
||||
"object": announce.ap_url,
|
||||
"type": "Undo",
|
||||
});
|
||||
assert!(super::inbox(&r, fail_act).is_err());
|
||||
assert!(super::inbox(&conn, fail_act).is_err());
|
||||
|
||||
let ok_act = json!({
|
||||
"id": "https://plu.me/undo/1",
|
||||
@@ -595,7 +585,7 @@ pub(crate) mod tests {
|
||||
"object": announce.ap_url,
|
||||
"type": "Undo",
|
||||
});
|
||||
assert!(super::inbox(&r, ok_act).is_ok());
|
||||
assert!(super::inbox(&conn, ok_act).is_ok());
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
@@ -604,13 +594,12 @@ pub(crate) mod tests {
|
||||
fn undo_follow() {
|
||||
use crate::follows::*;
|
||||
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, _) = fill_database(&r);
|
||||
let (_, users, _) = fill_database(&conn);
|
||||
|
||||
let follow = Follow::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewFollow {
|
||||
follower_id: users[0].id,
|
||||
following_id: users[1].id,
|
||||
@@ -625,7 +614,7 @@ pub(crate) mod tests {
|
||||
"object": follow.ap_url,
|
||||
"type": "Undo",
|
||||
});
|
||||
assert!(super::inbox(&r, fail_act).is_err());
|
||||
assert!(super::inbox(&conn, fail_act).is_err());
|
||||
|
||||
let ok_act = json!({
|
||||
"id": "https://plu.me/undo/1",
|
||||
@@ -633,7 +622,7 @@ pub(crate) mod tests {
|
||||
"object": follow.ap_url,
|
||||
"type": "Undo",
|
||||
});
|
||||
assert!(super::inbox(&r, ok_act).is_ok());
|
||||
assert!(super::inbox(&conn, ok_act).is_ok());
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
@@ -642,13 +631,12 @@ pub(crate) mod tests {
|
||||
fn undo_like() {
|
||||
use crate::likes::*;
|
||||
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
|
||||
let like = Like::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewLike {
|
||||
post_id: posts[0].id,
|
||||
user_id: users[1].id,
|
||||
@@ -663,7 +651,7 @@ pub(crate) mod tests {
|
||||
"object": like.ap_url,
|
||||
"type": "Undo",
|
||||
});
|
||||
assert!(super::inbox(&r, fail_act).is_err());
|
||||
assert!(super::inbox(&conn, fail_act).is_err());
|
||||
|
||||
let ok_act = json!({
|
||||
"id": "https://plu.me/undo/1",
|
||||
@@ -671,17 +659,16 @@ pub(crate) mod tests {
|
||||
"object": like.ap_url,
|
||||
"type": "Undo",
|
||||
});
|
||||
assert!(super::inbox(&r, ok_act).is_ok());
|
||||
assert!(super::inbox(&conn, ok_act).is_ok());
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn update_post() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (posts, users, _) = fill_database(&r);
|
||||
let (posts, users, _) = fill_database(&conn);
|
||||
|
||||
let act = json!({
|
||||
"id": "https://plu.me/update/1",
|
||||
@@ -700,7 +687,7 @@ pub(crate) mod tests {
|
||||
"type": "Update",
|
||||
});
|
||||
|
||||
super::inbox(&r, act).unwrap();
|
||||
super::inbox(&conn, act).unwrap();
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,10 +6,26 @@ use crate::{
|
||||
users::{Role, User},
|
||||
Connection, Error, Result,
|
||||
};
|
||||
use activitypub::{actor::Service, CustomObject};
|
||||
use chrono::NaiveDateTime;
|
||||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl};
|
||||
use plume_common::utils::md_to_html;
|
||||
use openssl::{
|
||||
hash::MessageDigest,
|
||||
pkey::{PKey, Private},
|
||||
rsa::Rsa,
|
||||
sign,
|
||||
};
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
sign::{gen_keypair, Error as SignatureError, Result as SignatureResult, Signer},
|
||||
ApSignature, PublicKey,
|
||||
},
|
||||
utils::md_to_html,
|
||||
};
|
||||
use std::sync::RwLock;
|
||||
use tracing::warn;
|
||||
|
||||
pub type CustomService = CustomObject<ApSignature, Service>;
|
||||
|
||||
#[derive(Clone, Identifiable, Queryable)]
|
||||
pub struct Instance {
|
||||
@@ -25,6 +41,8 @@ pub struct Instance {
|
||||
pub default_license: String,
|
||||
pub long_description_html: SafeString,
|
||||
pub short_description_html: SafeString,
|
||||
pub private_key: Option<String>,
|
||||
pub public_key: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Insertable)]
|
||||
@@ -39,6 +57,8 @@ pub struct NewInstance {
|
||||
pub default_license: String,
|
||||
pub long_description_html: String,
|
||||
pub short_description_html: String,
|
||||
pub private_key: Option<String>,
|
||||
pub public_key: Option<String>,
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
@@ -69,6 +89,13 @@ impl Instance {
|
||||
*LOCAL_INSTANCE.write().unwrap() = Instance::get_local_uncached(conn).ok();
|
||||
}
|
||||
|
||||
pub fn get_locals(conn: &Connection) -> Result<Vec<Instance>> {
|
||||
instances::table
|
||||
.filter(instances::local.eq(true))
|
||||
.load::<Instance>(conn)
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn get_remotes(conn: &Connection) -> Result<Vec<Instance>> {
|
||||
instances::table
|
||||
.filter(instances::local.eq(false))
|
||||
@@ -238,6 +265,112 @@ impl Instance {
|
||||
})
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn set_keypair(&self, conn: &Connection) -> Result<()> {
|
||||
let (pub_key, priv_key) = gen_keypair();
|
||||
let private_key = String::from_utf8(priv_key).or(Err(Error::Signature))?;
|
||||
let public_key = String::from_utf8(pub_key).or(Err(Error::Signature))?;
|
||||
diesel::update(self)
|
||||
.set((
|
||||
instances::private_key.eq(Some(private_key)),
|
||||
instances::public_key.eq(Some(public_key)),
|
||||
))
|
||||
.execute(conn)
|
||||
.and(Ok(()))
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn get_keypair(&self) -> Result<PKey<Private>> {
|
||||
PKey::from_rsa(Rsa::private_key_from_pem(
|
||||
self.private_key.clone()?.as_ref(),
|
||||
)?)
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
/// This is experimental and might change in the future.
|
||||
/// Currently "!" sign is used but it's not decided.
|
||||
pub fn ap_url(&self) -> String {
|
||||
ap_url(&format!(
|
||||
"{}/!/{}",
|
||||
Self::get_local().unwrap().public_domain,
|
||||
self.public_domain
|
||||
))
|
||||
}
|
||||
|
||||
pub fn to_activity(&self) -> Result<CustomService> {
|
||||
let mut actor = Service::default();
|
||||
let id = self.ap_url();
|
||||
actor.object_props.set_id_string(id.clone())?;
|
||||
actor.object_props.set_name_string(self.name.clone())?;
|
||||
|
||||
let mut ap_signature = ApSignature::default();
|
||||
if self.local {
|
||||
if let Some(pub_key) = self.public_key.clone() {
|
||||
let mut public_key = PublicKey::default();
|
||||
public_key.set_id_string(format!("{}#main-key", id))?;
|
||||
public_key.set_owner_string(id)?;
|
||||
public_key.set_public_key_pem_string(pub_key)?;
|
||||
ap_signature.set_public_key_publickey(public_key)?;
|
||||
}
|
||||
};
|
||||
|
||||
Ok(CustomService::new(actor, ap_signature))
|
||||
}
|
||||
}
|
||||
|
||||
impl NewInstance {
|
||||
pub fn new_local(
|
||||
conn: &Connection,
|
||||
public_domain: String,
|
||||
name: String,
|
||||
open_registrations: bool,
|
||||
default_license: String,
|
||||
) -> Result<Instance> {
|
||||
let (pub_key, priv_key) = gen_keypair();
|
||||
|
||||
Instance::insert(
|
||||
conn,
|
||||
NewInstance {
|
||||
public_domain,
|
||||
name,
|
||||
local: true,
|
||||
open_registrations,
|
||||
short_description: SafeString::new(""),
|
||||
long_description: SafeString::new(""),
|
||||
default_license,
|
||||
long_description_html: String::new(),
|
||||
short_description_html: String::new(),
|
||||
private_key: Some(String::from_utf8(priv_key).or(Err(Error::Signature))?),
|
||||
public_key: Some(String::from_utf8(pub_key).or(Err(Error::Signature))?),
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl Signer for Instance {
|
||||
fn get_key_id(&self) -> String {
|
||||
format!("{}#main-key", self.ap_url())
|
||||
}
|
||||
|
||||
fn sign(&self, to_sign: &str) -> SignatureResult<Vec<u8>> {
|
||||
let key = self.get_keypair()?;
|
||||
let mut signer = sign::Signer::new(MessageDigest::sha256(), &key)?;
|
||||
signer.update(to_sign.as_bytes())?;
|
||||
signer.sign_to_vec().map_err(SignatureError::from)
|
||||
}
|
||||
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> SignatureResult<bool> {
|
||||
if self.public_key.is_none() {
|
||||
warn!("missing public key for {}", self.public_domain);
|
||||
return Err(SignatureError());
|
||||
}
|
||||
let key = PKey::from_rsa(Rsa::public_key_from_pem(
|
||||
self.public_key.clone().unwrap().as_ref(),
|
||||
)?)?;
|
||||
let mut verifier = sign::Verifier::new(MessageDigest::sha256(), &key)?;
|
||||
verifier.update(data.as_bytes())?;
|
||||
verifier.verify(&signature).map_err(SignatureError::from)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -247,6 +380,7 @@ pub(crate) mod tests {
|
||||
use diesel::Connection;
|
||||
|
||||
pub(crate) fn fill_database(conn: &Conn) -> Vec<(NewInstance, Instance)> {
|
||||
diesel::delete(instances::table).execute(conn).unwrap();
|
||||
let res = vec![
|
||||
NewInstance {
|
||||
default_license: "WTFPL".to_string(),
|
||||
@@ -258,6 +392,8 @@ pub(crate) mod tests {
|
||||
name: "My instance".to_string(),
|
||||
open_registrations: true,
|
||||
public_domain: "plu.me".to_string(),
|
||||
private_key: None,
|
||||
public_key: None,
|
||||
},
|
||||
NewInstance {
|
||||
default_license: "WTFPL".to_string(),
|
||||
@@ -269,6 +405,8 @@ pub(crate) mod tests {
|
||||
name: "An instance".to_string(),
|
||||
open_registrations: true,
|
||||
public_domain: "1plu.me".to_string(),
|
||||
private_key: None,
|
||||
public_key: None,
|
||||
},
|
||||
NewInstance {
|
||||
default_license: "CC-0".to_string(),
|
||||
@@ -280,6 +418,8 @@ pub(crate) mod tests {
|
||||
name: "Someone instance".to_string(),
|
||||
open_registrations: false,
|
||||
public_domain: "2plu.me".to_string(),
|
||||
private_key: None,
|
||||
public_key: None,
|
||||
},
|
||||
NewInstance {
|
||||
default_license: "CC-0-BY-SA".to_string(),
|
||||
@@ -291,6 +431,8 @@ pub(crate) mod tests {
|
||||
name: "Nice day".to_string(),
|
||||
open_registrations: true,
|
||||
public_domain: "3plu.me".to_string(),
|
||||
private_key: None,
|
||||
public_key: None,
|
||||
},
|
||||
]
|
||||
.into_iter()
|
||||
@@ -488,12 +630,14 @@ pub(crate) mod tests {
|
||||
);
|
||||
assert_eq!(
|
||||
inst.long_description_html,
|
||||
SafeString::new("<p><a href=\"/with_link\">long_description</a></p>\n")
|
||||
SafeString::new(
|
||||
"<p dir=\"auto\"><a href=\"/with_link\">long_description</a></p>\n"
|
||||
)
|
||||
);
|
||||
assert_eq!(inst.short_description.get(), "[short](#link)");
|
||||
assert_eq!(
|
||||
inst.short_description_html,
|
||||
SafeString::new("<p><a href=\"#link\">short</a></p>\n")
|
||||
SafeString::new("<p dir=\"auto\"><a href=\"#link\">short</a></p>\n")
|
||||
);
|
||||
assert_eq!(inst.default_license, "CC-BY-SAO".to_owned());
|
||||
Ok(())
|
||||
|
||||
Regular → Executable
+45
-14
@@ -11,14 +11,19 @@ extern crate lazy_static;
|
||||
extern crate plume_macro;
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
#[macro_use]
|
||||
extern crate tantivy;
|
||||
|
||||
use plume_common::activity_pub::inbox::InboxError;
|
||||
use db_conn::DbPool;
|
||||
use instance::Instance;
|
||||
use once_cell::sync::Lazy;
|
||||
use plume_common::activity_pub::{inbox::InboxError, sign};
|
||||
use posts::PostEvent;
|
||||
use riker::actors::{channel, ActorSystem, ChannelRef, SystemBuilder};
|
||||
use users::UserEvent;
|
||||
|
||||
#[cfg(not(any(feature = "sqlite", feature = "postgres")))]
|
||||
compile_error!("Either feature \"sqlite\" or \"postgres\" must be enabled for this crate.");
|
||||
@@ -31,6 +36,19 @@ pub type Connection = diesel::SqliteConnection;
|
||||
#[cfg(all(not(feature = "sqlite"), feature = "postgres"))]
|
||||
pub type Connection = diesel::PgConnection;
|
||||
|
||||
pub(crate) static ACTOR_SYS: Lazy<ActorSystem> = Lazy::new(|| {
|
||||
SystemBuilder::new()
|
||||
.name("plume")
|
||||
.create()
|
||||
.expect("Failed to create actor system")
|
||||
});
|
||||
|
||||
pub(crate) static USER_CHAN: Lazy<ChannelRef<UserEvent>> =
|
||||
Lazy::new(|| channel("user_events", &*ACTOR_SYS).expect("Failed to create user channel"));
|
||||
|
||||
pub(crate) static POST_CHAN: Lazy<ChannelRef<PostEvent>> =
|
||||
Lazy::new(|| channel("post_events", &*ACTOR_SYS).expect("Failed to create post channel"));
|
||||
|
||||
/// All the possible errors that can be encoutered in this crate
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
@@ -64,6 +82,12 @@ impl From<openssl::error::ErrorStack> for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<sign::Error> for Error {
|
||||
fn from(_: sign::Error) -> Self {
|
||||
Error::Signature
|
||||
}
|
||||
}
|
||||
|
||||
impl From<diesel::result::Error> for Error {
|
||||
fn from(err: diesel::result::Error) -> Self {
|
||||
Error::Db(err)
|
||||
@@ -144,6 +168,12 @@ impl From<InboxError<Error>> for Error {
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
impl From<Error> for sign::Error {
|
||||
fn from(_: Error) -> Self {
|
||||
Self()
|
||||
}
|
||||
}
|
||||
|
||||
/// Adds a function to a model, that returns the first
|
||||
/// matching row for a given list of fields.
|
||||
///
|
||||
@@ -279,15 +309,24 @@ pub fn ap_url(url: &str) -> String {
|
||||
format!("https://{}", url)
|
||||
}
|
||||
|
||||
pub fn migrate_data(dbpool: &DbPool) -> Result<()> {
|
||||
ensure_local_instance_keys(&dbpool.get().unwrap())
|
||||
}
|
||||
|
||||
fn ensure_local_instance_keys(conn: &Connection) -> Result<()> {
|
||||
for instance in Instance::get_locals(conn)? {
|
||||
instance.set_keypair(conn)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
mod tests {
|
||||
use crate::{db_conn, migrations::IMPORTED_MIGRATIONS, search, Connection as Conn, CONFIG};
|
||||
use crate::{db_conn, migrations::IMPORTED_MIGRATIONS, Connection as Conn, CONFIG};
|
||||
use diesel::r2d2::ConnectionManager;
|
||||
use plume_common::utils::random_hex;
|
||||
use scheduled_thread_pool::ScheduledThreadPool;
|
||||
use std::env::temp_dir;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! part_eq {
|
||||
@@ -317,15 +356,6 @@ mod tests {
|
||||
pool
|
||||
};
|
||||
}
|
||||
|
||||
pub fn rockets() -> super::PlumeRocket {
|
||||
super::PlumeRocket {
|
||||
conn: db_conn::DbConn((*DB_POOL).get().unwrap()),
|
||||
searcher: Arc::new(search::tests::get_searcher(&CONFIG.search_tokenizers)),
|
||||
worker: Arc::new(ScheduledThreadPool::new(2)),
|
||||
user: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod admin;
|
||||
@@ -351,6 +381,7 @@ pub mod password_reset_requests;
|
||||
pub mod plume_rocket;
|
||||
pub mod post_authors;
|
||||
pub mod posts;
|
||||
pub mod remote_fetch_actor;
|
||||
pub mod reshares;
|
||||
pub mod safe_string;
|
||||
#[allow(unused_imports)]
|
||||
|
||||
+36
-25
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
notifications::*, posts::Post, schema::likes, timeline::*, users::User, Connection, Error,
|
||||
PlumeRocket, Result,
|
||||
db_conn::DbConn, instance::Instance, notifications::*, posts::Post, schema::likes, timeline::*,
|
||||
users::User, Connection, Error, Result, CONFIG,
|
||||
};
|
||||
use activitypub::activity;
|
||||
use chrono::NaiveDateTime;
|
||||
@@ -83,64 +83,75 @@ impl Like {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, activity::Like, &PlumeRocket> for Post {
|
||||
impl AsObject<User, activity::Like, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = Like;
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, id: &str) -> Result<Like> {
|
||||
fn activity(self, conn: &DbConn, actor: User, id: &str) -> Result<Like> {
|
||||
let res = Like::insert(
|
||||
&c.conn,
|
||||
conn,
|
||||
NewLike {
|
||||
post_id: self.id,
|
||||
user_id: actor.id,
|
||||
ap_url: id.to_string(),
|
||||
},
|
||||
)?;
|
||||
res.notify(&c.conn)?;
|
||||
res.notify(conn)?;
|
||||
|
||||
Timeline::add_to_all_timelines(c, &self, Kind::Like(&actor))?;
|
||||
Timeline::add_to_all_timelines(conn, &self, Kind::Like(&actor))?;
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromId<PlumeRocket> for Like {
|
||||
impl FromId<DbConn> for Like {
|
||||
type Error = Error;
|
||||
type Object = activity::Like;
|
||||
|
||||
fn from_db(c: &PlumeRocket, id: &str) -> Result<Self> {
|
||||
Like::find_by_ap_url(&c.conn, id)
|
||||
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
|
||||
Like::find_by_ap_url(conn, id)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, act: activity::Like) -> Result<Self> {
|
||||
fn from_activity(conn: &DbConn, act: activity::Like) -> Result<Self> {
|
||||
let res = Like::insert(
|
||||
&c.conn,
|
||||
conn,
|
||||
NewLike {
|
||||
post_id: Post::from_id(c, &act.like_props.object_link::<Id>()?, None)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
user_id: User::from_id(c, &act.like_props.actor_link::<Id>()?, None)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
post_id: Post::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&act.like_props.object_link::<Id>()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
user_id: User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&act.like_props.actor_link::<Id>()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
ap_url: act.object_props.id_string()?,
|
||||
},
|
||||
)?;
|
||||
res.notify(&c.conn)?;
|
||||
res.notify(conn)?;
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, activity::Undo, &PlumeRocket> for Like {
|
||||
impl AsObject<User, activity::Undo, &DbConn> for Like {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, _id: &str) -> Result<()> {
|
||||
let conn = &*c.conn;
|
||||
fn activity(self, conn: &DbConn, actor: User, _id: &str) -> Result<()> {
|
||||
if actor.id == self.user_id {
|
||||
diesel::delete(&self).execute(conn)?;
|
||||
diesel::delete(&self).execute(&**conn)?;
|
||||
|
||||
// delete associated notification if any
|
||||
if let Ok(notif) = Notification::find(conn, notification_kind::LIKE, self.id) {
|
||||
diesel::delete(¬if).execute(conn)?;
|
||||
if let Ok(notif) = Notification::find(&conn, notification_kind::LIKE, self.id) {
|
||||
diesel::delete(¬if).execute(&**conn)?;
|
||||
}
|
||||
Ok(())
|
||||
} else {
|
||||
|
||||
+11
-10
@@ -30,9 +30,9 @@ impl TryFrom<i32> for ListType {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<i32> for ListType {
|
||||
fn into(self) -> i32 {
|
||||
match self {
|
||||
impl From<ListType> for i32 {
|
||||
fn from(list_type: ListType) -> Self {
|
||||
match list_type {
|
||||
ListType::User => 0,
|
||||
ListType::Blog => 1,
|
||||
ListType::Word => 2,
|
||||
@@ -246,22 +246,22 @@ impl List {
|
||||
private::ListElem::prefix_in_list(conn, self, word)
|
||||
}
|
||||
|
||||
/// Insert new users in a list
|
||||
// Insert new users in a list
|
||||
func! {add: add_users, User}
|
||||
|
||||
/// Insert new blogs in a list
|
||||
// Insert new blogs in a list
|
||||
func! {add: add_blogs, Blog}
|
||||
|
||||
/// Insert new words in a list
|
||||
// Insert new words in a list
|
||||
func! {add: add_words, Word}
|
||||
|
||||
/// Insert new prefixes in a list
|
||||
// Insert new prefixes in a list
|
||||
func! {add: add_prefixes, Prefix}
|
||||
|
||||
/// Get all users in the list
|
||||
// Get all users in the list
|
||||
func! {list: list_users, User, users}
|
||||
|
||||
/// Get all blogs in the list
|
||||
// Get all blogs in the list
|
||||
func! {list: list_blogs, Blog, blogs}
|
||||
|
||||
/// Get all words in the list
|
||||
@@ -285,7 +285,8 @@ impl List {
|
||||
.select(list_elems::word)
|
||||
.load::<Option<String>>(conn)
|
||||
.map_err(Error::from)
|
||||
.map(|r| r.into_iter().filter_map(|o| o).collect::<Vec<String>>())
|
||||
// .map(|r| r.into_iter().filter_map(|o| o).collect::<Vec<String>>())
|
||||
.map(|r| r.into_iter().flatten().collect::<Vec<String>>())
|
||||
}
|
||||
|
||||
pub fn clear(&self, conn: &Connection) -> Result<()> {
|
||||
|
||||
+122
-48
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
ap_url, instance::Instance, safe_string::SafeString, schema::medias, users::User, Connection,
|
||||
Error, PlumeRocket, Result,
|
||||
ap_url, db_conn::DbConn, instance::Instance, safe_string::SafeString, schema::medias,
|
||||
users::User, Connection, Error, Result, CONFIG,
|
||||
};
|
||||
use activitypub::object::Image;
|
||||
use askama_escape::escape;
|
||||
@@ -10,10 +10,16 @@ use plume_common::{
|
||||
activity_pub::{inbox::FromId, Id},
|
||||
utils::MediaProcessor,
|
||||
};
|
||||
use reqwest;
|
||||
use std::{fs, path::Path};
|
||||
use std::{
|
||||
fs::{self, DirBuilder},
|
||||
path::{self, Path, PathBuf},
|
||||
};
|
||||
use tracing::warn;
|
||||
use url::Url;
|
||||
|
||||
#[derive(Clone, Identifiable, Queryable)]
|
||||
const REMOTE_MEDIA_DIRECTORY: &str = "remote";
|
||||
|
||||
#[derive(Clone, Identifiable, Queryable, AsChangeset)]
|
||||
pub struct Media {
|
||||
pub id: i32,
|
||||
pub file_path: String,
|
||||
@@ -59,6 +65,7 @@ impl MediaCategory {
|
||||
impl Media {
|
||||
insert!(medias, NewMedia);
|
||||
get!(medias);
|
||||
find_by!(medias, find_by_file_path, file_path as &str);
|
||||
|
||||
pub fn for_user(conn: &Connection, owner: i32) -> Result<Vec<Media>> {
|
||||
medias::table
|
||||
@@ -149,12 +156,15 @@ impl Media {
|
||||
if self.is_remote {
|
||||
Ok(self.remote_url.clone().unwrap_or_default())
|
||||
} else {
|
||||
let p = Path::new(&self.file_path);
|
||||
let filename: String = p.file_name().unwrap().to_str().unwrap().to_owned();
|
||||
let file_path = self.file_path.replace(path::MAIN_SEPARATOR, "/").replacen(
|
||||
&CONFIG.media_directory,
|
||||
"static/media",
|
||||
1,
|
||||
); // "static/media" from plume::routs::plume_media_files()
|
||||
Ok(ap_url(&format!(
|
||||
"{}/static/media/{}",
|
||||
"{}/{}",
|
||||
Instance::get_local()?.public_domain,
|
||||
&filename
|
||||
&file_path
|
||||
)))
|
||||
}
|
||||
}
|
||||
@@ -197,50 +207,87 @@ impl Media {
|
||||
}
|
||||
|
||||
// TODO: merge with save_remote?
|
||||
pub fn from_activity(c: &PlumeRocket, image: &Image) -> Result<Media> {
|
||||
let conn = &*c.conn;
|
||||
pub fn from_activity(conn: &DbConn, image: &Image) -> Result<Media> {
|
||||
let remote_url = image.object_props.url_string().ok()?;
|
||||
let ext = remote_url
|
||||
.rsplit('.')
|
||||
.next()
|
||||
.map(ToOwned::to_owned)
|
||||
.unwrap_or_else(|| String::from("png"));
|
||||
let path = Path::new(&super::CONFIG.media_directory).join(format!(
|
||||
"{}.{}",
|
||||
GUID::rand().to_string(),
|
||||
ext
|
||||
));
|
||||
let path = determine_mirror_file_path(&remote_url);
|
||||
let parent = path.parent()?;
|
||||
if !parent.is_dir() {
|
||||
DirBuilder::new().recursive(true).create(parent)?;
|
||||
}
|
||||
|
||||
let mut dest = fs::File::create(path.clone()).ok()?;
|
||||
reqwest::get(remote_url.as_str())
|
||||
.ok()?
|
||||
.copy_to(&mut dest)
|
||||
.ok()?;
|
||||
// TODO: conditional GET
|
||||
if let Some(proxy) = CONFIG.proxy() {
|
||||
reqwest::ClientBuilder::new().proxy(proxy.clone()).build()?
|
||||
} else {
|
||||
reqwest::Client::new()
|
||||
}
|
||||
.get(remote_url.as_str())
|
||||
.send()
|
||||
.ok()?
|
||||
.copy_to(&mut dest)
|
||||
.ok()?;
|
||||
|
||||
Media::insert(
|
||||
conn,
|
||||
NewMedia {
|
||||
file_path: path.to_str()?.to_string(),
|
||||
alt_text: image.object_props.content_string().ok()?,
|
||||
is_remote: false,
|
||||
remote_url: None,
|
||||
sensitive: image.object_props.summary_string().is_ok(),
|
||||
content_warning: image.object_props.summary_string().ok(),
|
||||
owner_id: User::from_id(
|
||||
c,
|
||||
image
|
||||
.object_props
|
||||
.attributed_to_link_vec::<Id>()
|
||||
.ok()?
|
||||
.into_iter()
|
||||
.next()?
|
||||
.as_ref(),
|
||||
None,
|
||||
Media::find_by_file_path(conn, &path.to_str()?)
|
||||
.and_then(|mut media| {
|
||||
let mut updated = false;
|
||||
|
||||
let alt_text = image.object_props.content_string().ok()?;
|
||||
let sensitive = image.object_props.summary_string().is_ok();
|
||||
let content_warning = image.object_props.summary_string().ok();
|
||||
if media.alt_text != alt_text {
|
||||
media.alt_text = alt_text;
|
||||
updated = true;
|
||||
}
|
||||
if media.is_remote {
|
||||
media.is_remote = false;
|
||||
updated = true;
|
||||
}
|
||||
if media.remote_url.is_some() {
|
||||
media.remote_url = None;
|
||||
updated = true;
|
||||
}
|
||||
if media.sensitive != sensitive {
|
||||
media.sensitive = sensitive;
|
||||
updated = true;
|
||||
}
|
||||
if media.content_warning != content_warning {
|
||||
media.content_warning = content_warning;
|
||||
updated = true;
|
||||
}
|
||||
if updated {
|
||||
diesel::update(&media).set(&media).execute(&**conn)?;
|
||||
}
|
||||
Ok(media)
|
||||
})
|
||||
.or_else(|_| {
|
||||
Media::insert(
|
||||
conn,
|
||||
NewMedia {
|
||||
file_path: path.to_str()?.to_string(),
|
||||
alt_text: image.object_props.content_string().ok()?,
|
||||
is_remote: false,
|
||||
remote_url: None,
|
||||
sensitive: image.object_props.summary_string().is_ok(),
|
||||
content_warning: image.object_props.summary_string().ok(),
|
||||
owner_id: User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
image
|
||||
.object_props
|
||||
.attributed_to_link_vec::<Id>()
|
||||
.ok()?
|
||||
.into_iter()
|
||||
.next()?
|
||||
.as_ref(),
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
},
|
||||
)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
},
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn get_media_processor<'a>(conn: &'a Connection, user: Vec<&User>) -> MediaProcessor<'a> {
|
||||
@@ -257,6 +304,33 @@ impl Media {
|
||||
}
|
||||
}
|
||||
|
||||
fn determine_mirror_file_path(url: &str) -> PathBuf {
|
||||
let mut file_path = Path::new(&super::CONFIG.media_directory).join(REMOTE_MEDIA_DIRECTORY);
|
||||
Url::parse(url)
|
||||
.map(|url| {
|
||||
if !url.has_host() {
|
||||
return;
|
||||
}
|
||||
file_path.push(url.host_str().unwrap());
|
||||
for segment in url.path_segments().expect("FIXME") {
|
||||
file_path.push(segment);
|
||||
}
|
||||
// TODO: handle query
|
||||
// HINT: Use characters which must be percent-encoded in path as separator between path and query
|
||||
// HINT: handle extension
|
||||
})
|
||||
.unwrap_or_else(|err| {
|
||||
warn!("Failed to parse url: {} {}", &url, err);
|
||||
let ext = url
|
||||
.rsplit('.')
|
||||
.next()
|
||||
.map(ToOwned::to_owned)
|
||||
.unwrap_or_else(|| String::from("png"));
|
||||
file_path.push(format!("{}.{}", GUID::rand().to_string(), ext));
|
||||
});
|
||||
file_path
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
comments::Comment, notifications::*, posts::Post, schema::mentions, users::User, Connection,
|
||||
Error, PlumeRocket, Result,
|
||||
comments::Comment, db_conn::DbConn, notifications::*, posts::Post, schema::mentions,
|
||||
users::User, Connection, Error, Result,
|
||||
};
|
||||
use activitypub::link;
|
||||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl};
|
||||
@@ -52,8 +52,8 @@ impl Mention {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn build_activity(c: &PlumeRocket, ment: &str) -> Result<link::Mention> {
|
||||
let user = User::find_by_fqn(c, ment)?;
|
||||
pub fn build_activity(conn: &DbConn, ment: &str) -> Result<link::Mention> {
|
||||
let user = User::find_by_fqn(conn, ment)?;
|
||||
let mut mention = link::Mention::default();
|
||||
mention.link_props.set_href_string(user.ap_url)?;
|
||||
mention.link_props.set_name_string(format!("@{}", ment))?;
|
||||
|
||||
@@ -2,6 +2,7 @@ use crate::{Connection, Error, Result};
|
||||
use diesel::connection::{Connection as Conn, SimpleConnection};
|
||||
use migrations_internals::{setup_database, MigrationConnection};
|
||||
use std::path::Path;
|
||||
use tracing::info;
|
||||
|
||||
#[allow(dead_code)] //variants might not be constructed if not required by current migrations
|
||||
enum Action {
|
||||
@@ -26,7 +27,7 @@ struct ComplexMigration {
|
||||
|
||||
impl ComplexMigration {
|
||||
fn run(&self, conn: &Connection, path: &Path) -> Result<()> {
|
||||
println!("Running migration {}", self.name);
|
||||
info!("Running migration {}", self.name);
|
||||
for step in self.up {
|
||||
step.run(conn, path)?
|
||||
}
|
||||
@@ -34,7 +35,7 @@ impl ComplexMigration {
|
||||
}
|
||||
|
||||
fn revert(&self, conn: &Connection, path: &Path) -> Result<()> {
|
||||
println!("Reverting migration {}", self.name);
|
||||
info!("Reverting migration {}", self.name);
|
||||
for step in self.down {
|
||||
step.run(conn, path)?
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ pub use self::module::PlumeRocket;
|
||||
|
||||
#[cfg(not(test))]
|
||||
mod module {
|
||||
use crate::{db_conn::DbConn, search, users};
|
||||
use crate::{search, users};
|
||||
use rocket::{
|
||||
request::{self, FlashMessage, FromRequest, Request},
|
||||
Outcome, State,
|
||||
@@ -12,7 +12,6 @@ mod module {
|
||||
|
||||
/// Common context needed by most routes and operations on models
|
||||
pub struct PlumeRocket {
|
||||
pub conn: DbConn,
|
||||
pub intl: rocket_i18n::I18n,
|
||||
pub user: Option<users::User>,
|
||||
pub searcher: Arc<search::Searcher>,
|
||||
@@ -24,14 +23,12 @@ mod module {
|
||||
type Error = ();
|
||||
|
||||
fn from_request(request: &'a Request<'r>) -> request::Outcome<PlumeRocket, ()> {
|
||||
let conn = request.guard::<DbConn>()?;
|
||||
let intl = request.guard::<rocket_i18n::I18n>()?;
|
||||
let user = request.guard::<users::User>().succeeded();
|
||||
let worker = request.guard::<'_, State<'_, Arc<ScheduledThreadPool>>>()?;
|
||||
let searcher = request.guard::<'_, State<'_, Arc<search::Searcher>>>()?;
|
||||
let flash_msg = request.guard::<FlashMessage<'_, '_>>().succeeded();
|
||||
Outcome::Success(PlumeRocket {
|
||||
conn,
|
||||
intl,
|
||||
user,
|
||||
flash_msg: flash_msg.map(|f| (f.name().into(), f.msg().into())),
|
||||
@@ -44,7 +41,7 @@ mod module {
|
||||
|
||||
#[cfg(test)]
|
||||
mod module {
|
||||
use crate::{db_conn::DbConn, search, users};
|
||||
use crate::{search, users};
|
||||
use rocket::{
|
||||
request::{self, FromRequest, Request},
|
||||
Outcome, State,
|
||||
@@ -54,7 +51,6 @@ mod module {
|
||||
|
||||
/// Common context needed by most routes and operations on models
|
||||
pub struct PlumeRocket {
|
||||
pub conn: DbConn,
|
||||
pub user: Option<users::User>,
|
||||
pub searcher: Arc<search::Searcher>,
|
||||
pub worker: Arc<ScheduledThreadPool>,
|
||||
@@ -64,12 +60,10 @@ mod module {
|
||||
type Error = ();
|
||||
|
||||
fn from_request(request: &'a Request<'r>) -> request::Outcome<PlumeRocket, ()> {
|
||||
let conn = request.guard::<DbConn>()?;
|
||||
let user = request.guard::<users::User>().succeeded();
|
||||
let worker = request.guard::<'_, State<'_, Arc<ScheduledThreadPool>>>()?;
|
||||
let searcher = request.guard::<'_, State<'_, Arc<search::Searcher>>>()?;
|
||||
Outcome::Success(PlumeRocket {
|
||||
conn,
|
||||
user,
|
||||
worker: worker.clone(),
|
||||
searcher: searcher.clone(),
|
||||
|
||||
+254
-106
@@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
ap_url, blogs::Blog, instance::Instance, medias::Media, mentions::Mention, post_authors::*,
|
||||
safe_string::SafeString, schema::posts, search::Searcher, tags::*, timeline::*, users::User,
|
||||
Connection, Error, PlumeRocket, Result, CONFIG,
|
||||
ap_url, blogs::Blog, db_conn::DbConn, instance::Instance, medias::Media, mentions::Mention,
|
||||
post_authors::*, safe_string::SafeString, schema::posts, tags::*, timeline::*, users::User,
|
||||
Connection, Error, PostEvent::*, Result, CONFIG, POST_CHAN,
|
||||
};
|
||||
use activitypub::{
|
||||
activity::{Create, Delete, Update},
|
||||
@@ -11,20 +11,23 @@ use activitypub::{
|
||||
};
|
||||
use chrono::{NaiveDateTime, TimeZone, Utc};
|
||||
use diesel::{self, BelongingToDsl, ExpressionMethods, QueryDsl, RunQueryDsl, SaveChangesDsl};
|
||||
use heck::KebabCase;
|
||||
use once_cell::sync::Lazy;
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
inbox::{AsObject, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
Hashtag, Id, IntoId, Licensed, Source, PUBLIC_VISIBILITY,
|
||||
},
|
||||
utils::md_to_html,
|
||||
utils::{iri_percent_encode_seg, md_to_html},
|
||||
};
|
||||
use serde_json;
|
||||
use std::collections::HashSet;
|
||||
use riker::actors::{Publish, Tell};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
pub type LicensedArticle = CustomObject<Licensed, Article>;
|
||||
|
||||
#[derive(Queryable, Identifiable, Clone, AsChangeset)]
|
||||
static BLOG_FQN_CACHE: Lazy<Mutex<HashMap<i32, String>>> = Lazy::new(|| Mutex::new(HashMap::new()));
|
||||
|
||||
#[derive(Queryable, Identifiable, Clone, AsChangeset, Debug)]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
pub struct Post {
|
||||
pub id: i32,
|
||||
@@ -63,38 +66,42 @@ impl Post {
|
||||
find_by!(posts, find_by_ap_url, ap_url as &str);
|
||||
|
||||
last!(posts);
|
||||
pub fn insert(conn: &Connection, new: NewPost, searcher: &Searcher) -> Result<Self> {
|
||||
pub fn insert(conn: &Connection, new: NewPost) -> Result<Self> {
|
||||
diesel::insert_into(posts::table)
|
||||
.values(new)
|
||||
.execute(conn)?;
|
||||
let mut post = Self::last(conn)?;
|
||||
if post.ap_url.is_empty() {
|
||||
post.ap_url = ap_url(&format!(
|
||||
"{}/~/{}/{}/",
|
||||
CONFIG.base_url,
|
||||
post.get_blog(conn)?.fqn,
|
||||
post.slug
|
||||
));
|
||||
post.ap_url = Self::ap_url(post.get_blog(conn)?, &post.slug);
|
||||
let _: Post = post.save_changes(conn)?;
|
||||
}
|
||||
|
||||
searcher.add_document(conn, &post)?;
|
||||
if post.published {
|
||||
post.publish_published();
|
||||
}
|
||||
|
||||
Ok(post)
|
||||
}
|
||||
|
||||
pub fn update(&self, conn: &Connection, searcher: &Searcher) -> Result<Self> {
|
||||
pub fn update(&self, conn: &Connection) -> Result<Self> {
|
||||
diesel::update(self).set(self).execute(conn)?;
|
||||
let post = Self::get(conn, self.id)?;
|
||||
searcher.update_document(conn, &post)?;
|
||||
// TODO: Call publish_published() when newly published
|
||||
if post.published {
|
||||
let blog = post.get_blog(conn);
|
||||
if blog.is_ok() && blog.unwrap().is_local() {
|
||||
self.publish_updated();
|
||||
}
|
||||
}
|
||||
Ok(post)
|
||||
}
|
||||
|
||||
pub fn delete(&self, conn: &Connection, searcher: &Searcher) -> Result<()> {
|
||||
pub fn delete(&self, conn: &Connection) -> Result<()> {
|
||||
for m in Mention::list_for_post(&conn, self.id)? {
|
||||
m.delete(conn)?;
|
||||
}
|
||||
diesel::delete(self).execute(conn)?;
|
||||
searcher.delete_document(self);
|
||||
self.publish_deleted();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -124,8 +131,7 @@ impl Post {
|
||||
.filter(posts::published.eq(true))
|
||||
.count()
|
||||
.load(conn)?
|
||||
.iter()
|
||||
.next()
|
||||
.get(0)
|
||||
.cloned()
|
||||
.ok_or(Error::NotFound)
|
||||
}
|
||||
@@ -242,6 +248,20 @@ impl Post {
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn ap_url(blog: Blog, slug: &str) -> String {
|
||||
ap_url(&format!(
|
||||
"{}/~/{}/{}/",
|
||||
CONFIG.base_url,
|
||||
blog.fqn,
|
||||
iri_percent_encode_seg(slug)
|
||||
))
|
||||
}
|
||||
|
||||
// It's better to calc slug in insert and update
|
||||
pub fn slug(title: &str) -> &str {
|
||||
title
|
||||
}
|
||||
|
||||
pub fn get_authors(&self, conn: &Connection) -> Result<Vec<User>> {
|
||||
use crate::schema::post_authors;
|
||||
use crate::schema::users;
|
||||
@@ -269,6 +289,24 @@ impl Post {
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
/// This method exists for use in templates to reduce database access.
|
||||
/// This should not be used for other purpose.
|
||||
///
|
||||
/// This caches query result. The best way to cache query result is holding it in `Post`s field
|
||||
/// but Diesel doesn't allow it currently.
|
||||
/// If sometime Diesel allow it, this method should be removed.
|
||||
pub fn get_blog_fqn(&self, conn: &Connection) -> String {
|
||||
if let Some(blog_fqn) = BLOG_FQN_CACHE.lock().unwrap().get(&self.blog_id) {
|
||||
return blog_fqn.to_string();
|
||||
}
|
||||
let blog_fqn = self.get_blog(conn).unwrap().fqn;
|
||||
BLOG_FQN_CACHE
|
||||
.lock()
|
||||
.unwrap()
|
||||
.insert(self.blog_id, blog_fqn.clone());
|
||||
blog_fqn
|
||||
}
|
||||
|
||||
pub fn count_likes(&self, conn: &Connection) -> Result<i64> {
|
||||
use crate::schema::likes;
|
||||
likes::table
|
||||
@@ -288,17 +326,16 @@ impl Post {
|
||||
}
|
||||
|
||||
pub fn get_receivers_urls(&self, conn: &Connection) -> Result<Vec<String>> {
|
||||
let followers = self
|
||||
Ok(self
|
||||
.get_authors(conn)?
|
||||
.into_iter()
|
||||
.filter_map(|a| a.get_followers(conn).ok())
|
||||
.collect::<Vec<Vec<User>>>();
|
||||
Ok(followers.into_iter().fold(vec![], |mut acc, f| {
|
||||
for x in f {
|
||||
acc.push(x.ap_url);
|
||||
}
|
||||
acc
|
||||
}))
|
||||
.fold(vec![], |mut acc, f| {
|
||||
for x in f {
|
||||
acc.push(x.ap_url);
|
||||
}
|
||||
acc
|
||||
}))
|
||||
}
|
||||
|
||||
pub fn to_activity(&self, conn: &Connection) -> Result<LicensedArticle> {
|
||||
@@ -417,13 +454,7 @@ impl Post {
|
||||
m,
|
||||
)
|
||||
})
|
||||
.filter_map(|(id, m)| {
|
||||
if let Some(id) = id {
|
||||
Some((m, id))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.filter_map(|(id, m)| id.map(|id| (m, id)))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let old_mentions = Mention::list_for_post(&conn, self.id)?;
|
||||
@@ -548,19 +579,48 @@ impl Post {
|
||||
.set_to_link_vec(vec![Id::new(PUBLIC_VISIBILITY)])?;
|
||||
Ok(act)
|
||||
}
|
||||
|
||||
fn publish_published(&self) {
|
||||
POST_CHAN.tell(
|
||||
Publish {
|
||||
msg: PostPublished(Arc::new(self.clone())),
|
||||
topic: "post.published".into(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
}
|
||||
|
||||
fn publish_updated(&self) {
|
||||
POST_CHAN.tell(
|
||||
Publish {
|
||||
msg: PostUpdated(Arc::new(self.clone())),
|
||||
topic: "post.updated".into(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
}
|
||||
|
||||
fn publish_deleted(&self) {
|
||||
POST_CHAN.tell(
|
||||
Publish {
|
||||
msg: PostDeleted(Arc::new(self.clone())),
|
||||
topic: "post.deleted".into(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromId<PlumeRocket> for Post {
|
||||
impl FromId<DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Object = LicensedArticle;
|
||||
|
||||
fn from_db(c: &PlumeRocket, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(&c.conn, id)
|
||||
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(conn, id)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, article: LicensedArticle) -> Result<Self> {
|
||||
let conn = &*c.conn;
|
||||
let searcher = &c.searcher;
|
||||
fn from_activity(conn: &DbConn, article: LicensedArticle) -> Result<Self> {
|
||||
let conn = conn;
|
||||
let license = article.custom_props.license_string().unwrap_or_default();
|
||||
let article = article.object;
|
||||
|
||||
@@ -570,12 +630,30 @@ impl FromId<PlumeRocket> for Post {
|
||||
.into_iter()
|
||||
.fold((None, vec![]), |(blog, mut authors), link| {
|
||||
let url = link;
|
||||
match User::from_id(&c, &url, None) {
|
||||
match User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&url,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
) {
|
||||
Ok(u) => {
|
||||
authors.push(u);
|
||||
(blog, authors)
|
||||
}
|
||||
Err(_) => (blog.or_else(|| Blog::from_id(&c, &url, None).ok()), authors),
|
||||
Err(_) => (
|
||||
blog.or_else(|| {
|
||||
Blog::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&url,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.ok()
|
||||
}),
|
||||
authors,
|
||||
),
|
||||
}
|
||||
});
|
||||
|
||||
@@ -583,40 +661,88 @@ impl FromId<PlumeRocket> for Post {
|
||||
.object_props
|
||||
.icon_object::<Image>()
|
||||
.ok()
|
||||
.and_then(|img| Media::from_activity(&c, &img).ok().map(|m| m.id));
|
||||
.and_then(|img| Media::from_activity(conn, &img).ok().map(|m| m.id));
|
||||
|
||||
let title = article.object_props.name_string()?;
|
||||
let post = Post::insert(
|
||||
conn,
|
||||
NewPost {
|
||||
blog_id: blog?.id,
|
||||
slug: title.to_kebab_case(),
|
||||
title,
|
||||
content: SafeString::new(&article.object_props.content_string()?),
|
||||
published: true,
|
||||
license,
|
||||
// FIXME: This is wrong: with this logic, we may use the display URL as the AP ID. We need two different fields
|
||||
ap_url: article
|
||||
.object_props
|
||||
.url_string()
|
||||
.or_else(|_| article.object_props.id_string())?,
|
||||
creation_date: Some(article.object_props.published_utctime()?.naive_utc()),
|
||||
subtitle: article.object_props.summary_string()?,
|
||||
source: article.ap_object_props.source_object::<Source>()?.content,
|
||||
cover_id: cover,
|
||||
},
|
||||
searcher,
|
||||
)?;
|
||||
let ap_url = article
|
||||
.object_props
|
||||
.url_string()
|
||||
.or_else(|_| article.object_props.id_string())?;
|
||||
let post = Post::from_db(conn, &ap_url)
|
||||
.and_then(|mut post| {
|
||||
let mut updated = false;
|
||||
|
||||
for author in authors {
|
||||
PostAuthor::insert(
|
||||
conn,
|
||||
NewPostAuthor {
|
||||
post_id: post.id,
|
||||
author_id: author.id,
|
||||
},
|
||||
)?;
|
||||
}
|
||||
let slug = Self::slug(&title);
|
||||
let content = SafeString::new(&article.object_props.content_string()?);
|
||||
let subtitle = article.object_props.summary_string()?;
|
||||
let source = article.ap_object_props.source_object::<Source>()?.content;
|
||||
if post.slug != slug {
|
||||
post.slug = slug.to_string();
|
||||
updated = true;
|
||||
}
|
||||
if post.title != title {
|
||||
post.title = title.clone();
|
||||
updated = true;
|
||||
}
|
||||
if post.content != content {
|
||||
post.content = content;
|
||||
updated = true;
|
||||
}
|
||||
if post.license != license {
|
||||
post.license = license.clone();
|
||||
updated = true;
|
||||
}
|
||||
if post.subtitle != subtitle {
|
||||
post.subtitle = subtitle;
|
||||
updated = true;
|
||||
}
|
||||
if post.source != source {
|
||||
post.source = source;
|
||||
updated = true;
|
||||
}
|
||||
if post.cover_id != cover {
|
||||
post.cover_id = cover;
|
||||
updated = true;
|
||||
}
|
||||
|
||||
if updated {
|
||||
post.update(conn)?;
|
||||
}
|
||||
|
||||
Ok(post)
|
||||
})
|
||||
.or_else(|_| {
|
||||
Post::insert(
|
||||
conn,
|
||||
NewPost {
|
||||
blog_id: blog?.id,
|
||||
slug: Self::slug(&title).to_string(),
|
||||
title,
|
||||
content: SafeString::new(&article.object_props.content_string()?),
|
||||
published: true,
|
||||
license,
|
||||
// FIXME: This is wrong: with this logic, we may use the display URL as the AP ID. We need two different fields
|
||||
ap_url,
|
||||
creation_date: Some(article.object_props.published_utctime()?.naive_utc()),
|
||||
subtitle: article.object_props.summary_string()?,
|
||||
source: article.ap_object_props.source_object::<Source>()?.content,
|
||||
cover_id: cover,
|
||||
},
|
||||
)
|
||||
.and_then(|post| {
|
||||
for author in authors {
|
||||
PostAuthor::insert(
|
||||
conn,
|
||||
NewPostAuthor {
|
||||
post_id: post.id,
|
||||
author_id: author.id,
|
||||
},
|
||||
)?;
|
||||
}
|
||||
|
||||
Ok(post)
|
||||
})
|
||||
})?;
|
||||
|
||||
// save mentions and tags
|
||||
let mut hashtags = md_to_html(&post.source, None, false, None)
|
||||
@@ -644,33 +770,33 @@ impl FromId<PlumeRocket> for Post {
|
||||
}
|
||||
}
|
||||
|
||||
Timeline::add_to_all_timelines(c, &post, Kind::Original)?;
|
||||
Timeline::add_to_all_timelines(conn, &post, Kind::Original)?;
|
||||
|
||||
Ok(post)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Create, &PlumeRocket> for Post {
|
||||
impl AsObject<User, Create, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = Post;
|
||||
|
||||
fn activity(self, _c: &PlumeRocket, _actor: User, _id: &str) -> Result<Post> {
|
||||
fn activity(self, _conn: &DbConn, _actor: User, _id: &str) -> Result<Post> {
|
||||
// TODO: check that _actor is actually one of the author?
|
||||
Ok(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Delete, &PlumeRocket> for Post {
|
||||
impl AsObject<User, Delete, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, _id: &str) -> Result<()> {
|
||||
fn activity(self, conn: &DbConn, actor: User, _id: &str) -> Result<()> {
|
||||
let can_delete = self
|
||||
.get_authors(&c.conn)?
|
||||
.get_authors(conn)?
|
||||
.into_iter()
|
||||
.any(|a| actor.id == a.id);
|
||||
if can_delete {
|
||||
self.delete(&c.conn, &c.searcher).map(|_| ())
|
||||
self.delete(conn).map(|_| ())
|
||||
} else {
|
||||
Err(Error::Unauthorized)
|
||||
}
|
||||
@@ -688,16 +814,16 @@ pub struct PostUpdate {
|
||||
pub tags: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
impl FromId<PlumeRocket> for PostUpdate {
|
||||
impl FromId<DbConn> for PostUpdate {
|
||||
type Error = Error;
|
||||
type Object = LicensedArticle;
|
||||
|
||||
fn from_db(_: &PlumeRocket, _: &str) -> Result<Self> {
|
||||
fn from_db(_: &DbConn, _: &str) -> Result<Self> {
|
||||
// Always fail because we always want to deserialize the AP object
|
||||
Err(Error::NotFound)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, updated: LicensedArticle) -> Result<Self> {
|
||||
fn from_activity(conn: &DbConn, updated: LicensedArticle) -> Result<Self> {
|
||||
Ok(PostUpdate {
|
||||
ap_url: updated.object.object_props.id_string()?,
|
||||
title: updated.object.object_props.name_string().ok(),
|
||||
@@ -708,7 +834,7 @@ impl FromId<PlumeRocket> for PostUpdate {
|
||||
.object_props
|
||||
.icon_object::<Image>()
|
||||
.ok()
|
||||
.and_then(|img| Media::from_activity(&c, &img).ok().map(|m| m.id)),
|
||||
.and_then(|img| Media::from_activity(conn, &img).ok().map(|m| m.id)),
|
||||
source: updated
|
||||
.object
|
||||
.ap_object_props
|
||||
@@ -721,14 +847,19 @@ impl FromId<PlumeRocket> for PostUpdate {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Update, &PlumeRocket> for PostUpdate {
|
||||
impl AsObject<User, Update, &DbConn> for PostUpdate {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, _id: &str) -> Result<()> {
|
||||
let conn = &*c.conn;
|
||||
let searcher = &c.searcher;
|
||||
let mut post = Post::from_id(c, &self.ap_url, None).map_err(|(_, e)| e)?;
|
||||
fn activity(self, conn: &DbConn, actor: User, _id: &str) -> Result<()> {
|
||||
let mut post = Post::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&self.ap_url,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?;
|
||||
|
||||
if !post.is_author(conn, actor.id)? {
|
||||
// TODO: maybe the author was added in the meantime
|
||||
@@ -736,7 +867,7 @@ impl AsObject<User, Update, &PlumeRocket> for PostUpdate {
|
||||
}
|
||||
|
||||
if let Some(title) = self.title {
|
||||
post.slug = title.to_kebab_case();
|
||||
post.slug = Post::slug(&title).to_string();
|
||||
post.title = title;
|
||||
}
|
||||
|
||||
@@ -789,7 +920,7 @@ impl AsObject<User, Update, &PlumeRocket> for PostUpdate {
|
||||
post.update_hashtags(conn, hashtags)?;
|
||||
}
|
||||
|
||||
post.update(conn, searcher)?;
|
||||
post.update(conn)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -800,24 +931,42 @@ impl IntoId for Post {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum PostEvent {
|
||||
PostPublished(Arc<Post>),
|
||||
PostUpdated(Arc<Post>),
|
||||
PostDeleted(Arc<Post>),
|
||||
}
|
||||
|
||||
impl From<PostEvent> for Arc<Post> {
|
||||
fn from(event: PostEvent) -> Self {
|
||||
use PostEvent::*;
|
||||
|
||||
match event {
|
||||
PostPublished(post) => post,
|
||||
PostUpdated(post) => post,
|
||||
PostDeleted(post) => post,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::inbox::{inbox, tests::fill_database, InboxResult};
|
||||
use crate::safe_string::SafeString;
|
||||
use crate::tests::rockets;
|
||||
use crate::tests::db;
|
||||
use diesel::Connection;
|
||||
|
||||
// creates a post, get it's Create activity, delete the post,
|
||||
// "send" the Create to the inbox, and check it works
|
||||
#[test]
|
||||
fn self_federation() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (_, users, blogs) = fill_database(&r);
|
||||
let (_, users, blogs) = fill_database(&conn);
|
||||
let post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "yo".into(),
|
||||
@@ -831,23 +980,22 @@ mod tests {
|
||||
source: "Hello".into(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
PostAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPostAuthor {
|
||||
post_id: post.id,
|
||||
author_id: users[0].id,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
let create = post.create_activity(conn).unwrap();
|
||||
post.delete(conn, &r.searcher).unwrap();
|
||||
let create = post.create_activity(&conn).unwrap();
|
||||
post.delete(&conn).unwrap();
|
||||
|
||||
match inbox(&r, serde_json::to_value(create).unwrap()).unwrap() {
|
||||
match inbox(&conn, serde_json::to_value(create).unwrap()).unwrap() {
|
||||
InboxResult::Post(p) => {
|
||||
assert!(p.is_author(conn, users[0].id).unwrap());
|
||||
assert!(p.is_author(&conn, users[0].id).unwrap());
|
||||
assert_eq!(p.source, "Hello".to_owned());
|
||||
assert_eq!(p.blog_id, blogs[0].id);
|
||||
assert_eq!(p.content, SafeString::new("Hello"));
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
use crate::{
|
||||
db_conn::{DbConn, DbPool},
|
||||
follows,
|
||||
instance::Instance,
|
||||
posts::{LicensedArticle, Post},
|
||||
users::{User, UserEvent},
|
||||
ACTOR_SYS, CONFIG, USER_CHAN,
|
||||
};
|
||||
use activitypub::activity::Create;
|
||||
use plume_common::activity_pub::inbox::FromId;
|
||||
use riker::actors::{Actor, ActorFactoryArgs, ActorRefFactory, Context, Sender, Subscribe, Tell};
|
||||
use std::sync::Arc;
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
pub struct RemoteFetchActor {
|
||||
conn: DbPool,
|
||||
}
|
||||
|
||||
impl RemoteFetchActor {
|
||||
pub fn init(conn: DbPool) {
|
||||
let actor = ACTOR_SYS
|
||||
.actor_of_args::<RemoteFetchActor, _>("remote-fetch", conn)
|
||||
.expect("Failed to initialize remote fetch actor");
|
||||
|
||||
USER_CHAN.tell(
|
||||
Subscribe {
|
||||
actor: Box::new(actor),
|
||||
topic: "*".into(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl Actor for RemoteFetchActor {
|
||||
type Msg = UserEvent;
|
||||
|
||||
fn recv(&mut self, _ctx: &Context<Self::Msg>, msg: Self::Msg, _sender: Sender) {
|
||||
use UserEvent::*;
|
||||
|
||||
match msg {
|
||||
RemoteUserFound(user) => match self.conn.get() {
|
||||
Ok(conn) => {
|
||||
let conn = DbConn(conn);
|
||||
// Don't call these functions in parallel
|
||||
// for the case database connections limit is too small
|
||||
fetch_and_cache_articles(&user, &conn);
|
||||
fetch_and_cache_followers(&user, &conn);
|
||||
if user.needs_update() {
|
||||
fetch_and_cache_user(&user, &conn);
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
error!("Failed to get database connection");
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ActorFactoryArgs<DbPool> for RemoteFetchActor {
|
||||
fn create_args(conn: DbPool) -> Self {
|
||||
Self { conn }
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch_and_cache_articles(user: &Arc<User>, conn: &DbConn) {
|
||||
let create_acts = user.fetch_outbox::<Create>();
|
||||
match create_acts {
|
||||
Ok(create_acts) => {
|
||||
for create_act in create_acts {
|
||||
match create_act.create_props.object_object::<LicensedArticle>() {
|
||||
Ok(article) => {
|
||||
Post::from_activity(conn, article)
|
||||
.expect("Article from remote user couldn't be saved");
|
||||
info!("Fetched article from remote user");
|
||||
}
|
||||
Err(e) => warn!("Error while fetching articles in background: {:?}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
error!("Failed to fetch outboxes: {:?}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch_and_cache_followers(user: &Arc<User>, conn: &DbConn) {
|
||||
let follower_ids = user.fetch_followers_ids();
|
||||
match follower_ids {
|
||||
Ok(user_ids) => {
|
||||
for user_id in user_ids {
|
||||
let follower = User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&user_id,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
);
|
||||
match follower {
|
||||
Ok(follower) => {
|
||||
let inserted = follows::Follow::insert(
|
||||
conn,
|
||||
follows::NewFollow {
|
||||
follower_id: follower.id,
|
||||
following_id: user.id,
|
||||
ap_url: String::new(),
|
||||
},
|
||||
);
|
||||
if inserted.is_err() {
|
||||
error!("Couldn't save follower for remote user: {:?}", user_id);
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
error!("Couldn't fetch follower: {:?}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
error!("Failed to fetch follower: {:?}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch_and_cache_user(user: &Arc<User>, conn: &DbConn) {
|
||||
if user.refetch(conn).is_err() {
|
||||
error!("Couldn't update user info: {:?}", user);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
notifications::*, posts::Post, schema::reshares, timeline::*, users::User, Connection, Error,
|
||||
PlumeRocket, Result,
|
||||
db_conn::DbConn, instance::Instance, notifications::*, posts::Post, schema::reshares,
|
||||
timeline::*, users::User, Connection, Error, Result, CONFIG,
|
||||
};
|
||||
use activitypub::activity::{Announce, Undo};
|
||||
use chrono::NaiveDateTime;
|
||||
@@ -107,12 +107,12 @@ impl Reshare {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Announce, &PlumeRocket> for Post {
|
||||
impl AsObject<User, Announce, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = Reshare;
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, id: &str) -> Result<Reshare> {
|
||||
let conn = &*c.conn;
|
||||
fn activity(self, conn: &DbConn, actor: User, id: &str) -> Result<Reshare> {
|
||||
let conn = conn;
|
||||
let reshare = Reshare::insert(
|
||||
conn,
|
||||
NewReshare {
|
||||
@@ -123,49 +123,60 @@ impl AsObject<User, Announce, &PlumeRocket> for Post {
|
||||
)?;
|
||||
reshare.notify(conn)?;
|
||||
|
||||
Timeline::add_to_all_timelines(c, &self, Kind::Reshare(&actor))?;
|
||||
Timeline::add_to_all_timelines(conn, &self, Kind::Reshare(&actor))?;
|
||||
Ok(reshare)
|
||||
}
|
||||
}
|
||||
|
||||
impl FromId<PlumeRocket> for Reshare {
|
||||
impl FromId<DbConn> for Reshare {
|
||||
type Error = Error;
|
||||
type Object = Announce;
|
||||
|
||||
fn from_db(c: &PlumeRocket, id: &str) -> Result<Self> {
|
||||
Reshare::find_by_ap_url(&c.conn, id)
|
||||
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
|
||||
Reshare::find_by_ap_url(conn, id)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, act: Announce) -> Result<Self> {
|
||||
fn from_activity(conn: &DbConn, act: Announce) -> Result<Self> {
|
||||
let res = Reshare::insert(
|
||||
&c.conn,
|
||||
conn,
|
||||
NewReshare {
|
||||
post_id: Post::from_id(c, &act.announce_props.object_link::<Id>()?, None)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
user_id: User::from_id(c, &act.announce_props.actor_link::<Id>()?, None)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
post_id: Post::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&act.announce_props.object_link::<Id>()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
user_id: User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
&act.announce_props.actor_link::<Id>()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)?
|
||||
.id,
|
||||
ap_url: act.object_props.id_string()?,
|
||||
},
|
||||
)?;
|
||||
res.notify(&c.conn)?;
|
||||
res.notify(conn)?;
|
||||
Ok(res)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Undo, &PlumeRocket> for Reshare {
|
||||
impl AsObject<User, Undo, &DbConn> for Reshare {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, _id: &str) -> Result<()> {
|
||||
let conn = &*c.conn;
|
||||
fn activity(self, conn: &DbConn, actor: User, _id: &str) -> Result<()> {
|
||||
if actor.id == self.user_id {
|
||||
diesel::delete(&self).execute(conn)?;
|
||||
diesel::delete(&self).execute(&**conn)?;
|
||||
|
||||
// delete associated notification if any
|
||||
if let Ok(notif) = Notification::find(&conn, notification_kind::RESHARE, self.id) {
|
||||
diesel::delete(¬if).execute(conn)?;
|
||||
diesel::delete(¬if).execute(&**conn)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -11,14 +11,13 @@ use std::{
|
||||
borrow::{Borrow, Cow},
|
||||
fmt::{self, Display},
|
||||
io::Write,
|
||||
iter,
|
||||
ops::Deref,
|
||||
};
|
||||
|
||||
lazy_static! {
|
||||
static ref CLEAN: Builder<'static> = {
|
||||
let mut b = Builder::new();
|
||||
b.add_generic_attributes(iter::once("id"))
|
||||
b.add_generic_attributes(&["id", "dir"])
|
||||
.add_tags(&["iframe", "video", "audio", "label", "input"])
|
||||
.id_prefix(Some("postcontent-"))
|
||||
.url_relative(UrlRelative::Custom(Box::new(url_add_prefix)))
|
||||
@@ -82,6 +81,7 @@ lazy_static! {
|
||||
};
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn url_add_prefix(url: &str) -> Option<Cow<'_, str>> {
|
||||
if url.starts_with('#') && !url.starts_with("#postcontent-") {
|
||||
//if start with an #
|
||||
@@ -156,7 +156,7 @@ impl<'de> Deserialize<'de> for SafeString {
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
Ok(deserializer.deserialize_string(SafeStringVisitor)?)
|
||||
deserializer.deserialize_string(SafeStringVisitor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,8 @@ table! {
|
||||
default_license -> Text,
|
||||
long_description_html -> Varchar,
|
||||
short_description_html -> Varchar,
|
||||
private_key -> Nullable<Text>,
|
||||
public_key -> Nullable<Text>,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
use super::Searcher;
|
||||
use crate::{db_conn::DbPool, posts::PostEvent, ACTOR_SYS, POST_CHAN};
|
||||
use riker::actors::{Actor, ActorFactoryArgs, ActorRefFactory, Context, Sender, Subscribe, Tell};
|
||||
use std::sync::Arc;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
use tracing::error;
|
||||
|
||||
pub struct SearchActor {
|
||||
searcher: Arc<Searcher>,
|
||||
conn: DbPool,
|
||||
}
|
||||
|
||||
impl SearchActor {
|
||||
pub fn init(searcher: Arc<Searcher>, conn: DbPool) {
|
||||
let actor = ACTOR_SYS
|
||||
.actor_of_args::<SearchActor, _>("search", (searcher, conn))
|
||||
.expect("Failed to initialize searcher actor");
|
||||
|
||||
POST_CHAN.tell(
|
||||
Subscribe {
|
||||
actor: Box::new(actor),
|
||||
topic: "*".into(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl Actor for SearchActor {
|
||||
type Msg = PostEvent;
|
||||
|
||||
fn recv(&mut self, _ctx: &Context<Self::Msg>, msg: Self::Msg, _sender: Sender) {
|
||||
use PostEvent::*;
|
||||
|
||||
// Wait for transaction commited
|
||||
sleep(Duration::from_millis(500));
|
||||
|
||||
match msg {
|
||||
PostPublished(post) => {
|
||||
let conn = self.conn.get();
|
||||
match conn {
|
||||
Ok(conn) => {
|
||||
self.searcher
|
||||
.add_document(&conn, &post)
|
||||
.unwrap_or_else(|e| error!("{:?}", e));
|
||||
}
|
||||
_ => {
|
||||
error!("Failed to get database connection");
|
||||
}
|
||||
}
|
||||
}
|
||||
PostUpdated(post) => {
|
||||
let conn = self.conn.get();
|
||||
match conn {
|
||||
Ok(_) => {
|
||||
self.searcher
|
||||
.update_document(&conn.unwrap(), &post)
|
||||
.unwrap_or_else(|e| error!("{:?}", e));
|
||||
}
|
||||
_ => {
|
||||
error!("Failed to get database connection");
|
||||
}
|
||||
}
|
||||
}
|
||||
PostDeleted(post) => self.searcher.delete_document(&post),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ActorFactoryArgs<(Arc<Searcher>, DbPool)> for SearchActor {
|
||||
fn create_args((searcher, conn): (Arc<Searcher>, DbPool)) -> Self {
|
||||
Self { searcher, conn }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::diesel::Connection;
|
||||
use crate::{
|
||||
blog_authors::{BlogAuthor, NewBlogAuthor},
|
||||
blogs::{Blog, NewBlog},
|
||||
db_conn::{DbPool, PragmaForeignKey},
|
||||
instance::{Instance, NewInstance},
|
||||
post_authors::{NewPostAuthor, PostAuthor},
|
||||
posts::{NewPost, Post},
|
||||
safe_string::SafeString,
|
||||
search::{actor::SearchActor, tests::get_searcher, Query},
|
||||
users::{NewUser, User},
|
||||
Connection as Conn, CONFIG,
|
||||
};
|
||||
use diesel::r2d2::ConnectionManager;
|
||||
use plume_common::utils::random_hex;
|
||||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
use std::thread::sleep;
|
||||
use std::time::Duration;
|
||||
|
||||
#[test]
|
||||
fn post_updated() {
|
||||
// Need to commit so that searcher on another thread retrieve records.
|
||||
// So, build DbPool instead of using DB_POOL for testing.
|
||||
let manager = ConnectionManager::<Conn>::new(CONFIG.database_url.as_str());
|
||||
let db_pool = DbPool::builder()
|
||||
.connection_customizer(Box::new(PragmaForeignKey))
|
||||
.build(manager)
|
||||
.unwrap();
|
||||
|
||||
let searcher = Arc::new(get_searcher(&CONFIG.search_tokenizers));
|
||||
SearchActor::init(searcher.clone(), db_pool.clone());
|
||||
let conn = db_pool.clone().get().unwrap();
|
||||
|
||||
let title = random_hex()[..8].to_owned();
|
||||
let (_instance, _user, blog) = fill_database(&conn);
|
||||
let author = &blog.list_authors(&conn).unwrap()[0];
|
||||
|
||||
let post = Post::insert(
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blog.id,
|
||||
slug: title.clone(),
|
||||
title: title.clone(),
|
||||
content: SafeString::new(""),
|
||||
published: true,
|
||||
license: "CC-BY-SA".to_owned(),
|
||||
ap_url: "".to_owned(),
|
||||
creation_date: None,
|
||||
subtitle: "".to_owned(),
|
||||
source: "".to_owned(),
|
||||
cover_id: None,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
PostAuthor::insert(
|
||||
&conn,
|
||||
NewPostAuthor {
|
||||
post_id: post.id,
|
||||
author_id: author.id,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
let post_id = post.id;
|
||||
|
||||
// Wait for searcher on another thread add document asynchronously
|
||||
sleep(Duration::from_millis(700));
|
||||
searcher.commit();
|
||||
assert_eq!(
|
||||
searcher.search_document(&conn, Query::from_str(&title).unwrap(), (0, 1))[0].id,
|
||||
post_id
|
||||
);
|
||||
}
|
||||
|
||||
fn fill_database(conn: &Conn) -> (Instance, User, Blog) {
|
||||
conn.transaction::<(Instance, User, Blog), diesel::result::Error, _>(|| {
|
||||
let instance = Instance::insert(
|
||||
conn,
|
||||
NewInstance {
|
||||
default_license: "CC-0-BY-SA".to_string(),
|
||||
local: false,
|
||||
long_description: SafeString::new("Good morning"),
|
||||
long_description_html: "<p>Good morning</p>".to_string(),
|
||||
short_description: SafeString::new("Hello"),
|
||||
short_description_html: "<p>Hello</p>".to_string(),
|
||||
name: random_hex().to_string(),
|
||||
open_registrations: true,
|
||||
public_domain: random_hex().to_string(),
|
||||
private_key: None,
|
||||
public_key: None,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
let user = User::insert(
|
||||
conn,
|
||||
NewUser {
|
||||
username: random_hex().to_string(),
|
||||
display_name: random_hex().to_string(),
|
||||
outbox_url: random_hex().to_string(),
|
||||
inbox_url: random_hex().to_string(),
|
||||
summary: "".to_string(),
|
||||
email: None,
|
||||
hashed_password: None,
|
||||
instance_id: instance.id,
|
||||
ap_url: random_hex().to_string(),
|
||||
private_key: None,
|
||||
public_key: "".to_string(),
|
||||
shared_inbox_url: None,
|
||||
followers_endpoint: random_hex().to_string(),
|
||||
avatar_id: None,
|
||||
summary_html: SafeString::new(""),
|
||||
role: 0,
|
||||
fqn: random_hex().to_string(),
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
let mut blog = NewBlog::default();
|
||||
blog.instance_id = instance.id;
|
||||
blog.actor_id = random_hex().to_string();
|
||||
blog.ap_url = random_hex().to_string();
|
||||
blog.inbox_url = random_hex().to_string();
|
||||
blog.outbox_url = random_hex().to_string();
|
||||
let blog = Blog::insert(conn, blog).unwrap();
|
||||
BlogAuthor::insert(
|
||||
conn,
|
||||
NewBlogAuthor {
|
||||
blog_id: blog.id,
|
||||
author_id: user.id,
|
||||
is_owner: true,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
Ok((instance, user, blog))
|
||||
})
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
pub mod actor;
|
||||
mod query;
|
||||
mod searcher;
|
||||
mod tokenizer;
|
||||
@@ -7,12 +8,7 @@ pub use self::tokenizer::TokenizerKind;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::{Query, Searcher, TokenizerKind};
|
||||
use diesel::Connection;
|
||||
use plume_common::utils::random_hex;
|
||||
use std::env::temp_dir;
|
||||
use std::str::FromStr;
|
||||
|
||||
use super::{Query, Searcher};
|
||||
use crate::{
|
||||
blogs::tests::fill_database,
|
||||
config::SearchTokenizerConfig,
|
||||
@@ -22,6 +18,10 @@ pub(crate) mod tests {
|
||||
tests::db,
|
||||
CONFIG,
|
||||
};
|
||||
use diesel::Connection;
|
||||
use plume_common::utils::random_hex;
|
||||
use std::env::temp_dir;
|
||||
use std::str::FromStr;
|
||||
|
||||
pub(crate) fn get_searcher(tokenizers: &SearchTokenizerConfig) -> Searcher {
|
||||
let dir = temp_dir().join(&format!("plume-test-{}", random_hex()));
|
||||
@@ -144,7 +144,6 @@ pub(crate) mod tests {
|
||||
source: "".to_owned(),
|
||||
cover_id: None,
|
||||
},
|
||||
&searcher,
|
||||
)
|
||||
.unwrap();
|
||||
PostAuthor::insert(
|
||||
@@ -155,7 +154,7 @@ pub(crate) mod tests {
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
searcher.add_document(&conn, &post).unwrap();
|
||||
searcher.commit();
|
||||
assert_eq!(
|
||||
searcher.search_document(conn, Query::from_str(&title).unwrap(), (0, 1))[0].id,
|
||||
@@ -164,7 +163,8 @@ pub(crate) mod tests {
|
||||
|
||||
let newtitle = random_hex()[..8].to_owned();
|
||||
post.title = newtitle.clone();
|
||||
post.update(conn, &searcher).unwrap();
|
||||
post.update(conn).unwrap();
|
||||
searcher.update_document(conn, &post).unwrap();
|
||||
searcher.commit();
|
||||
assert_eq!(
|
||||
searcher.search_document(conn, Query::from_str(&newtitle).unwrap(), (0, 1))[0].id,
|
||||
@@ -174,7 +174,7 @@ pub(crate) mod tests {
|
||||
.search_document(conn, Query::from_str(&title).unwrap(), (0, 1))
|
||||
.is_empty());
|
||||
|
||||
post.delete(conn, &searcher).unwrap();
|
||||
searcher.delete_document(&post);
|
||||
searcher.commit();
|
||||
assert!(searcher
|
||||
.search_document(conn, Query::from_str(&newtitle).unwrap(), (0, 1))
|
||||
@@ -213,7 +213,6 @@ pub(crate) mod tests {
|
||||
source: "".to_owned(),
|
||||
cover_id: None,
|
||||
},
|
||||
&searcher,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
use crate::{
|
||||
config::SearchTokenizerConfig, instance::Instance, posts::Post, schema::posts,
|
||||
search::query::PlumeQuery, tags::Tag, Connection, Result,
|
||||
search::query::PlumeQuery, tags::Tag, Connection, Error, Result,
|
||||
};
|
||||
use chrono::Datelike;
|
||||
use chrono::{Datelike, Utc};
|
||||
use diesel::{ExpressionMethods, QueryDsl, RunQueryDsl};
|
||||
use itertools::Itertools;
|
||||
use std::fs;
|
||||
use std::{cmp, fs::create_dir_all, io, path::Path, sync::Mutex};
|
||||
use tantivy::{
|
||||
collector::TopDocs, directory::MmapDirectory, schema::*, Index, IndexReader, IndexWriter,
|
||||
ReloadPolicy, TantivyError, Term,
|
||||
};
|
||||
use tracing::warn;
|
||||
use whatlang::{detect as detect_lang, Lang};
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -67,6 +69,58 @@ impl Searcher {
|
||||
schema_builder.build()
|
||||
}
|
||||
|
||||
pub fn open_or_recreate(path: &dyn AsRef<Path>, tokenizers: &SearchTokenizerConfig) -> Self {
|
||||
let mut open_searcher = Self::open(path, tokenizers);
|
||||
if let Err(Error::Search(SearcherError::InvalidIndexDataError)) = open_searcher {
|
||||
if Self::create(path, tokenizers).is_err() {
|
||||
let backup_path = format!("{}.{}", path.as_ref().display(), Utc::now().timestamp());
|
||||
let backup_path = Path::new(&backup_path);
|
||||
fs::rename(path, backup_path)
|
||||
.expect("main: error on backing up search index directory for recreating");
|
||||
if Self::create(path, tokenizers).is_ok() {
|
||||
if fs::remove_dir_all(backup_path).is_err() {
|
||||
warn!(
|
||||
"error on removing backup directory: {}. it remains",
|
||||
backup_path.display()
|
||||
);
|
||||
}
|
||||
} else {
|
||||
panic!("main: error on recreating search index in new index format. remove search index and run `plm search init` manually");
|
||||
}
|
||||
}
|
||||
open_searcher = Self::open(path, tokenizers);
|
||||
}
|
||||
match open_searcher {
|
||||
Ok(s) => s,
|
||||
Err(Error::Search(e)) => match e {
|
||||
SearcherError::WriteLockAcquisitionError => panic!(
|
||||
r#"
|
||||
Your search index is locked. Plume can't start. To fix this issue
|
||||
make sure no other Plume instance is started, and run:
|
||||
|
||||
plm search unlock
|
||||
|
||||
Then try to restart Plume.
|
||||
"#
|
||||
),
|
||||
SearcherError::IndexOpeningError => panic!(
|
||||
r#"
|
||||
Plume was unable to open the search index. If you created the index
|
||||
before, make sure to run Plume in the same directory it was created in, or
|
||||
to set SEARCH_INDEX accordingly. If you did not yet create the search
|
||||
index, run this command:
|
||||
|
||||
plm search init
|
||||
|
||||
Then try to restart Plume
|
||||
"#
|
||||
),
|
||||
e => Err(e).unwrap(),
|
||||
},
|
||||
_ => panic!("Unexpected error while opening search index"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create(path: &dyn AsRef<Path>, tokenizers: &SearchTokenizerConfig) -> Result<Self> {
|
||||
let schema = Self::schema();
|
||||
|
||||
|
||||
+147
-135
@@ -1,8 +1,9 @@
|
||||
use crate::{
|
||||
db_conn::DbConn,
|
||||
lists::List,
|
||||
posts::Post,
|
||||
schema::{posts, timeline, timeline_definition},
|
||||
Connection, Error, PlumeRocket, Result,
|
||||
Connection, Error, Result,
|
||||
};
|
||||
use diesel::{self, BoolExpressionMethods, ExpressionMethods, QueryDsl, RunQueryDsl};
|
||||
use std::ops::Deref;
|
||||
@@ -208,20 +209,23 @@ impl Timeline {
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn add_to_all_timelines(rocket: &PlumeRocket, post: &Post, kind: Kind<'_>) -> Result<()> {
|
||||
pub fn add_to_all_timelines(conn: &DbConn, post: &Post, kind: Kind<'_>) -> Result<()> {
|
||||
let timelines = timeline_definition::table
|
||||
.load::<Self>(rocket.conn.deref())
|
||||
.load::<Self>(conn.deref())
|
||||
.map_err(Error::from)?;
|
||||
|
||||
for t in timelines {
|
||||
if t.matches(rocket, post, kind)? {
|
||||
t.add_post(&rocket.conn, post)?;
|
||||
if t.matches(conn, post, kind)? {
|
||||
t.add_post(conn, post)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn add_post(&self, conn: &Connection, post: &Post) -> Result<()> {
|
||||
if self.includes_post(conn, post)? {
|
||||
return Ok(());
|
||||
}
|
||||
diesel::insert_into(timeline::table)
|
||||
.values(TimelineEntry {
|
||||
post_id: post.id,
|
||||
@@ -231,9 +235,19 @@ impl Timeline {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn matches(&self, rocket: &PlumeRocket, post: &Post, kind: Kind<'_>) -> Result<bool> {
|
||||
pub fn matches(&self, conn: &DbConn, post: &Post, kind: Kind<'_>) -> Result<bool> {
|
||||
let query = TimelineQuery::parse(&self.query)?;
|
||||
query.matches(rocket, self, post, kind)
|
||||
query.matches(conn, self, post, kind)
|
||||
}
|
||||
|
||||
fn includes_post(&self, conn: &Connection, post: &Post) -> Result<bool> {
|
||||
diesel::dsl::select(diesel::dsl::exists(
|
||||
timeline::table
|
||||
.filter(timeline::timeline_id.eq(self.id))
|
||||
.filter(timeline::post_id.eq(post.id)),
|
||||
))
|
||||
.get_result(conn)
|
||||
.map_err(Error::from)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +262,7 @@ mod tests {
|
||||
posts::NewPost,
|
||||
safe_string::SafeString,
|
||||
tags::Tag,
|
||||
tests::{db, rockets},
|
||||
tests::db,
|
||||
users::tests as userTests,
|
||||
};
|
||||
use diesel::Connection;
|
||||
@@ -257,63 +271,69 @@ mod tests {
|
||||
fn test_timeline() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let users = userTests::fill_database(conn);
|
||||
let users = userTests::fill_database(&conn);
|
||||
|
||||
let mut tl1_u1 = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"my timeline".to_owned(),
|
||||
"all".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
List::new(conn, "languages I speak", Some(&users[1]), ListType::Prefix).unwrap();
|
||||
List::new(
|
||||
&conn,
|
||||
"languages I speak",
|
||||
Some(&users[1]),
|
||||
ListType::Prefix,
|
||||
)
|
||||
.unwrap();
|
||||
let tl2_u1 = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"another timeline".to_owned(),
|
||||
"followed".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
let tl1_u2 = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[1].id,
|
||||
"english posts".to_owned(),
|
||||
"lang in \"languages I speak\"".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
let tl1_instance = Timeline::new_for_instance(
|
||||
conn,
|
||||
&conn,
|
||||
"english posts".to_owned(),
|
||||
"license in [cc]".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(tl1_u1, Timeline::get(conn, tl1_u1.id).unwrap());
|
||||
assert_eq!(tl1_u1, Timeline::get(&conn, tl1_u1.id).unwrap());
|
||||
assert_eq!(
|
||||
tl2_u1,
|
||||
Timeline::find_for_user_by_name(conn, Some(users[0].id), "another timeline")
|
||||
Timeline::find_for_user_by_name(&conn, Some(users[0].id), "another timeline")
|
||||
.unwrap()
|
||||
);
|
||||
assert_eq!(
|
||||
tl1_instance,
|
||||
Timeline::find_for_user_by_name(conn, None, "english posts").unwrap()
|
||||
Timeline::find_for_user_by_name(&conn, None, "english posts").unwrap()
|
||||
);
|
||||
|
||||
let tl_u1 = Timeline::list_for_user(conn, Some(users[0].id)).unwrap();
|
||||
let tl_u1 = Timeline::list_for_user(&conn, Some(users[0].id)).unwrap();
|
||||
assert_eq!(3, tl_u1.len()); // it is not 2 because there is a "Your feed" tl created for each user automatically
|
||||
assert!(tl_u1.iter().fold(false, |res, tl| { res || *tl == tl1_u1 }));
|
||||
assert!(tl_u1.iter().fold(false, |res, tl| { res || *tl == tl2_u1 }));
|
||||
|
||||
let tl_instance = Timeline::list_for_user(conn, None).unwrap();
|
||||
let tl_instance = Timeline::list_for_user(&conn, None).unwrap();
|
||||
assert_eq!(3, tl_instance.len()); // there are also the local and federated feed by default
|
||||
assert!(tl_instance
|
||||
.iter()
|
||||
.fold(false, |res, tl| { res || *tl == tl1_instance }));
|
||||
|
||||
tl1_u1.name = "My Super TL".to_owned();
|
||||
let new_tl1_u2 = tl1_u2.update(conn).unwrap();
|
||||
let new_tl1_u2 = tl1_u2.update(&conn).unwrap();
|
||||
|
||||
let tl_u2 = Timeline::list_for_user(conn, Some(users[1].id)).unwrap();
|
||||
let tl_u2 = Timeline::list_for_user(&conn, Some(users[1].id)).unwrap();
|
||||
assert_eq!(2, tl_u2.len()); // same here
|
||||
assert!(tl_u2
|
||||
.iter()
|
||||
@@ -327,48 +347,48 @@ mod tests {
|
||||
fn test_timeline_creation_error() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let users = userTests::fill_database(conn);
|
||||
let users = userTests::fill_database(&conn);
|
||||
|
||||
assert!(Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"my timeline".to_owned(),
|
||||
"invalid keyword".to_owned(),
|
||||
)
|
||||
.is_err());
|
||||
assert!(Timeline::new_for_instance(
|
||||
conn,
|
||||
&conn,
|
||||
"my timeline".to_owned(),
|
||||
"invalid keyword".to_owned(),
|
||||
)
|
||||
.is_err());
|
||||
|
||||
assert!(Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"my timeline".to_owned(),
|
||||
"author in non_existant_list".to_owned(),
|
||||
)
|
||||
.is_err());
|
||||
assert!(Timeline::new_for_instance(
|
||||
conn,
|
||||
&conn,
|
||||
"my timeline".to_owned(),
|
||||
"lang in dont-exist".to_owned(),
|
||||
)
|
||||
.is_err());
|
||||
|
||||
List::new(conn, "friends", Some(&users[0]), ListType::User).unwrap();
|
||||
List::new(conn, "idk", None, ListType::Blog).unwrap();
|
||||
List::new(&conn, "friends", Some(&users[0]), ListType::User).unwrap();
|
||||
List::new(&conn, "idk", None, ListType::Blog).unwrap();
|
||||
|
||||
assert!(Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"my timeline".to_owned(),
|
||||
"blog in friends".to_owned(),
|
||||
)
|
||||
.is_err());
|
||||
assert!(Timeline::new_for_instance(
|
||||
conn,
|
||||
&conn,
|
||||
"my timeline".to_owned(),
|
||||
"not author in idk".to_owned(),
|
||||
)
|
||||
@@ -380,13 +400,12 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_simple_match() {
|
||||
let r = &rockets();
|
||||
let conn = &r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (users, blogs) = blogTests::fill_database(conn);
|
||||
let (users, blogs) = blogTests::fill_database(&conn);
|
||||
|
||||
let gnu_tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"GNU timeline".to_owned(),
|
||||
"license in [AGPL, LGPL, GPL]".to_owned(),
|
||||
@@ -394,7 +413,7 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
let gnu_post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "slug".to_string(),
|
||||
@@ -408,13 +427,12 @@ mod tests {
|
||||
source: "you must say GNU/Linux, not Linux!!!".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
assert!(gnu_tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
assert!(gnu_tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
|
||||
let non_free_post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "slug2".to_string(),
|
||||
@@ -428,10 +446,11 @@ mod tests {
|
||||
source: "so is Microsoft".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!gnu_tl.matches(r, &non_free_post, Kind::Original).unwrap());
|
||||
assert!(!gnu_tl
|
||||
.matches(&conn, &non_free_post, Kind::Original)
|
||||
.unwrap());
|
||||
|
||||
Ok(())
|
||||
});
|
||||
@@ -439,12 +458,11 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_complex_match() {
|
||||
let r = &rockets();
|
||||
let conn = &r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (users, blogs) = blogTests::fill_database(conn);
|
||||
let (users, blogs) = blogTests::fill_database(&conn);
|
||||
Follow::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewFollow {
|
||||
follower_id: users[0].id,
|
||||
following_id: users[1].id,
|
||||
@@ -454,11 +472,11 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
let fav_blogs_list =
|
||||
List::new(conn, "fav_blogs", Some(&users[0]), ListType::Blog).unwrap();
|
||||
fav_blogs_list.add_blogs(conn, &[blogs[0].id]).unwrap();
|
||||
List::new(&conn, "fav_blogs", Some(&users[0]), ListType::Blog).unwrap();
|
||||
fav_blogs_list.add_blogs(&conn, &[blogs[0].id]).unwrap();
|
||||
|
||||
let my_tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"My timeline".to_owned(),
|
||||
"blog in fav_blogs and not has_cover or local and followed exclude likes"
|
||||
@@ -467,7 +485,7 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
let post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "about-linux".to_string(),
|
||||
@@ -481,13 +499,12 @@ mod tests {
|
||||
subtitle: "".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
assert!(my_tl.matches(r, &post, Kind::Original).unwrap()); // matches because of "blog in fav_blogs" (and there is no cover)
|
||||
assert!(my_tl.matches(&conn, &post, Kind::Original).unwrap()); // matches because of "blog in fav_blogs" (and there is no cover)
|
||||
|
||||
let post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[1].id,
|
||||
slug: "about-linux-2".to_string(),
|
||||
@@ -503,10 +520,9 @@ mod tests {
|
||||
subtitle: "".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!my_tl.matches(r, &post, Kind::Like(&users[1])).unwrap());
|
||||
assert!(!my_tl.matches(&conn, &post, Kind::Like(&users[1])).unwrap());
|
||||
|
||||
Ok(())
|
||||
});
|
||||
@@ -514,20 +530,19 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_add_to_all_timelines() {
|
||||
let r = &rockets();
|
||||
let conn = &r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (users, blogs) = blogTests::fill_database(conn);
|
||||
let (users, blogs) = blogTests::fill_database(&conn);
|
||||
|
||||
let gnu_tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"GNU timeline".to_owned(),
|
||||
"license in [AGPL, LGPL, GPL]".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
let non_gnu_tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"Stallman disapproved timeline".to_owned(),
|
||||
"not license in [AGPL, LGPL, GPL]".to_owned(),
|
||||
@@ -535,7 +550,7 @@ mod tests {
|
||||
.unwrap();
|
||||
|
||||
let gnu_post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "slug".to_string(),
|
||||
@@ -549,12 +564,11 @@ mod tests {
|
||||
source: "you must say GNU/Linux, not Linux!!!".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let non_free_post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "slug2".to_string(),
|
||||
@@ -568,17 +582,16 @@ mod tests {
|
||||
source: "so is Microsoft".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
Timeline::add_to_all_timelines(r, &gnu_post, Kind::Original).unwrap();
|
||||
Timeline::add_to_all_timelines(r, &non_free_post, Kind::Original).unwrap();
|
||||
Timeline::add_to_all_timelines(&conn, &gnu_post, Kind::Original).unwrap();
|
||||
Timeline::add_to_all_timelines(&conn, &non_free_post, Kind::Original).unwrap();
|
||||
|
||||
let res = gnu_tl.get_latest(conn, 2).unwrap();
|
||||
let res = gnu_tl.get_latest(&conn, 2).unwrap();
|
||||
assert_eq!(res.len(), 1);
|
||||
assert_eq!(res[0].id, gnu_post.id);
|
||||
let res = non_gnu_tl.get_latest(conn, 2).unwrap();
|
||||
let res = non_gnu_tl.get_latest(&conn, 2).unwrap();
|
||||
assert_eq!(res.len(), 1);
|
||||
assert_eq!(res[0].id, non_free_post.id);
|
||||
|
||||
@@ -588,13 +601,12 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_matches_lists_direct() {
|
||||
let r = &rockets();
|
||||
let conn = &r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (users, blogs) = blogTests::fill_database(conn);
|
||||
let (users, blogs) = blogTests::fill_database(&conn);
|
||||
|
||||
let gnu_post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "slug".to_string(),
|
||||
@@ -608,65 +620,66 @@ mod tests {
|
||||
source: "you must say GNU/Linux, not Linux!!!".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
gnu_post
|
||||
.update_tags(conn, vec![Tag::build_activity("free".to_owned()).unwrap()])
|
||||
.update_tags(&conn, vec![Tag::build_activity("free".to_owned()).unwrap()])
|
||||
.unwrap();
|
||||
PostAuthor::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPostAuthor {
|
||||
post_id: gnu_post.id,
|
||||
author_id: blogs[0].list_authors(conn).unwrap()[0].id,
|
||||
author_id: blogs[0].list_authors(&conn).unwrap()[0].id,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"blog timeline".to_owned(),
|
||||
format!("blog in [{}]", blogs[0].fqn),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"blog timeline".to_owned(),
|
||||
"blog in [no_one@nowhere]".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"author timeline".to_owned(),
|
||||
format!(
|
||||
"author in [{}]",
|
||||
blogs[0].list_authors(conn).unwrap()[0].fqn
|
||||
blogs[0].list_authors(&conn).unwrap()[0].fqn
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"author timeline".to_owned(),
|
||||
format!("author in [{}]", users[2].fqn),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Reshare(&users[2])).unwrap());
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Like(&users[2])).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
assert!(tl
|
||||
.matches(&conn, &gnu_post, Kind::Reshare(&users[2]))
|
||||
.unwrap());
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Like(&users[2])).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"author timeline".to_owned(),
|
||||
format!(
|
||||
@@ -675,48 +688,50 @@ mod tests {
|
||||
),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Reshare(&users[2])).unwrap());
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Like(&users[2])).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
assert!(!tl
|
||||
.matches(&conn, &gnu_post, Kind::Reshare(&users[2]))
|
||||
.unwrap());
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Like(&users[2])).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"tag timeline".to_owned(),
|
||||
"tags in [free]".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"tag timeline".to_owned(),
|
||||
"tags in [private]".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"english timeline".to_owned(),
|
||||
"lang in [en]".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"franco-italian timeline".to_owned(),
|
||||
"lang in [fr, it]".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
|
||||
Ok(())
|
||||
});
|
||||
@@ -726,12 +741,12 @@ mod tests {
|
||||
#[test]
|
||||
fn test_matches_lists_saved() {
|
||||
let r = &rockets();
|
||||
let conn = &r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (users, blogs) = blogTests::fill_database(conn);
|
||||
let (users, blogs) = blogTests::fill_database(&conn);
|
||||
|
||||
let gnu_post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "slug".to_string(),
|
||||
@@ -745,11 +760,10 @@ mod tests {
|
||||
source: "you must say GNU/Linux, not Linux!!!".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
gnu_post.update_tags(conn, vec![Tag::build_activity("free".to_owned()).unwrap()]).unwrap();
|
||||
PostAuthor::insert(conn, NewPostAuthor {post_id: gnu_post.id, author_id: blogs[0].list_authors(conn).unwrap()[0].id}).unwrap();
|
||||
gnu_post.update_tags(&conn, vec![Tag::build_activity("free".to_owned()).unwrap()]).unwrap();
|
||||
PostAuthor::insert(&conn, NewPostAuthor {post_id: gnu_post.id, author_id: blogs[0].list_authors(&conn).unwrap()[0].id}).unwrap();
|
||||
|
||||
unimplemented!();
|
||||
|
||||
@@ -759,13 +773,12 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_matches_keyword() {
|
||||
let r = &rockets();
|
||||
let conn = &r.conn;
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let (users, blogs) = blogTests::fill_database(conn);
|
||||
let (users, blogs) = blogTests::fill_database(&conn);
|
||||
|
||||
let gnu_post = Post::insert(
|
||||
conn,
|
||||
&conn,
|
||||
NewPost {
|
||||
blog_id: blogs[0].id,
|
||||
slug: "slug".to_string(),
|
||||
@@ -779,66 +792,65 @@ mod tests {
|
||||
source: "you must say GNU/Linux, not Linux!!!".to_string(),
|
||||
cover_id: None,
|
||||
},
|
||||
&r.searcher,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"Linux title".to_owned(),
|
||||
"title contains Linux".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"Microsoft title".to_owned(),
|
||||
"title contains Microsoft".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"Linux subtitle".to_owned(),
|
||||
"subtitle contains Stallman".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"Microsoft subtitle".to_owned(),
|
||||
"subtitle contains Nadella".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"Linux content".to_owned(),
|
||||
"content contains Linux".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
let tl = Timeline::new_for_user(
|
||||
conn,
|
||||
&conn,
|
||||
users[0].id,
|
||||
"Microsoft content".to_owned(),
|
||||
"subtitle contains Windows".to_owned(),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(!tl.matches(r, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(conn).unwrap();
|
||||
assert!(!tl.matches(&conn, &gnu_post, Kind::Original).unwrap());
|
||||
tl.delete(&conn).unwrap();
|
||||
|
||||
Ok(())
|
||||
});
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
use crate::{
|
||||
blogs::Blog,
|
||||
db_conn::DbConn,
|
||||
lists::{self, ListType},
|
||||
posts::Post,
|
||||
tags::Tag,
|
||||
timeline::Timeline,
|
||||
users::User,
|
||||
PlumeRocket, Result,
|
||||
Result,
|
||||
};
|
||||
use plume_common::activity_pub::inbox::AsActor;
|
||||
use whatlang::{self, Lang};
|
||||
@@ -160,19 +161,19 @@ enum TQ<'a> {
|
||||
impl<'a> TQ<'a> {
|
||||
fn matches(
|
||||
&self,
|
||||
rocket: &PlumeRocket,
|
||||
conn: &DbConn,
|
||||
timeline: &Timeline,
|
||||
post: &Post,
|
||||
kind: Kind<'_>,
|
||||
) -> Result<bool> {
|
||||
match self {
|
||||
TQ::Or(inner) => inner.iter().try_fold(false, |s, e| {
|
||||
e.matches(rocket, timeline, post, kind).map(|r| s || r)
|
||||
e.matches(conn, timeline, post, kind).map(|r| s || r)
|
||||
}),
|
||||
TQ::And(inner) => inner.iter().try_fold(true, |s, e| {
|
||||
e.matches(rocket, timeline, post, kind).map(|r| s && r)
|
||||
e.matches(conn, timeline, post, kind).map(|r| s && r)
|
||||
}),
|
||||
TQ::Arg(inner, invert) => Ok(inner.matches(rocket, timeline, post, kind)? ^ invert),
|
||||
TQ::Arg(inner, invert) => Ok(inner.matches(conn, timeline, post, kind)? ^ invert),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,15 +206,15 @@ enum Arg<'a> {
|
||||
impl<'a> Arg<'a> {
|
||||
pub fn matches(
|
||||
&self,
|
||||
rocket: &PlumeRocket,
|
||||
conn: &DbConn,
|
||||
timeline: &Timeline,
|
||||
post: &Post,
|
||||
kind: Kind<'_>,
|
||||
) -> Result<bool> {
|
||||
match self {
|
||||
Arg::In(t, l) => t.matches(rocket, timeline, post, l, kind),
|
||||
Arg::In(t, l) => t.matches(conn, timeline, post, l, kind),
|
||||
Arg::Contains(t, v) => t.matches(post, v),
|
||||
Arg::Boolean(t) => t.matches(rocket, timeline, post, kind),
|
||||
Arg::Boolean(t) => t.matches(conn, timeline, post, kind),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,7 +231,7 @@ enum WithList {
|
||||
impl WithList {
|
||||
pub fn matches(
|
||||
&self,
|
||||
rocket: &PlumeRocket,
|
||||
conn: &DbConn,
|
||||
timeline: &Timeline,
|
||||
post: &Post,
|
||||
list: &List<'_>,
|
||||
@@ -238,39 +239,34 @@ impl WithList {
|
||||
) -> Result<bool> {
|
||||
match list {
|
||||
List::List(name) => {
|
||||
let list =
|
||||
lists::List::find_for_user_by_name(&rocket.conn, timeline.user_id, &name)?;
|
||||
let list = lists::List::find_for_user_by_name(conn, timeline.user_id, &name)?;
|
||||
match (self, list.kind()) {
|
||||
(WithList::Blog, ListType::Blog) => {
|
||||
list.contains_blog(&rocket.conn, post.blog_id)
|
||||
}
|
||||
(WithList::Blog, ListType::Blog) => list.contains_blog(conn, post.blog_id),
|
||||
(WithList::Author { boosts, likes }, ListType::User) => match kind {
|
||||
Kind::Original => Ok(list
|
||||
.list_users(&rocket.conn)?
|
||||
.list_users(conn)?
|
||||
.iter()
|
||||
.any(|a| post.is_author(&rocket.conn, a.id).unwrap_or(false))),
|
||||
.any(|a| post.is_author(conn, a.id).unwrap_or(false))),
|
||||
Kind::Reshare(u) => {
|
||||
if *boosts {
|
||||
list.contains_user(&rocket.conn, u.id)
|
||||
list.contains_user(conn, u.id)
|
||||
} else {
|
||||
Ok(false)
|
||||
}
|
||||
}
|
||||
Kind::Like(u) => {
|
||||
if *likes {
|
||||
list.contains_user(&rocket.conn, u.id)
|
||||
list.contains_user(conn, u.id)
|
||||
} else {
|
||||
Ok(false)
|
||||
}
|
||||
}
|
||||
},
|
||||
(WithList::License, ListType::Word) => {
|
||||
list.contains_word(&rocket.conn, &post.license)
|
||||
}
|
||||
(WithList::License, ListType::Word) => list.contains_word(conn, &post.license),
|
||||
(WithList::Tags, ListType::Word) => {
|
||||
let tags = Tag::for_post(&rocket.conn, post.id)?;
|
||||
let tags = Tag::for_post(conn, post.id)?;
|
||||
Ok(list
|
||||
.list_words(&rocket.conn)?
|
||||
.list_words(conn)?
|
||||
.iter()
|
||||
.any(|s| tags.iter().any(|t| s == &t.tag)))
|
||||
}
|
||||
@@ -285,7 +281,7 @@ impl WithList {
|
||||
})
|
||||
.unwrap_or(Lang::Eng)
|
||||
.name();
|
||||
list.contains_prefix(&rocket.conn, lang)
|
||||
list.contains_prefix(conn, lang)
|
||||
}
|
||||
(_, _) => Err(QueryError::RuntimeError(format!(
|
||||
"The list '{}' is of the wrong type for this usage",
|
||||
@@ -297,13 +293,13 @@ impl WithList {
|
||||
List::Array(list) => match self {
|
||||
WithList::Blog => Ok(list
|
||||
.iter()
|
||||
.filter_map(|b| Blog::find_by_fqn(rocket, b).ok())
|
||||
.filter_map(|b| Blog::find_by_fqn(conn, b).ok())
|
||||
.any(|b| b.id == post.blog_id)),
|
||||
WithList::Author { boosts, likes } => match kind {
|
||||
Kind::Original => Ok(list
|
||||
.iter()
|
||||
.filter_map(|a| User::find_by_fqn(rocket, a).ok())
|
||||
.any(|a| post.is_author(&rocket.conn, a.id).unwrap_or(false))),
|
||||
.filter_map(|a| User::find_by_fqn(&*conn, a).ok())
|
||||
.any(|a| post.is_author(conn, a.id).unwrap_or(false))),
|
||||
Kind::Reshare(u) => {
|
||||
if *boosts {
|
||||
Ok(list.iter().any(|user| &u.fqn == user))
|
||||
@@ -321,7 +317,7 @@ impl WithList {
|
||||
},
|
||||
WithList::License => Ok(list.iter().any(|s| s == &post.license)),
|
||||
WithList::Tags => {
|
||||
let tags = Tag::for_post(&rocket.conn, post.id)?;
|
||||
let tags = Tag::for_post(conn, post.id)?;
|
||||
Ok(list.iter().any(|s| tags.iter().any(|t| s == &t.tag)))
|
||||
}
|
||||
WithList::Lang => {
|
||||
@@ -371,7 +367,7 @@ enum Bool {
|
||||
impl Bool {
|
||||
pub fn matches(
|
||||
&self,
|
||||
rocket: &PlumeRocket,
|
||||
conn: &DbConn,
|
||||
timeline: &Timeline,
|
||||
post: &Post,
|
||||
kind: Kind<'_>,
|
||||
@@ -384,21 +380,19 @@ impl Bool {
|
||||
let user = timeline.user_id.unwrap();
|
||||
match kind {
|
||||
Kind::Original => post
|
||||
.get_authors(&rocket.conn)?
|
||||
.get_authors(conn)?
|
||||
.iter()
|
||||
.try_fold(false, |s, a| {
|
||||
a.is_followed_by(&rocket.conn, user).map(|r| s || r)
|
||||
}),
|
||||
.try_fold(false, |s, a| a.is_followed_by(conn, user).map(|r| s || r)),
|
||||
Kind::Reshare(u) => {
|
||||
if *boosts {
|
||||
u.is_followed_by(&rocket.conn, user)
|
||||
u.is_followed_by(conn, user)
|
||||
} else {
|
||||
Ok(false)
|
||||
}
|
||||
}
|
||||
Kind::Like(u) => {
|
||||
if *likes {
|
||||
u.is_followed_by(&rocket.conn, user)
|
||||
u.is_followed_by(conn, user)
|
||||
} else {
|
||||
Ok(false)
|
||||
}
|
||||
@@ -406,7 +400,7 @@ impl Bool {
|
||||
}
|
||||
}
|
||||
Bool::HasCover => Ok(post.cover_id.is_some()),
|
||||
Bool::Local => Ok(post.get_blog(&rocket.conn)?.is_local() && kind == Kind::Original),
|
||||
Bool::Local => Ok(post.get_blog(conn)?.is_local() && kind == Kind::Original),
|
||||
Bool::All => Ok(kind == Kind::Original),
|
||||
}
|
||||
}
|
||||
@@ -607,11 +601,10 @@ fn parse_l<'a, 'b>(stream: &'b [Token<'a>]) -> QueryResult<(&'b [Token<'a>], Lis
|
||||
}
|
||||
|
||||
fn parse_m<'a, 'b>(mut stream: &'b [Token<'a>]) -> QueryResult<(&'b [Token<'a>], Vec<&'a str>)> {
|
||||
let mut res: Vec<&str> = Vec::new();
|
||||
res.push(match stream.get(0)? {
|
||||
let mut res: Vec<&str> = vec![match stream.get(0)? {
|
||||
Token::Word(_, _, w) => w,
|
||||
t => return t.get_error(Token::Word(0, 0, "any word")),
|
||||
});
|
||||
}];
|
||||
stream = &stream[1..];
|
||||
while let Token::Comma(_) = stream[0] {
|
||||
res.push(match stream.get(1)? {
|
||||
@@ -642,12 +635,12 @@ impl<'a> TimelineQuery<'a> {
|
||||
|
||||
pub fn matches(
|
||||
&self,
|
||||
rocket: &PlumeRocket,
|
||||
conn: &DbConn,
|
||||
timeline: &Timeline,
|
||||
post: &Post,
|
||||
kind: Kind<'_>,
|
||||
) -> Result<bool> {
|
||||
self.0.matches(rocket, timeline, post, kind)
|
||||
self.0.matches(conn, timeline, post, kind)
|
||||
}
|
||||
|
||||
pub fn list_used_lists(&self) -> Vec<(String, ListType)> {
|
||||
|
||||
+119
-87
@@ -1,8 +1,8 @@
|
||||
use crate::{
|
||||
ap_url, blocklisted_emails::BlocklistedEmail, blogs::Blog, config::CONFIG, db_conn::DbConn,
|
||||
follows::Follow, instance::*, medias::Media, notifications::Notification,
|
||||
post_authors::PostAuthor, posts::Post, safe_string::SafeString, schema::users,
|
||||
search::Searcher, timeline::Timeline, Connection, Error, PlumeRocket, Result, ITEMS_PER_PAGE,
|
||||
ap_url, blocklisted_emails::BlocklistedEmail, blogs::Blog, db_conn::DbConn, follows::Follow,
|
||||
instance::*, medias::Media, notifications::Notification, post_authors::PostAuthor, posts::Post,
|
||||
safe_string::SafeString, schema::users, timeline::Timeline, Connection, Error, Result,
|
||||
UserEvent::*, CONFIG, ITEMS_PER_PAGE, USER_CHAN,
|
||||
};
|
||||
use activitypub::{
|
||||
activity::Delete,
|
||||
@@ -11,7 +11,6 @@ use activitypub::{
|
||||
object::{Image, Tombstone},
|
||||
Activity, CustomObject, Endpoint,
|
||||
};
|
||||
use bcrypt;
|
||||
use chrono::{NaiveDateTime, Utc};
|
||||
use diesel::{self, BelongingToDsl, ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl};
|
||||
use ldap3::{LdapConn, Scope, SearchEntry};
|
||||
@@ -25,7 +24,7 @@ use plume_common::{
|
||||
activity_pub::{
|
||||
ap_accept_header,
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
sign::{gen_keypair, Signer},
|
||||
sign::{gen_keypair, Error as SignatureError, Result as SignatureResult, Signer},
|
||||
ActivityStream, ApSignature, Id, IntoId, PublicKey, PUBLIC_VISIBILITY,
|
||||
},
|
||||
utils,
|
||||
@@ -34,14 +33,15 @@ use reqwest::{
|
||||
header::{HeaderValue, ACCEPT},
|
||||
ClientBuilder,
|
||||
};
|
||||
use riker::actors::{Publish, Tell};
|
||||
use rocket::{
|
||||
outcome::IntoOutcome,
|
||||
request::{self, FromRequest, Request},
|
||||
};
|
||||
use serde_json;
|
||||
use std::{
|
||||
cmp::PartialEq,
|
||||
hash::{Hash, Hasher},
|
||||
sync::Arc,
|
||||
};
|
||||
use url::Url;
|
||||
use webfinger::*;
|
||||
@@ -131,14 +131,14 @@ impl User {
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn delete(&self, conn: &Connection, searcher: &Searcher) -> Result<()> {
|
||||
pub fn delete(&self, conn: &Connection) -> Result<()> {
|
||||
use crate::schema::post_authors;
|
||||
|
||||
for blog in Blog::find_for_author(conn, self)?
|
||||
.iter()
|
||||
.filter(|b| b.count_authors(conn).map(|c| c <= 1).unwrap_or(false))
|
||||
{
|
||||
blog.delete(conn, searcher)?;
|
||||
blog.delete(conn)?;
|
||||
}
|
||||
// delete the posts if they is the only author
|
||||
let all_their_posts_ids: Vec<i32> = post_authors::table
|
||||
@@ -158,7 +158,7 @@ impl User {
|
||||
.unwrap_or(&0)
|
||||
> &0;
|
||||
if !has_other_authors {
|
||||
Post::get(conn, post_id)?.delete(conn, searcher)?;
|
||||
Post::get(conn, post_id)?.delete(conn)?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,29 +188,36 @@ impl User {
|
||||
users::table
|
||||
.filter(users::instance_id.eq(Instance::get_local()?.id))
|
||||
.count()
|
||||
.get_result(conn)
|
||||
.get_result(&*conn)
|
||||
.map_err(Error::from)
|
||||
}
|
||||
|
||||
pub fn find_by_fqn(c: &PlumeRocket, fqn: &str) -> Result<User> {
|
||||
pub fn find_by_fqn(conn: &DbConn, fqn: &str) -> Result<User> {
|
||||
let from_db = users::table
|
||||
.filter(users::fqn.eq(fqn))
|
||||
.first(&*c.conn)
|
||||
.first(&**conn)
|
||||
.optional()?;
|
||||
if let Some(from_db) = from_db {
|
||||
Ok(from_db)
|
||||
} else {
|
||||
User::fetch_from_webfinger(c, fqn)
|
||||
User::fetch_from_webfinger(conn, fqn)
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch_from_webfinger(c: &PlumeRocket, acct: &str) -> Result<User> {
|
||||
fn fetch_from_webfinger(conn: &DbConn, acct: &str) -> Result<User> {
|
||||
let link = resolve(acct.to_owned(), true)?
|
||||
.links
|
||||
.into_iter()
|
||||
.find(|l| l.mime_type == Some(String::from("application/activity+json")))
|
||||
.ok_or(Error::Webfinger)?;
|
||||
User::from_id(c, link.href.as_ref()?, None).map_err(|(_, e)| e)
|
||||
User::from_id(
|
||||
conn,
|
||||
&Instance::get_local().expect("Failed to get local instance"),
|
||||
link.href.as_ref()?,
|
||||
None,
|
||||
CONFIG.proxy(),
|
||||
)
|
||||
.map_err(|(_, e)| e)
|
||||
}
|
||||
|
||||
pub fn fetch_remote_interact_uri(acct: &str) -> Result<String> {
|
||||
@@ -245,8 +252,8 @@ impl User {
|
||||
Ok(json)
|
||||
}
|
||||
|
||||
pub fn fetch_from_url(c: &PlumeRocket, url: &str) -> Result<User> {
|
||||
User::fetch(url).and_then(|json| User::from_activity(c, json))
|
||||
pub fn fetch_from_url(conn: &DbConn, url: &str) -> Result<User> {
|
||||
User::fetch(url).and_then(|json| User::from_activity(conn, json))
|
||||
}
|
||||
|
||||
pub fn refetch(&self, conn: &Connection) -> Result<()> {
|
||||
@@ -486,10 +493,7 @@ impl User {
|
||||
.filter_map(|j| serde_json::from_value(j.clone()).ok())
|
||||
.collect::<Vec<T>>();
|
||||
|
||||
let next = match json.get("next") {
|
||||
Some(x) => Some(x.as_str().unwrap().to_owned()),
|
||||
None => None,
|
||||
};
|
||||
let next = json.get("next").map(|x| x.as_str().unwrap().to_owned());
|
||||
Ok((items, next))
|
||||
}
|
||||
pub fn fetch_outbox<T: Activity>(&self) -> Result<Vec<T>> {
|
||||
@@ -832,11 +836,7 @@ impl User {
|
||||
|
||||
pub fn webfinger(&self, conn: &Connection) -> Result<Webfinger> {
|
||||
Ok(Webfinger {
|
||||
subject: format!(
|
||||
"acct:{}@{}",
|
||||
self.username,
|
||||
self.get_instance(conn)?.public_domain
|
||||
),
|
||||
subject: format!("acct:{}", self.acct_authority(conn)?),
|
||||
aliases: vec![self.ap_url.clone()],
|
||||
links: vec![
|
||||
Link {
|
||||
@@ -874,6 +874,14 @@ impl User {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn acct_authority(&self, conn: &Connection) -> Result<String> {
|
||||
Ok(format!(
|
||||
"{}@{}",
|
||||
self.username,
|
||||
self.get_instance(conn)?.public_domain
|
||||
))
|
||||
}
|
||||
|
||||
pub fn set_avatar(&self, conn: &Connection, id: i32) -> Result<()> {
|
||||
diesel::update(self)
|
||||
.set(users::avatar_id.eq(id))
|
||||
@@ -893,6 +901,21 @@ impl User {
|
||||
self.fqn.clone()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remote_user_found(&self) {
|
||||
tracing::trace!("{:?}", self);
|
||||
self.publish_remote_user_found();
|
||||
}
|
||||
|
||||
fn publish_remote_user_found(&self) {
|
||||
USER_CHAN.tell(
|
||||
Publish {
|
||||
msg: RemoteUserFound(Arc::new(self.clone())),
|
||||
topic: "user.remote_user_found".into(),
|
||||
},
|
||||
None,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'r> FromRequest<'a, 'r> for User {
|
||||
@@ -917,20 +940,20 @@ impl IntoId for User {
|
||||
|
||||
impl Eq for User {}
|
||||
|
||||
impl FromId<PlumeRocket> for User {
|
||||
impl FromId<DbConn> for User {
|
||||
type Error = Error;
|
||||
type Object = CustomPerson;
|
||||
|
||||
fn from_db(c: &PlumeRocket, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(&c.conn, id)
|
||||
fn from_db(conn: &DbConn, id: &str) -> Result<Self> {
|
||||
Self::find_by_ap_url(conn, id)
|
||||
}
|
||||
|
||||
fn from_activity(c: &PlumeRocket, acct: CustomPerson) -> Result<Self> {
|
||||
fn from_activity(conn: &DbConn, acct: CustomPerson) -> Result<Self> {
|
||||
let url = Url::parse(&acct.object.object_props.id_string()?)?;
|
||||
let inst = url.host_str()?;
|
||||
let instance = Instance::find_by_domain(&c.conn, inst).or_else(|_| {
|
||||
let instance = Instance::find_by_domain(conn, inst).or_else(|_| {
|
||||
Instance::insert(
|
||||
&c.conn,
|
||||
conn,
|
||||
NewInstance {
|
||||
name: inst.to_owned(),
|
||||
public_domain: inst.to_owned(),
|
||||
@@ -942,6 +965,8 @@ impl FromId<PlumeRocket> for User {
|
||||
open_registrations: true,
|
||||
short_description_html: String::new(),
|
||||
long_description_html: String::new(),
|
||||
private_key: None,
|
||||
public_key: None,
|
||||
},
|
||||
)
|
||||
})?;
|
||||
@@ -959,7 +984,7 @@ impl FromId<PlumeRocket> for User {
|
||||
};
|
||||
|
||||
let user = User::insert(
|
||||
&c.conn,
|
||||
conn,
|
||||
NewUser {
|
||||
display_name: acct
|
||||
.object
|
||||
@@ -1005,10 +1030,10 @@ impl FromId<PlumeRocket> for User {
|
||||
|
||||
if let Ok(icon) = acct.object.object_props.icon_image() {
|
||||
if let Ok(url) = icon.object_props.url_string() {
|
||||
let avatar = Media::save_remote(&c.conn, url, &user);
|
||||
let avatar = Media::save_remote(conn, url, &user);
|
||||
|
||||
if let Ok(avatar) = avatar {
|
||||
user.set_avatar(&c.conn, avatar.id)?;
|
||||
user.set_avatar(conn, avatar.id)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1017,7 +1042,7 @@ impl FromId<PlumeRocket> for User {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsActor<&PlumeRocket> for User {
|
||||
impl AsActor<&DbConn> for User {
|
||||
fn get_inbox_url(&self) -> String {
|
||||
self.inbox_url.clone()
|
||||
}
|
||||
@@ -1033,13 +1058,13 @@ impl AsActor<&PlumeRocket> for User {
|
||||
}
|
||||
}
|
||||
|
||||
impl AsObject<User, Delete, &PlumeRocket> for User {
|
||||
impl AsObject<User, Delete, &DbConn> for User {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
fn activity(self, c: &PlumeRocket, actor: User, _id: &str) -> Result<()> {
|
||||
fn activity(self, conn: &DbConn, actor: User, _id: &str) -> Result<()> {
|
||||
if self.id == actor.id {
|
||||
self.delete(&c.conn, &c.searcher).map(|_| ())
|
||||
self.delete(conn).map(|_| ())
|
||||
} else {
|
||||
Err(Error::Unauthorized)
|
||||
}
|
||||
@@ -1047,24 +1072,22 @@ impl AsObject<User, Delete, &PlumeRocket> for User {
|
||||
}
|
||||
|
||||
impl Signer for User {
|
||||
type Error = Error;
|
||||
|
||||
fn get_key_id(&self) -> String {
|
||||
format!("{}#main-key", self.ap_url)
|
||||
}
|
||||
|
||||
fn sign(&self, to_sign: &str) -> Result<Vec<u8>> {
|
||||
fn sign(&self, to_sign: &str) -> SignatureResult<Vec<u8>> {
|
||||
let key = self.get_keypair()?;
|
||||
let mut signer = sign::Signer::new(MessageDigest::sha256(), &key)?;
|
||||
signer.update(to_sign.as_bytes())?;
|
||||
signer.sign_to_vec().map_err(Error::from)
|
||||
signer.sign_to_vec().map_err(SignatureError::from)
|
||||
}
|
||||
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> Result<bool> {
|
||||
fn verify(&self, data: &str, signature: &[u8]) -> SignatureResult<bool> {
|
||||
let key = PKey::from_rsa(Rsa::public_key_from_pem(self.public_key.as_ref())?)?;
|
||||
let mut verifier = sign::Verifier::new(MessageDigest::sha256(), &key)?;
|
||||
verifier.update(data.as_bytes())?;
|
||||
verifier.verify(&signature).map_err(Error::from)
|
||||
verifier.verify(&signature).map_err(SignatureError::from)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1128,14 +1151,27 @@ impl NewUser {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum UserEvent {
|
||||
RemoteUserFound(Arc<User>),
|
||||
}
|
||||
|
||||
impl From<UserEvent> for Arc<User> {
|
||||
fn from(event: UserEvent) -> Self {
|
||||
use UserEvent::*;
|
||||
|
||||
match event {
|
||||
RemoteUserFound(user) => user,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
use crate::{
|
||||
config::CONFIG,
|
||||
instance::{tests as instance_tests, Instance},
|
||||
search::tests::get_searcher,
|
||||
tests::{db, rockets},
|
||||
tests::db,
|
||||
Connection as Conn,
|
||||
};
|
||||
use diesel::Connection;
|
||||
@@ -1177,12 +1213,11 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn find_by() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
fill_database(conn);
|
||||
fill_database(&conn);
|
||||
let test_user = NewUser::new_local(
|
||||
conn,
|
||||
&conn,
|
||||
"test".to_owned(),
|
||||
"test user".to_owned(),
|
||||
Role::Normal,
|
||||
@@ -1193,22 +1228,22 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
test_user.id,
|
||||
User::find_by_name(conn, "test", Instance::get_local().unwrap().id)
|
||||
User::find_by_name(&conn, "test", Instance::get_local().unwrap().id)
|
||||
.unwrap()
|
||||
.id
|
||||
);
|
||||
assert_eq!(
|
||||
test_user.id,
|
||||
User::find_by_fqn(&r, &test_user.fqn).unwrap().id
|
||||
User::find_by_fqn(&conn, &test_user.fqn).unwrap().id
|
||||
);
|
||||
assert_eq!(
|
||||
test_user.id,
|
||||
User::find_by_email(conn, "test@example.com").unwrap().id
|
||||
User::find_by_email(&conn, "test@example.com").unwrap().id
|
||||
);
|
||||
assert_eq!(
|
||||
test_user.id,
|
||||
User::find_by_ap_url(
|
||||
conn,
|
||||
&conn,
|
||||
&format!(
|
||||
"https://{}/@/{}/",
|
||||
Instance::get_local().unwrap().public_domain,
|
||||
@@ -1226,13 +1261,11 @@ pub(crate) mod tests {
|
||||
fn delete() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let inserted = fill_database(conn);
|
||||
let inserted = fill_database(&conn);
|
||||
|
||||
assert!(User::get(conn, inserted[0].id).is_ok());
|
||||
inserted[0]
|
||||
.delete(conn, &get_searcher(&CONFIG.search_tokenizers))
|
||||
.unwrap();
|
||||
assert!(User::get(conn, inserted[0].id).is_err());
|
||||
assert!(User::get(&conn, inserted[0].id).is_ok());
|
||||
inserted[0].delete(&conn).unwrap();
|
||||
assert!(User::get(&conn, inserted[0].id).is_err());
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
@@ -1241,20 +1274,20 @@ pub(crate) mod tests {
|
||||
fn admin() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let inserted = fill_database(conn);
|
||||
let inserted = fill_database(&conn);
|
||||
let local_inst = Instance::get_local().unwrap();
|
||||
let mut i = 0;
|
||||
while local_inst.has_admin(conn).unwrap() {
|
||||
while local_inst.has_admin(&conn).unwrap() {
|
||||
assert!(i < 100); //prevent from looping indefinitelly
|
||||
local_inst
|
||||
.main_admin(conn)
|
||||
.main_admin(&conn)
|
||||
.unwrap()
|
||||
.set_role(conn, Role::Normal)
|
||||
.set_role(&conn, Role::Normal)
|
||||
.unwrap();
|
||||
i += 1;
|
||||
}
|
||||
inserted[0].set_role(conn, Role::Admin).unwrap();
|
||||
assert_eq!(inserted[0].id, local_inst.main_admin(conn).unwrap().id);
|
||||
inserted[0].set_role(&conn, Role::Admin).unwrap();
|
||||
assert_eq!(inserted[0].id, local_inst.main_admin(&conn).unwrap().id);
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
@@ -1263,9 +1296,9 @@ pub(crate) mod tests {
|
||||
fn auth() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
fill_database(conn);
|
||||
fill_database(&conn);
|
||||
let test_user = NewUser::new_local(
|
||||
conn,
|
||||
&conn,
|
||||
"test".to_owned(),
|
||||
"test user".to_owned(),
|
||||
Role::Normal,
|
||||
@@ -1276,10 +1309,10 @@ pub(crate) mod tests {
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(
|
||||
User::login(conn, "test", "test_password").unwrap().id,
|
||||
User::login(&conn, "test", "test_password").unwrap().id,
|
||||
test_user.id
|
||||
);
|
||||
assert!(User::login(conn, "test", "other_password").is_err());
|
||||
assert!(User::login(&conn, "test", "other_password").is_err());
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
@@ -1288,26 +1321,26 @@ pub(crate) mod tests {
|
||||
fn get_local_page() {
|
||||
let conn = &db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
fill_database(conn);
|
||||
fill_database(&conn);
|
||||
|
||||
let page = User::get_local_page(conn, (0, 2)).unwrap();
|
||||
let page = User::get_local_page(&conn, (0, 2)).unwrap();
|
||||
assert_eq!(page.len(), 2);
|
||||
assert!(page[0].username <= page[1].username);
|
||||
|
||||
let mut last_username = User::get_local_page(conn, (0, 1)).unwrap()[0]
|
||||
let mut last_username = User::get_local_page(&conn, (0, 1)).unwrap()[0]
|
||||
.username
|
||||
.clone();
|
||||
for i in 1..User::count_local(conn).unwrap() as i32 {
|
||||
let page = User::get_local_page(conn, (i, i + 1)).unwrap();
|
||||
for i in 1..User::count_local(&conn).unwrap() as i32 {
|
||||
let page = User::get_local_page(&conn, (i, i + 1)).unwrap();
|
||||
assert_eq!(page.len(), 1);
|
||||
assert!(last_username <= page[0].username);
|
||||
last_username = page[0].username.clone();
|
||||
}
|
||||
assert_eq!(
|
||||
User::get_local_page(conn, (0, User::count_local(conn).unwrap() as i32 + 10))
|
||||
User::get_local_page(&conn, (0, User::count_local(&conn).unwrap() as i32 + 10))
|
||||
.unwrap()
|
||||
.len() as i64,
|
||||
User::count_local(conn).unwrap()
|
||||
User::count_local(&conn).unwrap()
|
||||
);
|
||||
Ok(())
|
||||
});
|
||||
@@ -1315,14 +1348,13 @@ pub(crate) mod tests {
|
||||
|
||||
#[test]
|
||||
fn self_federation() {
|
||||
let r = rockets();
|
||||
let conn = &*r.conn;
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, (), _>(|| {
|
||||
let users = fill_database(conn);
|
||||
let users = fill_database(&conn);
|
||||
|
||||
let ap_repr = users[0].to_activity(conn).unwrap();
|
||||
users[0].delete(conn, &*r.searcher).unwrap();
|
||||
let user = User::from_activity(&r, ap_repr).unwrap();
|
||||
let ap_repr = users[0].to_activity(&conn).unwrap();
|
||||
users[0].delete(&conn).unwrap();
|
||||
let user = User::from_activity(&conn, ap_repr).unwrap();
|
||||
|
||||
assert_eq!(user.username, users[0].username);
|
||||
assert_eq!(user.display_name, users[0].display_name);
|
||||
@@ -1333,7 +1365,7 @@ pub(crate) mod tests {
|
||||
assert_eq!(user.public_key, users[0].public_key);
|
||||
assert_eq!(user.shared_inbox_url, users[0].shared_inbox_url);
|
||||
assert_eq!(user.followers_endpoint, users[0].followers_endpoint);
|
||||
assert_eq!(user.avatar_url(conn), users[0].avatar_url(conn));
|
||||
assert_eq!(user.avatar_url(&conn), users[0].avatar_url(&conn));
|
||||
assert_eq!(user.fqn, users[0].fqn);
|
||||
assert_eq!(user.summary_html, users[0].summary_html);
|
||||
Ok(())
|
||||
|
||||
@@ -10,12 +10,17 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=6; plural=(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? 2 : ((n == 3) ? 3 : ((n == 6) ? 4 : 5))));\n"
|
||||
"Plural-Forms: nplurals=6; plural=(n == 0) ? 0 : ((n == 1) ? 1 : ((n == 2) ? "
|
||||
"2 : ((n == 3) ? 3 : ((n == 6) ? 4 : 5))));\n"
|
||||
"X-Generator: crowdin.com\n"
|
||||
"X-Crowdin-Project: plume\n"
|
||||
"X-Crowdin-Language: cy\n"
|
||||
"X-Crowdin-File: /master/po/plume-front/plume-front.pot\n"
|
||||
|
||||
# plume-front/src/editor.rs:189
|
||||
msgid "Do you want to load the local autosave last edited at {}?"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:114
|
||||
msgid "Open the rich text editor"
|
||||
msgstr ""
|
||||
@@ -24,8 +29,8 @@ msgstr ""
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:147
|
||||
msgid "Subtitle or summary"
|
||||
# plume-front/src/editor.rs:319
|
||||
msgid "Subtitle, or summary"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:154
|
||||
@@ -55,4 +60,3 @@ msgstr ""
|
||||
# plume-front/src/editor.rs:259
|
||||
msgid "Publish"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -12,46 +12,46 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
||||
|
||||
# plume-front/src/editor.rs:189
|
||||
# plume-front/src/editor.rs:188
|
||||
msgid "Do you want to load the local autosave last edited at {}?"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:282
|
||||
# plume-front/src/editor.rs:281
|
||||
msgid "Open the rich text editor"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:315
|
||||
# plume-front/src/editor.rs:314
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:319
|
||||
# plume-front/src/editor.rs:318
|
||||
msgid "Subtitle, or summary"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:326
|
||||
# plume-front/src/editor.rs:325
|
||||
msgid "Write your article here. Markdown is supported."
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:337
|
||||
# plume-front/src/editor.rs:336
|
||||
msgid "Around {} characters left"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:414
|
||||
# plume-front/src/editor.rs:413
|
||||
msgid "Tags"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:415
|
||||
# plume-front/src/editor.rs:414
|
||||
msgid "License"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:418
|
||||
# plume-front/src/editor.rs:417
|
||||
msgid "Cover"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:438
|
||||
# plume-front/src/editor.rs:437
|
||||
msgid "This is a draft"
|
||||
msgstr ""
|
||||
|
||||
# plume-front/src/editor.rs:445
|
||||
# plume-front/src/editor.rs:444
|
||||
msgid "Publish"
|
||||
msgstr ""
|
||||
|
||||
+56
-19
@@ -214,11 +214,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +286,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +447,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +479,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +552,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +639,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +662,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +674,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +756,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,7 +816,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -844,7 +875,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +886,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +903,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +966,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1048,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+76
-27
@@ -10,7 +10,8 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
|
||||
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
|
||||
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
|
||||
"X-Crowdin-Project: plume\n"
|
||||
"X-Crowdin-Project-ID: 352097\n"
|
||||
"X-Crowdin-Language: ar\n"
|
||||
@@ -214,11 +215,15 @@ msgid "Your article has been deleted."
|
||||
msgstr "تم حذف مقالك."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr "لم يتم العثور على المقال الذي تحاول حذفه. ربما سبق حذفه؟"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr "تعذر العثور عن معلومات حسابك. المرجو التحقق من صحة إسم المستخدم."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +287,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "التسجيلات مُغلقة على مثيل الخادم هذ."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr "لقد تم إنشاء حسابك. ما عليك إلّا الولوج الآن للتمكّن مِن استعماله."
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,8 +448,11 @@ msgstr "كلمة السر"
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "المعذرة، لاكن التسجيل مغلق في هذا المثيل بالدات. يمكنك إجاد مثيل آخر للتسجيل."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"المعذرة، لاكن التسجيل مغلق في هذا المثيل بالدات. يمكنك إجاد مثيل آخر للتسجيل."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "{0} اشتراكات"
|
||||
@@ -471,8 +481,10 @@ msgstr "تعديل حسابك"
|
||||
msgid "Your Profile"
|
||||
msgstr "ملفك الشخصي"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "لتغير الصورة التشخيصية قم أولا برفعها إلى الألبوم ثم قم بتعينها من هنالك."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"لتغير الصورة التشخيصية قم أولا برفعها إلى الألبوم ثم قم بتعينها من هنالك."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "تحميل صورة رمزية"
|
||||
@@ -543,8 +555,13 @@ msgstr "نعتذر عن الإزعاج. إن كنت تضن أن هذه مشكل
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "الرمز المميز CSRF غير صالح"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "هناكخطأم ما في رمز CSRF. تحقق أن الكوكيز مفعل في متصفحك وأعد تحميل الصفحة. إذا واجهتهذا الخطأ منجديد يرجى التبليغ."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"هناكخطأم ما في رمز CSRF. تحقق أن الكوكيز مفعل في متصفحك وأعد تحميل الصفحة. "
|
||||
"إذا واجهتهذا الخطأ منجديد يرجى التبليغ."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "ليست لديك التصريحات اللازمة للقيام بذلك."
|
||||
@@ -627,13 +644,21 @@ msgstr "الرخصة الافتراضية للمقال"
|
||||
msgid "Save these settings"
|
||||
msgstr "احفظ هذه الإعدادات"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "إذا كنت تصفح هذا الموقع كزائر ، لا يتم تجميع أي بيانات عنك."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +667,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +679,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,8 +761,11 @@ msgstr "العنوان الثانوي"
|
||||
msgid "Content"
|
||||
msgstr "المحتوى"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "يكنك رفع الوسائط للألبوم ومن ثم نسخ شفرة الماركداون في مقالاتك لإدراجها."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"يكنك رفع الوسائط للألبوم ومن ثم نسخ شفرة الماركداون في مقالاتك لإدراجها."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "تحميل وسائط"
|
||||
@@ -795,8 +830,12 @@ msgstr "لم أعد أرغب في دعم هذا"
|
||||
msgid "Boost"
|
||||
msgstr "رقّي"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}قم بتسجيل الدخول{1} أو {2}استخدم حسابك على الفديفرس{3} إن كنت ترغب في التفاعل مع هذا المقال"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}قم بتسجيل الدخول{1} أو {2}استخدم حسابك على الفديفرس{3} إن كنت ترغب في "
|
||||
"التفاعل مع هذا المقال"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "التعليقات"
|
||||
@@ -852,8 +891,12 @@ msgstr "تحديث الكلمة السرية"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "تحقق من علبة الوارد الخاصة بك!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "لقد أرسلنا رسالة للعنوان الذي توصلنا به من طرفك تضمنرابط لإعادت تحديد كلمة المرور."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"لقد أرسلنا رسالة للعنوان الذي توصلنا به من طرفك تضمنرابط لإعادت تحديد كلمة "
|
||||
"المرور."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "أرسل رابط إعادة تعيين الكلمة السرية"
|
||||
@@ -861,7 +904,9 @@ msgstr "أرسل رابط إعادة تعيين الكلمة السرية"
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -876,7 +921,8 @@ msgstr "انشاء مدونة"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "تعديل \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "يمكن رفع الصور إلى ألبومك من أجل إستعمالها كأيقونة المدونة أو الشعار."
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -942,8 +988,12 @@ msgstr "بلوم محرك لامركزي للمدونات."
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "يمكن للمحررين أن يديرو العديد من المدونات كل واحدة كموقع منفرد."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "ستكون المقالات معروضة على مواقع بلومالأخرى حيث يمكنكم التفاعل معها مباشرة عبر أية منصة أخرى مثل ماستدون."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"ستكون المقالات معروضة على مواقع بلومالأخرى حيث يمكنكم التفاعل معها مباشرة "
|
||||
"عبر أية منصة أخرى مثل ماستدون."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "إقرأ القواعد بالتفصيل"
|
||||
@@ -1022,4 +1072,3 @@ msgstr "نشرتحت هذا الترخيص"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "رخصة المقال"
|
||||
|
||||
|
||||
+133
-44
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Статията е изтрита."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Изглежда, че статията, която се опитвате да изтриете не съществува. Може би вече я няма?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Изглежда, че статията, която се опитвате да изтриете не съществува. Може би "
|
||||
"вече я няма?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Не можа да се получи достатъчно информация за профила ви. Моля, уверете се, че потребителското ви име е правилно."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Не можа да се получи достатъчно информация за профила ви. Моля, уверете се, "
|
||||
"че потребителското ви име е правилно."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -247,7 +255,9 @@ msgstr "Вашата парола бе успешно възстановена."
|
||||
|
||||
# src/routes/user.rs:141
|
||||
msgid "To access your dashboard, you need to be logged in"
|
||||
msgstr "За да получите достъп до таблото си за управление, трябва да сте влезли в профила си"
|
||||
msgstr ""
|
||||
"За да получите достъп до таблото си за управление, трябва да сте влезли в "
|
||||
"профила си"
|
||||
|
||||
# src/routes/user.rs:163
|
||||
msgid "You are no longer following {}."
|
||||
@@ -282,8 +292,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Регистрациите са затворени в тази инстанция."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Вашият акаунт беше създаден. Сега просто трябва да влезете за да можете да го използвате."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Вашият акаунт беше създаден. Сега просто трябва да влезете за да можете да "
|
||||
"го използвате."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Качи медия"
|
||||
@@ -441,8 +455,12 @@ msgstr "Парола"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Потвърждение на парола"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Извиняваме се, но регистрациите са затворени за тази конкретна инстанция. Можете обаче да намерите друга."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Извиняваме се, но регистрациите са затворени за тази конкретна инстанция. "
|
||||
"Можете обаче да намерите друга."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "{0} абонаменти"
|
||||
@@ -454,7 +472,9 @@ msgid "Your Blogs"
|
||||
msgstr "Вашият Блог"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Все още нямате блог. Създайте свой собствен или поискайте да се присъедините към някой друг."
|
||||
msgstr ""
|
||||
"Все още нямате блог. Създайте свой собствен или поискайте да се присъедините "
|
||||
"към някой друг."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Започнете нов блог"
|
||||
@@ -471,8 +491,10 @@ msgstr "Редактирайте профила си"
|
||||
msgid "Your Profile"
|
||||
msgstr "Вашият профил"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "За да промените аватара си, качете го в галерията и след това го изберете."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"За да промените аватара си, качете го в галерията и след това го изберете."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Качете аватар"
|
||||
@@ -502,13 +524,17 @@ msgid "Danger zone"
|
||||
msgstr "Опасна зона"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be cancelled."
|
||||
msgstr "Бъдете много внимателни, всяко действие предприето тук не може да бъде отменено."
|
||||
msgstr ""
|
||||
"Бъдете много внимателни, всяко действие предприето тук не може да бъде "
|
||||
"отменено."
|
||||
|
||||
msgid "Delete your account"
|
||||
msgstr "Изтриване на вашият профил"
|
||||
|
||||
msgid "Sorry, but as an admin, you can't leave your own instance."
|
||||
msgstr "За съжаление, като администратор не можете да напуснете своята собствена инстанция."
|
||||
msgstr ""
|
||||
"За съжаление, като администратор не можете да напуснете своята собствена "
|
||||
"инстанция."
|
||||
|
||||
msgid "Latest articles"
|
||||
msgstr "Последни статии"
|
||||
@@ -538,13 +564,20 @@ msgid "Something broke on our side."
|
||||
msgstr "Възникна грешка от ваша страна."
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "Извиняваме се за това. Ако смятате, че това е грешка, моля докладвайте я."
|
||||
msgstr ""
|
||||
"Извиняваме се за това. Ако смятате, че това е грешка, моля докладвайте я."
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Невалиден CSRF token (маркер)"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Нещо не е наред с вашия CSRF token (маркер). Уверете се, че бисквитките са активирани в браузъра и опитайте да заредите отново тази страница. Ако продължите да виждате това съобщение за грешка, моля, подайте сигнал за това."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Нещо не е наред с вашия CSRF token (маркер). Уверете се, че бисквитките са "
|
||||
"активирани в браузъра и опитайте да заредите отново тази страница. Ако "
|
||||
"продължите да виждате това съобщение за грешка, моля, подайте сигнал за това."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Не сте упълномощени."
|
||||
@@ -627,14 +660,29 @@ msgstr "Лиценз по подразбиране"
|
||||
msgid "Save these settings"
|
||||
msgstr "Запаметете тези настройки"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Ако разглеждате този сайт като посетител, не се събират данни за вас."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Като регистриран потребител трябва да предоставите потребителско име (което не е задължително да е вашето истинско име), вашия функционален имейл адрес и парола за да можете да влезете, да напишете статии и коментари. Съдържанието, което изпращате се съхранява докато не го изтриете."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Като регистриран потребител трябва да предоставите потребителско име (което "
|
||||
"не е задължително да е вашето истинско име), вашия функционален имейл адрес "
|
||||
"и парола за да можете да влезете, да напишете статии и коментари. "
|
||||
"Съдържанието, което изпращате се съхранява докато не го изтриете."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Когато влезете в системата, съхраняваме две „бисквитки“, една за отваряне на сесията, а втората за да попречи на други хора да действат от ваше име. Ние не съхраняваме никакви други бисквитки."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Когато влезете в системата, съхраняваме две „бисквитки“, една за отваряне на "
|
||||
"сесията, а втората за да попречи на други хора да действат от ваше име. Ние "
|
||||
"не съхраняваме никакви други бисквитки."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Имейли в череният списък"
|
||||
@@ -642,8 +690,14 @@ msgstr "Имейли в череният списък"
|
||||
msgid "Email address"
|
||||
msgstr "Имейл адрес"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "Имейл адресът, който искате да блокирате. За да блокирате домейните можете да използвате широкообхватен синтаксис, например '*@example.com' блокира всички адреси от example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"Имейл адресът, който искате да блокирате. За да блокирате домейните можете "
|
||||
"да използвате широкообхватен синтаксис, например '*@example.com' блокира "
|
||||
"всички адреси от example.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Бележка"
|
||||
@@ -651,14 +705,22 @@ msgstr "Бележка"
|
||||
msgid "Notify the user?"
|
||||
msgstr "Уведомяване на потребителя?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "По желание, показва съобщение на потребителя, когато той се опита да създаде акаунт с този адрес"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"По желание, показва съобщение на потребителя, когато той се опита да създаде "
|
||||
"акаунт с този адрес"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Известие за блокиране от списък"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "Съобщението, което трябва да се покаже, когато потребителят се опита да създаде акаунт с този имейл адрес"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"Съобщението, което трябва да се покаже, когато потребителят се опита да "
|
||||
"създаде акаунт с този имейл адрес"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Добавяне на адрес в черният списък"
|
||||
@@ -729,8 +791,12 @@ msgstr "Подзаглавие"
|
||||
msgid "Content"
|
||||
msgstr "Съдържание"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Можете да качвате мултимедия в галерията си, а след това да копирате Markdown кода в статиите си за да я вмъкнете."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Можете да качвате мултимедия в галерията си, а след това да копирате "
|
||||
"Markdown кода в статиите си за да я вмъкнете."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Качете медия"
|
||||
@@ -787,8 +853,12 @@ msgstr "Не искам повече да го подсилвам"
|
||||
msgid "Boost"
|
||||
msgstr "Подсилване"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Влезте {1}или {2}използвайте акаунта си в Fediverse{3}, за да взаимодействате с тази статия"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Влезте {1}или {2}използвайте акаунта си в Fediverse{3}, за да "
|
||||
"взаимодействате с тази статия"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Коментари"
|
||||
@@ -806,7 +876,8 @@ msgid "Are you sure?"
|
||||
msgstr "Сигурен ли си?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Тази статия все още е проект. Само вие и другите автори можете да я видите."
|
||||
msgstr ""
|
||||
"Тази статия все още е проект. Само вие и другите автори можете да я видите."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Само вие и другите автори можете да редактирате тази статия."
|
||||
@@ -844,8 +915,12 @@ msgstr "Обнови паролата"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Проверете си пощата!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Изпратихме емайл с връзка за възстановяване на паролата ви, на адреса който ни дадохте."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Изпратихме емайл с връзка за възстановяване на паролата ви, на адреса който "
|
||||
"ни дадохте."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Изпращане на връзка за възстановяване на парола"
|
||||
@@ -853,8 +928,12 @@ msgstr "Изпращане на връзка за възстановяване
|
||||
msgid "This token has expired"
|
||||
msgstr "Този токен е изтекъл"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Моля, стартирайте процеса отново като щракнете <a href=\"/password-reset\">тук</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Моля, стартирайте процеса отново като щракнете <a href=\"/password-reset"
|
||||
"\">тук</a>."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Нов блог"
|
||||
@@ -868,8 +947,11 @@ msgstr "Създайте блог"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "редактирам \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Можете да качвате изображения в галерията си и да ги използвате като икони на блога или банери."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Можете да качвате изображения в галерията си и да ги използвате като икони "
|
||||
"на блога или банери."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Качване на изображения"
|
||||
@@ -887,7 +969,9 @@ msgid "Update blog"
|
||||
msgstr "Актуализация блог"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be reversed."
|
||||
msgstr "Бъдете много внимателни, всяко действие, предприето тук не може да бъде отменено."
|
||||
msgstr ""
|
||||
"Бъдете много внимателни, всяко действие, предприето тук не може да бъде "
|
||||
"отменено."
|
||||
|
||||
msgid "Are you sure that you want to permanently delete this blog?"
|
||||
msgstr "Сигурни ли сте, че искате да изтриете окончателно този блог?"
|
||||
@@ -928,10 +1012,16 @@ msgid "Plume is a decentralized blogging engine."
|
||||
msgstr "Pluma е децентрализиран двигател за блогове."
|
||||
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Авторите могат да управляват множество блогове, всеки като свой уникален уебсайт."
|
||||
msgstr ""
|
||||
"Авторите могат да управляват множество блогове, всеки като свой уникален "
|
||||
"уебсайт."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Статиите се виждат и на други Plume инстанции като можете да взаимодействате с тях директно и от други платформи като Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Статиите се виждат и на други Plume инстанции като можете да взаимодействате "
|
||||
"с тях директно и от други платформи като Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Прочетете подробните правила"
|
||||
@@ -1010,4 +1100,3 @@ msgstr "Публикувано под този лиценз"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Лиценз на статията"
|
||||
|
||||
|
||||
+125
-42
@@ -214,12 +214,19 @@ msgid "Your article has been deleted."
|
||||
msgstr "S’ha suprimit el vostre article."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Sembla que l'article que intentes esborrar no existeix. Potser ja no hi és?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Sembla que l'article que intentes esborrar no existeix. Potser ja no hi és?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "No s'ha pogut obtenir informació sobre el teu compte. Si us plau, assegura't que el teu nom d'usuari és correcte."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"No s'ha pogut obtenir informació sobre el teu compte. Si us plau, assegura't "
|
||||
"que el teu nom d'usuari és correcte."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +289,11 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "El registre d'aquesta instància és tancat."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "S'ha creat el teu compte. Ara cal iniciar sessió per a començar a usar-lo."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"S'ha creat el teu compte. Ara cal iniciar sessió per a començar a usar-lo."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Carregar Mèdia"
|
||||
@@ -292,7 +302,9 @@ msgid "Description"
|
||||
msgstr "Descripció"
|
||||
|
||||
msgid "Useful for visually impaired people, as well as licensing information"
|
||||
msgstr "Molt útil per a persones amb deficiències visuals aixó com informació sobre llicències"
|
||||
msgstr ""
|
||||
"Molt útil per a persones amb deficiències visuals aixó com informació sobre "
|
||||
"llicències"
|
||||
|
||||
msgid "Content warning"
|
||||
msgstr "Advertència sobre el contingut"
|
||||
@@ -441,8 +453,12 @@ msgstr "Contrasenya"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Confirmació de la contrasenya"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Disculpa, el registre d'aquesta instància és tancat. Pots trobar-ne un altre diferent."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Disculpa, el registre d'aquesta instància és tancat. Pots trobar-ne un altre "
|
||||
"diferent."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "Subscripcions de {0}"
|
||||
@@ -454,7 +470,8 @@ msgid "Your Blogs"
|
||||
msgstr "Els vostres blogs"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Encara no tens cap bloc. Crea el teu propi o pregunta per a unir-te a un."
|
||||
msgstr ""
|
||||
"Encara no tens cap bloc. Crea el teu propi o pregunta per a unir-te a un."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Inicia un nou bloc"
|
||||
@@ -471,8 +488,11 @@ msgstr "Edita el teu compte"
|
||||
msgid "Your Profile"
|
||||
msgstr "El vostre perfil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Per a canviar el teu avatar, puja'l a la teva galeria i desprès selecciona'l allà."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Per a canviar el teu avatar, puja'l a la teva galeria i desprès selecciona'l "
|
||||
"allà."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Puja un avatar"
|
||||
@@ -508,7 +528,8 @@ msgid "Delete your account"
|
||||
msgstr "Elimina el teu compte"
|
||||
|
||||
msgid "Sorry, but as an admin, you can't leave your own instance."
|
||||
msgstr "Ho sentim però com a admin, no pots abandonar la teva pròpia instància."
|
||||
msgstr ""
|
||||
"Ho sentim però com a admin, no pots abandonar la teva pròpia instància."
|
||||
|
||||
msgid "Latest articles"
|
||||
msgstr "Darrers articles"
|
||||
@@ -543,8 +564,14 @@ msgstr "Disculpa-n's. Si creus que això és un error, si us plau reporta-ho."
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Token CSRF invalid"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Alguna cosa no és correcte amb el teu token CSRF. Assegura't que no bloqueges les galetes en el teu navegador i prova refrescant la pàgina. Si continues veient aquest missatge d'error, si us plau informa-ho."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Alguna cosa no és correcte amb el teu token CSRF. Assegura't que no "
|
||||
"bloqueges les galetes en el teu navegador i prova refrescant la pàgina. Si "
|
||||
"continues veient aquest missatge d'error, si us plau informa-ho."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "No estàs autoritzat."
|
||||
@@ -627,14 +654,31 @@ msgstr "Llicència per defecte dels articles"
|
||||
msgid "Save these settings"
|
||||
msgstr "Desa aquests paràmetres"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Si estàs navegant aquest lloc com a visitant cap dada sobre tu serà recollida."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Si estàs navegant aquest lloc com a visitant cap dada sobre tu serà "
|
||||
"recollida."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Com a usuari registrat has de proporcionar un nom d'usuari (que no ha de ser el teu nom real), una adreça de correu funcional i una contrasenya per a poder ser capaç d'iniciar sessió, escriure articles i comentar-los. El contingut que enviïs es guarda fins que tu l'esborris."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Com a usuari registrat has de proporcionar un nom d'usuari (que no ha de ser "
|
||||
"el teu nom real), una adreça de correu funcional i una contrasenya per a "
|
||||
"poder ser capaç d'iniciar sessió, escriure articles i comentar-los. El "
|
||||
"contingut que enviïs es guarda fins que tu l'esborris."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Quan inicies sessió guardem dues galetes, una per a mantenir la sessió oberta i l l'altre per a evitar que d'altres persones actuïn en el teu nom. No guardem cap altre galeta."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Quan inicies sessió guardem dues galetes, una per a mantenir la sessió "
|
||||
"oberta i l l'altre per a evitar que d'altres persones actuïn en el teu nom. "
|
||||
"No guardem cap altre galeta."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Llista de bloqueig d'adreces de correu"
|
||||
@@ -642,8 +686,14 @@ msgstr "Llista de bloqueig d'adreces de correu"
|
||||
msgid "Email address"
|
||||
msgstr "Adreça de correu electrònic"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "L'adreça de correu electrònic que desitges bloquejar. Per a bloquejar dominis pots usar la sintaxi global, per exemple '*@exemple.com' bloqueja totes les adreces de exemple.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"L'adreça de correu electrònic que desitges bloquejar. Per a bloquejar "
|
||||
"dominis pots usar la sintaxi global, per exemple '*@exemple.com' bloqueja "
|
||||
"totes les adreces de exemple.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Nota"
|
||||
@@ -651,14 +701,22 @@ msgstr "Nota"
|
||||
msgid "Notify the user?"
|
||||
msgstr "Notificar l'usuari?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Opcional, mostra un missatge al usuari quan intenta crear un compte amb aquesta adreça"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Opcional, mostra un missatge al usuari quan intenta crear un compte amb "
|
||||
"aquesta adreça"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Notificacions de la llista de bloqueig"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "El missatge per a ser mostrat quan l'usuari intenta crear un compte amb aquesta adreça de correu"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"El missatge per a ser mostrat quan l'usuari intenta crear un compte amb "
|
||||
"aquesta adreça de correu"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Afegir adreça a la llista de bloquejos"
|
||||
@@ -729,8 +787,12 @@ msgstr "Subtítol"
|
||||
msgid "Content"
|
||||
msgstr "Contingut"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Pots pujar Mèdia a la teva galeria i desprès copiar el codi Markdown dels teus articles per a inserir-los."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Pots pujar Mèdia a la teva galeria i desprès copiar el codi Markdown dels "
|
||||
"teus articles per a inserir-los."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Pujar Mèdia"
|
||||
@@ -787,8 +849,12 @@ msgstr "Ja no vull impulsar més això"
|
||||
msgid "Boost"
|
||||
msgstr "Impuls"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Inicia sessió{1}, o {2}usa el teu compte del Fedivers{3} per a interactuar amb aquest article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Inicia sessió{1}, o {2}usa el teu compte del Fedivers{3} per a "
|
||||
"interactuar amb aquest article"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Comentaris"
|
||||
@@ -806,7 +872,9 @@ msgid "Are you sure?"
|
||||
msgstr "N’esteu segur?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Aquest article és encara un esborrany. Només tu i altres autors podeu veure'l."
|
||||
msgstr ""
|
||||
"Aquest article és encara un esborrany. Només tu i altres autors podeu "
|
||||
"veure'l."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Només tu i altres autors podeu editar aquest article."
|
||||
@@ -844,8 +912,12 @@ msgstr "Actualitza la contrasenya"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Reviseu la vostra safata d’entrada."
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Hem enviat un correu a l'adreça que ens vas donar, amb un enllaç per a reiniciar la teva contrasenya."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Hem enviat un correu a l'adreça que ens vas donar, amb un enllaç per a "
|
||||
"reiniciar la teva contrasenya."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Envia l'enllaç per a reiniciar la contrasenya"
|
||||
@@ -853,8 +925,11 @@ msgstr "Envia l'enllaç per a reiniciar la contrasenya"
|
||||
msgid "This token has expired"
|
||||
msgstr "Aquest token ha caducat"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Si us plau inicia el procés clicant <a href=\"/password-reset\">aquí</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Si us plau inicia el procés clicant <a href=\"/password-reset\">aquí</a>."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Blog nou"
|
||||
@@ -868,8 +943,11 @@ msgstr "Crea un blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Edita «{}»"
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Pots pujar imatges a la teva galeria per a usar-les com a icones o capçaleres del bloc."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Pots pujar imatges a la teva galeria per a usar-les com a icones o "
|
||||
"capçaleres del bloc."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Pujar imatges"
|
||||
@@ -928,10 +1006,16 @@ msgid "Plume is a decentralized blogging engine."
|
||||
msgstr "Plume és un motor de blocs descentralitzats."
|
||||
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Els autors poden gestionar diversos blocs, cadascun amb la seva pròpia pàgina."
|
||||
msgstr ""
|
||||
"Els autors poden gestionar diversos blocs, cadascun amb la seva pròpia "
|
||||
"pàgina."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Els articles son visibles en altres instàncies Plume i pots interactuar directament amb ells des d'altres plataformes com ara Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Els articles son visibles en altres instàncies Plume i pots interactuar "
|
||||
"directament amb ells des d'altres plataformes com ara Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Llegeix les normes detallades"
|
||||
@@ -1010,4 +1094,3 @@ msgstr "Publicat segons aquesta llicència"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Llicència del article"
|
||||
|
||||
|
||||
+112
-38
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Váš článek byl smazán."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Zdá se, že článek, který jste se snažili smazat, neexistuje, možná je již pryč?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Zdá se, že článek, který jste se snažili smazat, neexistuje, možná je již "
|
||||
"pryč?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Nemohli jsme zjistit dostatečné množství informací ohledne vašeho účtu. Prosím ověřte si, že vaše předzývka je správná."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Nemohli jsme zjistit dostatečné množství informací ohledne vašeho účtu. "
|
||||
"Prosím ověřte si, že vaše předzývka je správná."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +290,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Registrace jsou na téhle instanci uzavřeny."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Váš účet byl vytvořen. Nyní se stačí jenom přihlásit, než ho budete moci používat."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Váš účet byl vytvořen. Nyní se stačí jenom přihlásit, než ho budete moci "
|
||||
"používat."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Nahrávaní médií"
|
||||
@@ -441,8 +453,12 @@ msgstr "Heslo"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Potvrzení hesla"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Omlouváme se, ale registrace je uzavřena na této konkrétní instanci. Můžete však najít jinou."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Omlouváme se, ale registrace je uzavřena na této konkrétní instanci. Můžete "
|
||||
"však najít jinou."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "Odběry uživatele {0}"
|
||||
@@ -454,7 +470,9 @@ msgid "Your Blogs"
|
||||
msgstr "Vaše Blogy"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Zatím nemáte žádný blog. Vytvořte si vlastní, nebo požádejte v nejakém o členství."
|
||||
msgstr ""
|
||||
"Zatím nemáte žádný blog. Vytvořte si vlastní, nebo požádejte v nejakém o "
|
||||
"členství."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Začít nový blog"
|
||||
@@ -471,8 +489,11 @@ msgstr "Upravit váš účet"
|
||||
msgid "Your Profile"
|
||||
msgstr "Váš profil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Chcete-li změnit svůj avatar, nahrejte ho do své galérie a pak ho odtud zvolte."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Chcete-li změnit svůj avatar, nahrejte ho do své galérie a pak ho odtud "
|
||||
"zvolte."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Nahrát avatara"
|
||||
@@ -502,13 +523,15 @@ msgid "Danger zone"
|
||||
msgstr "Nebezpečná zóna"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be cancelled."
|
||||
msgstr "Buďte velmi opatrný/á, jakákoliv zde provedená akce nemůže být zrušena."
|
||||
msgstr ""
|
||||
"Buďte velmi opatrný/á, jakákoliv zde provedená akce nemůže být zrušena."
|
||||
|
||||
msgid "Delete your account"
|
||||
msgstr "Smazat váš účet"
|
||||
|
||||
msgid "Sorry, but as an admin, you can't leave your own instance."
|
||||
msgstr "Omlouváme se, ale jako administrátor nemůžete opustit svou vlastní instanci."
|
||||
msgstr ""
|
||||
"Omlouváme se, ale jako administrátor nemůžete opustit svou vlastní instanci."
|
||||
|
||||
msgid "Latest articles"
|
||||
msgstr "Nejposlednejší články"
|
||||
@@ -543,8 +566,14 @@ msgstr "Omlouváme se. Pokud si myslíte, že jde o chybu, prosím nahlašte ji.
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Neplatný CSRF token"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "S vaším tokenem CSRF něco není v pořádku. Ujistěte se, že máte v prohlížeči povolené cookies a zkuste obnovit stránku. Pokud tuto chybovou zprávu budete nadále vidět, prosím nahlašte ji."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"S vaším tokenem CSRF něco není v pořádku. Ujistěte se, že máte v prohlížeči "
|
||||
"povolené cookies a zkuste obnovit stránku. Pokud tuto chybovou zprávu budete "
|
||||
"nadále vidět, prosím nahlašte ji."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Nemáte oprávnění."
|
||||
@@ -627,14 +656,30 @@ msgstr "Výchozí licence článků"
|
||||
msgid "Save these settings"
|
||||
msgstr "Uložit tyhle nastavení"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Pokud si tuto stránku prohlížete jako návštěvník, žádné údaje o vás nejsou shromažďovány."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Pokud si tuto stránku prohlížete jako návštěvník, žádné údaje o vás nejsou "
|
||||
"shromažďovány."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Jako registrovaný uživatel musíte poskytnout uživatelské jméno (které nemusí být vaším skutečným jménem), funkční e-mailovou adresu a heslo, aby jste se mohl přihlásit, psát články a komentář."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Jako registrovaný uživatel musíte poskytnout uživatelské jméno (které nemusí "
|
||||
"být vaším skutečným jménem), funkční e-mailovou adresu a heslo, aby jste se "
|
||||
"mohl přihlásit, psát články a komentář."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Když se přihlásíte, ukládáme dvě cookies, jedno, aby bylo možné udržet vaše zasedání otevřené, druhé, aby se zabránilo jiným lidem jednat ve vašem jméně. Žádné další cookies neukládáme."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Když se přihlásíte, ukládáme dvě cookies, jedno, aby bylo možné udržet vaše "
|
||||
"zasedání otevřené, druhé, aby se zabránilo jiným lidem jednat ve vašem "
|
||||
"jméně. Žádné další cookies neukládáme."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr ""
|
||||
@@ -642,7 +687,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +699,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,8 +781,12 @@ msgstr "Podtitul"
|
||||
msgid "Content"
|
||||
msgstr "Obsah"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Můžete nahrát média do své galerie, a pak zkopírovat jejich kód Markdown do vašich článků, pro vložení."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Můžete nahrát média do své galerie, a pak zkopírovat jejich kód Markdown do "
|
||||
"vašich článků, pro vložení."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Nahrát média"
|
||||
@@ -791,8 +847,12 @@ msgstr "Už to nechci dále boostovat"
|
||||
msgid "Boost"
|
||||
msgstr "Boostnout"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Přihlasit se{1}, nebo {2}použít váš Fediverse účet{3} k interakci s tímto článkem"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Přihlasit se{1}, nebo {2}použít váš Fediverse účet{3} k interakci s tímto "
|
||||
"článkem"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Komentáře"
|
||||
@@ -810,7 +870,8 @@ msgid "Are you sure?"
|
||||
msgstr "Jste si jisti?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Tento článek je stále konceptem. Jenom vy, a další autoři ho mohou vidět."
|
||||
msgstr ""
|
||||
"Tento článek je stále konceptem. Jenom vy, a další autoři ho mohou vidět."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Jenom vy, a další autoři mohou upravovat tento článek."
|
||||
@@ -848,8 +909,12 @@ msgstr "Aktualizovat heslo"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Zkontrolujte svou příchozí poštu!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Zaslali jsme email na adresu, kterou jste nám dodali, s odkazem na obnovu vášho hesla."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Zaslali jsme email na adresu, kterou jste nám dodali, s odkazem na obnovu "
|
||||
"vášho hesla."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Poslat odkaz na obnovení hesla"
|
||||
@@ -857,7 +922,9 @@ msgstr "Poslat odkaz na obnovení hesla"
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -872,8 +939,11 @@ msgstr "Vytvořit blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Upravit \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Můžete nahrát obrázky do své galerie, aby je šlo použít jako ikony blogu, nebo bannery."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Můžete nahrát obrázky do své galerie, aby je šlo použít jako ikony blogu, "
|
||||
"nebo bannery."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Nahrát obrázky"
|
||||
@@ -891,7 +961,8 @@ msgid "Update blog"
|
||||
msgstr "Aktualizovat blog"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be reversed."
|
||||
msgstr "Buďte velmi opatrný/á, jakákoliv zde provedená akce nemůže být vrácena."
|
||||
msgstr ""
|
||||
"Buďte velmi opatrný/á, jakákoliv zde provedená akce nemůže být vrácena."
|
||||
|
||||
msgid "Are you sure that you want to permanently delete this blog?"
|
||||
msgstr ""
|
||||
@@ -936,8 +1007,12 @@ msgstr "Plume je decentralizovaný blogování systém."
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Autoři mohou spravovat vícero blogů, každý jako svou vlastní stránku."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Články jsou viditelné také na ostatních Plume instancích, a můžete s nimi narábět přímo i v rámci jiných platforem, jako je Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Články jsou viditelné také na ostatních Plume instancích, a můžete s nimi "
|
||||
"narábět přímo i v rámci jiných platforem, jako je Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Přečtěte si podrobná pravidla"
|
||||
@@ -1016,4 +1091,3 @@ msgstr "Zveřejněn pod touto licenci"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Licence článku"
|
||||
|
||||
|
||||
+808
-515
File diff suppressed because it is too large
Load Diff
+56
-19
@@ -214,11 +214,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +286,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +447,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +479,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +552,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +639,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +662,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +674,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +756,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,7 +816,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -844,7 +875,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +886,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +903,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +966,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1048,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+133
-44
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Dein Artikel wurde gelöscht."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Möglicherweise ist der zu löschende Artikel nicht (mehr) vorhanden. Wurde er vielleicht schon entfernt?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Möglicherweise ist der zu löschende Artikel nicht (mehr) vorhanden. Wurde er "
|
||||
"vielleicht schon entfernt?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Wir konnten nicht genug Informationen über dein Konto finden. Bitte stelle sicher, dass dein Benutzername richtig ist."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Wir konnten nicht genug Informationen über dein Konto finden. Bitte stelle "
|
||||
"sicher, dass dein Benutzername richtig ist."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +290,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Anmeldungen sind auf dieser Instanz aktuell nicht möglich."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Dein Konto wurde erstellt. Jetzt musst du dich nur noch anmelden, um es nutzen zu können."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Dein Konto wurde erstellt. Jetzt musst du dich nur noch anmelden, um es "
|
||||
"nutzen zu können."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Hochladen von Mediendateien"
|
||||
@@ -441,8 +453,12 @@ msgstr "Passwort"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Passwort bestätigen"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Entschuldigung, Registrierungen sind auf dieser Instanz geschlossen. Du kannst jedoch eine andere finden."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Entschuldigung, Registrierungen sind auf dieser Instanz geschlossen. Du "
|
||||
"kannst jedoch eine andere finden."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "{0}'s Abonnements"
|
||||
@@ -454,7 +470,9 @@ msgid "Your Blogs"
|
||||
msgstr "Deine Blogs"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Du hast noch keinen Blog. Erstelle deinen eigenen, oder frage, um dich einem anzuschließen."
|
||||
msgstr ""
|
||||
"Du hast noch keinen Blog. Erstelle deinen eigenen, oder frage, um dich einem "
|
||||
"anzuschließen."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Neuen Blog beginnen"
|
||||
@@ -471,8 +489,11 @@ msgstr "Eigenes Profil bearbeiten"
|
||||
msgid "Your Profile"
|
||||
msgstr "Dein Profil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Um dein Profilbild zu ändern, lade es in deine Galerie hoch und wähle es dort aus."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Um dein Profilbild zu ändern, lade es in deine Galerie hoch und wähle es "
|
||||
"dort aus."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Ein Profilbild hochladen"
|
||||
@@ -508,7 +529,9 @@ msgid "Delete your account"
|
||||
msgstr "Eigenen Account löschen"
|
||||
|
||||
msgid "Sorry, but as an admin, you can't leave your own instance."
|
||||
msgstr "Entschuldingung, aber als Administrator kannst du deine eigene Instanz nicht verlassen."
|
||||
msgstr ""
|
||||
"Entschuldingung, aber als Administrator kannst du deine eigene Instanz nicht "
|
||||
"verlassen."
|
||||
|
||||
msgid "Latest articles"
|
||||
msgstr "Neueste Artikel"
|
||||
@@ -538,13 +561,20 @@ msgid "Something broke on our side."
|
||||
msgstr "Bei dir ist etwas schief gegangen."
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "Das tut uns leid. Wenn du denkst, dass dies ein Bug ist, melde ihn bitte."
|
||||
msgstr ""
|
||||
"Das tut uns leid. Wenn du denkst, dass dies ein Bug ist, melde ihn bitte."
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Ungültiges CSRF-Token"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Irgendetwas stimmt mit deinem CSRF token nicht. Vergewissere dich, dass Cookies in deinem Browser aktiviert sind und versuche diese Seite neu zu laden. Bitte melde diesen Fehler, falls er erneut auftritt."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Irgendetwas stimmt mit deinem CSRF token nicht. Vergewissere dich, dass "
|
||||
"Cookies in deinem Browser aktiviert sind und versuche diese Seite neu zu "
|
||||
"laden. Bitte melde diesen Fehler, falls er erneut auftritt."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Berechtigung fehlt"
|
||||
@@ -627,14 +657,31 @@ msgstr "Voreingestellte Artikel-Lizenz"
|
||||
msgid "Save these settings"
|
||||
msgstr "Diese Einstellungen speichern"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Wenn Sie diese Website als Besucher nutzen, werden keine Daten über Sie erhoben."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Wenn Sie diese Website als Besucher nutzen, werden keine Daten über Sie "
|
||||
"erhoben."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Als registrierter Benutzer müssen Sie Ihren Benutzernamen (der nicht Ihr richtiger Name sein muss), Ihre E-Mail-Adresse und ein Passwort angeben, um sich anmelden, Artikel schreiben und kommentieren zu können. Die von Ihnen übermittelten Inhalte werden gespeichert, bis Sie sie löschen."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Als registrierter Benutzer müssen Sie Ihren Benutzernamen (der nicht Ihr "
|
||||
"richtiger Name sein muss), Ihre E-Mail-Adresse und ein Passwort angeben, um "
|
||||
"sich anmelden, Artikel schreiben und kommentieren zu können. Die von Ihnen "
|
||||
"übermittelten Inhalte werden gespeichert, bis Sie sie löschen."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Wenn Sie sich anmelden, speichern wir zwei Cookies, eines, um Ihre Sitzung offen zu halten, das andere, um zu verhindern, dass andere Personen in Ihrem Namen handeln. Wir speichern keine weiteren Cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Wenn Sie sich anmelden, speichern wir zwei Cookies, eines, um Ihre Sitzung "
|
||||
"offen zu halten, das andere, um zu verhindern, dass andere Personen in Ihrem "
|
||||
"Namen handeln. Wir speichern keine weiteren Cookies."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Gesperrte E-Mail-Adressen"
|
||||
@@ -642,8 +689,14 @@ msgstr "Gesperrte E-Mail-Adressen"
|
||||
msgid "Email address"
|
||||
msgstr "E‐Mail‐Adresse"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "Die E-Mail-Adresse, die du sperren möchtest. Um bestimmte Domänen zu sperren, kannst du den Globbing-Syntax verwenden: Beispielsweise: *@example.com” sperrt alle Adressen von example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"Die E-Mail-Adresse, die du sperren möchtest. Um bestimmte Domänen zu "
|
||||
"sperren, kannst du den Globbing-Syntax verwenden: Beispielsweise: *@example."
|
||||
"com” sperrt alle Adressen von example.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Notiz"
|
||||
@@ -651,14 +704,22 @@ msgstr "Notiz"
|
||||
msgid "Notify the user?"
|
||||
msgstr "Benutzer benachrichtigen?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Optional: Dem Benutzer wird eine Nachricht angezeigt, wenn er versucht, ein Konto mit dieser Adresse zu erstellen"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Optional: Dem Benutzer wird eine Nachricht angezeigt, wenn er versucht, ein "
|
||||
"Konto mit dieser Adresse zu erstellen"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Sperrlisten-Benachrichtigung"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "Die Nachricht, die angezeigt wird, wenn der Benutzer versucht, ein Konto mit dieser E-Mail-Adresse zu erstellen"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"Die Nachricht, die angezeigt wird, wenn der Benutzer versucht, ein Konto mit "
|
||||
"dieser E-Mail-Adresse zu erstellen"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Adresse zur Sperrliste hinzufügen"
|
||||
@@ -676,10 +737,12 @@ msgid "Blocklisted for:"
|
||||
msgstr "Gesperrt für:"
|
||||
|
||||
msgid "Will notify them on account creation with this message:"
|
||||
msgstr "Du wirst beim Erstellen eines Kontos mit dieser Nachricht benachrichtigt:"
|
||||
msgstr ""
|
||||
"Du wirst beim Erstellen eines Kontos mit dieser Nachricht benachrichtigt:"
|
||||
|
||||
msgid "The user will be silently prevented from making an account"
|
||||
msgstr "Der Benutzer wird stillschweigend daran gehindert, ein Konto einzurichten"
|
||||
msgstr ""
|
||||
"Der Benutzer wird stillschweigend daran gehindert, ein Konto einzurichten"
|
||||
|
||||
msgid "Welcome to {}"
|
||||
msgstr "Willkommen bei {}"
|
||||
@@ -729,8 +792,12 @@ msgstr "Untertitel"
|
||||
msgid "Content"
|
||||
msgstr "Inhalt"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Du kannst Medien in deine Galerie hochladen und dann deren Markdown-Code in deine Artikel kopieren, um sie einzufügen."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Du kannst Medien in deine Galerie hochladen und dann deren Markdown-Code in "
|
||||
"deine Artikel kopieren, um sie einzufügen."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Medien hochladen"
|
||||
@@ -787,8 +854,12 @@ msgstr "Ich möchte das nicht mehr boosten"
|
||||
msgid "Boost"
|
||||
msgstr "Boosten"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Anmelden{1} oder {2}Ihr Fediverse-Konto verwenden{3}, um mit diesem Artikel zu interagieren."
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Anmelden{1} oder {2}Ihr Fediverse-Konto verwenden{3}, um mit diesem "
|
||||
"Artikel zu interagieren."
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Kommentare"
|
||||
@@ -806,7 +877,9 @@ msgid "Are you sure?"
|
||||
msgstr "Bist du dir sicher?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Dieser Artikel ist noch ein Entwurf. Nur Sie und andere Autoren können ihn sehen."
|
||||
msgstr ""
|
||||
"Dieser Artikel ist noch ein Entwurf. Nur Sie und andere Autoren können ihn "
|
||||
"sehen."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Nur Sie und andere Autoren können diesen Artikel bearbeiten."
|
||||
@@ -844,8 +917,12 @@ msgstr "Passwort aktualisieren"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Posteingang prüfen!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Wir haben eine Mail an die von dir angegebene Adresse gesendet, mit einem Link, um dein Passwort zurückzusetzen."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Wir haben eine Mail an die von dir angegebene Adresse gesendet, mit einem "
|
||||
"Link, um dein Passwort zurückzusetzen."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Link zum Zurücksetzen des Passworts senden"
|
||||
@@ -853,8 +930,12 @@ msgstr "Link zum Zurücksetzen des Passworts senden"
|
||||
msgid "This token has expired"
|
||||
msgstr "Diese Token ist veraltet"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Bitte starten Sie den Prozess erneut, indem Sie <a href=\"/password-reset\">hier</a> klicken."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Bitte starten Sie den Prozess erneut, indem Sie <a href=\"/password-reset"
|
||||
"\">hier</a> klicken."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Neuer Blog"
|
||||
@@ -868,8 +949,11 @@ msgstr "Blog erstellen"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "„{}” bearbeiten"
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Sie können Bilder in Ihre Galerie hochladen, um sie als Blog-Symbol oder Banner zu verwenden."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Sie können Bilder in Ihre Galerie hochladen, um sie als Blog-Symbol oder "
|
||||
"Banner zu verwenden."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Bilder hochladen"
|
||||
@@ -887,7 +971,9 @@ msgid "Update blog"
|
||||
msgstr "Blog aktualisieren"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be reversed."
|
||||
msgstr "Seien Sie sehr vorsichtig, alle hier getroffenen Aktionen können nicht widerrufen werden."
|
||||
msgstr ""
|
||||
"Seien Sie sehr vorsichtig, alle hier getroffenen Aktionen können nicht "
|
||||
"widerrufen werden."
|
||||
|
||||
msgid "Are you sure that you want to permanently delete this blog?"
|
||||
msgstr "Möchten Sie diesen Blog wirklich dauerhaft löschen?"
|
||||
@@ -930,8 +1016,12 @@ msgstr "Plume ist eine dezentrale Blogging-Engine."
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Autoren können mehrere Blogs verwalten, jeden als eigene Website."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Artikel sind auch auf anderen Plume-Instanzen sichtbar und du kannst mit ihnen direkt von anderen Plattformen wie Mastodon interagieren."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Artikel sind auch auf anderen Plume-Instanzen sichtbar und du kannst mit "
|
||||
"ihnen direkt von anderen Plattformen wie Mastodon interagieren."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Die detaillierten Regeln lesen"
|
||||
@@ -1010,4 +1100,3 @@ msgstr "Unter dieser Lizenz veröffentlicht"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Artikel-Lizenz"
|
||||
|
||||
|
||||
+56
-19
@@ -214,11 +214,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +286,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +447,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +479,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +552,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +639,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +662,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +674,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +756,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,7 +816,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -844,7 +875,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +886,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +903,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +966,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1048,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+56
-19
@@ -214,11 +214,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +286,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +447,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +479,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +552,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +639,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +662,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +674,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +756,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,7 +816,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -844,7 +875,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +886,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +903,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +966,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1048,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+58
-20
@@ -214,11 +214,15 @@ msgid "Your article has been deleted."
|
||||
msgstr "Via artikolo estis forigita."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +286,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +447,9 @@ msgstr "Pasvorto"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Konfirmo de la pasvorto"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,8 +479,10 @@ msgstr "Redakti vian konton"
|
||||
msgid "Your Profile"
|
||||
msgstr "Via profilo"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Por ĉanĝi vian profilbildon, retsendu ĝin en via bildaro kaj selektu ol kie."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Por ĉanĝi vian profilbildon, retsendu ĝin en via bildaro kaj selektu ol kie."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Retsendi profilbildo"
|
||||
@@ -543,7 +553,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +640,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr "Konservi ĉi tiujn agordojn"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +663,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +675,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +757,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr "Enhavo"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,7 +817,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -844,7 +876,9 @@ msgstr "Ĝisdatigi pasvorton"
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +887,9 @@ msgstr "Sendi ligilon por restarigi pasvorton"
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +904,8 @@ msgstr "Krei blogon"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Redakti “{}”"
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +967,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1049,3 @@ msgstr "Eldonita sub ĉi tiu permesilo"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Artikola permesilo"
|
||||
|
||||
|
||||
+131
-43
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Se ha eliminado el artículo."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Parece que el artículo que intentaste eliminar no existe. ¿Tal vez ya haya desaparecido?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Parece que el artículo que intentaste eliminar no existe. ¿Tal vez ya haya "
|
||||
"desaparecido?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "No se pudo obtener suficiente información sobre su cuenta. Por favor, asegúrese de que su nombre de usuario es correcto."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"No se pudo obtener suficiente información sobre su cuenta. Por favor, "
|
||||
"asegúrese de que su nombre de usuario es correcto."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +290,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Los registros están cerrados en esta instancia."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Tu cuenta ha sido creada. Ahora solo necesitas iniciar sesión, antes de poder usarla."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Tu cuenta ha sido creada. Ahora solo necesitas iniciar sesión, antes de "
|
||||
"poder usarla."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Subir medios"
|
||||
@@ -292,7 +304,9 @@ msgid "Description"
|
||||
msgstr "Descripción"
|
||||
|
||||
msgid "Useful for visually impaired people, as well as licensing information"
|
||||
msgstr "Útil para personas con discapacidad visual, tanto como información de licencias"
|
||||
msgstr ""
|
||||
"Útil para personas con discapacidad visual, tanto como información de "
|
||||
"licencias"
|
||||
|
||||
msgid "Content warning"
|
||||
msgstr "Aviso de contenido"
|
||||
@@ -441,8 +455,12 @@ msgstr "Contraseña"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Confirmación de contraseña"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Lo sentimos, pero las inscripciones están cerradas en esta instancia. Sin embargo, puede encontrar una instancia distinta."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Lo sentimos, pero las inscripciones están cerradas en esta instancia. Sin "
|
||||
"embargo, puede encontrar una instancia distinta."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "Suscripciones de {0}"
|
||||
@@ -471,7 +489,8 @@ msgstr "Edita tu cuenta"
|
||||
msgid "Your Profile"
|
||||
msgstr "Tu perfil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Para cambiar tu avatar, súbalo a su galería y seleccione de ahí."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -508,7 +527,8 @@ msgid "Delete your account"
|
||||
msgstr "Eliminar tu cuenta"
|
||||
|
||||
msgid "Sorry, but as an admin, you can't leave your own instance."
|
||||
msgstr "Lo sentimos, pero como un administrador, no puede dejar su propia instancia."
|
||||
msgstr ""
|
||||
"Lo sentimos, pero como un administrador, no puede dejar su propia instancia."
|
||||
|
||||
msgid "Latest articles"
|
||||
msgstr "Últimas publicaciones"
|
||||
@@ -538,13 +558,20 @@ msgid "Something broke on our side."
|
||||
msgstr "Algo ha salido mal de nuestro lado."
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "Disculpe la molestia. Si cree que esto es un defecto, por favor repórtalo."
|
||||
msgstr ""
|
||||
"Disculpe la molestia. Si cree que esto es un defecto, por favor repórtalo."
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Token CSRF inválido"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Hay un problema con su token CSRF. Asegúrase de que las cookies están habilitadas en su navegador, e intente recargar esta página. Si sigue viendo este mensaje de error, por favor infórmelo."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Hay un problema con su token CSRF. Asegúrase de que las cookies están "
|
||||
"habilitadas en su navegador, e intente recargar esta página. Si sigue viendo "
|
||||
"este mensaje de error, por favor infórmelo."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "No está autorizado."
|
||||
@@ -627,14 +654,32 @@ msgstr "Licencia del artículo por defecto"
|
||||
msgid "Save these settings"
|
||||
msgstr "Guardar estos ajustes"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Si está navegando por este sitio como visitante, no se recopilan datos sobre usted."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Si está navegando por este sitio como visitante, no se recopilan datos sobre "
|
||||
"usted."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Como usuario registrado, tienes que proporcionar tu nombre de usuario (que no tiene que ser tu nombre real), tu dirección de correo electrónico funcional y una contraseña, con el fin de poder iniciar sesión, escribir artículos y comentarios. El contenido que envíes se almacena hasta que lo elimines."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Como usuario registrado, tienes que proporcionar tu nombre de usuario (que "
|
||||
"no tiene que ser tu nombre real), tu dirección de correo electrónico "
|
||||
"funcional y una contraseña, con el fin de poder iniciar sesión, escribir "
|
||||
"artículos y comentarios. El contenido que envíes se almacena hasta que lo "
|
||||
"elimines."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Cuando inicias sesión, guardamos dos cookies, una para mantener tu sesión abierta, la segunda para evitar que otras personas actúen en tu nombre. No almacenamos ninguna otra cookie."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Cuando inicias sesión, guardamos dos cookies, una para mantener tu sesión "
|
||||
"abierta, la segunda para evitar que otras personas actúen en tu nombre. No "
|
||||
"almacenamos ninguna otra cookie."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Correos en la lista de bloqueos"
|
||||
@@ -642,8 +687,14 @@ msgstr "Correos en la lista de bloqueos"
|
||||
msgid "Email address"
|
||||
msgstr "Dirección de correo electrónico"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "La dirección de correo electrónico que deseas bloquear. Para bloquear dominios, puedes usar sintaxis de globbing, por ejemplo '*@example.com' bloquea todas las direcciones de example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"La dirección de correo electrónico que deseas bloquear. Para bloquear "
|
||||
"dominios, puedes usar sintaxis de globbing, por ejemplo '*@example.com' "
|
||||
"bloquea todas las direcciones de example.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Nota"
|
||||
@@ -651,14 +702,22 @@ msgstr "Nota"
|
||||
msgid "Notify the user?"
|
||||
msgstr "¿Notificar al usuario?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Opcional, muestra un mensaje al usuario cuando intenta crear una cuenta con esa dirección"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Opcional, muestra un mensaje al usuario cuando intenta crear una cuenta con "
|
||||
"esa dirección"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Notificación de bloqueo"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "El mensaje que se mostrará cuando el usuario intente crear una cuenta con esta dirección de correo electrónico"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"El mensaje que se mostrará cuando el usuario intente crear una cuenta con "
|
||||
"esta dirección de correo electrónico"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Añadir dirección bloqueada"
|
||||
@@ -673,7 +732,9 @@ msgid "Email address:"
|
||||
msgstr "Dirección de correo electrónico:"
|
||||
|
||||
msgid "Blocklisted for:"
|
||||
msgstr "Este texto no tiene información de contexto. El texto es usado en plume.pot. Posición en el archivo: 115:"
|
||||
msgstr ""
|
||||
"Este texto no tiene información de contexto. El texto es usado en plume.pot. "
|
||||
"Posición en el archivo: 115:"
|
||||
|
||||
msgid "Will notify them on account creation with this message:"
|
||||
msgstr "Les notificará al crear la cuenta con este mensaje:"
|
||||
@@ -729,8 +790,12 @@ msgstr "Subtítulo"
|
||||
msgid "Content"
|
||||
msgstr "Contenido"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Puede subir los medios a su galería, y luego copiar su código Markdown en sus artículos para insertarlos."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Puede subir los medios a su galería, y luego copiar su código Markdown en "
|
||||
"sus artículos para insertarlos."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Cargar medios"
|
||||
@@ -787,8 +852,12 @@ msgstr "Ya no quiero compartir esto"
|
||||
msgid "Boost"
|
||||
msgstr "Compartir"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Inicie sesión{1}, o {2}utilice su cuenta del Fediverso{3} para interactuar con este artículo"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Inicie sesión{1}, o {2}utilice su cuenta del Fediverso{3} para "
|
||||
"interactuar con este artículo"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Comentários"
|
||||
@@ -806,7 +875,8 @@ msgid "Are you sure?"
|
||||
msgstr "¿Está seguro?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Este artículo sigue siendo un borrador. Sólo tú y otros autores pueden verlo."
|
||||
msgstr ""
|
||||
"Este artículo sigue siendo un borrador. Sólo tú y otros autores pueden verlo."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Sólo tú y otros autores pueden editar este artículo."
|
||||
@@ -844,8 +914,12 @@ msgstr "Actualizar contraseña"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Revise su bandeja de entrada!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Enviamos un correo a la dirección que nos dio, con un enlace para restablecer su contraseña."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Enviamos un correo a la dirección que nos dio, con un enlace para "
|
||||
"restablecer su contraseña."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Enviar enlace de restablecimiento de contraseña"
|
||||
@@ -853,8 +927,12 @@ msgstr "Enviar enlace de restablecimiento de contraseña"
|
||||
msgid "This token has expired"
|
||||
msgstr "Este token ha caducado"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Por favor, vuelva a iniciar el proceso haciendo click <a href=\"/password-reset\">aquí</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Por favor, vuelva a iniciar el proceso haciendo click <a href=\"/password-"
|
||||
"reset\">aquí</a>."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Nuevo Blog"
|
||||
@@ -868,8 +946,11 @@ msgstr "Crear el blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Editar \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Puede subir imágenes a su galería, para usarlas como iconos de blog, o banderas."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Puede subir imágenes a su galería, para usarlas como iconos de blog, o "
|
||||
"banderas."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Subir imágenes"
|
||||
@@ -887,7 +968,9 @@ msgid "Update blog"
|
||||
msgstr "Actualizar el blog"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be reversed."
|
||||
msgstr "Tenga mucho cuidado, cualquier acción que se tome aquí no puede ser invertida."
|
||||
msgstr ""
|
||||
"Tenga mucho cuidado, cualquier acción que se tome aquí no puede ser "
|
||||
"invertida."
|
||||
|
||||
msgid "Are you sure that you want to permanently delete this blog?"
|
||||
msgstr "¿Está seguro que desea eliminar permanentemente este blog?"
|
||||
@@ -928,10 +1011,16 @@ msgid "Plume is a decentralized blogging engine."
|
||||
msgstr "Plume es un motor de blogs descentralizado."
|
||||
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Los autores pueden administrar múltiples blogs, cada uno como su propio sitio web."
|
||||
msgstr ""
|
||||
"Los autores pueden administrar múltiples blogs, cada uno como su propio "
|
||||
"sitio web."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Los artículos también son visibles en otras instancias de Plume, y puede interactuar con ellos directamente desde otras plataformas como Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Los artículos también son visibles en otras instancias de Plume, y puede "
|
||||
"interactuar con ellos directamente desde otras plataformas como Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Leer las reglas detalladas"
|
||||
@@ -1010,4 +1099,3 @@ msgstr "Publicado bajo esta licencia"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Licencia de artículo"
|
||||
|
||||
|
||||
+125
-42
@@ -214,12 +214,19 @@ msgid "Your article has been deleted."
|
||||
msgstr "نوشتهٔ شما پاک شده است."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "به نظر میرسد نوشتهای را که میخواهید پاک کنید، وجود ندارد. قبلا پاک نشده است؟"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"به نظر میرسد نوشتهای را که میخواهید پاک کنید، وجود ندارد. قبلا پاک نشده است؟"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "نتوانستیم اطلاعات کافی درباره حساب شما دریافت کنیم. لطفا مطمئن شوید که نام کاربری درست است."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"نتوانستیم اطلاعات کافی درباره حساب شما دریافت کنیم. لطفا مطمئن شوید که نام "
|
||||
"کاربری درست است."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +289,11 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "ثبتنام روی این نمونه بسته شده است."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "حساب شما ایجاد شده است. اکنون برای استفاده از آن تنها نیاز است که واردش شوید."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"حساب شما ایجاد شده است. اکنون برای استفاده از آن تنها نیاز است که واردش شوید."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "بارگذاری رسانه"
|
||||
@@ -441,8 +451,12 @@ msgstr "گذرواژه"
|
||||
msgid "Password confirmation"
|
||||
msgstr "تایید گذرواژه"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "معذرت میخواهیم. ثبتنام روی این نمونه خاص بسته شده است. با این حال شما میتوانید یک نمونه دیگر پیدا کنید."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"معذرت میخواهیم. ثبتنام روی این نمونه خاص بسته شده است. با این حال شما "
|
||||
"میتوانید یک نمونه دیگر پیدا کنید."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "دنبالشوندگان {0}"
|
||||
@@ -454,7 +468,8 @@ msgid "Your Blogs"
|
||||
msgstr "بلاگهای شما"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "شما هنوز هیچ بلاگی ندارید. یکی بسازید یا درخواست پیوستن به یکی را بدهید."
|
||||
msgstr ""
|
||||
"شما هنوز هیچ بلاگی ندارید. یکی بسازید یا درخواست پیوستن به یکی را بدهید."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "شروع یک بلاگ جدید"
|
||||
@@ -471,8 +486,11 @@ msgstr "حسابتان را ویرایش کنید"
|
||||
msgid "Your Profile"
|
||||
msgstr "نمایهٔ شما"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "برای تغییر تصویر حسابتان، ابتدا آن را در نگارخانه بارگذاری کرده و سپس از همان جا انتخابش کنید."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"برای تغییر تصویر حسابتان، ابتدا آن را در نگارخانه بارگذاری کرده و سپس از "
|
||||
"همان جا انتخابش کنید."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "بارگذاری تصویر حساب"
|
||||
@@ -538,13 +556,21 @@ msgid "Something broke on our side."
|
||||
msgstr "مشکلی سمت ما پیش آمد."
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "از این بابت متاسفیم. اگر فکر میکنید این اتفاق ناشی از یک اشکال فنی است، لطفا آن را گزارش کنید."
|
||||
msgstr ""
|
||||
"از این بابت متاسفیم. اگر فکر میکنید این اتفاق ناشی از یک اشکال فنی است، لطفا "
|
||||
"آن را گزارش کنید."
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "توکن CSRF نامعتبر"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "مشکلی در ارتباط با توکن CSRF ما وجود دارد. اطمینان حاصل کنید که کوکی در مرورگرتان فعال است و سپس این صفحه را مجددا فراخوانی کنید. اگر این پیام خطا را باز هم مشاهده کردید، موضوع را گزارش کنید."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"مشکلی در ارتباط با توکن CSRF ما وجود دارد. اطمینان حاصل کنید که کوکی در "
|
||||
"مرورگرتان فعال است و سپس این صفحه را مجددا فراخوانی کنید. اگر این پیام خطا "
|
||||
"را باز هم مشاهده کردید، موضوع را گزارش کنید."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "شما مجاز به این کار نیستید."
|
||||
@@ -627,14 +653,31 @@ msgstr "پروانه پیشفرض نوشته"
|
||||
msgid "Save these settings"
|
||||
msgstr "ذخیره این تنظیمات"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "اگر شما به عنوان یک بازدیدکننده در حال مرور این پایگاه هستید، هیچ دادهای درباره شما گردآوری نمیشود."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"اگر شما به عنوان یک بازدیدکننده در حال مرور این پایگاه هستید، هیچ دادهای "
|
||||
"درباره شما گردآوری نمیشود."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "به عنوان یک کاربر ثبتنام شده، برای آنکه بتوانید وارد شده و مطلب بنویسید یا نظر بدهید، لازم است که نامکاربری (که لازم نیست نام واقعی شما باشد) و نشانی رایانامه فعال را ارائه کنید. محتوایی که میفرستید، تا زمانی که خودتان آن را پاک نکنید نگهداری میشود."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"به عنوان یک کاربر ثبتنام شده، برای آنکه بتوانید وارد شده و مطلب بنویسید یا "
|
||||
"نظر بدهید، لازم است که نامکاربری (که لازم نیست نام واقعی شما باشد) و نشانی "
|
||||
"رایانامه فعال را ارائه کنید. محتوایی که میفرستید، تا زمانی که خودتان آن را "
|
||||
"پاک نکنید نگهداری میشود."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "وقتی وارد میشوید، ما دو کوکی ذخیره میکنیم. یکی برای باز نگهداشتن نشست جاری و دومی برای اجتناب از فعالیت دیگران از جانب شما. ما هیچ کوکی دیگری ذخیره نمیکنیم."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"وقتی وارد میشوید، ما دو کوکی ذخیره میکنیم. یکی برای باز نگهداشتن نشست جاری و "
|
||||
"دومی برای اجتناب از فعالیت دیگران از جانب شما. ما هیچ کوکی دیگری ذخیره "
|
||||
"نمیکنیم."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "رایانامههای مسدود شده"
|
||||
@@ -642,8 +685,14 @@ msgstr "رایانامههای مسدود شده"
|
||||
msgid "Email address"
|
||||
msgstr "نشانی رایانامه"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "نشانی رایانامهای که میخواهید مسدود کنید. اگر میخواهید دامنهها را مسدود کنید، میتواند از نحو گِلاب استفاده کنید. مثلاً عبارت '*@example.com' تمام نشانیها از دامنه example.com را مسدود میکند"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"نشانی رایانامهای که میخواهید مسدود کنید. اگر میخواهید دامنهها را مسدود کنید، "
|
||||
"میتواند از نحو گِلاب استفاده کنید. مثلاً عبارت '*@example.com' تمام نشانیها از "
|
||||
"دامنه example.com را مسدود میکند"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "یادداشت"
|
||||
@@ -651,14 +700,22 @@ msgstr "یادداشت"
|
||||
msgid "Notify the user?"
|
||||
msgstr "به کاربر اعلان شود؟"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "اختیاری، هنگامی که کاربر با آن نشانی تلاش برای ایجاد حساب کند، پیامی به او نشان میدهد"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"اختیاری، هنگامی که کاربر با آن نشانی تلاش برای ایجاد حساب کند، پیامی به او "
|
||||
"نشان میدهد"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "اعلان مسدودسازی"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "پیامی که هنگام تلاش کاربر برای ساخت حساب با این نشانی رایانامه به او نشان داده میشود"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"پیامی که هنگام تلاش کاربر برای ساخت حساب با این نشانی رایانامه به او نشان "
|
||||
"داده میشود"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "اضافه کردن نشانی مسدودشده"
|
||||
@@ -729,8 +786,12 @@ msgstr "زیرعنوان"
|
||||
msgid "Content"
|
||||
msgstr "محتوا"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "برای درج رسانه میتوانید آن را به نگارخانه خود افزوده و سپس به کمک کد مارکداونی که میگیرید وارد مطلبتان کنید."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"برای درج رسانه میتوانید آن را به نگارخانه خود افزوده و سپس به کمک کد "
|
||||
"مارکداونی که میگیرید وارد مطلبتان کنید."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "بارگذاری رسانه"
|
||||
@@ -787,8 +848,12 @@ msgstr "دیگر نمیخوام این را تقویت کنم"
|
||||
msgid "Boost"
|
||||
msgstr "تقویت"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}وارد شوید{1} و یا {2}از حساب فدیورس خود{3} برای تعامل با این مطلب استفاده کنید"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}وارد شوید{1} و یا {2}از حساب فدیورس خود{3} برای تعامل با این مطلب استفاده "
|
||||
"کنید"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "نظرات"
|
||||
@@ -806,7 +871,9 @@ msgid "Are you sure?"
|
||||
msgstr "مطمئنید؟"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "این مطلب هنوز یک پیشنویس است. تنها شما و دیگر نویسندگان میتوانید آن را ببینید."
|
||||
msgstr ""
|
||||
"این مطلب هنوز یک پیشنویس است. تنها شما و دیگر نویسندگان میتوانید آن را "
|
||||
"ببینید."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "تنها شما و دیگر نویسندگان میتوانید این نوشته را ویرایش کنید."
|
||||
@@ -844,8 +911,12 @@ msgstr "بهروزرسانی گذرواژه"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "صندوق پستی خود را بررسی کنید!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "ما، یک رایانامه به نشانیای که به ما دادید فرستادهایم. با پیوندی که در آن است میتوانید گذرواژه خود را تغییر دهید."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"ما، یک رایانامه به نشانیای که به ما دادید فرستادهایم. با پیوندی که در آن است "
|
||||
"میتوانید گذرواژه خود را تغییر دهید."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "فرستادن پیوند بازنشانی گذرواژه"
|
||||
@@ -853,8 +924,11 @@ msgstr "فرستادن پیوند بازنشانی گذرواژه"
|
||||
msgid "This token has expired"
|
||||
msgstr "این توکن منقضی شده است"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "لطفاً برای شروع فرایند، <a href=\"/password-reset\">اینجا</a> کلیک کنید."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"لطفاً برای شروع فرایند، <a href=\"/password-reset\">اینجا</a> کلیک کنید."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "بلاگ جدید"
|
||||
@@ -868,8 +942,11 @@ msgstr "ایجاد بلاگ"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "ویرایش «{}»"
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "میتوانید تصاویرتان را در نگارخانه بارگذاری کرده و از آنها به عنوان شکلک و یا تصویر سردر بلاگ استفاده کنید."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"میتوانید تصاویرتان را در نگارخانه بارگذاری کرده و از آنها به عنوان شکلک و یا "
|
||||
"تصویر سردر بلاگ استفاده کنید."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "بارگذاری تصاویر"
|
||||
@@ -887,7 +964,8 @@ msgid "Update blog"
|
||||
msgstr "بهروزرسانی بلاگ"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be reversed."
|
||||
msgstr "حواستان خیلی جمع باشد! هر اقدامی که اینجا انجام دهید غیرقابل بازگشت است."
|
||||
msgstr ""
|
||||
"حواستان خیلی جمع باشد! هر اقدامی که اینجا انجام دهید غیرقابل بازگشت است."
|
||||
|
||||
msgid "Are you sure that you want to permanently delete this blog?"
|
||||
msgstr "آیا مطمئن هستید که میخواهید این بلاگ را برای همیشه حذف کنید؟"
|
||||
@@ -928,10 +1006,16 @@ msgid "Plume is a decentralized blogging engine."
|
||||
msgstr "پلوم یک موتور بلاگنویسی غیرمتمرکز است."
|
||||
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "نویسندگان میتوانند چندین بلاگ را مدیریت کنند که هر کدامشان مانند یک پایگاه وب مستقل هستند."
|
||||
msgstr ""
|
||||
"نویسندگان میتوانند چندین بلاگ را مدیریت کنند که هر کدامشان مانند یک پایگاه "
|
||||
"وب مستقل هستند."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "نوشتهها در سایر نمونههای پلوم نیز قابل مشاهده هستند و شما میتوانید با آنها به صورت مستقیم و از دیگر بنسازهها مانند ماستدون تعامل داشته باشید."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"نوشتهها در سایر نمونههای پلوم نیز قابل مشاهده هستند و شما میتوانید با آنها "
|
||||
"به صورت مستقیم و از دیگر بنسازهها مانند ماستدون تعامل داشته باشید."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "قوانین کامل را مطالعه کنید"
|
||||
@@ -1010,4 +1094,3 @@ msgstr "منتشر شده تحت این پروانه"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "پروانهٔ نوشته"
|
||||
|
||||
|
||||
+62
-21
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Artikkelisi on poistettu."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Näyttää siltä, että koetat poistaa artikkelia jota ei ole olemassa. Ehkä se on jo poistettu?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Näyttää siltä, että koetat poistaa artikkelia jota ei ole olemassa. Ehkä se "
|
||||
"on jo poistettu?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Tunnuksestasi ei saatu haettua tarpeeksi tietoja. Varmistathan että käyttäjätunkuksesi on oikein."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Tunnuksestasi ei saatu haettua tarpeeksi tietoja. Varmistathan että "
|
||||
"käyttäjätunkuksesi on oikein."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,7 +290,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +451,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +483,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +556,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +643,21 @@ msgstr "Oletus lisenssi artikelleille"
|
||||
msgid "Save these settings"
|
||||
msgstr "Tallenna nämä asetukset"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Jos aelailet tätä sivua vierailijana, sinusta ei kerätä yhtään dataa."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +666,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +678,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +760,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,7 +820,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -844,7 +879,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +890,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +907,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +970,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1052,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+134
-43
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Votre article a été supprimé."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Il semble que l'article que vous avez essayé de supprimer n'existe pas. Peut-être a-t-il déjà été supprimé ?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Il semble que l'article que vous avez essayé de supprimer n'existe pas. Peut-"
|
||||
"être a-t-il déjà été supprimé ?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Nous n'avons pas pu obtenir assez d'informations à propos de votre compte. Veuillez vous assurer que votre nom d'utilisateur est correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Nous n'avons pas pu obtenir assez d'informations à propos de votre compte. "
|
||||
"Veuillez vous assurer que votre nom d'utilisateur est correct."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +290,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Les inscriptions sont fermées dans cette instance."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Votre compte a été créé. Vous avez juste à vous connecter, avant de pouvoir l'utiliser."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Votre compte a été créé. Vous avez juste à vous connecter, avant de pouvoir "
|
||||
"l'utiliser."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Téléversement de média"
|
||||
@@ -292,7 +304,9 @@ msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
msgid "Useful for visually impaired people, as well as licensing information"
|
||||
msgstr "Utile pour les personnes malvoyantes, ainsi que pour les informations de licence"
|
||||
msgstr ""
|
||||
"Utile pour les personnes malvoyantes, ainsi que pour les informations de "
|
||||
"licence"
|
||||
|
||||
msgid "Content warning"
|
||||
msgstr "Avertissement"
|
||||
@@ -441,8 +455,12 @@ msgstr "Mot de passe"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Confirmation du mot de passe"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Désolé, mais les inscriptions sont fermées sur cette instance en particulier. Vous pouvez, toutefois, en trouver une autre."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Désolé, mais les inscriptions sont fermées sur cette instance en "
|
||||
"particulier. Vous pouvez, toutefois, en trouver une autre."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "Abonnements de {0}"
|
||||
@@ -454,7 +472,9 @@ msgid "Your Blogs"
|
||||
msgstr "Vos Blogs"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Vous n'avez pas encore de blog. Créez votre propre blog, ou demandez de vous joindre à un."
|
||||
msgstr ""
|
||||
"Vous n'avez pas encore de blog. Créez votre propre blog, ou demandez de vous "
|
||||
"joindre à un."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Commencer un nouveau blog"
|
||||
@@ -471,8 +491,11 @@ msgstr "Modifier votre compte"
|
||||
msgid "Your Profile"
|
||||
msgstr "Votre Profile"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Pour modifier votre avatar, téléversez-le dans votre galerie et sélectionner à partir de là."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Pour modifier votre avatar, téléversez-le dans votre galerie et sélectionner "
|
||||
"à partir de là."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Téléverser un avatar"
|
||||
@@ -508,7 +531,9 @@ msgid "Delete your account"
|
||||
msgstr "Supprimer votre compte"
|
||||
|
||||
msgid "Sorry, but as an admin, you can't leave your own instance."
|
||||
msgstr "Désolé, mais en tant qu'administrateur, vous ne pouvez pas laisser votre propre instance."
|
||||
msgstr ""
|
||||
"Désolé, mais en tant qu'administrateur, vous ne pouvez pas laisser votre "
|
||||
"propre instance."
|
||||
|
||||
msgid "Latest articles"
|
||||
msgstr "Derniers articles"
|
||||
@@ -538,13 +563,21 @@ msgid "Something broke on our side."
|
||||
msgstr "Nous avons cassé quelque chose."
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "Nous sommes désolé⋅e⋅s. Si vous pensez que c’est un bogue, merci de le signaler."
|
||||
msgstr ""
|
||||
"Nous sommes désolé⋅e⋅s. Si vous pensez que c’est un bogue, merci de le "
|
||||
"signaler."
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Jeton CSRF invalide"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Quelque chose ne va pas avec votre jeton CSRF. Assurez-vous que les cookies sont activés dans votre navigateur, et essayez de recharger cette page. Si vous continuez à voir cette erreur, merci de la signaler."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Quelque chose ne va pas avec votre jeton CSRF. Assurez-vous que les cookies "
|
||||
"sont activés dans votre navigateur, et essayez de recharger cette page. Si "
|
||||
"vous continuez à voir cette erreur, merci de la signaler."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Vous n’avez pas les droits."
|
||||
@@ -627,14 +660,32 @@ msgstr "Licence d'article par défaut"
|
||||
msgid "Save these settings"
|
||||
msgstr "Sauvegarder ces paramètres"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Si vous naviguez sur ce site en tant que visiteur, aucune donnée ne vous concernant n'est collectée."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Si vous naviguez sur ce site en tant que visiteur, aucune donnée ne vous "
|
||||
"concernant n'est collectée."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "En tant qu'utilisateur enregistré, vous devez fournir votre nom d'utilisateur (qui n'est pas forcément votre vrai nom), votre adresse e-mail fonctionnelle et un mot de passe, afin de pouvoir vous connecter, écrire des articles et commenter. Le contenu que vous soumettez est stocké jusqu'à ce que vous le supprimiez."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"En tant qu'utilisateur enregistré, vous devez fournir votre nom "
|
||||
"d'utilisateur (qui n'est pas forcément votre vrai nom), votre adresse e-mail "
|
||||
"fonctionnelle et un mot de passe, afin de pouvoir vous connecter, écrire des "
|
||||
"articles et commenter. Le contenu que vous soumettez est stocké jusqu'à ce "
|
||||
"que vous le supprimiez."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Lorsque vous vous connectez, nous stockons deux cookies, l'un pour garder votre session ouverte, le second pour empêcher d'autres personnes d'agir en votre nom. Nous ne stockons aucun autre cookie."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Lorsque vous vous connectez, nous stockons deux cookies, l'un pour garder "
|
||||
"votre session ouverte, le second pour empêcher d'autres personnes d'agir en "
|
||||
"votre nom. Nous ne stockons aucun autre cookie."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Emails bloqués"
|
||||
@@ -642,8 +693,14 @@ msgstr "Emails bloqués"
|
||||
msgid "Email address"
|
||||
msgstr "Adresse mail"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "L'adresse e-mail que vous souhaitez bloquer. Pour bloquer des domaines, vous pouvez utiliser la syntaxe : '*@example.com' qui bloque toutes les adresses du domain exemple.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"L'adresse e-mail que vous souhaitez bloquer. Pour bloquer des domaines, vous "
|
||||
"pouvez utiliser la syntaxe : '*@example.com' qui bloque toutes les adresses "
|
||||
"du domain exemple.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Note"
|
||||
@@ -651,14 +708,21 @@ msgstr "Note"
|
||||
msgid "Notify the user?"
|
||||
msgstr "Notifier l'utilisateurice ?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Optionnel, affiche un message lors de la création d'un compte avec cette adresse"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Optionnel, affiche un message lors de la création d'un compte avec cette "
|
||||
"adresse"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Notification de blocage"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "Le message à afficher lors de la création d'un compte avec cette adresse mail"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"Le message à afficher lors de la création d'un compte avec cette adresse mail"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Bloquer une adresse"
|
||||
@@ -729,8 +793,12 @@ msgstr "Sous-titre"
|
||||
msgid "Content"
|
||||
msgstr "Contenu"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Vous pouvez télécharger des médias dans votre galerie, et copier leur code Markdown dans vos articles pour les insérer."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Vous pouvez télécharger des médias dans votre galerie, et copier leur code "
|
||||
"Markdown dans vos articles pour les insérer."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Téléverser un média"
|
||||
@@ -787,8 +855,12 @@ msgstr "Je ne veux plus le repartager"
|
||||
msgid "Boost"
|
||||
msgstr "Partager"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Connectez-vous{1}, ou {2}utilisez votre compte sur le Fediverse{3} pour interagir avec cet article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Connectez-vous{1}, ou {2}utilisez votre compte sur le Fediverse{3} pour "
|
||||
"interagir avec cet article"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Commentaires"
|
||||
@@ -806,7 +878,9 @@ msgid "Are you sure?"
|
||||
msgstr "Êtes-vous sûr⋅e ?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Cet article est toujours un brouillon. Seuls vous et les autres auteur·e·s peuvent le voir."
|
||||
msgstr ""
|
||||
"Cet article est toujours un brouillon. Seuls vous et les autres auteur·e·s "
|
||||
"peuvent le voir."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Seuls vous et les autres auteur·e·s peuvent modifier cet article."
|
||||
@@ -844,8 +918,12 @@ msgstr "Mettre à jour le mot de passe"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Vérifiez votre boîte de réception!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Nous avons envoyé un mail à l'adresse que vous nous avez donnée, avec un lien pour réinitialiser votre mot de passe."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Nous avons envoyé un mail à l'adresse que vous nous avez donnée, avec un "
|
||||
"lien pour réinitialiser votre mot de passe."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Envoyer un lien pour réinitialiser le mot de passe"
|
||||
@@ -853,8 +931,12 @@ msgstr "Envoyer un lien pour réinitialiser le mot de passe"
|
||||
msgid "This token has expired"
|
||||
msgstr "Ce jeton a expiré"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Veuillez recommencer le processus en cliquant <a href=\"/password-reset\">ici</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Veuillez recommencer le processus en cliquant <a href=\"/password-reset"
|
||||
"\">ici</a>."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Nouveau Blog"
|
||||
@@ -868,8 +950,11 @@ msgstr "Créer le blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Modifier \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Vous pouvez téléverser des images dans votre galerie, pour les utiliser comme icônes de blog ou illustrations."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Vous pouvez téléverser des images dans votre galerie, pour les utiliser "
|
||||
"comme icônes de blog ou illustrations."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Téléverser des images"
|
||||
@@ -928,10 +1013,17 @@ msgid "Plume is a decentralized blogging engine."
|
||||
msgstr "Plume est un moteur de blog décentralisé."
|
||||
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Les auteurs peuvent avoir plusieurs blogs, chacun étant comme un site indépendant."
|
||||
msgstr ""
|
||||
"Les auteurs peuvent avoir plusieurs blogs, chacun étant comme un site "
|
||||
"indépendant."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Les articles sont également visibles sur d'autres instances Plume, et vous pouvez interagir avec eux directement à partir d'autres plateformes comme Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Les articles sont également visibles sur d'autres instances Plume, et vous "
|
||||
"pouvez interagir avec eux directement à partir d'autres plateformes comme "
|
||||
"Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Lire les règles détaillées"
|
||||
@@ -1010,4 +1102,3 @@ msgstr "Placé sous cette licence"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Licence de l'article"
|
||||
|
||||
|
||||
+113
-38
@@ -214,12 +214,19 @@ msgid "Your article has been deleted."
|
||||
msgstr "Eliminouse o artigo."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Semella que o artigo que quere eliminar non existe. Igual xa foi eliminado?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Semella que o artigo que quere eliminar non existe. Igual xa foi eliminado?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Non se puido obter información suficiente sobre a súa conta. Por favor asegúrese de que o nome de usuaria é correcto."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Non se puido obter información suficiente sobre a súa conta. Por favor "
|
||||
"asegúrese de que o nome de usuaria é correcto."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,7 +289,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "O rexistro está pechado en esta instancia."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr "Creouse a túa conta. Agora só tes que conectarte para poder utilizala."
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -292,7 +301,8 @@ msgid "Description"
|
||||
msgstr "Descrición"
|
||||
|
||||
msgid "Useful for visually impaired people, as well as licensing information"
|
||||
msgstr "Útil para persoas con deficiencias visuais, así como información da licenza"
|
||||
msgstr ""
|
||||
"Útil para persoas con deficiencias visuais, así como información da licenza"
|
||||
|
||||
msgid "Content warning"
|
||||
msgstr "Aviso sobre o contido"
|
||||
@@ -441,8 +451,12 @@ msgstr "Contrasinal"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Confirmación do contrasinal"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Desculpe, pero o rexistro en esta instancia está pechado. Porén pode atopar outra no fediverso."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Desculpe, pero o rexistro en esta instancia está pechado. Porén pode atopar "
|
||||
"outra no fediverso."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "Suscricións de {0}"
|
||||
@@ -471,8 +485,11 @@ msgstr "Edite a súa conta"
|
||||
msgid "Your Profile"
|
||||
msgstr "O seu Perfil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Para cambiar o avatar, suba a imaxe a súa galería e despois escollaa desde alí."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Para cambiar o avatar, suba a imaxe a súa galería e despois escollaa desde "
|
||||
"alí."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Subir un avatar"
|
||||
@@ -508,7 +525,9 @@ msgid "Delete your account"
|
||||
msgstr "Eliminar a súa conta"
|
||||
|
||||
msgid "Sorry, but as an admin, you can't leave your own instance."
|
||||
msgstr "Lamentámolo, pero como administradora, non pode deixar a súa propia instancia."
|
||||
msgstr ""
|
||||
"Lamentámolo, pero como administradora, non pode deixar a súa propia "
|
||||
"instancia."
|
||||
|
||||
msgid "Latest articles"
|
||||
msgstr "Últimos artigos"
|
||||
@@ -543,8 +562,14 @@ msgstr "Lamentálmolo. Si cree que é un bug, infórmenos por favor."
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Testemuño CSRF non válido"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Hai un problema co seu testemuño CSRF. Asegúrese de ter as cookies activadas no navegador, e recargue a páxina. Si persiste o aviso de este fallo, informe por favor."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Hai un problema co seu testemuño CSRF. Asegúrese de ter as cookies activadas "
|
||||
"no navegador, e recargue a páxina. Si persiste o aviso de este fallo, "
|
||||
"informe por favor."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Non ten permiso."
|
||||
@@ -627,14 +652,29 @@ msgstr "Licenza por omisión dos artigos"
|
||||
msgid "Save these settings"
|
||||
msgstr "Gardar estas preferencias"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Se estás lendo esta web como visitante non se recollen datos sobre ti."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Como usuaria rexistrada, tes que proporcionar un nome de usuaria (que non ten que ser o teu nome real), un enderezo activo de correo electrónico e un contrasinal, para poder conectarte, escribir artigos e comentar. O contido que envíes permanece ata que o borres."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Como usuaria rexistrada, tes que proporcionar un nome de usuaria (que non "
|
||||
"ten que ser o teu nome real), un enderezo activo de correo electrónico e un "
|
||||
"contrasinal, para poder conectarte, escribir artigos e comentar. O contido "
|
||||
"que envíes permanece ata que o borres."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Cando te conectas, gardamos dous testemuños, un para manter a sesión aberta e o segundo para previr que outra xente actúe no teu nome. Non gardamos máis testemuños."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Cando te conectas, gardamos dous testemuños, un para manter a sesión aberta "
|
||||
"e o segundo para previr que outra xente actúe no teu nome. Non gardamos máis "
|
||||
"testemuños."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Emails na lista de bloqueo"
|
||||
@@ -642,8 +682,14 @@ msgstr "Emails na lista de bloqueo"
|
||||
msgid "Email address"
|
||||
msgstr "Enderezo de email"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "O enderezo de email que queres bloquear. Para poder bloquear dominios, podes usar sintaxe globbing, por exemplo '*@exemplo.com' bloquea todos os enderezos de exemplo.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"O enderezo de email que queres bloquear. Para poder bloquear dominios, podes "
|
||||
"usar sintaxe globbing, por exemplo '*@exemplo.com' bloquea todos os "
|
||||
"enderezos de exemplo.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Nota"
|
||||
@@ -651,14 +697,22 @@ msgstr "Nota"
|
||||
msgid "Notify the user?"
|
||||
msgstr "Notificar a usuaria?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Optativo, mostra unha mensaxe a usuaria cando intenta crear unha conta con ese enderezo"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Optativo, mostra unha mensaxe a usuaria cando intenta crear unha conta con "
|
||||
"ese enderezo"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Notificación do bloqueo"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "A mensaxe será amosada cando a usuaria intente crear unha conta on ese enderezo de email"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"A mensaxe será amosada cando a usuaria intente crear unha conta on ese "
|
||||
"enderezo de email"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Engadir a lista de bloqueo"
|
||||
@@ -729,8 +783,12 @@ msgstr "Subtítulo"
|
||||
msgid "Content"
|
||||
msgstr "Contido"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Pode subir medios a galería e despois copiar o seu código Markdown nos artigos para incrustalos."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Pode subir medios a galería e despois copiar o seu código Markdown nos "
|
||||
"artigos para incrustalos."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Subir medios"
|
||||
@@ -787,8 +845,12 @@ msgstr "Xa non quero promocionar este artigo"
|
||||
msgid "Boost"
|
||||
msgstr "Promover"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Conectar{1}, ou {2}utilice a súa conta no Fediverso{3} para interactuar con este artigo"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Conectar{1}, ou {2}utilice a súa conta no Fediverso{3} para interactuar "
|
||||
"con este artigo"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Comentarios"
|
||||
@@ -844,8 +906,12 @@ msgstr "Actualizar contrasinal"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Comprobe o seu correo!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Enviamoslle un correo ao enderezo que nos deu, con unha ligazón para restablecer o contrasinal."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Enviamoslle un correo ao enderezo que nos deu, con unha ligazón para "
|
||||
"restablecer o contrasinal."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Enviar ligazón para restablecer contrasinal"
|
||||
@@ -853,8 +919,11 @@ msgstr "Enviar ligazón para restablecer contrasinal"
|
||||
msgid "This token has expired"
|
||||
msgstr "O testemuño caducou"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Inicia o preceso de novo premendo <a href=\"/password-reset\">aquí</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Inicia o preceso de novo premendo <a href=\"/password-reset\">aquí</a>."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Novo Blog"
|
||||
@@ -868,8 +937,10 @@ msgstr "Crear blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Editar \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Pode subir imaxes a súa galería, e utilizalas como iconas do blog ou banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Pode subir imaxes a súa galería, e utilizalas como iconas do blog ou banners."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Subir imaxes"
|
||||
@@ -928,10 +999,15 @@ msgid "Plume is a decentralized blogging engine."
|
||||
msgstr "Plume é un motor de publicación descentralizada."
|
||||
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "As autoras poden xestionar múltiples blogs, cada un no seu propio sitio web."
|
||||
msgstr ""
|
||||
"As autoras poden xestionar múltiples blogs, cada un no seu propio sitio web."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Os artigos tamén son visibles en outras instancias Plume, e pode interactuar con eles directamente ou desde plataformas como Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Os artigos tamén son visibles en outras instancias Plume, e pode interactuar "
|
||||
"con eles directamente ou desde plataformas como Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Lea o detalle das normas"
|
||||
@@ -1010,4 +1086,3 @@ msgstr "Publicado baixo esta licenza"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Licenza do artigo"
|
||||
|
||||
|
||||
+58
-20
@@ -10,7 +10,8 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;\n"
|
||||
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||
"%100==4 ? 2 : 3;\n"
|
||||
"X-Crowdin-Project: plume\n"
|
||||
"X-Crowdin-Project-ID: 352097\n"
|
||||
"X-Crowdin-Language: he\n"
|
||||
@@ -214,11 +215,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +287,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +448,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +480,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +553,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +640,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +663,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +675,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +757,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -791,7 +821,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -848,7 +880,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -857,7 +891,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -872,7 +908,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -936,7 +973,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1016,4 +1055,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+62
-21
@@ -214,12 +214,18 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "आपके अकाउंट के बारे में पर्याप्त जानकारी नहीं मिल पायी. कृपया जांच करें की आपका यूजरनाम सही है."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"आपके अकाउंट के बारे में पर्याप्त जानकारी नहीं मिल पायी. कृपया जांच करें की आपका यूजरनाम "
|
||||
"सही है."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,7 +288,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +449,9 @@ msgstr "पासवर्ड"
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +481,8 @@ msgstr "अपने अकाउंट में बदलाव करें"
|
||||
msgid "Your Profile"
|
||||
msgstr "आपकी प्रोफाइल"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +554,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +641,21 @@ msgstr "डिफ़ॉल्ट आलेख लायसेंस"
|
||||
msgid "Save these settings"
|
||||
msgstr "इन सेटिंग्स को सेव करें"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +664,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +676,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +758,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,8 +818,12 @@ msgstr "मुझे अब इसे बूस्ट नहीं करना
|
||||
msgid "Boost"
|
||||
msgstr "बूस्ट"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}लोग इन करें{1}, या {2}आपके फेडिवेर्से अकाउंट का इस्तेमाल करें{3} इस आर्टिकल से इंटरैक्ट करने के लिए"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}लोग इन करें{1}, या {2}आपके फेडिवेर्से अकाउंट का इस्तेमाल करें{3} इस आर्टिकल से इंटरैक्ट "
|
||||
"करने के लिए"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "कमैंट्स"
|
||||
@@ -844,7 +879,9 @@ msgstr "पासवर्ड अपडेट करें"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "आपका इनबॉक्स चेक करें"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr "हमने आपके दिए गए इ-मेल पे पासवर्ड रिसेट लिंक भेज दिया है."
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +890,9 @@ msgstr "पासवर्ड रिसेट करने के लिए ल
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +907,8 @@ msgstr "ब्लॉग बनाएं"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "{0} में बदलाव करें"
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "आप गैलरी में फोटो दाल कर, उनका ब्लॉग आइकॉन या बैनर के लिए उपयोग कर सकते हैं"
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +970,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1052,3 @@ msgstr "इस लिसेंसे के साथ पब्लिश कि
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "आर्टिकल लाइसेंस"
|
||||
|
||||
|
||||
+58
-20
@@ -10,7 +10,8 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Crowdin-Project: plume\n"
|
||||
"X-Crowdin-Project-ID: 352097\n"
|
||||
"X-Crowdin-Language: hr\n"
|
||||
@@ -214,11 +215,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +287,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +448,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +480,8 @@ msgstr "Uredite svoj račun"
|
||||
msgid "Your Profile"
|
||||
msgstr "Tvoj Profil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +553,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +640,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +663,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +675,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +757,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -789,7 +819,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -846,7 +878,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -855,7 +889,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -870,7 +906,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -933,7 +970,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1013,4 +1052,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+56
-19
@@ -214,11 +214,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +286,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +447,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +479,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +552,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +639,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +662,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +674,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +756,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -787,7 +816,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -844,7 +875,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +886,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,7 +903,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -930,7 +966,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1048,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+128
-42
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Il tuo articolo è stato eliminato."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Sembra che l'articolo che cerchi di eliminare non esista. Forse è già stato cancellato?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Sembra che l'articolo che cerchi di eliminare non esista. Forse è già stato "
|
||||
"cancellato?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Non è stato possibile ottenere abbastanza informazioni sul tuo account. Per favore assicurati che il tuo nome utente sia corretto."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Non è stato possibile ottenere abbastanza informazioni sul tuo account. Per "
|
||||
"favore assicurati che il tuo nome utente sia corretto."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +290,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Le registrazioni sono chiuse su questa istanza."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Il tuo account è stato creato. Ora devi solo effettuare l'accesso prima di poterlo utilizzare."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Il tuo account è stato creato. Ora devi solo effettuare l'accesso prima di "
|
||||
"poterlo utilizzare."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Caricamento di un media"
|
||||
@@ -441,8 +453,12 @@ msgstr "Password"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Conferma password"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Spiacenti, ma le registrazioni sono chiuse per questa istanza. Puoi comunque trovarne un'altra."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Spiacenti, ma le registrazioni sono chiuse per questa istanza. Puoi comunque "
|
||||
"trovarne un'altra."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "Iscrizioni di {0}"
|
||||
@@ -454,7 +470,9 @@ msgid "Your Blogs"
|
||||
msgstr "I Tuoi Blog"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Non hai ancora nessun blog. Creane uno tuo, o chiedi di unirti ad uno esistente."
|
||||
msgstr ""
|
||||
"Non hai ancora nessun blog. Creane uno tuo, o chiedi di unirti ad uno "
|
||||
"esistente."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Inizia un nuovo blog"
|
||||
@@ -471,8 +489,11 @@ msgstr "Modifica il tuo account"
|
||||
msgid "Your Profile"
|
||||
msgstr "Il Tuo Profilo"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Per modificare la tua immagine di profilo, caricala nella tua galleria e poi selezionala da là."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Per modificare la tua immagine di profilo, caricala nella tua galleria e poi "
|
||||
"selezionala da là."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Carica un'immagine di profilo"
|
||||
@@ -502,7 +523,8 @@ msgid "Danger zone"
|
||||
msgstr "Zona pericolosa"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be cancelled."
|
||||
msgstr "Fai molta attenzione, qualsiasi scelta fatta qui non può essere annullata."
|
||||
msgstr ""
|
||||
"Fai molta attenzione, qualsiasi scelta fatta qui non può essere annullata."
|
||||
|
||||
msgid "Delete your account"
|
||||
msgstr "Elimina il tuo account"
|
||||
@@ -543,8 +565,14 @@ msgstr "Scusa per questo. Se pensi sia un bug, per favore segnalacelo."
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Token CSRF non valido"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Qualcosa è andato storto con il tuo token CSRF. Assicurati di aver abilitato i cookies nel tuo browser, e prova a ricaricare questa pagina. Se l'errore si dovesse ripresentare, per favore segnalacelo."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Qualcosa è andato storto con il tuo token CSRF. Assicurati di aver abilitato "
|
||||
"i cookies nel tuo browser, e prova a ricaricare questa pagina. Se l'errore "
|
||||
"si dovesse ripresentare, per favore segnalacelo."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Non sei autorizzato."
|
||||
@@ -627,14 +655,31 @@ msgstr "Licenza predefinita degli articoli"
|
||||
msgid "Save these settings"
|
||||
msgstr "Salva queste impostazioni"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Se stai navigando in questo sito come visitatore, non vengono raccolti dati su di te."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Se stai navigando in questo sito come visitatore, non vengono raccolti dati "
|
||||
"su di te."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Come utente registrato, devi fornire il tuo nome utente (che può anche non essere il tuo vero nome), un tuo indirizzo email funzionante e una password, per poter accedere, scrivere articoli e commenti. Il contenuto che invii è memorizzato fino a quando non lo elimini."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Come utente registrato, devi fornire il tuo nome utente (che può anche non "
|
||||
"essere il tuo vero nome), un tuo indirizzo email funzionante e una password, "
|
||||
"per poter accedere, scrivere articoli e commenti. Il contenuto che invii è "
|
||||
"memorizzato fino a quando non lo elimini."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Quando accedi, conserviamo due cookie, uno per mantenere aperta la sessione, il secondo per impedire ad altre persone di agire al tuo posto. Non conserviamo nessun altro cookie."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Quando accedi, conserviamo due cookie, uno per mantenere aperta la sessione, "
|
||||
"il secondo per impedire ad altre persone di agire al tuo posto. Non "
|
||||
"conserviamo nessun altro cookie."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Email Blocklist"
|
||||
@@ -642,8 +687,14 @@ msgstr "Email Blocklist"
|
||||
msgid "Email address"
|
||||
msgstr "Indirizzo email"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "L'indirizzo email che vuoi bloccare. Per bloccare i domini, puoi usare la sintassi di globbing, per esempio '*@example.com' blocca tutti gli indirizzi da example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"L'indirizzo email che vuoi bloccare. Per bloccare i domini, puoi usare la "
|
||||
"sintassi di globbing, per esempio '*@example.com' blocca tutti gli indirizzi "
|
||||
"da example.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Nota"
|
||||
@@ -651,14 +702,22 @@ msgstr "Nota"
|
||||
msgid "Notify the user?"
|
||||
msgstr "Notifica l'utente?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Opzionale, mostra un messaggio all'utente quando tenta di creare un conto con quell'indirizzo"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Opzionale, mostra un messaggio all'utente quando tenta di creare un conto "
|
||||
"con quell'indirizzo"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Notifica di blocklist"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "Il messaggio da mostrare quando l'utente tenta di creare un profilo con questo indirizzo email"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"Il messaggio da mostrare quando l'utente tenta di creare un profilo con "
|
||||
"questo indirizzo email"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Aggiungi indirizzo messo in blocklist"
|
||||
@@ -729,8 +788,12 @@ msgstr "Sottotitolo"
|
||||
msgid "Content"
|
||||
msgstr "Contenuto"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Puoi caricare media nella tua galleria, e poi copiare il loro codice Markdown nei tuoi articoli per inserirli."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Puoi caricare media nella tua galleria, e poi copiare il loro codice "
|
||||
"Markdown nei tuoi articoli per inserirli."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Carica media"
|
||||
@@ -787,8 +850,12 @@ msgstr "Non voglio più boostare questo"
|
||||
msgid "Boost"
|
||||
msgstr "Boost"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Accedi{1}, o {2}usa il tuo account del Fediverso{3} per interagire con questo articolo"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Accedi{1}, o {2}usa il tuo account del Fediverso{3} per interagire con "
|
||||
"questo articolo"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Commenti"
|
||||
@@ -806,7 +873,9 @@ msgid "Are you sure?"
|
||||
msgstr "Sei sicuro?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Questo articolo è ancora una bozza. Solo voi e gli altri autori la potete vedere."
|
||||
msgstr ""
|
||||
"Questo articolo è ancora una bozza. Solo voi e gli altri autori la potete "
|
||||
"vedere."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Solo tu e gli altri autori potete modificare questo articolo."
|
||||
@@ -844,8 +913,12 @@ msgstr "Aggiorna password"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Controlla la tua casella di posta in arrivo!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Ti abbiamo inviato una mail all'indirizzo che ci hai fornito, con il collegamento per reimpostare la tua password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Ti abbiamo inviato una mail all'indirizzo che ci hai fornito, con il "
|
||||
"collegamento per reimpostare la tua password."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Invia collegamento per reimpostare la password"
|
||||
@@ -853,8 +926,12 @@ msgstr "Invia collegamento per reimpostare la password"
|
||||
msgid "This token has expired"
|
||||
msgstr "Questo token è scaduto"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Sei pregato di riavviare il processo cliccando <a href=\"/password-reset\">qui</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Sei pregato di riavviare il processo cliccando <a href=\"/password-reset"
|
||||
"\">qui</a>."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Nuovo Blog"
|
||||
@@ -868,8 +945,11 @@ msgstr "Crea blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Modifica \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Puoi caricare immagini nella tua galleria, ed utilizzarle come icone del blog, o copertine."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Puoi caricare immagini nella tua galleria, ed utilizzarle come icone del "
|
||||
"blog, o copertine."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Carica immagini"
|
||||
@@ -887,7 +967,8 @@ msgid "Update blog"
|
||||
msgstr "Aggiorna blog"
|
||||
|
||||
msgid "Be very careful, any action taken here can't be reversed."
|
||||
msgstr "Fai molta attenzione, qualsiasi scelta fatta qui non può essere annullata."
|
||||
msgstr ""
|
||||
"Fai molta attenzione, qualsiasi scelta fatta qui non può essere annullata."
|
||||
|
||||
msgid "Are you sure that you want to permanently delete this blog?"
|
||||
msgstr "Sei sicuro di voler eliminare permanentemente questo blog?"
|
||||
@@ -928,10 +1009,16 @@ msgid "Plume is a decentralized blogging engine."
|
||||
msgstr "Plume è un motore di blog decentralizzato."
|
||||
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Gli autori possono gestire blog multipli, ognuno come fosse un sito web differente."
|
||||
msgstr ""
|
||||
"Gli autori possono gestire blog multipli, ognuno come fosse un sito web "
|
||||
"differente."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Gli articoli sono anche visibili su altre istanze Plume, e puoi interagire con loro direttamente da altre piattaforme come Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Gli articoli sono anche visibili su altre istanze Plume, e puoi interagire "
|
||||
"con loro direttamente da altre piattaforme come Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Leggi le regole dettagliate"
|
||||
@@ -1010,4 +1097,3 @@ msgstr "Pubblicato sotto questa licenza"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Licenza dell'articolo"
|
||||
|
||||
|
||||
+110
-37
@@ -214,12 +214,19 @@ msgid "Your article has been deleted."
|
||||
msgstr "投稿を削除しました。"
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "削除しようとしている投稿は存在しないようです。すでに削除していませんか?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"削除しようとしている投稿は存在しないようです。すでに削除していませんか?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "お使いのアカウントに関する十分な情報を取得できませんでした。ご自身のユーザー名が正しいことを確認してください。"
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"お使いのアカウントに関する十分な情報を取得できませんでした。ご自身のユーザー"
|
||||
"名が正しいことを確認してください。"
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,7 +289,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "登録はこのインスタンス内に限定されています。"
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr "アカウントを作成しました。使用前に、ログインする必要があります。"
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,8 +450,12 @@ msgstr "パスワード"
|
||||
msgid "Password confirmation"
|
||||
msgstr "パスワードの確認"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "申し訳ありませんが、このインスタンスでの登録は限定されています。ですが、他のインスタンスを見つけることはできます。"
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"申し訳ありませんが、このインスタンスでの登録は限定されています。ですが、他の"
|
||||
"インスタンスを見つけることはできます。"
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "{0} がフォロー中のユーザー"
|
||||
@@ -454,7 +467,9 @@ msgid "Your Blogs"
|
||||
msgstr "ブログ"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "ブログはまだありません。ご自身のブログを作成するか、他の人のブログに参加できるか確認しましょう。"
|
||||
msgstr ""
|
||||
"ブログはまだありません。ご自身のブログを作成するか、他の人のブログに参加でき"
|
||||
"るか確認しましょう。"
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "新しいブログを開始"
|
||||
@@ -471,7 +486,8 @@ msgstr "アカウントを編集"
|
||||
msgid "Your Profile"
|
||||
msgstr "プロフィール"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "アバターを変更するには、ギャラリーにアップロードして選択してください。"
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -538,13 +554,20 @@ msgid "Something broke on our side."
|
||||
msgstr "サーバー側で何らかの問題が発生しました。"
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "申し訳ありません。これがバグだと思われる場合は、問題を報告してください。"
|
||||
msgstr ""
|
||||
"申し訳ありません。これがバグだと思われる場合は、問題を報告してください。"
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "無効な CSRF トークンです"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "CSRF トークンに問題が発生しました。お使いのブラウザーで Cookie が有効になっていることを確認して、このページを再読み込みしてみてください。このエラーメッセージが表示され続ける場合は、問題を報告してください。"
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"CSRF トークンに問題が発生しました。お使いのブラウザーで Cookie が有効になって"
|
||||
"いることを確認して、このページを再読み込みしてみてください。このエラーメッ"
|
||||
"セージが表示され続ける場合は、問題を報告してください。"
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "許可されていません。"
|
||||
@@ -627,14 +650,31 @@ msgstr "投稿のデフォルトのライセンス"
|
||||
msgid "Save these settings"
|
||||
msgstr "設定を保存"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "閲覧者としてこのサイトをご覧になっている場合、ご自身のデータは一切収集されません。"
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"閲覧者としてこのサイトをご覧になっている場合、ご自身のデータは一切収集されま"
|
||||
"せん。"
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "登録ユーザーの場合、ログインしたり記事やコメントを投稿したりできるようにするため、ご自身のユーザー名(本名である必要はありません)、利用可能なメールアドレス、パスワードを指定する必要があります。投稿したコンテンツは、削除しない限り保存されます。"
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"登録ユーザーの場合、ログインしたり記事やコメントを投稿したりできるようにする"
|
||||
"ため、ご自身のユーザー名(本名である必要はありません)、利用可能なメールアド"
|
||||
"レス、パスワードを指定する必要があります。投稿したコンテンツは、削除しない限"
|
||||
"り保存されます。"
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "ログインの際に、2 個の Cookie を保存します。1 つはセッションを開いた状態にするため、もう 1 つは誰かがあなたになりすますのを防ぐために使われます。この他には、一切の Cookie を保存しません。"
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"ログインの際に、2 個の Cookie を保存します。1 つはセッションを開いた状態にす"
|
||||
"るため、もう 1 つは誰かがあなたになりすますのを防ぐために使われます。この他に"
|
||||
"は、一切の Cookie を保存しません。"
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "ブロックするメール"
|
||||
@@ -642,8 +682,13 @@ msgstr "ブロックするメール"
|
||||
msgid "Email address"
|
||||
msgstr "メールアドレス"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "ブロックするメールアドレス。*記法を使ってドメインをブロックすることができます。例えば '*@example.com' はexample.com の全てのアドレスをブロックします。"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"ブロックするメールアドレス。*記法を使ってドメインをブロックすることができま"
|
||||
"す。例えば '*@example.com' はexample.com の全てのアドレスをブロックします。"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "メモ"
|
||||
@@ -651,14 +696,21 @@ msgstr "メモ"
|
||||
msgid "Notify the user?"
|
||||
msgstr "ユーザーに知らせるか?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "省略可。このアドレスでアカウントを作ろうとした時にユーザーにメッセージを表示します"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"省略可。このアドレスでアカウントを作ろうとした時にユーザーにメッセージを表示"
|
||||
"します"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "ブロックリストの通知"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "ユーザーがこのメールアドレスでアカウントを作ろうとした時に表示するメッセージ"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"ユーザーがこのメールアドレスでアカウントを作ろうとした時に表示するメッセージ"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "ブロックするアドレスを追加"
|
||||
@@ -729,8 +781,12 @@ msgstr "サブタイトル"
|
||||
msgid "Content"
|
||||
msgstr "コンテンツ"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "メディアをギャラリーにアップロードして、その Markdown コードをコピーして投稿に挿入できます。"
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"メディアをギャラリーにアップロードして、その Markdown コードをコピーして投稿"
|
||||
"に挿入できます。"
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "メディアをアップロード"
|
||||
@@ -785,8 +841,12 @@ msgstr "このブーストを取り消します"
|
||||
msgid "Boost"
|
||||
msgstr "ブースト"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "この記事と関わるには{0}ログイン{1}するか {2}Fediverse アカウントを使用{3}してください"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"この記事と関わるには{0}ログイン{1}するか {2}Fediverse アカウントを使用{3}して"
|
||||
"ください"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "コメント"
|
||||
@@ -842,8 +902,12 @@ msgstr "パスワードを更新"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "受信トレイを確認してください!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "指定された宛先に、パスワードをリセットするためのリンクを記載したメールを送信しました。"
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"指定された宛先に、パスワードをリセットするためのリンクを記載したメールを送信"
|
||||
"しました。"
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "パスワードリセットリンクを送信"
|
||||
@@ -851,8 +915,12 @@ msgstr "パスワードリセットリンクを送信"
|
||||
msgid "This token has expired"
|
||||
msgstr "このトークンは有効期限切れです"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "<a href=\"/password-reset\">こちら</a>をクリックして、手順をやり直してください。"
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"<a href=\"/password-reset\">こちら</a>をクリックして、手順をやり直してくださ"
|
||||
"い。"
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "新しいブログ"
|
||||
@@ -866,8 +934,10 @@ msgstr "ブログを作成"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "\"{}\" を編集"
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "ギャラリーにアップロードした画像を、ブログアイコンやバナーに使用できます。"
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"ギャラリーにアップロードした画像を、ブログアイコンやバナーに使用できます。"
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "画像をアップロード"
|
||||
@@ -927,8 +997,12 @@ msgstr "Plume は分散型ブログエンジンです。"
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "作成者は、それぞれ独自のウェブサイトとして複数のブログを管理できます。"
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "投稿は他の Plume インスタンスからも閲覧可能であり、Mastdon のように他のプラットフォームから直接記事にアクセスできます。"
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"投稿は他の Plume インスタンスからも閲覧可能であり、Mastdon のように他のプラッ"
|
||||
"トフォームから直接記事にアクセスできます。"
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "詳細な規則を読む"
|
||||
@@ -1007,4 +1081,3 @@ msgstr "適用されているライセンス"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "投稿のライセンス"
|
||||
|
||||
|
||||
+56
-19
@@ -214,11 +214,15 @@ msgid "Your article has been deleted."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
@@ -282,7 +286,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr ""
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,7 +447,9 @@ msgstr ""
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
@@ -471,7 +479,8 @@ msgstr ""
|
||||
msgid "Your Profile"
|
||||
msgstr ""
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload an avatar"
|
||||
@@ -543,7 +552,10 @@ msgstr ""
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr ""
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
|
||||
msgid "You are not authorized."
|
||||
@@ -627,13 +639,21 @@ msgstr ""
|
||||
msgid "Save these settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
@@ -642,7 +662,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +674,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,7 +756,9 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload media"
|
||||
@@ -785,7 +814,9 @@ msgstr ""
|
||||
msgid "Boost"
|
||||
msgstr ""
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
|
||||
msgid "Comments"
|
||||
@@ -842,7 +873,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -851,7 +884,9 @@ msgstr ""
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -866,7 +901,8 @@ msgstr ""
|
||||
msgid "Edit \"{}\""
|
||||
msgstr ""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Upload images"
|
||||
@@ -927,7 +963,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1007,4 +1045,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+121
-39
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Je artikel is verwijderd."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Het lijkt erop dat het artikel dat je probeerde te verwijderen niet bestaat. Misschien is het al verdwenen?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Het lijkt erop dat het artikel dat je probeerde te verwijderen niet bestaat. "
|
||||
"Misschien is het al verdwenen?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Kon niet genoeg informatie over je account opvragen. Controleer of je gebruikersnaam juist is."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Kon niet genoeg informatie over je account opvragen. Controleer of je "
|
||||
"gebruikersnaam juist is."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +290,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Registraties zijn gesloten op deze server."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Je account is aangemaakt. Nu hoe je alleen maar in te loggen, om het te kunnen gebruiken."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Je account is aangemaakt. Nu hoe je alleen maar in te loggen, om het te "
|
||||
"kunnen gebruiken."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Media uploaden"
|
||||
@@ -441,8 +453,12 @@ msgstr "Wachtwoord"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Wachtwoordbevestiging"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Excuses, maar registraties zijn gesloten voor deze server. Je kunt wel een andere vinden."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Excuses, maar registraties zijn gesloten voor deze server. Je kunt wel een "
|
||||
"andere vinden."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "{0}'s abonnementen"
|
||||
@@ -454,7 +470,9 @@ msgid "Your Blogs"
|
||||
msgstr "Je blogs"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Je hebt nog geen blog. Maak een blog, of vraag om aan een blog mee te mogen doen."
|
||||
msgstr ""
|
||||
"Je hebt nog geen blog. Maak een blog, of vraag om aan een blog mee te mogen "
|
||||
"doen."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Start een nieuwe blog"
|
||||
@@ -471,8 +489,11 @@ msgstr "Bewerk je account"
|
||||
msgid "Your Profile"
|
||||
msgstr "Je profiel"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Om je avatar te veranderen upload je die naar je galerij en selecteer je avatar daar."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Om je avatar te veranderen upload je die naar je galerij en selecteer je "
|
||||
"avatar daar."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Upload een avatar"
|
||||
@@ -543,8 +564,14 @@ msgstr "Sorry. Als je denkt dat dit een bug is, rapporteer het dan."
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Ongeldig CSRF token"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Er is iets mis met het CSRF-token. Zorg ervoor dat cookies ingeschakeld zijn in je browser en probeer deze pagina opnieuw te laden. Als je dit foutbericht blijft zien, rapporteer het dan."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Er is iets mis met het CSRF-token. Zorg ervoor dat cookies ingeschakeld zijn "
|
||||
"in je browser en probeer deze pagina opnieuw te laden. Als je dit "
|
||||
"foutbericht blijft zien, rapporteer het dan."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Je bent niet geautoriseerd."
|
||||
@@ -627,14 +654,31 @@ msgstr "Standaard artikellicentie"
|
||||
msgid "Save these settings"
|
||||
msgstr "Deze instellingen opslaan"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Als je deze site als bezoeker bekijkt, worden er geen gegevens over jou verzameld."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Als je deze site als bezoeker bekijkt, worden er geen gegevens over jou "
|
||||
"verzameld."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Als geregistreerde gebruiker moet je je gebruikersnaam invoeren (dat hoeft niet je echte naam te zijn), je bestaande e-mailadres en een wachtwoord om in te kunnen loggen, artikelen en commentaar te schrijven. De inhoud die je opgeeft wordt opgeslagen totdat je die verwijdert."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Als geregistreerde gebruiker moet je je gebruikersnaam invoeren (dat hoeft "
|
||||
"niet je echte naam te zijn), je bestaande e-mailadres en een wachtwoord om "
|
||||
"in te kunnen loggen, artikelen en commentaar te schrijven. De inhoud die je "
|
||||
"opgeeft wordt opgeslagen totdat je die verwijdert."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Als je inlogt, slaan we twee cookies op, de eerste om je sessie open te houden, de tweede om andere mensen te verhinderen om namens jou iets te doen. We slaan geen andere cookies op."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Als je inlogt, slaan we twee cookies op, de eerste om je sessie open te "
|
||||
"houden, de tweede om andere mensen te verhinderen om namens jou iets te "
|
||||
"doen. We slaan geen andere cookies op."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Geblokkeerde e-mailadressen"
|
||||
@@ -642,8 +686,14 @@ msgstr "Geblokkeerde e-mailadressen"
|
||||
msgid "Email address"
|
||||
msgstr "E-mailadres"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "Het e-mailadres dat je wilt blokkeren. Om hele domeinen te blokkeren, kunt je de globale syntax gebruiken, bijvoorbeeld '*@example.com' blokkeert alle adressen van example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"Het e-mailadres dat je wilt blokkeren. Om hele domeinen te blokkeren, kunt "
|
||||
"je de globale syntax gebruiken, bijvoorbeeld '*@example.com' blokkeert alle "
|
||||
"adressen van example.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Opmerking"
|
||||
@@ -651,14 +701,22 @@ msgstr "Opmerking"
|
||||
msgid "Notify the user?"
|
||||
msgstr "De gebruiker informeren?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Optioneel. Toont een bericht aan gebruikers wanneer ze een account met dat adres proberen aan te maken"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Optioneel. Toont een bericht aan gebruikers wanneer ze een account met dat "
|
||||
"adres proberen aan te maken"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Blokkeringsmelding"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "Het bericht dat wordt getoond als iemand een account met dit e-mailadres probeert aan te maken"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"Het bericht dat wordt getoond als iemand een account met dit e-mailadres "
|
||||
"probeert aan te maken"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Te blokkeren adres toevoegen"
|
||||
@@ -729,8 +787,12 @@ msgstr "Ondertitel"
|
||||
msgid "Content"
|
||||
msgstr "Inhoud"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Je kunt media uploaden naar je galerij en vervolgens de Markdown code in je artikelen kopiëren om ze in te voegen."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Je kunt media uploaden naar je galerij en vervolgens de Markdown code in je "
|
||||
"artikelen kopiëren om ze in te voegen."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Media uploaden"
|
||||
@@ -787,8 +849,12 @@ msgstr "Ik wil dit niet meer boosten"
|
||||
msgid "Boost"
|
||||
msgstr "Boosten"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Log in{1}, of {2}gebruik je Fediverse account{3} om over dit artikel te communiceren"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Log in{1}, of {2}gebruik je Fediverse account{3} om over dit artikel te "
|
||||
"communiceren"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Reacties"
|
||||
@@ -806,7 +872,9 @@ msgid "Are you sure?"
|
||||
msgstr "Weet je het zeker?"
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Dit artikel is nog een concept. Alleen jij en andere auteurs kunnen het bekijken."
|
||||
msgstr ""
|
||||
"Dit artikel is nog een concept. Alleen jij en andere auteurs kunnen het "
|
||||
"bekijken."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Alleen jij en andere auteurs kunnen dit artikel bewerken."
|
||||
@@ -844,8 +912,12 @@ msgstr "Wachtwoord bijwerken"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Ga naar je inbox!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "We hebben een e-mail gestuurd naar het adres dat je hebt opgegeven, met een link om je wachtwoord te resetten."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"We hebben een e-mail gestuurd naar het adres dat je hebt opgegeven, met een "
|
||||
"link om je wachtwoord te resetten."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Wachtwoordresetlink versturen"
|
||||
@@ -853,8 +925,12 @@ msgstr "Wachtwoordresetlink versturen"
|
||||
msgid "This token has expired"
|
||||
msgstr "Dit token is verlopen"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Start het proces opnieuw door <a href=\"/password-reset\">hier</a> te klikken."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Start het proces opnieuw door <a href=\"/password-reset\">hier</a> te "
|
||||
"klikken."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Nieuwe blog"
|
||||
@@ -868,8 +944,11 @@ msgstr "Creëer blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "\"{}\" bewerken"
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Je kunt afbeeldingen uploaden naar je galerij om ze als blogpictogrammen of banners te gebruiken."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Je kunt afbeeldingen uploaden naar je galerij om ze als blogpictogrammen of "
|
||||
"banners te gebruiken."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Afbeeldingen opladen"
|
||||
@@ -930,8 +1009,12 @@ msgstr "Plume is een gedecentraliseerde blogging-engine."
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Auteurs kunnen meerdere blogs beheren, elk als een eigen website."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Artikelen zijn ook zichtbaar op andere Plume-servers en je kunt ze direct vanuit andere platforms zoals Mastodon gebruiken."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Artikelen zijn ook zichtbaar op andere Plume-servers en je kunt ze direct "
|
||||
"vanuit andere platforms zoals Mastodon gebruiken."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Lees de gedetailleerde instructies"
|
||||
@@ -1010,4 +1093,3 @@ msgstr "Gepubliceerd onder deze licentie"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Artikel licentie"
|
||||
|
||||
|
||||
+96
-32
@@ -214,12 +214,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Artikkelen er slettet."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Det ser ut som arikkelen du prøvde allerede er slettet; Kanskje den allerede er fjernet?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Det ser ut som arikkelen du prøvde allerede er slettet; Kanskje den allerede "
|
||||
"er fjernet?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Klarte ikke å hente informasjon om kontoen din. Vennligst sjekk at brukernavnet er korrekt."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Klarte ikke å hente informasjon om kontoen din. Vennligst sjekk at "
|
||||
"brukernavnet er korrekt."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,7 +290,9 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Registrering er lukket på denne instansen."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr "Kontoen din er opprettet. Du må logge inn for å bruke den."
|
||||
|
||||
msgid "Media upload"
|
||||
@@ -441,8 +451,12 @@ msgstr "Passord"
|
||||
msgid "Password confirmation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Beklager, nyregistreringer er lukket på denne instansen. Du kan istedet finne en annen instans."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Beklager, nyregistreringer er lukket på denne instansen. Du kan istedet "
|
||||
"finne en annen instans."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr ""
|
||||
@@ -471,8 +485,10 @@ msgstr "Endre kontoen din"
|
||||
msgid "Your Profile"
|
||||
msgstr "Din profil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "For å endre avataren din må du legge den til galleriet og velge den der."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"For å endre avataren din må du legge den til galleriet og velge den der."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Last opp en avatar"
|
||||
@@ -538,13 +554,21 @@ msgid "Something broke on our side."
|
||||
msgstr "Noe brakk hos oss."
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "Beklager! Hvis du tror at dette er en programfeil, setter vi pris på at du sier ifra."
|
||||
msgstr ""
|
||||
"Beklager! Hvis du tror at dette er en programfeil, setter vi pris på at du "
|
||||
"sier ifra."
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Ugyldig CSRF token"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Noe er galt med CSRF token. Påse at informasjonskapsler er aktivert i nettleseren, prøv så å hente nettsiden på nytt. Hvis du fortsatt ser denne feilen, setter vi pris på om du sier ifra."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Noe er galt med CSRF token. Påse at informasjonskapsler er aktivert i "
|
||||
"nettleseren, prøv så å hente nettsiden på nytt. Hvis du fortsatt ser denne "
|
||||
"feilen, setter vi pris på om du sier ifra."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Du har ikke tilgang."
|
||||
@@ -627,14 +651,30 @@ msgstr "Standardlisens for artikler"
|
||||
msgid "Save these settings"
|
||||
msgstr "Lagre innstillingene"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Hvis du besøker denne siden som gjest, lagres ingen informasjon om deg."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Hvis du besøker denne siden som gjest, lagres ingen informasjon om deg."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "For å registrere deg må du oppgi ett brukernavn (dette behøver ikke å samsvare med ditt ekte navn), en fungerende epost-adresse og ett passord. Dette gjør at du kan logge inn, skrive artikler og kommentarer. Innholdet du legger inn blir lagret inntil du sletter det."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"For å registrere deg må du oppgi ett brukernavn (dette behøver ikke å "
|
||||
"samsvare med ditt ekte navn), en fungerende epost-adresse og ett passord. "
|
||||
"Dette gjør at du kan logge inn, skrive artikler og kommentarer. Innholdet du "
|
||||
"legger inn blir lagret inntil du sletter det."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Når du logger inn lagrer vi to informasjonskapsler. Den har informasjon om sesjonen din, den andre beskytter identiteten din. Vi lagrer ingen andre informasjonskapsler."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Når du logger inn lagrer vi to informasjonskapsler. Den har informasjon om "
|
||||
"sesjonen din, den andre beskytter identiteten din. Vi lagrer ingen andre "
|
||||
"informasjonskapsler."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr ""
|
||||
@@ -642,7 +682,10 @@ msgstr ""
|
||||
msgid "Email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
|
||||
msgid "Note"
|
||||
@@ -651,13 +694,17 @@ msgstr ""
|
||||
msgid "Notify the user?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr ""
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
@@ -729,8 +776,12 @@ msgstr ""
|
||||
msgid "Content"
|
||||
msgstr "Innhold"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Du kan laste opp medier til galleriet, og så lime inn Markdown syntaksen inn i artiklen for å bruke dem."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Du kan laste opp medier til galleriet, og så lime inn Markdown syntaksen inn "
|
||||
"i artiklen for å bruke dem."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Last opp medie"
|
||||
@@ -787,8 +838,12 @@ msgstr "Jeg vil ikke fremheve dette lenger"
|
||||
msgid "Boost"
|
||||
msgstr "Fremhev"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Logg inn{1} eller {2}bruk din Fediverse konto{3} for å interaktere med denne artikkelen"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Logg inn{1} eller {2}bruk din Fediverse konto{3} for å interaktere med "
|
||||
"denne artikkelen"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Kommentarer"
|
||||
@@ -806,7 +861,8 @@ msgid "Are you sure?"
|
||||
msgstr ""
|
||||
|
||||
msgid "This article is still a draft. Only you and other authors can see it."
|
||||
msgstr "Denne artikkelen er ett utkast. Bare du og andre forfattere kan se den."
|
||||
msgstr ""
|
||||
"Denne artikkelen er ett utkast. Bare du og andre forfattere kan se den."
|
||||
|
||||
msgid "Only you and other authors can edit this article."
|
||||
msgstr "Bare du og andre forfattere kan endre denne artikkelen."
|
||||
@@ -844,7 +900,9 @@ msgstr ""
|
||||
msgid "Check your inbox!"
|
||||
msgstr ""
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
|
||||
msgid "Send password reset link"
|
||||
@@ -853,7 +911,9 @@ msgstr "Send lenke for tilbakestilling av passord"
|
||||
msgid "This token has expired"
|
||||
msgstr ""
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
|
||||
msgid "New Blog"
|
||||
@@ -868,8 +928,11 @@ msgstr "Opprett blogg"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Rediger \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Du kan legge opp bilder til galleriet ditt for å bruke den som bloggikoner eller bannere."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Du kan legge opp bilder til galleriet ditt for å bruke den som bloggikoner "
|
||||
"eller bannere."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Last opp bilder"
|
||||
@@ -930,7 +993,9 @@ msgstr ""
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr ""
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
@@ -1010,4 +1075,3 @@ msgstr ""
|
||||
|
||||
msgid "Article license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+127
-41
@@ -10,7 +10,9 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n"
|
||||
"%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n"
|
||||
"%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
||||
"X-Crowdin-Project: plume\n"
|
||||
"X-Crowdin-Project-ID: 352097\n"
|
||||
"X-Crowdin-Language: pl\n"
|
||||
@@ -214,12 +216,20 @@ msgid "Your article has been deleted."
|
||||
msgstr "Twój artykuł został usunięty."
|
||||
|
||||
# src/routes/posts.rs:612
|
||||
msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"
|
||||
msgstr "Wygląda na to, że artykuł który próbowałeś(-aś) usunąć nie istnieje. Może został usunięty wcześniej?"
|
||||
msgid ""
|
||||
"It looks like the article you tried to delete doesn't exist. Maybe it is "
|
||||
"already gone?"
|
||||
msgstr ""
|
||||
"Wygląda na to, że artykuł który próbowałeś(-aś) usunąć nie istnieje. Może "
|
||||
"został usunięty wcześniej?"
|
||||
|
||||
# src/routes/posts.rs:652
|
||||
msgid "Couldn't obtain enough information about your account. Please make sure your username is correct."
|
||||
msgstr "Nie można uzyskać wystarczającej ilości informacji o Twoim koncie. Upewnij się, że nazwa użytkownika jest prawidłowa."
|
||||
msgid ""
|
||||
"Couldn't obtain enough information about your account. Please make sure your "
|
||||
"username is correct."
|
||||
msgstr ""
|
||||
"Nie można uzyskać wystarczającej ilości informacji o Twoim koncie. Upewnij "
|
||||
"się, że nazwa użytkownika jest prawidłowa."
|
||||
|
||||
# src/routes/reshares.rs:54
|
||||
msgid "To reshare a post, you need to be logged in"
|
||||
@@ -282,8 +292,12 @@ msgid "Registrations are closed on this instance."
|
||||
msgstr "Rejestracje są zamknięte w tej instancji."
|
||||
|
||||
# src/routes/user.rs:549
|
||||
msgid "Your account has been created. Now you just need to log in, before you can use it."
|
||||
msgstr "Twoje konto zostało utworzone. Zanim będziesz mógł(-ogła) z niego korzystać, musisz się zalogować."
|
||||
msgid ""
|
||||
"Your account has been created. Now you just need to log in, before you can "
|
||||
"use it."
|
||||
msgstr ""
|
||||
"Twoje konto zostało utworzone. Zanim będziesz mógł(-ogła) z niego korzystać, "
|
||||
"musisz się zalogować."
|
||||
|
||||
msgid "Media upload"
|
||||
msgstr "Wysyłanie zawartości multimedialnej"
|
||||
@@ -292,7 +306,9 @@ msgid "Description"
|
||||
msgstr "Opis"
|
||||
|
||||
msgid "Useful for visually impaired people, as well as licensing information"
|
||||
msgstr "Przydatny dla osób z problemami ze wzrokiem oraz do umieszczenia informacji o licencji"
|
||||
msgstr ""
|
||||
"Przydatny dla osób z problemami ze wzrokiem oraz do umieszczenia informacji "
|
||||
"o licencji"
|
||||
|
||||
msgid "Content warning"
|
||||
msgstr "Ostrzeżenie o zawartości"
|
||||
@@ -441,8 +457,12 @@ msgstr "Hasło"
|
||||
msgid "Password confirmation"
|
||||
msgstr "Potwierdzenie hasła"
|
||||
|
||||
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
|
||||
msgstr "Przepraszamy, rejestracja jest zamknięta na tej instancji. Spróbuj znaleźć inną."
|
||||
msgid ""
|
||||
"Apologies, but registrations are closed on this particular instance. You "
|
||||
"can, however, find a different one."
|
||||
msgstr ""
|
||||
"Przepraszamy, rejestracja jest zamknięta na tej instancji. Spróbuj znaleźć "
|
||||
"inną."
|
||||
|
||||
msgid "{0}'s subscriptions"
|
||||
msgstr "Subskrypcje {0}"
|
||||
@@ -454,7 +474,9 @@ msgid "Your Blogs"
|
||||
msgstr "Twoje blogi"
|
||||
|
||||
msgid "You don't have any blog yet. Create your own, or ask to join one."
|
||||
msgstr "Nie posiadasz żadnego bloga. Utwórz własny, lub poproś o dołączanie do istniejącego."
|
||||
msgstr ""
|
||||
"Nie posiadasz żadnego bloga. Utwórz własny, lub poproś o dołączanie do "
|
||||
"istniejącego."
|
||||
|
||||
msgid "Start a new blog"
|
||||
msgstr "Utwórz nowy blog"
|
||||
@@ -471,8 +493,11 @@ msgstr "Edytuj swoje konto"
|
||||
msgid "Your Profile"
|
||||
msgstr "Twój profil"
|
||||
|
||||
msgid "To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr "Aby zmienić swój awatar, prześlij go do Twojej galerii, a następnie wybierz go stamtąd."
|
||||
msgid ""
|
||||
"To change your avatar, upload it to your gallery and then select from there."
|
||||
msgstr ""
|
||||
"Aby zmienić swój awatar, prześlij go do Twojej galerii, a następnie wybierz "
|
||||
"go stamtąd."
|
||||
|
||||
msgid "Upload an avatar"
|
||||
msgstr "Wczytaj awatara"
|
||||
@@ -538,13 +563,20 @@ msgid "Something broke on our side."
|
||||
msgstr "Coś poszło nie tak."
|
||||
|
||||
msgid "Sorry about that. If you think this is a bug, please report it."
|
||||
msgstr "Przepraszamy. Jeżeli uważasz że wystąpił błąd, prosimy o zgłoszenie go."
|
||||
msgstr ""
|
||||
"Przepraszamy. Jeżeli uważasz że wystąpił błąd, prosimy o zgłoszenie go."
|
||||
|
||||
msgid "Invalid CSRF token"
|
||||
msgstr "Nieprawidłowy token CSRF"
|
||||
|
||||
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
|
||||
msgstr "Coś poszło nie tak z tokenem CSRF. Upewnij się, że w przeglądarce są włączone pliki cookies i spróbuj odświeżyć stronę. Jeżeli wciąż widzisz tę wiadomość, zgłoś to."
|
||||
msgid ""
|
||||
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
|
||||
"you browser, and try reloading this page. If you continue to see this error "
|
||||
"message, please report it."
|
||||
msgstr ""
|
||||
"Coś poszło nie tak z tokenem CSRF. Upewnij się, że w przeglądarce są "
|
||||
"włączone pliki cookies i spróbuj odświeżyć stronę. Jeżeli wciąż widzisz tę "
|
||||
"wiadomość, zgłoś to."
|
||||
|
||||
msgid "You are not authorized."
|
||||
msgstr "Nie jesteś zalogowany."
|
||||
@@ -627,14 +659,31 @@ msgstr "Domyślna licencja artykułów"
|
||||
msgid "Save these settings"
|
||||
msgstr "Zapisz te ustawienia"
|
||||
|
||||
msgid "If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr "Jeśli przeglądasz tę witrynę jako odwiedzający, nie zbierasz żadnych danych o Tobie."
|
||||
msgid ""
|
||||
"If you are browsing this site as a visitor, no data about you is collected."
|
||||
msgstr ""
|
||||
"Jeśli przeglądasz tę witrynę jako odwiedzający, nie zbierasz żadnych danych "
|
||||
"o Tobie."
|
||||
|
||||
msgid "As a registered user, you have to provide your username (which does not have to be your real name), your functional email address and a password, in order to be able to log in, write articles and comment. The content you submit is stored until you delete it."
|
||||
msgstr "Jako zarejestrowany użytkownik, musisz podać swoją nazwę użytkownika (nie musi to być Twoje imię i nazwisko), działający adres e-mail i hasło, aby móc zalogować się, pisać artykuły i komentować. Dodane treści są przechowywane do czasu, gdy je usuniesz."
|
||||
msgid ""
|
||||
"As a registered user, you have to provide your username (which does not have "
|
||||
"to be your real name), your functional email address and a password, in "
|
||||
"order to be able to log in, write articles and comment. The content you "
|
||||
"submit is stored until you delete it."
|
||||
msgstr ""
|
||||
"Jako zarejestrowany użytkownik, musisz podać swoją nazwę użytkownika (nie "
|
||||
"musi to być Twoje imię i nazwisko), działający adres e-mail i hasło, aby móc "
|
||||
"zalogować się, pisać artykuły i komentować. Dodane treści są przechowywane "
|
||||
"do czasu, gdy je usuniesz."
|
||||
|
||||
msgid "When you log in, we store two cookies, one to keep your session open, the second to prevent other people to act on your behalf. We don't store any other cookies."
|
||||
msgstr "Po zalogowaniu się, przechowujemy dwa ciasteczka – jedno, aby utrzymać aktywną sesję i drugie, aby uniemożliwić innym podszywanie się pod Ciebie. Nie przechowujemy innych plików cookie."
|
||||
msgid ""
|
||||
"When you log in, we store two cookies, one to keep your session open, the "
|
||||
"second to prevent other people to act on your behalf. We don't store any "
|
||||
"other cookies."
|
||||
msgstr ""
|
||||
"Po zalogowaniu się, przechowujemy dwa ciasteczka – jedno, aby utrzymać "
|
||||
"aktywną sesję i drugie, aby uniemożliwić innym podszywanie się pod Ciebie. "
|
||||
"Nie przechowujemy innych plików cookie."
|
||||
|
||||
msgid "Blocklisted Emails"
|
||||
msgstr "Zablokowane adresy e-mail"
|
||||
@@ -642,8 +691,14 @@ msgstr "Zablokowane adresy e-mail"
|
||||
msgid "Email address"
|
||||
msgstr "Adresy e-mail"
|
||||
|
||||
msgid "The email address you wish to block. In order to block domains, you can use globbing syntax, for example '*@example.com' blocks all addresses from example.com"
|
||||
msgstr "Adres e-mail, który chcesz zablokować. Aby zablokować domeny, możesz użyć globbing syntax, na przykład '*@example.com' blokuje wszystkie adresy z example.com"
|
||||
msgid ""
|
||||
"The email address you wish to block. In order to block domains, you can use "
|
||||
"globbing syntax, for example '*@example.com' blocks all addresses from "
|
||||
"example.com"
|
||||
msgstr ""
|
||||
"Adres e-mail, który chcesz zablokować. Aby zablokować domeny, możesz użyć "
|
||||
"globbing syntax, na przykład '*@example.com' blokuje wszystkie adresy z "
|
||||
"example.com"
|
||||
|
||||
msgid "Note"
|
||||
msgstr "Notatka"
|
||||
@@ -651,14 +706,22 @@ msgstr "Notatka"
|
||||
msgid "Notify the user?"
|
||||
msgstr "Powiadomić użytkownika?"
|
||||
|
||||
msgid "Optional, shows a message to the user when they attempt to create an account with that address"
|
||||
msgstr "Opcjonalnie, pokazuje wiadomość użytkownikowi gdy próbuje utworzyć konto o tym adresie"
|
||||
msgid ""
|
||||
"Optional, shows a message to the user when they attempt to create an account "
|
||||
"with that address"
|
||||
msgstr ""
|
||||
"Opcjonalnie, pokazuje wiadomość użytkownikowi gdy próbuje utworzyć konto o "
|
||||
"tym adresie"
|
||||
|
||||
msgid "Blocklisting notification"
|
||||
msgstr "Zablokuj powiadomienie"
|
||||
|
||||
msgid "The message to be shown when the user attempts to create an account with this email address"
|
||||
msgstr "Wiadomość do wyświetlenia, gdy użytkownik próbuje utworzyć konto z tym adresem e-mail"
|
||||
msgid ""
|
||||
"The message to be shown when the user attempts to create an account with "
|
||||
"this email address"
|
||||
msgstr ""
|
||||
"Wiadomość do wyświetlenia, gdy użytkownik próbuje utworzyć konto z tym "
|
||||
"adresem e-mail"
|
||||
|
||||
msgid "Add blocklisted address"
|
||||
msgstr "Dodaj zablokowany adres"
|
||||
@@ -729,8 +792,12 @@ msgstr "Podtytuł"
|
||||
msgid "Content"
|
||||
msgstr "Zawartość"
|
||||
|
||||
msgid "You can upload media to your gallery, and then copy their Markdown code into your articles to insert them."
|
||||
msgstr "Możesz przesłać multimedia do swojej galerii, i następnie skopiuj ich kod Markdown do artykułów, aby je wstawić."
|
||||
msgid ""
|
||||
"You can upload media to your gallery, and then copy their Markdown code into "
|
||||
"your articles to insert them."
|
||||
msgstr ""
|
||||
"Możesz przesłać multimedia do swojej galerii, i następnie skopiuj ich kod "
|
||||
"Markdown do artykułów, aby je wstawić."
|
||||
|
||||
msgid "Upload media"
|
||||
msgstr "Przesłać media"
|
||||
@@ -791,8 +858,12 @@ msgstr "Nie chcę tego podbijać"
|
||||
msgid "Boost"
|
||||
msgstr "Podbij"
|
||||
|
||||
msgid "{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this article"
|
||||
msgstr "{0}Zaloguj się{1} lub {2}użyj konta w Fediwersum{3}, aby wejść w interakcje z tym artykułem"
|
||||
msgid ""
|
||||
"{0}Log in{1}, or {2}use your Fediverse account{3} to interact with this "
|
||||
"article"
|
||||
msgstr ""
|
||||
"{0}Zaloguj się{1} lub {2}użyj konta w Fediwersum{3}, aby wejść w interakcje "
|
||||
"z tym artykułem"
|
||||
|
||||
msgid "Comments"
|
||||
msgstr "Komentarze"
|
||||
@@ -848,8 +919,12 @@ msgstr "Zaktualizuj hasło"
|
||||
msgid "Check your inbox!"
|
||||
msgstr "Sprawdź do swoją skrzynki odbiorczej!"
|
||||
|
||||
msgid "We sent a mail to the address you gave us, with a link to reset your password."
|
||||
msgstr "Wysłaliśmy maila na adres, który nam podałeś, z linkiem do zresetowania hasła."
|
||||
msgid ""
|
||||
"We sent a mail to the address you gave us, with a link to reset your "
|
||||
"password."
|
||||
msgstr ""
|
||||
"Wysłaliśmy maila na adres, który nam podałeś, z linkiem do zresetowania "
|
||||
"hasła."
|
||||
|
||||
msgid "Send password reset link"
|
||||
msgstr "Wyślij e-mail resetujący hasło"
|
||||
@@ -857,8 +932,12 @@ msgstr "Wyślij e-mail resetujący hasło"
|
||||
msgid "This token has expired"
|
||||
msgstr "Ten token utracił własność"
|
||||
|
||||
msgid "Please start the process again by clicking <a href=\"/password-reset\">here</a>."
|
||||
msgstr "Rozpocznij ten proces ponownie klikając <a href=\"/password-reset\">tutaj</a>."
|
||||
msgid ""
|
||||
"Please start the process again by clicking <a href=\"/password-reset\">here</"
|
||||
"a>."
|
||||
msgstr ""
|
||||
"Rozpocznij ten proces ponownie klikając <a href=\"/password-reset\">tutaj</"
|
||||
"a>."
|
||||
|
||||
msgid "New Blog"
|
||||
msgstr "Nowy blog"
|
||||
@@ -872,8 +951,11 @@ msgstr "Utwórz blog"
|
||||
msgid "Edit \"{}\""
|
||||
msgstr "Edytuj \"{}\""
|
||||
|
||||
msgid "You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr "Możesz przesłać zdjęcia do swojej galerii, aby używać ich jako ikon, lub banery blogów."
|
||||
msgid ""
|
||||
"You can upload images to your gallery, to use them as blog icons, or banners."
|
||||
msgstr ""
|
||||
"Możesz przesłać zdjęcia do swojej galerii, aby używać ich jako ikon, lub "
|
||||
"banery blogów."
|
||||
|
||||
msgid "Upload images"
|
||||
msgstr "Przesyłać zdjęcia"
|
||||
@@ -936,8 +1018,13 @@ msgstr "Plume jest zdecentralizowanym silnikiem blogowym."
|
||||
msgid "Authors can manage multiple blogs, each as its own website."
|
||||
msgstr "Autorzy mogą zarządzać różne blogi, każdy jako unikalny stronie."
|
||||
|
||||
msgid "Articles are also visible on other Plume instances, and you can interact with them directly from other platforms like Mastodon."
|
||||
msgstr "Artykuły są również widoczne w innych instancjach Plume i możesz też wchodzić bezpośrednio interakcje z nimi z innych platform, takich jak Mastodon."
|
||||
msgid ""
|
||||
"Articles are also visible on other Plume instances, and you can interact "
|
||||
"with them directly from other platforms like Mastodon."
|
||||
msgstr ""
|
||||
"Artykuły są również widoczne w innych instancjach Plume i możesz też "
|
||||
"wchodzić bezpośrednio interakcje z nimi z innych platform, takich jak "
|
||||
"Mastodon."
|
||||
|
||||
msgid "Read the detailed rules"
|
||||
msgstr "Przeczytaj szczegółowe zasady"
|
||||
@@ -1016,4 +1103,3 @@ msgstr "Opublikowany na tej licencji"
|
||||
|
||||
msgid "Article license"
|
||||
msgstr "Licencja artykułu"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user