diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 17:43:01 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 17:43:01 +0000 |
commit | b0bde3716bb0c1ddfc42fd378e2123361abc9693 (patch) | |
tree | ec349433f7d201db26f40545580dbd6f1d7be9c5 /build | |
parent | c4007a761c12e248bc1f3044e67d569aba436845 (diff) | |
download | chromium_src-b0bde3716bb0c1ddfc42fd378e2123361abc9693.zip chromium_src-b0bde3716bb0c1ddfc42fd378e2123361abc9693.tar.gz chromium_src-b0bde3716bb0c1ddfc42fd378e2123361abc9693.tar.bz2 |
Bounce through a set so we uniq the string list to avoid having something listed twice (a sub menu ends up with the same title as the menu item it hangs off, so it's easy to get dups within a xib file).
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/165133
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/mac/generate_localizer | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/mac/generate_localizer b/build/mac/generate_localizer index 5deb218..c9d49f9 100755 --- a/build/mac/generate_localizer +++ b/build/mac/generate_localizer @@ -97,9 +97,9 @@ def extract_resource_constants(plist_localizable_strings_dict, xib_path): 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[:] - constants_list.sort() + # Bounce through a set to uniq the strings, sort the list, then build the + # values we need from it. + constants_list = sorted(set(constants_list)) constant_list_str = '' for item in constants_list: parts = item.split('$', 1) |