mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
l10n: Eliminated some column labels
This commit is contained in:
parent
c94f481f2a
commit
3df06e6482
11 changed files with 23 additions and 124 deletions
|
@ -27,7 +27,6 @@
|
|||
#include <cmake.h>
|
||||
#include <ColStatus.h>
|
||||
#include <format.h>
|
||||
#include <i18n.h>
|
||||
#include <utf8.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -37,8 +36,8 @@ ColumnStatus::ColumnStatus ()
|
|||
_style = "long";
|
||||
_label = "Status";
|
||||
_styles = {"long", "short"};
|
||||
_examples = {STRING_COLUMN_LABEL_STAT_PE,
|
||||
STRING_COLUMN_LABEL_STAT_P};
|
||||
_examples = {"Pending",
|
||||
"P"};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -49,7 +48,7 @@ void ColumnStatus::setStyle (const std::string& value)
|
|||
Column::setStyle (value);
|
||||
|
||||
if (_style == "short" && _label == "Status")
|
||||
_label = STRING_COLUMN_LABEL_STAT;
|
||||
_label = "St";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -62,15 +61,15 @@ void ColumnStatus::measure (Task& task, unsigned int& minimum, unsigned int& max
|
|||
_style == "long")
|
||||
{
|
||||
if (status == Task::pending)
|
||||
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_PE);
|
||||
minimum = maximum = utf8_width ("Pending");
|
||||
else if (status == Task::deleted)
|
||||
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_DE);
|
||||
minimum = maximum = utf8_width ("Deleted");
|
||||
else if (status == Task::waiting)
|
||||
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_WA);
|
||||
minimum = maximum = utf8_width ("Waiting");
|
||||
else if (status == Task::completed)
|
||||
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_CO);
|
||||
minimum = maximum = utf8_width ("Completed");
|
||||
else if (status == Task::recurring)
|
||||
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_RE);
|
||||
minimum = maximum = utf8_width ("Recurring");
|
||||
}
|
||||
else if (_style == "short")
|
||||
minimum = maximum = 1;
|
||||
|
@ -89,20 +88,20 @@ void ColumnStatus::render (
|
|||
if (_style == "default" ||
|
||||
_style == "long")
|
||||
{
|
||||
if (status == Task::pending) value = STRING_COLUMN_LABEL_STAT_PE;
|
||||
else if (status == Task::completed) value = STRING_COLUMN_LABEL_STAT_CO;
|
||||
else if (status == Task::deleted) value = STRING_COLUMN_LABEL_STAT_DE;
|
||||
else if (status == Task::waiting) value = STRING_COLUMN_LABEL_STAT_WA;
|
||||
else if (status == Task::recurring) value = STRING_COLUMN_LABEL_STAT_RE;
|
||||
if (status == Task::pending) value = "Pending";
|
||||
else if (status == Task::completed) value = "Completed";
|
||||
else if (status == Task::deleted) value = "Deleted";
|
||||
else if (status == Task::waiting) value = "Waiting";
|
||||
else if (status == Task::recurring) value = "Recurring";
|
||||
}
|
||||
|
||||
else if (_style == "short")
|
||||
{
|
||||
if (status == Task::pending) value = STRING_COLUMN_LABEL_STAT_P;
|
||||
else if (status == Task::completed) value = STRING_COLUMN_LABEL_STAT_C;
|
||||
else if (status == Task::deleted) value = STRING_COLUMN_LABEL_STAT_D;
|
||||
else if (status == Task::waiting) value = STRING_COLUMN_LABEL_STAT_W;
|
||||
else if (status == Task::recurring) value = STRING_COLUMN_LABEL_STAT_R;
|
||||
if (status == Task::pending) value = "P";
|
||||
else if (status == Task::completed) value = "C";
|
||||
else if (status == Task::deleted) value = "D";
|
||||
else if (status == Task::waiting) value = "W";
|
||||
else if (status == Task::recurring) value = "R";
|
||||
}
|
||||
|
||||
renderStringLeft (lines, width, color, value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue