Skip to content

Commit

Permalink
Merge pull request #408 from kmycode/upstream-20230103
Browse files Browse the repository at this point in the history
Upstream 20230103
  • Loading branch information
kmycode authored Jan 3, 2024
2 parents 41631fe + 5532d68 commit 7e79182
Show file tree
Hide file tree
Showing 62 changed files with 1,351 additions and 325 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -44,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -57,6 +57,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{matrix.language}}'

This file was deleted.

1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ RUN \
procps \
tini \
tzdata \
wget \
; \
# Patch Ruby to use jemalloc
patchelf --add-needed libjemalloc.so.2 /usr/local/bin/ruby; \
Expand Down
31 changes: 16 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ GEM
attr_required (1.0.1)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.860.0)
aws-sdk-core (3.189.0)
aws-partitions (1.873.0)
aws-sdk-core (3.190.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.74.0)
aws-sdk-kms (1.75.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.141.0)
aws-sdk-s3 (1.142.0)
aws-sdk-core (~> 3, >= 3.189.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
Expand Down Expand Up @@ -175,7 +175,8 @@ GEM
blurhash (0.1.7)
bootsnap (1.17.0)
msgpack (~> 1.2)
brakeman (6.1.0)
brakeman (6.1.1)
racc
browser (5.3.1)
brpoplpush-redis_script (0.1.3)
concurrent-ruby (~> 1.0, >= 1.0.5)
Expand Down Expand Up @@ -301,7 +302,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fast_blank (1.0.1)
fastimage (2.2.7)
fastimage (2.3.0)
ffi (1.15.5)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
Expand Down Expand Up @@ -456,9 +457,9 @@ GEM
azure-storage-blob (~> 2.0.1)
hashie (~> 5.0)
memory_profiler (1.0.1)
mime-types (3.5.1)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1003)
mime-types-data (3.2023.1205)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
Expand All @@ -481,7 +482,7 @@ GEM
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nokogiri (1.15.5)
nokogiri (1.16.0)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
oj (3.16.3)
Expand Down Expand Up @@ -510,7 +511,7 @@ GEM
validate_email
validate_url
webfinger (~> 1.2)
openssl (3.1.0)
openssl (3.2.0)
openssl-signature_algorithm (1.3.0)
openssl (> 2.0)
orm_adapter (0.5.0)
Expand Down Expand Up @@ -543,7 +544,7 @@ GEM
psych (5.1.2)
stringio
public_suffix (5.0.4)
puma (6.4.0)
puma (6.4.1)
nio4r (~> 2.0)
pundit (2.3.1)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -681,10 +682,10 @@ GEM
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-performance (1.20.0)
rubocop-performance (1.20.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rails (2.23.0)
rubocop-rails (2.23.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
Expand Down Expand Up @@ -784,7 +785,7 @@ GEM
unf (~> 0.1.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2023.3)
tzinfo-data (1.2023.4)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
Expand All @@ -799,7 +800,7 @@ GEM
public_suffix
warden (1.2.9)
rack (>= 2.0.9)
webauthn (3.0.0)
webauthn (3.1.0)
android_key_attestation (~> 0.3.0)
awrence (~> 1.1)
bindata (~> 2.4)
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/api/v1/streaming_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def index

def streaming_api_url
Addressable::URI.parse(request.url).tap do |uri|
uri.host = Addressable::URI.parse(Rails.configuration.x.streaming_api_base_url).host
base_url = Addressable::URI.parse(Rails.configuration.x.streaming_api_base_url)
uri.host = base_url.host
uri.port = base_url.port
end.to_s
end
end
5 changes: 4 additions & 1 deletion app/javascript/mastodon/components/media_attachments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
lang: PropTypes.string,
height: PropTypes.number,
width: PropTypes.number,
visible: PropTypes.bool,
};

static defaultProps = {
Expand Down Expand Up @@ -51,7 +52,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
};

render () {
const { status, width, height } = this.props;
const { status, width, height, visible } = this.props;
const mediaAttachments = status.get('media_attachments');
const language = status.getIn(['language', 'translation']) || status.get('language') || this.props.lang;

Expand Down Expand Up @@ -99,6 +100,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
height={height}
inline
sensitive={status.get('sensitive')}
visible={visible}
onOpenVideo={noop}
/>
)}
Expand All @@ -113,6 +115,7 @@ export default class MediaAttachments extends ImmutablePureComponent {
lang={language}
sensitive={status.get('sensitive')}
defaultWidth={width}
visible={visible}
height={height}
onOpenMedia={noop}
/>
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/visibility_icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const messages = defineMessages({
},
mutual_short: {
id: 'privacy.mutual.short',
defaultMessage: 'Mutual followers only',
defaultMessage: 'Mutual only',
},
circle_short: {
id: 'privacy.circle.short',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class Footer extends ImmutablePureComponent {

if (status.get('in_reply_to_id', null) === null) {
replyIcon = 'reply';
replyIconComponent = RepeatIcon;
replyIconComponent = ReplyIcon;
replyTitle = intl.formatMessage(messages.reply);
} else {
replyIcon = 'reply-all';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class StatusCheckBox extends PureComponent {
</div>

<StatusContent status={status} />
<MediaAttachments status={status} />
<MediaAttachments status={status} visible={false} />
</div>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class FocalPointModal extends ImmutablePureComponent {
const worker = createWorker({
workerPath: tesseractWorkerPath,
corePath: tesseractCorePath,
langPath: `${assetHost}/ocr/lang-data/`,
langPath: `${assetHost}/ocr/lang-data`,
logger: ({ status, progress }) => {
if (status === 'recognizing text') {
this.setState({ ocrStatus: 'detecting', progress });
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"account.featured_tags.last_status_never": "Няма публикации",
"account.featured_tags.title": "Главни хаштагове на {name}",
"account.follow": "Последване",
"account.follow_back": "Последване взаимно",
"account.followers": "Последователи",
"account.followers.empty": "Още никой не следва потребителя.",
"account.followers_counter": "{count, plural, one {{counter} последовател} other {{counter} последователи}}",
Expand All @@ -52,6 +53,7 @@
"account.mute_notifications_short": "Заглушаване на известията",
"account.mute_short": "Заглушаване",
"account.muted": "Заглушено",
"account.mutual": "Взаимни",
"account.no_bio": "Няма представен опис.",
"account.open_original_page": "Отваряне на първообразната страница",
"account.posts": "Публикации",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"account.featured_tags.last_status_never": "No hi ha tuts",
"account.featured_tags.title": "etiquetes destacades de {name}",
"account.follow": "Segueix",
"account.follow_back": "Segueix",
"account.follow_back": "Segueix tu també",
"account.followers": "Seguidors",
"account.followers.empty": "A aquest usuari encara no el segueix ningú.",
"account.followers_counter": "{count, plural, one {{counter} seguidor} other {{counter} Seguidors}}",
Expand Down
11 changes: 9 additions & 2 deletions app/javascript/mastodon/locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"account.blocked": "Blociwyd",
"account.browse_more_on_origin_server": "Pori mwy ar y proffil gwreiddiol",
"account.cancel_follow_request": "Tynnu cais i ddilyn",
"account.copy": "Copïo dolen i'r proffil",
"account.direct": "Crybwyll yn breifat @{name}",
"account.disable_notifications": "Stopiwch fy hysbysu pan fydd @{name} yn postio",
"account.domain_blocked": "Parth wedi ei flocio",
Expand All @@ -31,6 +32,7 @@
"account.featured_tags.last_status_never": "Dim postiadau",
"account.featured_tags.title": "Prif hashnodau {name}",
"account.follow": "Dilyn",
"account.follow_back": "Dilyn yn ôl",
"account.followers": "Dilynwyr",
"account.followers.empty": "Does neb yn dilyn y defnyddiwr hwn eto.",
"account.followers_counter": "{count, plural, one {Dilynwr: {counter}} other {Dilynwyr: {counter}}}",
Expand All @@ -51,6 +53,7 @@
"account.mute_notifications_short": "Distewi hysbysiadau",
"account.mute_short": "Tewi",
"account.muted": "Wedi anwybyddu",
"account.mutual": "Cydgydnabod",
"account.no_bio": "Dim disgrifiad wedi'i gynnig.",
"account.open_original_page": "Agor y dudalen wreiddiol",
"account.posts": "Postiadau",
Expand Down Expand Up @@ -168,9 +171,9 @@
"confirmations.delete.confirm": "Dileu",
"confirmations.delete.message": "Ydych chi'n sicr eich bod eisiau dileu y post hwn?",
"confirmations.delete_list.confirm": "Dileu",
"confirmations.delete_list.message": "Ydych chi'n siŵr eich bod eisiau dileu y rhestr hwn am byth?",
"confirmations.delete_list.message": "Ydych chi'n siŵr eich bod eisiau dileu'r rhestr hwn am byth?",
"confirmations.discard_edit_media.confirm": "Dileu",
"confirmations.discard_edit_media.message": "Mae gennych newidiadau heb eu cadw i'r disgrifiad cyfryngau neu'r rhagolwg, eu taflu beth bynnag?",
"confirmations.discard_edit_media.message": "Mae gennych newidiadau heb eu cadw i'r disgrifiad cyfryngau neu'r rhagolwg - eu dileu beth bynnag?",
"confirmations.domain_block.confirm": "Blocio parth cyfan",
"confirmations.domain_block.message": "Ydych chi wir, wir eisiau blocio'r holl {domain}? Fel arfer, mae blocio neu dewi pobl penodol yn broses mwy effeithiol. Fyddwch chi ddim yn gweld cynnwys o'r parth hwnnw mewn ffrydiau cyhoeddus neu yn eich hysbysiadau. Bydd eich dilynwyr o'r parth hwnnw yn cael eu ddileu.",
"confirmations.edit.confirm": "Golygu",
Expand Down Expand Up @@ -481,12 +484,15 @@
"onboarding.follows.title": "Yn boblogaidd ar Mastodon",
"onboarding.profile.discoverable": "Gwnewch fy mhroffil yn un y gellir ei ddarganfod",
"onboarding.profile.discoverable_hint": "Pan fyddwch yn optio i mewn i ddarganfodadwyedd ar Mastodon, gall eich postiadau ymddangos mewn canlyniadau chwilio a thueddiadau, ac efallai y bydd eich proffil yn cael ei awgrymu i bobl sydd â diddordebau tebyg i chi.",
"onboarding.profile.display_name": "Enw dangos",
"onboarding.profile.display_name_hint": "Eich enw llawn neu'ch enw hwyl…",
"onboarding.profile.lead": "Gallwch chi bob amser gwblhau hyn yn ddiweddarach yn y gosodiadau, lle mae hyd yn oed mwy o ddewisiadau cyfaddasu ar gael.",
"onboarding.profile.note": "Bywgraffiad",
"onboarding.profile.note_hint": "Gallwch @grybwyll pobl eraill neu #hashnodau…",
"onboarding.profile.save_and_continue": "Cadw a pharhau",
"onboarding.profile.title": "Gosodiad proffil",
"onboarding.profile.upload_avatar": "Llwytho llun proffil",
"onboarding.profile.upload_header": "Llwytho pennyn proffil",
"onboarding.share.lead": "Cofiwch ddweud wrth bobl sut y gallan nhw ddod o hyd i chi ar Mastodon!",
"onboarding.share.message": "Fi yw {username} ar #Mastodon! Dewch i'm dilyn i yn {url}",
"onboarding.share.next_steps": "Camau nesaf posib:",
Expand Down Expand Up @@ -601,6 +607,7 @@
"search.quick_action.status_search": "Postiadau sy'n cyfateb i {x}",
"search.search_or_paste": "Chwilio neu gludo URL",
"search_popout.full_text_search_disabled_message": "Ddim ar gael ar {domain}.",
"search_popout.full_text_search_logged_out_message": "Dim ond ar gael pan wedi mewngofnodi.",
"search_popout.language_code": "Cod iaith ISO",
"search_popout.options": "Dewisiadau chwilio",
"search_popout.quick_actions": "Gweithredoedd cyflym",
Expand Down
8 changes: 8 additions & 0 deletions app/javascript/mastodon/locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
"account.badges.group": "Ομάδα",
"account.block": "Αποκλεισμός @{name}",
"account.block_domain": "Αποκλεισμός τομέα {domain}",
"account.block_short": "Αποκλεισμός",
"account.blocked": "Αποκλεισμένος/η",
"account.browse_more_on_origin_server": "Δες περισσότερα στο αρχικό προφίλ",
"account.cancel_follow_request": "Απόσυρση αιτήματος παρακολούθησης",
"account.copy": "Αντιγραφή συνδέσμου προφίλ",
"account.direct": "Ιδιωτική αναφορά @{name}",
"account.disable_notifications": "Σταμάτα να με ειδοποιείς όταν δημοσιεύει ο @{name}",
"account.domain_blocked": "Ο τομέας αποκλείστηκε",
Expand All @@ -30,6 +32,7 @@
"account.featured_tags.last_status_never": "Καμία ανάρτηση",
"account.featured_tags.title": "προβεβλημένες ετικέτες του/της {name}",
"account.follow": "Ακολούθησε",
"account.follow_back": "Ακολούθησε και εσύ",
"account.followers": "Ακόλουθοι",
"account.followers.empty": "Κανείς δεν ακολουθεί αυτόν τον χρήστη ακόμα.",
"account.followers_counter": "{count, plural, one {{counter} Ακόλουθος} other {{counter} Ακόλουθοι}}",
Expand All @@ -47,7 +50,11 @@
"account.mention": "Ανάφερε @{name}",
"account.moved_to": "Ο/Η {name} έχει υποδείξει ότι ο νέος λογαριασμός του/της είναι τώρα:",
"account.mute": "Σώπασε τον @{name}",
"account.mute_notifications_short": "Σίγαση ειδοποιήσεων",
"account.mute_short": "Σίγαση",
"account.muted": "Αποσιωπημένος/η",
"account.mutual": "Αμοιβαίοι",
"account.no_bio": "Δεν υπάρχει περιγραφή.",
"account.open_original_page": "Ανοικτό",
"account.posts": "Τουτ",
"account.posts_with_replies": "Τουτ και απαντήσεις",
Expand All @@ -63,6 +70,7 @@
"account.unendorse": "Να μην παρέχεται στο προφίλ",
"account.unfollow": "Άρση ακολούθησης",
"account.unmute": "Διακοπή σίγασης @{name}",
"account.unmute_notifications_short": "Σίγαση ειδοποιήσεων",
"account.unmute_short": "Κατάργηση σίγασης",
"account_note.placeholder": "Κάνε κλικ για να προσθέσεις σημείωση",
"admin.dashboard.daily_retention": "Ποσοστό χρηστών που παραμένουν μετά την εγγραφή, ανά ημέρα",
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@
"privacy.login.long": "Visible for login users only",
"privacy.login.short": "Login only",
"privacy.mutual.long": "Mutual followers only",
"privacy.mutual.short": "Mutual",
"privacy.mutual.short": "Mutual only",
"privacy.personal.short": "Yourself only",
"privacy.private.long": "Visible for followers only",
"privacy.private.short": "Followers only",
Expand Down
Loading

0 comments on commit 7e79182

Please sign in to comment.