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

Lingo rewrites entity, results in default-translation output #2

Open
MLindenhofer opened this issue May 10, 2023 · 0 comments
Open

Comments

@MLindenhofer
Copy link

Hi,

We had the problem that certain translations were not output correctly despite the same namespaces in /app/lang/en.yml and /app/myLingo/en_GB.yml. With the debugger we found out that Lingo adjusts the namespace to the one from the project (like this https://github.com/northcreation-agency/silverstripe-lingo/blob/b74b40effb1fe6de6e90f24fe4f95750377039cc/src/model/LingoTranslator.php#LL9C1-L9C49) if it is not in the /app/myLingo/en_GB.yml.

Example:

in app/lingoCatalouge:

en_GB:
  List:
    Header: 'This is a list header'. 

$lingo would result in null -> because $entity: would be NorthCreationAgency\List.

Only updating the namespaces yml-file like this made it work for us:

Example:

en_GB:
  NorthCreationAgency\List:
    Header: 'This is a list header'. 

Is there way to fix this?

Thanks in advance

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

No branches or pull requests

1 participant