LookupGrid: Add French translations

This commit is contained in:
Jonathan Jenne
2022-11-03 16:28:51 +01:00
parent 83023ac390
commit b8bb9a79df
8 changed files with 476 additions and 141 deletions

View File

@@ -35,34 +35,6 @@ Public Class LookupControl3
Private Sub LookupControl3_EditValueChanging(sender As Object, e As ChangingEventArgs) Handles Me.EditValueChanging
e.Cancel = True
End Sub
Friend WithEvents fProperties As RepositoryItemGridLookUpEdit
Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView
Private Sub InitializeComponent()
Me.fProperties = New DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit()
Me.fPropertiesView = New DevExpress.XtraGrid.Views.Grid.GridView()
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'fProperties
'
Me.fProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.fProperties.Name = "fProperties"
Me.fProperties.PopupView = Me.fPropertiesView
'
'fPropertiesView
'
Me.fPropertiesView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
Me.fPropertiesView.Name = "fPropertiesView"
Me.fPropertiesView.OptionsSelection.EnableAppearanceFocusedCell = False
Me.fPropertiesView.OptionsView.ShowGroupPanel = False
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
End Class
<UserRepositoryItem("RegisterLookupControl3")>
@@ -79,6 +51,10 @@ Public Class RepositoryItemLookupControl3
UpdateSelectedValues(New List(Of String))
End Sub
Private Class S
Inherits My.Resources.Strings
End Class
Private Const NAME_DATATABLE_INTERNAL = "__INTERNAL_DATATABLE__"
Private Const TAG_DROPDOWN = "openDropdown"
Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm"
@@ -188,17 +164,17 @@ Public Class RepositoryItemLookupControl3
If MultiSelect = True Then
Select Case Values.Count
Case 0
NullText = String.Format(_R.GetString("LookupControl_NoRecords"))
NullText = S.LookupControl_NoRecords
Case 1
NullText = Values.FirstOrDefault()
OwnerEdit.EditValue = Values.FirstOrDefault()
Case Else
NullText = String.Format(_R.GetString("LookupControl_NRecords"), Values.Count)
NullText = String.Format(S.LookupControl_NRecords, Values.Count)
End Select
Else
Select Case Values.Count
Case 0
NullText = String.Format(_R.GetString("LookupControl_NoRecords"))
NullText = S.LookupControl_NoRecords
Case Else
NullText = Values.FirstOrDefault()
' JJ at 07.05.2021
@@ -209,7 +185,9 @@ Public Class RepositoryItemLookupControl3
' If No external Datasource is supplied, create one containing the currently selected values
' If the current datasource is the internal one, update it
If DataSource Is Nothing OrElse (TypeOf DataSource Is DataTable AndAlso DirectCast(DataSource, DataTable).TableName = NAME_DATATABLE_INTERNAL) Then
Dim oIsInternalDataTable = TypeOf DataSource Is DataTable AndAlso DirectCast(DataSource, DataTable).TableName = NAME_DATATABLE_INTERNAL
If DataSource Is Nothing OrElse oIsInternalDataTable Then
Dim oDataTable As New DataTable() With {
.TableName = NAME_DATATABLE_INTERNAL
}