diff options
author | James Moger <james.moger@gitblit.com> | 2012-06-15 16:01:30 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-06-15 16:01:30 -0400 |
commit | 9adf6283b75a187b96796b892fd128e300f429a4 (patch) | |
tree | 4061d1a256b020c1e3902e95210513781340e5ec /src/com/gitblit/wicket/pages/TicketsPage.java | |
parent | 01774948d84794d1d9c216f9a6859d7f150815d5 (diff) | |
download | gitblit-9adf6283b75a187b96796b892fd128e300f429a4.tar.gz gitblit-9adf6283b75a187b96796b892fd128e300f429a4.zip |
Revised TimeUtils for localization
TimeUtils needs to output localized strings like "5 days ago" and "6 months". In order to do this it needs a translation resource. Additionally, that resource can not be static because the single Gitblit server can handle multiple connections in different locales/languages.
TimeUtils has changed from a collection of static methods to some static methods and some instance methods. A TimeUtils is instantiated with an optional resource bundle which contains the preferred translation. If the resourec bundle is null or the requested translation key does not exist, an English default will be used.
This change required adjusting the signatures of several key methods and that cascaded out to adjusting those methods calls in many, many classes.
Diffstat (limited to 'src/com/gitblit/wicket/pages/TicketsPage.java')
-rw-r--r-- | src/com/gitblit/wicket/pages/TicketsPage.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/gitblit/wicket/pages/TicketsPage.java b/src/com/gitblit/wicket/pages/TicketsPage.java index 0ac8114b..b68b7e42 100644 --- a/src/com/gitblit/wicket/pages/TicketsPage.java +++ b/src/com/gitblit/wicket/pages/TicketsPage.java @@ -52,7 +52,7 @@ public class TicketsPage extends RepositoryPage { WicketUtils.setTicketCssClass(stateLabel, entry.state);
item.add(stateLabel);
item.add(WicketUtils.createDateLabel("ticketDate", entry.date, GitBlitWebSession
- .get().getTimezone()));
+ .get().getTimezone(), getTimeUtils()));
item.add(new Label("ticketHandler", StringUtils.trimString(
entry.handler.toLowerCase(), 30)));
item.add(new LinkPanel("ticketTitle", "list subject", StringUtils.trimString(
|