From 57e63dfeb2e7c39de389a6b0198109b696a50302 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 5 Jul 2014 11:39:22 -0400 Subject: [PATCH] L10N - Localized Dates. --- src/Dates.cpp | 4 ++-- src/eng-USA.h | 6 ++++++ src/esp-ESP.h | 6 ++++++ src/fra-FRA.h | 6 ++++++ src/ita-ITA.h | 6 ++++++ src/por-PRT.h | 6 ++++++ 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/Dates.cpp b/src/Dates.cpp index 958b03409..fb7c8cc12 100644 --- a/src/Dates.cpp +++ b/src/Dates.cpp @@ -480,10 +480,10 @@ bool namedDates (const std::string& name, Variant& value) } } else - throw std::string ("Error: number and ordinal don't match."); + throw std::string (STRING_DATES_ORD_MISMATCH); } else - throw std::string ("Error: no month has more than 31 days."); + throw std::string (STRING_DATES_MONTH_31); } else if (name == "easter" || diff --git a/src/eng-USA.h b/src/eng-USA.h index 64b6b3f85..a023343b2 100644 --- a/src/eng-USA.h +++ b/src/eng-USA.h @@ -181,6 +181,12 @@ #define STRING_LEX_IMMEDIATE_UNK "Lexer start failure, unknown characters found immediately." #define STRING_LEX_TYPE_UNK "Lexer cannot process and unknown token type." +// Dates +// +// These are errors generated when parsing date values. +#define STRING_DATES_MONTH_31 "Error: no month has more than 31 days." +#define STRING_DATES_ORD_MISMATCH "Error: number and ordinal don't match (ie '1st', not '1nd')." + // Color #define STRING_COLOR_UNRECOGNIZED "The color '{1}' is not recognized." diff --git a/src/esp-ESP.h b/src/esp-ESP.h index c40f364df..41975d6e3 100644 --- a/src/esp-ESP.h +++ b/src/esp-ESP.h @@ -181,6 +181,12 @@ #define STRING_LEX_IMMEDIATE_UNK "Lexer start failure, unknown characters found immediately." #define STRING_LEX_TYPE_UNK "Lexer cannot process and unknown token type." +// Dates +// +// These are errors generated when parsing date values. +#define STRING_DATES_MONTH_31 "Error: no month has more than 31 days." +#define STRING_DATES_ORD_MISMATCH "Error: number and ordinal don't match (ie '1st', not '1nd')." + // Color #define STRING_COLOR_UNRECOGNIZED "El color '{1}' no se reconoce." diff --git a/src/fra-FRA.h b/src/fra-FRA.h index 74927b25e..41bf57fdc 100644 --- a/src/fra-FRA.h +++ b/src/fra-FRA.h @@ -181,6 +181,12 @@ #define STRING_LEX_IMMEDIATE_UNK "Lexer start failure, unknown characters found immediately." #define STRING_LEX_TYPE_UNK "Lexer cannot process and unknown token type." +// Dates +// +// These are errors generated when parsing date values. +#define STRING_DATES_MONTH_31 "Error: no month has more than 31 days." +#define STRING_DATES_ORD_MISMATCH "Error: number and ordinal don't match (ie '1st', not '1nd')." + // Color #define STRING_COLOR_UNRECOGNIZED "La couleur '{1}' n'est pas reconnue." diff --git a/src/ita-ITA.h b/src/ita-ITA.h index af70bc8c4..c0f3e6700 100644 --- a/src/ita-ITA.h +++ b/src/ita-ITA.h @@ -182,6 +182,12 @@ #define STRING_LEX_IMMEDIATE_UNK "Lexer start failure, unknown characters found immediately." #define STRING_LEX_TYPE_UNK "Lexer cannot process and unknown token type." +// Dates +// +// These are errors generated when parsing date values. +#define STRING_DATES_MONTH_31 "Error: no month has more than 31 days." +#define STRING_DATES_ORD_MISMATCH "Error: number and ordinal don't match (ie '1st', not '1nd')." + // Color #define STRING_COLOR_UNRECOGNIZED "Il colore '{1}' non è riconosciuto." diff --git a/src/por-PRT.h b/src/por-PRT.h index c88fa7a60..9a6ea3f25 100644 --- a/src/por-PRT.h +++ b/src/por-PRT.h @@ -181,6 +181,12 @@ #define STRING_LEX_IMMEDIATE_UNK "Lexer start failure, unknown characters found immediately." #define STRING_LEX_TYPE_UNK "Lexer cannot process and unknown token type." +// Dates +// +// These are errors generated when parsing date values. +#define STRING_DATES_MONTH_31 "Error: no month has more than 31 days." +#define STRING_DATES_ORD_MISMATCH "Error: number and ordinal don't match (ie '1st', not '1nd')." + // Color #define STRING_COLOR_UNRECOGNIZED "A cor '{1}' não é reconhecida."