-
Notifications
You must be signed in to change notification settings - Fork 7
[WIP] Internationalize the Letter of Complaint front-end #1649
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
base: master
Are you sure you want to change the base?
Conversation
This PR internationalizes the entire front end of the platform-wide Onboarding Flow.
|
@toolness this should be ready for your review! If you can, I'd love it if you could take a look at the tests that are failing— all seem to be manifestations of the same error: The errors started showing up after I internationalized the "email this XXX to a trusted friend" feature that shows up on the LOC confirmation page, as well as in other places. As far as I know, the only relevant change is that I added Trans tags around this bit of text that includes the and maxRecipients is a common data object imported at the top of the file: I was able to find a potentially related problem logged as an issue for lingui ( lingui/js-lingui#514 ), but it still seemed odd that this was popping up now. I thought at this stage we would've run into this error before? |
|
Thanks! I'm not sure what's going on there--it's especially weird/annoying that this problem only crops up in Jest and nowhere else--but I ended up using the workaround mentioned in the lingui issue and that seems to fix things. |
|
Regarding the |
|
Yep, that definitely makes sense. In that case, it seems like the most sustainable option there is to commit to using days as our unit. Otherwise, if we ever need to switch to an amount of time that isn't representable through a count of weeks, we would be stuck.
…On Tue, Sep 1, 2020 at 4:55 PM Atul Varma ***@***.***> wrote:
Regarding the MIN_DAYS_TEXT internationalization: I think that instead of
using that, we should just commit to always specifying the minimum days in
terms of either days or weeks, and then use that number in both back-end
and front-end internationalized text. So in other words, the messages to
localize go from e.g. First access date (at least ${MIN_DAYS_TEXT} from
today) to either ``First access date (at least ${MIN_DAYS} days from
today)orFirst access date (at least ${MIN_WEEKS} weeks from today)`. What
do you think?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1649 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADB5OD3WYF5LHVBLTCV63DDSDVNUJANCNFSM4QKTVRPQ>
.
|
|
Noice yeah that sounds reasonable to me. I guess we should run it by the content folks just to make sure they are OK with it. |
|
Ok just got the 👍 from analisa that it's fine to use days across the board! |
frontend/lib/loc/letter-request.tsx
Outdated
| {landlord.name || li18n._(t`UNKNOWN LANDLORD`)} | ||
| <br /> | ||
| {landlord.address || "UNKNOWN ADDRESS"} | ||
| {landlord.address || li18n._(t`UNKNOWN ADDRESS`)} |
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.
Oops don't worry about internationalizing these--this text is actually never supposed to show up in real-world situations, so we shouldn't burden translators with having to translate it.
|
Ok, I parceled out bits of this PR that aren't relevant to the content audit (which is what is blocking us from merging this PR) into #1656 and #1657 and merged those into |
|
Oh, nice! Good call @toolness. |
This PR internationalizes the entire Letter of Complaint front end. As part of this PR, I've also internationalized our full Onboarding flow that get's used within the LOC flow. See #1652 for details on that work.
TO DO:
MIN_DAYS_TEXTsnippet from the access-dates-validation.json file in the common-data directory. The issue here is that this piece of text gets used in both the frontend (access-dates.tsx) as well as the backend (loc/forms.py).