Skip to content

Feat: DEV import only some locales through a new config setting #4857

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

Conversation

HarikalarKutusu
Copy link
Contributor

@HarikalarKutusu HarikalarKutusu commented Apr 1, 2025

This dev related feature implements partial import of language sentences without tempering the server/data directory, which causes issues with git.

  • A new config/env variable is defined: CV_IMPORT_LANGUAGES. It is only used when CV_IMPORT_SENTENCES is set to true
  • It keeps a comma delimited list of language codes, like "en,de,tr"
  • Only the intersection of the server/data directory contents and this list gets imported. Thus, any language code that does not exist in the directory will be filtered out.
  • If it is not defined or set to empty string, all languages in the server/data directory will be imported.

Ex: You want to work on some Turkic languages and set in config.json:

"IMPORT_SENTENCES": true,
"IMPORT_LANGUAGES"="tr,bas,xyz",

and/or in .env-local-docker:

CV_IMPORT_SENTENCES="true"
CV_IMPORT_LANGUAGES="tr,bas,xyz"

only tr and bas locales gets imported.

If merged, I can add related info into DEVELOPMENT.md file...

@HarikalarKutusu HarikalarKutusu requested a review from a team as a code owner April 1, 2025 23:13
@HarikalarKutusu HarikalarKutusu requested review from moz-dfeller and removed request for a team April 1, 2025 23:13
Copy link
Contributor

@moz-dfeller moz-dfeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good addition, thanks!

@moz-dfeller moz-dfeller merged commit 73869eb into common-voice:main Apr 15, 2025
2 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