Skip to content

Commit

Permalink
Update strings
Browse files Browse the repository at this point in the history
  • Loading branch information
hugorodgerbrown committed Nov 7, 2023
1 parent 05a9c21 commit f2d2db9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
from typing import Any

from django.core.management.base import BaseCommand
from django.utils.translation import gettext as _, gettext_lazy as _lazy

from user_visit.models import UserVisit


class Command(BaseCommand):
help = "Sync browser, device and OS data missing from UserVisit" # noqa: A003
help = _lazy( # noqa: A003
"Sync browser, device and OS data missing from UserVisit"
)

def add_arguments(self, parser: argparse.ArgumentParser) -> None:
parser.add_argument(
"-f",
"--force",
action="store_true",
default=False,
help=(
help=_(
"Use the --force option to update all UserVisit "
"objects (defaults to backfilling empty records only)."
),
Expand Down
6 changes: 3 additions & 3 deletions user_visit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class UserVisit(models.Model):
blank=True,
)
ua_string = models.TextField(
"User agent (raw)",
_lazy("User agent (raw)"),
help_text=_lazy("Client User-Agent HTTP header"),
blank=True,
)
Expand All @@ -91,13 +91,13 @@ class UserVisit(models.Model):
default="",
)
device = models.CharField(
"Device type",
_lazy("Device type"),
max_length=200,
blank=True,
default="",
)
os = models.CharField(
"Operating System",
_lazy("Operating System"),
max_length=200,
blank=True,
default="",
Expand Down

0 comments on commit f2d2db9

Please sign in to comment.