diff --git a/.drone.yml b/.drone.yml index 001714545f..311a116ccb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,6 +14,8 @@ steps: commands: - chown 1000:1000 . -R - git fetch --tags + - git submodule init + - git submodule update --recursive --remote - name: check formatting image: rustdocker/rust:nightly diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..4479b0734c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "crates/utils/translations"] + path = crates/utils/translations + url = https://github.com/LemmyNet/lemmy-translations.git diff --git a/crates/db_schema/src/aggregates/person_aggregates.rs b/crates/db_schema/src/aggregates/person_aggregates.rs index 1992875762..e0fc0734c3 100644 --- a/crates/db_schema/src/aggregates/person_aggregates.rs +++ b/crates/db_schema/src/aggregates/person_aggregates.rs @@ -3,7 +3,7 @@ use diesel::{result::Error, *}; use serde::{Deserialize, Serialize}; #[derive( - Queryable, Associations, Identifiable, PartialEq, Debug, Serialize, Deserialize, Clone, + Queryable, Associations, Identifiable, PartialEq, Debug, Serialize, Deserialize, Clone, Default, )] #[table_name = "person_aggregates"] pub struct PersonAggregates { @@ -23,19 +23,6 @@ impl PersonAggregates { } } -impl Default for PersonAggregates { - fn default() -> Self { - PersonAggregates { - id: 0, - person_id: Default::default(), - post_count: 0, - post_score: 0, - comment_count: 0, - comment_score: 0 - } - } -} - #[cfg(test)] mod tests { use crate::{ diff --git a/crates/utils/build.rs b/crates/utils/build.rs index 8a6749d8be..8fcef5c8fd 100644 --- a/crates/utils/build.rs +++ b/crates/utils/build.rs @@ -1,6 +1,6 @@ fn main() -> Result<(), Box> { rosetta_build::config() - .source("en", "translations/en.json") + .source("en", "translations/email/en.json") .fallback("en") .generate()?; diff --git a/crates/utils/translations b/crates/utils/translations new file mode 160000 index 0000000000..1314f10fbc --- /dev/null +++ b/crates/utils/translations @@ -0,0 +1 @@ +Subproject commit 1314f10fbc0db9c16ff4209a2885431024a14ed8 diff --git a/crates/utils/translations/en.json b/crates/utils/translations/en.json deleted file mode 100644 index 1ce2853a76..0000000000 --- a/crates/utils/translations/en.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "registration_approved_subject": "Registration approved for {username}", - "registration_approved_body": "Your registration application has been approved. Welcome to {hostname}!", - "password_reset_subject": "Password reset for {username}", - "password_reset_body": "

Password Reset Request for {username}


Click here to reset your password", - "verify_email_subject": "Verify your email address for {hostname}", - "verify_email_body": "Please click the link below to verify your email address for the account @{username}@{hostname}. Ignore this email if the account isn't yours.

, Verify your email", - "email_verified_subject": "Email verified for {username}", - "email_verified_body": "Your email has been verified.", - "notification_post_reply_subject": "Reply from {username}", - "notification_post_reply_body": "

Post reply


{username} - {comment_text}

inbox", - "notification_comment_reply_subject": "Reply from {username}", - "notification_comment_reply_body": "

Comment reply


{username} - {comment_text}

inbox", - "notification_mentioned_by_subject": "Mentioned by {username}", - "notification_mentioned_by_body": "

Person Mention


{username} - {comment_text}

inbox", - "notification_private_message_subject": "Private message from {username}", - "notification_private_message_body": "

Private message


{username} - {message_text}

inbox" -}