From 5097ae9377fcc09507990ab8729a314f2c1a083a Mon Sep 17 00:00:00 2001 From: jomaxro Date: Wed, 26 Apr 2017 00:43:04 -0400 Subject: [PATCH 01/23] Add URL to plugin.rb --- plugin.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index bf6eee2..7f0da5f 100755 --- a/plugin.rb +++ b/plugin.rb @@ -2,6 +2,7 @@ # about: Ad Plugin for Discourse # version: 1.0.2 # authors: Vi and Sarah (@ladydanger and @cyberkoi) +# url: https://github.com/discourse/discourse-adplugin register_css < Date: Sat, 16 Sep 2017 00:18:01 +0200 Subject: [PATCH 02/23] Make server.en.yml consistent w.r.t. mobile view --- config/locales/server.en.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 217c228..b3f15f4 100755 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -12,14 +12,14 @@ en: dfp_topic_above_post_stream_code: "Enter the unique Code of the ad unit to display above the title of a topic on the topic page. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_topic_above_post_stream_ad_sizes: "Choose your ad size for the ad unit at the top of the topic page." - dfp_mobile_topic_above_post_stream_code: "Enter the unique Code of the ad unit to display above the title of a topic on the topic page on mobile. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." + dfp_mobile_topic_above_post_stream_code: "Enter the unique Code of the ad unit to display above the title of a topic on the topic page on mobile view. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_mobile_topic_above_post_stream_ad_sizes: "Choose your ad size for the ad unit at the top of the topic page on mobile view." dfp_target_topic_above_post_stream_key_code: "Input custom targeting keys - inventory Level" dfp_target_topic_above_post_stream_value_code: "Input custom targeting values - inventory Level" dfp_topic_above_suggested_code: "Enter the unique Code of the ad unit to display after the last post in a topic, above the suggested topics. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_topic_above_suggested_ad_sizes: "Choose your ad size for the ad unit after the last post in a topic." - dfp_mobile_topic_above_suggested_code: "Enter the unique Code of the ad unit to display after the last post in a topic, above the suggested topics. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." + dfp_mobile_topic_above_suggested_code: "Enter the unique Code of the ad unit to display after the last post in a topic, above the suggested topics on mobile view. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_mobile_topic_above_suggested_ad_sizes: "Choose your ad size for the ad unit after the last post in a topic on mobile view." dfp_target_topic_above_suggested_key_code: "Input custom targeting keys - inventory Level" dfp_target_topic_above_suggested_value_code: "Input custom targeting values - inventory Level" @@ -27,7 +27,7 @@ en: dfp_nth_post_code: "Show an ad after every N posts, where N is this value." dfp_post_bottom_code: "Enter the unique Code of the ad unit to display in between posts after every nth post. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_post_bottom_ad_sizes: "Choose your ad size for the ad unit shown in between posts." - dfp_mobile_post_bottom_code: "Enter the unique Code of the ad unit to display in between posts after every nth post on mobile. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." + dfp_mobile_post_bottom_code: "Enter the unique Code of the ad unit to display in between posts after every nth post on mobile view. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_mobile_post_bottom_ad_sizes: "Choose your ad size for the ad unit shown in between posts on mobile view." dfp_target_post_bottom_key_code: "Input custom targeting keys - inventory Level" dfp_target_post_bottom_value_code: "Input custom targeting values - inventory Level" From 6dd27a2715c424854ec0e648c5315e787d0ca3c5 Mon Sep 17 00:00:00 2001 From: Sazzad Hossain Khan Date: Wed, 27 Dec 2017 20:16:01 +0600 Subject: [PATCH 03/23] Table Available Locations Table Available Locations for Ad Display --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cfe6657..729f6cc 100644 --- a/README.md +++ b/README.md @@ -101,12 +101,12 @@ In this section, we go into more detail on: The following are available locations along with a description and an image showing their location within Discourse to display ads for all platforms. -Location Name | Description ---- | --- | --- -Topic List Top | Ad will appear at the header of Discourse homepage -Topic Above Post Stream | Ad will appear in the header of all Discourse forum topics -Topic Above Suggested | Ad will appear in the footer above suggested topics of all Discourse forum topics -Post Bottom & Nth Post | Ad will appear on the stipulated nth post within a topic. So if you have 5 posts in a topic and you want the ad to display after on the 2nd post, put 2 in ```ad_platform_nth_post_code```. +| Location Name | Description | +| --- | --- | +| Topic List Top | Ad will appear at the header of Discourse homepage | +| Topic Above Post Stream | Ad will appear in the header of all Discourse forum topics | +| Topic Above Suggested | Ad will appear in the footer above suggested topics of all Discourse forum topics | +| Post Bottom & Nth Post | Ad will appear on the stipulated nth post within a topic. So if you have 5 posts in a topic and you want the ad to display after on the 2nd post, put 2 in ```ad_platform_nth_post_code```. | ![](https://www.dropbox.com/sc/rm5bcn8c85niul1/AAAUVW-hn56XtCl_XTNlE19Ra?dl=1) From c60bc8f7eec886b70c59c7ecff09843f5ea91a7c Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 29 Dec 2017 16:35:37 -0500 Subject: [PATCH 04/23] Update translations --- config/locales/client.ca.yml | 8 ++++++++ config/locales/client.sv.yml | 7 ++++++- config/locales/server.ca.yml | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 config/locales/client.ca.yml create mode 100644 config/locales/server.ca.yml diff --git a/config/locales/client.ca.yml b/config/locales/client.ca.yml new file mode 100644 index 0000000..e155a11 --- /dev/null +++ b/config/locales/client.ca.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ca: {} diff --git a/config/locales/client.sv.yml b/config/locales/client.sv.yml index fd54901..7854b37 100644 --- a/config/locales/client.sv.yml +++ b/config/locales/client.sv.yml @@ -5,4 +5,9 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -sv: {} +sv: + admin_js: + admin: + site_settings: + categories: + amazon_plugin: 'Amazon' diff --git a/config/locales/server.ca.yml b/config/locales/server.ca.yml new file mode 100644 index 0000000..e155a11 --- /dev/null +++ b/config/locales/server.ca.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ca: {} From cf77b9fdc5e99f924f17871ff89e305e2a334abf Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 8 Jan 2018 13:54:21 -0500 Subject: [PATCH 05/23] The ADVERTISEMENT label can be translated and customized from admin --- .../discourse/templates/components/amazon-product-links.hbs | 4 ++-- .../discourse/templates/components/google-adsense.hbs | 2 +- .../discourse/templates/components/google-dfp-ad.hbs | 4 ++-- config/locales/client.en.yml | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/discourse/templates/components/amazon-product-links.hbs b/assets/javascripts/discourse/templates/components/amazon-product-links.hbs index b438664..8eb83d8 100644 --- a/assets/javascripts/discourse/templates/components/amazon-product-links.hbs +++ b/assets/javascripts/discourse/templates/components/amazon-product-links.hbs @@ -1,10 +1,10 @@ {{#if checkTrustLevels}} {{#if site.mobileView}} - + {{else}} - +
diff --git a/assets/javascripts/discourse/templates/components/google-adsense.hbs b/assets/javascripts/discourse/templates/components/google-adsense.hbs index daed48a..00fc570 100644 --- a/assets/javascripts/discourse/templates/components/google-adsense.hbs +++ b/assets/javascripts/discourse/templates/components/google-adsense.hbs @@ -1,5 +1,5 @@ {{#if showAd}} -

ADVERTISEMENT

+

{{i18n 'adplugin.advertisement_label'}}

ADVERTISEMENT

+

{{i18n 'adplugin.advertisement_label'}}

{{else}} -

ADVERTISEMENT

+

{{i18n 'adplugin.advertisement_label'}}

{{/if}} {{/if}} diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index ca287bb..bb8ba7d 100755 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1,4 +1,7 @@ en: + js: + adplugin: + advertisement_label: 'ADVERTISEMENT' admin_js: admin: site_settings: From ed2830172bd482b259405b48b5af26d734fdb9e4 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 31 Jan 2018 11:09:27 -0500 Subject: [PATCH 06/23] Update translations --- config/locales/client.da.yml | 3 ++ config/locales/client.de.yml | 3 ++ config/locales/client.es.yml | 3 ++ config/locales/client.et.yml | 3 ++ config/locales/client.fi.yml | 3 ++ config/locales/client.he.yml | 3 ++ config/locales/client.nb_NO.yml | 5 ++- config/locales/client.sk.yml | 3 ++ config/locales/client.ur.yml | 12 +++++- config/locales/server.ar.yml | 3 -- config/locales/server.cs.yml | 3 -- config/locales/server.el.yml | 3 -- config/locales/server.es.yml | 10 ++--- config/locales/server.et.yml | 14 +++++- config/locales/server.fa_IR.yml | 2 - config/locales/server.fi.yml | 2 +- config/locales/server.fr.yml | 3 -- config/locales/server.it.yml | 3 -- config/locales/server.ko.yml | 3 -- config/locales/server.nb_NO.yml | 6 +-- config/locales/server.ur.yml | 75 ++++++++++++++++++++++++++++++++- config/locales/server.zh_CN.yml | 3 -- 22 files changed, 131 insertions(+), 37 deletions(-) diff --git a/config/locales/client.da.yml b/config/locales/client.da.yml index 5ee811c..3c91279 100644 --- a/config/locales/client.da.yml +++ b/config/locales/client.da.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ da: + js: + adplugin: + advertisement_label: 'REKLAME' admin_js: admin: site_settings: diff --git a/config/locales/client.de.yml b/config/locales/client.de.yml index 4df632e..71c3154 100644 --- a/config/locales/client.de.yml +++ b/config/locales/client.de.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ de: + js: + adplugin: + advertisement_label: 'WERBUNG' admin_js: admin: site_settings: diff --git a/config/locales/client.es.yml b/config/locales/client.es.yml index dfbceca..0a6edbe 100644 --- a/config/locales/client.es.yml +++ b/config/locales/client.es.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ es: + js: + adplugin: + advertisement_label: 'ANUNCIO' admin_js: admin: site_settings: diff --git a/config/locales/client.et.yml b/config/locales/client.et.yml index 70a6e91..57d9052 100644 --- a/config/locales/client.et.yml +++ b/config/locales/client.et.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ et: + js: + adplugin: + advertisement_label: 'REKLAAM' admin_js: admin: site_settings: diff --git a/config/locales/client.fi.yml b/config/locales/client.fi.yml index 6d16e09..cc88024 100644 --- a/config/locales/client.fi.yml +++ b/config/locales/client.fi.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ fi: + js: + adplugin: + advertisement_label: 'MAINOS' admin_js: admin: site_settings: diff --git a/config/locales/client.he.yml b/config/locales/client.he.yml index 7b7f1e3..cb6d67b 100644 --- a/config/locales/client.he.yml +++ b/config/locales/client.he.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ he: + js: + adplugin: + advertisement_label: 'פרסום' admin_js: admin: site_settings: diff --git a/config/locales/client.nb_NO.yml b/config/locales/client.nb_NO.yml index fcf28fa..1db5971 100644 --- a/config/locales/client.nb_NO.yml +++ b/config/locales/client.nb_NO.yml @@ -6,10 +6,13 @@ # https://www.transifex.com/projects/p/discourse-org/ nb_NO: + js: + adplugin: + advertisement_label: 'REKLAME' admin_js: admin: site_settings: categories: dfp_plugin: 'DFP' - adsense_plugin: 'AdSense' + adsense_plugin: 'Adsense' amazon_plugin: 'Amazon' diff --git a/config/locales/client.sk.yml b/config/locales/client.sk.yml index 1c2ba36..8b9136d 100644 --- a/config/locales/client.sk.yml +++ b/config/locales/client.sk.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ sk: + js: + adplugin: + advertisement_label: 'REKLAMA' admin_js: admin: site_settings: diff --git a/config/locales/client.ur.yml b/config/locales/client.ur.yml index 58bc973..3a0d48d 100644 --- a/config/locales/client.ur.yml +++ b/config/locales/client.ur.yml @@ -5,4 +5,14 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -ur: {} +ur: + js: + adplugin: + advertisement_label: 'اشتہار' + admin_js: + admin: + site_settings: + categories: + dfp_plugin: 'DFP' + adsense_plugin: 'ایڈسینس' + amazon_plugin: 'اَیمَیزَون' diff --git a/config/locales/server.ar.yml b/config/locales/server.ar.yml index 79fb320..28fba93 100644 --- a/config/locales/server.ar.yml +++ b/config/locales/server.ar.yml @@ -17,20 +17,17 @@ ar: dfp_target_topic_list_top_value_code: "ادخل قيم الاستهداف المخصصة - مستوى المخزون" dfp_topic_above_post_stream_code: "ضع الشفرة الخاصة للوحدة الاعلانية لكي تظهر فوق عنوان الموضوع في صفحة الموضوع, هذه شفرة قصيرة( اقصى 100 حرف) تم اعطائها للوحدة الاعلانية حين تم انشائها, ليست شفرة نص جافا." dfp_topic_above_post_stream_ad_sizes: "اختر حجم وحدتك الاعلانية فوق صفحة الموضوع." - dfp_mobile_topic_above_post_stream_code: "ضع الشفرة الخاصة للوحدة الاعلانية لكي تظهر فوق عنوان الموضوع في صفحة الموضوع في الهاتف المحمول, هذه شفرة قصيرة( اقصى 100 حرف) تم اعطائها للوحدة الاعلانية حين تم انشائها, ليست شفرة نص جافا." dfp_mobile_topic_above_post_stream_ad_sizes: "اختر حجم وحدتك الاعلانية فوق صفحة الموضوع في الهاتف المحمول." dfp_target_topic_above_post_stream_key_code: "ادخل مفاتيح الاستهداف المخصص - مستوى المخزون" dfp_target_topic_above_post_stream_value_code: "ادخل قيم الاستهداف المخصصة - مستوى المخزون" dfp_topic_above_suggested_code: "ضع الشفرة الخاصة للوحدة الاعلانية لكي تظهر بعد المنشور الاخير فوق المواضيع المقترحة, هذه شفرة قصيرة( اقصى 100 حرف) تم اعطائها للوحدة الاعلانية حين تم انشائها, ليست شفرة نص جافا." dfp_topic_above_suggested_ad_sizes: "اختر حجم وحدتك الاعلانية بعد اخر منشور في الموضوع." - dfp_mobile_topic_above_suggested_code: "ضع الشفرة الخاصة للوحدة الاعلانية لكي تظهر بعد المنشور الاخير فوق المواضيع المقترحة, هذه شفرة قصيرة( اقصى 100 حرف) تم اعطائها للوحدة الاعلانية حين تم انشائها, ليست شفرة نص جافا." dfp_mobile_topic_above_suggested_ad_sizes: "اختر حجم وحدتك الاعلانية بعد اخر منشور في الموضوع في الهاتف المحمول." dfp_target_topic_above_suggested_key_code: "ادخل مفاتيح الاستهداف المخصص - مستوى المخزون" dfp_target_topic_above_suggested_value_code: "ادخل قيم الاستهداف المخصصة - مستوى المخزون" dfp_nth_post_code: "اظهر الاعلان بعد كل N منشور, حيث ان N هي القيمة." dfp_post_bottom_code: "ضع الشفرة الخاصة للوحدة الاعلانية لكي بين المنشورات بعد nth منشور , هذه شفرة قصيرة( اقصى 100 حرف) تم اعطائها للوحدة الاعلانية حين تم انشائها, ليست شفرة نص جافا." dfp_post_bottom_ad_sizes: "اختر حجم مساحتك العلانية لتظهر بين المشنورات." - dfp_mobile_post_bottom_code: "ضع الشفرة الخاصة للوحدة الاعلانية لكي بين المنشورات بعد nth منشور في الهاتف المحمول, هذه شفرة قصيرة( اقصى 100 حرف) تم اعطائها للوحدة الاعلانية حين تم انشائها, ليست شفرة نص جافا." dfp_mobile_post_bottom_ad_sizes: "اختر حجم مساحتك العلانية لتظهر بين المشنورات في الهاتف المحمول." dfp_target_post_bottom_key_code: "ادخل مفاتيح الاستهداف المخصص - مستوى المخزون" dfp_target_post_bottom_value_code: "ادخل قيم الاستهداف المخصصة - مستوى المخزون" diff --git a/config/locales/server.cs.yml b/config/locales/server.cs.yml index f708538..3b3b167 100644 --- a/config/locales/server.cs.yml +++ b/config/locales/server.cs.yml @@ -15,14 +15,11 @@ cs: dfp_mobile_topic_list_top_ad_sizes: "Zvolte velikost reklamy pro reklamní jednotku nad seznamem témat při mobilním zobrazení." dfp_topic_above_post_stream_code: "Zadejte unikátní kód reklamní jednotky pro zobrazení nad názvem tématu na stránce tématu. Toto je krátký kód (max 100 znaků), přiřazený reklamní jednotce, když byla vytvořena, ne JavaScript kód." dfp_topic_above_post_stream_ad_sizes: "Vyberte velikost reklamy pro reklamní jednotku nahoře na stránce tématu." - dfp_mobile_topic_above_post_stream_code: "Zadejte unikátní kód reklamní jednotky pro zobrazení nad názvem tématu na stránce tématu, na mobilu. Toto je krátký kód (max 100 znaků) přiřazený reklamní jednotce, když byla vytvořena, ne JavaScript kód." dfp_mobile_topic_above_post_stream_ad_sizes: "Zvolte velikost reklamy pro reklamní jednotku nahoře na stránce témat při zobrazení na mobilu." dfp_topic_above_suggested_code: "Zadejte unikátní kód reklamní jednotky pro zobrazení po posledním příspěvku v tématu, nad navrhovanými tématy. Toto je krátký kód (max 100 znaků) přiřazený reklamní jednotce, když byla vytvořena, ne JavaScript kód." dfp_topic_above_suggested_ad_sizes: "Zvolte velikost reklamy pro reklamní jednotku po posledním příspěvku v tématu." - dfp_mobile_topic_above_suggested_code: "Zadejte unikátní kód reklamní jednotky pro zobrazení po posledním příspěvku v tématu, nad navrhovanými tématy. Toto je krátký kód (max 100 znaků) přiřazený reklamní jednotce, když byla vytvořena, ne JavaScript kód." dfp_mobile_topic_above_suggested_ad_sizes: "Zvolte si velikost reklamy pro reklamní jednotku po posledním příspěvku v tématu při mobilním zobrazení." dfp_nth_post_code: "Zobrazit reklamu po každém N-tém příspěvku, kde N je tato hodnota." dfp_post_bottom_code: "Zadejte unikátní kód reklamní jednotky pro zobrazení mezi příspěvky po každém n-tém příspěvku. Toto je krátký kód (max 100 znaků) přiřazený reklamní jednotce, když byla vytvořena, ne JavaScript kód." dfp_post_bottom_ad_sizes: "Zvolte si velikost reklamy pro reklamní jednotku zobrazovanou mezi příspěvky." - dfp_mobile_post_bottom_code: "Zadejte unikátní kód reklamní jednotky pro zobrazení mezi příspěvky po každém n-tém příspěvku na mobilním zařízení. Toto je krátký kód (max 100 znaků) přiřazený reklamní jednotce, když byla vytvořena, ne JavaScript kód." dfp_mobile_post_bottom_ad_sizes: "Zvolte si velikost reklamy pro reklamní jednotku zobrazovanou mezi příspěvky při mobilním zobrazení." diff --git a/config/locales/server.el.yml b/config/locales/server.el.yml index ecd1f21..19a6026 100644 --- a/config/locales/server.el.yml +++ b/config/locales/server.el.yml @@ -17,20 +17,17 @@ el: dfp_target_topic_list_top_value_code: "Input custom targeting values - inventory Level" dfp_topic_above_post_stream_code: "Enter the unique Code of the ad unit to display above the title of a topic on the topic page. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_topic_above_post_stream_ad_sizes: "Choose your ad size for the ad unit at the top of the topic page." - dfp_mobile_topic_above_post_stream_code: "Enter the unique Code of the ad unit to display above the title of a topic on the topic page on mobile. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_mobile_topic_above_post_stream_ad_sizes: "Choose your ad size for the ad unit at the top of the topic page on mobile view." dfp_target_topic_above_post_stream_key_code: "Input custom targeting keys - inventory Level" dfp_target_topic_above_post_stream_value_code: "Input custom targeting values - inventory Level" dfp_topic_above_suggested_code: "Enter the unique Code of the ad unit to display after the last post in a topic, above the suggested topics. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_topic_above_suggested_ad_sizes: "Choose your ad size for the ad unit after the last post in a topic." - dfp_mobile_topic_above_suggested_code: "Enter the unique Code of the ad unit to display after the last post in a topic, above the suggested topics. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_mobile_topic_above_suggested_ad_sizes: "Choose your ad size for the ad unit after the last post in a topic on mobile view." dfp_target_topic_above_suggested_key_code: "Input custom targeting keys - inventory Level" dfp_target_topic_above_suggested_value_code: "Input custom targeting values - inventory Level" dfp_nth_post_code: "Show an ad after every N posts, where N is this value." dfp_post_bottom_code: "Enter the unique Code of the ad unit to display in between posts after every nth post. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_post_bottom_ad_sizes: "Choose your ad size for the ad unit shown in between posts." - dfp_mobile_post_bottom_code: "Enter the unique Code of the ad unit to display in between posts after every nth post on mobile. This is the short code (max 100 chars) given to the ad unit when it was created, not the JavaScript code." dfp_mobile_post_bottom_ad_sizes: "Choose your ad size for the ad unit shown in between posts on mobile view." dfp_target_post_bottom_key_code: "Input custom targeting keys - inventory Level" dfp_target_post_bottom_value_code: "Input custom targeting values - inventory Level" diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index 5524c6a..020978e 100644 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -7,30 +7,28 @@ es: site_settings: - dfp_publisher_id: "Ingrese su network code, que podes encontrar en la configuración." - dfp_through_trust_level: "Muestre sus anuncios a los usuarios basados en los niveles de confianza. Usuarios con un nivel de confianza elevado no verían anuncios." + dfp_publisher_id: "Introduce tu código de network, que puedes encontrar en la configuración." + dfp_through_trust_level: "Muestra los anuncios a los usuarios basándose en su nivel de confianza. Los usuarios con un nivel de confianza superior a este no verán anuncios." dfp_topic_list_top_code: "Ingrese su código único de anuncio para mostrar por encima de la lista de temas. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." - dfp_topic_list_top_ad_sizes: "Seleccione el tamaño de tu anuncio" + dfp_topic_list_top_ad_sizes: "Elige el tamaño de tu anuncio sobre la lista de temas" dfp_mobile_topic_list_top_code: "Ingrese su código único del anuncio (móvil) para ver por encima de la lista de temas. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_mobile_topic_list_top_ad_sizes: "Selecciona el tamaño de anuncios para ser mostrado arriba de la lista de temas o en la vista móvil." dfp_target_topic_list_top_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_list_top_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" dfp_topic_above_post_stream_code: "Ingrese su código único de anuncio para mostrar en la página de los temas por encima de la relación de mensajes (posts). Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_topic_above_post_stream_ad_sizes: "Seleccione el tamaño de tu anuncio" - dfp_mobile_topic_above_post_stream_code: "Ingrese su código único del anuncio (móvil) para ver en la página de los temas por encima de los posts. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." + dfp_mobile_topic_above_post_stream_code: "Itroduce el código único de la unidad de anuncio a mostrar sobre el título de un tema en móviles. Este es el código corto (máximo 100 caracteres) dado cuando fue creada la unidad, no el código JavaScript." dfp_mobile_topic_above_post_stream_ad_sizes: "Selecciona tu tamaño de anuncio para el top de la lista en versión móvil." dfp_target_topic_above_post_stream_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_above_post_stream_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" dfp_topic_above_suggested_code: "Ingrese su código de anuncio para mostrar por encima de temas sugeridos." dfp_topic_above_suggested_ad_sizes: "Seleccione el tamaño de tu anuncio" - dfp_mobile_topic_above_suggested_code: "Ingrese su código del anuncio (móvil) para ver por encima de temas sugeridos." dfp_mobile_topic_above_suggested_ad_sizes: "Selecciona tu tamaño de anuncio para debajo de la lista en versión móvil." dfp_target_topic_above_suggested_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_above_suggested_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" dfp_nth_post_code: "Elija un número de post para su anuncio; se mostrará al final de ese mensaje" dfp_post_bottom_code: "Ingrese su código único de anuncio para mostrar al final de un post. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_post_bottom_ad_sizes: "Seleccione el tamaño de tu anuncio entre posts." - dfp_mobile_post_bottom_code: "Ingrese su código único del anuncio (móvil) para ver al final de un post. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_mobile_post_bottom_ad_sizes: "Selecciona tu tamaño de anuncio para ser mostrado entre posts en la vista móvil." dfp_target_post_bottom_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_post_bottom_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" diff --git a/config/locales/server.et.yml b/config/locales/server.et.yml index 8c601aa..314730d 100644 --- a/config/locales/server.et.yml +++ b/config/locales/server.et.yml @@ -5,4 +5,16 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -et: {} +et: + site_settings: + adsense_topic_list_top_ad_sizes: " reklaami suurus" + adsense_mobile_topic_list_top_ad_size: "Vali oma reklaami suurus" + adsense_topic_above_post_stream_ad_sizes: "Vali oma reklaami suurus" + adsense_mobile_topic_above_post_stream_ad_size: "Vali oma reklaami suurus" + adsense_topic_above_suggested_ad_sizes: "Vali oma reklaami suurus" + adsense_mobile_topic_above_suggested_ad_size: "Vali oma reklaami suurus" + adsense_post_bottom_ad_sizes: "Vali oma reklaami suurus" + adsense_mobile_post_bottom_ad_size: "Vali oma reklaami suurus" + amazon_topic_list_top_ad_height_code: "Sisesta oma reklaami kõrgus" + amazon_topic_above_post_stream_ad_width_code: "Sisesta oma reklaami laius" + amazon_topic_above_post_stream_ad_height_code: "Sisesta oma reklaami kõrgus" diff --git a/config/locales/server.fa_IR.yml b/config/locales/server.fa_IR.yml index 7c488f5..b553e3e 100644 --- a/config/locales/server.fa_IR.yml +++ b/config/locales/server.fa_IR.yml @@ -15,9 +15,7 @@ fa_IR: dfp_mobile_topic_list_top_ad_sizes: "سایز تبلیغ خود را برای واحد تبلیغات بالای لیست مباحث در حالت موبایل انتخاب کنید." dfp_topic_above_post_stream_code: "کد منحصر بفرد واحد تبلیغ خود را وارد کنید تا بالای عنوان مبحث در صفحه مباحث نمایش داده شود. این کد، یک کد کوتاه (با حداکثر طول 100 کاراکتر) می باشد که هنگام ساختن واحد تبلیغ اختصاص داده شده است، کد جاوا اسکریپت نیست." dfp_topic_above_post_stream_ad_sizes: "سایز تبلیغ خود را برای واحد تبلیغات بالای صفحه مباحث انتخاب کنید." - dfp_mobile_topic_above_post_stream_code: "کد منحصر بفرد واحد تبلیغ خود را وارد کنید تا بالای عنوان مبحث در صفحه مباحث در حالت موبایل نمایش داده شود. این کد، یک کد کوتاه (با حداکثر طول 100 کاراکتر) می باشد که هنگام ساختن واحد تبلیغ اختصاص داده شده است، کد جاوا اسکریپت نیست." dfp_mobile_topic_above_post_stream_ad_sizes: "سایز تبلیغ خود را برای واحد تبلیغات بالای صفحه مباحث در حالت موبایل انتخاب کنید." dfp_topic_above_suggested_code: "کد منحصر بفرد واحد تبلیغ خود را وارد کنید تا زیر آخرین نوشته در صفحه مباحث نمایش داده شود. این کد، یک کد کوتاه (با حداکثر طول 100 کاراکتر) می باشد که هنگام ساختن واحد تبلیغ اختصاص داده شده است، کد جاوا اسکریپت نیست." dfp_topic_above_suggested_ad_sizes: "سایز تبلیغ خود را برای واحد تبلیغات زیر آخرین نوشته در صفحه مباحث انتخاب کنید." - dfp_mobile_topic_above_suggested_code: "کد منحصر بفرد واحد تبلیغ خود را وارد کنید تا زیر آخرین نوشته و بالای مباحث پیشنهادی در صفحه مباحث نمایش داده شود. این کد، یک کد کوتاه (با حداکثر طول 100 کاراکتر) می باشد که هنگام ساختن واحد تبلیغ اختصاص داده شده است، کد جاوا اسکریپت نیست." dfp_mobile_topic_above_suggested_ad_sizes: "سایز تبلیغ خود را برای واحد تبلیغات زیر آخرین نوشته در صفحه مباحث در حالت موبایل انتخاب کنید." diff --git a/config/locales/server.fi.yml b/config/locales/server.fi.yml index 7eff56a..566d6cb 100644 --- a/config/locales/server.fi.yml +++ b/config/locales/server.fi.yml @@ -19,7 +19,7 @@ fi: dfp_mobile_topic_above_post_stream_ad_sizes: "Mobiilinäkymässä ketjusivun ylälaidassa näytettävän mainoksen koko." dfp_topic_above_suggested_code: "Ketjun viimeisimmän viestin jälkeen, ennen ketjusuosituksia näytettävän mainosyksikön yksilöllinen koodi. Kyseessä on lyhyt koodi (enint. 100 merkkiä), joka annetaan mainosyksikölle kun sitä luodaan. Ei JavaScript-koodi." dfp_topic_above_suggested_ad_sizes: "Ketjun viimeisimmän viestin jälkeen näytettävän mainoksen koko." - dfp_mobile_topic_above_suggested_code: "Ketjun viimeisimmän viestin jälkeen, ennen ketjusuosituksia näytettävän mainosyksikön yksilöllinen koodi. Kyseessä on lyhyt koodi (enint. 100 merkkiä), joka annetaan mainosyksikölle kun sitä luodaan. Ei JavaScript-koodi." + dfp_mobile_topic_above_suggested_code: "Mobiilinäkymässä ketjun viimeisimmän viestin jälkeen, ennen ketjusuosituksia näytettävän mainosyksikön yksilöllinen koodi. Kyseessä on lyhyt koodi (enint. 100 merkkiä), joka annetaan mainosyksikölle kun sitä luodaan. Ei JavaScript-koodi." dfp_mobile_topic_above_suggested_ad_sizes: "Mobiilinäkymässä ketjun viimeisimmän viestin jälkeen näytettävän mainoksen koko." dfp_nth_post_code: "Näytä mainos N viestin välein, missä N on syöttämäsi luku." dfp_post_bottom_code: "Joka n:nnen viestin jälkeen viestien välissä näytettävän mainosyksikön yksilöllinen koodi. Kyseessä on lyhyt koodi (enint. 100 merkkiä), joka annetaan mainosyksikölle kun sitä luodaan. Ei JavaScript-koodi." diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index b6ba8bd..3332d3d 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -16,18 +16,15 @@ fr: dfp_target_topic_list_top_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" dfp_topic_above_post_stream_code: "ID de la publicité pour l'emplacement sur la page de sujet ci-dessus tous les messages" dfp_topic_above_post_stream_ad_sizes: "Sélectionner des formats de publicité" - dfp_mobile_topic_above_post_stream_code: "ID de la publicité Mobile pour l'emplacement sur la page de sujet ci-dessus tous les messages" dfp_target_topic_above_post_stream_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_topic_above_post_stream_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" dfp_topic_above_suggested_code: "ID de la publicité pour l'emplacement ci-dessus la liste des sujets suggérés" dfp_topic_above_suggested_ad_sizes: "Sélectionner des formats de publicité" - dfp_mobile_topic_above_suggested_code: "ID de la publicité Mobile pour l'emplacement ci-dessus la liste des sujets suggérés" dfp_target_topic_above_suggested_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_topic_above_suggested_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" dfp_nth_post_code: "Choisissez un numéro de message pour votre publicité d'apparaître dans le message - emplacement en bas" dfp_post_bottom_code: "ID de la publicité qui se trouve au bas d'un message" dfp_post_bottom_ad_sizes: "Sélectionner des formats de publicité" - dfp_mobile_post_bottom_code: "ID de la publicité Mobile qui se trouve au bas d'un message" dfp_target_post_bottom_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_post_bottom_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" adsense_publisher_code: "Votre code 'Référence éditeur'" diff --git a/config/locales/server.it.yml b/config/locales/server.it.yml index 5e5a524..848f12e 100644 --- a/config/locales/server.it.yml +++ b/config/locales/server.it.yml @@ -17,20 +17,17 @@ it: dfp_target_topic_list_top_value_code: "Inserisci i valori personalizzati di targeting - Livello inventario" dfp_topic_above_post_stream_code: "Inserisci il Codice univoco dell'annuncio da mostrare sopra il titolo sulla pagina dell'argomento. E' il codice breve (massimo 100 caratteri) dato all'annuncio quando è stato creato, non il codice JavaScript." dfp_topic_above_post_stream_ad_sizes: "Scegli la dimensione dell'annuncio in cima alla pagina dell'argomento." - dfp_mobile_topic_above_post_stream_code: "Inserisci il codice univoco dell'annuncio da mostrare sopra il titolo sulla pagina dell'argomento per la visualizzazione su mobile. E' il codice breve (max 100 caratteri) dato all'annuncio quando è stato creato, non il codice JavaScript." dfp_mobile_topic_above_post_stream_ad_sizes: "Scegli la dimensione dell'annuncio in cima alla pagina dell'argomento per la visualizzazione su mobile." dfp_target_topic_above_post_stream_key_code: "Inserisci le chiavi personalizzate di targeting - Livello inventario" dfp_target_topic_above_post_stream_value_code: "Inserisci i valori personalizzati di targeting - Livello inventario" dfp_topic_above_suggested_code: "Inserisci il codice univoco dell'annuncio da mostrare dopo l'ultimo messaggio in un argomento, sopra gli argomenti suggeriti. E' il codice breve (max 100 caratteri) dato all'annuncio quando è stato creato, non il codice JavaScript." dfp_topic_above_suggested_ad_sizes: "Scegli la dimensione dell'annuncio dopo l'ultimo messaggio in un argomento." - dfp_mobile_topic_above_suggested_code: "Inserisci il codice univoco dell'annuncio da mostrare dopo l'ultimo messaggio in un argomento, sopra gli argomenti suggeriti. E' il codice breve (max 100 caratteri) dato all'annuncio quando è stato creato, non il codice JavaScript." dfp_mobile_topic_above_suggested_ad_sizes: "Scegli la dimensione dell'annuncio dopo l'ultimo messaggio in un argomento per la visualizzazione su mobile." dfp_target_topic_above_suggested_key_code: "Inserisci le chiavi personalizzate di targeting - Livello inventario" dfp_target_topic_above_suggested_value_code: "Inserisci i valori personalizzati di targeting - Livello inventario" dfp_nth_post_code: "Mostra un annuncio dopo ogni N messaggi, dove N è il valore." dfp_post_bottom_code: "Inserisci il codice univoco dell'annuncio da mostrare tra i messaggi, ogni N messaggi. E' il codice breve (max 100 caratteri) dato all'annuncio quando è stato creato, non il codice JavaScript." dfp_post_bottom_ad_sizes: "Scegli la dimensione dell'annuncio da mostrare tra i messaggi." - dfp_mobile_post_bottom_code: "Inserisci il codice univoco dell'annuncio da mostrare tra i messaggi, ogni N messaggi, per la visualizzazione su mobile. E' il codice breve (max 100 caratteri) dato all'annuncio quando è stato creato, non il codice JavaScript." dfp_mobile_post_bottom_ad_sizes: "Scegli la dimensione dell'annuncio mostrato tra i messaggi per la visualizzazione su mobile." dfp_target_post_bottom_key_code: "Inserisci le chiavi personalizzate di targeting - Livello inventario" dfp_target_post_bottom_value_code: "Inserisci i valori personalizzati di targeting - Livello inventario" diff --git a/config/locales/server.ko.yml b/config/locales/server.ko.yml index 4825ae1..70b7764 100644 --- a/config/locales/server.ko.yml +++ b/config/locales/server.ko.yml @@ -17,20 +17,17 @@ ko: dfp_target_topic_list_top_value_code: "커스텀 타게팅 값을 입력하세요 - 인벤토리 레벨" dfp_topic_above_post_stream_code: "토픽 페이지에서 토픽 제목 위에 표시할 광고 유닛의 고유 부호를 입력하세요. 이 코드는 최대 100자의 짧은 코드로 광고 유닛이 생성될 때 만들어집니다. (자바스크립트 코드가 아닙니다.)" dfp_topic_above_post_stream_ad_sizes: "토픽 페이지 최상단에 표시할 광고 유닛의 광고 사이즈를 선택하세요" - dfp_mobile_topic_above_post_stream_code: "모바일 토픽 페이지에서 토픽 제목 위에 표시할 광고 유닛의 고유 부호를 입력하세요. 이 코드는 최대 100자의 짧은 코드로 광고 유닛이 생성될 때 만들어집니다. (자바스크립트 코드가 아닙니다.)" dfp_mobile_topic_above_post_stream_ad_sizes: "모바일뷰에서 토픽 페이지 최상단에 표시할 광고 유닛의 광고 사이즈를 선택하세요" dfp_target_topic_above_post_stream_key_code: "커스텀 타게팅 키를 입력하세요 - 인벤토리 레벨" dfp_target_topic_above_post_stream_value_code: "커스텀 타게팅 값을 입력하세요 - 인벤토리 레벨" dfp_topic_above_suggested_code: "토픽의 마지막 포스트에 표시할 광고 유닛의 고유 부호를 입력하세요. 이 코드는 최대 100자의 짧은 코드로 광고 유닛이 생성될 때 만들어집니다. (자바스크립트 코드가 아닙니다.)" dfp_topic_above_suggested_ad_sizes: "토픽의 가장 마지막 포스트 다음에 표시할 광고 유닛의 광고 사이즈를 선택하세요" - dfp_mobile_topic_above_suggested_code: "토픽의 마지막 포스트에 표시할 광고 유닛의 고유 부호를 입력하세요. 이 코드는 최대 100자의 짧은 코드로 광고 유닛이 생성될 때 만들어집니다. (자바스크립트 코드가 아닙니다.)" dfp_mobile_topic_above_suggested_ad_sizes: "모바일뷰에서 토픽의 가장 마지막 포스트 다음에 표시할 광고 유닛의 광고 사이즈를 선택하세요" dfp_target_topic_above_suggested_key_code: "커스텀 타게팅 키를 입력하세요 - 인벤토리 레벨" dfp_target_topic_above_suggested_value_code: "커스텀 타게팅 값을 입력하세요 - 인벤토리 레벨" dfp_nth_post_code: "몇 개의 포스트 다음에 광고를 표시할까요?" dfp_post_bottom_code: "포스트 사이에 설정된 갯수 만큼의 포스트 다음에 표시할 광고 유닛의 고유 부호를 입력하세요. 이 코드는 최대 100자의 짧은 코드로 광고 유닛이 생성될 때 만들어집니다. (자바스크립트 코드가 아닙니다.)" dfp_post_bottom_ad_sizes: "포스트 사이에 표시될 광고 유닛의 광고 사이즈를 선택하세요" - dfp_mobile_post_bottom_code: "모바일에서 포스트 사이에 설정된 갯수 만큼의 포스트 다음에 표시할 광고 유닛의 고유 부호를 입력하세요. 이 코드는 최대 100자의 짧은 코드로 광고 유닛이 생성될 때 만들어집니다. (자바스크립트 코드가 아닙니다.)" dfp_mobile_post_bottom_ad_sizes: "모바일뷰에서 포스트 사이에 표시될 광고 유닛의 광고 사이즈를 선택하세요" dfp_target_post_bottom_key_code: "커스텀 타게팅 키를 입력하세요 - 인벤토리 레벨" dfp_target_post_bottom_value_code: "커스텀 타게팅 값을 입력하세요 - 인벤토리 레벨" diff --git a/config/locales/server.nb_NO.yml b/config/locales/server.nb_NO.yml index 156ca67..3c03eab 100644 --- a/config/locales/server.nb_NO.yml +++ b/config/locales/server.nb_NO.yml @@ -26,14 +26,14 @@ nb_NO: amazon_topic_above_post_stream_ad_height_code: "Skriv inn din reklamehøyde" amazon_mobile_topic_above_post_stream_ad_width_code: "Velg din reklamebredde (mobil)" amazon_mobile_topic_above_post_stream_ad_height_code: "Velg din reklamehøyde (mobil)" - amazon_topic_above_suggested_src_code: "Skriv inn src-kode å vise i emne over anbefalninger" + amazon_topic_above_suggested_src_code: "Skriv inn src-kode å vise ved tråd over anbefalninger" amazon_topic_above_suggested_ad_width_code: "Velg din reklamebredde" amazon_topic_above_suggested_ad_height_code: "Velg din reklamehøyde" - amazon_mobile_topic_above_suggested_src_code: "Skriv inn src-kode for å vise mobilreklamer i emne over anbefalninger" + amazon_mobile_topic_above_suggested_src_code: "Skriv inn src-kode for å vise mobilreklamer ved tråd over anbefalninger" amazon_mobile_topic_above_suggested_ad_width_code: "Velg din reklamebredde (mobil)" amazon_mobile_topic_above_suggested_ad_height_code: "Velg din reklamehøyde (mobil)" amazon_post_bottom_ad_width_code: "Velg din reklamebredde" amazon_post_bottom_ad_height_code: "Velg din reklamehøyde" amazon_mobile_post_bottom_ad_width_code: "Velg din reklamebredde (mobil)" amazon_mobile_post_bottom_ad_height_code: "Velg din reklamehøyde (mobil)" - amazon_nth_post_code: "Vis en reklame etter hver N post, der N er denne verdien." + amazon_nth_post_code: "Vis en reklame etter hvert N innlegg, der N er denne verdien." diff --git a/config/locales/server.ur.yml b/config/locales/server.ur.yml index 58bc973..f2bd380 100644 --- a/config/locales/server.ur.yml +++ b/config/locales/server.ur.yml @@ -5,4 +5,77 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -ur: {} +ur: + site_settings: + dfp_publisher_id: "اپنے نیٹ ورک کوڈ، جو آپ کے نیٹ ورک سیٹِنگ میں پایا جاتا ہے، کو درج کیجیے۔" + dfp_through_trust_level: "اپنے صارفین کوٹرسٹ لَیول کی بنیاد پر اشتہارات دکھائیں۔ اس وَیلِیو سے زیادہ ٹرسٹ لَیول والے صارفین کو اشتہارات نہیں دکھاے جائیں گے۔" + dfp_topic_list_top_code: "ٹاپک فہرست کے اوپر اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_topic_list_top_ad_sizes: "ٹاپک فہرست کے اوپر اشتھار کا سائز منتخب کریں۔" + dfp_mobile_topic_list_top_code: "موبائل وِیو میں ٹاپک فہرست کے اوپر اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_mobile_topic_list_top_ad_sizes: "موبائل وِیو میں ٹاپک فہرست کے اوپر اشتھار کا سائز منتخب کریں۔" + dfp_target_topic_list_top_key_code: "اپنی مرضی کی ٹارگیٹنک کیز درج کریں - انوینٹری لیول" + dfp_target_topic_list_top_value_code: "اپنی مرضی کی ٹارگیٹنک وَیلیو درج کریں - انوینٹری لیول" + dfp_topic_above_post_stream_code: "ٹاپک صفحے پر ٹاپک عنوان کے اوپر اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_topic_above_post_stream_ad_sizes: "ٹاپک صفحے کے سب سے اوپر اشتھار کا سائز منتخب کریں۔" + dfp_mobile_topic_above_post_stream_code: "موبائل وِیو میں ٹاپک صفحے پر ٹاپک عنوان کے اوپر اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_mobile_topic_above_post_stream_ad_sizes: "موبائل وِیو میں ٹاپک صفحے کے سب سے اوپر اشتھار کا سائز منتخب کریں۔" + dfp_target_topic_above_post_stream_key_code: "اپنی مرضی کی ٹارگیٹنک کیز درج کریں - انوینٹری لیول" + dfp_target_topic_above_post_stream_value_code: "اپنی مرضی کی ٹارگیٹنک وَیلیو درج کریں - انوینٹری لیول" + dfp_topic_above_suggested_code: "آخری پوسٹ کے بعد، تجویز کردہ ٹاپکس کے اوپر اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_topic_above_suggested_ad_sizes: "آخری پوسٹ کے بعد اشتھار کا سائز منتخب کریں۔" + dfp_mobile_topic_above_suggested_code: "موبائل وِیو میں آخری پوسٹ کے بعد، تجویز کردہ ٹاپکس کے اوپر اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_mobile_topic_above_suggested_ad_sizes: "موبائل وِیو میں آخری پوسٹ کے بعد اشتھار کا سائز منتخب کریں۔" + dfp_target_topic_above_suggested_key_code: "اپنی مرضی کی ٹارگیٹنک کیز درج کریں - انوینٹری لیول" + dfp_target_topic_above_suggested_value_code: "اپنی مرضی کی ٹارگیٹنک وَیلیو درج کریں - انوینٹری لیول" + dfp_nth_post_code: "ہر N پوسٹس کے بعد ایک اشتھار دکھائیں، جہاں N کی یہ قدر ہے۔" + dfp_post_bottom_code: "پوسٹس کے درمیان، ہر N پوسٹ کے بعد اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_post_bottom_ad_sizes: "پوسٹس کے درمیان اشتھار کا سائز منتخب کریں۔" + dfp_mobile_post_bottom_code: "موبائل وِیو میں پوسٹس کے درمیان، ہر N پوسٹ کے بعد اشتھار ظاہر کرنے کیلئے اُس کا منفرد کوڈ درج کریں۔ یہ مختصر کوڈ ہے (زیادہ سے زیادہ 100 حروف) جو اشتھار کی تخلیق کے وقت اسے دیا گیا تھا، یہ جاوااسکرپٹ کوڈ نہیں ہے۔" + dfp_mobile_post_bottom_ad_sizes: "موبائل وِیو میں پوسٹس کے درمیان اشتھار کا سائز منتخب کریں۔" + dfp_target_post_bottom_key_code: "اپنی مرضی کی ٹارگیٹنک کیز درج کریں - انوینٹری لیول" + dfp_target_post_bottom_value_code: "اپنی مرضی کی ٹارگیٹنک وَیلیو درج کریں - انوینٹری لیول" + adsense_publisher_code: "آپ کی پبلیشر آئی ڈی۔ 'pub-' کو چھوڑ کر صرف نمبر درج کریں۔" + adsense_through_trust_level: "صارفین کو ٹرسٹ لَیول کے حساب سے اشتہارات دکھائیں۔ اس قدر سے زیادہ ٹرسٹ لَیول والے صارفین کو اشتہارات نہیں دکھائے جائیں گے۔" + adsense_topic_list_top_code: "ٹاپک فہرست کی ٹاپ جگہ پر اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_mobile_topic_list_top_code: "ٹاپک فہرست کی ٹاپ جگہ پر موبائل اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_topic_list_top_ad_sizes: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_mobile_topic_list_top_ad_size: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_topic_above_post_stream_code: "پوسٹ سٹریم مقام کے اوپر ٹاپک پر اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_mobile_topic_above_post_stream_code: "پوسٹ سٹریم مقام کے اوپر ٹاپک پر موبائل اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_topic_above_post_stream_ad_sizes: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_mobile_topic_above_post_stream_ad_size: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_topic_above_suggested_code: "تجویز کردہ مقام سے اوپر ٹاپک پر اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_mobile_topic_above_suggested_code: "تجویز کردہ مقام سے اوپر ٹاپک پر موبائل اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_topic_above_suggested_ad_sizes: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_mobile_topic_above_suggested_ad_size: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_post_bottom_code: "پوسٹ کے سم سے نیچے مقام پر اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_mobile_post_bottom_code: "پوسٹ کے سب سے نیچے مقام پر موبائل اشتھار ظاہر کرنے کیلئے اُس کا کَوڈ درج کریں۔ یہ اشتھار یونٹ کے لئے مقرر کردہ نمبر ہے، نہ کہ جاوااسکرپٹ کَوڈ۔" + adsense_post_bottom_ad_sizes: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_mobile_post_bottom_ad_size: "اپنے اشتھارات کا سائز منتخب کریں" + adsense_nth_post_code: "ہر N پوسٹس کے بعد ایک اشتھار دکھائیں، جہاں N کی یہ قدر ہے۔" + amazon_through_trust_level: "اپنے صارفین کوٹرسٹ لَیول کی بنیاد پر اشتہارات دکھائیں۔ اس وَیلِیو سے زیادہ ٹرسٹ لَیول والے صارفین کو اشتہارات نہیں دکھاے جائیں گے۔" + amazon_topic_list_top_src_code: "ٹاپک فہرست کے سب سے اوپر مقام پر ظاہر کرنے کے لئے ایس آرسی کوڈ درج کریں" + amazon_topic_list_top_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں" + amazon_topic_list_top_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں" + amazon_mobile_topic_list_top_src_code: "ٹاپک فہرست کے سب سے اوپر مقام پر موبائل اشتھار ظاہر کرنے کے لئے ایس آر سی کوڈ درج کریں" + amazon_mobile_topic_list_top_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں (موبائل)" + amazon_mobile_topic_list_top_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں (موبائل)" + amazon_topic_above_post_stream_src_code: "پوسٹ سٹریم کے اوپر ٹاپک پر ظاہر کرنے کے لئے ایس آر سی کوڈ درج کریں" + amazon_topic_above_post_stream_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں" + amazon_topic_above_post_stream_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں" + amazon_mobile_topic_above_post_stream_src_code: "پوسٹ سٹریم کے اوپر ٹاپک پر موبائل اشتھار ظاہر کرنے کے لئے ایس آر سی کوڈ درج کریں" + amazon_mobile_topic_above_post_stream_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں (موبائل)" + amazon_mobile_topic_above_post_stream_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں (موبائل)" + amazon_topic_above_suggested_src_code: "تجویز کردہ کے اوپر ٹاپک پر ظاہر کرنے کے لئے ایس آر سی کوڈ درج کریں" + amazon_topic_above_suggested_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں" + amazon_topic_above_suggested_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں" + amazon_mobile_topic_above_suggested_src_code: "تجویز کردہ کے اوپر ٹاپک پر موبائل اشتھار ظاہر کرنے کے لئے ایس آر سی کوڈ درج کریں" + amazon_mobile_topic_above_suggested_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں (موبائل)" + amazon_mobile_topic_above_suggested_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں (موبائل)" + amazon_post_bottom_src_code: "پوسٹ کے سب سے نیچے مقام پر ظاہر کرنے کے لئے ایس آر سی کوڈ درج کریں" + amazon_post_bottom_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں" + amazon_post_bottom_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں" + amazon_mobile_post_bottom_src_code: "پوسٹ کے سب سے نیچے مقام پر موبائل اشتھار ظاہر کرنے کے لئے ایس آر سی کوڈ درج کریں" + amazon_mobile_post_bottom_ad_width_code: "اپنے اشتھار کی چوڑائی درج کریں (موبائل)" + amazon_mobile_post_bottom_ad_height_code: "اپنے اشتھار کی اونچائی درج کریں (موبائل)" + amazon_nth_post_code: "ہر N پوسٹس کے بعد ایک اشتھار دکھائیں، جہاں N کی یہ قدر ہے۔" diff --git a/config/locales/server.zh_CN.yml b/config/locales/server.zh_CN.yml index e6a3d2f..5dbdad0 100644 --- a/config/locales/server.zh_CN.yml +++ b/config/locales/server.zh_CN.yml @@ -17,20 +17,17 @@ zh_CN: dfp_target_topic_list_top_value_code: "主页.輸入(英文)指定目標" dfp_topic_above_post_stream_code: "论坛标题以下.输入DFP广告代码" dfp_topic_above_post_stream_ad_sizes: "论坛标题以下.DFP广告大小选择" - dfp_mobile_topic_above_post_stream_code: "论坛标题以下.手机版.输入DFP广告代码" dfp_mobile_topic_above_post_stream_ad_sizes: "移动端视图主题页面顶端.DFP广告大小选择" dfp_target_topic_above_post_stream_key_code: "论坛标题以下.輸入(英文)指定群組" dfp_target_topic_above_post_stream_value_code: "论坛标题以下.輸入(英文)指定目標" dfp_topic_above_suggested_code: "论坛主题建议以上.输入DFP广告代码" dfp_topic_above_suggested_ad_sizes: "论坛主题建议以上.DFP广告大小选择" - dfp_mobile_topic_above_suggested_code: "论坛主题建议以上.手机版.输入DFP广告代码" dfp_mobile_topic_above_suggested_ad_sizes: "移动端视图主题页面最后帖子后.DFP广告大小选择" dfp_target_topic_above_suggested_key_code: "论坛主题建议以上.輸入(英文)指定群組" dfp_target_topic_above_suggested_value_code: "论坛主题建议以上.輸入(英文)指定目標" dfp_nth_post_code: "Nth评论" dfp_post_bottom_code: "评论以下.输入DFP广告代码" dfp_post_bottom_ad_sizes: "评论以下.DFP广告大小选择" - dfp_mobile_post_bottom_code: "评论以下.手机版.输入DFP广告代码" dfp_mobile_post_bottom_ad_sizes: "移动端视图帖子间.DFP广告大小选择" dfp_target_post_bottom_key_code: "主页.輸入(英文)指定群組" dfp_target_post_bottom_value_code: "主页.輸入(英文)指定目標" From 4313ad44f90464eeabd8e37354bb910f912496b5 Mon Sep 17 00:00:00 2001 From: Felix Freiberger Date: Thu, 1 Feb 2018 14:38:20 +0100 Subject: [PATCH 07/23] Renamed /var/docker to /var/discourse --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 729f6cc..a8fdaa5 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ hooks: Rebuild the container ``` -cd /var/docker +cd /var/discourse git pull ./launcher rebuild app ``` From 5cfead3d2a509f126ba581a4e1fb0cd5410b98ec Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 15 Feb 2018 13:59:08 -0500 Subject: [PATCH 08/23] FIX: AdSense responsive ads in between posts were too wide --- plugin.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugin.rb b/plugin.rb index 6acc7dc..5b0a9ae 100755 --- a/plugin.rb +++ b/plugin.rb @@ -53,6 +53,20 @@ register_css < Date: Thu, 15 Feb 2018 13:59:44 -0500 Subject: [PATCH 09/23] remove blue background --- plugin.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index 5b0a9ae..d560dac 100755 --- a/plugin.rb +++ b/plugin.rb @@ -55,7 +55,6 @@ register_css < Date: Thu, 15 Feb 2018 14:32:10 -0500 Subject: [PATCH 10/23] FIX: Amazon amazon_mobile_topic_above_suggested_src_code setting did not work --- .../components/amazon-product-links.js.es6 | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/assets/javascripts/discourse/components/amazon-product-links.js.es6 b/assets/javascripts/discourse/components/amazon-product-links.js.es6 index 2579422..acb1e5e 100644 --- a/assets/javascripts/discourse/components/amazon-product-links.js.es6 +++ b/assets/javascripts/discourse/components/amazon-product-links.js.es6 @@ -1,9 +1,3 @@ -var amazon_width = ''; -var amazon_height = ''; -var mobile_amazon_width = ''; -var mobile_amazon_height = ''; -var user_input = ''; -var user_input_mobile = ''; var currentUser = Discourse.User.current(); var data = { @@ -44,7 +38,7 @@ if (!Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_topic_above_su data["topic-above-suggested"]["amazon_height"] = parseInt(Discourse.SiteSettings.amazon_topic_above_suggested_ad_height_code); } -if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_above_sugggested_src_code) { +if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code) { data["topic-above-suggested"]["user_input_mobile"] = Discourse.SiteSettings.amazon_mobile_topic_above_suggested_src_code; data["topic-above-suggested"]["mobile_amazon_width"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_width_code); data["topic-above-suggested"]["mobile_amazon_height"] = parseInt(Discourse.SiteSettings.amazon_mobile_topic_above_suggested_ad_height_code); @@ -64,22 +58,16 @@ if (Discourse.Mobile.mobileView && Discourse.SiteSettings.amazon_mobile_post_bot export default Ember.Component.extend({ - amazon_width: amazon_width, - amazon_height: amazon_height, - mobile_amazon_width: mobile_amazon_width, - mobile_amazon_height: mobile_amazon_height, - user_input: user_input, - user_input_mobile: user_input_mobile, - classNames: ['amazon-product-links'], init: function() { - this.set('user_input', data[this.placement]["user_input"] ); - this.set('amazon_width', data[this.placement]["amazon_width"] ); - this.set('amazon_height', data[this.placement]["amazon_height"] ); - this.set('user_input_mobile', data[this.placement]["user_input_mobile"] ); - this.set('mobile_amazon_height', data[this.placement]["mobile_amazon_height"] ); - this.set('mobile_amazon_width', data[this.placement]["mobile_amazon_width"] ); + let placement = this.get('placement'); + this.set('user_input', data[placement]["user_input"] ); + this.set('amazon_width', data[placement]["amazon_width"] ); + this.set('amazon_height', data[placement]["amazon_height"] ); + this.set('user_input_mobile', data[placement]["user_input_mobile"] ); + this.set('mobile_amazon_height', data[placement]["mobile_amazon_height"] ); + this.set('mobile_amazon_width', data[placement]["mobile_amazon_width"] ); this._super(); }, From b17f1c44e423db097fb9ebffb24b02cb3c9a29ef Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 7 Mar 2018 14:13:57 -0500 Subject: [PATCH 11/23] Update translations --- config/locales/client.cs.yml | 3 +++ config/locales/client.fr.yml | 3 +++ config/locales/client.ro.yml | 12 +++++++++++- config/locales/server.fr.yml | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/config/locales/client.cs.yml b/config/locales/client.cs.yml index 3cd31e4..960ced6 100644 --- a/config/locales/client.cs.yml +++ b/config/locales/client.cs.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ cs: + js: + adplugin: + advertisement_label: 'REKLAMA' admin_js: admin: site_settings: diff --git a/config/locales/client.fr.yml b/config/locales/client.fr.yml index 364ec86..0055b0f 100644 --- a/config/locales/client.fr.yml +++ b/config/locales/client.fr.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ fr: + js: + adplugin: + advertisement_label: 'PUBLICITE' admin_js: admin: site_settings: diff --git a/config/locales/client.ro.yml b/config/locales/client.ro.yml index 31d1c44..3e4259a 100644 --- a/config/locales/client.ro.yml +++ b/config/locales/client.ro.yml @@ -5,4 +5,14 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -ro: {} +ro: + js: + adplugin: + advertisement_label: 'PUBLICITATE' + admin_js: + admin: + site_settings: + categories: + dfp_plugin: 'DFP' + adsense_plugin: 'Adsense' + amazon_plugin: 'Amazon' diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index 3332d3d..6a871ef 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -12,6 +12,7 @@ fr: dfp_topic_list_top_code: "ID de la publicité pour l'emplacement au dessus de la liste des sujets" dfp_topic_list_top_ad_sizes: "Sélectionner des formats de publicité" dfp_mobile_topic_list_top_code: "ID de la publicité Mobile pour l'emplacement au dessus de la liste des sujets" + dfp_mobile_topic_list_top_ad_sizes: "Choisir le format de publicité pour l'unité de publicité au-dessus des listes de sujet en mode portable." dfp_target_topic_list_top_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_topic_list_top_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" dfp_topic_above_post_stream_code: "ID de la publicité pour l'emplacement sur la page de sujet ci-dessus tous les messages" From 5d7ced78a6b36fea5fca5246741f9db19b611301 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 24 Apr 2018 10:27:12 -0400 Subject: [PATCH 12/23] Update translations --- config/locales/client.vi.yml | 5 ++- config/locales/client.zh_CN.yml | 3 ++ config/locales/server.fr.yml | 68 +++++++++++++++++++-------------- config/locales/server.id.yml | 4 +- config/locales/server.pt.yml | 29 +++++++++++++- 5 files changed, 77 insertions(+), 32 deletions(-) diff --git a/config/locales/client.vi.yml b/config/locales/client.vi.yml index fa809fe..a59ea0f 100644 --- a/config/locales/client.vi.yml +++ b/config/locales/client.vi.yml @@ -5,4 +5,7 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -vi: {} +vi: + js: + adplugin: + advertisement_label: 'Quảng cáo' diff --git a/config/locales/client.zh_CN.yml b/config/locales/client.zh_CN.yml index b55704c..2796365 100644 --- a/config/locales/client.zh_CN.yml +++ b/config/locales/client.zh_CN.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ zh_CN: + js: + adplugin: + advertisement_label: '广告' admin_js: admin: site_settings: diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index 6a871ef..0fcd3b2 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -7,43 +7,53 @@ fr: site_settings: - dfp_publisher_id: "Votre code 'Référence éditeur'" - dfp_through_trust_level: "Afficher les publicités aux utilisateurs en fonction de leurs niveaux de confiance" - dfp_topic_list_top_code: "ID de la publicité pour l'emplacement au dessus de la liste des sujets" - dfp_topic_list_top_ad_sizes: "Sélectionner des formats de publicité" - dfp_mobile_topic_list_top_code: "ID de la publicité Mobile pour l'emplacement au dessus de la liste des sujets" + dfp_publisher_id: "Saisir votre code réseau, qui se trouve dans vos paramètres réseau." + dfp_through_trust_level: "Afficher les publicités aux utilisateurs en fonction de leurs niveaux de confiance. Les utilisateurs avec un niveau de confiance supérieur à celui-ci ne verront pas de publicité." + dfp_topic_list_top_code: "Saisir le Code unique de l'unité de publicité à afficher au dessus de la liste des sujets. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript. " + dfp_topic_list_top_ad_sizes: "Choisir le format de publicité pour l'unité de publicité au-dessus des listes de sujet." + dfp_mobile_topic_list_top_code: "Saisir le Code unique de l'unité de publicité à afficher au dessus de la liste des sujets en vue mobile. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript. " dfp_mobile_topic_list_top_ad_sizes: "Choisir le format de publicité pour l'unité de publicité au-dessus des listes de sujet en mode portable." dfp_target_topic_list_top_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_topic_list_top_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" - dfp_topic_above_post_stream_code: "ID de la publicité pour l'emplacement sur la page de sujet ci-dessus tous les messages" - dfp_topic_above_post_stream_ad_sizes: "Sélectionner des formats de publicité" + dfp_topic_above_post_stream_code: "Saisir le Code unique de l'unité de publicité à afficher au dessus du titre d'un sujet sur la page sujet. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript." + dfp_topic_above_post_stream_ad_sizes: "Choisir la taille de l'unité de publicité affiché en haut des pages sujet." + dfp_mobile_topic_above_post_stream_code: "Saisir le Code unique de l'unité de publicité à afficher au dessus du titre d'un sujet sur la page sujet en vue mobile. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript." + dfp_mobile_topic_above_post_stream_ad_sizes: "Choisir la taille de l'unité de publicité affiché en haut des pages sujet en vue mobile." dfp_target_topic_above_post_stream_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_topic_above_post_stream_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" - dfp_topic_above_suggested_code: "ID de la publicité pour l'emplacement ci-dessus la liste des sujets suggérés" - dfp_topic_above_suggested_ad_sizes: "Sélectionner des formats de publicité" + dfp_topic_above_suggested_code: "Saisir le Code unique de l'unité de publicité à afficher après le dernier message d'un sujet, au dessus des sujets suggérés. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript." + dfp_topic_above_suggested_ad_sizes: "Choisir la taille de l'unité de publicité affiché après le dernier message d'un sujet." + dfp_mobile_topic_above_suggested_code: "Saisir le Code unique de l'unité de publicité à afficher après le dernier message d'un sujet, au dessus des sujets suggérés, en vue mobile. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript." + dfp_mobile_topic_above_suggested_ad_sizes: "Choisir la taille de l'unité de publicité affiché après le dernier message d'un sujet en vue mobile." dfp_target_topic_above_suggested_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_topic_above_suggested_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" - dfp_nth_post_code: "Choisissez un numéro de message pour votre publicité d'apparaître dans le message - emplacement en bas" - dfp_post_bottom_code: "ID de la publicité qui se trouve au bas d'un message" - dfp_post_bottom_ad_sizes: "Sélectionner des formats de publicité" + dfp_nth_post_code: "Afficher une publicité après chaque N messages, où N est cette valeur." + dfp_post_bottom_code: "Saisir le Code unique de l'unité de publicité à afficher entre les messages après chaque nième message. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript." + dfp_post_bottom_ad_sizes: "Choisir la taille de l'unité de publicité affiché entre les messages." + dfp_mobile_post_bottom_code: "Saisir le Code unique de l'unité de publicité à afficher entre les messages après chaque nième message, en vue mobile. Ceci est un code court (100 caractères maximum) attribué à l'unité de publicité à sa création, et non un code JavaScript." + dfp_mobile_post_bottom_ad_sizes: "Choisir la taille de l'unité de publicité affiché entre les messages en vue mobile." dfp_target_post_bottom_key_code: "Entrez vos clés pour le ciblage personnalisé - niveau des stocks" dfp_target_post_bottom_value_code: "Entrez vos valeurs pour le ciblage personnalisé - niveau des stocks" - adsense_publisher_code: "Votre code 'Référence éditeur'" - adsense_through_trust_level: "Afficher les publicités aux utilisateurs en fonction de leurs niveaux de confiance" - adsense_topic_list_top_code: "ID de la publicité pour l'emplacement au dessus de la liste des sujets" - adsense_mobile_topic_list_top_code: "ID de la publicité Mobile pour l'emplacement au dessus de la liste des sujets" - adsense_topic_list_top_ad_sizes: "Sélectionner des formats de publicité" - adsense_topic_above_post_stream_code: "ID de la publicité pour l'emplacement sur la page de sujet ci-dessus tous les messages" - adsense_mobile_topic_above_post_stream_code: "ID de la publicité Mobile pour l'emplacement sur la page de sujet ci-dessus tous les messages" - adsense_topic_above_post_stream_ad_sizes: "Sélectionner des formats de publicité" - adsense_topic_above_suggested_code: "ID de la publicité pour l'emplacement ci-dessus la liste des sujets suggérés" - adsense_mobile_topic_above_suggested_code: "ID de la publicité Mobile pour l'emplacement ci-dessus la liste des sujets suggérés" - adsense_topic_above_suggested_ad_sizes: "Sélectionner des formats de publicité" - adsense_post_bottom_code: "ID de la publicité qui se trouve au bas d'un message" - adsense_mobile_post_bottom_code: "ID de la publicité Mobile qui se trouve au bas d'un message" - adsense_post_bottom_ad_sizes: "Sélectionner des formats de publicité" - adsense_nth_post_code: "Choisissez un numéro de message pour votre publicité d'apparaître dans le message - emplacement en bas" - amazon_through_trust_level: "Afficher les publicités aux utilisateurs en fonction de leurs niveaux de confiance" + adsense_publisher_code: "Votre ID publisher. Saisir que le chiffre, en excluant le 'pub-'." + adsense_through_trust_level: "Afficher les publicités aux utilisateurs en fonction de leurs niveaux de confiance. Les utilisateurs avec un niveau de confiance supérieur à celui-ci ne verront pas de publicité." + adsense_topic_list_top_code: "ID de la publicité pour l'emplacement au dessus de la liste des sujets. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_mobile_topic_list_top_code: "ID de la publicité Mobile pour l'emplacement au dessus de la liste des sujets. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_topic_list_top_ad_sizes: "Choisir la taille de la publicité" + adsense_mobile_topic_list_top_ad_size: "Choisir la taille de la publicité" + adsense_topic_above_post_stream_code: "ID de la publicité pour l'emplacement sur la page de sujet ci-dessus tous les messages. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_mobile_topic_above_post_stream_code: "ID de la publicité mobile pour l'emplacement sur la page de sujet au-dessus de tous les messages. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_topic_above_post_stream_ad_sizes: "Choisir la taille de la publicité" + adsense_mobile_topic_above_post_stream_ad_size: "Choisir la taille de la publicité" + adsense_topic_above_suggested_code: "ID de la publicité pour l'emplacement ci-dessus la liste des sujets suggérés. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_mobile_topic_above_suggested_code: "ID de la publicité Mobile pour l'emplacement ci-dessus la liste des sujets suggérés. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_topic_above_suggested_ad_sizes: "Choisir la taille de la publicité" + adsense_mobile_topic_above_suggested_ad_size: "Choisir la taille de la publicité" + adsense_post_bottom_code: "ID de la publicité qui se trouve au bas d'un message. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_mobile_post_bottom_code: "ID de la publicité Mobile qui se trouve au bas d'un message. Ceci est le chiffre assigné à l'unité de publicité, et non le code JavaScript." + adsense_post_bottom_ad_sizes: "Choisir la taille de la publicité" + adsense_mobile_post_bottom_ad_size: "Choisir la taille de la publicité" + adsense_nth_post_code: "Afficher une publicité après chaque N messages, où N est cette valeur." + amazon_through_trust_level: "Afficher les publicités aux utilisateurs en fonction de leurs niveaux de confiance. Les utilisateurs avec un niveau de confiance supérieur à celui-ci ne verront pas de publicité." amazon_topic_list_top_src_code: "ID SRC de la publicité pour l'emplacement au dessus de la liste des sujets" amazon_topic_list_top_ad_width_code: "Entrez la largeur de la publicité" amazon_topic_list_top_ad_height_code: "Entrez la hauteur de la publicité" @@ -68,4 +78,4 @@ fr: amazon_mobile_post_bottom_src_code: "ID SRC de la publicité Mobile qui se trouve au bas d'un message" amazon_mobile_post_bottom_ad_width_code: "Entrez la largeur de la publicité Mobile" amazon_mobile_post_bottom_ad_height_code: "Entrez la hauteur de la publicité Mobile" - amazon_nth_post_code: "Choisissez un numéro de message pour votre publicité d'apparaître dans le message - emplacement en bas" + amazon_nth_post_code: "Afficher une publicité après chaque N messages, où N est cette valeur." diff --git a/config/locales/server.id.yml b/config/locales/server.id.yml index 2112cad..f37ae14 100644 --- a/config/locales/server.id.yml +++ b/config/locales/server.id.yml @@ -5,4 +5,6 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -id: {} +id: + site_settings: + dfp_publisher_id: "Masukan kode jaringan, ditemukan pada pengaturan jaringan." diff --git a/config/locales/server.pt.yml b/config/locales/server.pt.yml index d12527a..beac804 100644 --- a/config/locales/server.pt.yml +++ b/config/locales/server.pt.yml @@ -5,4 +5,31 @@ # To work with us on translations, join this project: # https://www.transifex.com/projects/p/discourse-org/ -pt: {} +pt: + site_settings: + dfp_publisher_id: "Insira o seu código de rede, que pode encontrar nas suas configurações de rede." + dfp_through_trust_level: "Mostre os seus anúncios aos utilizadores com base nos níveis de confiança. Os utilizadores com nível de confiança superior a este valor não irão ver anúncios." + adsense_topic_list_top_ad_sizes: "Escolha o tamanho do seu anúncio" + adsense_mobile_topic_list_top_ad_size: "Escolha o tamanho do seu anúncio" + adsense_topic_above_post_stream_ad_sizes: "Escolha o tamanho do seu anúncio" + adsense_mobile_topic_above_post_stream_ad_size: "Escolha o tamanho do seu anúncio" + adsense_topic_above_suggested_ad_sizes: "Escolha o tamanho do seu anúncio" + adsense_mobile_topic_above_suggested_ad_size: "Escolha o tamanho do seu anúncio" + adsense_post_bottom_ad_sizes: "Escolha o tamanho do seu anúncio" + adsense_mobile_post_bottom_ad_size: "Escolha o tamanho do seu anúncio" + amazon_topic_list_top_ad_width_code: "Insira a largura do seu anúncio" + amazon_topic_list_top_ad_height_code: "Insira a altura do seu anúncio" + amazon_mobile_topic_list_top_ad_width_code: "Insira a largura do seu anúncio (móvel)" + amazon_mobile_topic_list_top_ad_height_code: "Insira a altura do seu anúncio (móvel)" + amazon_topic_above_post_stream_ad_width_code: "Insira a largura do seu anúncio" + amazon_topic_above_post_stream_ad_height_code: "Insira a altura do seu anúncio" + amazon_mobile_topic_above_post_stream_ad_width_code: "Insira a largura do seu anúncio (móvel)" + amazon_mobile_topic_above_post_stream_ad_height_code: "Insira a altura do seu anúncio (móvel)" + amazon_topic_above_suggested_ad_width_code: "Insira a largura do seu anúncio" + amazon_topic_above_suggested_ad_height_code: "Insira a altura do seu anúncio" + amazon_mobile_topic_above_suggested_ad_width_code: "Insira a largura do seu anúncio (móvel)" + amazon_mobile_topic_above_suggested_ad_height_code: "Insira a altura do seu anúncio (móvel)" + amazon_post_bottom_ad_width_code: "Insira a largura do seu anúncio" + amazon_post_bottom_ad_height_code: "Insira a altura do seu anúncio" + amazon_mobile_post_bottom_ad_width_code: "Insira a largura do seu anúncio (móvel)" + amazon_mobile_post_bottom_ad_height_code: "Insira a altura do seu anúncio (móvel)" From 136cceb1e3daa29ba8ef9ba98d6f55871607f07b Mon Sep 17 00:00:00 2001 From: Jeff Wong Date: Wed, 16 May 2018 13:30:15 -0700 Subject: [PATCH 13/23] FIX: resolve collision on ember's builtin w string function --- assets/javascripts/discourse/components/google-dfp-ad.js.es6 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index dc05230..4d8c021 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -216,6 +216,8 @@ export default Ember.Component.extend({ _initGoogleDFP: function() { if (!this.get('showAd')) { return; } + const ember_w_function = String.prototype.w; + String.prototype.w = null; var self = this; loadGoogle(this.siteSettings).then(function() { self.set('loadedGoogletag', true); @@ -229,6 +231,8 @@ export default Ember.Component.extend({ window.googletag.pubads().refresh([slot.ad]); } }); + }).finally(function() { + String.prototype.w = ember_w_function; }); }.on('didInsertElement'), From 465ca5a09acef3ec7ed4052eb6762d2ee34f7755 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 31 May 2018 15:26:16 -0400 Subject: [PATCH 14/23] Update translations --- config/locales/client.bg.yml | 8 ++++++++ config/locales/client.it.yml | 3 +++ config/locales/client.pt.yml | 3 +++ config/locales/client.sl.yml | 11 +++++++++++ config/locales/client.sr.yml | 8 ++++++++ config/locales/client.vi.yml | 2 +- config/locales/server.bg.yml | 8 ++++++++ config/locales/server.es.yml | 32 +++++++++++++++++--------------- config/locales/server.sl.yml | 8 ++++++++ config/locales/server.sr.yml | 8 ++++++++ 10 files changed, 75 insertions(+), 16 deletions(-) create mode 100644 config/locales/client.bg.yml create mode 100644 config/locales/client.sl.yml create mode 100644 config/locales/client.sr.yml create mode 100644 config/locales/server.bg.yml create mode 100644 config/locales/server.sl.yml create mode 100644 config/locales/server.sr.yml diff --git a/config/locales/client.bg.yml b/config/locales/client.bg.yml new file mode 100644 index 0000000..53ef6a6 --- /dev/null +++ b/config/locales/client.bg.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +bg: {} diff --git a/config/locales/client.it.yml b/config/locales/client.it.yml index 90e6edd..9792124 100644 --- a/config/locales/client.it.yml +++ b/config/locales/client.it.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ it: + js: + adplugin: + advertisement_label: 'ANNUNCIO' admin_js: admin: site_settings: diff --git a/config/locales/client.pt.yml b/config/locales/client.pt.yml index 32dbf9f..ae74ea1 100644 --- a/config/locales/client.pt.yml +++ b/config/locales/client.pt.yml @@ -6,6 +6,9 @@ # https://www.transifex.com/projects/p/discourse-org/ pt: + js: + adplugin: + advertisement_label: 'Publicidade' admin_js: admin: site_settings: diff --git a/config/locales/client.sl.yml b/config/locales/client.sl.yml new file mode 100644 index 0000000..ba1e36e --- /dev/null +++ b/config/locales/client.sl.yml @@ -0,0 +1,11 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +sl: + js: + adplugin: + advertisement_label: 'OGLAS' diff --git a/config/locales/client.sr.yml b/config/locales/client.sr.yml new file mode 100644 index 0000000..7e57a61 --- /dev/null +++ b/config/locales/client.sr.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +sr: {} diff --git a/config/locales/client.vi.yml b/config/locales/client.vi.yml index a59ea0f..0451326 100644 --- a/config/locales/client.vi.yml +++ b/config/locales/client.vi.yml @@ -8,4 +8,4 @@ vi: js: adplugin: - advertisement_label: 'Quảng cáo' + advertisement_label: 'QUẢNG CÁO' diff --git a/config/locales/server.bg.yml b/config/locales/server.bg.yml new file mode 100644 index 0000000..53ef6a6 --- /dev/null +++ b/config/locales/server.bg.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +bg: {} diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index 020978e..4e19e84 100644 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -7,28 +7,30 @@ es: site_settings: - dfp_publisher_id: "Introduce tu código de network, que puedes encontrar en la configuración." - dfp_through_trust_level: "Muestra los anuncios a los usuarios basándose en su nivel de confianza. Los usuarios con un nivel de confianza superior a este no verán anuncios." + dfp_publisher_id: "Ingrese su network code, que podes encontrar en la configuración." + dfp_through_trust_level: "Muestre sus anuncios a los usuarios basados en los niveles de confianza. Usuarios con un nivel de confianza elevado no verían anuncios." dfp_topic_list_top_code: "Ingrese su código único de anuncio para mostrar por encima de la lista de temas. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." - dfp_topic_list_top_ad_sizes: "Elige el tamaño de tu anuncio sobre la lista de temas" - dfp_mobile_topic_list_top_code: "Ingrese su código único del anuncio (móvil) para ver por encima de la lista de temas. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." + dfp_topic_list_top_ad_sizes: "Seleccione el tamaño de tu anuncio para el anuncio sobre la lista de temas." + dfp_mobile_topic_list_top_code: "Ingrese su código único del anuncio para ver por encima de la lista de temas en la vista móvil. Este es un código corto (máx 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_mobile_topic_list_top_ad_sizes: "Selecciona el tamaño de anuncios para ser mostrado arriba de la lista de temas o en la vista móvil." dfp_target_topic_list_top_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_list_top_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" - dfp_topic_above_post_stream_code: "Ingrese su código único de anuncio para mostrar en la página de los temas por encima de la relación de mensajes (posts). Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." - dfp_topic_above_post_stream_ad_sizes: "Seleccione el tamaño de tu anuncio" - dfp_mobile_topic_above_post_stream_code: "Itroduce el código único de la unidad de anuncio a mostrar sobre el título de un tema en móviles. Este es el código corto (máximo 100 caracteres) dado cuando fue creada la unidad, no el código JavaScript." - dfp_mobile_topic_above_post_stream_ad_sizes: "Selecciona tu tamaño de anuncio para el top de la lista en versión móvil." + dfp_topic_above_post_stream_code: "Ingrese su código único de anuncio para mostrarse arriba del título del tema en la página del tema. Este es un código corto (máx 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." + dfp_topic_above_post_stream_ad_sizes: "Seleccione el tamaño de tu anuncio para el anuncio en la parte superior de la página de temas." + dfp_mobile_topic_above_post_stream_code: "Ingrese su código único de anuncio para mostrar por encima del título de un tema de la lista de temas en la vista del móvil. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." + dfp_mobile_topic_above_post_stream_ad_sizes: "Selecciona tu tamaño de anuncio para el top de la lista de temas en versión móvil." dfp_target_topic_above_post_stream_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_above_post_stream_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" - dfp_topic_above_suggested_code: "Ingrese su código de anuncio para mostrar por encima de temas sugeridos." - dfp_topic_above_suggested_ad_sizes: "Seleccione el tamaño de tu anuncio" + dfp_topic_above_suggested_code: "Ingrese su código de anuncio para mostrar después del último post en un tema, por encima de temas sugeridos. Este es un código corto (máx 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." + dfp_topic_above_suggested_ad_sizes: "Seleccione el tamaño de tu anuncio para el anuncio después del último post en un tema." + dfp_mobile_topic_above_suggested_code: "Ingrese su código único de anuncio para mostrar después del último post en un tema, sobre la lista de temas sugeridos en la vista del móvil. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_mobile_topic_above_suggested_ad_sizes: "Selecciona tu tamaño de anuncio para debajo de la lista en versión móvil." dfp_target_topic_above_suggested_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_topic_above_suggested_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" dfp_nth_post_code: "Elija un número de post para su anuncio; se mostrará al final de ese mensaje" - dfp_post_bottom_code: "Ingrese su código único de anuncio para mostrar al final de un post. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." + dfp_post_bottom_code: "Ingrese su código único de anuncio para mostrar al final de un post. Este es un código corto (máx 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_post_bottom_ad_sizes: "Seleccione el tamaño de tu anuncio entre posts." + dfp_mobile_post_bottom_code: "Ingrese su código único de anuncio para mostrar entre posts después de n posts en la vista del móvil. Este es un código corto (max 100 caracteres) dado al anuncio cuando fue creado, no el código JavaScript." dfp_mobile_post_bottom_ad_sizes: "Selecciona tu tamaño de anuncio para ser mostrado entre posts en la vista móvil." dfp_target_post_bottom_key_code: "Llaves de entrada para la orientación personalizada en el nivel de inventario" dfp_target_post_bottom_value_code: "Los valores de entrada para la orientación personalizada en el nivel de inventario" @@ -37,19 +39,19 @@ es: adsense_topic_list_top_code: "Ingrese su código de anuncio para mostrar por encima de la lista de temas" adsense_mobile_topic_list_top_code: "Ingrese su código del anuncio (móvil) para ver por encima de la lista de temas" adsense_topic_list_top_ad_sizes: "Seleccione el tamaño de tu anuncio" - adsense_mobile_topic_list_top_ad_size: "Selecciona el tamaño del anuncio" + adsense_mobile_topic_list_top_ad_size: "Selecciona tamaño de anuncio" adsense_topic_above_post_stream_code: "Ingrese su código de anuncio para mostrar en la página de los temas por encima de la relación de posts" adsense_mobile_topic_above_post_stream_code: "Ingrese su código del anuncio (móvil) para ver en la página de los temas por encima de la relación de posts" adsense_topic_above_post_stream_ad_sizes: "Seleccione el tamaño de tu anuncio" - adsense_mobile_topic_above_post_stream_ad_size: "Selecciona el tamaño del anuncio" + adsense_mobile_topic_above_post_stream_ad_size: "Selecciona tamaño de anuncio" adsense_topic_above_suggested_code: "Ingrese su código de anuncio para mostrar por encima de temas sugeridos" adsense_mobile_topic_above_suggested_code: "Ingrese su código del anuncio (móvil) para ver por encima de temas sugeridos" adsense_topic_above_suggested_ad_sizes: "Seleccione el tamaño de tu anuncio" - adsense_mobile_topic_above_suggested_ad_size: "Selecciona el tamaño del anuncio" + adsense_mobile_topic_above_suggested_ad_size: "Selecciona tamaño de anuncio" adsense_post_bottom_code: "Ingrese su código de anuncio para mostrar al final de un post" adsense_mobile_post_bottom_code: "Ingrese su código del anuncio (móvil) para ver al final de un post" adsense_post_bottom_ad_sizes: "Seleccione el tamaño de tu anuncio" - adsense_mobile_post_bottom_ad_size: "Selecciona el tamaño del anuncio" + adsense_mobile_post_bottom_ad_size: "Selecciona tamaño de anuncio" adsense_nth_post_code: "Elija un número de post para su anuncio; se mostrará al final de ese mensaje" amazon_through_trust_level: "Muestre sus anuncios a los usuarios basados en los niveles de confianza" amazon_topic_list_top_src_code: "Ingrese su código SRC de anuncio para mostrar por encima de la lista de temas" diff --git a/config/locales/server.sl.yml b/config/locales/server.sl.yml new file mode 100644 index 0000000..154d194 --- /dev/null +++ b/config/locales/server.sl.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +sl: {} diff --git a/config/locales/server.sr.yml b/config/locales/server.sr.yml new file mode 100644 index 0000000..7e57a61 --- /dev/null +++ b/config/locales/server.sr.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +sr: {} From a23386cd17d436c9858cd7b8718de8a0fa492b00 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 4 Jun 2018 16:52:43 -0400 Subject: [PATCH 15/23] FIX: DFP ad units not refreshed when navigating between topic lists --- .../discovery-list-container-top/discourse-adplugin.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs b/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs index a4217b1..af418d9 100644 --- a/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs +++ b/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs @@ -3,7 +3,7 @@ {{google-adsense placement="topic-list-top" listLoading=listLoading}} {{/if}} {{#if siteSettings.dfp_mobile_topic_list_top_code}} - {{google-dfp-ad placement="topic-list-top" refreshOnChange=loading category=category.slug listLoading=listLoading}} + {{google-dfp-ad placement="topic-list-top" refreshOnChange=listLoading category=category.slug listLoading=listLoading}} {{/if}} {{#if siteSettings.amazon_mobile_topic_list_top_src_code}} {{amazon-product-links placement="topic-list-top" listLoading=listLoading}} @@ -13,7 +13,7 @@ {{google-adsense placement="topic-list-top" listLoading=listLoading}} {{/if}} {{#if siteSettings.dfp_topic_list_top_code}} - {{google-dfp-ad placement="topic-list-top" refreshOnChange=loading category=category.slug listLoading=listLoading}} + {{google-dfp-ad placement="topic-list-top" refreshOnChange=listLoading category=category.slug listLoading=listLoading}} {{/if}} {{#if siteSettings.amazon_topic_list_top_src_code}} {{amazon-product-links placement="topic-list-top" listLoading=listLoading}} From 1cd33da72266158108403109695219d45f3eea10 Mon Sep 17 00:00:00 2001 From: Eric Berry Date: Thu, 7 Jun 2018 17:17:19 -0600 Subject: [PATCH 16/23] Add CodeFund --- .../discourse/components/codefund-ad.js.es6 | 98 +++++++++++++++++++ .../components/adplugin-container.hbs | 10 ++ .../templates/components/codefund-ad.hbs | 29 ++++++ .../components/codefund/post-bottom.hbs | 8 ++ .../codefund/topic-above-post-stream.hbs | 11 +++ .../codefund/topic-above-suggested.hbs | 11 +++ .../components/codefund/topic-list-top.hbs | 11 +++ .../discourse-adplugin.hbs | 6 ++ .../discourse-adplugin.hbs | 6 ++ .../discourse-adplugin.hbs | 6 ++ .../initializers/initialize-ad-plugin.js.es6 | 21 ++-- config/locales/client.en.yml | 3 +- config/locales/server.en.yml | 11 +++ config/settings.yml | 37 ++++++- plugin.rb | 66 +++++++++++++ 15 files changed, 326 insertions(+), 8 deletions(-) create mode 100644 assets/javascripts/discourse/components/codefund-ad.js.es6 create mode 100644 assets/javascripts/discourse/templates/components/codefund-ad.hbs create mode 100644 assets/javascripts/discourse/templates/components/codefund/post-bottom.hbs create mode 100644 assets/javascripts/discourse/templates/components/codefund/topic-above-post-stream.hbs create mode 100644 assets/javascripts/discourse/templates/components/codefund/topic-above-suggested.hbs create mode 100644 assets/javascripts/discourse/templates/components/codefund/topic-list-top.hbs diff --git a/assets/javascripts/discourse/components/codefund-ad.js.es6 b/assets/javascripts/discourse/components/codefund-ad.js.es6 new file mode 100644 index 0000000..3a4307b --- /dev/null +++ b/assets/javascripts/discourse/components/codefund-ad.js.es6 @@ -0,0 +1,98 @@ +var _loaded = false, + _promise = null, + currentUser = Discourse.User.current(), + propertyId = Discourse.SiteSettings.codefund_property_code; + +function loadCodeFund() { + if (_loaded) { + return Ember.RSVP.resolve(); + } + + if (_promise) { + return _promise; + } + + const url = 'https://codefund.io/t/s/' + propertyId + '/details.json'; + + _promise = new Promise(function(resolve, reject){ + let xhr = new XMLHttpRequest(); + + xhr.open('GET', url); + xhr.onreadystatechange = handler; + xhr.responseType = 'json'; + xhr.setRequestHeader('Accept', 'application/json'); + xhr.send(); + + function handler() { + if (this.readyState === this.DONE) { + _loaded = true; + if (this.status === 200) { + resolve(this.response); + } else { + reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); + } + } + }; + }); + + return _promise; +} + + +export default Ember.Component.extend({ + classNameBindings: [':codefund-ad', 'classForSlot', 'isResponsive:codefund-responsive'], + propertyId: propertyId, + adRequested: false, + adDetails: {}, + + _triggerAds() { + this.set('adRequested', true); + loadCodeFund().then((data) => { + this.set('adDetails', data); + this.set('adRequested', false); + console.log('Loaded ad'); + }).catch(error => console.log(error)); + }, + + didInsertElement() { + this._super(); + + if (!this.get('showAd')) { return; } + + if (this.get('listLoading')) { return; } + + Ember.run.scheduleOnce('afterRender', this, this._triggerAds); + }, + + waitForLoad: function() { + if (this.get('adRequested')) { return; } // already requested that this ad unit be populated + if (!this.get('listLoading')) { + Ember.run.scheduleOnce('afterRender', this, this._triggerAds); + } + }.observes('listLoading'), + + checkTrustLevels: function() { + return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.codefund_through_trust_level)); + }.property('trust_level'), + + showAd: function() { + return Discourse.SiteSettings.codefund_property_code && this.get('checkTrustLevels'); + }.property('checkTrustLevels'), + + displayPostBottom: function() { + return this.get('placement') === 'post-bottom'; + }.property('placement'), + + displayTopicAbovePostStream: function() { + return this.get('placement') === 'topic-above-post-stream'; + }.property('placement'), + + displayTopicAboveSuggested: function() { + return this.get('placement') === 'topic-above-suggested'; + }.property('placement'), + + displayTopicListTop: function() { + return this.get('placement') === 'topic-list-top'; + }.property('placement') + +}); diff --git a/assets/javascripts/discourse/templates/components/adplugin-container.hbs b/assets/javascripts/discourse/templates/components/adplugin-container.hbs index 65e1b28..bcffef5 100644 --- a/assets/javascripts/discourse/templates/components/adplugin-container.hbs +++ b/assets/javascripts/discourse/templates/components/adplugin-container.hbs @@ -14,6 +14,11 @@ {{amazon-product-links placement="post-bottom" postNumber=model.post_number}} {{/if}} {{/if}} + {{#if model.postSpecificCountCodeFund}} + {{#if siteSettings.codefund_below_post_enabled}} + {{codefund-ad placement="post-bottom" postNumber=model.post_number}} + {{/if}} + {{/if}} {{else}} {{#if model.postSpecificCountAdsense}} {{#if siteSettings.adsense_post_bottom_code}} @@ -30,4 +35,9 @@ {{amazon-product-links placement="post-bottom" postNumber=model.post_number}} {{/if}} {{/if}} + {{#if model.postSpecificCountCodeFund}} + {{#if siteSettings.codefund_below_post_enabled}} + {{codefund-ad placement="post-bottom" postNumber=model.post_number}} + {{/if}} + {{/if}} {{/if}} diff --git a/assets/javascripts/discourse/templates/components/codefund-ad.hbs b/assets/javascripts/discourse/templates/components/codefund-ad.hbs new file mode 100644 index 0000000..e89aac2 --- /dev/null +++ b/assets/javascripts/discourse/templates/components/codefund-ad.hbs @@ -0,0 +1,29 @@ +{{#if showAd}} + {{#if site.mobileView}} + {{#if displayPostBottom}} + {{partial "components/codefund/post-bottom"}} + {{/if}} + {{#if displayTopicAbovePostStream}} + {{partial "components/codefund/topic-above-post-stream"}} + {{/if}} + {{#if displayTopicAboveSuggested}} + {{partial "components/codefund/topic-above-suggested"}} + {{/if}} + {{#if displayTopicListTop}} + {{partial "components/codefund/topic-list-top"}} + {{/if}} + {{else}} + {{#if displayPostBottom}} + {{partial "components/codefund/post-bottom"}} + {{/if}} + {{#if displayTopicAbovePostStream}} + {{partial "components/codefund/topic-above-post-stream"}} + {{/if}} + {{#if displayTopicAboveSuggested}} + {{partial "components/codefund/topic-above-suggested"}} + {{/if}} + {{#if displayTopicListTop}} + {{partial "components/codefund/topic-list-top"}} + {{/if}} + {{/if}} +{{/if}} diff --git a/assets/javascripts/discourse/templates/components/codefund/post-bottom.hbs b/assets/javascripts/discourse/templates/components/codefund/post-bottom.hbs new file mode 100644 index 0000000..70461da --- /dev/null +++ b/assets/javascripts/discourse/templates/components/codefund/post-bottom.hbs @@ -0,0 +1,8 @@ + + + {{#if siteSettings.codefund_display_advertiser_labels}} + {{siteSettings.codefund_advertiser_short_label}} + {{/if}} + {{adDetails.headline}} {{adDetails.description}} + + diff --git a/assets/javascripts/discourse/templates/components/codefund/topic-above-post-stream.hbs b/assets/javascripts/discourse/templates/components/codefund/topic-above-post-stream.hbs new file mode 100644 index 0000000..cd6ea94 --- /dev/null +++ b/assets/javascripts/discourse/templates/components/codefund/topic-above-post-stream.hbs @@ -0,0 +1,11 @@ + + + {{#if siteSettings.codefund_display_advertiser_labels}} + {{siteSettings.codefund_advertiser_label}} + {{/if}} + {{adDetails.headline}} {{adDetails.description}} + + + ads via codefund.io + + diff --git a/assets/javascripts/discourse/templates/components/codefund/topic-above-suggested.hbs b/assets/javascripts/discourse/templates/components/codefund/topic-above-suggested.hbs new file mode 100644 index 0000000..7d0a19c --- /dev/null +++ b/assets/javascripts/discourse/templates/components/codefund/topic-above-suggested.hbs @@ -0,0 +1,11 @@ + + + {{#if siteSettings.codefund_display_advertiser_labels}} + {{siteSettings.codefund_advertiser_label}} + {{/if}} + {{adDetails.headline}} {{adDetails.description}} + + + ads via codefund.io + + diff --git a/assets/javascripts/discourse/templates/components/codefund/topic-list-top.hbs b/assets/javascripts/discourse/templates/components/codefund/topic-list-top.hbs new file mode 100644 index 0000000..7ac35a7 --- /dev/null +++ b/assets/javascripts/discourse/templates/components/codefund/topic-list-top.hbs @@ -0,0 +1,11 @@ + + + {{#if siteSettings.codefund_display_advertiser_labels}} + {{siteSettings.codefund_advertiser_label}} + {{/if}} + {{adDetails.headline}} {{adDetails.description}} + + + ads via codefund.io + + diff --git a/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs b/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs index af418d9..f0e9a5d 100644 --- a/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs +++ b/assets/javascripts/discourse/templates/connectors/discovery-list-container-top/discourse-adplugin.hbs @@ -8,6 +8,9 @@ {{#if siteSettings.amazon_mobile_topic_list_top_src_code}} {{amazon-product-links placement="topic-list-top" listLoading=listLoading}} {{/if}} + {{#if siteSettings.codefund_top_of_topic_list_enabled}} + {{codefund-ad placement="topic-list-top" listLoading=listLoading refreshOnChange=listLoading}} + {{/if}} {{else}} {{#if siteSettings.adsense_topic_list_top_code}} {{google-adsense placement="topic-list-top" listLoading=listLoading}} @@ -18,4 +21,7 @@ {{#if siteSettings.amazon_topic_list_top_src_code}} {{amazon-product-links placement="topic-list-top" listLoading=listLoading}} {{/if}} + {{#if siteSettings.codefund_top_of_topic_list_enabled}} + {{codefund-ad placement="topic-list-top" listLoading=listLoading refreshOnChange=listLoading}} + {{/if}} {{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs b/assets/javascripts/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs index ed36964..e57429a 100644 --- a/assets/javascripts/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs +++ b/assets/javascripts/discourse/templates/connectors/topic-above-post-stream/discourse-adplugin.hbs @@ -8,6 +8,9 @@ {{#if siteSettings.amazon_mobile_topic_above_post_stream_src_code}} {{amazon-product-links placement="topic-above-post-stream"}} {{/if}} + {{#if siteSettings.codefund_above_post_stream_enabled}} + {{codefund-ad placement="topic-above-post-stream"}} + {{/if}} {{else}} {{#if siteSettings.adsense_topic_above_post_stream_code}} {{google-adsense placement="topic-above-post-stream"}} @@ -18,4 +21,7 @@ {{#if siteSettings.amazon_topic_above_post_stream_src_code}} {{amazon-product-links placement="topic-above-post-stream"}} {{/if}} + {{#if siteSettings.codefund_above_post_stream_enabled}} + {{codefund-ad placement="topic-above-post-stream"}} + {{/if}} {{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs b/assets/javascripts/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs index 8e3f62c..8f45084 100644 --- a/assets/javascripts/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs +++ b/assets/javascripts/discourse/templates/connectors/topic-above-suggested/discourse-adplugin.hbs @@ -8,6 +8,9 @@ {{#if siteSettings.amazon_mobile_topic_above_suggested_src_code}} {{amazon-product-links placement="topic-above-suggested"}} {{/if}} + {{#if siteSettings.codefund_above_suggested_enabled}} + {{codefund-ad placement="topic-above-suggested"}} + {{/if}} {{else}} {{#if siteSettings.adsense_topic_above_suggested_code}} {{google-adsense placement="topic-above-suggested"}} @@ -18,4 +21,7 @@ {{#if siteSettings.amazon_topic_above_suggested_src_code}} {{amazon-product-links placement="topic-above-suggested"}} {{/if}} + {{#if siteSettings.codefund_above_suggested_enabled}} + {{codefund-ad placement="topic-above-suggested"}} + {{/if}} {{/if}} \ No newline at end of file diff --git a/assets/javascripts/initializers/initialize-ad-plugin.js.es6 b/assets/javascripts/initializers/initialize-ad-plugin.js.es6 index 74aac40..9e216fc 100644 --- a/assets/javascripts/initializers/initialize-ad-plugin.js.es6 +++ b/assets/javascripts/initializers/initialize-ad-plugin.js.es6 @@ -1,5 +1,7 @@ import PostModel from 'discourse/models/post'; -import { withPluginApi } from 'discourse/lib/plugin-api'; +import { + withPluginApi +} from 'discourse/lib/plugin-api'; export default { name: 'initialize-ad-plugin', @@ -7,19 +9,23 @@ export default { const siteSettings = container.lookup('site-settings:main'); PostModel.reopen({ - postSpecificCountDFP: function() { + postSpecificCountDFP: function () { return this.isNthPost(parseInt(siteSettings.dfp_nth_post_code)); }.property('post_number'), - postSpecificCountAdsense: function() { + postSpecificCountAdsense: function () { return this.isNthPost(parseInt(siteSettings.adsense_nth_post_code)); }.property('post_number'), - postSpecificCountAmazon: function() { + postSpecificCountAmazon: function () { return this.isNthPost(parseInt(siteSettings.amazon_nth_post_code)); }.property('post_number'), - isNthPost: function(n) { + postSpecificCountCodeFund: function () { + return this.isNthPost(parseInt(siteSettings.codefund_nth_post_code)); + }.property('post_number'), + + isNthPost: function (n) { if (n && n > 0) { return (this.get('post_number') % n) === 0; } else { @@ -32,7 +38,10 @@ export default { api.decorateWidget('post:after', dec => { if (dec.canConnectComponent) { - return dec.connect({ component: 'adplugin-container', context: 'model' }); + return dec.connect({ + component: 'adplugin-container', + context: 'model' + }); } // Old way for backwards compatibility diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index bb8ba7d..876dfc1 100755 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -8,4 +8,5 @@ en: categories: dfp_plugin: 'DFP' adsense_plugin: 'Adsense' - amazon_plugin: 'Amazon' \ No newline at end of file + amazon_plugin: 'Amazon' + codefund_plugin: 'CodeFund' \ No newline at end of file diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index b3f15f4..0e659ea 100755 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -78,3 +78,14 @@ en: amazon_mobile_post_bottom_ad_width_code: "Input your ad width (mobile)" amazon_mobile_post_bottom_ad_height_code: "Input your ad height (mobile)" amazon_nth_post_code: "Show an ad after every N posts, where N is this value." + + codefund_property_code: "Your CodeFund property ID" + codefund_advertiser_label: "Label that appears before the advertisement (e.g. Advertiser or Supporter)" + codefund_advertiser_short_label: "Abbreviated label that appears before the advertisement (e.g. Ad)" + codefund_display_advertiser_labels: "Show the advertiser label (e.g. 'Advertiser') on the ads" + codefund_through_trust_level: "Show your ads to users based on trust levels. Users with trust level higher than this value will not see ads" + codefund_nth_post_code: "Show an ad after every N posts, where N is this value" + codefund_below_post_enabled: "Show an ad below each blog post" + codefund_above_post_stream_enabled: "Show an ad above the post stream" + codefund_above_suggested_enabled: "Show an ad above the suggested topic list" + codefund_top_of_topic_list_enabled: "Show an ad above the topic list" diff --git a/config/settings.yml b/config/settings.yml index 1d119d8..10cade2 100755 --- a/config/settings.yml +++ b/config/settings.yml @@ -340,4 +340,39 @@ amazon_plugin: default: '' amazon_mobile_post_bottom_ad_height_code: client: true - default: '' \ No newline at end of file + default: '' + +codefund_plugin: + codefund_property_code: + client: true + default: '' + regex: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' + codefund_advertiser_label: + client: true + default: 'Advertiser' + codefund_advertiser_short_label: + client: true + default: 'Ad' + codefund_through_trust_level: + client: true + default: 2 + enum: 'TrustLevelSetting' + codefund_nth_post_code: + client: true + default: 4 + min: 1 + codefund_display_advertiser_labels: + default: true + client: true + codefund_below_post_enabled: + default: true + client: true + codefund_above_post_stream_enabled: + default: true + client: true + codefund_above_suggested_enabled: + default: true + client: true + codefund_top_of_topic_list_enabled: + default: true + client: true diff --git a/plugin.rb b/plugin.rb index d560dac..cff4605 100755 --- a/plugin.rb +++ b/plugin.rb @@ -6,6 +6,9 @@ register_css < Date: Thu, 7 Jun 2018 17:28:20 -0600 Subject: [PATCH 17/23] Cleaned up debugs --- assets/javascripts/discourse/components/codefund-ad.js.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/components/codefund-ad.js.es6 b/assets/javascripts/discourse/components/codefund-ad.js.es6 index 3a4307b..666a0e3 100644 --- a/assets/javascripts/discourse/components/codefund-ad.js.es6 +++ b/assets/javascripts/discourse/components/codefund-ad.js.es6 @@ -7,7 +7,7 @@ function loadCodeFund() { if (_loaded) { return Ember.RSVP.resolve(); } - + if (_promise) { return _promise; } @@ -26,6 +26,7 @@ function loadCodeFund() { function handler() { if (this.readyState === this.DONE) { _loaded = true; + if (this.status === 200) { resolve(this.response); } else { @@ -48,9 +49,10 @@ export default Ember.Component.extend({ _triggerAds() { this.set('adRequested', true); loadCodeFund().then((data) => { + _loaded = false; + _promise = null; this.set('adDetails', data); this.set('adRequested', false); - console.log('Loaded ad'); }).catch(error => console.log(error)); }, From 11a621fd50d9626f33230c09afafdefb7b026c75 Mon Sep 17 00:00:00 2001 From: Eric Berry Date: Thu, 7 Jun 2018 17:49:15 -0600 Subject: [PATCH 18/23] Only display ad if content exists --- .../discourse/components/codefund-ad.js.es6 | 8 ++- .../templates/components/codefund-ad.hbs | 54 ++++++++++--------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/assets/javascripts/discourse/components/codefund-ad.js.es6 b/assets/javascripts/discourse/components/codefund-ad.js.es6 index 666a0e3..b45ffba 100644 --- a/assets/javascripts/discourse/components/codefund-ad.js.es6 +++ b/assets/javascripts/discourse/components/codefund-ad.js.es6 @@ -26,7 +26,7 @@ function loadCodeFund() { function handler() { if (this.readyState === this.DONE) { _loaded = true; - + if (this.status === 200) { resolve(this.response); } else { @@ -95,6 +95,10 @@ export default Ember.Component.extend({ displayTopicListTop: function() { return this.get('placement') === 'topic-list-top'; - }.property('placement') + }.property('placement'), + + hasAd: function() { + return ((this.get('adDetails.description') || '').length > 0); + }.property('adDetails') }); diff --git a/assets/javascripts/discourse/templates/components/codefund-ad.hbs b/assets/javascripts/discourse/templates/components/codefund-ad.hbs index e89aac2..3902d2b 100644 --- a/assets/javascripts/discourse/templates/components/codefund-ad.hbs +++ b/assets/javascripts/discourse/templates/components/codefund-ad.hbs @@ -1,29 +1,31 @@ {{#if showAd}} - {{#if site.mobileView}} - {{#if displayPostBottom}} - {{partial "components/codefund/post-bottom"}} - {{/if}} - {{#if displayTopicAbovePostStream}} - {{partial "components/codefund/topic-above-post-stream"}} - {{/if}} - {{#if displayTopicAboveSuggested}} - {{partial "components/codefund/topic-above-suggested"}} - {{/if}} - {{#if displayTopicListTop}} - {{partial "components/codefund/topic-list-top"}} - {{/if}} - {{else}} - {{#if displayPostBottom}} - {{partial "components/codefund/post-bottom"}} - {{/if}} - {{#if displayTopicAbovePostStream}} - {{partial "components/codefund/topic-above-post-stream"}} - {{/if}} - {{#if displayTopicAboveSuggested}} - {{partial "components/codefund/topic-above-suggested"}} - {{/if}} - {{#if displayTopicListTop}} - {{partial "components/codefund/topic-list-top"}} + {{#if hasAd}} + {{#if site.mobileView}} + {{#if displayPostBottom}} + {{partial "components/codefund/post-bottom"}} + {{/if}} + {{#if displayTopicAbovePostStream}} + {{partial "components/codefund/topic-above-post-stream"}} + {{/if}} + {{#if displayTopicAboveSuggested}} + {{partial "components/codefund/topic-above-suggested"}} + {{/if}} + {{#if displayTopicListTop}} + {{partial "components/codefund/topic-list-top"}} + {{/if}} + {{else}} + {{#if displayPostBottom}} + {{partial "components/codefund/post-bottom"}} + {{/if}} + {{#if displayTopicAbovePostStream}} + {{partial "components/codefund/topic-above-post-stream"}} + {{/if}} + {{#if displayTopicAboveSuggested}} + {{partial "components/codefund/topic-above-suggested"}} + {{/if}} + {{#if displayTopicListTop}} + {{partial "components/codefund/topic-list-top"}} + {{/if}} {{/if}} {{/if}} -{{/if}} +{{/if}} \ No newline at end of file From 1b7f642da6f95e4f32d723e4ec98e806e158f23d Mon Sep 17 00:00:00 2001 From: Eric Berry Date: Tue, 12 Jun 2018 15:21:23 -0600 Subject: [PATCH 19/23] Cleanup --- .../discourse/components/codefund-ad.js.es6 | 4 -- .../templates/components/codefund-ad.hbs | 52 +++++++++---------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/assets/javascripts/discourse/components/codefund-ad.js.es6 b/assets/javascripts/discourse/components/codefund-ad.js.es6 index b45ffba..9bb428e 100644 --- a/assets/javascripts/discourse/components/codefund-ad.js.es6 +++ b/assets/javascripts/discourse/components/codefund-ad.js.es6 @@ -97,8 +97,4 @@ export default Ember.Component.extend({ return this.get('placement') === 'topic-list-top'; }.property('placement'), - hasAd: function() { - return ((this.get('adDetails.description') || '').length > 0); - }.property('adDetails') - }); diff --git a/assets/javascripts/discourse/templates/components/codefund-ad.hbs b/assets/javascripts/discourse/templates/components/codefund-ad.hbs index 3902d2b..1c0f80d 100644 --- a/assets/javascripts/discourse/templates/components/codefund-ad.hbs +++ b/assets/javascripts/discourse/templates/components/codefund-ad.hbs @@ -1,31 +1,29 @@ {{#if showAd}} - {{#if hasAd}} - {{#if site.mobileView}} - {{#if displayPostBottom}} - {{partial "components/codefund/post-bottom"}} - {{/if}} - {{#if displayTopicAbovePostStream}} - {{partial "components/codefund/topic-above-post-stream"}} - {{/if}} - {{#if displayTopicAboveSuggested}} - {{partial "components/codefund/topic-above-suggested"}} - {{/if}} - {{#if displayTopicListTop}} - {{partial "components/codefund/topic-list-top"}} - {{/if}} - {{else}} - {{#if displayPostBottom}} - {{partial "components/codefund/post-bottom"}} - {{/if}} - {{#if displayTopicAbovePostStream}} - {{partial "components/codefund/topic-above-post-stream"}} - {{/if}} - {{#if displayTopicAboveSuggested}} - {{partial "components/codefund/topic-above-suggested"}} - {{/if}} - {{#if displayTopicListTop}} - {{partial "components/codefund/topic-list-top"}} - {{/if}} + {{#if site.mobileView}} + {{#if displayPostBottom}} + {{partial "components/codefund/post-bottom"}} + {{/if}} + {{#if displayTopicAbovePostStream}} + {{partial "components/codefund/topic-above-post-stream"}} + {{/if}} + {{#if displayTopicAboveSuggested}} + {{partial "components/codefund/topic-above-suggested"}} + {{/if}} + {{#if displayTopicListTop}} + {{partial "components/codefund/topic-list-top"}} + {{/if}} + {{else}} + {{#if displayPostBottom}} + {{partial "components/codefund/post-bottom"}} + {{/if}} + {{#if displayTopicAbovePostStream}} + {{partial "components/codefund/topic-above-post-stream"}} + {{/if}} + {{#if displayTopicAboveSuggested}} + {{partial "components/codefund/topic-above-suggested"}} + {{/if}} + {{#if displayTopicListTop}} + {{partial "components/codefund/topic-list-top"}} {{/if}} {{/if}} {{/if}} \ No newline at end of file From 9e84a89f767604260aa64e810d9c8dc518d038cc Mon Sep 17 00:00:00 2001 From: Eric Berry Date: Wed, 20 Jun 2018 09:15:15 -0600 Subject: [PATCH 20/23] Refactors per review --- .../discourse/components/codefund-ad.js.es6 | 34 ++++++++++++------- .../initializers/initialize-ad-plugin.js.es6 | 12 +++---- config/locales/server.en.yml | 4 +-- config/settings.yml | 4 +-- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/assets/javascripts/discourse/components/codefund-ad.js.es6 b/assets/javascripts/discourse/components/codefund-ad.js.es6 index 9bb428e..46e985a 100644 --- a/assets/javascripts/discourse/components/codefund-ad.js.es6 +++ b/assets/javascripts/discourse/components/codefund-ad.js.es6 @@ -1,20 +1,22 @@ +import { default as computed, observes } from 'ember-addons/ember-computed-decorators'; + var _loaded = false, _promise = null, currentUser = Discourse.User.current(), - propertyId = Discourse.SiteSettings.codefund_property_code; + propertyId = Discourse.SiteSettings.codefund_property_id; function loadCodeFund() { if (_loaded) { return Ember.RSVP.resolve(); } - + if (_promise) { return _promise; } const url = 'https://codefund.io/t/s/' + propertyId + '/details.json'; - _promise = new Promise(function(resolve, reject){ + _promise = new Promise(function(resolve, reject) { let xhr = new XMLHttpRequest(); xhr.open('GET', url); @@ -66,35 +68,41 @@ export default Ember.Component.extend({ Ember.run.scheduleOnce('afterRender', this, this._triggerAds); }, + @observes('listLoading') waitForLoad: function() { if (this.get('adRequested')) { return; } // already requested that this ad unit be populated if (!this.get('listLoading')) { Ember.run.scheduleOnce('afterRender', this, this._triggerAds); } - }.observes('listLoading'), + }, checkTrustLevels: function() { return !((currentUser) && (currentUser.get('trust_level') > Discourse.SiteSettings.codefund_through_trust_level)); }.property('trust_level'), - showAd: function() { - return Discourse.SiteSettings.codefund_property_code && this.get('checkTrustLevels'); - }.property('checkTrustLevels'), + @computed('checkTrustLevels') + showAd: function(checkTrustLevels) { + return Discourse.SiteSettings.codefund_property_id && checkTrustLevels; + }, - displayPostBottom: function() { - return this.get('placement') === 'post-bottom'; - }.property('placement'), + @computed('placement') + displayPostBottom: function(placement) { + return placement === 'post-bottom'; + }, + @computed('placement') displayTopicAbovePostStream: function() { return this.get('placement') === 'topic-above-post-stream'; - }.property('placement'), + }, + @computed('placement') displayTopicAboveSuggested: function() { return this.get('placement') === 'topic-above-suggested'; - }.property('placement'), + }, + @computed('placement') displayTopicListTop: function() { return this.get('placement') === 'topic-list-top'; - }.property('placement'), + } }); diff --git a/assets/javascripts/initializers/initialize-ad-plugin.js.es6 b/assets/javascripts/initializers/initialize-ad-plugin.js.es6 index 9e216fc..abc2274 100644 --- a/assets/javascripts/initializers/initialize-ad-plugin.js.es6 +++ b/assets/javascripts/initializers/initialize-ad-plugin.js.es6 @@ -9,23 +9,23 @@ export default { const siteSettings = container.lookup('site-settings:main'); PostModel.reopen({ - postSpecificCountDFP: function () { + postSpecificCountDFP: function() { return this.isNthPost(parseInt(siteSettings.dfp_nth_post_code)); }.property('post_number'), - postSpecificCountAdsense: function () { + postSpecificCountAdsense: function() { return this.isNthPost(parseInt(siteSettings.adsense_nth_post_code)); }.property('post_number'), - postSpecificCountAmazon: function () { + postSpecificCountAmazon: function() { return this.isNthPost(parseInt(siteSettings.amazon_nth_post_code)); }.property('post_number'), - postSpecificCountCodeFund: function () { - return this.isNthPost(parseInt(siteSettings.codefund_nth_post_code)); + postSpecificCountCodeFund: function() { + return this.isNthPost(parseInt(siteSettings.codefund_nth_post)); }.property('post_number'), - isNthPost: function (n) { + isNthPost: function(n) { if (n && n > 0) { return (this.get('post_number') % n) === 0; } else { diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 0e659ea..18d8275 100755 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -79,12 +79,12 @@ en: amazon_mobile_post_bottom_ad_height_code: "Input your ad height (mobile)" amazon_nth_post_code: "Show an ad after every N posts, where N is this value." - codefund_property_code: "Your CodeFund property ID" + codefund_property_id: "Your CodeFund property ID" codefund_advertiser_label: "Label that appears before the advertisement (e.g. Advertiser or Supporter)" codefund_advertiser_short_label: "Abbreviated label that appears before the advertisement (e.g. Ad)" codefund_display_advertiser_labels: "Show the advertiser label (e.g. 'Advertiser') on the ads" codefund_through_trust_level: "Show your ads to users based on trust levels. Users with trust level higher than this value will not see ads" - codefund_nth_post_code: "Show an ad after every N posts, where N is this value" + codefund_nth_post: "Show an ad after every N posts, where N is this value" codefund_below_post_enabled: "Show an ad below each blog post" codefund_above_post_stream_enabled: "Show an ad above the post stream" codefund_above_suggested_enabled: "Show an ad above the suggested topic list" diff --git a/config/settings.yml b/config/settings.yml index 10cade2..944f62b 100755 --- a/config/settings.yml +++ b/config/settings.yml @@ -343,7 +343,7 @@ amazon_plugin: default: '' codefund_plugin: - codefund_property_code: + codefund_property_id: client: true default: '' regex: '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' @@ -357,7 +357,7 @@ codefund_plugin: client: true default: 2 enum: 'TrustLevelSetting' - codefund_nth_post_code: + codefund_nth_post: client: true default: 4 min: 1 From 595b44fe45041156bcd27731a2d9177a08d995d1 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 20 Jun 2018 15:26:25 -0400 Subject: [PATCH 21/23] fix setting description --- config/locales/server.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 18d8275..7b3d705 100755 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -85,7 +85,7 @@ en: codefund_display_advertiser_labels: "Show the advertiser label (e.g. 'Advertiser') on the ads" codefund_through_trust_level: "Show your ads to users based on trust levels. Users with trust level higher than this value will not see ads" codefund_nth_post: "Show an ad after every N posts, where N is this value" - codefund_below_post_enabled: "Show an ad below each blog post" + codefund_below_post_enabled: "Show an ad below each post" codefund_above_post_stream_enabled: "Show an ad above the post stream" codefund_above_suggested_enabled: "Show an ad above the suggested topic list" codefund_top_of_topic_list_enabled: "Show an ad above the topic list" From eb4f18aaa84cb4fe0d04ffae738741e3cb63c33f Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 20 Jun 2018 15:33:06 -0400 Subject: [PATCH 22/23] fix layout of /categories page --- plugin.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugin.rb b/plugin.rb index cff4605..d139c08 100755 --- a/plugin.rb +++ b/plugin.rb @@ -114,8 +114,6 @@ and (max-width : 775px) { } .codefund-wrapper { - float: left; - position: relative; z-index: 1; font-family: system, "Helvetica Neue", Helvetica, Arial; font-size: 13px; From 014ee3187befa27d2a74ac0b9d88235188e74e78 Mon Sep 17 00:00:00 2001 From: Eric Berry Date: Fri, 22 Jun 2018 14:41:59 -0600 Subject: [PATCH 23/23] Ensure CodeFund request is only made if the Property ID is provided Also updated README with CodeFund instructions and link --- README.md | 4 ++++ assets/javascripts/discourse/components/codefund-ad.js.es6 | 2 ++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index a8fdaa5..690ce82 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ This is the official Discourse advertising plugin. It allows advertisements to * [Google Adsense](http://www.google.com.au/adsense/start/why-adsense.html) * [Google Double Click for Publishers](https://www.google.com/dfp) * [Amazon Affiliates](http://affiliate-program.amazon.com) - Banner and Product Link Ads +* [CodeFund](https://codefund.io) - Ethical Ad Platform for Developers ## Quick Start in 3 Steps @@ -58,6 +59,7 @@ There are 2 easy steps for configuring your Discourse settings to enable adverti
  • Adsense - if using Adsense as your advertisement platform.
  • DFP - if using the DoubleClick for Publishers advertisement platform.
  • +
  • CodeFund - if using the CodeFund ethical advertisement platform.
@@ -82,7 +84,9 @@ Only for Product Link and Banner Ads. ![](https://www.dropbox.com/sc/l67fb5c3tl8bq3d/AAAAMmccMW3kkIeBR7cBdWoFa?dl=1) +##### CodeFund Embed Tag to Discourse's Site Settings +![CodeFund Instructions](https://s3-us-west-2.amazonaws.com/codesponsor/discourse-codefund-instructions.png) ### Step 3 - See Your Ad diff --git a/assets/javascripts/discourse/components/codefund-ad.js.es6 b/assets/javascripts/discourse/components/codefund-ad.js.es6 index 46e985a..01baeeb 100644 --- a/assets/javascripts/discourse/components/codefund-ad.js.es6 +++ b/assets/javascripts/discourse/components/codefund-ad.js.es6 @@ -49,6 +49,8 @@ export default Ember.Component.extend({ adDetails: {}, _triggerAds() { + if (!propertyId) return; + this.set('adRequested', true); loadCodeFund().then((data) => { _loaded = false;