#11117 closed enhancement (fixed)
Show a hint on the Basic Settings page when pytz is not installed
Reported by: | 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 |
||
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)
Change History (15)
comment:1 by , 12 years ago
by , 12 years ago
Attachment: | BasicSettingsWithHint.png added |
---|
comment:2 by , 12 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.
follow-up: 5 comment:4 by , 12 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.
comment:5 by , 12 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 , 12 years ago
Keywords: | timezone added |
---|
comment:7 by , 11 years ago
Milestone: | → 1.0.2 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:8 by , 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 , 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 , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed to 1.0-stable in [11821].
comment:11 by , 11 years ago
Release Notes: | modified (diff) |
---|
comment:12 by , 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.
follow-up: 14 comment:13 by , 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?
comment:14 by , 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].
Maybe only when the user has
TRAC_ADMIN
? A normal user will probably not have sufficient access to installpytz
.