magento / magento/community-features

Translation Custom Variables

Open
#78 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Priority: P3
Dominant language
No language data
Stars
46
Forks
14
PR merge metrics
No merged PRs in 30d

Description

CustomVar is in my opinion not as efficient as it could be.

Preconditions

Latest Magento 2.3., PHP 7.0, MySql 5.6

Steps to reproduce

Go to "System -> Custom Variables" and create new

Expected result

"Variable Code" should only be editable in "All Store View"
"Variable Name" should be editable for each "Store View" and also usable as translation.
e.g.:
Variable Code: company_owner
Variable Name: Owner (en store), Eigentumer (de Store), Eigenaar (nl Store)
Variable Value: My Name
{{CustomVarName code="company_owner"}}: {{CustomVar code="company_owner"}}

Actual result

"Variable Code" is editable in all Store views and change the default value
"Variable Name" is editable in all Store views and change the default value
Usable is only {{CustomVar code="company_owner"}} and i have to use {{trans "Owner"}} additionally

In suggested way i only have to edit one form (System -> Custom Variables).
Now i additionally have to make translations on other places.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Magento admin entry point System → Custom Variables and trace how custom-variable names, codes, values, and store-view scopes are saved and rendered. Done means the code is shared across store views while names can be translated per store view and the proposed CustomVarName syntax works; the issue names no files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, localization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.