File tree Expand file tree Collapse file tree 6 files changed +62
-5
lines changed Expand file tree Collapse file tree 6 files changed +62
-5
lines changed Original file line number Diff line number Diff line change 99    // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 
1010    "typescript.tsc.autoDetect" : " off"  ,
1111    "cSpell.words" : [
12-         " resx" 
12+         " contenteditable"  ,
13+         " gitversioning"  ,
14+         " Heuer"  ,
15+         " nerdbank"  ,
16+         " resw"  ,
17+         " resx"  ,
18+         " timheuer" 
1319    ]
1420}
Original file line number Diff line number Diff line change 2222  "categories" : [
2323    " Other" 
2424  ],
25+   "keywords" : [
26+     " resx"  ,
27+     " resw"  ,
28+     " resource"  ,
29+     " editor"  ,
30+     " viewer" 
31+   ],
32+   "badges" : [
33+     {
34+       "url" : " https://img.shields.io/visual-studio-marketplace/v/timheuer.resx-editor?label=VS%20Code%20Marketplace&color=brightgreen&logo=visualstudiocode"  ,
35+       "href" : " https://marketplace.visualstudio.com/items?itemName=TimHeuer.resx-editor"  ,
36+       "description" : " Current Version" 
37+     },
38+     {
39+       "url" : " https://github.com/timheuer/resx-editor/actions/workflows/build.yaml/badge.svg"  ,
40+       "href" : " https://github.com/timheuer/resx-editor/actions/workflows/build.yaml"  ,
41+       "description" : " Build Status" 
42+     }
43+   ],
2544  "activationEvents" : [
2645    " onLanguage:resx"  ,
2746    " onLanguage:resw" 
4867        "extensions" : [
4968          " .resx"  ,
5069          " .resw" 
70+         ],
71+         "aliases" : [
72+           " ResX"  ,
73+           " ResW" 
5174        ]
5275      }
5376    ],
77+     "snippets" : [
78+       {
79+         "language" : " xml"  ,
80+         "path" : " ./snippet/resx.json" 
81+       }
82+     ],
5483    "configuration" : {
5584      "title" : " ResX Editor"  ,
5685      "properties" : {
Original file line number Diff line number Diff line change 1+ {
2+     "resx Resource" : {
3+         "prefix" : " resx"  ,
4+         "body" : [
5+             " <data name=\" ${1:key}\"  xml:space=\" preserve\" >"  ,
6+             "     <value>${2:value}</value>"  ,
7+             "     <comment>${0:comment}</comment>"  ,
8+             " </data>" 
9+         ],
10+         "description" : " resx/resw resource entry" 
11+     }
12+ }
Original file line number Diff line number Diff line change 1- import  *  as  path  from  'path' ; 
21import  *  as  vscode  from  'vscode' ; 
3- import  resx  from  'resx' ; 
2+ import  *   as   resx  from  'resx' ; 
43import  {  getNonce  }  from  './utilities/getNonce' ; 
54import  {  printChannelOutput  }  from  './extension' ; 
65import  {  newResourceInput  }  from  './addNewResource' ; 
@@ -94,6 +93,10 @@ export class ResxProvider implements vscode.CustomTextEditorProvider {
9493        case  'log' :
9594          printChannelOutput ( e . message ,  true ) ; 
9695          return ; 
96+         case  'error' :
97+           printChannelOutput ( e . message ,  true ) ; 
98+           vscode . window . showErrorMessage ( e . message ) ; 
99+           return ; 
97100      } 
98101    } ) ; 
99102
Original file line number Diff line number Diff line change @@ -86,9 +86,17 @@ let currentRowData = null;
8686                if  ( message . key )  { 
8787                    const  index  =  table . rowsData . findIndex ( x  =>  x . Key  ===  message . key ) ; 
8888                    if  ( index  ===  - 1 )  { 
89+                         // eslint-disable-next-line @typescript-eslint/naming-convention 
8990                        table . rowsData . push ( {  Key : message . key ,  Value : message . value ,  Comment : message . comment  } ) ; 
9091                        refreshResxData ( ) ; 
9192                    } 
93+                     else  { 
94+                         // create vscode notification 
95+                         vscode . postMessage ( { 
96+                             type : 'error' , 
97+                             message : `Key "${ message . key }  " already exists.` 
98+                         } ) ; 
99+                     } 
92100                } 
93101                return ; 
94102        } 
Original file line number Diff line number Diff line change 11{
22    "$schema" : " https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json"  ,
3-     "version" : " 0.1 "  ,
3+     "version" : " 0.2 "  ,
44    "publicReleaseRefSpec" : [
55        " ^refs/heads/main$"  , 
66        " ^refs/tags/v\\ d+\\ .\\ d+" 
77    ],
8-     "versionHeightOffset" : 2 ,
98    "cloudBuild" : {
109        "buildNumber" : {
1110            "enabled" : true 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments