Project

General

Profile

locale driven formats on demo system

Added by Tim Coote over 14 years ago

Hullo
I'm having a quick look at Redmine, based on a recommendation from a colleague.

Something that I find very irritating, and that will make the system unusable to my clients, is the default date format (US). How can I get the date format to be either the ISO format (YYYY-MM-DD) or GB format (DD-MMM-YYYY) for any given browser? I can see that some dates are in ISO format, but not the default Issue browser.

tia

Tim


Replies (5)

RE: locale driven formats on demo system - Added by Felix Schäfer over 14 years ago

Have a look at Administration > Configuration > Display (or at least those are the quick translations from my german trunk redmine, could be slightly different dependent on version and/or locale), there you have an option to change the time and date formats, be aware though that the default setting is to display the date and time depending on the user's language, which then again defaults to what the browser is set to if not explicitly set in the user options. If the formats for the time and date are too few, I could look up where the possible choices are defined in the code and direct at what to change, but it would be easier for future upgrades if that were not necessary :-)

RE: locale driven formats on demo system - Added by Tim Coote over 14 years ago

Thanks Felix. I don't think that there is an Administration tab/menu on the demo system, is there (demo.redmine.org?)

For systems that I've worked on I18N and L10N need to be in the design upfront and stuff like date and currency formats are locale related, rather than language related. The language that I use is British English (which isn't in the list of available languages). I can live with US English as a language as it's mostly unambiguous, but I get confused clients and colleagues when I have dates of the form 1-8-2010.

If I change my language to German, dates appear to be spelled out and unambiguous, but my German's not good enough to use the product :-)

If I18N isn't caught early, it tends to keep tripping up the dev process and generating bugs as it's too easy to forget about it as you build new code.

RE: locale driven formats on demo system - Added by Felix Schäfer over 14 years ago

Ah, thought you had it installed locally. I don't think the demo system gives you access to the administration console, but I'll try to show you the possible settings.

As far as I know, redmine is (or at least tries) to be as localised as possible, though there are some things (statuses, priorities…) that are user-definable and thus not translated (so if you choose the en locale while populating the db, "Feature" will be feature for everyone, regardless of the locale, because the name of a tracker is administrator-configurable). That applies to date and time strings too, which are defined alongside the translation strings in the files under source:trunk/config/locales, e.g. the time and strings for a uk locale are defined here source:trunk/config/locales/uk.yml#L2. You could also tweak those locale files to whatever suits your setup best if you find that you want another format for a certain locale.

You can also force a global format for everyone, regardless of what locale the rest of the interface is rendered in, and the options are here source:trunk/app/models/setting.rb#L20, which contains both requested formats :-)

RE: locale driven formats on demo system - Added by Tim Coote over 14 years ago

Thanks. I can see that I need to look deeper.

RE: locale driven formats on demo system - Added by Felix Schäfer over 14 years ago

Well, If you have a linux system somewhere, just install ruby and rails (depending on your distro, it might be better to install rubygems from source and not be bound to, say, apt or something, look for a tutorial on how to install rails with your distribution to make sure) and checkout redmine from either the svn or git repo (both the same, so it's a matter of taste). For testing purposes, sqlite and the script/server from rails will be more than enough. I'd say it's a matter of 15-20 if you know your way around your distribution to set it up, and you have a full redmine with which you can test everything you need.

    (1-5/5)