   /// Variable width entries are used to define width variations for a localized string.
   ///
   /// Reference: https://developer.apple.com/documentation/foundation/nsstring/1413104-variantfittingpresentationwidth
+  ///
+  /// Note: SwiftGen doesn't yet support parsing those VariableWidth entries
   struct VariableWidthEntry: Codable {
     let rules: [String: String]
   }
 }
 
 extension StringsDict.PluralEntry {
-  /// `Variable`s are a key-value pair specifying the rule to use for each variable (key).
+  /// `Variable`s are a key-value pair specifying the rule to use for each variable (name).
   struct Variable: Codable {
-    let key: String
+    let name: String
     let rule: VariableRule
   }
 

// - MARK: Helpers

extension StringsDict {
  typealias VariableKeyResult = (key: String, range: Range<String.Index>, positionalArgument: Int?)

  /// Parses variable keys and their ranges from a formatKey.
  /// Every variable key that is contained within the format string is preceded
  /// by the %#@ characters or by the positional variants, e.g. %1$#@, and followed by the @ character.
  ///
  /// - Parameter formatKey: The formatKey from which the variable keys should be parsed.
  /// - Returns: An array of discovered variable keys and their range within the `formatKey`.
  // swiftlint:disable:next discouraged_optional_collection
  private static func variableKeysFromFormatKey(_ formatKey: String) -> [VariableKeyResult]? {
    let pattern = #"(%(?>(\d)\$)?#@([\w\.\p{Pd}]+)@)"#
    guard let regex = try? NSRegularExpression(pattern: pattern, options: []) else { return nil }
    let nsrange = NSRange(formatKey.startIndex..<formatKey.endIndex, in: formatKey)

          return lhs < rhs
        }
      }
      .map { $0.name }

    return try sortedVariableNames.reduce(into: [PluralEntry.Variable]()) { variables, variableName in
      let variableRule = try container.decode(PluralEntry.VariableRule.self, forKey: CodingKeys(key: variableName))
      variables.append(PluralEntry.Variable(name: variableName, rule: variableRule))
    }
  }
}
