-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-06-28] [$250] Get rid of MISSING TRANSLATION errors once and for all #42539
Comments
Triggered auto assignment to @kadiealexander ( |
Job added to Upwork: https://www.upwork.com/jobs/~013d70ff8202e9ba0e |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
Requesting assignment. |
📣 @hunxjunedo! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Remove MISSING TRANSLATION ERROR What is the root cause of that problem?We've had of MISSING TRANSLATION bugs, they exist because we've added a method translateIfPhraseKey that really should never exist, because at every point in our code, we should know if what we have is a translation key or a text to show to the user as is. What changes do you think we should make in order to solve the problem?remove the translateIfPhraseKey function and change all of its usages to:
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Get rid of MISSING TRANSLATION errors once and for all What is the root cause of that problem?This is a refactor task What changes do you think we should make in order to solve the problem?
App/src/components/FormHelpMessage.tsx Line 36 in c19eea6
Line 158 in c19eea6
Currently, we utilize "translateIfPhraseKey" in three places. I propose using the message directly in these three places; there's no need for translation. Then we can identify which cases require translation and update them to use the message directly. This will help maintain consistency across these common components. What alternative solutions did you explore? (Optional) |
I tagged him because IIRC he added that method so he can have context on all this, but I don't think he necessarily has to handle this one. |
I don't think this is good, its improving on what we have, but still does not resolve the main problem which is: whoever is adding a call to translate should know if what they are passing is a text or a key.
This is not saying much about the solution, since those 3 places are used in like 100 different places. |
ProposalPlease re-state the problem that we are trying to solve in this issue.We want to remove the What is the root cause of that problem?The reason The idea was to have a data structure However this is not a good pattern, as agreed to in the OP. The components should receive only translated error, whether it's back-end error or not will be controlled by whichever parent components/forms that use those components. What changes do you think we should make in order to solve the problem?Already-translated errors will always be a pure string.
That means for For For And we'll update the implementations of them accordingly to remove the translation logic. The
In this case, instead of constructing a For example, in this case, update to
We'll do so across the app, all cases to be updated are mostly of the above 3 categories. What alternative solutions did you explore? (Optional)NA |
I'll review proposals this weekend. |
cc @hungvu193 @iwiznia I can take over this one. As for the proposals, I think @nkdengineer proposal looks good |
@hungvu193, @kadiealexander Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Hmm not sure what should I do in this case. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.85-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-06-28. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payouts due:
Upwork job is here. |
@fedirjh please complete the checklist! |
BugZero Checklist:
|
@kadiealexander I will request payment on new Dot. |
$250 approved for @fedirjh |
@dukenv0307 please let me know when you've accepted the Upwork offer, thanks! |
@kadiealexander Maybe a mistake here, I'm not C or C+ on this issue 😄. |
Whoops, you're totally right! Sorry, been a long day. @nkdengineer please let me know when you've accepted the Upwork offer, thanks! |
@kadiealexander I've done that, thanks |
@francoisl, @fedirjh, @kadiealexander, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@kadiealexander can you confirm all payments have been issued and we can close this please? Thanks! |
Yup! All done. |
Context https://expensify.slack.com/archives/C01GTK53T8Q/p1702316632335369
Problem
We've had lots (also search
in:#expensify-bugs "missing translation"
in slack) ofMISSING TRANSLATION
bugs.These bugs should really not exist ever, they solely exist because we've added a method translateIfPhraseKey that really should never exist, because at every point in our code, we should know if what we have is a translation key or a text to show to the user as is.
Solution
Remove the method.
Change all its usages to:
cc @StevenKKC @fedirjh
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @nkdengineerThe text was updated successfully, but these errors were encountered: