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

Language\en\Language.php is only used in testing #3948

Closed
sfadschm opened this issue Nov 30, 2020 · 0 comments · Fixed by #3949
Closed

Language\en\Language.php is only used in testing #3948

sfadschm opened this issue Nov 30, 2020 · 0 comments · Fixed by #3949

Comments

@sfadschm
Copy link
Contributor

This is not really a bug nor an enhancement, but rather some clean-up.

The file https://github.com/codeigniter4/CodeIgniter4/blob/develop/system/Language/en/Language.php is currently only used in testing here:

public function testLangAllowsOtherLocales()
{
$str1 = lang('Language.languageGetLineInvalidArgumentException', [], 'en');
$str2 = lang('Language.languageGetLineInvalidArgumentException', [], 'ru');
$this->assertEquals('Get line must be a string or array of strings.', $str1);
$this->assertEquals('Whatever this would be, translated', $str2);
}

To remove it, I see two options:

  1. Move the file to https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests/_support/Language/en (just like the ru translation file in the same test case).
  2. Remove the file and use a message from a core language file which will stay forever for testing.

In both cases, the en\Language.php file can also be removed in all translations in the translations repo. (cross ref. codeigniter4/translations#148)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant