comparison src/gui/widgets/anime_info.cc @ 112:80f49f623d30

locale: allow switching locales without restarting
author Paper <mrpapersonic@gmail.com>
date Mon, 06 Nov 2023 13:41:30 -0500
parents d02fdf1d6708
children 9613d72b097e
comparison
equal deleted inserted replaced
111:fcae8bece0ec 112:80f49f623d30
29 _title->GetLine()->SetText(Strings::ToQString(Strings::Implode(anime.GetTitleSynonyms(), ", "))); 29 _title->GetLine()->SetText(Strings::ToQString(Strings::Implode(anime.GetTitleSynonyms(), ", ")));
30 30
31 /* details */ 31 /* details */
32 QString details_data; 32 QString details_data;
33 QTextStream details_data_s(&details_data); 33 QTextStream details_data_s(&details_data);
34 details_data_s << Translate::ToString(anime.GetFormat()).c_str() << "\n" 34 /* we have to convert ALL of these strings to
35 QString because QTextStream sucks and assumes
36 Latin1 (on Windows?) */
37 details_data_s << Strings::ToQString(Translate::ToString(anime.GetFormat())) << "\n"
35 << anime.GetEpisodes() << "\n" 38 << anime.GetEpisodes() << "\n"
36 << Translate::ToString(anime.GetUserStatus()).c_str() << "\n" 39 << Strings::ToQString(Translate::ToString(anime.GetUserStatus())) << "\n"
37 << Translate::ToString(anime.GetSeason()).c_str() << " " << anime.GetAirDate().GetYear() << "\n" 40 << Strings::ToQString(Translate::ToString(anime.GetSeason())) << " "
38 << Strings::Implode(anime.GetGenres(), ", ").c_str() << "\n" 41 << anime.GetAirDate().GetYear() << "\n"
42 << Strings::ToQString(Strings::Implode(anime.GetGenres(), ", ")) << "\n"
39 << anime.GetAudienceScore() << "%"; 43 << anime.GetAudienceScore() << "%";
40 _details->GetParagraph()->SetText(details_data); 44 _details->GetParagraph()->SetText(details_data);
41 45
42 _synopsis->GetParagraph()->SetText(Strings::ToQString(anime.GetSynopsis())); 46 _synopsis->GetParagraph()->SetText(Strings::ToQString(anime.GetSynopsis()));
43 47