aboutsummaryrefslogtreecommitdiffstats
path: root/english/template/debian/ctime.wml
diff options
context:
space:
mode:
authorDavid Prévot <taffit>2011-10-01 21:39:53 +0000
committerDavid Prévot <taffit>2011-10-01 21:39:53 +0000
commit10a03bd25a2e69555fbd928a936b560c30f366a1 (patch)
tree53fab8a41a6cfa7cf704f9b8e15162b8c4df03d7 /english/template/debian/ctime.wml
parent4e3bc2e2cae92aa19c156aa279fe182caf9c31c2 (diff)
Correctly handle first day of the month in French
CVS version numbers english/template/debian/ctime.wml: 1.115 -> 1.116
Diffstat (limited to 'english/template/debian/ctime.wml')
-rw-r--r--english/template/debian/ctime.wml16
1 files changed, 16 insertions, 0 deletions
diff --git a/english/template/debian/ctime.wml b/english/template/debian/ctime.wml
index 5c52fdfb655..9fea84df9cd 100644
--- a/english/template/debian/ctime.wml
+++ b/english/template/debian/ctime.wml
@@ -204,6 +204,15 @@ sub contractcatalan {
return $str;
}
+# Utility function for spokendate and daterange: Return "^er""
+# suffix for the first date of month in French.
+sub frenchsuffix {
+ my $mday = shift;
+
+ return '<sup>er</sup>' if $mday % 10 == 1 && $mday != 11 && $mday != 31;
+}
+
+
# This function creates a "spoken" date string for use in text, for example
# the date of the previous release.
# Input: A date in ISO format (YYYY-MM-DD).
@@ -235,6 +244,13 @@ sub spokendate {
my $date = sprintf("%d de %s de %d", $mday, $mon_str, $year);
return &contractcatalan($date);
}
+ elsif ($CUR_ISO_LANG eq "fr")
+ {
+ # Special handling of French: suffix for the first date of month
+ # with "^er"
+
+ return sprintf("%d%s %s %d", $mday, &frenchsuffix($mday), $mon_str, $year);
+ }
# Add any other special cases here as elsif cases
else
{

© 2014-2024 Faster IT GmbH | imprint | privacy policy