File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
marketplace-registry/external Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://inlang.com/schema/marketplace-manifest" ,
33 "id" : " app.inlang.elementaryWatson" ,
4- "icon" : " https://raw.githubusercontent.com/romerramos/elementary-watson/main/media/ icon.png" ,
4+ "icon" : " https://raw.githubusercontent.com/romerramos/elementary-watson/main/icon.png" ,
55 "displayName" : {
66 "en" : " Elementary Watson - Inline Translation Preview"
77 },
1111 "readme" : {
1212 "en" : " https://raw.githubusercontent.com/romerramos/elementary-watson/main/README.md"
1313 },
14+ "repository" : " https://github.com/romerramos/elementary-watson" ,
1415 "keywords" : [
1516 " vscode" ,
1617 " extension" ,
2627 " inlang"
2728 ],
2829 "publisherName" : " romerramos" ,
29- "publisherIcon" : " https://avatars.githubusercontent. com/u/ romerramos" ,
30+ "publisherIcon" : " https://github. com/romerramos.png " ,
3031 "license" : " MIT" ,
3132 "pricing" : " free" ,
32- "website" : " https://github. com/romerramos/elementary-watson "
33+ "website" : " https://marketplace.visualstudio. com/items?itemName= romerramos.elementarywatson "
3334}
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ export const Route = createFileRoute("/c/tools")({
3333 component : ToolsPage ,
3434} ) ;
3535
36+ const prioritizedTools = new Map ( [
37+ [ "paraglide js" , 0 ] ,
38+ [ "inlang cli" , 1 ] ,
39+ ] ) ;
40+
3641// Filter tools and libraries from the registry
3742const tools = registry
3843 . filter ( ( item ) => {
@@ -44,6 +49,17 @@ const tools = registry
4449 typeof a . displayName === "object" ? a . displayName . en : a . displayName ;
4550 const bName =
4651 typeof b . displayName === "object" ? b . displayName . en : b . displayName ;
52+ const aKey = aName . toLowerCase ( ) ;
53+ const bKey = bName . toLowerCase ( ) ;
54+ const aPriority =
55+ prioritizedTools . get ( aKey ) ?? ( aKey . startsWith ( "sherlock" ) ? 2 : 3 ) ;
56+ const bPriority =
57+ prioritizedTools . get ( bKey ) ?? ( bKey . startsWith ( "sherlock" ) ? 2 : 3 ) ;
58+
59+ if ( aPriority !== bPriority ) {
60+ return aPriority - bPriority ;
61+ }
62+
4763 return aName . localeCompare ( bName ) ;
4864 } ) ;
4965
You can’t perform that action at this time.
0 commit comments