diff --git a/colobot--do-not-translate-default-player-name.patch b/colobot--do-not-translate-default-player-name.patch new file mode 100644 index 0000000..0c67a99 --- /dev/null +++ b/colobot--do-not-translate-default-player-name.patch @@ -0,0 +1,13 @@ +diff --git a/src/level/player_profile.cpp b/src/level/player_profile.cpp +index 9abd20a8..c342cdae 100644 +--- a/src/level/player_profile.cpp ++++ b/src/level/player_profile.cpp +@@ -134,7 +134,7 @@ std::string CPlayerProfile::GetLastName() + std::string name; + + if(!GetConfigFile().GetStringProperty("Gamer", "LastName", name) || name.empty()) +- GetResource(RES_TEXT, RT_NAME_DEFAULT, name); ++ name = "Player"; + + return name; + } diff --git a/colobot.spec b/colobot.spec index a4487b0..e38cb96 100644 --- a/colobot.spec +++ b/colobot.spec @@ -1,6 +1,6 @@ Name: colobot Version: 0.1.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A video game that teaches programming in a fun way License: GPLv3 @@ -37,6 +37,15 @@ Source118: %{musicurl}/Infinite.ogg Source119: %{musicurl}/Proton.ogg Source120: %{musicurl}/Prototype.ogg + +# The game uses the translated string "Player" as the default player name +# yet it does not properly handle UTF-8 in player names, +# so non-English speakers may have the game always crash when putting in the player name. +# +# See: https://github.com/colobot/colobot/issues/1268 +Patch0: colobot--do-not-translate-default-player-name.patch + + BuildRequires: boost-devel >= 1.51 BuildRequires: boost-filesystem >= 1.51 BuildRequires: boost-regex >= 1.51 @@ -88,6 +97,7 @@ Music files used by Colobot Gold. %prep %setup -q -n colobot-%{gittag} +%patch0 -p1 rm -rf ./data cp %{SOURCE1} ./data.tgz @@ -170,6 +180,10 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata %changelog +* Mon Oct 07 2019 Artur Iwicki - 0.1.12-3 +- Make the game always use "Player" as the default player name + (fixes the game crashing under certain system locale settings) + * Sun Feb 24 2019 Artur Iwicki - 0.1.12-2 - Replace python3 BR with python3-devel - Move music files to the fepdkg lookaside cache