Skip to content
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

Add a script to gather strings for sending to translator #1038

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

r-ash
Copy link
Collaborator

@r-ash r-ash commented Nov 21, 2024

Description

This PR adds a script which reads the translation keys from the locales and writes them into a csv we can send to the translator.

Type of version change

None

Checklist

  • I have incremented version number, or version needs no increment
  • The build passed successfully, or failed because of ADR tests

@krisdoyon
Copy link
Contributor

Ran locally and was able to generate the csv file, but with one oddity: script kept failing due to not being able to import locales with this error:

SyntaxError: The requested module '../src/app/store/translations/locales' does not provide an export named 'locales'

I changed the file extension on collectTranslations from .mts to .ts and ran it that way and it worked as expected.

@r-ash
Copy link
Collaborator Author

r-ash commented Nov 22, 2024

Ran locally and was able to generate the csv file, but with one oddity: script kept failing due to not being able to import locales with this error:

SyntaxError: The requested module '../src/app/store/translations/locales' does not provide an export named 'locales'

I changed the file extension on collectTranslations from .mts to .ts and ran it that way and it worked as expected.

Thanks for this, I've updated that to .ts and runs nicely on my machine too.

@r-ash r-ash merged commit 645ed49 into main Nov 22, 2024
8 of 9 checks passed
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