Commit graph

6259 commits

Author SHA1 Message Date
Ilja 75169a45f6
Also use actor_type to determine if an account is a bot in antiFollowbotPolicy 2022-05-09 10:44:43 -05:00
Tusooa Zhu ecf4e51849
Skip cache when /objects or /activities is authenticated
Ref: fix-local-public
2022-05-09 10:44:43 -05:00
Tusooa Zhu 370a241dbc
Allow to skip cache in Cache plug
Ref: fix-local-public
2022-05-09 10:44:43 -05:00
Tusooa Zhu f52283004b
Fix incorrect fallback when English is set to first language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 57faa36243
Support fallbacking to other languages 2022-05-09 10:44:43 -05:00
Tusooa Zhu ed9681270e
Lint 2022-05-09 10:44:43 -05:00
Tusooa Zhu 20c6b3c597
Support multiple locales from userLanguage cookie 2022-05-09 10:44:43 -05:00
Tusooa Zhu f3b7ee7836
Support multiple locales formally
elixir gettext current does not fully support fallback to another language [0].
But it might in the future. We adapt it so that all languages in Accept-Language
headers are received by Pleroma.Web.Gettext. User.languages is now a comma-separated
list.

[0]: https://github.com/elixir-gettext/gettext/issues/303
2022-05-09 10:44:43 -05:00
Tusooa Zhu ef1a046a2d
Make lint happy 2022-05-09 10:44:43 -05:00
Tusooa Zhu 3e5bfa03d0
Fallback to a variant if the language in general is not supported
For an example, here, zh is not supported, but zh_Hans and zh_Hant
are. If the user asks for zh, we should choose a variant for them
instead of fallbacking to default.

Some browsers (e.g. Firefox) does not allow users to customize
their language codes. For example, there is no zh-Hans, but only
zh, zh-CN, zh-TW, zh-HK, etc. This provides a workaround for
those users suffering from bad design decisions.
2022-05-09 10:44:43 -05:00
Tusooa Zhu d831e57089
Allow user to register with custom language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 4157fe8e11
Allow update_credentials to update User.language 2022-05-09 10:44:43 -05:00
Tusooa Zhu 8e1d3b5591
Send emails i18n'd using backend-stored user language 2022-05-09 10:44:43 -05:00
Tusooa Zhu dff9733943
Make mail and mailer translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu c7dff104ea
Make static fe translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu be33d11d69
Fix tests 2022-05-09 10:44:43 -05:00
Tusooa Zhu 87d54a0ab0
Make mfa pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 5c674211ea
Make oauth pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 0ffb91a2d3
Use proper lang attributes in htmls 2022-05-09 10:44:43 -05:00
Tusooa Zhu 95b905443c
Make tag feed translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 7b467dd955
Make password reset pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu ece007c6f9
Make lint happy 2022-05-09 10:44:43 -05:00
Tusooa Zhu 304fad22b2
Make remote follow pages translatable 2022-05-09 10:44:43 -05:00
Tusooa Zhu 2e69846e65
Prefer userLanguage cookie over Accept-Language header in detecting locale
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2022-05-09 10:44:43 -05:00
Sam Therapy 05facac1a4
ReactToLike: add missing emojis, make the log clear 2022-03-19 18:39:10 +01:00
Sam Therapy 5e7e56e305
Add a react to like MRF
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-03-19 18:09:22 +01:00
feld 9d518b65fd
Revert "Merge branch 'revert/notice-routes' into 'develop'"
This reverts merge request !3576
2022-03-05 00:34:01 +01:00
Sean King 2842684e81
Revert "Merge branch 'notice-routes' into 'develop'" 2022-03-05 00:34:00 +01:00
Sam Therapy 0fb1684fb7
Update copyright, also
https://codeberg.org/newroma-dev/newroma/pulls/12

Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-02-12 11:53:32 -06:00
Sam Therapy 33c0a207ba
Shove all changes in one commit
Moderators: reorganize :admin_api pipeline in Router

Add block notify from Soapbox
2022-02-12 11:53:32 -06:00
marcin mikołajczak e473bcf7a0 Max media attachment count
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-06 17:41:15 +01:00
marcin mikołajczak f8f2a17754 Birthdays: Fix outgoing federation of birth dates
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-02-01 12:00:26 +01:00
Alex Gleason 3bf257171f
ForceMentionsInContent: improve display of Markdown posts 2022-01-27 14:15:06 -06:00
Alex Gleason 27cb3d6273
ForceMentionsInContent: don't apply it to top-level posts 2022-01-26 21:24:26 -06:00
bot a4de79ced0 ForceBotUnlistedPolicy: fix to stop unlisting my posts >:( 2022-01-26 22:53:02 +00:00
Alex Gleason 0604b0dd09
ForceMentionsInContent: don't mention self 2022-01-25 12:33:47 -06:00
Alex Gleason 0f4e0e667e Merge branch 'recipients-inline' into 'develop'
ForceMentionsInContent: wrap mentions in a span, fix the formatting

See merge request pleroma/pleroma!3620
2022-01-25 17:43:39 +00:00
Alex Gleason 65b4d2ce84
ForceMentionsInContent: fix order of mentions 2022-01-25 10:42:34 -06:00
marcin mikołajczak ab12a05a43 AccountView: Add test for show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25 17:34:36 +01:00
marcin mikołajczak c1ae35ff2c Fix show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25 17:04:41 +01:00
Alex Gleason 267184b70e
ForceMentionsInContentTest: return mentions in a not terrible format 2022-01-24 20:03:43 -06:00
Alex Gleason c5a20c80c4
ForceMentionsInContent: simplify finding users 2022-01-24 19:44:44 -06:00
Alex Gleason d5644a52aa
ForceMentionsInContent: wrap inline mentions with span tag 2022-01-24 19:11:45 -06:00
Alex Gleason 1bbc701a3a
ForceMentionsInContent: use to instead of tag 2022-01-24 19:11:14 -06:00
marcin mikołajczak 0266bc3c96 Birthdays: hide_birthday -> show_birthday
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-23 09:13:33 +01:00
Alex Gleason aaa9314f4c
Merge remote-tracking branch 'origin/develop' into birth-dates 2022-01-22 14:24:50 -06:00
Alex Gleason 66e8c6f90f
Birthdays: birth_date --> birthday 2022-01-22 13:21:55 -06:00
Finn Behrens 8328289619 Add autocompelete values suggested by Apple
Link: https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element
2022-01-22 10:00:43 +01:00
Alex Gleason 6ffe43af70 Merge branch 'private-pins' into 'develop'
Support private pinned posts from Mastodon

See merge request pleroma/pleroma!3611
2022-01-20 23:18:24 +00:00
marcin mikołajczak 88c21b9282 Support private pinned posts from Mastodon
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-20 12:35:32 +01:00