Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong message i18n #382

Closed
bscheshirwork opened this issue Oct 24, 2018 · 1 comment
Closed

Wrong message i18n #382

bscheshirwork opened this issue Oct 24, 2018 · 1 comment
Labels
status:ready for adoption Feel free to implement this issue. type:bug Bug
Milestone

Comments

@bscheshirwork
Copy link
Contributor

What steps will reproduce the problem?

  1. Generate crud for model
  2. Add i18n

config.php

return [
    'sourcePath' => dirname(__DIR__, 2),
    'messagePath' => __DIR__,
    'languages' => [
        'ru',
    ],
    'translator' => 'Yii::t',
    'sort' => true,
    'overwrite' => true,
    'removeUnused' => false,
    'only' => ['*.php'],
    'except' => [
        '.svn',
        '.git',
        '.gitignore',
        '.gitkeep',
        '.hgignore',
        '.hgkeep',
    ],
    'format' => 'php',
];

./yii message ./common/modules/tag/messages/config.php

$this->title = Yii::t('tag', 'Update Tag: ' . $model->name, [
    'nameAttribute' => '' . $model->name,
]);

What is the expected result?

$this->title = Yii::t('tag', 'Update Tag: {nameAttribute}', [
    'nameAttribute' => '' . $model->name,
]);
[
    'Update Tag: {nameAttribute}' => '',
]

What do you get instead?

[
    'Update Tag: mode' => '',
]

Additional info

Q A
Yii version dev
PHP version 7.2.10
Operating system
@bscheshirwork
Copy link
Contributor Author

Check #383 please?

@samdark samdark added this to the 2.0.8 milestone Nov 12, 2018
@samdark samdark closed this as completed Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for adoption Feel free to implement this issue. type:bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants