-
Notifications
You must be signed in to change notification settings - Fork 13
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Update
Based on the discussion below we will introduce a marker for keys that should not be translated, similar to bypassSecurity... by Angular:
const translatable = bypassTranslation('NOT_A_KEY')I assume that either prefixing the string or just having an object should work. When implementing please evaluate the approach of bypassSecurity....
Prerequisites
- I have read the Contributing Guidelines.
- I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.
Affected component
No response
Summary
Currently the SiTranslatePipe return objects if the user pass a group key which result in a unattended display of the value [object Object].
Instead we should return the passed key if the translation result is an object. Since we don't have the use case in our library to translate and display groups.
Example:
de.json:
{
"LANGUAGE": {
"EN": "English",
"EL": "Greek",
"DE": "Deutsch",
"FR": "Français"
}
}component.html:
<h1>{{ 'LANGUAGE' | translate }}</h1>Version
No response
Steps to reproduce
Open example:
Code reproduction example
What is the current bug behavior
- group keys shouldn't get translated via pipe
- never return objects via pipe
What is the expected correct behavior
- in case the translation service returns an object the pipe should return the key
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working