From 6d6e23e49262d1b618026257e719930efb69a4d9 Mon Sep 17 00:00:00 2001 From: "Dmitry.Krasilschikov" Date: Wed, 15 Jan 2020 20:05:18 +0200 Subject: [PATCH] localize "Preferences | Version Control | Shelf" configurable GitOrigin-RevId: 50a0de676d60e3fd1ff0ab4fbe8a794b0959c73b --- .../src/messages/VcsBundle.properties | 6 +++++- .../configurable/ShelfProjectConfigurationPanel.java | 10 ++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/platform/platform-resources-en/src/messages/VcsBundle.properties b/platform/platform-resources-en/src/messages/VcsBundle.properties index 7d9ef2002ac3..f60124a21b45 100644 --- a/platform/platform-resources-en/src/messages/VcsBundle.properties +++ b/platform/platform-resources-en/src/messages/VcsBundle.properties @@ -701,4 +701,8 @@ settings.border.when.empty.changelist.becomes.inactive=When empty changelist bec settings.file.status.color.modified.in.not.active.changelist=Modified in not active changelist settings.file.status.color.added.in.not.active.changelist=Added in not active changelist settings.file.status.color.changelist.conflict=Changelist conflict -settings.issue.navigation.patterns={0} will search for the specified patterns in checkin comments and link them to issues in your issue tracker: \ No newline at end of file +settings.issue.navigation.patterns={0} will search for the specified patterns in checkin comments and link them to issues in your issue tracker: +settings.shelf.content.larger=The base content of files larger than {0}K will not be stored +settings.change.shelves.location=Change Shelves Location +settings.current.location=Current location is +settings.default.location=Default location is \ No newline at end of file diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/ShelfProjectConfigurationPanel.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/ShelfProjectConfigurationPanel.java index 699a170bf309..6859d918caac 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/ShelfProjectConfigurationPanel.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/ShelfProjectConfigurationPanel.java @@ -41,8 +41,6 @@ import static java.awt.GridBagConstraints.NONE; import static java.awt.GridBagConstraints.NORTHWEST; public class ShelfProjectConfigurationPanel extends JPanel { - @NotNull private static final String CURRENT_LOCATION_HINT = "Current location is "; - @NotNull private static final String DEFAULT_LOCATION_HINT = "Default location is "; @NotNull private final VcsConfiguration myVcsConfiguration; @NotNull private final Project myProject; @NotNull private final JBCheckBox myBaseRevisionTexts; @@ -73,7 +71,7 @@ public class ShelfProjectConfigurationPanel extends JPanel { contentPanel.add(createStoreBaseRevisionOption(), gb); JPanel shelfConfigurablePanel = new JPanel(new BorderLayout(DEFAULT_HGAP, DEFAULT_VGAP)); - JButton shelfConfigurableButton = new JButton("Change Shelves Location"); + JButton shelfConfigurableButton = new JButton(VcsBundle.message("settings.change.shelves.location")); shelfConfigurableButton.setEnabled(!myProject.isDefault()); shelfConfigurableButton.addActionListener(new ActionListener() { @Override @@ -91,7 +89,8 @@ public class ShelfProjectConfigurationPanel extends JPanel { } private void updateLabelInfo() { - myInfoLabel.setText((myProject.isDefault() ? DEFAULT_LOCATION_HINT : CURRENT_LOCATION_HINT) + + myInfoLabel.setText((myProject.isDefault() ? VcsBundle.message("settings.default.location") + : VcsBundle.message("settings.current.location")) + (myVcsConfiguration.USE_CUSTOM_SHELF_PATH ? toSystemDependentName( assertNotNull(myVcsConfiguration.CUSTOM_SHELF_PATH)) : getDefaultShelfPresentationPath(myProject))); } @@ -105,8 +104,7 @@ public class ShelfProjectConfigurationPanel extends JPanel { } private JComponent createStoreBaseRevisionOption() { - final JBLabel noteLabel = - new JBLabel("The base content of files larger than " + ourMaximumFileForBaseRevisionSize / 1000 + "K will not be stored"); + final JBLabel noteLabel = new JBLabel(VcsBundle.message("settings.shelf.content.larger", ourMaximumFileForBaseRevisionSize / 1000)); noteLabel.setComponentStyle(UIUtil.ComponentStyle.SMALL); noteLabel.setFontColor(UIUtil.FontColor.BRIGHTER); noteLabel.setBorder(JBUI.Borders.empty(2, 25, 5, 0));