Skip to content

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

Description

@sfadschm

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions