Opened 10 years ago

Closed 10 years ago

#2530 closed defect (fixed)

Barter tooltip not translated

Reported by: mimo Owned by:
Priority: Nice to Have Milestone: Alpha 17
Component: Internationalization & Localization Keywords:
Cc: Patch:

Description

Attachments (1)

barter.diff (687 bytes ) - added by Stan 10 years ago.
Fix for the string.

Download all attachments as: .zip

Change History (6)

by Stan, 10 years ago

Attachment: barter.diff added

Fix for the string.

comment:1 by sanderd17, 10 years ago

This won't work, as the string will never get extracted.

You need to make sure that both action and resource are translatable (or don't have to be translated), then use the sprintf style to combine them to one string.

So the first work is to find out where the strings come from, and either (if it's part of the GUI), translate them there, or (if it's part of the simulation), mark them for translation. For the latter, you still need to translate them in the GUI itself.

comment:2 by Stan, 10 years ago

Even with a temporary variable ?

comment:3 by sanderd17, 10 years ago

It will try to find something like "sell stone" in the po files, which it won't find (it's silly to have all combinations in it). Instead, the po file should contain all resource names (which it already does), and the sell/buy actions. Then it should search for a string like "%(action)s %(resourceType)s", which also needs to be translated, as some languages might reverse the order. And then fill in those variables with translated names.

But take a look at the wiki first. It's a bit hard to explain it all here.

Last edited 10 years ago by sanderd17 (previous) (diff)

comment:4 by Itms, 10 years ago

Keywords: simple added
Milestone: Alpha 17Alpha 18

comment:5 by sanderd17, 10 years ago

Keywords: simple removed
Milestone: Alpha 18Alpha 17
Resolution: fixed
Status: newclosed

I forgot about this ticket. It's already fixed.

Note: See TracTickets for help on using tickets.