--- a/QTfrontend/hwform.cpp Sat Oct 07 18:43:31 2017 +0200
+++ b/QTfrontend/hwform.cpp Sat Oct 07 19:11:25 2017 +0200
@@ -1036,7 +1036,16 @@
void HWForm::NewTeam()
{
- ui.pageEditTeam->createTeam(QLineEdit::tr("unnamed"), playerHash);
+ QString teamName = QLineEdit::tr("unnamed");
+ QStringList teamslist = config->GetTeamsList();
+ if(teamslist.contains(teamName))
+ {
+ //name already used -> look for an appropriate name:
+ int i=2;
+ while(teamslist.contains(teamName = QLineEdit::tr("unnamed (%1)").arg(i++)));
+ }
+
+ ui.pageEditTeam->createTeam(teamName, playerHash);
UpdateTeamsLists();
GoToPage(ID_PAGE_SETUP_TEAM);
}
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts Sat Oct 07 18:43:31 2017 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts Sat Oct 07 19:11:25 2017 +0200
@@ -2861,6 +2861,10 @@
<source>anonymous</source>
<translation>anonym</translation>
</message>
+ <message>
+ <source>unnamed (%1)</source>
+ <translation>unbenannt (%1)</translation>
+ </message>
</context>
<context>
<name>QMainWindow</name>
--- a/share/hedgewars/Data/Locale/hedgewars_en.ts Sat Oct 07 18:43:31 2017 +0200
+++ b/share/hedgewars/Data/Locale/hedgewars_en.ts Sat Oct 07 19:11:25 2017 +0200
@@ -2699,6 +2699,10 @@
<source>anonymous</source>
<translation>anonymous</translation>
</message>
+ <message>
+ <source>unnamed (%1)</source>
+ <translation>unnamed (%1)</translation>
+ </message>
</context>
<context>
<name>QMainWindow</name>