diff --git a/localizations.py b/localizations.py index 1bde8e1d..5c1fcbe7 100644 --- a/localizations.py +++ b/localizations.py @@ -1,7 +1,6 @@ import os import argparse import re -import subprocess import glob from pathlib import Path @@ -44,6 +43,8 @@ class Generate: def __code_for(self, variables): return """ +// Do not edit this file directly, it has been auto-generated + enum {} {{ {} }} @@ -53,7 +54,7 @@ enum {} {{ return """static let {} = "{}".localized""".format(self.__get_var_name(key), key) def __static_func_for(self, key): - return """static func {}(withArgs: CVarArg...) -> String {{ "{}".localizedWithFormat(withArgs) }}""".format(self.__get_var_name(key), key) + return """static func {}(withArgs args: CVarArg...) -> String {{ "{}".localizedWithFormat(withArgs: args) }}""".format(self.__get_var_name(key), key) def __get_var_name(self, key): return re.sub('[^a-z0-9]', '_', key.lower()) @@ -92,8 +93,7 @@ class Validate: if var in matches: matches[var].append(swift_file_name) else: - matches[var] = [] - print(matches) + matches[var] = [] assert len(matches.keys()) == 0, "localization strings are still used in: {}".format(matches) match command: