Commit Graph

33231 Commits

Author SHA1 Message Date
Osama Sayegh
c86d2666c4
Pull translations from Transifex (#7578) 2019-05-21 07:18:15 +03:00
Osama Sayegh
0b5924d61e
Refactor keyboard shortcuts modal to fix RTL locales (#7545)
* Refactor keyboard shortcuts modal to fix RTL locales

* Feedback

* Remove lowercase modifier keys
2019-05-21 06:39:32 +03:00
Sam Saffron
307c526840 DEV: correct test that assumed group 123 did not exist
This is an incorrect assumption leading to a flaky test, cause for all we
know, since sequences do not reset every test, group 123 could exist.
2019-05-21 12:57:14 +10:00
Sam Saffron
f4d4f7871e FEATURE: make posts:missing_uploads multisite friendly
Previously this rake job would only run on a single site which is a bit
misleading

This also adds `VERBOSE=1 rake posts:missing_uploads` that will provide a
full report of missing uploads
2019-05-21 12:45:51 +10:00
Sam Saffron
0f76e3090c FIX: use tar -xzvf to extract maxmind vs Ruby wrappers
The tar/gz extractor in Ruby is somewhat buggy, instead rely on battle
tested `tar` and `gzip` Linux commands
2019-05-21 10:48:18 +10:00
Gerhard Schlager
edc6ac0c66 Update translations 2019-05-21 00:04:37 +02:00
Gerhard Schlager
0afcad148a DEV: Always use %{count} in pluralized strings 2019-05-20 23:26:22 +02:00
Gerhard Schlager
ca2ba22a48 DEV: Prettify *.en_US.yml files 2019-05-20 23:21:43 +02:00
Vinoth Kannan
2941c77abc FIX: skip upload recovery if file not found in s3 2019-05-21 00:06:36 +05:30
Jeff Atwood
555305325a copyedit on likes
since these never appear side by side on the same user page tab, I feel their meaning is clear on each individual tab without being quite so verbose
2019-05-20 09:56:06 -07:00
David Taylor
0fbff66d97 DEV: Correct rake task syntax error 2019-05-20 17:43:30 +01:00
David Taylor
31902159af DEV: Allow skipping failed migrations when running S3 migration
Use the SKIP_FAILED environment variable to skip failed sites. Use with caution - make sure you go back and re-run the failed migrations afterwards.
2019-05-20 17:25:56 +01:00
David Taylor
a15cca9a0f DEV: Improve error message for posts:missing_uploads during S3 migration 2019-05-20 16:09:22 +01:00
Joffrey JAFFEUX
3e4e3fc7d7
DEV: adds memory/event listeners reporting (#7575) 2019-05-20 16:35:23 +02:00
Vinoth Kannan
2bfc0cf145 FIX: skip old scheme upload URLs while validating s3 uploads remap 2019-05-20 19:13:41 +05:30
Vinoth Kannan
9f43852609 FIX: remove the unwanted code. 2019-05-20 19:10:21 +05:30
David Taylor
41bc90dd3e DEV: Add progress indicator for post rebake during s3 migration
Now that we run sidekiq jobs synchronously, this is important
2019-05-20 14:19:58 +01:00
David Taylor
77a06209cb DEV: Skip S3 migration if all uploads are already migrated
This makes the task resumable in a multisite context
2019-05-20 14:17:37 +01:00
Joffrey JAFFEUX
bc8c77723e
FIX: puts focus-event at application level (#7568)
Also attempts to use simpler and newer APIs
2019-05-20 13:48:03 +02:00
Gerhard Schlager
b788948985 FEATURE: English locale with international date formats
Makes en_US the new default locale
2019-05-20 13:47:20 +02:00
Gerhard Schlager
a58aa9b4bf Update translations 2019-05-20 13:42:05 +02:00
Joffrey JAFFEUX
9bbf421125
FIX: better node check for clickoutside in widgets (#7573) 2019-05-20 12:45:33 +02:00
Vinoth Kannan
bc0c4b7253 FIX: should not migrate the system uploads to s3 2019-05-20 14:27:34 +05:30
Vinoth Kannan
be3fb85a04 DEV: add post migration checks and raise error if failed. 2019-05-20 14:18:28 +05:30
Joffrey JAFFEUX
0ddfeb9c64
FIX: ensures mousetrap is reset with the application (#7569) 2019-05-20 10:45:31 +02:00
Sam Saffron
3c1fa3910f DEV: track the correct channel in specs
These tests are erratically failing due to distributed cache messages that
can land between tests

Ensure we are only looking for the correct messages
2019-05-20 18:27:09 +10:00
Osama Sayegh
14bae6d52d Make email_excerpt method take an optional post param (#7570)
The spoiler alert plugin replaces spoiler text found in email excerpts with posts URL, which means it needs to have a reference to the post it's processing.

This change makes `email_excerpt` accepts an optional post param, which calls `PrettyText.format_for_email` which then triggers the `reduce_cooked` event that the plugin subscribes to.
2019-05-20 10:04:23 +02:00
Sam Saffron
50e6ee55a9 DEV: add "WAIT_FOR_URL" env to smoke test
This allows you to wait up to N seconds for the smoke test url to come up
in some cases you want to kick off the smoke test prior to having the smoke
test env ready to accept connections
2019-05-20 17:23:09 +10:00
Arpit Jalan
ce89f19250 Bump onebox version.
- use Vimeo engine for private links only
- if og:video_url is missing, make one using Vimeo ID
2019-05-20 12:24:43 +05:30
Sam Saffron
08371db0cc FIX: ensure we don't queue any jobs during s3 migration
Previously we could flood sidekiq with jobs which is not ideal.

This ensures we are 100% done when the job is done.
2019-05-20 16:28:50 +10:00
Sam Saffron
a4627c3d82 DEV: revert bundler to 1.7.3
At the moment bundler 2.0 is not compatible with:

https://github.com/discourse/discourse-backup-uploads-to-s3

We plan to get this fixed but in the mean time do not upgrade.

followup to 2a7065c5
2019-05-20 11:23:28 +10:00
Vinoth Kannan
2a7065c505 FIX: skip uploads without etag in s3 inventory check. 2019-05-20 00:09:52 +05:30
Jeff Atwood
f2326ce83f very minor copyedits 2019-05-17 16:59:29 -07:00
Kris
7eea2e35e4 Upload image preview needs width on desktop 2019-05-17 11:25:35 -04:00
Régis Hanol
7696b92c8c FIX: handle clicks counters in full quotes 2019-05-17 14:17:29 +02:00
Régis Hanol
081eb76308 DEV: update rubocop - take 2 2019-05-17 14:13:25 +02:00
Régis Hanol
88102ce13d DEV: update rubocop 2019-05-17 14:08:58 +02:00
David Taylor
ef660d5a3e FIX: Return consistent character encodings when downloading S3 uploads
Net::HTTP always returns ASCII-8BIT encoding. File.read auto-detects the encoding. This leads to an encoding inconsistency between a fresh download, and a cached download. This commit ensures all downloaded files are treated equally, by always returning the cached version from the filesystem, even during initial download.

One symptom of this problem is during theme exports: https://meta.discourse.org/t/116907

Related ruby ticket: https://bugs.ruby-lang.org/issues/2567
2019-05-17 11:27:00 +01:00
Joffrey JAFFEUX
b05d7042ae
FIX: prevents events on toolbar when in form (#7567)
If a button is not of type button, pressing enter inside an `<input>` inside a `<form>` without the action attribute will trigger the first available `<button>` as most browsers default the type of an unspecified button to submit.

This commit also prevents d-editor-modal to be filled when it's hidden.
2019-05-17 11:14:09 +02:00
David Taylor
105359e54a FIX: Only delete theme folder if it has been created
If an exception is raised before the folder is created, then this `ensure` block is still run
2019-05-17 09:45:11 +01:00
Guo Xiang Tan
148bfc9be5 DEV: Simplify client and server side code to support removing tags.
Follow up to 834c86678f.
2019-05-17 16:39:20 +08:00
Sam Saffron
678a9a61c4 DEV: lint importer
commit #f490ed3b introduced a few linting issues, resolved now
2019-05-17 16:37:08 +10:00
Edmond Lepedus
f490ed3bbc FEATURE: Add attachment support to xenforo importer (#7548)
* FEATURE: Add attachment support to XenForo importer

If `ATTACHMENT_DIR` is provided, importer will scan each imported post
for `[GALLERY]` and `[ATTACH]` tags, attempt to import the referenced files
as Discourse uploads and replace the tags with Discourse markup.

References to files which cannot be imported are stripped.

NOTE: This only imports attachments which are referenced in imported
posts. Any XenForo media or files which are not referenced in any post
using `[ATTACH]` or `[GALLERY]` tags will not be imported. The goal is to
ensure that we don't have posts with missing images and unsightly
markup, NOT to ensure that all attachments are migrated.

* FEATURE: Add attachment support to XenForo importer

If `ATTACHMENT_DIR` is provided, importer will scan each imported post
for `[GALLERY]` and `[ATTACH]` tags, attempt to import the referenced files
as Discourse uploads and replace the tags with Discourse markup.

References to files which cannot be imported are stripped.

NOTE: This only imports attachments which are referenced in imported
posts. Any XenForo media or files which are not referenced in any post
using `[ATTACH]` or `[GALLERY]` tags will not be imported. The goal is to
ensure that we don't have posts with missing images and unsightly
markup, NOT to ensure that all attachments are migrated.

* FEATURE: Add attachment support to XenForo importer

If `ATTACHMENT_DIR` is provided, importer will scan each imported post
for `[GALLERY]` and `[ATTACH]` tags, attempt to import the referenced files
as Discourse uploads and replace the tags with Discourse markup.

References to files which cannot be imported are stripped.

NOTE: This only imports attachments which are referenced in imported
posts. Any XenForo media or files which are not referenced in any post
using `[ATTACH]` or `[GALLERY]` tags will not be imported. The goal is to
ensure that we don't have posts with missing images and unsightly
markup, NOT to ensure that all attachments are migrated.
2019-05-17 16:18:28 +10:00
Sam Saffron
aeb7143aff DEV: correct flaky poll specs
They were relying on a pristine message bus, however current implementation
still uses redis, stuff can get held up and we can end up publishing
distributed cache messages in the middle invalidating the tests
2019-05-17 16:16:02 +10:00
Joffrey JAFFEUX
b983b6cb87
SECURITY: lodash 4.17.11 (#7565)
This version also now includes _.find
2019-05-17 07:57:05 +02:00
David Taylor
5666316285 FEATURE: Display 'last updated' on dashboard, improve release notes link (#7560) 2019-05-17 15:42:45 +10:00
Guo Xiang Tan
834c86678f FIX: Missing post revision when editing the first post. 2019-05-17 12:54:27 +08:00
Guo Xiang Tan
e2444e0d31 DEV: Fix another frozen string error. 2019-05-17 10:07:37 +08:00
Sam Saffron
96fbc14f80 DEV: quick setup is no longer maintained
Removing this for now as it is not maintained
2019-05-17 11:50:05 +10:00
Sam Saffron
b3d42b3f18 DEV: remove unmaintained script
osxdev script has not been maintained for a while, keeping it around is
only causing confusion
2019-05-17 11:47:48 +10:00