Merge branch 'master' into stable
This commit is contained in:
+113
@@ -0,0 +1,113 @@
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.4
|
||||
DisabledByDefault: true
|
||||
Exclude:
|
||||
- 'db/schema.rb'
|
||||
- 'bundle/**/*'
|
||||
- 'vendor/**/*'
|
||||
- 'node_modules/**/*'
|
||||
- 'public/**/*'
|
||||
|
||||
# Prefer &&/|| over and/or.
|
||||
Style/AndOr:
|
||||
Enabled: true
|
||||
|
||||
# Do not use braces for hash literals when they are the last argument of a
|
||||
# method call.
|
||||
Style/BracesAroundHashParameters:
|
||||
Enabled: true
|
||||
|
||||
# Align `when` with `case`.
|
||||
Layout/CaseIndentation:
|
||||
Enabled: true
|
||||
|
||||
# Align comments with method definitions.
|
||||
Layout/CommentIndentation:
|
||||
Enabled: true
|
||||
|
||||
# No extra empty lines.
|
||||
Layout/EmptyLines:
|
||||
Enabled: true
|
||||
|
||||
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
||||
Style/HashSyntax:
|
||||
Enabled: true
|
||||
|
||||
# Two spaces, no tabs (for indentation).
|
||||
Layout/IndentationWidth:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAfterColon:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAfterComma:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundEqualsInParameterDefault:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundKeyword:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceAroundOperators:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceBeforeFirstArg:
|
||||
Enabled: true
|
||||
|
||||
# Defining a method with parameters needs parentheses.
|
||||
Style/MethodDefParentheses:
|
||||
Enabled: true
|
||||
|
||||
# Use `foo {}` not `foo{}`.
|
||||
Layout/SpaceBeforeBlockBraces:
|
||||
Enabled: true
|
||||
|
||||
# Use `foo { bar }` not `foo {bar}`.
|
||||
Layout/SpaceInsideBlockBraces:
|
||||
Enabled: true
|
||||
|
||||
# Use `{ a: 1 }` not `{a:1}`.
|
||||
Layout/SpaceInsideHashLiteralBraces:
|
||||
Enabled: true
|
||||
|
||||
Layout/SpaceInsideParens:
|
||||
Enabled: true
|
||||
|
||||
# Detect hard tabs, no hard tabs.
|
||||
Layout/Tab:
|
||||
Enabled: true
|
||||
|
||||
# Blank lines should not have any spaces.
|
||||
Layout/TrailingBlankLines:
|
||||
Enabled: true
|
||||
|
||||
# No trailing whitespace.
|
||||
Layout/TrailingWhitespace:
|
||||
Enabled: true
|
||||
|
||||
Lint/Debugger:
|
||||
Enabled: true
|
||||
|
||||
Lint/BlockAlignment:
|
||||
Enabled: true
|
||||
|
||||
# Align `end` with the matching keyword or starting expression except for
|
||||
# assignments, where it should be aligned with the LHS.
|
||||
Lint/EndAlignment:
|
||||
Enabled: true
|
||||
EnforcedStyleAlignWith: variable
|
||||
|
||||
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
||||
Lint/RequireParentheses:
|
||||
Enabled: true
|
||||
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
Enabled: true
|
||||
EnforcedStyle: indented
|
||||
|
||||
Layout/AlignHash:
|
||||
Enabled: true
|
||||
|
||||
Bundler/OrderedGems:
|
||||
Enabled: false
|
||||
@@ -0,0 +1,5 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development do
|
||||
gem 'translations-manager', git: 'https://github.com/discourse/translations-manager.git'
|
||||
end
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
This is the official Discourse advertising plugin. It allows advertisements to be served by supported advertising platforms for users with a Discourse forum.
|
||||
|
||||
**Authors**: [Sarah Ni](https://github.com/cyberkoi) & [Vi Nguyen](https://github.com/ladydanger)
|
||||
**Version**: 1.0.1
|
||||
**Contributors**: See credits section below
|
||||
**License**: MIT License
|
||||
**Supported Discourse Version**: 1.4
|
||||
**Supported Ad Platforms**:
|
||||
**Authors**: [Sarah Ni](https://github.com/cyberkoi) & [Vi Nguyen](https://github.com/ladydanger)
|
||||
**Version**: 1.0.1
|
||||
**Contributors**: See credits section below
|
||||
**License**: MIT License
|
||||
**Supported Discourse Version**: 1.4
|
||||
**Supported Ad Platforms**:
|
||||
* [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
|
||||
@@ -17,8 +17,8 @@ This is the official Discourse advertising plugin. It allows advertisements to
|
||||
|
||||
This quick start shows you how to install this plugin and use it. Recommended if you have:
|
||||
|
||||
* A live discourse forum
|
||||
* You have deployed your live forum using Docker. If you're using Digital Ocean, it's likely that your forum is deployed on Docker.
|
||||
* A live discourse forum
|
||||
* You have deployed your live forum using Docker. If you're using Digital Ocean, it's likely that your forum is deployed on Docker.
|
||||
|
||||
For non-docker or local development installation (those with programming experience), see **Other Installation**.
|
||||
|
||||
@@ -103,10 +103,10 @@ The following are available locations along with a description and an image show
|
||||
|
||||
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```.
|
||||
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```.
|
||||
|
||||
|
||||

|
||||
@@ -117,7 +117,7 @@ This plugin supports the following ad sizes for the following locations.
|
||||
|
||||
All locations except post bottom | Post bottom location | Mobile
|
||||
--- | --- | ---
|
||||
728 x 90 | 728 x 90 | 320 x 50
|
||||
728 x 90 | 728 x 90 | 320 x 50
|
||||
336 x 280 | 336 x 280 |
|
||||
300 x 250 | 300 x 250 |
|
||||
970 x 90 | 970 x 90 |
|
||||
@@ -126,7 +126,7 @@ All locations except post bottom | Post bottom location | Mobile
|
||||
125 x 125 | |
|
||||
180 x 150 | |
|
||||
200 x 200 | |
|
||||
250 x 250 | |
|
||||
250 x 250 | |
|
||||
|
||||
|
||||
### Trust Levels
|
||||
@@ -184,7 +184,7 @@ For example: ln -s ~/discourse-plugin-test .
|
||||
|
||||
## Questions or Want to Contribute?
|
||||
|
||||
Open an Issue on this repository to start a chat.
|
||||
Open an Issue on this repository to start a chat.
|
||||
|
||||
|
||||
## Credits
|
||||
@@ -194,12 +194,4 @@ Open an Issue on this repository to start a chat.
|
||||
**Our Coaches**: Very special thank you to our coaches and honorary coach - [@georg](https://github.com/georg), [@betaass](https://github.com/betaass), [@adelsmee](https://github.com/adelsmee), [@davich](https://github.com/davich), [@link664](https://github.com/link664), [@tomjadams](https://github.com/tomjadams), [@compactcode](https://github.com/compactcode), [@joffotron](https://github.com/joffotron), [@jocranford](https://github.com/jocranford), [@saramic](https://github.com/saramic), [@madpilot](https://github.com/madpilot), [@catkins](https://github.com/catkins)
|
||||
|
||||
**Rails Girls**: Thanks [@sareg0](https://github.com/sareg0) and the Rails Girls Team for the opportunity to participate in Rails Girls Summer of Code 2015.
|
||||
<p>To create this plugin we referenced the <a href="https://github.com/discourse/discourse-google-dfp">original dfp plugin</a> (created by <a href="https://github.com/search?q=neil+lalonde+lalonde&ref=opensearch&type=Users">nlalonde</a>) and the <a href="https://meta.discourse.org/t/google-adsense-plugin/11763/133">adsense plugin</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>To create this plugin we referenced the <a href="https://github.com/discourse/discourse-google-dfp">original dfp plugin</a> (created by <a href="https://github.com/search?q=neil+lalonde&ref=opensearch&type=Users">nlalonde</a>) and the <a href="https://meta.discourse.org/t/google-adsense-plugin/11763/133">adsense plugin</a>.</p>
|
||||
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# Usage:
|
||||
# bundle install
|
||||
# bundle exec bin/pull_translations.rb
|
||||
#
|
||||
# To choose which languages to update, list them as arguments:
|
||||
# bundle exec bin/pull_translations.rb he uk
|
||||
|
||||
require 'translations_manager'
|
||||
|
||||
YML_DIRS = ['config/locales'].map { |d| File.expand_path(d) }
|
||||
YML_FILE_PREFIXES = ['server', 'client']
|
||||
|
||||
TranslationsManager::TransifexUpdater.new(YML_DIRS, YML_FILE_PREFIXES, *ARGV).perform
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
ar:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
bs_BA: {}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
cs:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
da: {}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
de:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
el:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
eo: {}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
es:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
et:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
fa_IR:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
fi:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
fr:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
gl: {}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
he:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
id: {}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
it:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
ja: {}
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
# 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/
|
||||
|
||||
ko:
|
||||
admin_js:
|
||||
admin:
|
||||
site_settings:
|
||||
categories:
|
||||
dfp_plugin: 'DFP'
|
||||
adsense_plugin: '에드센스'
|
||||
amazon_plugin: '아마존'
|
||||
adsense_plugin: 'Adsense'
|
||||
amazon_plugin: 'Amazon'
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
lv: {}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
nb_NO:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
nl:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
pl_PL:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
pt_BR:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1 +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/
|
||||
|
||||
ro: {}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
ru:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
# 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/
|
||||
|
||||
sk:
|
||||
admin_js:
|
||||
admin:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user