-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Multi-language Support] No way of correctly translating time when messages were sent. #4219
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
Comments
Triggered auto assignment to @zanyrenney ( |
Proposal
Lines 56 to 68 in c009187
function timestampToDateTime(locale, timestamp, includeTimeZone = false) {
const date = getLocalMomentFromTimestamp(locale, timestamp);
const tz = includeTimeZone ? ' [UTC]Z' : '';
const todayAt = translate(locale, 'common.todayAt');
const tomorrowAt = translate(locale, 'common.tomorrowAt');
const yesterdayAt = translate(locale, 'common.yesterdayAt');
const at = translate(locale, 'common.conjunctionAt');
return moment(date).calendar({
sameDay: `[${todayAt}] LT${tz}`,
nextDay: `[${tomorrowAt}] LT${tz}`,
lastDay: `[${yesterdayAt}] LT${tz}`,
nextWeek: `MMM D [${at}] LT${tz}`,
lastWeek: `MMM D [${at}] LT${tz}`,
sameElse: `MMM D, YYYY [${at}] LT${tz}`,
});
} |
Triggered auto assignment to @TomatoToaster ( |
We can hold this issue until #4090. I am adding a lot of missing translations there. After we should do an audit of the app to add all the missing translations and replace all the strings with translations whereever possible. |
Translations can be added later but formatting date-time is still required which is the main issue here. |
Triggered auto assignment to @kevinksullivan ( |
Alright I think this problem makes sense. Good catch! I like the proposal you made too, I think it makes sense for this problem. In these cases, I'm not sure what the the next steps are. I think we just need the job to be made @kevinksullivan. I renamed the title because I think it's more clear on what the problem is lmk what you think @aman-atg |
Thanks @TomatoToaster
LGTM |
job posted https://www.upwork.com/jobs/~010a0f724dd05272b1 @aman-atg add a proposal and I'll hire you! |
Ah well the solution is merged, I think we just have the waiting period next. |
Ah already paid this one! |
@kevinksullivan yes, but I think I didn't get the bonus for this one. ( Link ) |
@aman-atg I don't have access to that page. Can you provide a screenshot? |
Ah thanks, I see our approach to bonuses changed. All set @aman-atg ! |
Uh oh!
There was an error while loading. Please reload this page.
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Actual Result:
Workaround:
Visual Issue
Platform:
Where is this issue occurring?
Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: