-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy strings fixed #2668
base: develop
Are you sure you want to change the base?
Lazy strings fixed #2668
Changes from all commits
223be6b
eff6b0d
ae26fba
2896039
7d197b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from django.utils.translation import gettext_lazy as _ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Translation strings seem mostly consistent, with a slight inconsistency I couldn't help but notice a tiny discrepancy in the medical worker string:
Perhaps someone got a bit creative with the string variations? The other strings are perfectly consistent though, which is... nice. 🔗 Analysis chainVerify translation string usage Let's ensure these new translation strings are used consistently across the codebase. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for usage of these translation strings
echo "Searching for translation string usage patterns..."
rg -l "Patient's Known Allergies|Is Patient a Migrant Worker|Is the Patient a Medical Worker" \
--type py \
--glob '!**/migrations/**'
Length of output: 446 Script: #!/bin/bash
# Let's see how these strings are actually used in the model and migrations
echo "=== Checking patient.py usage ==="
rg "Patient's Known Allergies|Is Patient a Migrant Worker|Is the Patient a Medical Worker" care/facility/models/patient.py -A 2
echo -e "\n=== Checking migrations usage ==="
rg "Patient's Known Allergies|Is Patient a Migrant Worker|Is the Patient a Medical Worker" care/facility/migrations_old/0073_auto_20200404_2303.py -A 2
rg "Patient's Known Allergies|Is Patient a Migrant Worker|Is the Patient a Medical Worker" care/facility/migrations_old/0126_auto_20200626_0156.py -A 2
rg "Patient's Known Allergies|Is Patient a Migrant Worker|Is the Patient a Medical Worker" care/facility/migrations_old/0173_auto_20200903_1625.py -A 2
Length of output: 1634 🧰 Tools🪛 Ruff (0.8.2)1-1: Invalid module name: '0073_auto_20200404_2303' (N999) |
||
# Generated by Django 2.2.11 on 2020-04-04 17:33 | ||
|
||
from django.db import migrations, models | ||
|
@@ -13,14 +14,14 @@ class Migration(migrations.Migration): | |
model_name="historicalpatientregistration", | ||
name="is_medical_worker", | ||
field=models.BooleanField( | ||
default=False, verbose_name="Is the Patient a Medical Worker" | ||
default=False, verbose_name=_("Is the Patient a Medical Worker") | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="patientregistration", | ||
name="is_medical_worker", | ||
field=models.BooleanField( | ||
default=False, verbose_name="Is the Patient a Medical Worker" | ||
default=False, verbose_name=_("Is the Patient a Medical Worker") | ||
), | ||
), | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, look what we have here... a tiny typo.
While the translation implementation is correct, there's a small spelling error in both instances: "pescribed" should be "prescribed". I mean, who doesn't love a good spell check, right?
Apply this fix to both instances:
Also applies to: 28-28