Commit Graph

207 Commits (6bd4e3bf97cf082337486a883c81d74f01df1d0b)

Author SHA1 Message Date
Lindsey Bieda d440601851 Red favicon for dev (#2470)
* Set a dev specific favicon

* Consistent spacing

* Add trailing slash for consistency

* Update to remove interpolation
2017-04-26 15:45:27 +02:00
Evan Minto 1b5966ad07 Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes. (#2410)
* Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes.

* Fix code style and test failures for OutboxController.

* Attempt to fix CI errors.
2017-04-25 15:06:06 +02:00
Masoud Abkenar 7e06f9b711 Persian translation (#2405)
* Persian translation

* adding :fa to make the site use the rtl stylesheet

based on [this comment](https://github.com/tootsuite/mastodon/pull/2405#issuecomment-296721105)

* fix missing quotes

* add 'fa' locale
2017-04-24 22:39:15 +02:00
Eugen d4a67d0d2a Add an RTL stylesheet for Arabic i18n (#2378) 2017-04-24 18:03:53 +02:00
Matt Jankowski 8c0108a4e8 Ensure i18n matches options (#2358)
* Add failing spec showing that human_locales does not match what i18n knows about

* Add missing `ar` key for arabic to human locales

* Remove duplicate `id` key from available locales

* Sort keys in human locales list

* Add spec for human_locale helper
2017-04-23 19:09:52 +02:00
Joël Quenneville eff1644d22 Test embedded_view related code in a helper (#2282)
The two methods `StreamEntriesHelper#stream_link_target` and
`StreamEntriesHelper#acct` are based on checking whether we are running
in an embedded view.

This adds some test helper code to make the testing easier. We extracted
some "magic strings" to constants to lower the coupling in the specs.
2017-04-23 06:05:52 +02:00
Joël Quenneville e8a3a00068 Add test coverage to CSS class generation (#2285)
The code that generates CSS is based on a lot of boolean conditions.
The possible combinations of these grows exponentially as we add more
conditions.

Since most of the code is conditional on a single boolean, we tested the
following:

1. All `false`
2. All `true`
3. Each individual flag set to `true`

The methods tested are:

* `StreamEntriesHelper#style_classes`
* `StreamEntriesHelper#microformats_classes`
* `StreamEntriesHelper#microformats_h_class`
2017-04-23 06:04:32 +02:00
Evan Minto 227f45402d ActivityPub: Add basic, read-only support for Outboxes, Notes, and Create/Announce Activities (#2197)
* Clean up collapsible components

* Expose user Outboxes and AS2 representations of statuses

* Save work thus far.

* Fix bad merge.

* Save my work

* Clean up pagination.

* First test working.

* Add tests.

* Add Forbidden error template.

* Revert yarn.lock changes.

* Fix code style deviations and use localized instead of hardcoded English text.
2017-04-23 05:21:10 +02:00
Matt Jankowski 64d071d3e4 Clean up flash display in views (#2336)
* Add flashes partial to DRY up admin/auth layouts

* Further consolidate flash messages
2017-04-23 04:22:34 +02:00
Joël Quenneville 3ed49b5854 Add tests for StreamEntriesHelper#rtl? (#2286)
We used some random Arabic characters to test that the various RTL
conditions got triggered.
2017-04-22 00:13:37 +02:00
Koala Yeung 5321bbacb1 Add Indonesian (Bahasa Indonesia / id) translation (#2200)
* add Indonesian (Bahasa Indonesia) translation

add id.jsx
add translations on email views
add devise.id.yml
add doorkeeper.id.yml
add id.yml
add simple_form.id.yml

update id locale on mastodon.jsx, index.jsx, settings_helper.rb, and
application.rb

* add Indonesian (Bahasa Indonesia) translation

add id.jsx
add translations on email views
add devise.id.yml
add doorkeeper.id.yml
add id.yml
add simple_form.id.yml

update id locale on mastodon.jsx, index.jsx, settings_helper.rb, and
application.rb

* fix InvalidLocaleData on a string

* fix InvalidLocaleData on a string

* Fix language keys in Indonesian ruby locale (id)

Use "id" instead of "en" as object keys.

* Removed obsoleted translation (id)
2017-04-21 19:16:26 +02:00
Koala Yeung 3b0cf2d8c3 Add Ido (io) translation (#2202)
* Add Ido (io) translation

* Fix mastodon.jsx for io reference

There is no react-intl support for io. Removed the references.
2017-04-21 19:15:25 +02:00
Ash Furrow fe153f53e2 Enables the Polish translation. (#2235) 2017-04-21 03:29:11 +02:00
Matt Jankowski 4b6be67e85 Admin reports with accounts (#2092)
* Add a ReportFilter class

* Add reports and targeted_reports relationships to Account

* Use ReportFilter from admin/reports controller

* Link to admin/reports filtered views from admin account show view

* Add indexes to reports.account_id and reports.target_account_id
2017-04-18 19:36:18 +02:00
Koala Yeung 370d291081 Add Occitan (oc) translation (#2077)
* Added oc.yml

* Added `config/locales/oc.yml`.
  Translated in General Occitan (Quent-in).

* Added oc.jsx (Occitan translation)

* Written in General Occitan (lengadocian)
* Added `app/assets/javascripts/components/locales/oc.js`

* Added doorkeeper.oc.yml

* Added `config/locales/doorkeeper.oc.yml` (Quent-in)

* Added simple_form.oc.yml

* Added `config/locales/simple_form.oc.yml` (Quent-in).

* Merge en.yml changes into oc.yml

Added new strings for translations

* Fix typo in oc.yml

* Update javascript locale support (oc)

* Update ruby locale list (oc)

* Fix oc.yml

* Remove obsoleted translations
* Moved old translation of `reports` to `admin.reports`
2017-04-18 15:21:16 +02:00
Matt Jankowski d087c95aa7 Instance helper to replace site title helper (#2038)
* Move site title helper to instance helper (name change only)

* Remove newline in <title> tag

* Add site_hostname helper method to wrap up local_domain value

* Use site_hostname helper in places that need local_domain value
2017-04-18 00:16:32 +02:00
Hugo Gameiro 70d72e33cb Add Brazilian Portuguese and fix European Portuguese (#1966)
* update portuguese translation

added the missing fields and improved the translation

* pt translations fix

* improve last translation commit

* fix damn quotes

* add pt_br to index.jsx

* add pt-BR to import index.jsx

* add pt-BR to mastodon.jsx

* add pt-BR to settings_helper.rb

* add pt-BR to application.rb

* order alphabetically pt.jsx

* create pt-BR.jsx

* Create devise.pt-BR.yml

* language improvements to devise.pt.yml

* created doorkeeper.pt-BR.yml

* fixes to doorkeeper.pt.yml

* create pt-BR.yml

* improvements to pt.yml

* Create simple_form.pt-BR.yml

* Improvements to simple_form.pt.yml

* improvements to pt.yml
2017-04-17 10:38:27 +02:00
May Kittens Devour Your Soul 9191c664da Create hr.jsx (#1945)
* Create hr.jsx

Start of Croatian translation

* Update settings_helper.rb

* Update application.rb

* Update application.rb

* Update index.jsx
2017-04-17 10:38:13 +02:00
Yamagishi Kazutoshi 9fa141a329 Add human locales for zh-tw (#1984) 2017-04-17 10:35:06 +02:00
Matt Jankowski d4d5135559 View spec fix (#1888)
* Add option to disable verify partial doubles

* Add show_landing_strip? helper method

* Use show_landing_strip? helper in accounts and stream entries views

* Fix naming in view specs
2017-04-16 03:40:33 +02:00
Naouak 85ff7666f3 Check for a custom css file to help customization of instances (#1368)
* User can create a custom.scss to customize their instance without modifying gitted files.

* Add documentation for customization.

* Forgot the helper file

* Fix Style to pass codeclimate

* Requests from maintainer.
2017-04-15 22:47:48 +02:00
Matt Jankowski 2a7120b5ff Rename admin/accounts_helper to admin/filter_helper (#1816)
- Add some spec coverage for both methods
- Add explicit constant call-outs for where the params are from
2017-04-15 03:09:55 +02:00
Matt Jankowski 22f1d9099a Admin reports controller improvements (#1714)
* Simplify admin/reports controller filtering for index

* Rename parameter to resolved

* Fix issue where reports view could not access filter_link_to

* Add coverage for admin/reports controller

* DRY up resolution of related reports for target account

* Clean up admin/reports routes

* Add Report#statuses method

* DRY up current account action taken params

* Rubocop styles
2017-04-14 11:10:28 +02:00
Eugen Rochko 10b8829c02 Merge branch 'master' of git://github.com/matteoaquila/mastodon into matteoaquila-master 2017-04-13 22:25:07 +02:00
Matteo Aquila f9a42acd0d Update settings_helper.rb 2017-04-13 16:16:39 +02:00
Koala Yeung ff826c68eb 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 e891a97787 Update settings_helper.rb 2017-04-13 15:32:31 +02:00
Matteo Aquila 3ace439512 Update settings_helper.rb 2017-04-13 15:31:38 +02:00
Svetlozar Todorov 651b89199a 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 462e956164 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 d1ebb63c54 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 b2c1df5c20 Working translation for Norwegian. (#1611) 2017-04-12 17:07:51 +02:00
Matt Jankowski f0b4b72c1c 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 ca70fe5ae7 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 a3bfac26fb 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 601d93bfc3 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 a9886524d9 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 9a30c564b6 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 fcec9fcd99 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 874a240a58 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 ac50bab158 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 3b3671c797 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 0d9a420c1a 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 3b9a56d4b3 Merge branch 'master' into master 2017-04-07 22:21:21 -04:00
Joël Quenneville 8a67fb5eca 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 783de713cd Merge branch 'master' into master 2017-04-05 20:28:58 +02:00
axolotl d6d192c914 added Esperanto (eo) 2017-04-03 20:22:50 +02:00
JantsoP bb8d80f1b0 add finnish translation
add finnish translation
2017-04-03 13:34:26 +02:00
Eugen Rochko d50aa74690 Fix style issue 2017-03-26 13:13:41 +02:00
leopku 58c9d97d07 🌐 add simplified chinese language 2017-03-26 14:13:18 +08:00
Eugen Rochko a19062b726 Federate header images, fix open-uri http->https redirection error 2017-03-18 22:51:20 +01:00
Eugen Rochko edf03c8cd9 Fix #186 - Add RTL support to the compose form textarea and statuses output 2017-02-28 01:52:31 +01:00
Eugen Rochko 014cb5e998 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 cdb9df6e52 Fix Salmon issue 2017-02-16 01:59:34 +01:00
Eugen Rochko f09e8f5c40 Add "next" link to Atom feeds 2017-02-13 15:38:45 +01:00
Eugen Rochko 8550d32165 Adding more unit tests. Fixing Salmon slaps XML 2017-02-12 17:30:15 +01:00
Eugen Rochko db53bfd30e Fix semantics of follow requests another slaps 2017-02-11 17:13:11 +01:00
Eugen Rochko 59c8c2b28a Make follow requests federate 2017-02-11 02:58:00 +01:00
Eugen af48925ab3 Fix reblogs not having content warnings forwarded 2017-02-08 18:05:46 +01:00
Eugen Rochko 4d011ee829 Use <summary> to encode content warnings instead 2017-01-25 16:53:30 +01:00
Eugen Rochko 959e064186 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 e25fc71c2c Implement a click-to-view spoiler system 2017-01-23 21:07:40 -05:00
Eugen Rochko 7e7c2bbb0f 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 c1c814e6a1 Improve initialState loading 2017-01-09 12:37:53 +01:00
Eugen Rochko 26390b1997 Clean up h-card mess of divs 2017-01-06 20:24:51 +01:00
Eugen Rochko 2bc6e7c96e Add API for retrieving blocked accounts 2016-12-29 20:12:32 +01:00
Eugen Rochko 57f6f80838 Add ability to use remote follow function on other sites 2016-12-29 16:54:54 +01:00
Eugen Rochko 6a54df90c8 Replacing follow requests in the settings area with in-UI column 2016-12-26 21:33:51 +01:00
Eugen Rochko ef9e827c54 Adding follow requests API 2016-12-26 19:30:45 +01:00
Eugen Rochko 302051ffcb Add page for authorizing/rejecting follow requests 2016-12-23 00:04:52 +01:00
Eugen Rochko 8057380928 Federated profile bio now formatted 2016-12-21 19:10:19 +01:00
Eugen Rochko 346aae50b0 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 66e08d880c Improved admin UI 2016-12-13 13:42:10 +01:00
Eugen Rochko e9e11b0ff5 Sensitive content federates using the "nsfw" hashtag 2016-12-11 22:49:25 +01:00
Stanislav Makar fffd718696 Declare Ukrainian
Closes: #345
2016-12-08 18:57:58 +02:00
Eugen Rochko f6b99b05d3 Do not use expiring links after all 2016-12-04 13:02:43 +01:00
Eugen Rochko 9f4b033a8b Set a specific S3 expiration time so that files can be cached 2016-12-04 12:58:35 +01:00
Eugen Rochko 595f592304 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 8260628fc8 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 a8814a19dc Add basic OEmbed provider API, fix #247 2016-11-30 23:01:03 +01:00
Eugen Rochko 8d4ef0b6c3 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 329b2a326d Normalize localizations, add stub for admin/accounts 2016-11-30 15:32:26 +01:00
Eugen Rochko 015cd99f41 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 67db2cd871 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 f37efe8e56 Add simple admin overview of PuSH subscriptions 2016-11-28 18:45:13 +01:00
Eugen Rochko ef93efbb5b Enabling portuguese and hungarian translations, which are awfully incomplete 2016-11-28 13:55:03 +01:00
nicolas 2a1b5185b3 Adding French locale to settings_helper.rb 2016-11-22 10:20:28 +01:00
Eugen Rochko b8293cd830 Display human names of locales in dropdown 2016-11-19 00:19:57 +01:00
Eugen Rochko 43daf0be85 Adding react-intl i18n to the frontend. No translations yet 2016-11-16 17:20:52 +01:00
Eugen Rochko 0e956910c3 Adding some localizations 2016-11-15 23:02:57 +01:00
Eugen Rochko e71b152d89 Fix rubocop issues, introduce usage of frozen literal to improve performance 2016-11-15 16:56:29 +01:00
Eugen Rochko 54b9a42b3a Fix URL configuration when S3 is enabled 2016-11-06 20:43:16 +01:00
Eugen Rochko cb22dce970 Adding hashtags 2016-11-05 17:13:14 +01:00
Eugen Rochko d0240a2cf2 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 7b52b5ab9e 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 588cb77e9f E-mail preferences page 2016-10-14 02:28:49 +02:00
Eugen Rochko 77f782758b Fix reblog mentions Atom 2016-10-10 15:08:24 +02:00
Eugen Rochko 13bef96f10 Include mentions and media attachments of reblogged posts in Atom 2016-10-10 14:22:09 +02:00
Eugen Rochko c3f5dfeabb 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