l10n: Eliminated STRING_CMD_CAL_*

This commit is contained in:
Paul Beckingham 2018-01-21 12:27:29 -05:00
parent 6360e32665
commit 4f46332fa7
10 changed files with 7 additions and 62 deletions

View file

@ -32,7 +32,6 @@
#include <Context.h> #include <Context.h>
#include <Table.h> #include <Table.h>
#include <Lexer.h> #include <Lexer.h>
#include <i18n.h>
#include <shared.h> #include <shared.h>
#include <format.h> #include <format.h>
#include <util.h> #include <util.h>
@ -46,7 +45,7 @@ CmdCalendar::CmdCalendar ()
{ {
_keyword = "calendar"; _keyword = "calendar";
_usage = "task calendar [due|<month> <year>|<year>] [y]"; _usage = "task calendar [due|<month> <year>|<year>] [y]";
_description = STRING_CMD_CAL_USAGE; _description = "Shows a calendar, with due tasks marked";
_read_only = true; _read_only = true;
_displays_id = true; _displays_id = true;
_needs_gc = true; _needs_gc = true;
@ -132,7 +131,7 @@ int CmdCalendar::execute (std::string& output)
{ {
argMonth = strtol (arg.c_str (), NULL, 10); argMonth = strtol (arg.c_str (), NULL, 10);
if (argMonth < 1 || argMonth > 12) 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. // "January" etc.
@ -140,11 +139,11 @@ int CmdCalendar::execute (std::string& output)
{ {
argMonth = Datetime::monthOfYear (matches[0]); argMonth = Datetime::monthOfYear (matches[0]);
if (argMonth == -1) if (argMonth == -1)
throw format (STRING_CMD_CAL_BAD_MONTH, arg); throw format ("Argument '{1}' is not a valid month.", arg);
} }
else else
throw format (STRING_CMD_CAL_BAD_ARG, arg); throw format ("Could not recognize argument '{1}'.", arg);
} }
// Supported combinations: // Supported combinations:
@ -366,8 +365,8 @@ int CmdCalendar::execute (std::string& output)
{ {
Table holTable; Table holTable;
holTable.width (context.getWidth ()); holTable.width (context.getWidth ());
holTable.add (STRING_CMD_CAL_LABEL_DATE); holTable.add ("Date");
holTable.add (STRING_CMD_CAL_LABEL_HOL); holTable.add ("Holiday");
setHeaderUnderline (holTable); setHeaderUnderline (holTable);
std::map <time_t, std::vector<std::string>> hm; // we need to store multiple holidays per day std::map <time_t, std::vector<std::string>> 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? // What day of the week does the user consider the first?
auto weekStart = Datetime::dayOfWeek (context.config.get ("weekstart")); auto weekStart = Datetime::dayOfWeek (context.config.get ("weekstart"));
if (weekStart != 0 && weekStart != 1) 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. // Build table for the number of months to be displayed.
Table view; Table view;

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_COMTAGS_USAGE "Listet ausschließlich alle genutzten Schlagwörter zur Auto-Vervollständigung"
#define STRING_CMD_CUSTOM_COUNT "1 Aufgabe" #define STRING_CMD_CUSTOM_COUNT "1 Aufgabe"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_COMTAGS_USAGE "Shows only a list of all tags used, for autocompletion purposes"
#define STRING_CMD_CUSTOM_COUNT "1 task" #define STRING_CMD_CUSTOM_COUNT "1 task"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_COMTAGS_USAGE "Montras sole listo de ĉia uzata etikedo, por motivo memkompletada"
#define STRING_CMD_CUSTOM_COUNT "1 tasko" #define STRING_CMD_CUSTOM_COUNT "1 tasko"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_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" #define STRING_CMD_CUSTOM_COUNT "1 tarea"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_COMTAGS_USAGE "Affiche uniquement une liste des étiquettes utilisées, pour la complétion"
#define STRING_CMD_CUSTOM_COUNT "1 tâche" #define STRING_CMD_CUSTOM_COUNT "1 tâche"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_COMTAGS_USAGE "Mostra solo una lista dei tag utilizzati, per autocompletamento"
#define STRING_CMD_CUSTOM_COUNT "1 task" #define STRING_CMD_CUSTOM_COUNT "1 task"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_COMTAGS_USAGE "Shows only a list of all tags used, for autocompletion purposes"
#define STRING_CMD_CUSTOM_COUNT "1 task" #define STRING_CMD_CUSTOM_COUNT "1 task"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_COMTAGS_USAGE "Pokazuje listę użytych tagów dla celów autouzupełniania"
#define STRING_CMD_CUSTOM_COUNT "1 zadanie" #define STRING_CMD_CUSTOM_COUNT "1 zadanie"

View file

@ -27,12 +27,6 @@
#ifndef INCLUDED_STRINGS #ifndef INCLUDED_STRINGS
#define 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_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_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" #define STRING_CMD_CUSTOM_COUNT "1 tarefa"