Skip to content

Intl PPX support #77

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

Merged
merged 4 commits into from
May 27, 2021
Merged

Intl PPX support #77

merged 4 commits into from
May 27, 2021

Conversation

ixzzd
Copy link
Contributor

@ixzzd ixzzd commented May 24, 2021

We at @ahrefs use automation to collaborate with translators (localizejs.com API), and we found out that generated IDs simplify translation process a lot. Recently we open-sourced our localization ppx and use it in pair with rescript-react-intl-extractor ❤️

The idea is pretty simple- react-intl ppx generates ids based on defaultMessage and description, extractor use the same algorithm to generate ids for extracted messages (would be great to share id generator code)

Let's add intl-ppx support to the extractor! @alexfedoseev @cknitt what do you think?

@cknitt
Copy link
Member

cknitt commented May 25, 2021

@ixzzd Thank you for the nice PR (including documentation update, tests and all 👍)!

If @ahrefs is also committing to support this feature (the usage with bs-react-intl-ppx) in the future, I think it makes sense to merge this PR so that you do not need to maintain your own fork of rescript-react-intl-extractor.

However, given the stance the ReScript team has taken on PPX usage, I would like to make it very clear in the documentation that this is not to be considered the default/suggested usage of rescript-react-intl(-extractor).

Also, I just completed a renaming of all the related repos from bs-react-intl* to rescript-react-intl*. Would it be possible for you to follow suit with your repo/PPX (bs-react-intl-ppx -> rescript-react-intl-ppx)?

@ixzzd
Copy link
Contributor Author

ixzzd commented May 26, 2021

@cknitt, thanks for the response!

If @ahrefs is also committing to support this feature (the usage with bs-react-intl-ppx) in the future

Yes, for sure! We rely on the bs-react-intl-ppx heavily.

I would like to make it very clear in the documentation that this is not to be considered the default/suggested usage of rescript-react-intl(-extractor)

I added the warning: 2b15a8c

Would it be possible for you to follow suit with your repo/PPX (bs-react-intl-ppx -> rescript-react-intl-ppx)?

I have to discuss it with the team a bit.

@cknitt
Copy link
Member

cknitt commented May 27, 2021

Ok, let's merge it! We can still update the documentation when you change the PPX repo name.

@cknitt cknitt merged commit c4e6728 into cca-io:master May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants