From f44091d6535463e08a90dbf3d108540bf587cec1 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 7 Mar 2019 09:49:42 +0900 Subject: 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 c7e5e0c63..dad04b79c 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>< -- cgit From dfb45374d220287012ffaae68ceee7159993bbac Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 7 Mar 2019 01:50:06 +0100 Subject: Fix AddLockVersionToPolls migration (#10200) --- .../20190306145741_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 cf506404d..5bb8cd3b4 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 -- cgit From 34f261e6af9a5b7df3c71414e690dfb72414065b Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 7 Mar 2019 01:50:37 +0100 Subject: 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 07ef16bf3..87179030c 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 -- cgit From 44475bbc9c98de7529dbbbf8808ad17cc53c7e98 Mon Sep 17 00:00:00 2001 From: marcin mikołajczak Date: Thu, 7 Mar 2019 02:52:43 +0100 Subject: i18n:🇵🇱 (#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 80fc21488..c770c3829 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", -- cgit From 637c952ccbe5acae17bbf573f8cd24703379a615 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Thu, 7 Mar 2019 20:38:10 +0900 Subject: 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 0940b639e..fcfe3d4d1 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) -- cgit