2.08 i18n and chinese | 多语言与中文支持
This commit is contained in:
@@ -97,13 +97,15 @@ public class ConfCacheGetUtils {
|
||||
String[] paths = StringUtils.split(path, '/');
|
||||
String[] confPaths = StringUtils.split(confPath, '/');
|
||||
int length = confPaths.length;
|
||||
String lastFolder = confPaths[length - 2];
|
||||
if (lastFolder.startsWith("-")) {
|
||||
try {
|
||||
int i = Integer.parseInt(lastFolder);
|
||||
length = length + i - 1;
|
||||
} catch (NumberFormatException e) {
|
||||
// ignore
|
||||
if (length > 1) {
|
||||
String lastFolder = confPaths[length - 2];
|
||||
if (lastFolder.startsWith("-")) {
|
||||
try {
|
||||
int i = Integer.parseInt(lastFolder);
|
||||
length = length + i - 1;
|
||||
} catch (NumberFormatException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
if (length > paths.length) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import io.github.linwancen.plugin.show.settings.ShowBundle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -12,6 +13,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
* call ConfCache.loadAll
|
||||
*/
|
||||
public class ReloadExtDocAction extends AnAction {
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
super.update(e);
|
||||
e.getPresentation().setText(ShowBundle.message("reload.ext.doc"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
@Nullable Project project = e.getProject();
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import io.github.linwancen.plugin.show.settings.ShowBundle;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -13,6 +14,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
* <br>Use Reset only for file sort
|
||||
*/
|
||||
public class ResetExtDocAction extends AnAction {
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
super.update(e);
|
||||
e.getPresentation().setText(ShowBundle.message("reset.ext.doc"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
ConfCache.clearAll();
|
||||
|
||||
Reference in New Issue
Block a user