Skip to content

Commit 02517bc

Browse files
committed
Fixed scripts (supertuxkart#2350), see aeb4ba6 on master.
1 parent b0c7fc9 commit 02517bc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tools/update_po_authors.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,18 @@
7272
all_authors = old_authors + new_authors;
7373
all_authors = sorted(all_authors, key=lambda x: x.lower())
7474
all_authors_string = reduce(lambda x,y: x+"\\n"+y, all_authors, "")
75-
75+
76+
credits_line = "msgstr \"Launchpad Contributions:%s\"\n"%all_authors_string
7677
# If no old authors exists, write a new entry:
7778
if contributions==-1:
7879
lines.append("\n")
7980
lines.append("#: src/states_screens/credits.cpp:209\n")
8081
lines.append("msgid \"translator-credits\"\n")
81-
82+
lines.append(credits_line)
8283
else:
83-
# Otherwise just delete the old contribution string
84-
# so that the new one can be appended below.
85-
del lines[contributions]
84+
# Otherwise just replace the old contribution string
85+
lines[contributions] = credits_line
8686

87-
# Append new author list
88-
lines.append("msgstr \"Launchpad Contributions:%s\"\n"%all_authors_string)
8987

9088
# Overwrite old file
9189
f = open(sys.argv[1], "w")

0 commit comments

Comments
 (0)