From 4f46332fa76336130c27896389e5dcdfa58466f8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 21 Jan 2018 12:27:29 -0500 Subject: [PATCH] l10n: Eliminated STRING_CMD_CAL_* --- src/commands/CmdCalendar.cpp | 15 +++++++-------- src/l10n/deu-DEU.h | 6 ------ src/l10n/eng-USA.h | 6 ------ src/l10n/epo-RUS.h | 6 ------ src/l10n/esp-ESP.h | 6 ------ src/l10n/fra-FRA.h | 6 ------ src/l10n/ita-ITA.h | 6 ------ src/l10n/jpn-JPN.h | 6 ------ src/l10n/pol-POL.h | 6 ------ src/l10n/por-PRT.h | 6 ------ 10 files changed, 7 insertions(+), 62 deletions(-) diff --git a/src/commands/CmdCalendar.cpp b/src/commands/CmdCalendar.cpp index e3d749ea9..a8b0d0c7c 100644 --- a/src/commands/CmdCalendar.cpp +++ b/src/commands/CmdCalendar.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -46,7 +45,7 @@ CmdCalendar::CmdCalendar () { _keyword = "calendar"; _usage = "task calendar [due| |] [y]"; - _description = STRING_CMD_CAL_USAGE; + _description = "Shows a calendar, with due tasks marked"; _read_only = true; _displays_id = true; _needs_gc = true; @@ -132,7 +131,7 @@ int CmdCalendar::execute (std::string& output) { argMonth = strtol (arg.c_str (), NULL, 10); if (argMonth < 1 || argMonth > 12) - throw format (STRING_CMD_CAL_BAD_MONTH, arg); + throw format ("Argument '{1}' is not a valid month.", arg); } // "January" etc. @@ -140,11 +139,11 @@ int CmdCalendar::execute (std::string& output) { argMonth = Datetime::monthOfYear (matches[0]); if (argMonth == -1) - throw format (STRING_CMD_CAL_BAD_MONTH, arg); + throw format ("Argument '{1}' is not a valid month.", arg); } else - throw format (STRING_CMD_CAL_BAD_ARG, arg); + throw format ("Could not recognize argument '{1}'.", arg); } // Supported combinations: @@ -366,8 +365,8 @@ int CmdCalendar::execute (std::string& output) { Table holTable; holTable.width (context.getWidth ()); - holTable.add (STRING_CMD_CAL_LABEL_DATE); - holTable.add (STRING_CMD_CAL_LABEL_HOL); + holTable.add ("Date"); + holTable.add ("Holiday"); setHeaderUnderline (holTable); std::map > hm; // we need to store multiple holidays per day @@ -425,7 +424,7 @@ std::string CmdCalendar::renderMonths ( // What day of the week does the user consider the first? auto weekStart = Datetime::dayOfWeek (context.config.get ("weekstart")); if (weekStart != 0 && weekStart != 1) - throw std::string (STRING_CMD_CAL_SUN_MON); + throw std::string ("The 'weekstart' configuration variable may only contain 'Sunday' or 'Monday'."); // Build table for the number of months to be displayed. Table view; diff --git a/src/l10n/deu-DEU.h b/src/l10n/deu-DEU.h index 6a6311a2a..2a49153e5 100644 --- a/src/l10n/deu-DEU.h +++ b/src/l10n/deu-DEU.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "Konnte Argument '{1}' nicht erkennen." -#define STRING_CMD_CAL_BAD_MONTH "Argument '{1}' ist kein zulässiger Monat." -#define STRING_CMD_CAL_LABEL_DATE "Datum" -#define STRING_CMD_CAL_LABEL_HOL "Feiertag" -#define STRING_CMD_CAL_SUN_MON "Die 'weekstart'-Konfigurationsoption darf nur 'Sunday' oder 'Monday' lauten." -#define STRING_CMD_CAL_USAGE "Zeigt einen Kalender mit hervorgehobenen fälligen Aufgaben" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Listet ausschließlich alle genutzten Schlagwörter zur Auto-Vervollständigung" #define STRING_CMD_CUSTOM_COUNT "1 Aufgabe" diff --git a/src/l10n/eng-USA.h b/src/l10n/eng-USA.h index b92be0ffd..d627dab04 100644 --- a/src/l10n/eng-USA.h +++ b/src/l10n/eng-USA.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "Could not recognize argument '{1}'." -#define STRING_CMD_CAL_BAD_MONTH "Argument '{1}' is not a valid month." -#define STRING_CMD_CAL_LABEL_DATE "Date" -#define STRING_CMD_CAL_LABEL_HOL "Holiday" -#define STRING_CMD_CAL_SUN_MON "The 'weekstart' configuration variable may only contain 'Sunday' or 'Monday'." -#define STRING_CMD_CAL_USAGE "Shows a calendar, with due tasks marked" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Shows only a list of all tags used, for autocompletion purposes" #define STRING_CMD_CUSTOM_COUNT "1 task" diff --git a/src/l10n/epo-RUS.h b/src/l10n/epo-RUS.h index 40109561d..5df8cf24a 100644 --- a/src/l10n/epo-RUS.h +++ b/src/l10n/epo-RUS.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "Ne povis rekoni argumenton '{1}'." -#define STRING_CMD_CAL_BAD_MONTH "Argumento '{1}' ne estas valida monato." -#define STRING_CMD_CAL_LABEL_DATE "Dato" -#define STRING_CMD_CAL_LABEL_HOL "Ferio" -#define STRING_CMD_CAL_SUN_MON "agordvariablo 'weekstart' devas esti 'Sunday' aŭ 'Monday'." -#define STRING_CMD_CAL_USAGE "Montras kalendaron, kun markoj por datlimitaj taskoj" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Montras sole listo de ĉia uzata etikedo, por motivo memkompletada" #define STRING_CMD_CUSTOM_COUNT "1 tasko" diff --git a/src/l10n/esp-ESP.h b/src/l10n/esp-ESP.h index 7dc678e33..392d28c84 100644 --- a/src/l10n/esp-ESP.h +++ b/src/l10n/esp-ESP.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "No se pudo reconocer el argumento '{1}'." -#define STRING_CMD_CAL_BAD_MONTH "El argumento '{1}' no es un mes válido." -#define STRING_CMD_CAL_LABEL_DATE "Fecha" -#define STRING_CMD_CAL_LABEL_HOL "Festivo" -#define STRING_CMD_CAL_SUN_MON "La variable de configuración 'weekstart' solamente puede contener 'domingo' o 'lunes'." -#define STRING_CMD_CAL_USAGE "Muestra un calendario con las tareas fechadas resaltadas" #define STRING_CMD_COMMANDS_USAGE "Genera una lista de todos los comandos, con detalles de comportamiento" #define STRING_CMD_COMTAGS_USAGE "Muestra una lista de todas las marcas (solo nombres) en uso, con fines de auto-completado" #define STRING_CMD_CUSTOM_COUNT "1 tarea" diff --git a/src/l10n/fra-FRA.h b/src/l10n/fra-FRA.h index fd10bc048..a6d241652 100644 --- a/src/l10n/fra-FRA.h +++ b/src/l10n/fra-FRA.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "Could not recognize argument '{1}'." -#define STRING_CMD_CAL_BAD_MONTH "Argument '{1}' is not a valid month." -#define STRING_CMD_CAL_LABEL_DATE "Date" -#define STRING_CMD_CAL_LABEL_HOL "Holiday" -#define STRING_CMD_CAL_SUN_MON "The 'weekstart' configuration variable may only contain 'Sunday' or 'Monday'." -#define STRING_CMD_CAL_USAGE "Shows a calendar, with due tasks marked" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Affiche uniquement une liste des étiquettes utilisées, pour la complétion" #define STRING_CMD_CUSTOM_COUNT "1 tâche" diff --git a/src/l10n/ita-ITA.h b/src/l10n/ita-ITA.h index f76266a33..bc8a5e3eb 100644 --- a/src/l10n/ita-ITA.h +++ b/src/l10n/ita-ITA.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "Impossibile riconosce l'argomento '{1}'." -#define STRING_CMD_CAL_BAD_MONTH "L'argomento '{1}' non è un mese valido." -#define STRING_CMD_CAL_LABEL_DATE "Data" -#define STRING_CMD_CAL_LABEL_HOL "Festività" -#define STRING_CMD_CAL_SUN_MON "La variabile di configurazione 'weekstart' può solo contenere i valori 'Domenica' or 'Lunedì'." -#define STRING_CMD_CAL_USAGE "Mostra un calendario, con i task da svolgere marcati" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Mostra solo una lista dei tag utilizzati, per autocompletamento" #define STRING_CMD_CUSTOM_COUNT "1 task" diff --git a/src/l10n/jpn-JPN.h b/src/l10n/jpn-JPN.h index 7d0a5128b..634f52fd0 100644 --- a/src/l10n/jpn-JPN.h +++ b/src/l10n/jpn-JPN.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "引数'{1}' を認識できません。" -#define STRING_CMD_CAL_BAD_MONTH "引数 '{1}' は正しい月ではありません。" -#define STRING_CMD_CAL_LABEL_DATE "Date" -#define STRING_CMD_CAL_LABEL_HOL "Holiday" -#define STRING_CMD_CAL_SUN_MON "'weekstart' 設定変数は 'Sunday' または 'Monday' のみが使えます。" -#define STRING_CMD_CAL_USAGE "Shows a calendar, with due tasks marked" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Shows only a list of all tags used, for autocompletion purposes" #define STRING_CMD_CUSTOM_COUNT "1 task" diff --git a/src/l10n/pol-POL.h b/src/l10n/pol-POL.h index a49a2bc5c..03553d197 100644 --- a/src/l10n/pol-POL.h +++ b/src/l10n/pol-POL.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "Nie rozpoznany argument '{1}'." -#define STRING_CMD_CAL_BAD_MONTH "Argument '{1}' nie jest poprawnym miesiącem" -#define STRING_CMD_CAL_LABEL_DATE "Data" -#define STRING_CMD_CAL_LABEL_HOL "Wakacje" -#define STRING_CMD_CAL_SUN_MON "Początek tygodnia może mieć wartość 'Niedziela' lub 'Poniedziałek'." -#define STRING_CMD_CAL_USAGE "Wyświetla kalendarz z zadaniami z terminem" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Pokazuje listę użytych tagów dla celów autouzupełniania" #define STRING_CMD_CUSTOM_COUNT "1 zadanie" diff --git a/src/l10n/por-PRT.h b/src/l10n/por-PRT.h index 60a3c978e..d91ee487f 100644 --- a/src/l10n/por-PRT.h +++ b/src/l10n/por-PRT.h @@ -27,12 +27,6 @@ #ifndef INCLUDED_STRINGS #define INCLUDED_STRINGS -#define STRING_CMD_CAL_BAD_ARG "Não foi possível reconhecer o argumento '{1}'." -#define STRING_CMD_CAL_BAD_MONTH "Argumento '{1}' não é um mês válido." -#define STRING_CMD_CAL_LABEL_DATE "Data" -#define STRING_CMD_CAL_LABEL_HOL "Feriado" -#define STRING_CMD_CAL_SUN_MON "A variável de configuração 'weekstart' apenas pode conter 'domingo' ou 'segunda-feira'." -#define STRING_CMD_CAL_USAGE "Mostra um calendário, com datas de vencimento assinaladas" #define STRING_CMD_COMMANDS_USAGE "Generates a list of all commands, with behavior details" #define STRING_CMD_COMTAGS_USAGE "Exibe apenas a lista de todas as marcas em uso, para fins de terminação automática" #define STRING_CMD_CUSTOM_COUNT "1 tarefa"