From bfed7dd5f3127f08ece3070bd67f5737933bac1a Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 15 Jul 2020 21:07:53 +0200 Subject: Fix error when closing a playing audio or video modal (#14310) --- app/javascript/mastodon/features/audio/index.js | 2 ++ app/javascript/mastodon/features/video/index.js | 2 ++ 2 files changed, 4 insertions(+) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/features/audio/index.js b/app/javascript/mastodon/features/audio/index.js index 2f85ebb7e..1ab1c3117 100644 --- a/app/javascript/mastodon/features/audio/index.js +++ b/app/javascript/mastodon/features/audio/index.js @@ -298,6 +298,8 @@ class Audio extends React.PureComponent { _renderCanvas () { requestAnimationFrame(() => { + if (!this.audio) return; + this.handleTimeUpdate(); this._clear(); this._draw(); diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index fb12567f0..99dcdca22 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -182,6 +182,8 @@ class Video extends React.PureComponent { _updateTime () { requestAnimationFrame(() => { + if (!this.video) return; + this.handleTimeUpdate(); if (!this.state.paused) { -- cgit From 71e85a506d540d77d0795dfba0a66a55f2a1d3d9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 15 Jul 2020 21:11:21 +0200 Subject: New Crowdin updates (#14311) * New translations en.json (Vietnamese) [ci skip] * New translations en.yml (Vietnamese) [ci skip] * New translations en.yml (Vietnamese) [ci skip] * New translations en.yml (Vietnamese) [ci skip] * New translations en.yml (Vietnamese) [ci skip] * i18n-tasks normalize --- app/javascript/mastodon/locales/vi.json | 4 ++-- config/locales/vi.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/locales/vi.json b/app/javascript/mastodon/locales/vi.json index 7d4c1c45e..17c4302c2 100644 --- a/app/javascript/mastodon/locales/vi.json +++ b/app/javascript/mastodon/locales/vi.json @@ -23,7 +23,7 @@ "account.last_status": "Hoạt động gần đây", "account.link_verified_on": "Liên kết này đã được xác thực vào {date}", "account.locked_info": "Người dùng này thiết lập trạng thái ẩn. Họ sẽ tự mình xét duyệt các yêu cầu theo dõi.", - "account.media": "Đa phương tiện", + "account.media": "Bộ sưu tập", "account.mention": "Nhắc đến @{name}", "account.moved_to": "{name} đã dời sang:", "account.mute": "Ẩn @{name}", @@ -43,7 +43,7 @@ "account.unfollow": "Ngưng theo dõi", "account.unmute": "Bỏ ẩn @{name}", "account.unmute_notifications": "Hiển lại thông báo từ @{name}", - "account_note.placeholder": "Không nói gì thêm", + "account_note.placeholder": "Nhấn để thêm ghi chú", "alert.rate_limited.message": "Vui lòng thử lại sau {retry_time, time, medium}.", "alert.rate_limited.title": "Vượt giới hạn", "alert.unexpected.message": "Đã xảy ra lỗi không mong muốn.", diff --git a/config/locales/vi.yml b/config/locales/vi.yml index d952f05c9..7acd38ff5 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -60,7 +60,7 @@ vi: joined: Đã tham gia %{date} last_active: hoạt động gần đây link_verified_on: Liên kết này đã được xác thực quyền sở hữu vào %{date} - media: Đa phương tiện + media: Bộ sưu tập moved_html: "%{name} đã dời sang %{new_profile_link}:" network_hidden: Thông tin này không còn tồn tại never_active: Chưa có @@ -587,7 +587,7 @@ vi: deleted: Đã xóa failed_to_execute: Không thể thực thi media: - title: Đa phương tiện + title: Bộ sưu tập no_media: Không có ảnh hoặc video no_status_selected: Không có tút nào thay đổi vì không có tút nào được chọn title: Trạng thái tài khoản @@ -723,7 +723,7 @@ vi: invalid_signature: không phải là chữ ký số Ed25519 đúng date: formats: - default: "%d.%m.%Y" + default: "%b.%-m.%Y" datetime: distance_in_words: about_x_hours: "%{count}h" @@ -1161,7 +1161,7 @@ vi: mastodon-light: Mastodon (Sáng) time: formats: - default: "%b %d, %Y, %H:%M" + default: lúc %H:%M %b %d năm%_Y month: "%B %Y" two_factor_authentication: code_hint: Nhập mã được tạo bởi ứng dụng xác thực của bạn để xác nhận -- cgit From f94cb947671add34feb13d8d85a67260d2f699a9 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 15 Jul 2020 21:07:53 +0200 Subject: [Glitch] Fix error when closing a playing audio or video modal Port bfed7dd5f3127f08ece3070bd67f5737933bac1a to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/features/audio/index.js | 2 ++ app/javascript/flavours/glitch/features/video/index.js | 2 ++ 2 files changed, 4 insertions(+) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/features/audio/index.js b/app/javascript/flavours/glitch/features/audio/index.js index 9cb2307fd..4e85e3c58 100644 --- a/app/javascript/flavours/glitch/features/audio/index.js +++ b/app/javascript/flavours/glitch/features/audio/index.js @@ -283,6 +283,8 @@ class Audio extends React.PureComponent { _renderCanvas () { requestAnimationFrame(() => { + if (!this.audio) return; + this.handleTimeUpdate(); this._clear(); this._draw(); diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index 976cdefc0..cc60a0d2e 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -195,6 +195,8 @@ class Video extends React.PureComponent { _updateTime () { requestAnimationFrame(() => { + if (!this.video) return; + this.handleTimeUpdate(); if (!this.state.paused) { -- cgit