mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
118571 Fixed setting locale for svn command line client - "LC_ALL" variable is set to configured locale, "LANGUAGE" variable is cleared (to use english output, if localization files for configured locale are not found)
This commit is contained in:
@@ -75,8 +75,7 @@ public class CommandExecutor {
|
||||
public CommandExecutor(@NotNull @NonNls String exePath, @NotNull Command command) {
|
||||
myCommand = command;
|
||||
myResultBuilder = command.getResultBuilder();
|
||||
if (myResultBuilder != null)
|
||||
{
|
||||
if (myResultBuilder != null) {
|
||||
myListeners.addListener(myResultBuilder);
|
||||
// cancel tracker should be executed after result builder
|
||||
myListeners.addListener(new CommandCancelTracker());
|
||||
@@ -160,12 +159,13 @@ public class CommandExecutor {
|
||||
|
||||
private void setupLocale() {
|
||||
String locale = Registry.stringValue("svn.executable.locale");
|
||||
Map<String, String> environment = myCommandLine.getEnvironment();
|
||||
|
||||
// TODO: check if we need to set LC_ALL to configured locale or just clear it
|
||||
environment.put("LC_ALL", "");
|
||||
environment.put("LC_MESSAGES", locale);
|
||||
environment.put("LANG", locale);
|
||||
if (!StringUtil.isEmpty(locale)) {
|
||||
Map<String, String> environment = myCommandLine.getEnvironment();
|
||||
|
||||
environment.put("LANGUAGE", "");
|
||||
environment.put("LC_ALL", locale);
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureMessageFile() throws SvnBindException {
|
||||
@@ -413,7 +413,7 @@ public class CommandExecutor {
|
||||
* @throws IllegalStateException if process has not been started
|
||||
*/
|
||||
protected void checkStarted() {
|
||||
if (! isStarted()) {
|
||||
if (!isStarted()) {
|
||||
throw new IllegalStateException("The process is not started yet");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user