Commit graph

434 commits

Author SHA1 Message Date
Eugen Rochko 41c697fd81 Merge branch 'master' of git://github.com/matteoaquila/mastodon into matteoaquila-master 2017-04-13 22:25:07 +02:00
Matteo Aquila efcf9448da Update settings_helper.rb 2017-04-13 16:16:39 +02:00
Koala Yeung 1206627c59 Add Dutch translation (nl) (#1682)
* Dutch language files for Ruby code

 * Created RoR translation ymls:
   * config/locales/devise.nl.yml
   * config/locales/doorkeeper.nl.yml
   * config/locales/nl.yml
   * config/locales/simple_form.nl.yml

 * Modified RoR config and helper
   * app/helpers/settings_helper.rb
   * config/application.rb

* Dutch language javascript locale

 * Created javascript locale files:
   * app/assets/javascripts/components/locales/index.jsx
   * app/assets/javascripts/components/locales/nl.jsx

 * Reference the newly created locale files:
   * app/assets/javascripts/components/containers/mastodon.jsx

* Fix syntax error in locale file (nl)

* Fix missing translate in js locale (nl)

* Convert all ruby Dutch locale (nl) file to utf8

Fix yml conversion issues.

* Fix duplicated key in devise.nl.yml

* Fix indentation error in doorkeeper.nl.yml
2017-04-13 16:02:23 +02:00
Matteo Aquila 905a4faa1c Update settings_helper.rb 2017-04-13 15:32:31 +02:00
Matteo Aquila 5355b7d930 Update settings_helper.rb 2017-04-13 15:31:38 +02:00
Svetlozar Todorov aa7bf1515c Fix #624 - Add localization for Bulgarian (#645)
* Add translation files and declarations for Bulgarian

* Add a bunch of translations to bg.jsx

* Add rest of translations to bg.jsx

* Add devise translations

* Fix devise translations
2017-04-13 13:16:28 +02:00
Ben Roberts 0254ee9795 significant improvement in microformats markup (#1063)
* significant improvement in microformats markup

This is a huge improvement and I believe will close #965.

Had these microformats reviewed by others in the community to help
ensure they are at least correct, if not complete.

I did not want to change the structure of the page, and so there it does
not fully mark up the entire ancestry chain, or reply chain, only the
direct decendants and direct ancestors are correctly associated, but
this is likely fine as the most important bit is to have access to the
urls for those toots which are now correctly fetchable.

* improve code climate

* trying to pass code climate tests

* code climate

* fix p-summary for content warning posts

* fix error introduced when merging via github
2017-04-12 20:04:33 +02:00
Matt Jankowski c44a700252 Quick best practice cleanup of views/helpers (#1546)
* Remove trailing whitespace

* Use query methods instead of explicit .blank? checks
2017-04-12 18:24:18 +02:00
Thor Harald Johansen 1f5ff46fd9 Working translation for Norwegian. (#1611) 2017-04-12 17:07:51 +02:00
Matt Jankowski 13528f50c3 Params compact deprecation warning (#1580)
* Move filter_link_to class formation to separate method in admin/accounts helper

* Remove deprecated #compact method usage on strong parameters
2017-04-12 16:12:56 +02:00
Matt Jankowski dd1ae3b109 Simplify the way the embed view is created (#1590)
* Add coverage for embedded status view

* Refactor embed view to eliminate @external_links variable
2017-04-12 16:12:42 +02:00
Koala Yeung 24eb45425e Add Traditional Chinese, Hong Kong translation (zh-HK) (#1544)
* Added Chinese Traditional Hong Kong (zh-HK) for Ruby

* Added translations for Ruby.

* Added Chinese Traditional Hong Kong (zh-HK) for JS

* Added translations for javascript code.

* Rearrange language references in mastodon.jsx

* Break `addLocaleData` into multiple lines. Make future commit more readable.
* Roughly re-sort the languages in alphabetical orders
  (only manually put English on top because it is default).

* Sort application.rb locale with alphabetical order

With exception that English (default language) goes first.
Improve code readability.

* Resort language selection box alphabetically

Sort HUMAN_LOCALES in the alphabetical order of display name
(except English, the default language, come first).

Improve usability.
2017-04-12 08:50:50 +02:00
pinfort 6f5268b02d Add Japanese translation (#1552)
* add device.ja.yml

* update device.ja.yml

* add file simple_form.ja.yml

* 👍Added doorkeeper.ja.yml

* add ja.yml

* Update doorkeeper.ja.yml

fixed url to uri

* update ja.yml

* fix some translations

* fix japanese grammar of a translate

* fix some translates

* fix ja.yml

* add ja.jsx

* add Japanese user mail views

* Added japanese translate locales

* Added :ja to available_locales

こっちも

* Added "日本語" to HUMAN_LOCALES

* Imported/Added ja to addLocaleData

* update ja.jsx
2017-04-11 21:52:09 +02:00
Matt Jankowski e60286a344 Remove unused methods from StreamEntriesHelper (#1365)
Removes:

- avatar_for_status_url
- relative_time
- reblogged_by_me_class
- favourited_by_me_class
2017-04-11 19:32:02 +02:00
Matt Jankowski 53850bce93 Remove unused AtomBuilderHelper (#1364)
This was used in the views/atom/user_stream.xml.ruby file, which no longer is
used.
2017-04-11 19:31:22 +02:00
Matt Jankowski 4ada50985a Pagination improvements (#1445)
* Replace will_paginate with kaminari

* Use #page instead of #paginate in controllers

* Replace will_paginate.page_gap with pagination.truncate in i18n

* Customize kaminari views to match prior styles

* Set kaminari options to match prior behavior

* Replace will_paginate with paginate in views
2017-04-11 01:11:41 +02:00
Matt Jankowski 0687ab8ae3 Clean up generation of account webfinger string (#1477)
* Consolidate webfinger string creation under Account#to_webfinger_s

* Introduce Account#local_username_and_domain for consolidation
2017-04-10 22:58:06 +02:00
Ratmir Karabut 9043b32183 Add Russian translation (ru) (#1023)
* Add Russian translation (ru)

* Fix a missing comma

* Fix the wording for better consistency
2017-04-10 12:52:06 +02:00
Matt Jankowski ea6c930c04 Helper cleanup (#1348)
* Remove unused helper files

* Add coverage for application helper

* Add coverage for StreamEntriesHelper #display_name
2017-04-09 17:11:37 +02:00
Matt Jankowski ca44c13455 Use Setting.site_title value for og:site_name occurrences (#1194)
* Add helper method to return Setting.site_title

* Use site_title helper in application layout

* Use site_title value for og:site_name
2017-04-08 12:15:40 +02:00
Shel R fef478781d Merge branch 'master' into master 2017-04-07 22:21:21 -04:00
Joël Quenneville d4c94fa004 DRY up reblog vs original status check
Checking reblog vs original status was happening in multiple places
across the app. For views, this logic was encapsulated in a helper
method named `proper_status` but in the other layers of the app, the
logic was duplicated.

Because the logic is used at all layers of the app, we extracted it into
a `Status#proper` method on the model and changed all uses of the logic
to use this method. There is now a single source of truth for this
condition.

We added test coverage to untested methods that got refactored.
2017-04-07 14:18:30 -04:00
André Lewin bf7cefa516 Merge branch 'master' into master 2017-04-05 20:28:58 +02:00
axolotl 0700521ef3 added Esperanto (eo) 2017-04-03 20:22:50 +02:00
JantsoP ae95f35fe6 add finnish translation
add finnish translation
2017-04-03 13:34:26 +02:00
Eugen Rochko efbbd42216 Fix style issue 2017-03-26 13:13:41 +02:00
leopku d5d5afff9c 🌐 add simplified chinese language 2017-03-26 14:13:18 +08:00
Eugen Rochko 2816b1bf8e Federate header images, fix open-uri http->https redirection error 2017-03-18 22:51:20 +01:00
Eugen Rochko d180aaa2a7 Fix #186 - Add RTL support to the compose form textarea and statuses output 2017-02-28 01:52:31 +01:00
Eugen Rochko f2931af61e Quick fix for avatars with the same URL not being perceived as updated and in need of re-download 2017-02-17 01:50:01 +01:00
Eugen Rochko f722aa8c75 Fix Salmon issue 2017-02-16 01:59:34 +01:00
Eugen Rochko 2d8a4c4390 Add "next" link to Atom feeds 2017-02-13 15:38:45 +01:00
Eugen Rochko 720ff55262 Adding more unit tests. Fixing Salmon slaps XML 2017-02-12 17:30:15 +01:00
Eugen Rochko 50660d54e8 Fix semantics of follow requests another slaps 2017-02-11 17:13:11 +01:00
Eugen Rochko 149887a0ff Make follow requests federate 2017-02-11 02:58:00 +01:00
Eugen 942a2e7d68 Fix reblogs not having content warnings forwarded 2017-02-08 18:05:46 +01:00
Eugen Rochko 3beb24ad55 Use <summary> to encode content warnings instead 2017-01-25 16:53:30 +01:00
Eugen Rochko 999cde94a6 Instead of using spoiler boolean and spoiler_text, simply check for non-blank spoiler_text
Federate spoiler_text using warning attribute on <content /> instead of a <category term="spoiler" />
Clean up schema file from accidental development migrations
2017-01-25 01:29:16 +01:00
blackle bf0f6eb62d Implement a click-to-view spoiler system 2017-01-23 21:07:40 -05:00
Eugen Rochko b11fdc3ae3 Migrate from ledermann/rails-settings to rails-settings-cached which allows global settings
with YAML-defined defaults. Add admin page for editing global settings. Add "site_description"
setting that would show as a paragraph on the frontpage
2017-01-12 20:46:24 +01:00
Eugen Rochko 23ebf60b95 Improve initialState loading 2017-01-09 12:37:53 +01:00
Eugen Rochko 1bfbce7b45 Clean up h-card mess of divs 2017-01-06 20:24:51 +01:00
Eugen Rochko 49834a6e7f Add API for retrieving blocked accounts 2016-12-29 20:12:32 +01:00
Eugen Rochko d7dc84439c Add ability to use remote follow function on other sites 2016-12-29 16:54:54 +01:00
Eugen Rochko 3689c119f0 Replacing follow requests in the settings area with in-UI column 2016-12-26 21:33:51 +01:00
Eugen Rochko 004382e4d0 Adding follow requests API 2016-12-26 19:30:45 +01:00
Eugen Rochko b302b9202b Add page for authorizing/rejecting follow requests 2016-12-23 00:04:52 +01:00
Eugen Rochko c4bc5c8930 Federated profile bio now formatted 2016-12-21 19:10:19 +01:00
Eugen Rochko 5ae1b39ec9 Adjusting public display of statuses to look similar to logged-in UI,
fix #361 with rich OEmbed display via iframe, fix #237 by hiding sensitive
content behind a spoiler on public pages
2016-12-18 19:47:11 +01:00
Eugen Rochko 76ec907993 Improved admin UI 2016-12-13 13:42:10 +01:00
Eugen Rochko e90fcb46e3 Sensitive content federates using the "nsfw" hashtag 2016-12-11 22:49:25 +01:00
Stanislav Makar d2ab41aea4 Declare Ukrainian
Closes: #345
2016-12-08 18:57:58 +02:00
Eugen Rochko f763e844e8 Do not use expiring links after all 2016-12-04 13:02:43 +01:00
Eugen Rochko 24e692b0cf Set a specific S3 expiration time so that files can be cached 2016-12-04 12:58:35 +01:00
Eugen Rochko 80c44ed9c1 Do not autoplay videos, display play button instead. Use expiring links when using S3. Do not keep originals
for avatars/headers, resize avatars down to 120x120 instead of 300x300. Set cache headers on S3 stuff, also
make it private (aka only accessible via expiring links to prevent hotlinking)
2016-12-04 12:28:10 +01:00
Eugen Rochko 1d0321fc45 Fix pt translations, improve pre-cache queries, removing will_paginate
from accounts/tags because it's a terribly inefficient way to paginate
large sets of data
2016-12-01 16:26:25 +01:00
Eugen Rochko 6ff93845d5 Add basic OEmbed provider API, fix #247 2016-11-30 23:01:03 +01:00
Eugen Rochko 14bd46946d Per-status control for unlisted mode, also federation for unlisted mode
Fix #233, fix #268
2016-11-30 21:34:59 +01:00
Eugen Rochko 356d3874eb Normalize localizations, add stub for admin/accounts 2016-11-30 15:32:26 +01:00
Eugen Rochko ff21ff1489 Make User#current_sign_in_at actually track when user was last active,
by updating it at least every 24h if the user visits the site
2016-11-30 15:17:03 +01:00
Eugen Rochko 5973ca3d11 Upgrade Paperclip to 5, AWS-SDK to 2, do not generate medium/small versions of avatars 2016-11-29 14:20:15 +01:00
Eugen Rochko 27fc49d745 Add simple admin overview of PuSH subscriptions 2016-11-28 18:45:13 +01:00
Eugen Rochko 66ab0d0d56 Enabling portuguese and hungarian translations, which are awfully incomplete 2016-11-28 13:55:03 +01:00
nicolas 115ce90578 Adding French locale to settings_helper.rb 2016-11-22 10:20:28 +01:00
Eugen Rochko 39533190c2 Display human names of locales in dropdown 2016-11-19 00:19:57 +01:00
Eugen Rochko 01e43c3e57 Adding react-intl i18n to the frontend. No translations yet 2016-11-16 17:20:52 +01:00
Eugen Rochko 3ce6ac0ce2 Adding some localizations 2016-11-15 23:02:57 +01:00
Eugen Rochko fdc17bea58 Fix rubocop issues, introduce usage of frozen literal to improve performance 2016-11-15 16:56:29 +01:00
Eugen Rochko d14967e1c8 Fix URL configuration when S3 is enabled 2016-11-06 20:43:16 +01:00
Eugen Rochko 48b9619439 Adding hashtags 2016-11-05 17:13:14 +01:00
Eugen Rochko 6c05e3063a Include <id> (identical value to <uri>) on person-type objects in Atom
This might help with GS compatibility
2016-10-17 15:36:37 +02:00
Eugen Rochko f0f791bb76 Don't preload timelines as props, load them when timeline component is mounted
This prevents the bug where if you go "back" to the UI after navigating to
another page it loads with the old set of statuses
2016-10-16 19:23:17 +02:00
Eugen Rochko 7a6d95f70c E-mail preferences page 2016-10-14 02:28:49 +02:00
Eugen Rochko dd5e724c3f Fix reblog mentions Atom 2016-10-10 15:08:24 +02:00
Eugen Rochko f249a8c187 Include mentions and media attachments of reblogged posts in Atom 2016-10-10 14:22:09 +02:00
Eugen Rochko 1f650d327d Adding public timeline 2016-10-07 16:00:11 +02:00
Eugen Rochko b3c7c8700d Fix most pages on small screens 2016-10-03 16:17:28 +02:00
Eugen Rochko 927333f4f8 Improve code style 2016-09-29 21:28:21 +02:00
Eugen Rochko e63aebff7a Adding landing page 2016-09-27 23:12:33 +02:00
Eugen Rochko 4f9b7432dd Fix #52 - Add API versioning (v1) 2016-09-27 16:59:08 +02:00
Eugen Rochko 7e14eefc81 Replace logo, fix #57 - delete/unreblog/unfavourite API, fix #45 - app
registration API
2016-09-26 23:56:53 +02:00
Eugen Rochko 2e7aac793a Adding sense of self to the UI, cleaning up routing, adding third (detail) column 2016-09-13 02:24:40 +02:00
Eugen Rochko 3cc47beb6e Refactored generation of unique tags, URIs and object URLs into own classes,
as well as formatting of content
2016-09-09 20:04:34 +02:00
Eugen Rochko 735b4cc62e Probably fixes #31 2016-09-09 15:29:41 +02:00
Eugen Rochko 85d89b472d Optimized n+1 queries in accounts Atom and HTML views
Added stack trace for SQL queries in development
Removed badly thought out accounts/lookup API
2016-09-08 20:36:01 +02:00
Eugen Rochko 87576e1ab1 Fixing atom feeds for accounts, adding tests that would catch such bugs in future 2016-09-08 00:33:07 +02:00
Eugen Rochko 1d9c886518 Adding enclosures to Atom and statuses JSON 2016-09-05 18:57:59 +02:00
Eugen Rochko eec0dc46a6 PostStatusService can attach media to status, ProcessFeedService likewise 2016-09-05 18:39:53 +02:00
Eugen Rochko ae1fac0062 Add API to upload media attachments 2016-09-05 17:46:36 +02:00
Eugen Rochko 35dfc0fbcb Fixed more case-sensitivity issues 2016-09-04 21:15:52 +02:00
Eugen Rochko 1022d682dc Normalized data in Redux, fix for asset URLs when rendered outside request 2016-09-04 14:04:26 +02:00
Eugen Rochko 039e6f951c Fix issue with unresolvable usernames 2016-03-27 23:38:46 +02:00
Eugen Rochko 882c94a6bf Cleaning up status partial 2016-03-26 14:42:05 +01:00
Eugen Rochko f2da848a3e Add alternate link to entries Atom 2016-03-26 01:10:18 +01:00
Eugen Rochko a08e724476 Fix subscriptions:clear task, refactor feeds, refactor streamable activites
and atom feed generation to some extent, as well as the way mentions are
stored
2016-03-25 02:13:30 +01:00
Eugen Rochko c8999a116e Sanitize remote html in atom feeds, API (not just UI), use cached mention
relations on Status#mentions
2016-03-24 12:43:55 +01:00
Eugen Rochko 7cd3de3494 Do display top-level content on remote shared notices 2016-03-24 12:34:32 +01:00
Eugen Rochko 921f40c187 Omit empty tags in Atom feed 2016-03-22 20:20:37 +01:00
Eugen Rochko 12d1d9dd80 Reblogs in Atom feeds now have published, updated, and activity:verb. Still related to #20 2016-03-22 09:49:54 +01:00
Eugen Rochko 78137929e6 Fix #20, reblogs in Atom should be formatted correctly now 2016-03-22 09:03:03 +01:00
Eugen Rochko f14f462eaf Adding Turbolinks, adding status posting form on homepage 2016-03-21 18:26:47 +01:00
Eugen Rochko 9d55529318 Fix text color in dashboard inputs, sanitize remote status content in UI,
simplify FanOutOnWriteService, add /api/accounts/lookup method
2016-03-21 17:02:16 +01:00
Eugen Rochko 7e00a21ea6 Small optimizations in Atom feeds 2016-03-21 10:31:20 +01:00
Eugen Rochko 19a259915e Security update 2016-03-21 10:08:19 +01:00
Eugen Rochko 253ab26520 Adding more tests for helpers 2016-03-20 13:50:22 +01:00
Eugen Rochko 71ae4dd3d2 Adding public following and followers pages, fix #3 2016-03-19 14:02:30 +01:00
Eugen Rochko 47d1cb4e21 TIL a return from a block seems to return from the whole method rather than
the block, even though the last line of a block is an implicit return. I am
confused to say the least
2016-03-19 00:23:46 +01:00
Eugen Rochko 071f64d317 Fix #13, Atom feeds now contain formatted post content 2016-03-19 00:16:04 +01:00
Eugen Rochko a9db42a956 Validations for local profiles 2016-03-16 11:18:09 +01:00
Eugen Rochko 5c99e304e5 Deleting statuses, deletion propagation 2016-03-16 10:58:58 +01:00
Eugen Rochko 6fec8afc3f Bind oauth applications to users 2016-03-14 17:49:13 +01:00
Eugen Rochko 3441361568 Adding simple_form, adding profile settings, header image 2016-03-12 20:47:22 +01:00
Eugen Rochko 1aa477ac2f Customized more doorkeeper views, only logged in users can create oauth apps 2016-03-12 19:46:06 +01:00
Eugen Rochko 447cfef62d Improving feed queries, switching API to doorkeeper authentication 2016-03-11 16:47:36 +01:00
Eugen Rochko ab6696e855 Adding doorkeeper, adding a REST API
POST /api/statuses                  Params: status (text contents), in_reply_to_id (optional)
GET  /api/statuses/:id
POST /api/statuses/:id/reblog

GET  /api/accounts/:id
GET  /api/accounts/:id/following
GET  /api/accounts/:id/followers
POST /api/accounts/:id/follow
POST /api/accounts/:id/unfollow

POST /api/follows                  Params: uri (e.g. user@domain)

OAuth authentication is currently disabled, but the API can be used with HTTP Auth.
2016-03-07 12:42:33 +01:00
Eugen Rochko 3824c58853 Adding GNU Public license, adding home timeline, reblog/favourite counters 2016-03-06 17:52:23 +01:00
Eugen Rochko ab80ebdeec Adjusting design of profile and entry pages, linkify mentions in statuses 2016-03-05 23:42:40 +01:00
Eugen Rochko 7e93da3f8d Removing grape and adding devise 2016-03-05 13:12:24 +01:00
Eugen Rochko 23d08c6749 Changing the use of config constants to the Rails configuration object 2016-02-29 20:06:39 +01:00
Eugen Rochko 0e8f59c16f Refactoring Grape API methods into normal controllers & other things 2016-02-29 19:42:08 +01:00
Eugen Rochko 11ff92c9d7 Adding a test for ReblogService, fixing mentions for remote statuses 2016-02-28 21:22:56 +01:00
Eugen Rochko 47d50b0e39 A lot of fixes from a live test 2016-02-28 15:46:29 +01:00
Eugen Rochko ad5ae3f60e Update profile information and download avatar of remote accounts 2016-02-28 14:26:26 +01:00
Eugen Rochko 2825991e09 Improving status display design, including replies and threads 2016-02-28 14:02:53 +01:00
Eugen Rochko 2c70f0ecaa Adding paperclip for avatars, fixing design of the public pages 2016-02-28 00:02:59 +01:00
Eugen Rochko f16b31f077 Adding a bunch of tests 2016-02-26 15:28:08 +01:00
Eugen Rochko 44c5958203 Fixed small bugs and code style offences 2016-02-25 00:22:46 +01:00
Eugen Rochko 8da8387afe Add shared statuses to the database 2016-02-24 17:23:59 +01:00
Eugen Rochko 79baf2fd99 Process favourites, reblogs and replies from Salmon 2016-02-24 00:57:47 +01:00
Eugen Rochko fa33750105 Adding reblogs, favourites, improving atom generation 2016-02-23 19:17:37 +01:00
Eugen Rochko 3b0bc18db9 Improved Atom rendering templates, added README 2016-02-23 13:08:01 +01:00
Eugen Rochko 1dad72bf13 Fixes and general progress 2016-02-22 18:10:30 +01:00
Eugen Rochko 709c6685a9 Made some progress 2016-02-22 16:00:20 +01:00
Eugen Rochko 9c4856bdb1 Initial commit 2016-02-20 22:53:20 +01:00