GNOME Bugzilla – Bug 646735
About dialog Copyright date should use strftime
Last modified: 2011-04-06 13:50:42 UTC
We don't want to change the translatable string every time we update the current year in the copyright. Wouter says: "the correct and future proof solution is to use strftime and this format string: _("Copyright © 1999–%Y The Nautilus authors") (Note: with a U+2013 EN DASH and not a normal hypen!)"
Fwiw, reference to my original message: http://mail.gnome.org/archives/gnome-i18n/2011-April/msg00078.html
Oh, and if you don't want "automatic year counting", the solution would involve sprintf and %d: sprintf(_("Copyright © 1999–%d The Nautilus authors"), 2011) It would be really cool to support locale-specific digits: sprintf(_("Copyright © %Id–%Id The Nautilus authors"), 1999, 2011) The combination of both locale-specific number notation and automatic year counting using the current date and time is left as an exercise to the reader. It involves sprintf() with twice a "%Id" format specifier (not strftime()!) and the current year obtained from localtime().
Wouter, thanks for the suggestions. As I branched nautilus for 3.0 earlier today, I implemented your proposal in the master branch.
This is the relevant commit: http://git.gnome.org/browse/nautilus/commit/?id=ced6d22409c3a849b86b75bb867f267a3cdad800 Code looks good, thanks for pointing out the GLib way (instead of using localtime() directly). However, you seems to have missed my comment about the U+2013 EN DASH: (Note: with a U+2013 EN DASH and not a normal hypen!)" The UTF-8 form for this character is \xE2\x80\x93. Please fix that to obtain eternal fame! :)
Oh right; I fixed this in master now.