@@ -288,8 +288,8 @@ private void fileWatcher_Changed(object sender, FileSystemEventArgs e)
288288 bool ReloadFile = false ;
289289 if ( _NeedsSave )
290290 {
291- var result = MessageBox . Show ( string . Format ( Program . Translations . DFileChanged , _FullFilePath ) + Environment . NewLine + Program . Translations . FileTryReload ,
292- Program . Translations . FileChanged , MessageBoxButton . YesNo , MessageBoxImage . Asterisk ) ;
291+ var result = MessageBox . Show ( string . Format ( Program . Translations . GetLanguage ( " DFileChanged" ) , _FullFilePath ) + Environment . NewLine + Program . Translations . GetLanguage ( " FileTryReload" ) ,
292+ Program . Translations . GetLanguage ( " FileChanged" ) , MessageBoxButton . YesNo , MessageBoxImage . Asterisk ) ;
293293 ReloadFile = ( result == MessageBoxResult . Yes ) ;
294294 }
295295 else //when the user didnt changed anything, we just reload the file since we are intelligent...
@@ -388,7 +388,7 @@ public void Save(bool Force = false)
388388 }
389389 catch ( Exception e )
390390 {
391- MessageBox . Show ( Program . MainWindow , Program . Translations . DSaveError + Environment . NewLine + "(" + e . Message + ")" , Program . Translations . SaveError ,
391+ MessageBox . Show ( Program . MainWindow , Program . Translations . GetLanguage ( " DSaveError" ) + Environment . NewLine + "(" + e . Message + ")" , Program . Translations . GetLanguage ( " SaveError" ) ,
392392 MessageBoxButton . OK , MessageBoxImage . Error ) ;
393393 return ;
394394 }
@@ -405,7 +405,7 @@ public void UpdateFontSize(double size, bool UpdateLineHeight = true)
405405 if ( size > 2 && size < 31 )
406406 {
407407 editor . FontSize = size ;
408- StatusLine_FontSize . Text = size . ToString ( "n0" ) + $ " { Program . Translations . PtAbb } ";
408+ StatusLine_FontSize . Text = size . ToString ( "n0" ) + $ " { Program . Translations . GetLanguage ( " PtAbb" ) } ";
409409 }
410410 if ( UpdateLineHeight )
411411 {
@@ -512,7 +512,7 @@ public void Close(bool ForcedToSave = false, bool CheckSavings = true)
512512 }
513513 else
514514 {
515- var Result = Program . MainWindow . ShowMessageAsync ( $ "{ Program . Translations . SavingFile } '" + Parent . Title . Trim ( new char [ ] { '*' } ) + "'" , "" , MessageDialogStyle . AffirmativeAndNegative , Program . MainWindow . MetroDialogOptions ) ;
515+ var Result = Program . MainWindow . ShowMessageAsync ( $ "{ Program . Translations . GetLanguage ( " SavingFile" ) } '" + Parent . Title . Trim ( new char [ ] { '*' } ) + "'" , "" , MessageDialogStyle . AffirmativeAndNegative , Program . MainWindow . MetroDialogOptions ) ;
516516 Result . Wait ( ) ;
517517 if ( Result . Result == MessageDialogResult . Affirmative )
518518 {
@@ -541,8 +541,8 @@ private void editor_TextChanged(object sender, EventArgs e)
541541
542542 private void Caret_PositionChanged ( object sender , EventArgs e )
543543 {
544- StatusLine_Coloumn . Text = $ "{ Program . Translations . ColAbb } { editor . TextArea . Caret . Column } ";
545- StatusLine_Line . Text = $ "{ Program . Translations . LnAbb } { editor . TextArea . Caret . Line } ";
544+ StatusLine_Coloumn . Text = $ "{ Program . Translations . GetLanguage ( " ColAbb" ) } { editor . TextArea . Caret . Column } ";
545+ StatusLine_Line . Text = $ "{ Program . Translations . GetLanguage ( " LnAbb" ) } { editor . TextArea . Caret . Line } ";
546546 EvaluateIntelliSense ( ) ;
547547 var result = bracketSearcher . SearchBracket ( editor . Document , editor . CaretOffset ) ;
548548 bracketHighlightRenderer . SetHighlight ( result ) ;
@@ -623,7 +623,7 @@ private void TextArea_TextEntered(object sender, TextCompositionEventArgs e)
623623
624624 private void TextArea_SelectionChanged ( object sender , EventArgs e )
625625 {
626- StatusLine_SelectionLength . Text = $ "{ Program . Translations . LenAbb } { editor . SelectionLength } ";
626+ StatusLine_SelectionLength . Text = $ "{ Program . Translations . GetLanguage ( " LenAbb" ) } { editor . SelectionLength } ";
627627 }
628628
629629 private void PrevMouseWheel ( object sender , MouseWheelEventArgs e )
@@ -726,18 +726,23 @@ public void Language_Translate(bool Initial = false)
726726 {
727727 return ;
728728 }
729- MenuC_Undo . Header = Program . Translations . Undo ;
730- MenuC_Redo . Header = Program . Translations . Redo ;
731- MenuC_Cut . Header = Program . Translations . Cut ;
732- MenuC_Copy . Header = Program . Translations . Copy ;
733- MenuC_Paste . Header = Program . Translations . Paste ;
734- MenuC_SelectAll . Header = Program . Translations . SelectAll ;
735- CompileBox . Content = Program . Translations . Compile ;
729+ MenuC_Undo . Header = Program . Translations . GetLanguage ( "Undo" ) ;
730+
731+ MenuC_Redo . Header = Program . Translations . GetLanguage ( "Redo" ) ;
732+
733+ MenuC_Cut . Header = Program . Translations . GetLanguage ( "Cut" ) ;
734+
735+ MenuC_Copy . Header = Program . Translations . GetLanguage ( "Copy" ) ;
736+
737+ MenuC_Paste . Header = Program . Translations . GetLanguage ( "Paste" ) ;
738+
739+ MenuC_SelectAll . Header = Program . Translations . GetLanguage ( "SelectAll" ) ;
740+ CompileBox . Content = Program . Translations . GetLanguage ( "Compile" ) ;
736741 if ( ! Initial )
737742 {
738- StatusLine_Coloumn . Text = $ "{ Program . Translations . ColAbb } { editor . TextArea . Caret . Column } ";
739- StatusLine_Line . Text = $ "{ Program . Translations . LnAbb } { editor . TextArea . Caret . Line } ";
740- StatusLine_FontSize . Text = editor . FontSize . ToString ( "n0" ) + $ " { Program . Translations . PtAbb } ";
743+ StatusLine_Coloumn . Text = $ "{ Program . Translations . GetLanguage ( " ColAbb" ) } { editor . TextArea . Caret . Column } ";
744+ StatusLine_Line . Text = $ "{ Program . Translations . GetLanguage ( " LnAbb" ) } { editor . TextArea . Caret . Line } ";
745+ StatusLine_FontSize . Text = editor . FontSize . ToString ( "n0" ) + $ " { Program . Translations . GetLanguage ( " PtAbb" ) } ";
741746 }
742747 }
743748 }
0 commit comments