l10n: Eliminated STRING_CMD_CONFIG_*

This commit is contained in:
Paul Beckingham 2018-01-21 11:06:36 -05:00
parent be72058b31
commit f87b780fd7
10 changed files with 9 additions and 83 deletions

View file

@ -30,7 +30,6 @@
#include <algorithm> #include <algorithm>
#include <Context.h> #include <Context.h>
#include <JSON.h> #include <JSON.h>
#include <i18n.h>
#include <shared.h> #include <shared.h>
#include <format.h> #include <format.h>
@ -41,7 +40,7 @@ CmdConfig::CmdConfig ()
{ {
_keyword = "config"; _keyword = "config";
_usage = "task config [name [value | '']]"; _usage = "task config [name [value | '']]";
_description = STRING_CMD_CONFIG_USAGE; _description = "Change settings in the task configuration";
_read_only = true; _read_only = true;
_displays_id = false; _displays_id = false;
_needs_gc = false; _needs_gc = false;
@ -77,7 +76,7 @@ bool CmdConfig::setConfigVariable (
{ {
found = true; found = true;
if (!confirmation || if (!confirmation ||
confirm (format (STRING_CMD_CONFIG_CONFIRM, name, context.config.get (name), value))) confirm (format ("Are you sure you want to change the value of '{1}' from '{2}' to '{3}'?", name, context.config.get (name), value)))
{ {
line = name + '=' + json::encode (value); line = name + '=' + json::encode (value);
@ -92,7 +91,7 @@ bool CmdConfig::setConfigVariable (
// Not found, so append instead. // Not found, so append instead.
if (! found && if (! found &&
(! confirmation || (! confirmation ||
confirm (format (STRING_CMD_CONFIG_CONFIRM2, name, value)))) confirm (format ("Are you sure you want to add '{1}' with a value of '{2}'?", name, value))))
{ {
contents.push_back (name + '=' + json::encode (value)); contents.push_back (name + '=' + json::encode (value));
change = true; change = true;
@ -130,7 +129,7 @@ int CmdConfig::unsetConfigVariable (const std::string& name, bool confirmation /
// Remove name // Remove name
if (!confirmation || if (!confirmation ||
confirm (format (STRING_CMD_CONFIG_CONFIRM3, name))) confirm (format ("Are you sure you want to remove '{1}'?", name)))
{ {
// vector::erase method returns a valid iterator to the next object // vector::erase method returns a valid iterator to the next object
line = contents.erase (line); line = contents.erase (line);
@ -209,26 +208,25 @@ int CmdConfig::execute (std::string& output)
found = true; found = true;
if (! found) if (! found)
throw format (STRING_CMD_CONFIG_NO_ENTRY, name); throw format ("No entry named '{1}' found.", name);
} }
// Show feedback depending on whether .taskrc has been rewritten // Show feedback depending on whether .taskrc has been rewritten
if (change) if (change)
{ {
out << format (STRING_CMD_CONFIG_FILE_MOD, out << format ("Config file {1} modified.", context.config.file ())
context.config.file ())
<< '\n'; << '\n';
} }
else else
out << "No changes made.\n"; out << "No changes made.\n";
} }
else else
throw std::string (STRING_CMD_CONFIG_NO_NAME); throw std::string ("Specify the name of a config variable to modify.");
output = out.str (); output = out.str ();
} }
else else
throw std::string (STRING_CMD_CONFIG_NO_NAME); throw std::string ("Specify the name of a config variable to modify.");
return rc; return rc;
} }
@ -238,7 +236,7 @@ CmdCompletionConfig::CmdCompletionConfig ()
{ {
_keyword = "_config"; _keyword = "_config";
_usage = "task _config"; _usage = "task _config";
_description = STRING_CMD_HCONFIG_USAGE; _description = "Lists all supported configuration variables, for completion purposes";
_read_only = true; _read_only = true;
_displays_id = false; _displays_id = false;
_needs_gc = false; _needs_gc = false;

View file

@ -195,14 +195,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Erzeugt eine Liste Eigenschaften zur ZSH-Auto-Vervollständigung" #define STRING_CMD_ZSHATTS_USAGE "Erzeugt eine Liste Eigenschaften zur ZSH-Auto-Vervollständigung"
#define STRING_CMD_ALIASES_USAGE "Erzeugt eine Liste aller Aliase zur Auto-Vervollständigung" #define STRING_CMD_ALIASES_USAGE "Erzeugt eine Liste aller Aliase zur Auto-Vervollständigung"
#define STRING_CMD_CONFIG_USAGE "task-Konfiguration verändern"
#define STRING_CMD_CONFIG_CONFIRM "Wirklich die Option '{1}' von '{2}' zu '{3}' ändern?"
#define STRING_CMD_CONFIG_CONFIRM2 "Wirklich die Option '{1}' mit Wert '{2}' hinzufügen?"
#define STRING_CMD_CONFIG_CONFIRM3 "Wirklich die Option '{1}' entfernen?"
#define STRING_CMD_CONFIG_NO_ENTRY "Kein Eintrag '{1}' gefunden."
#define STRING_CMD_CONFIG_FILE_MOD "Konfigurationsdatei {1} verändert."
#define STRING_CMD_CONFIG_NO_NAME "Geben Sie den Wert der zu ändernden Option an."
#define STRING_CMD_HCONFIG_USAGE "Zeigt alle unterstützten Konfigurations-Optionen zur AUtovervollständigung"
#define STRING_CMD_CUSTOM_MISMATCH "Die Anzahl von Spalten und Beschriftungen für Report '{1}' unterscheidet sich." #define STRING_CMD_CUSTOM_MISMATCH "Die Anzahl von Spalten und Beschriftungen für Report '{1}' unterscheidet sich."
#define STRING_CMD_CUSTOM_SHOWN "{1} gezeigt" #define STRING_CMD_CUSTOM_SHOWN "{1} gezeigt"
#define STRING_CMD_CUSTOM_COUNT "1 Aufgabe" #define STRING_CMD_CUSTOM_COUNT "1 Aufgabe"

View file

@ -192,14 +192,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes" #define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes"
#define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes" #define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes"
#define STRING_CMD_CONFIG_USAGE "Change settings in the task configuration"
#define STRING_CMD_CONFIG_CONFIRM "Are you sure you want to change the value of '{1}' from '{2}' to '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "Are you sure you want to add '{1}' with a value of '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "Are you sure you want to remove '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "No entry named '{1}' found."
#define STRING_CMD_CONFIG_FILE_MOD "Config file {1} modified."
#define STRING_CMD_CONFIG_NO_NAME "Specify the name of a config variable to modify."
#define STRING_CMD_HCONFIG_USAGE "Lists all supported configuration variables, for completion purposes"
#define STRING_CMD_CUSTOM_MISMATCH "There are different numbers of columns and labels for report '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "There are different numbers of columns and labels for report '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} shown" #define STRING_CMD_CUSTOM_SHOWN "{1} shown"
#define STRING_CMD_CUSTOM_COUNT "1 task" #define STRING_CMD_CUSTOM_COUNT "1 task"

View file

@ -195,14 +195,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes" #define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes"
#define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes" #define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes"
#define STRING_CMD_CONFIG_USAGE "Change settings in the task configuration"
#define STRING_CMD_CONFIG_CONFIRM "Are you sure you want to change the value of '{1}' from '{2}' to '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "Are you sure you want to add '{1}' with a value of '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "Are you sure you want to remove '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "No entry named '{1}' found."
#define STRING_CMD_CONFIG_FILE_MOD "Agorda dosiero {1} modifita."
#define STRING_CMD_CONFIG_NO_NAME "Specifu la nomon de agordvariablo, kiun vi volas modifi."
#define STRING_CMD_HCONFIG_USAGE "Listigas çiun subtenatan agordan variablon, por motivo memkompletada"
#define STRING_CMD_CUSTOM_MISMATCH "La nombroj de kolumnoj kaj de siaj titoloj ne kongruas por raporto '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "La nombroj de kolumnoj kaj de siaj titoloj ne kongruas por raporto '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} montritaj" #define STRING_CMD_CUSTOM_SHOWN "{1} montritaj"
#define STRING_CMD_CUSTOM_COUNT "1 tasko" #define STRING_CMD_CUSTOM_COUNT "1 tasko"

View file

@ -202,14 +202,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Genera una lista de todos los atributos, con fines de auto-completado zsh" #define STRING_CMD_ZSHATTS_USAGE "Genera una lista de todos los atributos, con fines de auto-completado zsh"
#define STRING_CMD_ALIASES_USAGE "Genera una lista de todos los alias, con fines de auto-completado" #define STRING_CMD_ALIASES_USAGE "Genera una lista de todos los alias, con fines de auto-completado"
#define STRING_CMD_CONFIG_USAGE "Cambia los ajustes en la configuración de task"
#define STRING_CMD_CONFIG_CONFIRM "¿Está seguro de querer cambiar el valor de '{1}' de '{2}' a '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "¿Está seguro de querer añadir '{1}' con un valor de '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "¿Está seguro de querer eliminar '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "No se encontró una entrada llamada '{1}'."
#define STRING_CMD_CONFIG_FILE_MOD "Archivo de configuración {1} modificado."
#define STRING_CMD_CONFIG_NO_NAME "Especifique el nombre de una variable de configuración a modificar."
#define STRING_CMD_HCONFIG_USAGE "Lista todas las variables de configuración soportadas, a fines de completado"
#define STRING_CMD_CUSTOM_MISMATCH "Hay diferente número de columnas y etiquetas para el informe '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "Hay diferente número de columnas y etiquetas para el informe '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} mostrada(s)" #define STRING_CMD_CUSTOM_SHOWN "{1} mostrada(s)"
#define STRING_CMD_CUSTOM_COUNT "1 tarea" #define STRING_CMD_CUSTOM_COUNT "1 tarea"

View file

@ -197,14 +197,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes" #define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes"
#define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes" #define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes"
#define STRING_CMD_CONFIG_USAGE "Change settings in the task configuration"
#define STRING_CMD_CONFIG_CONFIRM "Are you sure you want to change the value of '{1}' from '{2}' to '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "Are you sure you want to add '{1}' with a value of '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "Are you sure you want to remove '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "No entry named '{1}' found."
#define STRING_CMD_CONFIG_FILE_MOD "Config file {1} modified."
#define STRING_CMD_CONFIG_NO_NAME "Specify the name of a config variable to modify."
#define STRING_CMD_HCONFIG_USAGE "Lists all supported configuration variables, for completion purposes"
#define STRING_CMD_CUSTOM_MISMATCH "There are different numbers of columns and labels for report '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "There are different numbers of columns and labels for report '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} affichées" #define STRING_CMD_CUSTOM_SHOWN "{1} affichées"
#define STRING_CMD_CUSTOM_COUNT "1 tâche" #define STRING_CMD_CUSTOM_COUNT "1 tâche"

View file

@ -196,14 +196,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes" #define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes"
#define STRING_CMD_ALIASES_USAGE "Genera la lista di tutti gli alias, per autocompletamento" #define STRING_CMD_ALIASES_USAGE "Genera la lista di tutti gli alias, per autocompletamento"
#define STRING_CMD_CONFIG_USAGE "Modifica le impostazioni nella configurazione dei task"
#define STRING_CMD_CONFIG_CONFIRM "Sei sicuro di voler cambiare il valore di '{1}' da '{2}' a '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "Sei sicuro di voler aggiungere '{1}' con valore '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "Sei sicuro di voler rimuovere '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "Nessuna voce '{1}' trovata."
#define STRING_CMD_CONFIG_FILE_MOD "File di configurazione {1} modificato."
#define STRING_CMD_CONFIG_NO_NAME "Specificare il nome di una variabile di configurazione da modificare."
#define STRING_CMD_HCONFIG_USAGE "Elenca le variabili di configurazione supportate, per autocompletamento"
#define STRING_CMD_CUSTOM_MISMATCH "Differente numero di colonne ed etichette per il report '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "Differente numero di colonne ed etichette per il report '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} mostrato" #define STRING_CMD_CUSTOM_SHOWN "{1} mostrato"
#define STRING_CMD_CUSTOM_COUNT "1 task" #define STRING_CMD_CUSTOM_COUNT "1 task"

View file

@ -197,14 +197,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes" #define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes"
#define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes" #define STRING_CMD_ALIASES_USAGE "Generates a list of all aliases, for autocompletion purposes"
#define STRING_CMD_CONFIG_USAGE "Change settings in the task configuration"
#define STRING_CMD_CONFIG_CONFIRM "Are you sure you want to change the value of '{1}' from '{2}' to '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "Are you sure you want to add '{1}' with a value of '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "Are you sure you want to remove '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "No entry named '{1}' found."
#define STRING_CMD_CONFIG_FILE_MOD "Config file {1} modified."
#define STRING_CMD_CONFIG_NO_NAME "Specify the name of a config variable to modify."
#define STRING_CMD_HCONFIG_USAGE "Lists all supported configuration variables, for completion purposes"
#define STRING_CMD_CUSTOM_MISMATCH "There are different numbers of columns and labels for report '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "There are different numbers of columns and labels for report '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} shown" #define STRING_CMD_CUSTOM_SHOWN "{1} shown"
#define STRING_CMD_CUSTOM_COUNT "1 task" #define STRING_CMD_CUSTOM_COUNT "1 task"

View file

@ -197,14 +197,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes" #define STRING_CMD_ZSHATTS_USAGE "Generates a list of all attributes, for zsh autocompletion purposes"
#define STRING_CMD_ALIASES_USAGE "Generuje listę wszystkich aliasów dla funkcji autouzupełniania" #define STRING_CMD_ALIASES_USAGE "Generuje listę wszystkich aliasów dla funkcji autouzupełniania"
#define STRING_CMD_CONFIG_USAGE "Zmienia konfigurację programu"
#define STRING_CMD_CONFIG_CONFIRM "Czy na pewno chcesz zmienić wartość '{1}' z '{2}' na '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "Czy na pewno chcesz dodać '{1}' z wartością '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "Czy na pewno chcesz usunąć '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "Nie znaleziono wpisu '{1}'."
#define STRING_CMD_CONFIG_FILE_MOD "Plik konfiguracyjny {1} został zmodyfikowany."
#define STRING_CMD_CONFIG_NO_NAME "Podaj nazwę zmiennej w konfiguracji do zmiany."
#define STRING_CMD_HCONFIG_USAGE "Wylistuj wszystkie zmienne konfiguracji."
#define STRING_CMD_CUSTOM_MISMATCH "Liczba kolumn i nagłówków nie zgadza się dla raportu '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "Liczba kolumn i nagłówków nie zgadza się dla raportu '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} pokazanych" #define STRING_CMD_CUSTOM_SHOWN "{1} pokazanych"
#define STRING_CMD_CUSTOM_COUNT "1 zadanie" #define STRING_CMD_CUSTOM_COUNT "1 zadanie"

View file

@ -197,14 +197,6 @@
#define STRING_CMD_ZSHATTS_USAGE "Gera uma lista de todos os atributos, para terminação automática em zsh" #define STRING_CMD_ZSHATTS_USAGE "Gera uma lista de todos os atributos, para terminação automática em zsh"
#define STRING_CMD_ALIASES_USAGE "Gera uma lista com todos os 'alias', para fins de terminação automática" #define STRING_CMD_ALIASES_USAGE "Gera uma lista com todos os 'alias', para fins de terminação automática"
#define STRING_CMD_CONFIG_USAGE "Altera parametros na configuração do 'task'"
#define STRING_CMD_CONFIG_CONFIRM "Tem a certeza que pretende alterar o valor de '{1}' de '{2}' para '{3}'?"
#define STRING_CMD_CONFIG_CONFIRM2 "Tem a certeza que pretende adicionar '{1}' com o valor '{2}'?"
#define STRING_CMD_CONFIG_CONFIRM3 "Tem a certeza que pretende remover '{1}'?"
#define STRING_CMD_CONFIG_NO_ENTRY "Não encontrada a entrada '{1}' ."
#define STRING_CMD_CONFIG_FILE_MOD "Ficheiro de configuração {1} alterado."
#define STRING_CMD_CONFIG_NO_NAME "Especifique o nome da configuração a modificar."
#define STRING_CMD_HCONFIG_USAGE "Lista todas as configurações suportadas, para fins de terminação automática"
#define STRING_CMD_CUSTOM_MISMATCH "O número de colunas e de rótulos não é o mesmo no relatório '{1}'." #define STRING_CMD_CUSTOM_MISMATCH "O número de colunas e de rótulos não é o mesmo no relatório '{1}'."
#define STRING_CMD_CUSTOM_SHOWN "{1} visiveis" #define STRING_CMD_CUSTOM_SHOWN "{1} visiveis"
#define STRING_CMD_CUSTOM_COUNT "1 tarefa" #define STRING_CMD_CUSTOM_COUNT "1 tarefa"