about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb10
-rw-r--r--config/i18n-tasks.yml43
-rw-r--r--config/initializers/assets.rb3
-rw-r--r--config/locales/devise.en.yml89
-rw-r--r--config/locales/doorkeeper.en.yml159
-rw-r--r--config/locales/en.yml44
-rw-r--r--config/locales/simple_form.en.yml47
7 files changed, 221 insertions, 174 deletions
diff --git a/config/application.rb b/config/application.rb
index 5b5e66ca7..6525571cc 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -31,16 +31,16 @@ module Mastodon
       allow do
         origins  '*'
 
-        resource '/api/*',       :headers => :any, :methods => [:post, :put, :delete, :get, :options], credentials: false
-        resource '/oauth/token', :headers => :any, :methods => [:post], credentials: false
+        resource '/api/*',       headers: :any, methods: [:post, :put, :delete, :get, :options], credentials: false
+        resource '/oauth/token', headers: :any, methods: [:post], credentials: false
       end
     end
 
     config.middleware.use Rack::Attack
     config.middleware.use Rack::Deflater
 
-    config.browserify_rails.source_map_environments += %w[development production]
-    config.browserify_rails.commandline_options = "--transform [ babelify --presets [ es2015 react ] ] --extension=\".jsx\""
+    config.browserify_rails.source_map_environments += %w(development production)
+    config.browserify_rails.commandline_options = '--transform [ babelify --presets [ es2015 react ] ] --extension=".jsx"'
 
     config.to_prepare do
       Doorkeeper::AuthorizationsController.layout 'auth'
@@ -50,7 +50,7 @@ module Mastodon
       'Server'                 => 'Mastodon',
       'X-Frame-Options'        => 'DENY',
       'X-Content-Type-Options' => 'nosniff',
-      'X-XSS-Protection'       => '1; mode=block'
+      'X-XSS-Protection'       => '1; mode=block',
     }
   end
 end
diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml
new file mode 100644
index 000000000..d345ce6c0
--- /dev/null
+++ b/config/i18n-tasks.yml
@@ -0,0 +1,43 @@
+# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks
+
+# The "main" locale.
+base_locale: en
+data:
+  read:
+    - config/locales/%{locale}.yml
+    - config/locales/**/*.%{locale}.yml
+
+  write:
+    - ['{devise, simple_form, doorkeeper}.*', 'config/locales/\1.%{locale}.yml']
+    - config/locales/%{locale}.yml
+
+  yaml:
+    write:
+      line_width: -1
+
+search:
+  paths:
+   - app/
+
+  relative_roots:
+    - app/controllers
+    - app/helpers
+    - app/mailers
+    - app/views
+
+  exclude:
+    - app/assets/images
+    - app/assets/fonts
+    - app/assets/videos
+
+ignore_missing:
+  - '{devise,simple_form}.*'
+
+ignore_unused:
+  - 'activerecord.attributes.*'
+  - '{devise,will_paginate,doorkeeper}.*'
+  - 'simple_form.{yes,no}'
+  - 'simple_form.{placeholders,hints,labels}.*'
+  - 'simple_form.{error_notification,required}.:'
+  - 'errors.messages.*'
+  - 'activerecord.errors.models.doorkeeper/*'
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index acf79149d..43f7860cb 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -8,4 +8,5 @@ Rails.application.config.assets.version = '1.0'
 
 # Precompile additional assets.
 # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
-Rails.application.config.assets.precompile += %w( application_public.js )
+Rails.application.config.assets.precompile += %w(application_public.js)
+Rails.application.config.assets.initialize_on_precompile = true
diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml
index d06eee4fd..32ac92cf9 100644
--- a/config/locales/devise.en.yml
+++ b/config/locales/devise.en.yml
@@ -1,62 +1,61 @@
-# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
-
+---
 en:
   devise:
     confirmations:
-      confirmed: "Your email address has been successfully confirmed."
-      send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
-      send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
+      confirmed: Your email address has been successfully confirmed.
+      send_instructions: You will receive an email with instructions for how to confirm your email address in a few minutes.
+      send_paranoid_instructions: If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes.
     failure:
-      already_authenticated: "You are already signed in."
-      inactive: "Your account is not activated yet."
-      invalid: "Invalid %{authentication_keys} or password."
-      locked: "Your account is locked."
-      last_attempt: "You have one more attempt before your account is locked."
-      not_found_in_database: "Invalid %{authentication_keys} or password."
-      timeout: "Your session expired. Please sign in again to continue."
-      unauthenticated: "You need to sign in or sign up before continuing."
-      unconfirmed: "You have to confirm your email address before continuing."
+      already_authenticated: You are already signed in.
+      inactive: Your account is not activated yet.
+      invalid: Invalid %{authentication_keys} or password.
+      last_attempt: You have one more attempt before your account is locked.
+      locked: Your account is locked.
+      not_found_in_database: Invalid %{authentication_keys} or password.
+      timeout: Your session expired. Please sign in again to continue.
+      unauthenticated: You need to sign in or sign up before continuing.
+      unconfirmed: You have to confirm your email address before continuing.
     mailer:
       confirmation_instructions:
-        subject: "Mastodon: Confirmation instructions"
+        subject: 'Mastodon: Confirmation instructions'
+      password_change:
+        subject: 'Mastodon: Password changed'
       reset_password_instructions:
-        subject: "Mastodon: Reset password instructions"
+        subject: 'Mastodon: Reset password instructions'
       unlock_instructions:
-        subject: "Mastodon: Unlock instructions"
-      password_change:
-        subject: "Mastodon: Password changed"
+        subject: 'Mastodon: Unlock instructions'
     omniauth_callbacks:
-      failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
-      success: "Successfully authenticated from %{kind} account."
+      failure: Could not authenticate you from %{kind} because "%{reason}".
+      success: Successfully authenticated from %{kind} account.
     passwords:
-      no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
-      send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
-      send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
-      updated: "Your password has been changed successfully. You are now signed in."
-      updated_not_active: "Your password has been changed successfully."
+      no_token: You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided.
+      send_instructions: You will receive an email with instructions on how to reset your password in a few minutes.
+      send_paranoid_instructions: If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes.
+      updated: Your password has been changed successfully. You are now signed in.
+      updated_not_active: Your password has been changed successfully.
     registrations:
-      destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
-      signed_up: "Welcome! You have signed up successfully."
-      signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
-      signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
-      signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
-      update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
-      updated: "Your account has been updated successfully."
+      destroyed: Bye! Your account has been successfully cancelled. We hope to see you again soon.
+      signed_up: Welcome! You have signed up successfully.
+      signed_up_but_inactive: You have signed up successfully. However, we could not sign you in because your account is not yet activated.
+      signed_up_but_locked: You have signed up successfully. However, we could not sign you in because your account is locked.
+      signed_up_but_unconfirmed: A message with a confirmation link has been sent to your email address. Please follow the link to activate your account.
+      update_needs_confirmation: You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address.
+      updated: Your account has been updated successfully.
     sessions:
-      signed_in: "Signed in successfully."
-      signed_out: "Signed out successfully."
-      already_signed_out: "Signed out successfully."
+      already_signed_out: Signed out successfully.
+      signed_in: Signed in successfully.
+      signed_out: Signed out successfully.
     unlocks:
-      send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
-      send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
-      unlocked: "Your account has been unlocked successfully. Please sign in to continue."
+      send_instructions: You will receive an email with instructions for how to unlock your account in a few minutes.
+      send_paranoid_instructions: If your account exists, you will receive an email with instructions for how to unlock it in a few minutes.
+      unlocked: Your account has been unlocked successfully. Please sign in to continue.
   errors:
     messages:
-      already_confirmed: "was already confirmed, please try signing in"
-      confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
-      expired: "has expired, please request a new one"
-      not_found: "not found"
-      not_locked: "was not locked"
+      already_confirmed: was already confirmed, please try signing in
+      confirmation_period_expired: needs to be confirmed within %{period}, please request a new one
+      expired: has expired, please request a new one
+      not_found: not found
+      not_locked: was not locked
       not_saved:
-        one: "1 error prohibited this %{resource} from being saved:"
+        one: '1 error prohibited this %{resource} from being saved:'
         other: "%{count} errors prohibited this %{resource} from being saved:"
diff --git a/config/locales/doorkeeper.en.yml b/config/locales/doorkeeper.en.yml
index e4444c972..aaf5df6fc 100644
--- a/config/locales/doorkeeper.en.yml
+++ b/config/locales/doorkeeper.en.yml
@@ -1,127 +1,112 @@
+---
 en:
   activerecord:
     attributes:
       doorkeeper/application:
-        name: 'Name'
-        redirect_uri: 'Redirect URI'
+        name: Name
+        redirect_uri: Redirect URI
     errors:
       models:
         doorkeeper/application:
           attributes:
             redirect_uri:
-              fragment_present: 'cannot contain a fragment.'
-              invalid_uri: 'must be a valid URI.'
-              relative_uri: 'must be an absolute URI.'
-              secured_uri: 'must be an HTTPS/SSL URI.'
-
+              fragment_present: cannot contain a fragment.
+              invalid_uri: must be a valid URI.
+              relative_uri: must be an absolute URI.
+              secured_uri: must be an HTTPS/SSL URI.
   doorkeeper:
-    scopes:
-      read: read your account's data
-      write: post on your behalf
-      follow: follow, block, unblock and unfollow accounts
     applications:
-      confirmations:
-        destroy: 'Are you sure?'
       buttons:
-        edit: 'Edit'
-        destroy: 'Destroy'
-        submit: 'Submit'
-        cancel: 'Cancel'
-        authorize: 'Authorize'
+        authorize: Authorize
+        cancel: Cancel
+        destroy: Destroy
+        edit: Edit
+        submit: Submit
+      confirmations:
+        destroy: Are you sure?
+      edit:
+        title: Edit application
       form:
-        error: 'Whoops! Check your form for possible errors'
+        error: Whoops! Check your form for possible errors
       help:
-        redirect_uri: 'Use one line per URI'
-        native_redirect_uri: 'Use %{native_redirect_uri} for local tests'
-        scopes: 'Separate scopes with spaces. Leave blank to use the default scopes.'
-      edit:
-        title: 'Edit application'
+        native_redirect_uri: Use %{native_redirect_uri} for local tests
+        redirect_uri: Use one line per URI
+        scopes: Separate scopes with spaces. Leave blank to use the default scopes.
       index:
-        title: 'Your applications'
-        new: 'New Application'
-        name: 'Name'
-        callback_url: 'Callback URL'
+        callback_url: Callback URL
+        name: Name
+        new: New Application
+        title: Your applications
       new:
-        title: 'New Application'
+        title: New Application
       show:
+        actions: Actions
+        application_id: Application Id
+        callback_urls: Callback urls
+        scopes: Scopes
+        secret: Secret
         title: 'Application: %{name}'
-        application_id: 'Application Id'
-        secret: 'Secret'
-        scopes: 'Scopes'
-        callback_urls: 'Callback urls'
-        actions: 'Actions'
-
     authorizations:
       buttons:
-        authorize: 'Authorize'
-        deny: 'Deny'
+        authorize: Authorize
+        deny: Deny
       error:
-        title: 'An error has occurred'
+        title: An error has occurred
       new:
-        title: 'Authorization required'
-        prompt: 'Authorize %{client_name} to use your account?'
-        able_to: 'This application will be able to'
+        able_to: It will be able to
+        prompt: Application %{client_name} requests access to your account
+        title: Authorization required
       show:
-        title: 'Authorization code'
-
+        title: Authorization code
     authorized_applications:
-      confirmations:
-        revoke: 'Are you sure?'
       buttons:
-        revoke: 'Revoke'
+        revoke: Revoke
+      confirmations:
+        revoke: Are you sure?
       index:
-        title: 'Your authorized applications'
-        application: 'Application'
-        created_at: 'Created At'
-        date_format: '%Y-%m-%d %H:%M:%S'
-
+        application: Application
+        created_at: Created At
+        date_format: "%Y-%m-%d %H:%M:%S"
+        title: Your authorized applications
     errors:
       messages:
-        # Common error messages
-        invalid_request: 'The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.'
-        invalid_redirect_uri: 'The redirect uri included is not valid.'
-        unauthorized_client: 'The client is not authorized to perform this request using this method.'
-        access_denied: 'The resource owner or authorization server denied the request.'
-        invalid_scope: 'The requested scope is invalid, unknown, or malformed.'
-        server_error: 'The authorization server encountered an unexpected condition which prevented it from fulfilling the request.'
-        temporarily_unavailable: 'The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.'
-
-        #configuration error messages
-        credential_flow_not_configured: 'Resource Owner Password Credentials flow failed due to Doorkeeper.configure.resource_owner_from_credentials being unconfigured.'
-        resource_owner_authenticator_not_configured: 'Resource Owner find failed due to Doorkeeper.configure.resource_owner_authenticator being unconfiged.'
-
-        # Access grant errors
-        unsupported_response_type: 'The authorization server does not support this response type.'
-
-        # Access token errors
-        invalid_client: 'Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.'
-        invalid_grant: 'The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.'
-        unsupported_grant_type: 'The authorization grant type is not supported by the authorization server.'
-
-        # Password Access token errors
-        invalid_resource_owner: 'The provided resource owner credentials are not valid, or resource owner cannot be found'
-
+        access_denied: The resource owner or authorization server denied the request.
+        credential_flow_not_configured: Resource Owner Password Credentials flow failed due to Doorkeeper.configure.resource_owner_from_credentials being unconfigured.
+        invalid_client: Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.
+        invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
+        invalid_redirect_uri: The redirect uri included is not valid.
+        invalid_request: The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.
+        invalid_resource_owner: The provided resource owner credentials are not valid, or resource owner cannot be found
+        invalid_scope: The requested scope is invalid, unknown, or malformed.
         invalid_token:
-          revoked: "The access token was revoked"
-          expired: "The access token expired"
-          unknown: "The access token is invalid"
-
+          expired: The access token expired
+          revoked: The access token was revoked
+          unknown: The access token is invalid
+        resource_owner_authenticator_not_configured: Resource Owner find failed due to Doorkeeper.configure.resource_owner_authenticator being unconfiged.
+        server_error: The authorization server encountered an unexpected condition which prevented it from fulfilling the request.
+        temporarily_unavailable: The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
+        unauthorized_client: The client is not authorized to perform this request using this method.
+        unsupported_grant_type: The authorization grant type is not supported by the authorization server.
+        unsupported_response_type: The authorization server does not support this response type.
     flash:
       applications:
         create:
-          notice: 'Application created.'
+          notice: Application created.
         destroy:
-          notice: 'Application deleted.'
+          notice: Application deleted.
         update:
-          notice: 'Application updated.'
+          notice: Application updated.
       authorized_applications:
         destroy:
-          notice: 'Application revoked.'
-
+          notice: Application revoked.
     layouts:
       admin:
         nav:
-          oauth2_provider: 'OAuth2 Provider'
-          applications: 'Applications'
+          applications: Applications
+          oauth2_provider: OAuth2 Provider
       application:
-        title: 'OAuth authorization required'
+        title: OAuth authorization required
+    scopes:
+      follow: follow, block, unblock and unfollow accounts
+      read: read your account's data
+      write: post on your behalf
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 55b062c0d..ab16ed082 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1,23 +1,57 @@
+---
 en:
+  about:
+    about_instance: "<em>%{instance}</em> is a Mastodon instance."
+    about_mastodon: Mastodon is a <em>free, open-source</em> social network server. A <em>decentralized</em> alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Anyone can run Mastodon and participate in the <em>social network</em> seamlessly.
+    get_started: Get started
+    source_code: Source code
+    terms: Terms
+  accounts:
+    follow: Follow
+    followers: Followers
+    following: Following
+    nothing_here: There is nothing here!
+    people_followed_by: People whom %{name} follows
+    people_who_follow: People who follow %{name}
+    posts: Posts
+    unfollow: Unfollow
+  application_mailer:
+    signature: Mastodon notifications from %{instance}
   auth:
+    change_password: Change password
+    didnt_get_confirmation: Didn't receive confirmation instructions?
+    forgot_password: Forgot your password?
     login: Log in
     register: Sign up
-    forgot_password: Forgot your password?
-    didnt_get_confirmation: Didn't receive confirmation instructions?
     resend_confirmation: Resend confirmation instructions
     reset_password: Reset password
     set_new_password: Set new password
-    change_password: Change password
   generic:
+    changes_saved_msg: Changes successfully saved!
+    powered_by: powered by %{link}
     save_changes: Save changes
     validation_errors:
       one: Something isn't quite right yet! Please review the error below
       other: Something isn't quite right yet! Please review %{count} errors below
-    powered_by: powered by %{link}
-    changes_saved_msg: Changes successfully saved!
+  notification_mailer:
+    favourite:
+      body: 'Your status was favourited by %{name}:'
+      subject: "%{name} favourited your status"
+    follow:
+      body: "%{name} is now following you!"
+      subject: "%{name} is now following you"
+    mention:
+      body: 'You were mentioned by %{name} in:'
+      subject: You were mentioned by %{name}
+    reblog:
+      body: 'Your status was reblogged by %{name}:'
+      subject: "%{name} reblogged your status"
   pagination:
     next: Next
     prev: Prev
   settings:
     edit_profile: Edit profile
     preferences: Preferences
+  stream_entries:
+    favourited: favourited a post by
+    is_now_following: is now following
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
index 34bc94963..ef69f7569 100644
--- a/config/locales/simple_form.en.yml
+++ b/config/locales/simple_form.en.yml
@@ -1,43 +1,28 @@
+---
 en:
   simple_form:
-    "yes": 'Yes'
-    "no": 'No'
-    required:
-      text: 'required'
-      mark: '*'
     error_notification:
-      default_message: "Please review the problems below:"
-
+      default_message: 'Please review the problems below:'
     labels:
       defaults:
-        email: E-mail address
-        password: Password
-        username: Username
-        confirm_password: Confirm password
-        new_password: New password
+        avatar: Avatar
         confirm_new_password: Confirm new password
+        confirm_password: Confirm password
         current_password: Current password
         display_name: Display name
-        note: Bio
-        avatar: Avatar
+        email: E-mail address
         header: Header
+        new_password: New password
+        note: Bio
+        password: Password
+        username: Username
       notification_emails:
-        follow: Send e-mail when someone follows you
-        reblog: Send e-mail when someone reblogs your status
         favourite: Send e-mail when someone favourites your status
+        follow: Send e-mail when someone follows you
         mention: Send e-mail when someone mentions you
-    #   user:
-    #     new:
-    #       email: 'E-mail to sign in.'
-    #     edit:
-    #       email: 'E-mail.'
-    # hints:
-    #   defaults:
-    #     username: 'User name to sign in.'
-    #     password: 'No special characters, please.'
-    # include_blanks:
-    #   defaults:
-    #     age: 'Rather not say'
-    # prompts:
-    #   defaults:
-    #     age: 'Select your age'
+        reblog: Send e-mail when someone reblogs your status
+    'no': 'No'
+    required:
+      mark: "*"
+      text: required
+    'yes': 'Yes'