mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 22:50:45 +08:00
880311dd4d
- 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"}}` |
||
---|---|---|
.. | ||
site-settings | ||
ace-editor.js.es6 | ||
admin-backups-logs.js.es6 | ||
admin-directory-toggle.js.es6 | ||
admin-editable-field.js.es6 | ||
admin-form-row.js.es6 | ||
admin-graph.js.es6 | ||
admin-nav.js.es6 | ||
admin-report-chart.js.es6 | ||
admin-report-counters.js.es6 | ||
admin-report-counts.js.es6 | ||
admin-report-inline-table.js.es6 | ||
admin-report-per-day-counts.js.es6 | ||
admin-report-storage-stats.js.es6 | ||
admin-report-table-cell.js.es6 | ||
admin-report-table-header.js.es6 | ||
admin-report-table-row.js.es6 | ||
admin-report-table.js.es6 | ||
admin-report-trust-level-counts.js.es6 | ||
admin-report.js.es6 | ||
admin-user-field-item.js.es6 | ||
admin-watched-word.js.es6 | ||
admin-web-hook-event-chooser.js.es6 | ||
admin-web-hook-event.js.es6 | ||
admin-web-hook-status.js.es6 | ||
admin-wrapper.js.es6 | ||
cancel-link.js.es6 | ||
color-input.js.es6 | ||
embeddable-host.js.es6 | ||
embedding-setting.js.es6 | ||
flag-user-lists.js.es6 | ||
flagged-post-response.js.es6 | ||
flagged-post-title.js.es6 | ||
flagged-post.js.es6 | ||
highlighted-code.js.es6 | ||
inline-edit-checkbox.js.es6 | ||
ip-lookup.js.es6 | ||
moderation-history-item.js.es6 | ||
penalty-post-action.js.es6 | ||
permalink-form.js.es6 | ||
resumable-upload.js.es6 | ||
save-controls.js.es6 | ||
screened-ip-address-form.js.es6 | ||
secret-value-list.js.es6 | ||
silence-details.js.es6 | ||
site-setting.js.es6 | ||
site-settings-image-uploader.js.es6 | ||
site-text-summary.js.es6 | ||
staff-actions.js.es6 | ||
suspension-details.js.es6 | ||
tags-uploader.js.es6 | ||
theme-setting-editor.js.es6 | ||
theme-translation.js.es6 | ||
themes-list-item.js.es6 | ||
themes-list.js.es6 | ||
user-flag-percentage.js.es6 | ||
value-list.js.es6 | ||
watched-word-form.js.es6 | ||
watched-word-uploader.js.es6 |