1- using System ;
1+ using System ;
22using System . IO ;
33using System . Linq ;
44using System . Threading . Tasks ;
@@ -124,7 +124,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
124124 }
125125 catch ( Exception ex )
126126 {
127- Context . API . ShowMsgBox ( ex . Message , Context . API . GetTranslation ( " plugin_explorer_opendir_error" ) ) ;
127+ Context . API . ShowMsgBox ( ex . Message , Localize . plugin_explorer_opendir_error ( ) ) ;
128128 return false ;
129129 }
130130 }
@@ -138,7 +138,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
138138 }
139139 catch ( Exception ex )
140140 {
141- Context . API . ShowMsgBox ( ex . Message , Context . API . GetTranslation ( " plugin_explorer_opendir_error" ) ) ;
141+ Context . API . ShowMsgBox ( ex . Message , Localize . plugin_explorer_opendir_error ( ) ) ;
142142 return false ;
143143 }
144144 }
@@ -153,7 +153,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
153153 }
154154 catch ( Exception ex )
155155 {
156- Context . API . ShowMsgBox ( ex . Message , Context . API . GetTranslation ( " plugin_explorer_opendir_error" ) ) ;
156+ Context . API . ShowMsgBox ( ex . Message , Localize . plugin_explorer_opendir_error ( ) ) ;
157157 return false ;
158158 }
159159 }
@@ -166,7 +166,7 @@ internal static Result CreateFolderResult(string title, string subtitle, string
166166 return false ;
167167 } ,
168168 Score = score ,
169- TitleToolTip = Main . Context . API . GetTranslation ( " plugin_explorer_plugin_ToolTipOpenDirectory" ) ,
169+ TitleToolTip = Localize . plugin_explorer_plugin_ToolTipOpenDirectory ( ) ,
170170 SubTitleToolTip = Settings . DisplayMoreInformationInToolTip ? GetFolderMoreInfoTooltip ( path ) : path ,
171171 ContextData = new SearchResult { Type = ResultType . Folder , FullPath = path , WindowsIndexed = windowsIndexed }
172172 } ;
@@ -190,7 +190,7 @@ private static Result CreateDriveSpaceDisplayResult(string path, string actionKe
190190 DriveInfo drv = new DriveInfo ( driveLetter ) ;
191191 var freespace = ToReadableSize ( drv . AvailableFreeSpace , 2 ) ;
192192 var totalspace = ToReadableSize ( drv . TotalSize , 2 ) ;
193- var subtitle = string . Format ( Context . API . GetTranslation ( " plugin_explorer_diskfreespace" ) , freespace , totalspace ) ;
193+ var subtitle = Localize . plugin_explorer_diskfreespace ( freespace , totalspace ) ;
194194 double usingSize = ( Convert . ToDouble ( drv . TotalSize ) - Convert . ToDouble ( drv . AvailableFreeSpace ) ) / Convert . ToDouble ( drv . TotalSize ) * 100 ;
195195
196196 int ? progressValue = Convert . ToInt32 ( usingSize ) ;
@@ -262,8 +262,8 @@ internal static Result CreateOpenCurrentFolderResult(string path, string actionK
262262
263263 return new Result
264264 {
265- Title = Context . API . GetTranslation ( " plugin_explorer_openresultfolder" ) ,
266- SubTitle = Context . API . GetTranslation ( " plugin_explorer_openresultfolder_subtitle" ) ,
265+ Title = Localize . plugin_explorer_openresultfolder ( ) ,
266+ SubTitle = Localize . plugin_explorer_openresultfolder_subtitle ( ) ,
267267 AutoCompleteText = GetPathWithActionKeyword ( folderPath , ResultType . Folder , actionKeyword ) ,
268268 IcoPath = folderPath ,
269269 Score = 500 ,
@@ -330,12 +330,12 @@ internal static Result CreateFileResult(string filePath, Query query, int score
330330 }
331331 catch ( Exception ex )
332332 {
333- Context . API . ShowMsgBox ( ex . Message , Context . API . GetTranslation ( " plugin_explorer_openfile_error" ) ) ;
333+ Context . API . ShowMsgBox ( ex . Message , Localize . plugin_explorer_openfile_error ( ) ) ;
334334 }
335335
336336 return true ;
337337 } ,
338- TitleToolTip = Main . Context . API . GetTranslation ( " plugin_explorer_plugin_ToolTipOpenContainingFolder" ) ,
338+ TitleToolTip = Localize . plugin_explorer_plugin_ToolTipOpenContainingFolder ( ) ,
339339 SubTitleToolTip = Settings . DisplayMoreInformationInToolTip ? GetFileMoreInfoTooltip ( filePath ) : filePath ,
340340 ContextData = new SearchResult { Type = ResultType . File , FullPath = filePath , WindowsIndexed = windowsIndexed }
341341 } ;
@@ -374,8 +374,7 @@ private static string GetFileMoreInfoTooltip(string filePath)
374374 var fileSize = PreviewPanel . GetFileSize ( filePath ) ;
375375 var fileCreatedAt = PreviewPanel . GetFileCreatedAt ( filePath , Settings . PreviewPanelDateFormat , Settings . PreviewPanelTimeFormat , Settings . ShowFileAgeInPreviewPanel ) ;
376376 var fileModifiedAt = PreviewPanel . GetFileLastModifiedAt ( filePath , Settings . PreviewPanelDateFormat , Settings . PreviewPanelTimeFormat , Settings . ShowFileAgeInPreviewPanel ) ;
377- return string . Format ( Context . API . GetTranslation ( "plugin_explorer_plugin_tooltip_more_info" ) ,
378- filePath , fileSize , fileCreatedAt , fileModifiedAt , Environment . NewLine ) ;
377+ return Localize . plugin_explorer_plugin_tooltip_more_info ( filePath , fileSize , fileCreatedAt , fileModifiedAt , Environment . NewLine ) ;
379378 }
380379 catch ( Exception e )
381380 {
@@ -391,8 +390,7 @@ private static string GetFolderMoreInfoTooltip(string folderPath)
391390 var folderSize = PreviewPanel . GetFolderSize ( folderPath ) ;
392391 var folderCreatedAt = PreviewPanel . GetFolderCreatedAt ( folderPath , Settings . PreviewPanelDateFormat , Settings . PreviewPanelTimeFormat , Settings . ShowFileAgeInPreviewPanel ) ;
393392 var folderModifiedAt = PreviewPanel . GetFolderLastModifiedAt ( folderPath , Settings . PreviewPanelDateFormat , Settings . PreviewPanelTimeFormat , Settings . ShowFileAgeInPreviewPanel ) ;
394- return string . Format ( Context . API . GetTranslation ( "plugin_explorer_plugin_tooltip_more_info" ) ,
395- folderPath , folderSize , folderCreatedAt , folderModifiedAt , Environment . NewLine ) ;
393+ return Localize . plugin_explorer_plugin_tooltip_more_info ( folderPath , folderSize , folderCreatedAt , folderModifiedAt , Environment . NewLine ) ;
396394 }
397395 catch ( Exception e )
398396 {
@@ -403,8 +401,7 @@ private static string GetFolderMoreInfoTooltip(string folderPath)
403401
404402 private static string GetVolumeMoreInfoTooltip ( string volumePath , string freespace , string totalspace )
405403 {
406- return string . Format ( Context . API . GetTranslation ( "plugin_explorer_plugin_tooltip_more_info_volume" ) ,
407- volumePath , freespace , totalspace , Environment . NewLine ) ;
404+ return Localize . plugin_explorer_plugin_tooltip_more_info_volume ( volumePath , freespace , totalspace , Environment . NewLine ) ;
408405 }
409406
410407 private static readonly string [ ] MediaExtensions =
0 commit comments