Skip to content

Commit c9c6b92

Browse files
authored
Merge pull request #5739 from retailcoder/translate252
Updating French Translations for v2.5.2
2 parents a1f784d + bd073dd commit c9c6b92

File tree

55 files changed

+387
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+387
-247
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[*.cs]
2+
3+
# CS1584: XML comment has syntactically incorrect cref attribute
4+
dotnet_diagnostic.CS1584.severity = none
5+
6+
# CS1041: expected identifier, invalid keyword
7+
dotnet_diagnostic.CS1041.severity = none
8+
9+
# CS1658: Warning is overriding an error
10+
dotnet_diagnostic.CS1658.severity = none
11+
12+
# IDE0079: Remove unnecessary suppression
13+
dotnet_diagnostic.IDE0079.severity = none

Rubberduck.CodeAnalysis/Inspections/Concrete/AssignmentNotUsedInspection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
3535
/// value = otherVar * value
3636
/// End Sub
3737
/// ]]>
38+
/// </module>
39+
/// </example>
3840
/// <example hasResult="true">
3941
/// <module name="Module1" type="Standard Module">
4042
/// <![CDATA[
@@ -204,7 +206,7 @@ private static bool TryGetRelevantJumpContext<T>(IdentifierReference resultCandi
204206

205207
private static bool IsPotentiallyUsedAssignment<T>(T jumpContext, IdentifierReference resultCandidate, Dictionary<string, int> labelIdLineNumberPairs) where T : ParserRuleContext
206208
{
207-
int? executionBranchLine = null;
209+
int? executionBranchLine;
208210

209211
switch (jumpContext)
210212
{
@@ -219,9 +221,7 @@ private static bool IsPotentiallyUsedAssignment<T>(T jumpContext, IdentifierRefe
219221
break;
220222
}
221223

222-
return executionBranchLine.HasValue
223-
? AssignmentIsUsedPriorToExitStmts(resultCandidate, executionBranchLine.Value)
224-
: false;
224+
return executionBranchLine.HasValue && AssignmentIsUsedPriorToExitStmts(resultCandidate, executionBranchLine.Value);
225225
}
226226

227227
private static bool AssignmentIsUsedPriorToExitStmts(IdentifierReference resultCandidate, int executionBranchLine)

Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitActiveSheetReferenceInspection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
namespace Rubberduck.CodeAnalysis.Inspections.Concrete
1010
{
1111
/// <summary>
12-
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls inside worksheet modules.
12+
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls implicitly referring to ActiveSheet.
1313
/// </summary>
1414
/// <reference name="Excel" />
1515
/// <why>
16-
/// Implicit references to the active worksheet rarely mean to be working with *whatever worksheet is currently active*.
16+
/// Implicit references to the active worksheet (ActiveSheet) rarely mean to be working with *whatever worksheet is currently active*.
1717
/// By explicitly qualifying these member calls with a specific Worksheet object, the assumptions are removed, the code
1818
/// is more robust, and will be less likely to throw run-time error 1004 or produce unexpected results
1919
/// when the active sheet isn't the expected one.

Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorkbookReferenceInspection.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
namespace Rubberduck.CodeAnalysis.Inspections.Concrete
1414
{
1515
/// <summary>
16-
/// Locates unqualified Workbook.Worksheets/Sheets/Names member calls inside workbook document modules that implicitly refer to the containing workbook.
16+
/// Locates unqualified Workbook.Worksheets/Sheets/Names member calls inside workbook document modules, that implicitly refer to the host workbook.
1717
/// </summary>
18-
/// <reference name="Excel" />
18+
/// <hostApp name="Excel" />
1919
/// <why>
20-
/// Implicit references inside a workbook document module can be mistakes for implicit references to the active workbook, which is the behavior in all other modules
21-
/// By explicitly qualifying these member calls with Me, the ambiguity can be resolved.
20+
/// Implicit references inside a workbook document module can easily be mistaken for implicit references to the active workbook (ActiveWorkbook), which is the behavior in all other module types.
21+
/// By explicitly qualifying these member calls with 'Me', the ambiguity can be resolved. If the intent is to actually refer to the active workbook, qualify with 'ActiveWorkbook' to prevent a bug.
2222
/// </why>
2323
/// <example hasResult="true">
2424
/// <module name="ThisWorkbook" type="Document Module">
@@ -40,7 +40,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
4040
/// ]]>
4141
/// </module>
4242
/// </example>
43-
[RequiredLibrary("Excel")]
43+
[RequiredHost("Excel")]
4444
internal sealed class ImplicitContainingWorkbookReferenceInspection : ImplicitWorkbookReferenceInspectionBase
4545
{
4646
public ImplicitContainingWorkbookReferenceInspection(IDeclarationFinderProvider declarationFinderProvider)

Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorksheetReferenceInspection.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
namespace Rubberduck.CodeAnalysis.Inspections.Concrete
1111
{
1212
/// <summary>
13-
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls inside worksheet modules that implicitly refer to the containing sheet.
13+
/// Locates unqualified Worksheet.Range/Cells/Columns/Rows member calls inside worksheet modules, that implicitly refer to the containing sheet component.
1414
/// </summary>
15-
/// <reference name="Excel" />
15+
/// <hostApp name="Excel" />
1616
/// <why>
17-
/// Implicit references inside a worksheet document module can be mistakes for implicit references to the active worksheet, which is the behavior in all other places.
18-
/// By explicitly qualifying these member calls with Me, the ambiguity can be resolved.
17+
/// Implicit references inside a worksheet document module can easily be mistaken for implicit references to the active worksheet (ActiveSheet), which is the behavior in all other module types.
18+
/// By explicitly qualifying these member calls with 'Me', the ambiguity can be resolved. If the intent is to refer to the active worksheet, qualify with 'ActiveSheet' to prevent a bug.
1919
/// </why>
2020
/// <example hasResult="true">
2121
/// <module name="Sheet1" type="Document Module">
@@ -37,7 +37,7 @@ namespace Rubberduck.CodeAnalysis.Inspections.Concrete
3737
/// ]]>
3838
/// </module>
3939
/// </example>
40-
[RequiredLibrary("Excel")]
40+
[RequiredHost("Excel")]
4141
internal sealed class ImplicitContainingWorksheetReferenceInspection : ImplicitSheetReferenceInspectionBase
4242
{
4343
public ImplicitContainingWorksheetReferenceInspection(IDeclarationFinderProvider declarationFinderProvider)

Rubberduck.CodeAnalysis/Inspections/Concrete/InvalidAnnotationInspection.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ protected override IEnumerable<IParseTreeAnnotation> GetInvalidAnnotations(
222222
{
223223
return GetUnboundAnnotations(annotations, userDeclarations, identifierReferences)
224224
.Where(pta => !pta.Annotation.Target.HasFlag(AnnotationTarget.General) || pta.AnnotatedLine == null)
225-
.Concat(AttributeAnnotationsOnDeclarationsNotAllowingAttributes(annotations, userDeclarations, identifierReferences))
225+
.Concat(AttributeAnnotationsOnDeclarationsNotAllowingAttributes(userDeclarations))
226226
.ToList();
227227
}
228228

@@ -241,10 +241,7 @@ private IEnumerable<IParseTreeAnnotation> GetUnboundAnnotations(
241241
.Where(pta => pta.Annotation.GetType() != typeof(NotRecognizedAnnotation) && !boundAnnotationsSelections.Contains(pta.QualifiedSelection));
242242
}
243243

244-
private IEnumerable<IParseTreeAnnotation> AttributeAnnotationsOnDeclarationsNotAllowingAttributes(
245-
IEnumerable<IParseTreeAnnotation> annotations,
246-
IEnumerable<Declaration> userDeclarations,
247-
IEnumerable<IdentifierReference> identifierReferences)
244+
private IEnumerable<IParseTreeAnnotation> AttributeAnnotationsOnDeclarationsNotAllowingAttributes(IEnumerable<Declaration> userDeclarations)
248245
{
249246
return userDeclarations
250247
.Where(declaration => declaration.AttributesPassContext == null

Rubberduck.CodeAnalysis/Inspections/Concrete/SheetAccessedUsingStringInspection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ private static VBAParser.LiteralExpressionContext SheetNameArgumentLiteralExpres
193193
private string CodeNameOfVBComponentMatchingSheetName(string projectId, string sheetName)
194194
{
195195
var components = _projectsProvider.Components(projectId);
196-
197-
foreach (var (module, component) in components)
196+
foreach (var (_, component) in components)
198197
{
199198
if (component.Type != ComponentType.Document)
200199
{

Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseEvaluation/FilterLimits.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ internal struct Limit<T> where T : IComparable<T>
3636

3737
public static bool operator !=(Limit<T> LHS, Limit<T> RHS) => !(LHS == RHS);
3838

39-
public static bool operator >(Limit<T> LHS, T RHS) => LHS.HasValue ? LHS.Value.CompareTo(RHS) > 0 : false;
39+
public static bool operator >(Limit<T> LHS, T RHS) => LHS.HasValue && LHS.Value.CompareTo(RHS) > 0;
4040

41-
public static bool operator <(Limit<T> LHS, T RHS) => LHS.HasValue? LHS.Value.CompareTo(RHS) < 0 : false;
41+
public static bool operator <(Limit<T> LHS, T RHS) => LHS.HasValue && LHS.Value.CompareTo(RHS) < 0;
4242

4343
public static bool operator >=(Limit<T> LHS, Limit<T> RHS) => LHS == RHS || LHS > RHS;
4444

@@ -106,7 +106,7 @@ public void SetExtents(T min, T max)
106106

107107
public bool SetMinimum(T min)
108108
{
109-
var setNewValue = false;
109+
bool setNewValue;
110110
if (_min.HasValue)
111111
{
112112
setNewValue = min.CompareTo(_min.Value) > 0;
@@ -123,7 +123,7 @@ public bool SetMinimum(T min)
123123

124124
public bool SetMaximum(T max)
125125
{
126-
var setNewValue = false;
126+
bool setNewValue;
127127
if (_max.HasValue)
128128
{
129129
setNewValue = max.CompareTo(_max.Value) < 0;
@@ -195,20 +195,22 @@ public override bool Equals(object obj)
195195
return true;
196196
}
197197

198+
public override int GetHashCode() => VBEditor.HashCode.Compute(Minimum, Maximum);
199+
198200
public override string ToString()
199201
{
200202
var minString = string.Empty;
201203
var maxString = string.Empty;
202204
if (_min.HasValue)
203205
{
204206
minString = MinimumExtent.HasValue && _min == MinimumExtent
205-
? $"Min(typeMin)" : $"Min({_min.ToString()})";
207+
? $"Min(typeMin)" : $"Min({_min})";
206208
}
207209

208210
if (_max.HasValue)
209211
{
210212
maxString = MaximumExtent.HasValue && _max == MaximumExtent
211-
? $"Max(typeMax)" : $"Max({_max.ToString()})";
213+
? $"Max(typeMax)" : $"Max({_max})";
212214
}
213215
return $"{minString}{maxString}";
214216
}

Rubberduck.CodeAnalysis/QuickFixes/Concrete/ExpandBangNotationQuickFix.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ public override string Description(IInspectionResult result)
132132
public override bool CanFixInProject => true;
133133
public override bool CanFixAll => true;
134134

135-
private string NonIdentifierCharacters = "[](){}\r\n\t.,'\"\\ |!@#$%^&*-+:=; ";
136-
private string AdditionalNonFirstIdentifierCharacters = "0123456789_";
135+
private readonly string NonIdentifierCharacters = "[](){}\r\n\t.,'\"\\ |!@#$%^&*-+:=; ";
136+
private readonly string AdditionalNonFirstIdentifierCharacters = "0123456789_";
137137

138138
private static readonly Dictionary<string, string> DefaultMemberOverrides = new Dictionary<string, string>
139139
{

Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerMemberViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public override string NameWithSignature
5151
}
5252

5353
public override bool IsObsolete =>
54-
Declaration.Annotations.Any(annotation => annotation is ObsoleteAnnotation);
54+
Declaration.Annotations.Any(pta => pta.Annotation is ObsoleteAnnotation);
5555

5656
public static readonly DeclarationType[] SubMemberTypes =
5757
{

0 commit comments

Comments
 (0)