Use a context for column names translations in server selection screen.

It allows to use shorter text while not breaking translations in other places.
This commit is contained in:
Deve 2018-12-14 21:53:06 +01:00
parent b0055f2089
commit ac809f429c
3 changed files with 22 additions and 22 deletions

View File

@ -140,20 +140,20 @@ void GhostReplayInfoDialog::updateReplayDisplayedInfo()
// as the header doesn't work with modal dialogs
if (is_linear)
row.push_back(GUIEngine::ListWidget::ListCell
(_C("ghost_info", "Reverse"), -1, 3, true));
(_C("column_name", "Reverse"), -1, 3, true));
row.push_back(GUIEngine::ListWidget::ListCell
(_C("ghost_info", "Difficulty"), -1, 4, true));
(_C("column_name", "Difficulty"), -1, 4, true));
if (is_linear)
row.push_back(GUIEngine::ListWidget::ListCell
(_C("ghost_info", "Laps"), -1, 3, true));
(_C("column_name", "Laps"), -1, 3, true));
row.push_back(GUIEngine::ListWidget::ListCell
(_C("ghost_info", "Time"), -1, 3, true));
(_C("column_name", "Time"), -1, 3, true));
row.push_back(GUIEngine::ListWidget::ListCell
(_C("ghost_info", "Kart"), -1, 1, true));
(_C("column_name", "Kart"), -1, 1, true));
row.push_back(GUIEngine::ListWidget::ListCell
(_C("ghost_info", "User"), -1, 5, true));
(_C("column_name", "User"), -1, 5, true));
row.push_back(GUIEngine::ListWidget::ListCell
(_C("ghost_info", "Version"), -1, 2, true));
(_C("column_name", "Version"), -1, 2, true));
m_replay_info_widget->addItem(StringUtils::toString(0), row);

View File

@ -148,20 +148,20 @@ void GhostReplaySelection::loadedFromFile()
*/
void GhostReplaySelection::beforeAddingWidget()
{
m_replay_list_widget->addColumn(_C("ghost_info", "Track"), 9 );
m_replay_list_widget->addColumn(_C("column_name", "Track"), 9 );
if (m_active_mode_is_linear)
m_replay_list_widget->addColumn(_C("ghost_info", "Reverse"), 3);
m_replay_list_widget->addColumn(_C("column_name", "Reverse"), 3);
if (!m_same_difficulty)
m_replay_list_widget->addColumn(_C("ghost_info", "Difficulty"), 4);
m_replay_list_widget->addColumn(_C("column_name", "Difficulty"), 4);
if (m_active_mode_is_linear)
m_replay_list_widget->addColumn(_C("ghost_info", "Laps"), 3);
m_replay_list_widget->addColumn(_C("ghost_info", "Time"), 4);
m_replay_list_widget->addColumn(_C("ghost_info", "Kart"), 1);
m_replay_list_widget->addColumn(_C("ghost_info", "User"), 5);
m_replay_list_widget->addColumn(_C("column_name", "Laps"), 3);
m_replay_list_widget->addColumn(_C("column_name", "Time"), 4);
m_replay_list_widget->addColumn(_C("column_name", "Kart"), 1);
m_replay_list_widget->addColumn(_C("column_name", "User"), 5);
if (m_multiplayer)
m_replay_list_widget->addColumn(_C("ghost_info", "Players"), 3);
m_replay_list_widget->addColumn(_C("column_name", "Players"), 3);
if (!m_same_version)
m_replay_list_widget->addColumn(_C("ghost_info", "Version"), 3);
m_replay_list_widget->addColumn(_C("column_name", "Version"), 3);
m_replay_list_widget->createHeader();
} // beforeAddingWidget

View File

@ -116,17 +116,17 @@ void ServerSelection::loadedFromFile()
void ServerSelection::beforeAddingWidget()
{
m_server_list_widget->clearColumns();
m_server_list_widget->addColumn( _("Name"), 3);
m_server_list_widget->addColumn( _("Players"), 1);
m_server_list_widget->addColumn(_("Difficulty"), 1);
m_server_list_widget->addColumn(_("Game mode"), 2);
m_server_list_widget->addColumn( _C("column_name", "Name"), 3);
m_server_list_widget->addColumn( _C("column_name", "Players"), 1);
m_server_list_widget->addColumn(_C("column_name", "Difficulty"), 1);
m_server_list_widget->addColumn(_C("column_name", "Game mode"), 2);
if (NetworkConfig::get()->isWAN())
{
// I18N: In server selection screen, owner of server, only displayed
// if it's localhost or friends'
m_server_list_widget->addColumn(_("Owner"), 1);
m_server_list_widget->addColumn(_C("column_name", "Owner"), 1);
// I18N: In server selection screen, distance to server
m_server_list_widget->addColumn(_("Distance (km)"), 1);
m_server_list_widget->addColumn(_C("column_name", "Distance (km)"), 1);
}
} // beforeAddingWidget