Edgewall Software
Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11117 closed enhancement (fixed)

Show a hint on the Basic Settings page when pytz is not installed

Reported by: Ryan J Ollos <ryan.j.ollos@…> Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: admin/web Version: 1.0-stable
Severity: normal Keywords: hint pytz timezone
Cc: Branch:
Release Notes:

A message is displayed on the Basic Settings admin panel when pytz is not installed.

API Changes:
Internal Changes:

Description

As mentioned on the mailing list, it might be useful to show a hint next to the Default Timezone select when pytz is not installed.

The hint could simply be Install pytz for a complete list of timezones.

Attachments (1)

BasicSettingsWithHint.png (21.4 KB ) - added by Ryan J Ollos <ryan.j.ollos@…> 11 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by Remy Blank, 11 years ago

Maybe only when the user has TRAC_ADMIN? A normal user will probably not have sufficient access to install pytz.

by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Attachment: BasicSettingsWithHint.png added

comment:2 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Oh, maybe you are thinking I was suggesting this for the preferences panel? I'm only suggesting it for the Basic Settings admin panel, which is only visible to a user with TRAC_ADMIN.

comment:3 by Remy Blank, 11 years ago

Oh, right, my bad. Please proceed ;)

comment:4 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

There is a patch in 58387c53 that I've manually tested. I'm not seeing how to write a functional test for this, but maybe someone has an idea of how I can control the import of pytz in trac.util.datefmt. I can only think of very ugly ways to accomplish this.

in reply to:  4 comment:5 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Replying to Ryan J Ollos <ryan.j.ollos@…>:

[…] I'm not seeing how to write a functional test for this, but maybe someone has an idea of how I can control the import of pytz in trac.util.datefmt. I can only think of very ugly ways to accomplish this.

On second thought, I may have been over-thinking this. I was trying to figure out a way to test within a single environment the cases where pytz is and is not present. However, it seems better to just write the test to work correctly for each case, and then to run the test cases within environments where pytz is and is not present in order to test the respective behaviors.

Functional test case added in 86b88f40.

comment:6 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Keywords: timezone added

comment:7 by Ryan J Ollos, 11 years ago

Milestone: 1.0.2
Owner: set to Ryan J Ollos
Status: newassigned

comment:8 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

With the aim of not breaking anything on my very first commit (always nice to get off to a good start!), this seemed like a good ticket to resolve. I made the string added to the template translatable, read through TracL10N and genshi:wiki:Documentation/i18n.html, and made sure that the string translated correctly (via modification to ES). I didn't update the catalog template since it looked like it doesn't get updated every time that a translatable string is added. The changeset is in da7296ce and I'll push it tomorrow if no one spots any problems.

Just noticed that I have an rjollos.git now. Thanks Jun! I'll start staging my changes there after I get all my existing branches from GitHub pushed to t.e.o.

comment:9 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

I didn't read carefully enough last evening. I see now that the i18n:msg attribute is only needed if the string contains markup or dynamic parameters. I will fix the changeset before committing.

comment:10 by Ryan J Ollos, 11 years ago

Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in [11821].

comment:11 by Ryan J Ollos, 11 years ago

Release Notes: modified (diff)

comment:12 by Ryan J Ollos, 11 years ago

Merged to trunk in [11844].

In the future I'll make sure to do this at the time the change is committed to a branch, and will get the trunk caught up shortly on other recent changes I've pushed.

comment:13 by Ryan J Ollos, 11 years ago

I was thinking of adding hints for Default language and Default date format as well: Install babel for extended language support, Install babel for localized date formats. Does that seem useful?

in reply to:  13 comment:14 by Ryan J Ollos, 11 years ago

Replying to rjollos:

I was thinking of adding hints for Default language and Default date format as well: Install babel for extended language support, Install babel for localized date formats. Does that seem useful?

See #11257.

Two minor code changes for this ticket were committed in [11878:11879] while working on #11257. and merged to the trunk in [11881].

Last edited 11 years ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.