From 14c974ac745f854c4f6e52fb8e20ce202c72de0d Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Tue, 15 Oct 2024 18:22:23 +0330 Subject: [PATCH] Enhance the documentation quality (#117) * docs: fix a repeated typo in the word initializer everywhere * docs: fix a typo in a link preview * docs: fix a typo in a mark comment * docs: fix a typo in the word `language` in a comment * test: fix a typo in the word `because` in a resource file --- .../Integrating XCStrings Tool into a Swift Package Target.md | 2 +- .../SourceFile_StringExtension_StringsTableStruct.swift | 4 ++-- Sources/xcstrings-tool/Utilities/InputParser.swift | 2 +- Tests/PluginTests/Resources/fr.lproj/Legacy.strings | 2 +- .../GenerateTests/testGenerate.FormatSpecifiers.swift | 2 +- .../GenerateTests/testGenerate.Localizable.swift | 2 +- .../__Snapshots__/GenerateTests/testGenerate.Multiline.swift | 2 +- .../__Snapshots__/GenerateTests/testGenerate.Positional.swift | 2 +- .../__Snapshots__/GenerateTests/testGenerate.Simple.swift | 2 +- .../GenerateTests/testGenerate.Substitution.swift | 2 +- .../__Snapshots__/GenerateTests/testGenerate.Variations.swift | 2 +- .../testGenerateWithLegacyFilesCombined.Legacy.swift | 2 +- .../GenerateTests/testGenerateWithLegacyStrings.Legacy.swift | 2 +- .../testGenerateWithLegacyStringsdict.Legacy.swift | 2 +- .../testGenerateWithPackageAccessLevel.Localizable.swift | 2 +- .../testGenerateWithPublicAccessLevel.Localizable.swift | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Sources/Documentation/XCStringsToolPlugin.docc/Integrating XCStrings Tool into a Swift Package Target.md b/Sources/Documentation/XCStringsToolPlugin.docc/Integrating XCStrings Tool into a Swift Package Target.md index 9eb3b48..cd0cc80 100644 --- a/Sources/Documentation/XCStringsToolPlugin.docc/Integrating XCStrings Tool into a Swift Package Target.md +++ b/Sources/Documentation/XCStringsToolPlugin.docc/Integrating XCStrings Tool into a Swift Package Target.md @@ -80,7 +80,7 @@ If you wish, you can open the file printed in the log output to review the gener This code is compiled as part of your target, so is accessible just like code you would write yourself: -![A screenshot of the new constants being used in some Foundation-baed model code](SPM-Usage) +![A screenshot of the new constants being used in some Foundation-based model code](SPM-Usage) ## See Also diff --git a/Sources/StringGenerator/Models/SourceFile_StringExtension_StringsTableStruct.swift b/Sources/StringGenerator/Models/SourceFile_StringExtension_StringsTableStruct.swift index 3b6b51a..763f342 100644 --- a/Sources/StringGenerator/Models/SourceFile_StringExtension_StringsTableStruct.swift +++ b/Sources/StringGenerator/Models/SourceFile_StringExtension_StringsTableStruct.swift @@ -32,7 +32,7 @@ extension SourceFile.StringExtension { BundleDescriptionEnum(stringsTable: self) } - // MARK: Properites + // MARK: Properties var storedProperties: [Property] { [keyProperty, argumentsProperty, tableProperty] @@ -85,7 +85,7 @@ extension SourceFile.StringExtension { In Foundation, you can resolve the localized string using the system language with the `String`.``Swift/String/init(\(sourceFile.tableVariableIdentifier):locale:)`` - intializer: + initializer: ```swift // Accessing the localized value directly diff --git a/Sources/xcstrings-tool/Utilities/InputParser.swift b/Sources/xcstrings-tool/Utilities/InputParser.swift index 07b61b1..27e0a41 100644 --- a/Sources/xcstrings-tool/Utilities/InputParser.swift +++ b/Sources/xcstrings-tool/Utilities/InputParser.swift @@ -54,7 +54,7 @@ struct InputParser { throw Error.notALocalizedResource(fileURL) } - // Include the file if the language matches the developmentLaguage + // Include the file if the language matches the developmentLanguage let language = lprojDir.replacingOccurrences(of: ".lproj", with: "", options: .caseInsensitive) return language.localizedCaseInsensitiveCompare(developmentLanguage) == .orderedSame } diff --git a/Tests/PluginTests/Resources/fr.lproj/Legacy.strings b/Tests/PluginTests/Resources/fr.lproj/Legacy.strings index bf755db..f6cf523 100644 --- a/Tests/PluginTests/Resources/fr.lproj/Legacy.strings +++ b/Tests/PluginTests/Resources/fr.lproj/Legacy.strings @@ -1 +1 @@ -"Ignored" = "This file should be ignored becuase it is not the development language"; +"Ignored" = "This file should be ignored because it is not the development language"; diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.FormatSpecifiers.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.FormatSpecifiers.swift index 72dbf8e..35e789a 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.FormatSpecifiers.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.FormatSpecifiers.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(formatSpecifiers:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Localizable.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Localizable.swift index c64ca8d..75ddb27 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Localizable.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Localizable.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(localizable:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Multiline.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Multiline.swift index db5e5d8..f527d1d 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Multiline.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Multiline.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(multiline:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Positional.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Positional.swift index e6eeeb0..d3dc0ec 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Positional.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Positional.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(positional:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Simple.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Simple.swift index 2482d60..c72b56a 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Simple.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Simple.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(simple:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Substitution.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Substitution.swift index 984e87a..19501a2 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Substitution.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Substitution.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(substitution:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Variations.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Variations.swift index 49d8102..9d63f86 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Variations.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerate.Variations.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(variations:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyFilesCombined.Legacy.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyFilesCombined.Legacy.swift index 5090627..ab504ea 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyFilesCombined.Legacy.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyFilesCombined.Legacy.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(legacy:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStrings.Legacy.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStrings.Legacy.swift index 46d65c7..f686867 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStrings.Legacy.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStrings.Legacy.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(legacy:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStringsdict.Legacy.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStringsdict.Legacy.swift index 9159605..6bcfeaa 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStringsdict.Legacy.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithLegacyStringsdict.Legacy.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(legacy:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPackageAccessLevel.Localizable.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPackageAccessLevel.Localizable.swift index 4137d33..b32c85f 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPackageAccessLevel.Localizable.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPackageAccessLevel.Localizable.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(localizable:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly diff --git a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPublicAccessLevel.Localizable.swift b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPublicAccessLevel.Localizable.swift index 219f788..2dafda1 100644 --- a/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPublicAccessLevel.Localizable.swift +++ b/Tests/XCStringsToolTests/__Snapshots__/GenerateTests/testGenerateWithPublicAccessLevel.Localizable.swift @@ -13,7 +13,7 @@ extension String { /// /// In Foundation, you can resolve the localized string using the system language /// with the `String`.``Swift/String/init(localizable:locale:)`` - /// intializer: + /// initializer: /// /// ```swift /// // Accessing the localized value directly