mirror of
https://github.com/flarum/core.git
synced 2025-07-24 02:01:19 +02:00
Refactor translation and validation
We now use Symfony's Translation component. Yay! We get more powerful pluralisation and better a fallback mechanism. Will want to implement the caching mechanism at some point too. The API is replicated in JavaScript, which could definitely use some testing. Validators have been refactored so that they are decoupled from models completely (i.e. they simply validate arrays of user input). Language packs should include Laravel's validation messages. ref #267
This commit is contained in:
@@ -123,7 +123,7 @@ export default class PermissionGrid extends Component {
|
||||
|
||||
return SettingDropdown.component({
|
||||
defaultLabel: minutes
|
||||
? app.trans('core.admin.permissions_allow_some_minutes_button', {count: minutes})
|
||||
? app.translator.transChoice('core.admin.permissions_allow_some_minutes_button', minutes, {count: minutes})
|
||||
: app.trans('core.admin.permissions_allow_indefinitely_button'),
|
||||
key: 'allow_renaming',
|
||||
options: [
|
||||
@@ -155,7 +155,7 @@ export default class PermissionGrid extends Component {
|
||||
|
||||
return SettingDropdown.component({
|
||||
defaultLabel: minutes
|
||||
? app.trans('core.admin.permissions_allow_some_minutes_button', {count: minutes})
|
||||
? app.translator.transChoice('core.admin.permissions_allow_some_minutes_button', minutes, {count: minutes})
|
||||
: app.trans('core.admin.permissions_allow_indefinitely_button'),
|
||||
key: 'allow_post_editing',
|
||||
options: [
|
||||
|
Reference in New Issue
Block a user