yii2-oauth2-server
yii2-oauth2-server copied to clipboard
Add translation support for the models
The models do not use Yii:t()
which would be useful, for using the models in another language.
This would for example in OauthAccessTokens
change:
public function attributeLabels()
{
return [
'access_token' => 'Access Token',
'client_id' => 'Client ID',
'user_id' => 'User ID',
'expires' => 'Expires',
'scope' => 'Scope',
];
}
to
public function attributeLabels()
{
return [
'access_token' => Yii::t('oauth2-server', 'Access Token'),
'client_id' => Yii::t('oauth2-server', 'Client ID'),
'user_id' => Yii::t('oauth2-server', 'User ID'),
'expires' => Yii::t('oauth2-server', 'Expires'),
'scope' => Yii::t('oauth2-server', 'Scope'),
];
}