Remove no longer needed fribidize

This commit is contained in:
Benau 2019-06-15 14:04:55 +08:00
parent fc143276fe
commit b5e5d44808
19 changed files with 32 additions and 42 deletions

View File

@ -372,7 +372,7 @@ void PlayerKartWidget::add()
irr::core::stringw name; // name of the player
if (m_associated_player)
name = m_associated_player->getProfile()->getName();
core::stringw label = translations->fribidize(name);
core::stringw label = name;
if (m_parent_screen->m_multiplayer)
{
@ -380,7 +380,7 @@ void PlayerKartWidget::add()
for (int n=0; n<player_amount; n++)
{
core::stringw name = PlayerManager::get()->getPlayer(n)->getName();
core::stringw label = translations->fribidize(name);
core::stringw label = name;
m_player_ident_spinner->addLabel(label);
if (UserConfigParams::m_per_player_difficulty)
{
@ -442,8 +442,6 @@ void PlayerKartWidget::markAsReady()
m_player_ident_spinner->m_y),
core::dimension2di(m_player_ident_spinner->m_w,
m_player_ident_spinner->m_h));
// 'playerNameString' is already fribidize, so we need to use
// 'insertValues' and not _("...", a) so it's not flipped again
m_ready_text =
GUIEngine::getGUIEnv()->addStaticText(_("%s is ready", playerNameString),
rect);

View File

@ -38,5 +38,5 @@ Controller::Controller(AbstractKart *kart)
// ----------------------------------------------------------------------------
core::stringw Controller::getName() const
{
return translations->fribidize(m_kart->getName());
return m_kart->getName();
} // getName

View File

@ -92,7 +92,7 @@ namespace Scripting
/** Get translated version of string */
std::string translate(std::string* input)
{
irr::core::stringw out = translations->fribidize(translations->w_gettext(input->c_str()));
irr::core::stringw out = translations->w_gettext(input->c_str());
return StringUtils::wideToUtf8(out);
}
@ -105,8 +105,6 @@ namespace Scripting
out = StringUtils::insertValues(out,
StringUtils::utf8ToWide(*arg1));
out = translations->fribidize(out);
return StringUtils::wideToUtf8(out);
}
@ -119,8 +117,6 @@ namespace Scripting
StringUtils::utf8ToWide(*arg1),
StringUtils::utf8ToWide(*arg2));
out = translations->fribidize(out);
return StringUtils::wideToUtf8(out);
}
@ -135,8 +131,6 @@ namespace Scripting
StringUtils::utf8ToWide(*arg2),
StringUtils::utf8ToWide(*arg3));
out = translations->fribidize(out);
return StringUtils::wideToUtf8(out);
}
/** @}*/

View File

@ -276,7 +276,7 @@ void ArenasScreen::buildTrackList()
}
else
{
w->addItem( translations->fribidize(curr->getName()), curr->getIdent(), curr->getScreenshotFile(), 0,
w->addItem(curr->getName(), curr->getIdent(), curr->getScreenshotFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
}
}
@ -328,7 +328,7 @@ void ArenasScreen::buildTrackList()
}
else
{
w->addItem( translations->fribidize(curr->getName()), curr->getIdent(), curr->getScreenshotFile(), 0,
w->addItem(curr->getName(), curr->getIdent(), curr->getScreenshotFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
}
}

View File

@ -166,13 +166,13 @@ SelectChallengeDialog::SelectChallengeDialog(const float percentWidth,
if (c->getData()->isGrandPrix())
{
const GrandPrixData* gp = grand_prix_manager->getGrandPrix(c->getData()->getGPId());
getWidget<LabelWidget>("title")->setText(translations->fribidize(gp->getName()), true);
getWidget<LabelWidget>("title")->setText(gp->getName(), true);
}
else
{
const core::stringw track_name =
track_manager->getTrack(c->getData()->getTrackId())->getName();
getWidget<LabelWidget>("title")->setText(translations->fribidize(track_name), true);
getWidget<LabelWidget>("title")->setText(track_name, true);
}
}

View File

@ -228,7 +228,7 @@ void EasterEggScreen::buildTrackList()
}
else
{
tracks_widget->addItem(translations->fribidize(curr->getName()), curr->getIdent(),
tracks_widget->addItem(curr->getName(), curr->getIdent(),
curr->getScreenshotFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
m_random_track_list.push_back(curr->getIdent());
@ -259,7 +259,7 @@ void EasterEggScreen::buildTrackList()
}
else
{
tracks_widget->addItem(translations->fribidize(curr->getName()), curr->getIdent(),
tracks_widget->addItem(curr->getName(), curr->getIdent(),
curr->getScreenshotFile(), 0 /* no badge */,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
m_random_track_list.push_back(curr->getIdent());

View File

@ -160,7 +160,7 @@ void EditGPScreen::init()
{
LabelWidget* header = getWidget<LabelWidget>("title");
assert(header != NULL);
header->setText(translations->fribidize(m_gp->getName()), true);
header->setText(m_gp->getName(), true);
IconButtonWidget* button = getWidget<IconButtonWidget>("save");
assert(button != NULL);

View File

@ -190,7 +190,7 @@ void EditTrackScreen::loadTrackList()
if (!t->isArena() && !t->isSoccer() &&
!t->isInternal() && belongs_to_group )
{
tracks_widget->addItem(translations->fribidize(t->getName()),
tracks_widget->addItem(t->getName(),
t->getIdent(),
t->getScreenshotFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);
@ -221,7 +221,7 @@ void EditTrackScreen::selectTrack(const std::string& id)
if (m_track)
{
tracks->setSelection(m_track->getIdent(), PLAYER_ID_GAME_MASTER, true);
selected_track->setText(translations->fribidize(m_track->getName()), true);
selected_track->setText(m_track->getName(), true);
laps->setValue(m_laps);

View File

@ -381,8 +381,7 @@ void GhostReplaySelection::loadList()
std::vector<GUIEngine::ListWidget::ListCell> row;
//The third argument should match the numbers used in beforeAddingWidget
row.push_back(GUIEngine::ListWidget::ListCell
(translations->fribidize(track->getName()) , -1, 9));
row.push_back(GUIEngine::ListWidget::ListCell(track->getName() , -1, 9));
if (m_active_mode_is_linear)
{
row.push_back(GUIEngine::ListWidget::ListCell

View File

@ -214,11 +214,11 @@ void GPInfoScreen::init()
m_gp.createRandomGP(m_num_tracks_spinner->getValue(),
m_group_name, getReverse(), true);
getWidget<LabelWidget>("name")->setText(translations->fribidize(m_gp.getName()), false);
getWidget<LabelWidget>("name")->setText(m_gp.getName(), false);
}
else
{
getWidget<LabelWidget>("name")->setText(translations->fribidize(m_gp.getName()), false);
getWidget<LabelWidget>("name")->setText(m_gp.getName(), false);
m_gp.checkConsistency();
}
@ -269,7 +269,7 @@ void GPInfoScreen::addTracks()
{
const Track *track = track_manager->getTrack(tracks[i]);
std::string s = StringUtils::toString(i);
list->addItem(s, translations->fribidize(track->getName()));
list->addItem(s, track->getName());
}
} // addTracks

View File

@ -171,7 +171,7 @@ void GrandPrixEditorScreen::setSelection (const GrandPrixData* gpdata)
else
{
m_selection = grand_prix_manager->editGrandPrix(gpdata->getId());
gpname_widget->setText(translations->fribidize(gpdata->getName()), true);
gpname_widget->setText(gpdata->getName(), true);
gplist_widget->setSelection(m_selection->getId(), PLAYER_ID_GAME_MASTER, true);
loadTrackList (gpdata->getId());
}
@ -205,7 +205,7 @@ void GrandPrixEditorScreen::loadTrackList (const std::string& gpname)
else
{
tracks_widget->addItem(
StringUtils::toWString(t + 1) + ". " + translations->fribidize(curr->getName()),
StringUtils::toWString(t + 1) + ". " + curr->getName(),
curr->getIdent(), curr->getScreenshotFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
}
@ -243,8 +243,7 @@ void GrandPrixEditorScreen::loadGPList()
if (m_gpgroup == GrandPrixData::GP_NONE || m_gpgroup == gp->getGroup())
{
gplist_widget->addAnimatedItem(
translations->fribidize(gp->getName()),
gplist_widget->addAnimatedItem(gp->getName(),
gp->getId(), sshot_files, 2.0f, 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
}

View File

@ -1530,7 +1530,7 @@ void KartSelectionScreen::setKartsFromCurrentGroup()
}
else
{
w->addItem(translations->fribidize(prop->getName()),
w->addItem(prop->getName(),
prop->getIdent(),
prop->getAbsoluteIconFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);

View File

@ -224,7 +224,7 @@ void BaseOnlineProfileAchievements::displayResults()
Achievement *a = *vit;
if (a->getInfo()->isSecret() && !a->isAchieved())
continue;
ListWidget::ListCell title(translations->fribidize(a->getInfo()->getName()), -1, 2);
ListWidget::ListCell title(a->getInfo()->getName(), -1, 2);
ListWidget::ListCell goals(a->getGoalProgressAsString(), -1, 1);
ListWidget::ListCell progress(a->getProgressAsString(), -1, 1);
row.push_back(title);

View File

@ -590,7 +590,7 @@ void TracksScreen::buildTrackList()
}
else
{
tracks_widget->addItem(translations->fribidize(curr->getName()),
tracks_widget->addItem(curr->getName(),
curr->getIdent(),
curr->getScreenshotFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);

View File

@ -100,7 +100,7 @@ void OptionsScreenLanguage::init()
std::string code_name = (*lang_list)[n];
std::string s_name = translations->getLocalizedName(code_name) +
" (" + tinygettext::Language::from_name(code_name).get_language() + ")";
core::stringw nice_name = translations->fribidize(StringUtils::utf8ToWide(s_name));
core::stringw nice_name = StringUtils::utf8ToWide(s_name);
nice_lang_list.push_back(nice_name);
nice_name_2_id[nice_name] = code_name;
}

View File

@ -546,7 +546,7 @@ void RaceGUIOverworld::drawGlobalMiniMap()
}
gui::ScalableFont* font = GUIEngine::getTitleFont();
font->draw(translations->fribidize(gp->getName()), pos, video::SColor(255,255,255,255),
font->draw(gp->getName(), pos, video::SColor(255,255,255,255),
false, true /* vcenter */, NULL);
}
else
@ -562,7 +562,7 @@ void RaceGUIOverworld::drawGlobalMiniMap()
}
gui::ScalableFont* font = GUIEngine::getTitleFont();
font->draw(translations->fribidize(track->getName()),
font->draw(track->getName(),
pos, video::SColor(255, 255, 255, 255),
false, true /* vcenter */, NULL);
}

View File

@ -136,7 +136,7 @@ void TrackInfoScreen::init()
const bool has_laps = race_manager->modeHasLaps();
const bool has_highscores = race_manager->modeHasHighscores();
getWidget<LabelWidget>("name")->setText(translations->fribidize(m_track->getName()), false);
getWidget<LabelWidget>("name")->setText(m_track->getName(), false);
//I18N: when showing who is the author of track '%s'
//I18N: (place %s where the name of the author should appear)

View File

@ -197,7 +197,7 @@ void TracksAndGPScreen::init()
}
else
{
gps_widget->addAnimatedItem(translations->fribidize(gp->getName()),
gps_widget->addAnimatedItem(gp->getName(),
gp->getId(), screenshots, 1.5f,
TROPHY_BADGE,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);
@ -207,7 +207,7 @@ void TracksAndGPScreen::init()
// Random GP
std::vector<std::string> screenshots;
screenshots.push_back(file_manager->getAsset(FileManager::GUI_ICON, "main_help.png"));
gps_widget->addAnimatedItem(translations->fribidize(GrandPrixData::getRandomGPName()),
gps_widget->addAnimatedItem(GrandPrixData::getRandomGPName(),
GrandPrixData::getRandomGPID(),
screenshots, 1.5f, 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);
@ -279,7 +279,7 @@ void TracksAndGPScreen::buildTrackList()
}
else
{
tracks_widget->addItem(translations->fribidize(curr->getName()),
tracks_widget->addItem(curr->getName(),
curr->getIdent(),
curr->getScreenshotFile(), 0,
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);

View File

@ -223,7 +223,7 @@ std::set<wchar_t> Dictionary::get_all_used_chars()
const std::vector<std::string>& msgstrs = i->second;
for (unsigned int k = 0; k < msgstrs.size(); k++)
{
irr::core::stringw ws = translations->fribidize((StringUtils::utf8ToWide(msgstrs[k])).c_str());
irr::core::stringw ws = StringUtils::utf8ToWide(msgstrs[k]);
for (unsigned int l = 0; l < ws.size(); ++l)
UsedChars.insert(ws[l]);
}
@ -236,7 +236,7 @@ std::set<wchar_t> Dictionary::get_all_used_chars()
const std::vector<std::string>& msgstrs = j->second;
for (unsigned int k = 0; k < msgstrs.size(); k++)
{
irr::core::stringw ws = translations->fribidize((StringUtils::utf8ToWide(msgstrs[k])).c_str());
irr::core::stringw ws = StringUtils::utf8ToWide(msgstrs[k]);
for (unsigned int l = 0; l < ws.size(); ++l)
UsedChars.insert(ws[l]);
}