Skip to content

[5.x]: Field Name gets translated in CP when using site.php translation file #18779

@foxtrotcz

Description

@foxtrotcz

What happened?

Description

I am not sure if this is my own fault because the way I use Craft, but let me explain.
I have Craft CP set to English, because its easier to use the app original language for communication and docs.
My primary site uses Czech language and I translate it to English via both content and static translations.
This means I have translations/en/site.php file with some defined static translations which I mainly use to translate Table Row Headings like I described here #13703.

Now I discovered that when I translate such string in site.php it also applies to Field Name shown in CP.
I thought strings shown inside CP are managed by app.php.

But its just minor issue. Thanks.

Steps to reproduce

  1. Have your Craft CP language set to English.
  2. Inside translations/en/site.php add 'Original Title' => 'Translated Title', as example.
  3. Create Field named Original Title
  4. Check list of Fields and see its translated into Translated Title. This can be seen in multiple places inside CP where the Field Name is printed.

Expected behavior

I would expect the Field Name to stay in its original language inside CP since I dont define app.php which is supposed to target CP strings.

Actual behavior

Field Name gets translated in CP.

Craft CMS version

Craft Solo 5.9.22

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions