Skip to content

Support for Customizing Preference Name #15075

Answered by msujew
israhadhri asked this question in General
Discussion options

You must be logged in to vote

Hey @israhadhri,

I don't think we have a direct builtin way of customizing preference names (although that would be pretty nice, as that would also allow localization of preferences, PRs are welcome). Currently, the names are generated in here:

getName(node: Preference.TreeNode): string {
if (Preference.TreeNode.is(node) && node.label) {
return node.label;
}
const { id } = Preference.TreeNode.getGroupAndIdFromNodeId(node.id);
const labels = id.split('.');
const groupName = labels[labels.length - 1];
return this.formatString(groupName);
}

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by msujew
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants