I18N - Att, text

- Added localization messages.
- Changed wording in ChangeLog.
This commit is contained in:
Paul Beckingham 2009-06-06 15:30:58 -04:00
parent f43e47a739
commit 37dd592110
3 changed files with 31 additions and 32 deletions

View file

@ -21,10 +21,9 @@
+ Custom reports now support a more compact form of the "age" column, + Custom reports now support a more compact form of the "age" column,
called "age_compact" (thanks to T. Charles Yun). called "age_compact" (thanks to T. Charles Yun).
+ Removed obsolete DEVELOPERS file. The online support forums at + Removed obsolete DEVELOPERS file. The online support forums at
http://taskwarrior.org will be able to provide better information. http://taskwarrior.org will provide better information.
+ Replaced references to old websites and online groups with + Replaced website references with http://taskwarrior.org.
http://taskwarrior.org. + Replaced contact references with support@taskwarrior.org.
+ Replaced references to old contact address with support@taskwarrior.org.
------ old releases ------------------------------ ------ old releases ------------------------------

View file

@ -102,7 +102,7 @@ bool Att::parse (Nibbler& n)
if (n.getUntilOneOf (".:", mName)) if (n.getUntilOneOf (".:", mName))
{ {
if (mName.length () == 0) if (mName.length () == 0)
throw std::string ("Missing attribute name"); throw std::string ("Missing attribute name"); // TODO i18n
while (n.skip ('.')) while (n.skip ('.'))
{ {
@ -112,10 +112,10 @@ bool Att::parse (Nibbler& n)
if (validMod (mod)) if (validMod (mod))
mMods.push_back (mod); mMods.push_back (mod);
else 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 else
throw std::string ("Missing . or : after modifier"); throw std::string ("Missing . or : after modifier"); // TODO i18n
} }
if (n.skip (':')) if (n.skip (':'))
@ -129,13 +129,13 @@ bool Att::parse (Nibbler& n)
return true; return true;
} }
else else
throw std::string ("Missing attribute value"); throw std::string ("Missing attribute value"); // TODO i18n
} }
else else
throw std::string ("Missing : after attribute name"); throw std::string ("Missing : after attribute name"); // TODO i18n
} }
else else
throw std::string ("Missing : after attribute name"); throw std::string ("Missing : after attribute name"); // TODO i18n
return false; return false;
} }
@ -168,27 +168,27 @@ bool Att::match (const Att& other) const
foreach (mod, mMods) foreach (mod, mMods)
{ {
// is = equal. // is = equal.
if (*mod == "is") if (*mod == "is") // TODO i18n
if (mValue != other.mValue) if (mValue != other.mValue)
return false; return false;
// isnt = not equal. // isnt = not equal.
if (*mod == "isnt") if (*mod == "isnt") // TODO i18n
if (mValue == other.mValue) if (mValue == other.mValue)
return false; return false;
// any = any value, but not empty value. // any = any value, but not empty value.
if (*mod == "any") if (*mod == "any") // TODO i18n
if (other.mValue == "") if (other.mValue == "")
return false; return false;
// none = must have empty value. // none = must have empty value.
if (*mod == "none") if (*mod == "none") // TODO i18n
if (other.mValue != "") if (other.mValue != "")
return false; return false;
// startswith = first characters must match. // startswith = first characters must match.
if (*mod == "startswith") if (*mod == "startswith") // TODO i18n
{ {
if (other.mValue.length () < mValue.length ()) if (other.mValue.length () < mValue.length ())
return false; return false;
@ -198,7 +198,7 @@ bool Att::match (const Att& other) const
} }
// endswith = last characters must match. // endswith = last characters must match.
if (*mod == "endswith") if (*mod == "endswith") // TODO i18n
{ {
if (other.mValue.length () < mValue.length ()) if (other.mValue.length () < mValue.length ())
return false; return false;
@ -210,12 +210,12 @@ bool Att::match (const Att& other) const
} }
// has = contains as a substring. // has = contains as a substring.
if (*mod == "has") if (*mod == "has") // TODO i18n
if (other.mValue.find (mValue) == std::string::npos) if (other.mValue.find (mValue) == std::string::npos)
return false; return false;
// hasnt = does not contain as a substring. // hasnt = does not contain as a substring.
if (*mod == "hasnt") if (*mod == "hasnt") // TODO i18n
if (other.mValue.find (mValue) != std::string::npos) if (other.mValue.find (mValue) != std::string::npos)
return false; return false;
@ -258,7 +258,7 @@ void Att::addMod (const std::string& mod)
if (validMod (mod)) if (validMod (mod))
mMods.push_back (mod); mMods.push_back (mod);
else 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; std::string::size_type i;
while ((i = value.find ('\t')) != std::string::npos) 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) while ((i = value.find ('"')) != std::string::npos)
value.replace (i, 1, "&quot;"); value.replace (i, 1, "&quot;"); // no i18n
while ((i = value.find (',')) != std::string::npos) while ((i = value.find (',')) != std::string::npos)
value.replace (i, 1, "&comma;"); value.replace (i, 1, "&comma;"); // no i18n
while ((i = value.find ('[')) != std::string::npos) 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) 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) while ((i = value.find (':')) != std::string::npos)
value.replace (i, 1, "&colon;"); value.replace (i, 1, "&colon;"); // no i18n
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
@ -366,22 +366,22 @@ void Att::decode (std::string& value) const
{ {
std::string::size_type i; 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"); value.replace (i, 5, "\t");
while ((i = value.find ("&quot;")) != std::string::npos) while ((i = value.find ("&quot;")) != std::string::npos) // no i18n
value.replace (i, 6, "\""); value.replace (i, 6, "\"");
while ((i = value.find ("&comma;")) != std::string::npos) while ((i = value.find ("&comma;")) != std::string::npos) // no i18n
value.replace (i, 7, ","); 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, "["); 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, "]"); value.replace (i, 7, "]");
while ((i = value.find ("&colon;")) != std::string::npos) while ((i = value.find ("&colon;")) != std::string::npos) // no i18n
value.replace (i, 7, ":"); value.replace (i, 7, ":");
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View file

@ -298,7 +298,7 @@ std::string upperCase (const std::string& input)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
const char* optionalBlankLine () const char* optionalBlankLine ()
{ {
if (context.config.get ("blanklines", true) == true) if (context.config.get ("blanklines", true) == true) // no i18n
return newline; return newline;
return noline; return noline;