Skip to content

Commit

Permalink
Improve French translation
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Nov 15, 2024
1 parent 312e1f2 commit 098b2b1
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 48 deletions.
23 changes: 13 additions & 10 deletions R/show.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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)
}
Expand All @@ -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")
}
)
Expand All @@ -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")
}
Expand Down
Binary file modified inst/po/fr/LC_MESSAGES/R-aion.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion inst/tinytest/_tinysnapshot/show_calendar_CE.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Common Era (CE): Gregorian years counted forwards from 0.
Common Era (CE): Gregorian years counted forwards from 0
2 changes: 1 addition & 1 deletion inst/tinytest/_tinysnapshot/show_calendar_julian.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Julian years counted forwards from 1.
Julian years counted forwards from 1
2 changes: 1 addition & 1 deletion inst/tinytest/_tinysnapshot/show_rata_die.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion inst/tinytest/_tinysnapshot/show_time_series.txt
Original file line number Diff line number Diff line change
@@ -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
37 changes: 21 additions & 16 deletions po/R-aion.pot
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"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."
Expand Down Expand Up @@ -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 ""

Expand All @@ -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] ""
40 changes: 22 additions & 18 deletions po/R-fr.po
Original file line number Diff line number Diff line change
@@ -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 <nicolas.frerebeau@u-bordeaux-montaigne."
"fr>\n"
Expand Down Expand Up @@ -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"

Expand All @@ -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"

0 comments on commit 098b2b1

Please sign in to comment.