-
Notifications
You must be signed in to change notification settings - Fork 350
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
Prettier formatted code with line break not recognized by i18n-ally #1011
Comments
Must be one of these regexes:
On a related note, I noticed that |
Same as #132 but for next-intl. Opened PR for this |
Thanks a lot @ZerdoX-x! 🙌 Would you mind addressing the topic with |
Sorry, but I could not understand what exactly do you mean. Maybe due to lack of English language knowledge, maybe because I have never used next-intl. I can't find |
function Component() {
const t = useTranslations('Component');
return <h1>{t('title')}</h1>;
}
This scoping is implemented in Similarly, in the Metadata API of Next.js, this API can be used (docs): import {getTranslator} from 'next-intl/server';
export async function generateMetadata({params: {locale}}) {
const t = await getTranslator(locale, 'Metadata');
return {
title: t('title')
};
} Currently The fix would be to adjust the regex mentioned above that looks for But this can of course be handled in a separate issue, I thought I'll bring it up since it seems to be quite related! 🙂 |
@amannn thank you for explanation but I think I am not capable of this, sorry 😅 |
When I have a translation key in my t() method that is very long, prettier breaks it into multiple lines and i18n-ally doesn't recognize this. I am using next-intl by @amannn

The text was updated successfully, but these errors were encountered: