optimize delimiter naming

This commit is contained in:
marhali 2022-04-10 13:11:51 +02:00
parent ddebb04871
commit f63492ea7a
2 changed files with 11 additions and 4 deletions

View File

@ -156,15 +156,22 @@ public class ProjectSettingsComponent extends ProjectSettingsComponentState {
panel.add(namespaceDelimiter = createDelimiterField(bundle.getString("settings.editor.key.namespace.tooltip"))); panel.add(namespaceDelimiter = createDelimiterField(bundle.getString("settings.editor.key.namespace.tooltip")));
panel.add(new JBLabel(bundle.getString("settings.editor.key.section.title"))); panel.add(new JBLabel(bundle.getString("settings.editor.key.section.title")));
panel.add(sectionDelimiter = createDelimiterField(bundle.getString("settings.editor.key.section.tooltip"))); panel.add(sectionDelimiter = createDelimiterField(bundle.getString("settings.editor.key.section.tooltip")));
panel.add(new JBLabel(bundle.getString("settings.editor.key.node.title"))); panel.add(createBoldLabel(bundle.getString("settings.editor.key.leaf.title")));
panel.add(contextDelimiter = createDelimiterField(bundle.getString("settings.editor.key.context.tooltip"))); panel.add(contextDelimiter = createDelimiterField(bundle.getString("settings.editor.key.context.tooltip")));
panel.add(new JBLabel(bundle.getString("settings.editor.key.context.title"))); panel.add(createBoldLabel(bundle.getString("settings.editor.key.context.title")));
panel.add(pluralDelimiter = createDelimiterField(bundle.getString("settings.editor.key.plural.tooltip"))); panel.add(pluralDelimiter = createDelimiterField(bundle.getString("settings.editor.key.plural.tooltip")));
panel.add(new JBLabel(bundle.getString("settings.editor.key.plural.title"))); panel.add(createBoldLabel(bundle.getString("settings.editor.key.plural.title")));
return panel; return panel;
} }
private JLabel createBoldLabel(String title) {
JBLabel label = new JBLabel(title);
Font font = label.getFont();
label.setFont(font.deriveFont(font.getStyle() | Font.BOLD));
return label;
}
private JTextField createDelimiterField(String tooltip) { private JTextField createDelimiterField(String tooltip) {
JBTextField field = new JBTextField(); JBTextField field = new JBTextField();
field.setHorizontalAlignment(JTextField.CENTER); field.setHorizontalAlignment(JTextField.CENTER);

View File

@ -37,7 +37,7 @@ settings.editor.key.namespace.title=[namespace]
settings.editor.key.namespace.tooltip=Sets the separator used between namespace and key path. settings.editor.key.namespace.tooltip=Sets the separator used between namespace and key path.
settings.editor.key.section.title=[section] settings.editor.key.section.title=[section]
settings.editor.key.section.tooltip=Sets the separator used between section nodes of the key path. settings.editor.key.section.tooltip=Sets the separator used between section nodes of the key path.
settings.editor.key.node.title=[node settings.editor.key.leaf.title=[leaf
settings.editor.key.context.title=context settings.editor.key.context.title=context
settings.editor.key.context.tooltip=Sets the separator used to define context-specific variants of a translation. settings.editor.key.context.tooltip=Sets the separator used to define context-specific variants of a translation.
settings.editor.key.plural.title=pluralization] settings.editor.key.plural.title=pluralization]