i18n-ally icon indicating copy to clipboard operation
i18n-ally copied to clipboard

Add support for next-intl/server

Open equiman opened this issue 1 year ago • 4 comments

Is your feature related to a specific framework or general for this extension next-intl (server side)

Is your feature request related to a problem? Please describe. extension is working correctly with next-intl using the useTranslations() but in next-intl/server use the function useTranslations()

Describe the solution you'd like

  • Showing a preview of the key
  • Detecting server side keys on usage report

Additional context That's what is showing currently on server side component image

equiman avatar Sep 06 '23 22:09 equiman

can you add the support for getTranslations too ? 🙏

import { getTranslations } from 'next-intl/server';
const t = await getTranslations('Index');

robin-ln avatar Nov 22 '23 19:11 robin-ln

https://github.com/lokalise/i18n-ally/pull/1048

robin-ln avatar Nov 22 '23 20:11 robin-ln

getTranslator was renamed to getTranslations on new versions.

image

equiman avatar Nov 27 '23 20:11 equiman

I use the "Custom Framework" feature from the extension to support next-intl/server.

So, it works perfectly with next-intl using getTranslations without any issue: https://github.com/ixartz/Next-js-Boilerplate and you can find the configuration at .vscode/i18n-ally-custom-framework.yml

ixartz avatar May 09 '24 11:05 ixartz