There are a whole lot more of these.
I fixed most of them with the attached patches, but they haven't been
committed yet.
We also need to look at the terminology mismatches between the lintypes
file and the modules. If one of the devs could tell me which of these
two we consider canon, I'll be happy to provide a patch.
e.g. Water well <> Water tower
We should also make up our minds regarding the naming of forest/commune,
heavy industry/steel works. I went for "forest" and "steel works" in my
translation.
06/02/2014 20:47, sgrìobh ASM:
I found many problems with localization.
For example commit 746014664f059192373f245ec72a0d5647c0e0d0 by cman79:
+ mps_store_sddp(i++, "Fertility", ugwCount, 4);
+ mps_store_sfp(i++,"busy", (float)busy);
+ mps_store_sddp(i++, _("Pollution"), world(x,y)->pollution,
MAX_POLLUTION_AT_WATERWELL);
Why is "Fertility" without gettext?
---
Best regards,
Leonid Myravjev
On 7 February 2014 00:13, ASM <a...@asm.pp.ru> wrote:
Hi folks!
I decided to fix and update Russian translation.
But I found that the localization was broken by cman79 at Commit 1c89e436:
- case UserOperation::ACTION_QUERY:
- tooltip << _( "Query Tool" ); break;
+ case ACTION_QUERY:
+ tooltip << "Query Tool" ; break;
Why did you do this?
Please return it back.
P.S> BerliOS close soon. Where will be Lincity moved? To github?
---
Best regards,
Leonid Myravjev
_______________________________________________
Lincity-ng-devel mailing list
Lincity-ng-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/lincity-ng-devel
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4259 / Virus Database: 3697/7070 - Release Date: 02/07/14
Index: src/lincity/UserOperation.cpp
===================================================================
--- src/lincity/UserOperation.cpp (revision 1815)
+++ src/lincity/UserOperation.cpp (working copy)
@@ -1,6 +1,7 @@
#include "UserOperation.h"
#include <iostream>
#include "lin-city.h"
+#include "tinygettext/gettext.hpp"
static int last_warning_message_group = 0;
@@ -77,30 +78,30 @@
switch(action)
{
case ACTION_QUERY:
- tooltip << "Query Tool" ; break;
+ tooltip << _("Query Tool") ; break;
case ACTION_BUILD:
- tooltip << constructionGroup->name;
+ tooltip << _(constructionGroup->name);
switch(constructionGroup->group)
{
- case GROUP_RESIDENCE_LL: tooltip << ": 50 tenants, low
birthrate, high deathrate" ; break;
- case GROUP_RESIDENCE_ML: tooltip << ": 100 tenants, high
birthrate, low deathrate" ; break;
- case GROUP_RESIDENCE_HL: tooltip << ": 200 tenants, high
birthrate, high deathrate" ; break;
- case GROUP_RESIDENCE_LH: tooltip << ": 100 tenants, low
birthrate, high deathrate" ; break;
- case GROUP_RESIDENCE_MH: tooltip << ": 200 tenants, high
birthrate, low deathrate" ; break;
- case GROUP_RESIDENCE_HH: tooltip << ": 400 tenants, high
birthrate, high deathrate" ;
+ case GROUP_RESIDENCE_LL: tooltip << _(": 50 tenants, low
birthrate, high deathrate") ; break;
+ case GROUP_RESIDENCE_ML: tooltip << _(": 100 tenants, high
birthrate, low deathrate") ; break;
+ case GROUP_RESIDENCE_HL: tooltip << _(": 200 tenants, high
birthrate, high deathrate") ; break;
+ case GROUP_RESIDENCE_LH: tooltip << _(": 100 tenants, low
birthrate, high deathrate") ; break;
+ case GROUP_RESIDENCE_MH: tooltip << _(": 200 tenants, high
birthrate, low deathrate") ; break;
+ case GROUP_RESIDENCE_HH: tooltip << _(": 400 tenants, high
birthrate, high deathrate") ;
}
break;
case ACTION_BULLDOZE:
- tooltip << "Bulldozer" ; break;
+ tooltip << _("Bulldozer") ; break;
case ACTION_EVACUATE:
- tooltip << "Evacuate" ; break;
+ tooltip << _("Evacuate") ; break;
case ACTION_FLOOD:
- tooltip << "Water" ; break;
+ tooltip << _("Water") ; break;
default:
- tooltip << "unknown useroperation";
+ tooltip << _("unknown user operation");
}
if( !root ){
- tooltip << " [Click right for help.]";
+ tooltip << _(" [Click right for help.]");
}
return tooltip.str();
}
Index: src/lincity-ng/MpsInterface.cpp
===================================================================
--- src/lincity-ng/MpsInterface.cpp (revision 1815)
+++ src/lincity-ng/MpsInterface.cpp (working copy)
@@ -127,11 +127,11 @@
mps_store_sdd(0,world(mps_x,
mps_y)->getTileConstructionGroup()->name, mps_x, mps_y);
//mps_store_sdd(0,main_groups[world(mps_x,
mps_y)->getGroup()].name, mps_x, mps_y);
- mps_store_title(2, "no further information available"
);
+ mps_store_title(2, _("no further information
available"));
if( world(mps_x, mps_y)->is_bare() )
{
- mps_store_title(8,"build something here" );
+ mps_store_title(8, _("build something here"));
}
/*#ifdef DEBUG
mps_store_sd(10, "x", mps_x);
@@ -433,48 +433,48 @@
int cashflow = 0;
currentMPS = globalMPS;
- mps_store_title(i++,"Tax Income");
+ mps_store_title(i++,_("Tax Income"));
cashflow += ly_income_tax;
num_to_ansi (s, sizeof(s), ly_income_tax);
- mps_store_ss(i++,"Income", s);
+ mps_store_ss(i++,_("Income"), s);
cashflow += ly_coal_tax;
num_to_ansi(s, sizeof(s), ly_coal_tax);
- mps_store_ss(i++,"Coal", s);
+ mps_store_ss(i++,_("Coal"), s);
cashflow += ly_goods_tax;
num_to_ansi(s, sizeof(s), ly_goods_tax);
- mps_store_ss(i++,"Goods", s);
+ mps_store_ss(i++,_("Goods"), s);
cashflow += ly_export_tax;
num_to_ansi(s, sizeof(s), ly_export_tax);
- mps_store_ss(i++,"Export", s);
+ mps_store_ss(i++,_("Export"), s);
mps_store_title(i++, "");
- mps_store_title(i++,"Expenses");
+ mps_store_title(i++,_("Expenses"));
cashflow -= ly_unemployment_cost;
num_to_ansi(s, sizeof(s), ly_unemployment_cost);
- mps_store_ss(i++,"Unemp.", s);
+ mps_store_ss(i++,_("Unemp."), s);
cashflow -= ly_transport_cost;
num_to_ansi(s, sizeof(s), ly_transport_cost);
- mps_store_ss(i++,"Transport", s);
+ mps_store_ss(i++,_("Transport"), s);
cashflow -= ly_import_cost;
num_to_ansi(s, sizeof(s), ly_import_cost);
- mps_store_ss(i++,"Imports", s);
+ mps_store_ss(i++,_("Imports"), s);
cashflow -= ly_other_cost;
num_to_ansi(s, sizeof(s), ly_other_cost);
- mps_store_ss(i++,"Others", s);
+ mps_store_ss(i++,_("Others"), s);
mps_store_title(i++, "" );
num_to_ansi(s, sizeof(s), cashflow);
- mps_store_ss(i++,"Net", s);
+ mps_store_ss(i++,_("Net"), s);
currentMPS = 0;
}
@@ -486,34 +486,34 @@
char s[12];
currentMPS = globalMPS;
- mps_store_title(i++,"Other Costs");
+ mps_store_title(i++,_("Other Costs"));
/* Don't write year if it's negative. */
year = (total_time / NUMOF_DAYS_IN_YEAR) - 1;
if (year >= 0) {
- mps_store_sd(i++, "For year", year);
+ mps_store_sd(i++, _("For year"), year);
}
mps_store_title(i++,"");
num_to_ansi(s,sizeof(s),ly_interest);
- mps_store_ss(i++,"Interest",s);
+ mps_store_ss(i++,_("Interest"),s);
num_to_ansi(s,sizeof(s),ly_school_cost);
- mps_store_ss(i++,"Schools",s);
+ mps_store_ss(i++,_("Schools"),s);
num_to_ansi(s,sizeof(s),ly_university_cost);
- mps_store_ss(i++,"Univers.",s);
+ mps_store_ss(i++,_("Univers."),s);
num_to_ansi(s,sizeof(s),ly_deaths_cost);
- mps_store_ss(i++,"Deaths",s);
+ mps_store_ss(i++,_("Deaths"),s);
num_to_ansi(s,sizeof(s),ly_windmill_cost);
- mps_store_ss(i++,"Windmill",s);
+ mps_store_ss(i++,_("Windmill"),s);
num_to_ansi(s,sizeof(s),ly_health_cost);
- mps_store_ss(i++,"Hospital",s);
+ mps_store_ss(i++,_("Hospital"),s);
num_to_ansi(s,sizeof(s),ly_rocket_pad_cost);
- mps_store_ss(i++,"Rockets",s);
+ mps_store_ss(i++,_("Rockets"),s);
num_to_ansi(s,sizeof(s),ly_fire_cost);
- mps_store_ss(i++,"Fire Stn",s);
+ mps_store_ss(i++,_("Fire Stn"),s);
num_to_ansi(s,sizeof(s),ly_cricket_cost);
- mps_store_ss(i++,"Sport",s);
+ mps_store_ss(i++,_("Sport"),s);
num_to_ansi(s,sizeof(s),ly_recycle_cost);
- mps_store_ss(i++,"Recycle",s);
+ mps_store_ss(i++,_("Recycle"),s);
currentMPS = 0;
}
@@ -527,21 +527,21 @@
currentMPS = globalMPS;
- mps_store_title(i++,"Population");
+ mps_store_title(i++,_("Population"));
mps_store_title(i++,"");
- mps_store_sd(i++,"Total",tp);
- mps_store_sd(i++,"Housed",population);
- mps_store_sd(i++,"Homeless",people_pool);
- mps_store_sd(i++,"Shanties",Counted<Shanty>::getInstanceCount());
- mps_store_sd(i++,"Unnat. Deaths",unnat_deaths);
- mps_store_title(i++,"Unemployment");
- mps_store_sd(i++,"Claims",tunemployed_population/days);
- mps_store_sfp(i++,"Rate",
+ mps_store_sd(i++,_("Total"),tp);
+ mps_store_sd(i++,_("Housed"),population);
+ mps_store_sd(i++,_("Homeless"),people_pool);
+ mps_store_sd(i++,_("Shanties"),Counted<Shanty>::getInstanceCount());
+ mps_store_sd(i++,_("Unnat. Deaths"),unnat_deaths);
+ mps_store_title(i++,_("Unemployment"));
+ mps_store_sd(i++,_("Claims"),tunemployed_population/days);
+ mps_store_sfp(i++,_("Rate"),
(((tunemployed_population/days) * 100.0) / tp));
- mps_store_title(i++,"Starvation");
- mps_store_sd(i++,"Cases",tstarving_population/days);
+ mps_store_title(i++,_("Starvation"));
+ mps_store_sd(i++,_("Cases"),tstarving_population/days);
- mps_store_sfp(i++,"Rate",
+ mps_store_sfp(i++,_("Rate"),
(((tstarving_population/days) * 100.0) / tp));
currentMPS = 0;
Index: src/lincity-ng/Dialog.cpp
===================================================================
--- src/lincity-ng/Dialog.cpp (revision 1815)
+++ src/lincity-ng/Dialog.cpp (working copy)
@@ -370,41 +370,41 @@
if (cheat_flag){
setParagraphN( "statistic_text", line++, _("----- IN TEST MODE
-------") );
}
- snprintf (outf, maxlength,"%s %s", _("Game statistics from LinCity-NG
Version"), PACKAGE_VERSION);
+ snprintf (outf, maxlength, _("Game statistics from LinCity-NG Version
%s"), PACKAGE_VERSION);
setParagraphN( "statistic_text", line++, outf );
if (strlen (given_scene) > 3){
- snprintf (outf, maxlength,"%s - %s", _("Initial loaded scene"),
given_scene);
+ snprintf (outf, maxlength, _("Initial loaded scene - %s"),
given_scene);
setParagraphN( "statistic_text", line++, outf );
}
if (sustain_flag){
snprintf (outf, maxlength, "%s", _("Economy is sustainable"));
setParagraphN( "statistic_text", line++, outf );
}
- snprintf (outf, maxlength, "%s %d %s %d %s.",
- _("Population"), population + people_pool, _("of which"),
people_pool, _("are not housed"));
+ snprintf (outf, maxlength, _("Population: %1$d, of which %2$d are not
housed"),
+ population + people_pool, people_pool);
setParagraphN( "statistic_text", line++, outf );
- snprintf (outf, maxlength, "%s %d %s %d %s %d",
+ snprintf (outf, maxlength, "%s: %d %s: %d %s: %d",
_("Max population"), max_pop_ever, _("Number evacuated"),
total_evacuated, _("Total births"), total_births);
setParagraphN( "statistic_text", line++, outf );
- snprintf (outf, maxlength, "%s %s %04d %s %8d %s %5.1f (%5.1f)",
+ snprintf (outf, maxlength, "%s: %s %04d %s: %8d %s: %5.1f (%5.1f)",
_("Date"), current_month(total_time), current_year(total_time),
_("Money"), total_money, _("Tech-level"),
(float) tech_level * 100.0 / MAX_TECH_LEVEL,
(float) highest_tech_level * 100.0 / MAX_TECH_LEVEL);
setParagraphN( "statistic_text", line++, outf );
- snprintf (outf, maxlength, "%s %7d %s %8.3f",
+ snprintf (outf, maxlength, "%s: %7d %s: %8.3f",
_("Deaths by starvation"), total_starve_deaths,
_("History"), starve_deaths_history);
setParagraphN( "statistic_text", line++, outf );
- snprintf (outf, maxlength, "%s %7d %s %8.3f",
+ snprintf (outf, maxlength, "%s: %7d %s: %8.3f",
_("Deaths from pollution"), total_pollution_deaths,
_("History"), pollution_deaths_history);
setParagraphN( "statistic_text", line++, outf );
- snprintf (outf, maxlength, "%s %7d %s %8.3f",
+ snprintf (outf, maxlength, "%s: %7d %s: %8.3f",
_("Years of unemployment"), total_unemployed_years,
_("History"), unemployed_history);
setParagraphN( "statistic_text", line++, outf );
- snprintf (outf, maxlength, "%s %2d %s %2d",
+ snprintf (outf, maxlength, "%s: %2d %s: %2d",
_("Rockets launched"), rockets_launched,
_("Successful launches"), rockets_launched_success);
setParagraphN( "statistic_text", line++, outf );
_______________________________________________
Lincity-ng-devel mailing list
Lincity-ng-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/lincity-ng-devel