Fixed the capitalization of the shortcut periods in the period chooser.

This commit is contained in:
依瑪貓 2023-03-20 22:57:04 +08:00
parent acc5b4d6ea
commit d4fe91ec4a
2 changed files with 10 additions and 10 deletions

View File

@ -35,7 +35,7 @@ class ThisMonth(Period):
def _set_properties(self) -> None: def _set_properties(self) -> None:
self.spec = "this-month" self.spec = "this-month"
self.desc = gettext("This month") self.desc = gettext("This Month")
self.is_a_month = True self.is_a_month = True
self.is_type_month = True self.is_type_month = True
@ -55,7 +55,7 @@ class LastMonth(Period):
def _set_properties(self) -> None: def _set_properties(self) -> None:
self.spec = "last-month" self.spec = "last-month"
self.desc = gettext("Last month") self.desc = gettext("Last Month")
self.is_a_month = True self.is_a_month = True
self.is_type_month = True self.is_type_month = True
@ -75,7 +75,7 @@ class SinceLastMonth(Period):
def _set_properties(self) -> None: def _set_properties(self) -> None:
self.spec = "since-last-month" self.spec = "since-last-month"
self.desc = gettext("Since last month") self.desc = gettext("Since Last Month")
self.is_type_month = True self.is_type_month = True
@ -90,7 +90,7 @@ class ThisYear(Period):
def _set_properties(self) -> None: def _set_properties(self) -> None:
self.spec = "this-year" self.spec = "this-year"
self.desc = gettext("This year") self.desc = gettext("This Year")
self.is_a_year = True self.is_a_year = True
@ -105,7 +105,7 @@ class LastYear(Period):
def _set_properties(self) -> None: def _set_properties(self) -> None:
self.spec = "last-year" self.spec = "last-year"
self.desc = gettext("Last year") self.desc = gettext("Last Year")
self.is_a_year = True self.is_a_year = True

View File

@ -55,14 +55,14 @@ First written: 2023/3/4
<div id="accounting-period-chooser-month-page" {% if report.period.is_type_month %} aria-current="page" {% else %} class="d-none" aria-current="false" {% endif %} aria-labelledby="accounting-period-chooser-month-tab"> <div id="accounting-period-chooser-month-page" {% if report.period.is_type_month %} aria-current="page" {% else %} class="d-none" aria-current="false" {% endif %} aria-labelledby="accounting-period-chooser-month-tab">
<div> <div>
<a class="btn {% if report.period.is_this_month %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.this_month_url }}"> <a class="btn {% if report.period.is_this_month %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.this_month_url }}">
{{ A_("This month") }} {{ A_("This Month") }}
</a> </a>
{% if report.period_chooser.has_last_month %} {% if report.period_chooser.has_last_month %}
<a class="btn {% if report.period.is_last_month %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.last_month_url }}"> <a class="btn {% if report.period.is_last_month %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.last_month_url }}">
{{ A_("Last month") }} {{ A_("Last Month") }}
</a> </a>
<a class="btn {% if report.period.is_since_last_month %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.since_last_month_url }}"> <a class="btn {% if report.period.is_since_last_month %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.since_last_month_url }}">
{{ A_("Since last month") }} {{ A_("Since Last Month") }}
</a> </a>
{% endif %} {% endif %}
</div> </div>
@ -74,11 +74,11 @@ First written: 2023/3/4
{# The year periods #} {# The year periods #}
<div id="accounting-period-chooser-year-page" {% if report.period.is_a_year %} aria-current="page" {% else %} class="d-none" aria-current="false" {% endif %} aria-labelledby="accounting-period-chooser-year-tab"> <div id="accounting-period-chooser-year-page" {% if report.period.is_a_year %} aria-current="page" {% else %} class="d-none" aria-current="false" {% endif %} aria-labelledby="accounting-period-chooser-year-tab">
<a class="btn {% if report.period.is_this_year %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.this_year_url }}"> <a class="btn {% if report.period.is_this_year %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.this_year_url }}">
{{ A_("This year") }} {{ A_("This Year") }}
</a> </a>
{% if report.period_chooser.has_last_year %} {% if report.period_chooser.has_last_year %}
<a class="btn {% if report.period.is_last_year %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.last_year_url }}"> <a class="btn {% if report.period.is_last_year %} btn-primary {% else %} btn-outline-primary {% endif %}" role="button" href="{{ report.period_chooser.last_year_url }}">
{{ A_("Last year") }} {{ A_("Last Year") }}
</a> </a>
{% endif %} {% endif %}
{% if report.period_chooser.available_years %} {% if report.period_chooser.available_years %}