Translate UI into English and french; Extend resources and outsource hardcoded String form codebase into resources.

This commit is contained in:
OlgunR
2026-02-16 15:05:54 +01:00
parent c0b2ad0d9b
commit 676598450d
58 changed files with 12409 additions and 5445 deletions

View File

@@ -249,7 +249,7 @@ Public Class frmMain
bbtnitmEB.Enabled = False
LoadEnvelopeData()
txtEnvelopeIdLabel.Caption = "No Envelope selected"
txtEnvelopeIdLabel.Caption = Resources.Envelope.No_envelope_selected
Case 2
RibbonPageGroupFunctions.Enabled = False
@@ -286,7 +286,7 @@ Public Class frmMain
Private Sub bbtnitmEB_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmEB.ItemClick
Try
If IsNothing(ViewEnvelopes.FocusedRowHandle) Then
bsitmInfo.Caption = "No row selected"
bsitmInfo.Caption = Resources.Envelope.No_row_selected
Exit Sub
End If
bsitmInfo.Caption = ""
@@ -426,7 +426,7 @@ Public Class frmMain
Try
File.OpenWrite(oTempFilename)
Catch ex As Exception
MsgBox("File might already be open?", MsgBoxStyle.Exclamation)
MsgBox(Resources.Envelope.Error_while_opening_file, MsgBoxStyle.Exclamation)
Me.Cursor = Cursors.Default
Exit Sub
End Try
@@ -457,17 +457,17 @@ Public Class frmMain
If Not fileData Is Nothing Then
myResFileData = fileData
Else
bsitmInfo.Caption = "FileStream 1 is nothing - check data!"
bsitmInfo.Caption = Resources.Envelope.Could_not_load_result_report
myResFileData = Nothing
End If
Else
myResFileData = Nothing
bsitmInfo.Caption = "FileStream 2 is nothing - check data!"
bsitmInfo.Caption = Resources.Envelope.No_result_report_available
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in GetResRepFileStreamByte")
MsgBox(ex.Message, MsgBoxStyle.Exclamation, Resources.Envelope.Error_while_loading_result_report)
myResFileData = Nothing
End Try
@@ -488,7 +488,7 @@ Public Class frmMain
Process.Start(sFileName)
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in downloadFile")
MsgBox(ex.Message, MsgBoxStyle.Exclamation, Resources.Envelope.Error_downloading_file)
End Try
End Sub
Private Sub downloadResFile(ByVal sFileName As String)
@@ -506,10 +506,10 @@ Public Class frmMain
'Open File
Process.Start(sFileName)
Else
MsgBox("Could not get DocData from Database!", MsgBoxStyle.Exclamation, "Error in downloadResFile")
MsgBox(Resources.Envelope.Error_downloading_file, MsgBoxStyle.Exclamation, Resources.Envelope.Error_downloading_file)
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in downloadResFile")
MsgBox(ex.Message, MsgBoxStyle.Exclamation, Resources.Envelope.Error_downloading_file)
End Try
End Sub
Private Sub ViewCompleted_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles ViewCompleted.FocusedRowChanged
@@ -538,7 +538,7 @@ Public Class frmMain
If BarCheckItem1.Checked = True Then
If CurrLogConfig.Debug = False Then
CurrLogConfig.Debug = True
bsitmInfo.Caption = "DEBUG-Log is active"
bsitmInfo.Caption = Resources.Envelope.Debug_log_is_active
bsitmInfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
End If
Else
@@ -563,8 +563,9 @@ Public Class frmMain
Dim oUser = MyUserModel.SelectUser()
If oUser IsNot Nothing Then
MyUserModel.CheckUserLogin(oUser)
BarStaticItemGhost.Caption = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit ghost-mode"
Me.Text = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit ghost - mode"
Dim ghostText As String = String.Format(Resources.Envelope.Ghost_mode_is_active, USER_GHOST_MODE_USRNAME)
BarStaticItemGhost.Caption = ghostText
Me.Text = ghostText
BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
LoadEnvelopeData()
End If
@@ -596,7 +597,7 @@ Public Class frmMain
Try
Process.Start(psi)
Catch ex As Exception
MessageBox.Show("Error in creating mailto-Object: " & ex.Message)
MessageBox.Show(Resources.Envelope.Error_while_creating_mail & ex.Message)
End Try
Else
@@ -769,10 +770,10 @@ Public Class frmMain
File.Copy(oErrorlogFilename, saveFileDialog1.FileName)
End If
End If
Dim oMSG = "The export of the log files was successful. Please make the log files available in a ticket or send them to Your admin-team"
Dim oMSG = Resources.Envelope.Export_log_file_was_succesful
MsgBox(oMSG, MsgBoxStyle.Information, Me.Text)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error saving log file")
MsgBox(ex.Message, MsgBoxStyle.Critical, Resources.Envelope.Error_while_saving_log_file)
End Try
End Sub
Public Shared Sub Save_Logfiles()
@@ -838,15 +839,25 @@ Public Class frmMain
Dim oMailToReceivers = oEnvelope.FinalEmailToReceivers
If oMailToCreator <> Domain.Constants.FinalEmailType.No Then
MsgBox("Finale email an Creator könnten/würden gesendet werden!")
MsgBox(Resources.Envelope.Final_mail_to_creator_will_be_sent)
Else
MsgBox("Finale email an Creator könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{Domain.Constants.FinalEmailType.No}]")
Dim debugText = String.Format(
Resources.Envelope.Final_mail_debug_creator,
oMailToCreator,
Domain.Constants.FinalEmailType.No)
MsgBox(Resources.Envelope.Final_mail_to_creator_will_not_be_sent & vbNewLine & debugText)
End If
If oMailToReceivers <> Domain.Constants.FinalEmailType.No Then
MsgBox("Finale email an Unterzeichner könnten/würden gesendet werden!")
MsgBox(Resources.Envelope.Final_mail_to_receivers_will_be_sent)
Else
MsgBox("Finale email an Unterzeichner könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToReceivers - oMailToReceivers [{oMailToReceivers}] <> [{Domain.Constants.FinalEmailType.No}]")
Dim debugText = String.Format(
Resources.Envelope.Final_mail_debug_receiver,
oMailToReceivers,
Domain.Constants.FinalEmailType.No)
MsgBox(Resources.Envelope.Final_mail_to_receivers_will_not_be_sent & vbNewLine & debugText)
End If
End Sub
Private Function GetState() As State
@@ -881,14 +892,14 @@ Public Class frmMain
For Each oReceiver As Receiver In Receivers
If oReceiver.EmailAddress = selReceiver.EmailAddress Then
If oController.ActionService.ManuallySendAccessCode(oEnvelope, oReceiver) = True Then
Dim oMsg = Resources.Envelope.AccessCode_successfully_send.Replace("@Mail", oReceiver.EmailAddress)
Dim oMsg = Resources.Envelope.AccessCode_successfully_sent.Replace("@Mail", oReceiver.EmailAddress)
MsgBox(oMsg, MsgBoxStyle.Information, Text)
End If
End If
Next
Else
MsgBox("Envelope is defined without AccessCode so far!", MsgBoxStyle.Information)
MsgBox(Resources.Envelope.No_access_code_defined_so_far, MsgBoxStyle.Information)
End If
Catch ex As Exception
@@ -907,7 +918,7 @@ Public Class frmMain
End If
Dim oXMLPath = Get_DocGrid_Layout_Filename(ViewCompleted.Name)
ViewCompleted.SaveLayoutToXml(oXMLPath)
bsitmInfo.Caption = "Grid Layout Envelopes Completed Saved"
bsitmInfo.Caption = Resources.Envelope.Grid_layout_completed_envelopes_saved
End Sub
Private Sub ViewEnvelopes_Layout(sender As Object, e As EventArgs) Handles ViewEnvelopes.Layout
@@ -916,7 +927,7 @@ Public Class frmMain
End If
Dim oXMLPath = Get_DocGrid_Layout_Filename(ViewEnvelopes.Name)
ViewEnvelopes.SaveLayoutToXml(oXMLPath)
bsitmInfo.Caption = "Grid Layout Envelopes Saved"
bsitmInfo.Caption = Resources.Envelope.Grid_Layout_Envelopes_Saved
End Sub
Private Function Get_DocGrid_Layout_Filename(pGridViewName As String)