From 093879c1778a525b7aa9b847b58e9ce6604b5acf Mon Sep 17 00:00:00 2001
From: Matt Jankowski <mjankowski@thoughtbot.com>
Date: Thu, 13 Apr 2017 09:59:12 -0400
Subject: [PATCH 1/2] Fix language export variables (#1689)

* Fix naming of JS locale constants

* Improve the translation instructions re: const names
---
 app/assets/javascripts/components/locales/bg.jsx | 2 +-
 app/assets/javascripts/components/locales/de.jsx | 4 ++--
 app/assets/javascripts/components/locales/en.jsx | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/assets/javascripts/components/locales/bg.jsx b/app/assets/javascripts/components/locales/bg.jsx
index cac984aae..a194cdbdd 100644
--- a/app/assets/javascripts/components/locales/bg.jsx
+++ b/app/assets/javascripts/components/locales/bg.jsx
@@ -65,4 +65,4 @@ const bg = {
   "notifications.column_settings.reblog": "Споделяния:",
 };
 
-export default en;
+export default bg;
diff --git a/app/assets/javascripts/components/locales/de.jsx b/app/assets/javascripts/components/locales/de.jsx
index 92897f549..bd98b7595 100644
--- a/app/assets/javascripts/components/locales/de.jsx
+++ b/app/assets/javascripts/components/locales/de.jsx
@@ -1,4 +1,4 @@
-const en = {
+const de = {
   "column_back_button.label": "Zurück",
   "lightbox.close": "Schließen",
   "loading_indicator.label": "Lade…",
@@ -74,4 +74,4 @@ const en = {
   "missing_indicator.label": "Nicht gefunden"
 };
 
-export default en;
+export default de;
diff --git a/app/assets/javascripts/components/locales/en.jsx b/app/assets/javascripts/components/locales/en.jsx
index 1834567f1..740caef9d 100644
--- a/app/assets/javascripts/components/locales/en.jsx
+++ b/app/assets/javascripts/components/locales/en.jsx
@@ -5,6 +5,7 @@
  *   1. to add your new string here; and
  *   2. to remove old strings that are no longer needed; and
  *   3. to sort the strings by the key.
+ #   4. To rename the `en` const name and export default name to match your locale.
  * Thanks!
  */
 const en = {

From 447b8bc44eb33ae6ffdfbcc7ae52fbe0bba93ece Mon Sep 17 00:00:00 2001
From: Isabelle Knott <isabelle@blackle-mori.com>
Date: Thu, 13 Apr 2017 09:59:43 -0400
Subject: [PATCH 2/2] Do not show media attachment as og:image if it was marked
 as NSFW (#1693)

---
 app/views/stream_entries/show.html.haml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index f37fb7919..862946750 100644
--- a/app/views/stream_entries/show.html.haml
+++ b/app/views/stream_entries/show.html.haml
@@ -11,7 +11,7 @@
   - else
     %meta{ property: 'og:description', content: @stream_entry.activity.content }/
 
-  - if @stream_entry.activity.is_a?(Status) && @stream_entry.activity.media_attachments.size > 0
+  - if @stream_entry.activity.is_a?(Status) && !@stream_entry.activity.sensitive? && @stream_entry.activity.media_attachments.size > 0
     %meta{ property: 'og:image', content: full_asset_url(@stream_entry.activity.media_attachments.first.file.url(:small)) }/
   - else
     %meta{ property: 'og:image', content: full_asset_url(@account.avatar.url(:original)) }/