Chromium Code Reviews| Index: build/mac/generate_localizer |
| =================================================================== |
| --- build/mac/generate_localizer (revision 22731) |
| +++ build/mac/generate_localizer (working copy) |
| @@ -97,8 +97,9 @@ |
| def generate_files_contents(class_name, constants_list, header_name, xib_path): |
| """Generates a localizer files contents from the list of constants.""" |
| - # Copy and sort the list, then build the strings we need from it. |
| - constants_list = constants_list[:] |
| + # Bounce through a set to uniq the strings, sort the list, then build the |
| + # values we need from it. |
| + constants_list = list(set(constants_list)) |
| constants_list.sort() |
|
Mark Mentovai
2009/08/07 16:38:48
Even better:
constants_list = sorted(set(constant
|
| constant_list_str = '' |
| for item in constants_list: |