I18N - Att, text
- Added localization messages. - Changed wording in ChangeLog.
This commit is contained in:
@@ -21,10 +21,9 @@
|
||||
+ Custom reports now support a more compact form of the "age" column,
|
||||
called "age_compact" (thanks to T. Charles Yun).
|
||||
+ Removed obsolete DEVELOPERS file. The online support forums at
|
||||
http://taskwarrior.org will be able to provide better information.
|
||||
+ Replaced references to old websites and online groups with
|
||||
http://taskwarrior.org.
|
||||
+ Replaced references to old contact address with support@taskwarrior.org.
|
||||
http://taskwarrior.org will provide better information.
|
||||
+ Replaced website references with http://taskwarrior.org.
|
||||
+ Replaced contact references with support@taskwarrior.org.
|
||||
|
||||
------ old releases ------------------------------
|
||||
|
||||
|
||||
54
src/Att.cpp
54
src/Att.cpp
@@ -102,7 +102,7 @@ bool Att::parse (Nibbler& n)
|
||||
if (n.getUntilOneOf (".:", mName))
|
||||
{
|
||||
if (mName.length () == 0)
|
||||
throw std::string ("Missing attribute name");
|
||||
throw std::string ("Missing attribute name"); // TODO i18n
|
||||
|
||||
while (n.skip ('.'))
|
||||
{
|
||||
@@ -112,10 +112,10 @@ bool Att::parse (Nibbler& n)
|
||||
if (validMod (mod))
|
||||
mMods.push_back (mod);
|
||||
else
|
||||
throw std::string ("The name '") + mod + "' is not a valid modifier";
|
||||
throw std::string ("The name '") + mod + "' is not a valid modifier"; // TODO i18n
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing . or : after modifier");
|
||||
throw std::string ("Missing . or : after modifier"); // TODO i18n
|
||||
}
|
||||
|
||||
if (n.skip (':'))
|
||||
@@ -129,13 +129,13 @@ bool Att::parse (Nibbler& n)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing attribute value");
|
||||
throw std::string ("Missing attribute value"); // TODO i18n
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing : after attribute name");
|
||||
throw std::string ("Missing : after attribute name"); // TODO i18n
|
||||
}
|
||||
else
|
||||
throw std::string ("Missing : after attribute name");
|
||||
throw std::string ("Missing : after attribute name"); // TODO i18n
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -168,27 +168,27 @@ bool Att::match (const Att& other) const
|
||||
foreach (mod, mMods)
|
||||
{
|
||||
// is = equal.
|
||||
if (*mod == "is")
|
||||
if (*mod == "is") // TODO i18n
|
||||
if (mValue != other.mValue)
|
||||
return false;
|
||||
|
||||
// isnt = not equal.
|
||||
if (*mod == "isnt")
|
||||
if (*mod == "isnt") // TODO i18n
|
||||
if (mValue == other.mValue)
|
||||
return false;
|
||||
|
||||
// any = any value, but not empty value.
|
||||
if (*mod == "any")
|
||||
if (*mod == "any") // TODO i18n
|
||||
if (other.mValue == "")
|
||||
return false;
|
||||
|
||||
// none = must have empty value.
|
||||
if (*mod == "none")
|
||||
if (*mod == "none") // TODO i18n
|
||||
if (other.mValue != "")
|
||||
return false;
|
||||
|
||||
// startswith = first characters must match.
|
||||
if (*mod == "startswith")
|
||||
if (*mod == "startswith") // TODO i18n
|
||||
{
|
||||
if (other.mValue.length () < mValue.length ())
|
||||
return false;
|
||||
@@ -198,7 +198,7 @@ bool Att::match (const Att& other) const
|
||||
}
|
||||
|
||||
// endswith = last characters must match.
|
||||
if (*mod == "endswith")
|
||||
if (*mod == "endswith") // TODO i18n
|
||||
{
|
||||
if (other.mValue.length () < mValue.length ())
|
||||
return false;
|
||||
@@ -210,12 +210,12 @@ bool Att::match (const Att& other) const
|
||||
}
|
||||
|
||||
// has = contains as a substring.
|
||||
if (*mod == "has")
|
||||
if (*mod == "has") // TODO i18n
|
||||
if (other.mValue.find (mValue) == std::string::npos)
|
||||
return false;
|
||||
|
||||
// hasnt = does not contain as a substring.
|
||||
if (*mod == "hasnt")
|
||||
if (*mod == "hasnt") // TODO i18n
|
||||
if (other.mValue.find (mValue) != std::string::npos)
|
||||
return false;
|
||||
|
||||
@@ -258,7 +258,7 @@ void Att::addMod (const std::string& mod)
|
||||
if (validMod (mod))
|
||||
mMods.push_back (mod);
|
||||
else
|
||||
throw std::string ("The name '") + mod + "' is not a valid modifier";
|
||||
throw std::string ("The name '") + mod + "' is not a valid modifier"; // TODO i18n
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -336,22 +336,22 @@ void Att::encode (std::string& value) const
|
||||
std::string::size_type i;
|
||||
|
||||
while ((i = value.find ('\t')) != std::string::npos)
|
||||
value.replace (i, 1, "&tab;");
|
||||
value.replace (i, 1, "&tab;"); // no i18n
|
||||
|
||||
while ((i = value.find ('"')) != std::string::npos)
|
||||
value.replace (i, 1, """);
|
||||
value.replace (i, 1, """); // no i18n
|
||||
|
||||
while ((i = value.find (',')) != std::string::npos)
|
||||
value.replace (i, 1, ",");
|
||||
value.replace (i, 1, ","); // no i18n
|
||||
|
||||
while ((i = value.find ('[')) != std::string::npos)
|
||||
value.replace (i, 1, "&open;");
|
||||
value.replace (i, 1, "&open;"); // no i18n
|
||||
|
||||
while ((i = value.find (']')) != std::string::npos)
|
||||
value.replace (i, 1, "&close;");
|
||||
value.replace (i, 1, "&close;"); // no i18n
|
||||
|
||||
while ((i = value.find (':')) != std::string::npos)
|
||||
value.replace (i, 1, ":");
|
||||
value.replace (i, 1, ":"); // no i18n
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -366,22 +366,22 @@ void Att::decode (std::string& value) const
|
||||
{
|
||||
std::string::size_type i;
|
||||
|
||||
while ((i = value.find ("&tab;")) != std::string::npos)
|
||||
while ((i = value.find ("&tab;")) != std::string::npos) // no i18n
|
||||
value.replace (i, 5, "\t");
|
||||
|
||||
while ((i = value.find (""")) != std::string::npos)
|
||||
while ((i = value.find (""")) != std::string::npos) // no i18n
|
||||
value.replace (i, 6, "\"");
|
||||
|
||||
while ((i = value.find (",")) != std::string::npos)
|
||||
while ((i = value.find (",")) != std::string::npos) // no i18n
|
||||
value.replace (i, 7, ",");
|
||||
|
||||
while ((i = value.find ("&open;")) != std::string::npos)
|
||||
while ((i = value.find ("&open;")) != std::string::npos) // no i18n
|
||||
value.replace (i, 6, "[");
|
||||
|
||||
while ((i = value.find ("&close;")) != std::string::npos)
|
||||
while ((i = value.find ("&close;")) != std::string::npos) // no i18n
|
||||
value.replace (i, 7, "]");
|
||||
|
||||
while ((i = value.find (":")) != std::string::npos)
|
||||
while ((i = value.find (":")) != std::string::npos) // no i18n
|
||||
value.replace (i, 7, ":");
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -298,7 +298,7 @@ std::string upperCase (const std::string& input)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const char* optionalBlankLine ()
|
||||
{
|
||||
if (context.config.get ("blanklines", true) == true)
|
||||
if (context.config.get ("blanklines", true) == true) // no i18n
|
||||
return newline;
|
||||
|
||||
return noline;
|
||||
|
||||
Reference in New Issue
Block a user