@fresh-editor/fresh-editor 0.1.67 → 0.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +97 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/plugins/audit_mode.i18n.json +380 -0
- package/plugins/audit_mode.ts +836 -68
- package/plugins/buffer_modified.i18n.json +32 -0
- package/plugins/buffer_modified.ts +5 -3
- package/plugins/calculator.i18n.json +44 -0
- package/plugins/calculator.ts +6 -4
- package/plugins/clangd-lsp.ts +2 -0
- package/plugins/clangd_support.i18n.json +104 -0
- package/plugins/clangd_support.ts +18 -16
- package/plugins/color_highlighter.i18n.json +68 -0
- package/plugins/color_highlighter.ts +12 -10
- package/plugins/config-schema.json +28 -145
- package/plugins/csharp-lsp.ts +2 -0
- package/plugins/csharp_support.i18n.json +38 -0
- package/plugins/csharp_support.ts +6 -4
- package/plugins/css-lsp.ts +2 -0
- package/plugins/diagnostics_panel.i18n.json +110 -0
- package/plugins/diagnostics_panel.ts +19 -17
- package/plugins/find_references.i18n.json +128 -0
- package/plugins/find_references.ts +22 -20
- package/plugins/git_blame.i18n.json +230 -0
- package/plugins/git_blame.ts +39 -37
- package/plugins/git_find_file.i18n.json +146 -0
- package/plugins/git_find_file.ts +24 -22
- package/plugins/git_grep.i18n.json +80 -0
- package/plugins/git_grep.ts +15 -13
- package/plugins/git_gutter.i18n.json +44 -0
- package/plugins/git_gutter.ts +7 -5
- package/plugins/git_log.i18n.json +224 -0
- package/plugins/git_log.ts +41 -39
- package/plugins/go-lsp.ts +2 -0
- package/plugins/html-lsp.ts +2 -0
- package/plugins/json-lsp.ts +2 -0
- package/plugins/lib/fresh.d.ts +53 -13
- package/plugins/lib/index.ts +1 -1
- package/plugins/lib/navigation-controller.ts +3 -3
- package/plugins/lib/panel-manager.ts +15 -13
- package/plugins/lib/virtual-buffer-factory.ts +84 -112
- package/plugins/live_grep.i18n.json +80 -0
- package/plugins/live_grep.ts +15 -13
- package/plugins/markdown_compose.i18n.json +104 -0
- package/plugins/markdown_compose.ts +17 -15
- package/plugins/merge_conflict.i18n.json +380 -0
- package/plugins/merge_conflict.ts +72 -73
- package/plugins/path_complete.i18n.json +38 -0
- package/plugins/path_complete.ts +6 -4
- package/plugins/python-lsp.ts +2 -0
- package/plugins/rust-lsp.ts +2 -0
- package/plugins/search_replace.i18n.json +188 -0
- package/plugins/search_replace.ts +31 -29
- package/plugins/test_i18n.i18n.json +12 -0
- package/plugins/test_i18n.ts +18 -0
- package/plugins/theme_editor.i18n.json +1417 -0
- package/plugins/theme_editor.ts +73 -69
- package/plugins/todo_highlighter.i18n.json +86 -0
- package/plugins/todo_highlighter.ts +15 -13
- package/plugins/typescript-lsp.ts +2 -0
- package/plugins/vi_mode.i18n.json +716 -0
- package/plugins/vi_mode.ts +1195 -78
- package/plugins/welcome.i18n.json +110 -0
- package/plugins/welcome.ts +18 -16
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"$ref": "#/$defs/ThemeOptions",
|
|
17
17
|
"default": "high-contrast"
|
|
18
18
|
},
|
|
19
|
+
"locale": {
|
|
20
|
+
"description": "UI locale (language) for translations\nIf not set, auto-detected from environment (LC_ALL, LC_MESSAGES, LANG)",
|
|
21
|
+
"$ref": "#/$defs/LocaleOptions",
|
|
22
|
+
"default": null
|
|
23
|
+
},
|
|
19
24
|
"check_for_updates": {
|
|
20
25
|
"description": "Check for new versions on quit (default: true)",
|
|
21
26
|
"type": "boolean",
|
|
@@ -111,10 +116,6 @@
|
|
|
111
116
|
},
|
|
112
117
|
"default": {}
|
|
113
118
|
},
|
|
114
|
-
"menu": {
|
|
115
|
-
"description": "Menu bar configuration",
|
|
116
|
-
"$ref": "#/$defs/MenuConfig"
|
|
117
|
-
},
|
|
118
119
|
"warnings": {
|
|
119
120
|
"description": "Warning notification settings",
|
|
120
121
|
"$ref": "#/$defs/WarningsConfig",
|
|
@@ -134,6 +135,24 @@
|
|
|
134
135
|
"nostalgia"
|
|
135
136
|
]
|
|
136
137
|
},
|
|
138
|
+
"LocaleOptions": {
|
|
139
|
+
"description": "UI locale (language). Use null for auto-detection from environment.",
|
|
140
|
+
"enum": [
|
|
141
|
+
null,
|
|
142
|
+
"cs",
|
|
143
|
+
"de",
|
|
144
|
+
"en",
|
|
145
|
+
"es",
|
|
146
|
+
"fr",
|
|
147
|
+
"ja",
|
|
148
|
+
"ko",
|
|
149
|
+
"pt-BR",
|
|
150
|
+
"ru",
|
|
151
|
+
"th",
|
|
152
|
+
"uk",
|
|
153
|
+
"zh-CN"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
137
156
|
"EditorConfig": {
|
|
138
157
|
"description": "Editor behavior configuration",
|
|
139
158
|
"type": "object",
|
|
@@ -449,7 +468,8 @@
|
|
|
449
468
|
"enum": [
|
|
450
469
|
"default",
|
|
451
470
|
"emacs",
|
|
452
|
-
"vscode"
|
|
471
|
+
"vscode",
|
|
472
|
+
"macos"
|
|
453
473
|
]
|
|
454
474
|
},
|
|
455
475
|
"LanguageConfig": {
|
|
@@ -657,8 +677,9 @@
|
|
|
657
677
|
"type": "object",
|
|
658
678
|
"properties": {
|
|
659
679
|
"command": {
|
|
660
|
-
"description": "Command to spawn the server",
|
|
661
|
-
"type": "string"
|
|
680
|
+
"description": "Command to spawn the server.\nRequired when enabled=true, ignored when enabled=false.",
|
|
681
|
+
"type": "string",
|
|
682
|
+
"default": ""
|
|
662
683
|
},
|
|
663
684
|
"args": {
|
|
664
685
|
"description": "Arguments to pass to the server",
|
|
@@ -692,9 +713,6 @@
|
|
|
692
713
|
"default": null
|
|
693
714
|
}
|
|
694
715
|
},
|
|
695
|
-
"required": [
|
|
696
|
-
"command"
|
|
697
|
-
],
|
|
698
716
|
"x-display-field": "/command"
|
|
699
717
|
},
|
|
700
718
|
"ProcessLimits": {
|
|
@@ -728,141 +746,6 @@
|
|
|
728
746
|
}
|
|
729
747
|
}
|
|
730
748
|
},
|
|
731
|
-
"MenuConfig": {
|
|
732
|
-
"description": "Menu bar configuration",
|
|
733
|
-
"type": "object",
|
|
734
|
-
"properties": {
|
|
735
|
-
"menus": {
|
|
736
|
-
"description": "List of top-level menus in the menu bar",
|
|
737
|
-
"type": "array",
|
|
738
|
-
"items": {
|
|
739
|
-
"$ref": "#/$defs/Menu"
|
|
740
|
-
},
|
|
741
|
-
"default": []
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
},
|
|
745
|
-
"Menu": {
|
|
746
|
-
"description": "A top-level menu in the menu bar",
|
|
747
|
-
"type": "object",
|
|
748
|
-
"properties": {
|
|
749
|
-
"label": {
|
|
750
|
-
"description": "Display label for the menu (e.g., \"File\", \"Edit\")",
|
|
751
|
-
"type": "string"
|
|
752
|
-
},
|
|
753
|
-
"items": {
|
|
754
|
-
"description": "Menu items (actions, separators, or submenus)",
|
|
755
|
-
"type": "array",
|
|
756
|
-
"items": {
|
|
757
|
-
"$ref": "#/$defs/MenuItem"
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
},
|
|
761
|
-
"required": [
|
|
762
|
-
"label",
|
|
763
|
-
"items"
|
|
764
|
-
]
|
|
765
|
-
},
|
|
766
|
-
"MenuItem": {
|
|
767
|
-
"description": "A menu item (action, separator, or submenu)",
|
|
768
|
-
"anyOf": [
|
|
769
|
-
{
|
|
770
|
-
"description": "A separator line",
|
|
771
|
-
"type": "object",
|
|
772
|
-
"properties": {
|
|
773
|
-
"separator": {
|
|
774
|
-
"type": "boolean"
|
|
775
|
-
}
|
|
776
|
-
},
|
|
777
|
-
"required": [
|
|
778
|
-
"separator"
|
|
779
|
-
]
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
"description": "An action item",
|
|
783
|
-
"type": "object",
|
|
784
|
-
"properties": {
|
|
785
|
-
"label": {
|
|
786
|
-
"type": "string"
|
|
787
|
-
},
|
|
788
|
-
"action": {
|
|
789
|
-
"type": "string"
|
|
790
|
-
},
|
|
791
|
-
"args": {
|
|
792
|
-
"type": "object",
|
|
793
|
-
"additionalProperties": true,
|
|
794
|
-
"default": {}
|
|
795
|
-
},
|
|
796
|
-
"when": {
|
|
797
|
-
"type": [
|
|
798
|
-
"string",
|
|
799
|
-
"null"
|
|
800
|
-
],
|
|
801
|
-
"default": null
|
|
802
|
-
},
|
|
803
|
-
"checkbox": {
|
|
804
|
-
"description": "Checkbox state condition (e.g., \"line_numbers\", \"line_wrap\")",
|
|
805
|
-
"type": [
|
|
806
|
-
"string",
|
|
807
|
-
"null"
|
|
808
|
-
],
|
|
809
|
-
"default": null
|
|
810
|
-
}
|
|
811
|
-
},
|
|
812
|
-
"required": [
|
|
813
|
-
"label",
|
|
814
|
-
"action"
|
|
815
|
-
]
|
|
816
|
-
},
|
|
817
|
-
{
|
|
818
|
-
"description": "A submenu (for future extensibility)",
|
|
819
|
-
"type": "object",
|
|
820
|
-
"properties": {
|
|
821
|
-
"label": {
|
|
822
|
-
"type": "string"
|
|
823
|
-
},
|
|
824
|
-
"items": {
|
|
825
|
-
"type": "array",
|
|
826
|
-
"items": {
|
|
827
|
-
"$ref": "#/$defs/MenuItem"
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
"required": [
|
|
832
|
-
"label",
|
|
833
|
-
"items"
|
|
834
|
-
]
|
|
835
|
-
},
|
|
836
|
-
{
|
|
837
|
-
"description": "A dynamic submenu whose items are generated at runtime\nThe `source` field specifies what to generate (e.g., \"themes\")",
|
|
838
|
-
"type": "object",
|
|
839
|
-
"properties": {
|
|
840
|
-
"label": {
|
|
841
|
-
"type": "string"
|
|
842
|
-
},
|
|
843
|
-
"source": {
|
|
844
|
-
"type": "string"
|
|
845
|
-
}
|
|
846
|
-
},
|
|
847
|
-
"required": [
|
|
848
|
-
"label",
|
|
849
|
-
"source"
|
|
850
|
-
]
|
|
851
|
-
},
|
|
852
|
-
{
|
|
853
|
-
"description": "A disabled info label (no action)",
|
|
854
|
-
"type": "object",
|
|
855
|
-
"properties": {
|
|
856
|
-
"info": {
|
|
857
|
-
"type": "string"
|
|
858
|
-
}
|
|
859
|
-
},
|
|
860
|
-
"required": [
|
|
861
|
-
"info"
|
|
862
|
-
]
|
|
863
|
-
}
|
|
864
|
-
]
|
|
865
|
-
},
|
|
866
749
|
"WarningsConfig": {
|
|
867
750
|
"description": "Warning notification configuration",
|
|
868
751
|
"type": "object",
|
package/plugins/csharp-lsp.ts
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"status.restoring_packages": "Restoring NuGet packages for {project}...",
|
|
4
|
+
"status.restore_completed": "NuGet restore completed for {project}",
|
|
5
|
+
"status.restore_failed": "NuGet restore failed: {error}",
|
|
6
|
+
"status.restore_error": "NuGet restore error: {error}"
|
|
7
|
+
},
|
|
8
|
+
"es": {
|
|
9
|
+
"status.restoring_packages": "Restaurando paquetes NuGet para {project}...",
|
|
10
|
+
"status.restore_completed": "Restauracion de NuGet completada para {project}",
|
|
11
|
+
"status.restore_failed": "Restauracion de NuGet fallida: {error}",
|
|
12
|
+
"status.restore_error": "Error de restauracion de NuGet: {error}"
|
|
13
|
+
},
|
|
14
|
+
"de": {
|
|
15
|
+
"status.restoring_packages": "NuGet-Pakete werden fur {project} wiederhergestellt...",
|
|
16
|
+
"status.restore_completed": "NuGet-Wiederherstellung fur {project} abgeschlossen",
|
|
17
|
+
"status.restore_failed": "NuGet-Wiederherstellung fehlgeschlagen: {error}",
|
|
18
|
+
"status.restore_error": "NuGet-Wiederherstellungsfehler: {error}"
|
|
19
|
+
},
|
|
20
|
+
"fr": {
|
|
21
|
+
"status.restoring_packages": "Restauration des paquets NuGet pour {project}...",
|
|
22
|
+
"status.restore_completed": "Restauration NuGet terminee pour {project}",
|
|
23
|
+
"status.restore_failed": "Echec de la restauration NuGet: {error}",
|
|
24
|
+
"status.restore_error": "Erreur de restauration NuGet: {error}"
|
|
25
|
+
},
|
|
26
|
+
"ja": {
|
|
27
|
+
"status.restoring_packages": "{project}のNuGetパッケージを復元中...",
|
|
28
|
+
"status.restore_completed": "{project}のNuGet復元が完了しました",
|
|
29
|
+
"status.restore_failed": "NuGet復元に失敗しました: {error}",
|
|
30
|
+
"status.restore_error": "NuGet復元エラー: {error}"
|
|
31
|
+
},
|
|
32
|
+
"zh": {
|
|
33
|
+
"status.restoring_packages": "正在为{project}恢复NuGet包...",
|
|
34
|
+
"status.restore_completed": "{project}的NuGet恢复已完成",
|
|
35
|
+
"status.restore_failed": "NuGet恢复失败: {error}",
|
|
36
|
+
"status.restore_error": "NuGet恢复错误: {error}"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference path="./lib/fresh.d.ts" />
|
|
2
|
+
const editor = getEditor();
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* C# Language Server Support Plugin
|
|
@@ -65,22 +67,22 @@ async function restoreProject(projectPath: string): Promise<void> {
|
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
editor.setStatus(
|
|
70
|
+
editor.setStatus(editor.t("status.restoring_packages", { project: projectPath }));
|
|
69
71
|
editor.debug(`csharp_support: Running dotnet restore for ${projectPath}`);
|
|
70
72
|
|
|
71
73
|
try {
|
|
72
74
|
const result = await editor.spawnProcess("dotnet", ["restore", projectPath]);
|
|
73
75
|
|
|
74
76
|
if (result.exit_code === 0) {
|
|
75
|
-
editor.setStatus(
|
|
77
|
+
editor.setStatus(editor.t("status.restore_completed", { project: projectPath }));
|
|
76
78
|
editor.debug(`csharp_support: dotnet restore succeeded`);
|
|
77
79
|
} else {
|
|
78
|
-
editor.setStatus(
|
|
80
|
+
editor.setStatus(editor.t("status.restore_failed", { error: result.stderr }));
|
|
79
81
|
editor.debug(`csharp_support: dotnet restore failed: ${result.stderr}`);
|
|
80
82
|
}
|
|
81
83
|
} catch (e) {
|
|
82
84
|
const err = e instanceof Error ? e : new Error(String(e));
|
|
83
|
-
editor.setStatus(
|
|
85
|
+
editor.setStatus(editor.t("status.restore_error", { error: err.message }));
|
|
84
86
|
editor.debug(`csharp_support: dotnet restore error: ${err.message}`);
|
|
85
87
|
}
|
|
86
88
|
}
|
package/plugins/css-lsp.ts
CHANGED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"cmd.show_diagnostics_panel": "Show Diagnostics Panel",
|
|
4
|
+
"cmd.show_diagnostics_panel_desc": "Open the diagnostics panel",
|
|
5
|
+
"cmd.toggle_diagnostics_panel": "Toggle Diagnostics Panel",
|
|
6
|
+
"cmd.toggle_diagnostics_panel_desc": "Toggle the diagnostics panel",
|
|
7
|
+
"status.loaded": "Diagnostics Panel plugin loaded",
|
|
8
|
+
"status.failed_to_open": "Failed to open diagnostics panel",
|
|
9
|
+
"status.closed": "Diagnostics panel closed",
|
|
10
|
+
"status.jumped_to": "Jumped to {file}:{line}",
|
|
11
|
+
"status.move_to_diagnostic": "Move cursor to a diagnostic line",
|
|
12
|
+
"status.showing": "Showing: {label}",
|
|
13
|
+
"status.refreshed": "Diagnostics refreshed",
|
|
14
|
+
"status.diagnostics_count": "Diagnostics: {count} items | a: toggle filter | RET: goto | q: close",
|
|
15
|
+
"panel.header": "Diagnostics ({filter}):",
|
|
16
|
+
"panel.no_diagnostics": "No diagnostics",
|
|
17
|
+
"panel.all_files": "All Files",
|
|
18
|
+
"panel.current_file": "Current File"
|
|
19
|
+
},
|
|
20
|
+
"es": {
|
|
21
|
+
"cmd.show_diagnostics_panel": "Mostrar Panel de Diagnosticos",
|
|
22
|
+
"cmd.show_diagnostics_panel_desc": "Abrir el panel de diagnosticos",
|
|
23
|
+
"cmd.toggle_diagnostics_panel": "Alternar Panel de Diagnosticos",
|
|
24
|
+
"cmd.toggle_diagnostics_panel_desc": "Alternar el panel de diagnosticos",
|
|
25
|
+
"status.loaded": "Plugin de Panel de Diagnosticos cargado",
|
|
26
|
+
"status.failed_to_open": "Error al abrir el panel de diagnosticos",
|
|
27
|
+
"status.closed": "Panel de diagnosticos cerrado",
|
|
28
|
+
"status.jumped_to": "Salto a {file}:{line}",
|
|
29
|
+
"status.move_to_diagnostic": "Mueve el cursor a una linea de diagnostico",
|
|
30
|
+
"status.showing": "Mostrando: {label}",
|
|
31
|
+
"status.refreshed": "Diagnosticos actualizados",
|
|
32
|
+
"status.diagnostics_count": "Diagnosticos: {count} elementos | a: alternar filtro | RET: ir | q: cerrar",
|
|
33
|
+
"panel.header": "Diagnosticos ({filter}):",
|
|
34
|
+
"panel.no_diagnostics": "Sin diagnosticos",
|
|
35
|
+
"panel.all_files": "Todos los Archivos",
|
|
36
|
+
"panel.current_file": "Archivo Actual"
|
|
37
|
+
},
|
|
38
|
+
"de": {
|
|
39
|
+
"cmd.show_diagnostics_panel": "Diagnose-Panel anzeigen",
|
|
40
|
+
"cmd.show_diagnostics_panel_desc": "Das Diagnose-Panel offnen",
|
|
41
|
+
"cmd.toggle_diagnostics_panel": "Diagnose-Panel umschalten",
|
|
42
|
+
"cmd.toggle_diagnostics_panel_desc": "Das Diagnose-Panel umschalten",
|
|
43
|
+
"status.loaded": "Diagnose-Panel Plugin geladen",
|
|
44
|
+
"status.failed_to_open": "Diagnose-Panel konnte nicht geoffnet werden",
|
|
45
|
+
"status.closed": "Diagnose-Panel geschlossen",
|
|
46
|
+
"status.jumped_to": "Gesprungen zu {file}:{line}",
|
|
47
|
+
"status.move_to_diagnostic": "Cursor zu einer Diagnosezeile bewegen",
|
|
48
|
+
"status.showing": "Anzeige: {label}",
|
|
49
|
+
"status.refreshed": "Diagnosen aktualisiert",
|
|
50
|
+
"status.diagnostics_count": "Diagnosen: {count} Elemente | a: Filter umschalten | RET: gehe zu | q: schliessen",
|
|
51
|
+
"panel.header": "Diagnosen ({filter}):",
|
|
52
|
+
"panel.no_diagnostics": "Keine Diagnosen",
|
|
53
|
+
"panel.all_files": "Alle Dateien",
|
|
54
|
+
"panel.current_file": "Aktuelle Datei"
|
|
55
|
+
},
|
|
56
|
+
"fr": {
|
|
57
|
+
"cmd.show_diagnostics_panel": "Afficher le Panneau de Diagnostics",
|
|
58
|
+
"cmd.show_diagnostics_panel_desc": "Ouvrir le panneau de diagnostics",
|
|
59
|
+
"cmd.toggle_diagnostics_panel": "Basculer le Panneau de Diagnostics",
|
|
60
|
+
"cmd.toggle_diagnostics_panel_desc": "Basculer le panneau de diagnostics",
|
|
61
|
+
"status.loaded": "Plugin du Panneau de Diagnostics charge",
|
|
62
|
+
"status.failed_to_open": "Echec de l'ouverture du panneau de diagnostics",
|
|
63
|
+
"status.closed": "Panneau de diagnostics ferme",
|
|
64
|
+
"status.jumped_to": "Saute vers {file}:{line}",
|
|
65
|
+
"status.move_to_diagnostic": "Deplacez le curseur vers une ligne de diagnostic",
|
|
66
|
+
"status.showing": "Affichage: {label}",
|
|
67
|
+
"status.refreshed": "Diagnostics actualises",
|
|
68
|
+
"status.diagnostics_count": "Diagnostics: {count} elements | a: basculer filtre | RET: aller | q: fermer",
|
|
69
|
+
"panel.header": "Diagnostics ({filter}):",
|
|
70
|
+
"panel.no_diagnostics": "Aucun diagnostic",
|
|
71
|
+
"panel.all_files": "Tous les Fichiers",
|
|
72
|
+
"panel.current_file": "Fichier Actuel"
|
|
73
|
+
},
|
|
74
|
+
"ja": {
|
|
75
|
+
"cmd.show_diagnostics_panel": "診断パネルを表示",
|
|
76
|
+
"cmd.show_diagnostics_panel_desc": "診断パネルを開く",
|
|
77
|
+
"cmd.toggle_diagnostics_panel": "診断パネルを切り替え",
|
|
78
|
+
"cmd.toggle_diagnostics_panel_desc": "診断パネルの表示を切り替える",
|
|
79
|
+
"status.loaded": "診断パネルプラグインが読み込まれました",
|
|
80
|
+
"status.failed_to_open": "診断パネルを開けませんでした",
|
|
81
|
+
"status.closed": "診断パネルを閉じました",
|
|
82
|
+
"status.jumped_to": "{file}:{line} にジャンプしました",
|
|
83
|
+
"status.move_to_diagnostic": "診断行にカーソルを移動してください",
|
|
84
|
+
"status.showing": "表示中: {label}",
|
|
85
|
+
"status.refreshed": "診断が更新されました",
|
|
86
|
+
"status.diagnostics_count": "診断: {count} 件 | a: フィルター切替 | RET: 移動 | q: 閉じる",
|
|
87
|
+
"panel.header": "診断 ({filter}):",
|
|
88
|
+
"panel.no_diagnostics": "診断なし",
|
|
89
|
+
"panel.all_files": "全てのファイル",
|
|
90
|
+
"panel.current_file": "現在のファイル"
|
|
91
|
+
},
|
|
92
|
+
"zh": {
|
|
93
|
+
"cmd.show_diagnostics_panel": "显示诊断面板",
|
|
94
|
+
"cmd.show_diagnostics_panel_desc": "打开诊断面板",
|
|
95
|
+
"cmd.toggle_diagnostics_panel": "切换诊断面板",
|
|
96
|
+
"cmd.toggle_diagnostics_panel_desc": "切换诊断面板显示",
|
|
97
|
+
"status.loaded": "诊断面板插件已加载",
|
|
98
|
+
"status.failed_to_open": "无法打开诊断面板",
|
|
99
|
+
"status.closed": "诊断面板已关闭",
|
|
100
|
+
"status.jumped_to": "跳转到 {file}:{line}",
|
|
101
|
+
"status.move_to_diagnostic": "请将光标移动到诊断行",
|
|
102
|
+
"status.showing": "显示: {label}",
|
|
103
|
+
"status.refreshed": "诊断已刷新",
|
|
104
|
+
"status.diagnostics_count": "诊断: {count} 项 | a: 切换过滤 | RET: 跳转 | q: 关闭",
|
|
105
|
+
"panel.header": "诊断 ({filter}):",
|
|
106
|
+
"panel.no_diagnostics": "无诊断信息",
|
|
107
|
+
"panel.all_files": "所有文件",
|
|
108
|
+
"panel.current_file": "当前文件"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference path="./lib/fresh.d.ts" />
|
|
2
|
+
const editor = getEditor();
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Diagnostics Panel Plugin
|
|
@@ -185,15 +187,15 @@ function buildPanelEntries(): TextPropertyEntry[] {
|
|
|
185
187
|
// Header (line 2)
|
|
186
188
|
let filterLabel: string;
|
|
187
189
|
if (state.showAllFiles) {
|
|
188
|
-
filterLabel = "
|
|
190
|
+
filterLabel = editor.t("panel.all_files");
|
|
189
191
|
} else if (activeUri) {
|
|
190
192
|
const fileName = editor.pathBasename(uriToPath(activeUri));
|
|
191
193
|
filterLabel = fileName;
|
|
192
194
|
} else {
|
|
193
|
-
filterLabel = "
|
|
195
|
+
filterLabel = editor.t("panel.current_file");
|
|
194
196
|
}
|
|
195
197
|
entries.push({
|
|
196
|
-
text:
|
|
198
|
+
text: editor.t("panel.header", { filter: filterLabel }) + "\n",
|
|
197
199
|
properties: { type: "header" },
|
|
198
200
|
});
|
|
199
201
|
|
|
@@ -201,7 +203,7 @@ function buildPanelEntries(): TextPropertyEntry[] {
|
|
|
201
203
|
|
|
202
204
|
if (filtered.length === 0) {
|
|
203
205
|
entries.push({
|
|
204
|
-
text: "
|
|
206
|
+
text: " " + editor.t("panel.no_diagnostics") + "\n",
|
|
205
207
|
properties: { type: "empty" },
|
|
206
208
|
});
|
|
207
209
|
currentPanelLine++;
|
|
@@ -424,11 +426,11 @@ globalThis.show_diagnostics_panel = async function(): Promise<void> {
|
|
|
424
426
|
applyHighlighting();
|
|
425
427
|
|
|
426
428
|
const diagnostics = editor.getAllDiagnostics();
|
|
427
|
-
editor.setStatus(
|
|
429
|
+
editor.setStatus(editor.t("status.diagnostics_count", { count: String(diagnostics.length) }));
|
|
428
430
|
} else {
|
|
429
431
|
state.sourceSplitId = null;
|
|
430
432
|
state.sourceBufferId = null;
|
|
431
|
-
editor.setStatus("
|
|
433
|
+
editor.setStatus(editor.t("status.failed_to_open"));
|
|
432
434
|
}
|
|
433
435
|
};
|
|
434
436
|
|
|
@@ -470,7 +472,7 @@ globalThis.diagnostics_close = function(): void {
|
|
|
470
472
|
editor.focusSplit(sourceSplitId);
|
|
471
473
|
}
|
|
472
474
|
|
|
473
|
-
editor.setStatus("
|
|
475
|
+
editor.setStatus(editor.t("status.closed"));
|
|
474
476
|
};
|
|
475
477
|
|
|
476
478
|
globalThis.diagnostics_goto = function(): void {
|
|
@@ -490,12 +492,12 @@ globalThis.diagnostics_goto = function(): void {
|
|
|
490
492
|
editor.focusSplit(state.sourceSplitId);
|
|
491
493
|
}
|
|
492
494
|
editor.openFile(file, line, col);
|
|
493
|
-
editor.setStatus(
|
|
495
|
+
editor.setStatus(editor.t("status.jumped_to", { file: editor.pathBasename(file), line: String(line) }));
|
|
494
496
|
return;
|
|
495
497
|
}
|
|
496
498
|
}
|
|
497
499
|
|
|
498
|
-
editor.setStatus("
|
|
500
|
+
editor.setStatus(editor.t("status.move_to_diagnostic"));
|
|
499
501
|
};
|
|
500
502
|
|
|
501
503
|
globalThis.diagnostics_toggle_all = function(): void {
|
|
@@ -504,15 +506,15 @@ globalThis.diagnostics_toggle_all = function(): void {
|
|
|
504
506
|
state.showAllFiles = !state.showAllFiles;
|
|
505
507
|
updatePanel();
|
|
506
508
|
|
|
507
|
-
const label = state.showAllFiles ? "
|
|
508
|
-
editor.setStatus(
|
|
509
|
+
const label = state.showAllFiles ? editor.t("panel.all_files") : editor.t("panel.current_file");
|
|
510
|
+
editor.setStatus(editor.t("status.showing", { label }));
|
|
509
511
|
};
|
|
510
512
|
|
|
511
513
|
globalThis.diagnostics_refresh = function(): void {
|
|
512
514
|
if (!state.isOpen) return;
|
|
513
515
|
|
|
514
516
|
updatePanel();
|
|
515
|
-
editor.setStatus("
|
|
517
|
+
editor.setStatus(editor.t("status.refreshed"));
|
|
516
518
|
};
|
|
517
519
|
|
|
518
520
|
globalThis.toggle_diagnostics_panel = function(): void {
|
|
@@ -619,15 +621,15 @@ editor.on("buffer_activated", "on_diagnostics_buffer_activated");
|
|
|
619
621
|
// =============================================================================
|
|
620
622
|
|
|
621
623
|
editor.registerCommand(
|
|
622
|
-
"
|
|
623
|
-
"
|
|
624
|
+
"%cmd.show_diagnostics_panel",
|
|
625
|
+
"%cmd.show_diagnostics_panel_desc",
|
|
624
626
|
"show_diagnostics_panel",
|
|
625
627
|
"normal"
|
|
626
628
|
);
|
|
627
629
|
|
|
628
630
|
editor.registerCommand(
|
|
629
|
-
"
|
|
630
|
-
"
|
|
631
|
+
"%cmd.toggle_diagnostics_panel",
|
|
632
|
+
"%cmd.toggle_diagnostics_panel_desc",
|
|
631
633
|
"toggle_diagnostics_panel",
|
|
632
634
|
"normal"
|
|
633
635
|
);
|
|
@@ -636,5 +638,5 @@ editor.registerCommand(
|
|
|
636
638
|
// Initialization
|
|
637
639
|
// =============================================================================
|
|
638
640
|
|
|
639
|
-
editor.setStatus("
|
|
641
|
+
editor.setStatus(editor.t("status.loaded"));
|
|
640
642
|
editor.debug("Diagnostics Panel plugin initialized");
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"en": {
|
|
3
|
+
"cmd.show_references": "Show References Panel",
|
|
4
|
+
"cmd.show_references_desc": "Display current references",
|
|
5
|
+
"cmd.hide_references": "Hide References Panel",
|
|
6
|
+
"cmd.hide_references_desc": "Close the references panel",
|
|
7
|
+
"status.ready": "Find References plugin loaded",
|
|
8
|
+
"status.no_references": "No references found for '{symbol}'",
|
|
9
|
+
"status.found_references": "Found {count} reference(s){limit} - Up/Down navigate, RET jump, q close",
|
|
10
|
+
"status.showing_first": " (showing first {max})",
|
|
11
|
+
"status.reference_index": "Reference {current}/{total}",
|
|
12
|
+
"status.jumped_to": "Jumped to {file}:{line}",
|
|
13
|
+
"status.no_references_to_jump": "No references to jump to",
|
|
14
|
+
"status.source_split_unavailable": "Source split not available",
|
|
15
|
+
"status.move_cursor": "Move cursor to a reference line",
|
|
16
|
+
"status.closed": "References panel closed",
|
|
17
|
+
"status.failed_open_panel": "Failed to open references panel",
|
|
18
|
+
"panel.header": "References to {symbol} ({count}{limit})",
|
|
19
|
+
"panel.limited": ", limited to {max}",
|
|
20
|
+
"panel.no_references": "No references found",
|
|
21
|
+
"panel.help": "[Up/Down] navigate [RET] jump [q/Esc] close"
|
|
22
|
+
},
|
|
23
|
+
"es": {
|
|
24
|
+
"cmd.show_references": "Mostrar Panel de Referencias",
|
|
25
|
+
"cmd.show_references_desc": "Mostrar las referencias actuales",
|
|
26
|
+
"cmd.hide_references": "Ocultar Panel de Referencias",
|
|
27
|
+
"cmd.hide_references_desc": "Cerrar el panel de referencias",
|
|
28
|
+
"status.ready": "Plugin Buscar Referencias cargado",
|
|
29
|
+
"status.no_references": "No se encontraron referencias para '{symbol}'",
|
|
30
|
+
"status.found_references": "Se encontraron {count} referencia(s){limit} - Arriba/Abajo navegar, RET saltar, q cerrar",
|
|
31
|
+
"status.showing_first": " (mostrando primeros {max})",
|
|
32
|
+
"status.reference_index": "Referencia {current}/{total}",
|
|
33
|
+
"status.jumped_to": "Saltó a {file}:{line}",
|
|
34
|
+
"status.no_references_to_jump": "No hay referencias a las que saltar",
|
|
35
|
+
"status.source_split_unavailable": "División de origen no disponible",
|
|
36
|
+
"status.move_cursor": "Mueve el cursor a una línea de referencia",
|
|
37
|
+
"status.closed": "Panel de referencias cerrado",
|
|
38
|
+
"status.failed_open_panel": "Error al abrir el panel de referencias",
|
|
39
|
+
"panel.header": "Referencias a {symbol} ({count}{limit})",
|
|
40
|
+
"panel.limited": ", limitado a {max}",
|
|
41
|
+
"panel.no_references": "No se encontraron referencias",
|
|
42
|
+
"panel.help": "[Arriba/Abajo] navegar [RET] saltar [q/Esc] cerrar"
|
|
43
|
+
},
|
|
44
|
+
"de": {
|
|
45
|
+
"cmd.show_references": "Referenzen-Panel anzeigen",
|
|
46
|
+
"cmd.show_references_desc": "Aktuelle Referenzen anzeigen",
|
|
47
|
+
"cmd.hide_references": "Referenzen-Panel ausblenden",
|
|
48
|
+
"cmd.hide_references_desc": "Das Referenzen-Panel schließen",
|
|
49
|
+
"status.ready": "Referenzen-Plugin geladen",
|
|
50
|
+
"status.no_references": "Keine Referenzen für '{symbol}' gefunden",
|
|
51
|
+
"status.found_references": "{count} Referenz(en) gefunden{limit} - Auf/Ab navigieren, RET springen, q schließen",
|
|
52
|
+
"status.showing_first": " (zeige erste {max})",
|
|
53
|
+
"status.reference_index": "Referenz {current}/{total}",
|
|
54
|
+
"status.jumped_to": "Gesprungen zu {file}:{line}",
|
|
55
|
+
"status.no_references_to_jump": "Keine Referenzen zum Springen",
|
|
56
|
+
"status.source_split_unavailable": "Quell-Split nicht verfügbar",
|
|
57
|
+
"status.move_cursor": "Cursor auf eine Referenzzeile bewegen",
|
|
58
|
+
"status.closed": "Referenzen-Panel geschlossen",
|
|
59
|
+
"status.failed_open_panel": "Fehler beim Öffnen des Referenzen-Panels",
|
|
60
|
+
"panel.header": "Referenzen zu {symbol} ({count}{limit})",
|
|
61
|
+
"panel.limited": ", begrenzt auf {max}",
|
|
62
|
+
"panel.no_references": "Keine Referenzen gefunden",
|
|
63
|
+
"panel.help": "[Auf/Ab] navigieren [RET] springen [q/Esc] schließen"
|
|
64
|
+
},
|
|
65
|
+
"fr": {
|
|
66
|
+
"cmd.show_references": "Afficher le panneau des références",
|
|
67
|
+
"cmd.show_references_desc": "Afficher les références actuelles",
|
|
68
|
+
"cmd.hide_references": "Masquer le panneau des références",
|
|
69
|
+
"cmd.hide_references_desc": "Fermer le panneau des références",
|
|
70
|
+
"status.ready": "Plugin Trouver les Références chargé",
|
|
71
|
+
"status.no_references": "Aucune référence trouvée pour '{symbol}'",
|
|
72
|
+
"status.found_references": "{count} référence(s) trouvée(s){limit} - Haut/Bas naviguer, RET sauter, q fermer",
|
|
73
|
+
"status.showing_first": " (affichage des {max} premiers)",
|
|
74
|
+
"status.reference_index": "Référence {current}/{total}",
|
|
75
|
+
"status.jumped_to": "Sauté à {file}:{line}",
|
|
76
|
+
"status.no_references_to_jump": "Aucune référence vers laquelle sauter",
|
|
77
|
+
"status.source_split_unavailable": "Panneau source non disponible",
|
|
78
|
+
"status.move_cursor": "Déplacez le curseur sur une ligne de référence",
|
|
79
|
+
"status.closed": "Panneau des références fermé",
|
|
80
|
+
"status.failed_open_panel": "Échec de l'ouverture du panneau des références",
|
|
81
|
+
"panel.header": "Références à {symbol} ({count}{limit})",
|
|
82
|
+
"panel.limited": ", limité à {max}",
|
|
83
|
+
"panel.no_references": "Aucune référence trouvée",
|
|
84
|
+
"panel.help": "[Haut/Bas] naviguer [RET] sauter [q/Esc] fermer"
|
|
85
|
+
},
|
|
86
|
+
"ja": {
|
|
87
|
+
"cmd.show_references": "参照パネルを表示",
|
|
88
|
+
"cmd.show_references_desc": "現在の参照を表示",
|
|
89
|
+
"cmd.hide_references": "参照パネルを非表示",
|
|
90
|
+
"cmd.hide_references_desc": "参照パネルを閉じる",
|
|
91
|
+
"status.ready": "参照検索プラグインが読み込まれました",
|
|
92
|
+
"status.no_references": "'{symbol}' の参照が見つかりません",
|
|
93
|
+
"status.found_references": "{count} 件の参照が見つかりました{limit} - 上/下で移動、RETでジャンプ、qで閉じる",
|
|
94
|
+
"status.showing_first": " (最初の {max} 件を表示)",
|
|
95
|
+
"status.reference_index": "参照 {current}/{total}",
|
|
96
|
+
"status.jumped_to": "{file}:{line} にジャンプしました",
|
|
97
|
+
"status.no_references_to_jump": "ジャンプする参照がありません",
|
|
98
|
+
"status.source_split_unavailable": "ソース分割が利用できません",
|
|
99
|
+
"status.move_cursor": "カーソルを参照行に移動してください",
|
|
100
|
+
"status.closed": "参照パネルを閉じました",
|
|
101
|
+
"status.failed_open_panel": "参照パネルを開けませんでした",
|
|
102
|
+
"panel.header": "{symbol} への参照 ({count}{limit})",
|
|
103
|
+
"panel.limited": "、最大 {max} 件",
|
|
104
|
+
"panel.no_references": "参照が見つかりません",
|
|
105
|
+
"panel.help": "[上/下] 移動 [RET] ジャンプ [q/Esc] 閉じる"
|
|
106
|
+
},
|
|
107
|
+
"zh": {
|
|
108
|
+
"cmd.show_references": "显示引用面板",
|
|
109
|
+
"cmd.show_references_desc": "显示当前引用",
|
|
110
|
+
"cmd.hide_references": "隐藏引用面板",
|
|
111
|
+
"cmd.hide_references_desc": "关闭引用面板",
|
|
112
|
+
"status.ready": "查找引用插件已加载",
|
|
113
|
+
"status.no_references": "未找到 '{symbol}' 的引用",
|
|
114
|
+
"status.found_references": "找到 {count} 个引用{limit} - 上/下导航,回车跳转,q 关闭",
|
|
115
|
+
"status.showing_first": " (显示前 {max} 个)",
|
|
116
|
+
"status.reference_index": "引用 {current}/{total}",
|
|
117
|
+
"status.jumped_to": "跳转到 {file}:{line}",
|
|
118
|
+
"status.no_references_to_jump": "没有可跳转的引用",
|
|
119
|
+
"status.source_split_unavailable": "源分割不可用",
|
|
120
|
+
"status.move_cursor": "将光标移动到引用行",
|
|
121
|
+
"status.closed": "引用面板已关闭",
|
|
122
|
+
"status.failed_open_panel": "无法打开引用面板",
|
|
123
|
+
"panel.header": "{symbol} 的引用 ({count}{limit})",
|
|
124
|
+
"panel.limited": ",限制为 {max}",
|
|
125
|
+
"panel.no_references": "未找到引用",
|
|
126
|
+
"panel.help": "[上/下] 导航 [回车] 跳转 [q/Esc] 关闭"
|
|
127
|
+
}
|
|
128
|
+
}
|