[Freeciv-Dev] Re: Using gettext in client/helpdata.c (PR#1744)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke <rf13@xxxxxxxxxxxxxxxxx> writes:
> On Mon, Jul 15, 2002 at 12:14:25PM -0700, SAWADA Katsuya wrote:
>> Following humble patch makes translation easily.
>> Old style is no good because I can't swap word order.
>
> This isn't pretty. Can't we just reformulate it to avoid this?
> Something like: "unit has to be in a city after %d turns".
How about this?
I am not native English speaker, so if there is something wrong,
please rewrite the sentence.
--
SAWADA, Katsuya
--- helpdata.c.~1.52.~ Fri Mar 29 07:37:42 2002
+++ helpdata.c Tue Jul 16 06:02:49 2002
@@ -695,22 +695,29 @@
" or has a 50%% risk of being lost at sea."));
}
if (utype->fuel>0) {
- sprintf(buf+strlen(buf), _("* Must end "));
- if (utype->fuel==2) {
- sprintf(buf+strlen(buf), _("second "));
- } else if (utype->fuel==3) {
- sprintf(buf+strlen(buf), _("third "));
- } else if (utype->fuel>=4) {
- sprintf(buf+strlen(buf), _("%dth "), utype->fuel);
- }
- /* FIXME: should use something like get_units_with_flag_string() */
- sprintf(buf+strlen(buf), _("turn in a city, or on a Carrier"));
+ char mcarrier_buf[128]="";
+ char *carrier=get_units_with_flag_string(F_CARRIER);
if (unit_type_flag(i, F_MISSILE) &&
num_role_units(F_MISSILE_CARRIER)>0 &&
get_unit_type(get_role_unit(F_MISSILE_CARRIER,0))->transport_capacity >
0) {
- sprintf(buf+strlen(buf), _(" or Submarine"));
+ char *mcarrier=get_units_with_flag_string(F_MISSILE_CARRIER);
+ snprintf(mcarrier_buf, sizeof(mcarrier_buf),
+ /* TRANS: %1$s may be 'Submarine' */
+ Q_("?help_unit_describe: or %s"), mcarrier);
+ free(mcarrier);
+ } else {
+ snprintf(mcarrier_buf, sizeof(mcarrier_buf),
+ Q_("?help_unit_describe:"));
}
- sprintf(buf+strlen(buf), _(", or will run out of fuel and be lost.\n"));
+
+ sprintf(buf+strlen(buf),
+ /* TRANS: %1$s may be 'Carrier', %2$s is '?help_unit_describe:' */
+ PL_("* Unit has to be in a city, or on a %s%s"
+ " after %d turn.\n",
+ "* Unit has to be in a city, or on a %s%s"
+ " after %d turns.\n", utype->fuel),
+ carrier, mcarrier_buf, utype->fuel);
+ free(carrier);
}
if (strlen(buf) > 0) {
sprintf(buf+strlen(buf), "\n");
|
|