def swift_variable_from_key(key, variable_name):
  """Generate a Swift static variable line for a string key and variable.

  Args:
    key: The string key for the variable.
    variable_name: The name of the variable.

  Returns:
    A string containing generated Swift code for a string.
  """
  return ("static public var " + variable_name + ": String { return \"" + key +
          "\".localized }")