discourse/spec/lib
David Taylor 880311dd4d
FEATURE: Support for localized themes (#6848)
- Themes can supply translation files in a format like `/locales/{locale}.yml`. These files should be valid YAML, with a single top level key equal to the locale being defined. For now these can only be defined using the `discourse_theme` CLI, importing a `.tar.gz`, or from a GIT repository.

- Fallback is handled on a global level (if the locale is not defined in the theme), as well as on individual keys (if some keys are missing from the selected interface language).

- Administrators can override individual keys on a per-theme basis in the /admin/customize/themes user interface.

- Theme developers should access defined translations using the new theme prefix variables:
  JavaScript: `I18n.t(themePrefix("my_translation_key"))`
  Handlebars: `{{theme-i18n "my_translation_key"}}` or `{{i18n (theme-prefix "my_translation_key")}}`

- To design for backwards compatibility, theme developers can check for the presence of the `themePrefix` variable in JavaScript

- As part of this, the old `{{themeSetting.setting_name}}` syntax is deprecated in favour of `{{theme-setting "setting_name"}}`
2019-01-17 11:46:11 +00:00
..
backup_restore FIX: Multisite DB was leaving old data in test mode 2019-01-09 15:20:37 -05:00
content_security_policy FEATURE: allow plugins and themes to extend the default CSP (#6704) 2018-11-30 09:51:45 -05:00
site_settings DEV: Remove unnecessary `to_not raise_error` from specs 2018-12-17 16:10:10 +01:00
browser_detection_spec.rb FIX: Fix browser detection for Microsoft Edge. (#6516) 2018-10-22 23:15:41 +11:00
content_security_policy_spec.rb FEATURE: allow extending CSP base-uri and object-src 2019-01-09 15:34:14 -05:00
db_helper_spec.rb PERF: new 'migrate_to_s3' rake task 2018-12-26 17:34:49 +01:00
encodings_spec.rb Use rchardet instead of charlock_holmes gem 2018-08-01 10:41:20 +02:00
introduction_updater_spec.rb FIX: Wizard tries harder to find existing Welcome Topic 2018-12-06 10:27:22 +01:00
mini_sql_multisite_connection_spec.rb Rubocop fix 2018-07-24 10:49:20 +01:00
theme_javascript_compiler_spec.rb FEATURE: Support for localized themes (#6848) 2019-01-17 11:46:11 +00:00
upload_creator_spec.rb FEATURE: Add S3 etag value to uploads table (#6795) 2019-01-04 14:16:22 +08:00
upload_recovery_spec.rb FIX: Don't update user_profile URLs unless upload is persisted. 2018-10-01 14:21:39 +08:00