-
Notifications
You must be signed in to change notification settings - Fork 798
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
[frontend] switch translation key when relationship (#5142) #5180
Conversation
// Uses to determine which key of translation to use below. | ||
const relNames = ['Part-Of', 'Located-At', 'Indicates', 'Mitigates', 'Targets', 'Uses', 'Related-To', 'Attributed-To']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to suggestions if you have better idea to check in mind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure to understand how we can see relationships in the targets list.
The dialog displays targets on the left and relationships on the right, how can we have relationships on the left part ? @lndrtrbn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we can have relations targeting other relations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this list complete ? I can see we have a lot more in STIX_CORE_RELATIONSHIPS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you get it from the schema ?
const { schema } = useAuth();
// ...
const relationshipsNames = schema.sros.map(({id, label }) => label)
Something like that I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see how it's done is useSearchEntities
, we use the schema to get generate all possible options in the filter autocomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'll have a look thanks @labo-flg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, seems way better now
d0a1dbb
to
cd8c231
Compare
Proposed changes
Related issues
Checklist