nicer options for defaults in localization tr() functions

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@808 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-01-01 16:06:58 +00:00
parent f0be49c2e4
commit ed060aeb04
9 changed files with 54 additions and 72 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ void CardListBase::rebuild() {
else if (f.second->card_list_align & ALIGN_CENTER) align = wxLIST_FORMAT_CENTRE;
else align = wxLIST_FORMAT_LEFT;
InsertColumn((long)column_fields.size(),
tr(*set->game, f.second->card_list_name, capitalize(f.second->card_list_name)),
tr(*set->game, f.second->card_list_name, capitalize),
align, cs.width);
column_fields.push_back(f.second);
}
+2 -2
View File
@@ -76,7 +76,7 @@ void CardListColumnSelectDialog::initList() {
// Init items
Color window_color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
FOR_EACH(c, columns) {
list->Append(tr(*game, c.field->card_list_name, capitalize(c.field->card_list_name)));
list->Append(tr(*game, c.field->card_list_name, capitalize));
// check
int i = list->GetCount() - 1;
list->Check(i, c.settings.visible);
@@ -89,7 +89,7 @@ void CardListColumnSelectDialog::initList() {
void CardListColumnSelectDialog::refreshItem(int i) {
list->Check (i, columns[i].settings.visible);
list->SetString(i, tr(*game, columns[i].field->card_list_name, capitalize(columns[i].field->card_list_name)) );
list->SetString(i, tr(*game, columns[i].field->card_list_name, capitalize) );
}
// ----------------------------------------------------------------------------- : Events
+2 -2
View File
@@ -44,7 +44,7 @@ void NativeLookEditor::drawViewer(RotatedDC& dc, ValueViewer& v) {
// draw label
dc.SetFont(*wxNORMAL_FONT);
// TODO : tr using stylesheet or using game?
dc.DrawText(tr(*set->game, s.fieldP->name, capitalize_sentence(s.fieldP->name)),
dc.DrawText(tr(*set->game, s.fieldP->name, capitalize_sentence),
RealPoint(margin_left - s.left, 1));
// draw 3D border
draw_control_border(this, dc.getDC(), dc.trRectStraight(s.getInternalRect().grow(1)));
@@ -70,7 +70,7 @@ void NativeLookEditor::resizeViewers() {
// width of the label string
int w;
Style& s = *v->getStyle();
String text = tr(*set->game, s.fieldP->name, capitalize_sentence(s.fieldP->name));
String text = tr(*set->game, s.fieldP->name, capitalize_sentence);
dc.GetTextExtent(text,&w,nullptr);
label_width = max(label_width, w + label_margin);
}