diff --git a/R/show.R b/R/show.R index a025919..9911fce 100644 --- a/R/show.R +++ b/R/show.R @@ -16,9 +16,9 @@ setMethod( } if (calendar_direction(object) > 0) { - msg <- tr_("%s%s counted forwards from %g.") + msg <- tr_("%s%s counted forwards from %g") } else { - msg <- tr_("%s%s counted backwards from %g.") + msg <- tr_("%s%s counted backwards from %g") } msg <- sprintf(msg, era, calendar_unit(object), calendar_epoch(object)) cat(trimws(msg), sep = "\n") @@ -29,7 +29,7 @@ setMethod( f = "show", signature = "RataDie", definition = function(object) { - msg <- tr_("Rata die: number of days since 01-01-01 (Gregorian).") + msg <- tr_("Rata die: number of days since 01-01-01 (Gregorian)") cat(msg, sep = "\n") methods::callGeneric(object@.Data) } @@ -40,10 +40,12 @@ setMethod( signature = "TimeSeries", definition = function(object) { n <- dim(object) - start <- format(start(object)) - end <- format(end(object)) - msg <- tr_("%d x %d x %d time series observed between %s and %s r.d.") - msg <- sprintf(msg, n[1L], n[2L], n[3L], start, end) + k <- n[[2]] + n[[3]] - 1 + start <- format(as_fixed(start(object))) + end <- format(as_fixed(end(object))) + msg <- ngettext(k, "%d x %d x %d time series observed between %s and %s", + "%d x %d x %d time series observed between %s and %s") + msg <- sprintf(msg, n[[1L]], n[[2L]], n[[3L]], start, end) cat(msg, sep = "\n") } ) @@ -53,9 +55,10 @@ setMethod( signature = "TimeIntervals", definition = function(object) { n <- length(object) - start <- format(min(start(object))) - end <- format(max(end(object))) - msg <- tr_("%d time intervals observed between %s and %s r.d.") + start <- format(as_fixed(min(start(object)))) + end <- format(as_fixed(max(end(object)))) + msg <- ngettext(n, "%d time interval observed between %s and %s", + "%d time intervals observed between %s and %s") msg <- sprintf(msg, n, start, end) cat(msg, sep = "\n") } diff --git a/inst/po/fr/LC_MESSAGES/R-aion.mo b/inst/po/fr/LC_MESSAGES/R-aion.mo index 89d68d1..828943a 100644 Binary files a/inst/po/fr/LC_MESSAGES/R-aion.mo and b/inst/po/fr/LC_MESSAGES/R-aion.mo differ diff --git a/inst/tinytest/_tinysnapshot/show_calendar_CE.txt b/inst/tinytest/_tinysnapshot/show_calendar_CE.txt index edea02b..91a563e 100644 --- a/inst/tinytest/_tinysnapshot/show_calendar_CE.txt +++ b/inst/tinytest/_tinysnapshot/show_calendar_CE.txt @@ -1 +1 @@ -Common Era (CE): Gregorian years counted forwards from 0. +Common Era (CE): Gregorian years counted forwards from 0 diff --git a/inst/tinytest/_tinysnapshot/show_calendar_julian.txt b/inst/tinytest/_tinysnapshot/show_calendar_julian.txt index 6365844..5031359 100644 --- a/inst/tinytest/_tinysnapshot/show_calendar_julian.txt +++ b/inst/tinytest/_tinysnapshot/show_calendar_julian.txt @@ -1 +1 @@ -Julian years counted forwards from 1. +Julian years counted forwards from 1 diff --git a/inst/tinytest/_tinysnapshot/show_rata_die.txt b/inst/tinytest/_tinysnapshot/show_rata_die.txt index 9ce04db..69fda2c 100644 --- a/inst/tinytest/_tinysnapshot/show_rata_die.txt +++ b/inst/tinytest/_tinysnapshot/show_rata_die.txt @@ -1,2 +1,2 @@ -Rata die: number of days since 01-01-01 (Gregorian). +Rata die: number of days since 01-01-01 (Gregorian) [1] -128199 10958 391175 210015 412359 diff --git a/inst/tinytest/_tinysnapshot/show_time_series.txt b/inst/tinytest/_tinysnapshot/show_time_series.txt index 35c7523..158cab9 100644 --- a/inst/tinytest/_tinysnapshot/show_time_series.txt +++ b/inst/tinytest/_tinysnapshot/show_time_series.txt @@ -1 +1 @@ -100 x 3 x 1 time series observed between 364878 and 401037 r.d. +100 x 3 x 1 time series observed between 1000 CE and 1099 CE diff --git a/po/R-aion.pot b/po/R-aion.pot index 71afb6c..3aa36db 100644 --- a/po/R-aion.pot +++ b/po/R-aion.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" -"Project-Id-Version: aion 1.1.0.9000\n" -"POT-Creation-Date: 2024-11-13 12:04+0100\n" +"Project-Id-Version: aion 1.2.0.9000\n" +"POT-Creation-Date: 2024-11-15 17:08+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -9,6 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: calendar-julian.R:45 msgid "There is no year zero in the Julian calendar." @@ -66,15 +67,15 @@ msgstr "" msgid "Common Era" msgstr "" -#: calendar.R:138 +#: calendar.R:122 msgid "Gregorian years" msgstr "" -#: calendar.R:139 +#: calendar.R:123 msgid "Julian years" msgstr "" -#: calendar.R:140 +#: calendar.R:124 msgid "Undefined" msgstr "" @@ -83,25 +84,29 @@ msgid "%s is already expressed in rata die: %s is ignored." msgstr "" #: show.R:19 -msgid "%s%s counted forwards from %g." +msgid "%s%s counted forwards from %g" msgstr "" #: show.R:21 -msgid "%s%s counted backwards from %g." +msgid "%s%s counted backwards from %g" msgstr "" #: show.R:32 -msgid "Rata die: number of days since 01-01-01 (Gregorian)." -msgstr "" - -#: show.R:45 -msgid "%d x %d x %d time series observed between %s and %s r.d." -msgstr "" - -#: show.R:58 -msgid "%d time intervals observed between %s and %s r.d." +msgid "Rata die: number of days since 01-01-01 (Gregorian)" msgstr "" #: validate.R:87 msgid "%s is later than %s." msgstr "" + +#: show.R:46 +msgid "%d x %d x %d time series observed between %s and %s" +msgid_plural "%d x %d x %d time series observed between %s and %s" +msgstr[0] "" +msgstr[1] "" + +#: show.R:60 +msgid "%d time interval observed between %s and %s" +msgid_plural "%d time intervals observed between %s and %s" +msgstr[0] "" +msgstr[1] "" diff --git a/po/R-fr.po b/po/R-fr.po index d6be5a7..4942f56 100644 --- a/po/R-fr.po +++ b/po/R-fr.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: aion 1.1.0.9000\n" -"POT-Creation-Date: 2024-11-13 12:04+0100\n" +"POT-Creation-Date: 2024-11-15 17:08+0100\n" "PO-Revision-Date: 2024-11-12 13:24+0100\n" "Last-Translator: Nicolas Frerebeau \n" @@ -68,15 +68,15 @@ msgstr "è. c." msgid "Common Era" msgstr "Ère commune" -#: calendar.R:138 +#: calendar.R:122 msgid "Gregorian years" msgstr "Années grégoriennes" -#: calendar.R:139 +#: calendar.R:123 msgid "Julian years" msgstr "Années juliennes" -#: calendar.R:140 +#: calendar.R:124 msgid "Undefined" msgstr "Non défini" @@ -85,25 +85,29 @@ msgid "%s is already expressed in rata die: %s is ignored." msgstr "%s est déjà exprimé en rata die : %s est ignoré." #: show.R:19 -msgid "%s%s counted forwards from %g." -msgstr "%s%s comptées à partir de %g." +msgid "%s%s counted forwards from %g" +msgstr "%s%s comptées à partir de %g" #: show.R:21 -msgid "%s%s counted backwards from %g." -msgstr "%s%s comptées à rebours à partir de %g." +msgid "%s%s counted backwards from %g" +msgstr "%s%s comptées à rebours à partir de %g" #: show.R:32 -msgid "Rata die: number of days since 01-01-01 (Gregorian)." -msgstr "Rata die : nombre de jours depuis le 01-01-01 (grégorien)." - -#: show.R:45 -msgid "%d x %d x %d time series observed between %s and %s r.d." -msgstr "%d x %d x %d séries temporelles observées entre %s et %s r.d." - -#: show.R:58 -msgid "%d time intervals observed between %s and %s r.d." -msgstr "%d intervalles de temps observés entre %s et %s r.d." +msgid "Rata die: number of days since 01-01-01 (Gregorian)" +msgstr "Rata die : nombre de jours depuis le 01-01-01 (grégorien)" #: validate.R:87 msgid "%s is later than %s." msgstr "%s est postérieur à %s." + +#: show.R:46 +msgid "%d x %d x %d time series observed between %s and %s" +msgid_plural "%d x %d x %d time series observed between %s and %s" +msgstr[0] "%d x %d x %d série chronologique observée entre %s et %s" +msgstr[1] "%d x %d x %d séries chronologiques observées entre %s et %s" + +#: show.R:60 +msgid "%d time interval observed between %s and %s" +msgid_plural "%d time intervals observed between %s and %s" +msgstr[0] "%d intervalle de temps observé entre %s et %s" +msgstr[1] "%d intervalles de temps observés entre %s et %s"