Skip to content

Commit 486f3e5

Browse files
authored
Merge pull request #11 from Scientific-Python-Translations/update-contributors
Remove duplicates
2 parents ba35877 + 0348f64 commit 486f3e5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

scripts/update_dashboard.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,19 @@ def generate_contributors_md_file(data: dict) -> None:
163163
content += f"\n## {crowdin_project}\n"
164164
content += '\n{{< grid columns="2 3 4 5" >}}\n\n'
165165
translators = data[crowdin_project]["translators"]
166+
all_translators = []
166167
for _, contributors in translators.items():
167168
if contributors:
168169
for contributor in contributors:
169-
content += "\n\n"
170-
content += generate_card(
171-
name=contributor["name"], img_link=contributor["img_link"]
172-
)
173-
content += "\n\n"
170+
if contributor not in all_translators:
171+
all_translators.append(contributor)
172+
173+
for contributor in all_translators:
174+
content += "\n\n"
175+
content += generate_card(
176+
name=contributor["name"], img_link=contributor["img_link"]
177+
)
178+
content += "\n\n"
174179

175180
content += "\n{{< /grid >}}"
176181

0 commit comments

Comments
 (0)