From ed3d4700697e4355a7ed7e6bcadcbc55e1afa4c6 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 7 Mar 2019 09:49:42 +0900 Subject: [PATCH 1/5] Fix #10202 (#10203) --- app/views/stream_entries/_poll.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/stream_entries/_poll.html.haml b/app/views/stream_entries/_poll.html.haml index c7e5e0c63f..dad04b79c8 100644 --- a/app/views/stream_entries/_poll.html.haml +++ b/app/views/stream_entries/_poll.html.haml @@ -7,7 +7,7 @@ - options.each do |option| %li - if show_results - - percent = 100 * option.votes_count / poll.votes_count + - percent = poll.votes_count > 0 ? 100 * option.votes_count / poll.votes_count : 0 %span.poll__chart{ style: "width: #{percent}%" } %label.poll__text>< From 401a3cfdf0994a38431e8046ae5385eaf98ab29e Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 7 Mar 2019 01:50:06 +0100 Subject: [PATCH 2/5] Fix AddLockVersionToPolls migration (#10200) --- ...0190306145741_add_lock_version_to_polls.rb | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/db/migrate/20190306145741_add_lock_version_to_polls.rb b/db/migrate/20190306145741_add_lock_version_to_polls.rb index cf506404da..5bb8cd3b48 100644 --- a/db/migrate/20190306145741_add_lock_version_to_polls.rb +++ b/db/migrate/20190306145741_add_lock_version_to_polls.rb @@ -1,6 +1,24 @@ +require Rails.root.join('lib', 'mastodon', 'migration_helpers') + class AddLockVersionToPolls < ActiveRecord::Migration[5.2] - def change - add_column :polls, :lock_version, :integer, null: false, default: 0 + include Mastodon::MigrationHelpers + + disable_ddl_transaction! + + def up + safety_assured do + add_column_with_default( + :polls, + :lock_version, + :integer, + allow_null: false, + default: 0 + ) + end + end + + def down + remove_column :polls, :lock_version end end From db21a6c5ee2586cf483193e0e6d606629140546a Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 7 Mar 2019 01:50:37 +0100 Subject: [PATCH 3/5] Avoid unnecessarily fetching the replies collection when it is empty (#10201) --- app/lib/activitypub/activity/create.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 07ef16bf3f..87179030c2 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -253,7 +253,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity collection = @object['replies'] return if collection.nil? replies = ActivityPub::FetchRepliesService.new.call(status, collection, false) - return if replies.present? + return unless replies.nil? uri = value_or_id(collection) ActivityPub::FetchRepliesWorker.perform_async(status.id, uri) unless uri.nil? end From 5232eccc5c5db8807e2104565650e996083ff125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 7 Mar 2019 02:52:43 +0100 Subject: [PATCH 4/5] =?UTF-8?q?i18n:=F0=9F=87=B5=F0=9F=87=B1=20(#10199)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Mikołajczak --- app/javascript/mastodon/locales/pl.json | 37 +++++++++++++++---------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/app/javascript/mastodon/locales/pl.json b/app/javascript/mastodon/locales/pl.json index 80fc21488d..c770c38298 100644 --- a/app/javascript/mastodon/locales/pl.json +++ b/app/javascript/mastodon/locales/pl.json @@ -73,6 +73,10 @@ "compose_form.lock_disclaimer": "Twoje konto nie jest {locked}. Każdy, kto Cię śledzi, może wyświetlać Twoje wpisy przeznaczone tylko dla śledzących.", "compose_form.lock_disclaimer.lock": "zablokowane", "compose_form.placeholder": "Co Ci chodzi po głowie?", + "compose_form.poll.add_option": "Dodaj opcję", + "compose_form.poll.duration": "Czas trwania głosowania", + "compose_form.poll.option_placeholder": "Opcja {number}", + "compose_form.poll.remove_option": "Usuń tę opcję", "compose_form.publish": "Wyślij", "compose_form.publish_loud": "{publish}!", "compose_form.sensitive.marked": "Zawartość multimedia jest oznaczona jako wrażliwa", @@ -142,8 +146,8 @@ "hashtag.column_header.tag_mode.all": "i {additional}", "hashtag.column_header.tag_mode.any": "lub {additional}", "hashtag.column_header.tag_mode.none": "bez {additional}", - "hashtag.column_settings.select.no_options_message": "No suggestions found", - "hashtag.column_settings.select.placeholder": "Enter hashtags…", + "hashtag.column_settings.select.no_options_message": "Nie odnaleziono sugestii", + "hashtag.column_settings.select.placeholder": "Wprowadź hashtagi…", "hashtag.column_settings.tag_mode.all": "Wszystkie", "hashtag.column_settings.tag_mode.any": "Dowolne", "hashtag.column_settings.tag_mode.none": "Żadne", @@ -151,6 +155,9 @@ "home.column_settings.basic": "Podstawowe", "home.column_settings.show_reblogs": "Pokazuj podbicia", "home.column_settings.show_replies": "Pokazuj odpowiedzi", + "intervals.full.minutes": "{number, plural, one {# minuta} few {# minuty} many {# minut} other {# minut}}", + "intervals.full.hours": "{number, plural, one {# godzina} few {# godziny} many {# godzin} other {# godzin}}", + "intervals.full.days": "{number, plural, one {# dzień} few {# dni} many {# dni} other {# dni}}", "introduction.federation.action": "Dalej", "introduction.federation.federated.headline": "Oś czasu federacji", "introduction.federation.federated.text": "Publiczne wpisy osób z tego całego Fediwersum pojawiają się na lokalnej osi czasu.", @@ -206,7 +213,7 @@ "lists.account.remove": "Usunąć z listy", "lists.delete": "Usuń listę", "lists.edit": "Edytuj listę", - "lists.edit.submit": "Change title", + "lists.edit.submit": "Zmień tytuł", "lists.new.create": "Utwórz listę", "lists.new.title_placeholder": "Wprowadź tytuł listy", "lists.search": "Szukaj wśród osób które śledzisz", @@ -260,10 +267,12 @@ "notifications.filter.follows": "Śledzenia", "notifications.filter.mentions": "Wspomienia", "notifications.group": "{count, number} {count, plural, one {powiadomienie} few {powiadomienia} many {powiadomień} more {powiadomień}}", - "poll.closed": "Closed", - "poll.refresh": "Refresh", - "poll.total_votes": "{count, plural, one {# vote} other {# votes}}", - "poll.vote": "Vote", + "poll.closed": "Zamknięte", + "poll.refresh": "Odśwież", + "poll.total_votes": "{count, plural, one {# głos} few {# głosy} many {# głosów} other {# głosów}}", + "poll.vote": "Zagłosuj", + "poll_button.add_poll": "Dodaj głosowanie", + "poll_button.remove_poll": "Usuń głosowanie", "privacy.change": "Dostosuj widoczność wpisów", "privacy.direct.long": "Widoczny tylko dla wspomnianych", "privacy.direct.short": "Bezpośrednio", @@ -304,7 +313,7 @@ "status.block": "Zablokuj @{name}", "status.cancel_reblog_private": "Cofnij podbicie", "status.cannot_reblog": "Ten wpis nie może zostać podbity", - "status.copy": "Copy link to status", + "status.copy": "Skopiuj odnośnik do wpisu", "status.delete": "Usuń", "status.detailed_status": "Szczegółowy widok konwersacji", "status.direct": "Wyślij wiadomość bezpośrednią do @{name}", @@ -346,11 +355,11 @@ "tabs_bar.local_timeline": "Lokalne", "tabs_bar.notifications": "Powiadomienia", "tabs_bar.search": "Szukaj", - "time_remaining.days": "{number, plural, one {# day} other {# days}} left", - "time_remaining.hours": "{number, plural, one {# hour} other {# hours}} left", - "time_remaining.minutes": "{number, plural, one {# minute} other {# minutes}} left", - "time_remaining.moments": "Moments remaining", - "time_remaining.seconds": "{number, plural, one {# second} other {# seconds}} left", + "time_remaining.days": "{number, plural, one {Pozostał # dzień} few {Pozostały # dni} many {Pozostało # dni} other {Pozostało # dni}}", + "time_remaining.hours": "{number, plural, one {Pozostała # godzina} few {Pozostały # godziny} many {Pozostało # godzin} other {Pozostało # godzin}}", + "time_remaining.minutes": "{number, plural, one {Pozostała # minuta} few {Pozostały # minuty} many {Pozostało # minut} other {Pozostało # minut}}", + "time_remaining.moments": "Pozostała chwila", + "time_remaining.seconds": "{number, plural, one {Pozostała # sekunda} few {Pozostały # sekundy} many {Pozostało # sekund} other {Pozostało # sekund}}", "trends.count_by_accounts": "{count} {rawCount, plural, one {osoba rozmawia} few {osoby rozmawiają} other {osób rozmawia}} o tym", "ui.beforeunload": "Utracisz tworzony wpis, jeżeli opuścisz Mastodona.", "upload_area.title": "Przeciągnij i upuść aby wysłać", @@ -359,7 +368,7 @@ "upload_form.description": "Wprowadź opis dla niewidomych i niedowidzących", "upload_form.focus": "Dopasuj podgląd", "upload_form.undo": "Usuń", - "upload_progress.label": "Wysyłanie...", + "upload_progress.label": "Wysyłanie…", "video.close": "Zamknij film", "video.exit_fullscreen": "Opuść tryb pełnoekranowy", "video.expand": "Rozszerz film", From adc68b7a2e6500e06af665649d82a412182f3b88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 7 Mar 2019 20:38:10 +0900 Subject: [PATCH 5/5] Bump webpush from 0.3.6 to 0.3.7 (#10205) Bumps [webpush](https://github.com/zaru/webpush) from 0.3.6 to 0.3.7. - [Release notes](https://github.com/zaru/webpush/releases) - [Changelog](https://github.com/zaru/webpush/blob/master/CHANGELOG.md) - [Commits](https://github.com/zaru/webpush/compare/v0.3.6...v0.3.7) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0940b639e8..fcfe3d4d17 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -641,7 +641,7 @@ GEM activesupport (>= 4.2) rack-proxy (>= 0.6.1) railties (>= 4.2) - webpush (0.3.6) + webpush (0.3.7) hkdf (~> 0.2) jwt (~> 2.0) websocket-driver (0.7.0)