Commit a077f97f authored by twanvl's avatar twanvl

Use locale to translate pack names things

parent 7d6fc3eb
...@@ -108,7 +108,7 @@ void PackTotalsPanel::draw(DC& dc) { ...@@ -108,7 +108,7 @@ void PackTotalsPanel::draw(DC& dc) {
int total = 0; int total = 0;
FOR_EACH(item, game->pack_items) { FOR_EACH(item, game->pack_items) {
int value = amounts[item->name]; int value = amounts[item->name];
drawItem(dc, y, item->name, value); drawItem(dc, y, tr(*game, item->name, capitalize), value);
total += value; total += value;
} }
// draw total // draw total
...@@ -123,11 +123,10 @@ void PackTotalsPanel::draw(DC& dc) { ...@@ -123,11 +123,10 @@ void PackTotalsPanel::draw(DC& dc) {
void PackTotalsPanel::drawItem(DC& dc, int& y, const String& name, int value) { void PackTotalsPanel::drawItem(DC& dc, int& y, const String& name, int value) {
wxSize size = dc.GetSize(); wxSize size = dc.GetSize();
int w,h; int w,h;
String cap_name = capitalize(name);
String amount; amount << value; String amount; amount << value;
dc.GetTextExtent(amount,&w,&h); dc.GetTextExtent(amount,&w,&h);
dc.DrawText(cap_name, 0, y); dc.DrawText(name, 0, y);
dc.DrawText(amount, size.x-w, y);//align right dc.DrawText(amount, size.x-w, y);//align right
y += h + 10; y += h + 10;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment