Skip to content

Commit

Permalink
Allow language ignore to be set by setup.cfg file.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtibbles committed May 2, 2023
1 parent f0aa30e commit db7371e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/kolibri-tools/lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ program
const localeDataFolderDefault = filePath(get(config, ['kolibri:i18n', 'locale_data_folder']));
const globalWebpackConfigDefault = filePath(get(config, ['kolibri:i18n', 'webpack_config']));
const langInfoConfigDefault = filePath(get(config, ['kolibri:i18n', 'lang_info']));
const langIgnoreDefaults = list(get(config, ['kolibri:i18n', 'ignore'], ''));

// Path to the kolibri locale language_info file, which we use if we are running
// from inside the Kolibri repository.
Expand Down Expand Up @@ -534,7 +535,7 @@ function _addPathOptions(cmd) {
'-i, --ignore <patterns...>',
'Ignore these comma separated patterns',
list,
ignoreDefaults
langIgnoreDefaults.length ? langIgnoreDefaults : ignoreDefaults
)
.option('-n , --namespace <namespace>', 'Set namespace for string extraction')
.option(
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ exclude_lines =
[kolibri:i18n]
project = kolibri
locale_data_folder = kolibri/locale
# Glob to exclude node_modules and static folders
# but not ignore kolibri-common package
ignore = **/node_modules/!(kolibri-common)/**,**/static/**

0 comments on commit db7371e

Please sign in to comment.