-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
fix: Date formatting and language translation for other regions #10385
base: develop
Are you sure you want to change the base?
fix: Date formatting and language translation for other regions #10385
Conversation
*Change global property as suggested in PR chatwoot#10360
In short it is now working. I thank. |
Hey @KokeroO this looks great
For this perhaps, you could make file the following file import { useI18n } from 'vue-i18n';
import {
messageStamp,
messageTimestamp,
dynamicTime,
dateFormat,
shortTimestamp,
} from 'shared/helpers/timeHelper';
export default function useLocaleFormatter() {
const { locale } = useI18n();
const localeDynamicTime = (...args) => dynamicTime(...args, locale.value);
const localeDateFormat = (...args) => dateFormat(...args, locale.value);
const localeShortTimestamp = (...args) =>
shortTimestamp(...args, locale.value);
const localeMessageStamp = (...args) => messageStamp(...args, locale.value);
const localeMessageTimestamp = (...args) =>
messageTimestamp(...args, locale.value);
return {
localeDynamicTime,
localeDateFormat,
localeShortTimestamp,
localeMessageStamp,
localeMessageTimestamp,
};
} This can be used anywhere in the setup context as
|
@pranavrajs I just need to fix timeHelper.js and timeHelper.spec.js. app/javascript/shared/helpers/specs/timeHelper.spec.js |
Yeah, seems like they can be combined. Just need to handle the |
@scmmishra
|
@KokeroO this looks great! I'll review this ASAP and let you know |
Hey! I see that my issue was mentionned here. |
@Micorksen The help center will also be covered in this PR. |
Hey @pranavrajs @sojan-official, can someone please accept this PR? |
🐢 Turtley slow progress alert! This pull request has been idle for over 30 days. Can we please speed things up and either merge it or release it back into the wild? |
Pull Request Template
Description
I decided to close PR #10360 and split it into 2 separate PRs.
Resolves #7862, #9285, #10327
Type of change
How Has This Been Tested?
Checklist: