Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion db/db.select/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int main(int argc, char **argv)
}

if (parms.test_only)
G_verbose_message(_("Test %s."), stat ? _("failed") : _("succeeded"));
G_verbose_message(stat ? _("Test failed.") : _("Test succeeded."));

db_close_database(driver);
db_shutdown_driver(driver);
Expand Down
2 changes: 1 addition & 1 deletion display/d.legend/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void draw(const char *map_name, int maptype, int color, int thin, int lines,
"Nothing to draw! (no categories with labels? out of range?)"));
}

/* Figure number of lines, number of pixles per line and text size */
/* Figure number of lines, number of pixels per line and text size */
dots_per_line = ((y1 - y0) / lines);

/* switch to a smooth legend for CELL maps with too many cats */
Expand Down
6 changes: 3 additions & 3 deletions gui/wxpython/rlisetup/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,11 +1855,11 @@ def newCat(self):
GError(
parent=self,
message=_(
"The raster map <%s> already exists."
"The raster map <{map_name}> already exists."
" Please remove or rename the maps "
"with the prefix '%s' or select the "
"with the prefix '{prefix}' or select the "
"option to overwrite existing maps"
).format(self.outname, self.outpref),
).format(map_name=self.outname, prefix=self.outpref),
)
self.parent.wizard.ShowPage(self.parent.samplingareapage)
return
Expand Down
5 changes: 3 additions & 2 deletions gui/wxpython/vnet/vnet_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,9 @@ def _runAn(self, analysis, output, params, flags, catPts):
if len(catPts[cat[0]]) < 1:
GMessage(
parent=self,
message=_("Please choose '%s' and '%s' point.")
% (cats[0][1], cats[1][1]),
message=_("Please choose '{0}' and '{1}' point.").format(
cats[0][1], cats[1][1]
),
)
return False
else:
Expand Down
9 changes: 5 additions & 4 deletions imagery/i.landsat.toar/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,11 @@ int main(int argc, char *argv[])
nrows = Rast_window_rows();
ncols = Rast_window_cols();

G_important_message(_("Writing %s of <%s> to <%s>..."),
(frad->answer ? _("radiance")
: (lsat.band[i].thermal) ? _("temperature")
: _("reflectance")),
G_important_message((frad->answer
? _("Writing radiance of <%s> to <%s>...")
: (lsat.band[i].thermal)
? _("Writing temperature of <%s> to <%s>...")
: _("Writing reflectance of <%s> to <%s>...")),
band_in, band_out);
for (row = 0; row < nrows; row++) {
G_percent(row, nrows, 2);
Expand Down
4 changes: 2 additions & 2 deletions imagery/i.segment/region_growing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1382,8 +1382,8 @@ static int set_candidate_flag(struct ngbr_stats *head, int value,
G_debug(4, "set_candidate_flag");

if ((!(FLAG_GET(globals->candidate_flag, head->row, head->col))) != value) {
G_warning(_("Candidate flag is already %s"),
value ? _("set") : _("unset"));
G_warning(value ? _("Candidate flag is already set")
: _("Candidate flag is already unset"));
return FALSE;
}

Expand Down
132 changes: 110 additions & 22 deletions lib/gis/units.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,91 +206,179 @@ const char *G_get_units_name(int units, int plural, int square)
switch (units) {
case U_UNKNOWN:
if (square)
return plural ? _("square units") : _("square unit");
return plural
// GTC: localized area units
? _("square units")
// GTC: localized area units
: _("square unit");
else
return plural ? _("units") : _("unit");
return plural
// GTC: localized units
? _("units")
// GTC: localized units
: _("unit");
break;

case U_METERS:
if (square)
return plural ? _("square meters") : _("square meter");
return plural
// GTC: localized area units
? _("square meters")
// GTC: localized area units
: _("square meter");
else
return plural ? _("meters") : _("meter");
return plural
// GTC: localized units
? _("meters")
// GTC: localized units
: _("meter");
break;

case U_KILOMETERS:
if (square)
return plural ? _("square kilometers") : _("square kilometer");
return plural
// GTC: localized area units
? _("square kilometers")
// GTC: localized area units
: _("square kilometer");
else
return plural ? _("kilometers") : _("kilometer");
return plural
// GTC: localized units
? _("kilometers")
// GTC: localized units
: _("kilometer");
break;

case U_ACRES:
if (square)
return plural ? _("acres") : _("acre");
return plural
// GTC: localized area units
? _("acres")
// GTC: localized area units
: _("acre");
else
return G_get_units_name(G_units(G_database_unit_name(1)), plural,
square);
break;

case U_HECTARES:
if (square)
return plural ? _("hectares") : _("hectare");
return plural
// GTC: localized area units
? _("hectares")
// GTC: localized area units
: _("hectare");
else
return G_get_units_name(G_units(G_database_unit_name(1)), plural,
square);
break;

case U_MILES:
if (square)
return plural ? _("square miles") : _("square mile");
return plural
// GTC: localized area units
? _("square miles")
// GTC: localized area units
: _("square mile");
else
return plural ? _("miles") : _("mile");
return plural
// GTC: localized units
? _("miles")
// GTC: localized units
: _("mile");
break;

case U_FEET:
if (square)
return plural ? _("square feet") : _("square foot");
return plural
// GTC: localized area units, do not confuse with US feet
? _("square feet")
// GTC: localized area units, do not confuse with US foot
: _("square foot");
else
return plural ? _("feet") : _("foot");
return plural
// GTC: localized units, do not confuse with US feet
? _("feet")
// GTC: localized units, do not confuse with US foot
: _("foot");
break;

case U_USFEET:
if (square)
return plural ? _("square US feet") : _("square US foot");
return plural
// GTC: localized area units, do not confuse with feet
? _("square US feet")
// GTC: localized area units, do not confuse with foot
: _("square US foot");
else
return plural ? _("US feet") : _("US foot");
return plural
// GTC: localized units, do not confuse with feet
? _("US feet")
// GTC: localized units, do not confuse with foot
: _("US foot");
break;

case U_DEGREES:
if (square)
return plural ? _("square degrees") : _("square degree");
return plural
// GTC: localized area units
? _("square degrees")
// GTC: localized area units
: _("square degree");
else
return plural ? _("degrees") : _("degree");
return plural
// GTC: localized units
? _("degrees")
// GTC: localized units
: _("degree");
break;

case U_YEARS:
return plural ? _("years") : _("year");
return plural
// GTC: localized time units
? _("years")
// GTC: localized time units
: _("year");
break;

case U_MONTHS:
return plural ? _("months") : _("month");
return plural
// GTC: localized time units
? _("months")
// GTC: localized time units
: _("month");
break;

case U_DAYS:
return plural ? _("days") : _("day");
return plural
// GTC: localized time units
? _("days")
// GTC: localized time units
: _("day");
break;

case U_HOURS:
return plural ? _("hours") : _("hour");
return plural
// GTC: localized time units
? _("hours")
// GTC: localized time units
: _("hour");
break;

case U_MINUTES:
return plural ? _("minutes") : _("minute");
return plural
// GTC: localized time units
? _("minutes")
// GTC: localized time units
: _("minute");
break;

case U_SECONDS:
return plural ? _("seconds") : _("second");
return plural
// GTC: localized time units
? _("seconds")
// GTC: localized time units
: _("second");
break;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/htmldriver/graph_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* started-up, or otherwise initialized happens here. This is called only at
* the startup of the graphics driver.
*
* The external variables define the pixle limits of the graphics surface. The
* The external variables define the pixel limits of the graphics surface. The
* coordinate system used by the applications programs has the (0,0) origin
* in the upper left-hand corner. Hence,
* screen_left < screen_right
Expand Down
6 changes: 3 additions & 3 deletions lib/pngdriver/graph_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void map_file(void)
started-up, or otherwise initialized happens here. This is called only at
the startup of the graphics driver.

The external variables define the pixle limits of the graphics surface. The
The external variables define the pixel limits of the graphics surface. The
coordinate system used by the applications programs has the (0,0) origin
in the upper left-hand corner. Hence,
screen_left < screen_right
Expand All @@ -97,8 +97,8 @@ int PNG_Graph_set(void)
p = getenv("GRASS_RENDER_TRUECOLOR");
png.true_color = !p || strcmp(p, "FALSE") != 0;

G_verbose_message(_("png: truecolor status %s"),
png.true_color ? _("enabled") : _("disabled"));
G_verbose_message(png.true_color ? _("png: truecolor status enabled")
: _("png: truecolor status disabled"));

p = getenv("GRASS_RENDER_FILE_MAPPED");
do_map = p && strcmp(p, "TRUE") == 0;
Expand Down
6 changes: 3 additions & 3 deletions lib/psdriver/graph_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* started-up, or otherwise initialized happens here. This is called only at
* the startup of the graphics driver.
*
* The external variables define the pixle limits of the graphics surface. The
* The external variables define the pixel limits of the graphics surface. The
* coordinate system used by the applications programs has the (0,0) origin
* in the upper left-hand corner. Hence,
* screen_left < screen_right
Expand Down Expand Up @@ -193,8 +193,8 @@ int PS_Graph_set(void)
p = getenv("GRASS_RENDER_PS_TRAILER");
ps.no_trailer = p && strcmp(p, "FALSE") == 0;

G_verbose_message(_("ps: truecolor status %s"),
ps.true_color ? _("enabled") : _("disabled"));
G_verbose_message(ps.true_color ? _("ps: truecolor status enabled")
: _("ps: truecolor status disabled"));

get_paper();

Expand Down
2 changes: 1 addition & 1 deletion lib/raster/cats.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static CELL read_cats(const char *element, const char *name, const char *mapset,
if (!full) {
fclose(fd);
if (num < 0)
return 0; /* coorect */
return 0; /* correct */
return (CELL)num;
}

Expand Down
2 changes: 1 addition & 1 deletion raster/r.spread/spread.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ int cumulative(struct costHa *pres_cell, struct cell_ptrHa *to_cell,
return 0;
}

/****** function for updating the cumulative cost/time, possibaly ********
/****** function for updating the cumulative cost/time, possibly ********
****** back path x,y coordinates, both in the output(s) and the heap ********/

void update(struct costHa *pres_cell, int row, int col, double angle,
Expand Down
2 changes: 1 addition & 1 deletion raster/r.univar/r.univar_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int main(int argc, char *argv[])
G_fatal_error("Can not read range for zoning raster");
Rast_get_range_min_max(&zone_range, &min, &max);
if (Rast_read_cats(z, mapset, &(zone_info.cats)))
G_warning("no category support for zoning raster");
G_warning("No category support for zoning raster");

zone_info.min = min;
zone_info.max = max;
Expand Down
6 changes: 5 additions & 1 deletion scripts/v.db.renamecolumn/v.db.renamecolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ def main():

# old col there?
if not oldcoltype:
gs.fatal(_("Column <%s> not found in table <%s>") % (oldcol, table))
gs.fatal(
_("Column <{column_name}> not found in table <{table_name}>").format(
column_name=oldcol, table_name=table
)
)

# some tricks
if driver in {"sqlite", "dbf"}:
Expand Down
4 changes: 3 additions & 1 deletion scripts/v.import/v.import.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ def main():
not gs.overwrite()
and gs.find_file(output, element="vector", mapset=".")["mapset"]
):
gs.fatal(_("option <%s>: <%s> exists.") % ("output", output))
gs.fatal(
_("option <{key}>: <{value}> exists.").format(key="output", value=output)
)

if options["extent"] == "region":
gs.run_command("g.remove", type="vector", name=vreg, flags="f", quiet=True)
Expand Down
6 changes: 5 additions & 1 deletion scripts/v.pack/v.pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ def main():
)
try_remove(outfile)
else:
grass.fatal(_("option <%s>: <%s> exists.") % ("output", outfile))
grass.fatal(
_("option <{key}>: <{value}> exists.").format(
key="output", value=outfile
)
)

# prepare for packing
grass.verbose(_("Packing <%s>...") % (gfile["fullname"]))
Expand Down
Loading
Loading