Skip to content

Commit

Permalink
pass param during setup new locale
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-raj-jain committed Oct 16, 2024
1 parent 2bcc8fc commit 62f8b77
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/generate_blog_translations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { translateText } from './translate'
const batchSize = 20
const contentDirectory = join(process.cwd(), 'src', 'content')
const blogDirectory = join(contentDirectory, 'blog')
const languages = locales.filter((lang) => lang !== defaultLocale)
const languages = process.argv.includes('--locale') ? [process.argv[process.argv.indexOf('--locale') + 1]] : locales.filter((lang) => lang !== defaultLocale)

for (const lang of languages) {
console.log(`Preparing the blogs for locale: ${lang}...`)
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_locale_translations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from 'path'
import { translateText } from './translate'

const batchSize = 200
const locales = ['fr']
const locales = process.argv.includes('--locale') ? [process.argv[process.argv.indexOf('--locale') + 1]] : ['fr']

const localePath = path.join(process.cwd(), 'locales', 'en.yml')

Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_plugin_translations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { defaultLocale, locales } from '../src/services/locale'
import { translateText } from './translate'

const batchSize = 20
const languages = locales.filter((lang) => lang !== defaultLocale)
const languages = process.argv.includes('--locale') ? [process.argv[process.argv.indexOf('--locale') + 1]] : locales.filter((lang) => lang !== defaultLocale)
const contentDirectory = join(process.cwd(), 'src', 'content')
const blogDirectory = join(contentDirectory, 'plugins-tutorials')

Expand Down

0 comments on commit 62f8b77

Please sign in to comment.