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

Babel can not extract words from superset-ui packages #10858

Closed
3 tasks done
grace-shi opened this issue Sep 14, 2020 · 3 comments
Closed
3 tasks done

Babel can not extract words from superset-ui packages #10858

grace-shi opened this issue Sep 14, 2020 · 3 comments
Assignees
Labels
!deprecated-label:bug Deprecated label - Use #bug instead

Comments

@grace-shi
Copy link

A clear and concise description of what the bug is.

Expected results

when extracting new strings for translation, words inside superset-ui packages should be extracted as well.

Actual results

Babel only extracts words from superset-frontend/src and backend code. ignored superset-ui plugins inside node_modules

Screenshots

Screen Shot 2020-09-14 at 10 06 19 PM

How to reproduce the bug

  1. Go to project root directory
  2. Run flask fab babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _ -k __ -k t -k tn -k tct
  3. See logs

Environment

  • superset version: 0.37
  • python version: 3.7.0
  • node.js version: v12.18.2
  • npm version: 6.14.5

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Many chart plugins use t function to translate strings, but these strings can not extracted for translation.

@grace-shi grace-shi added the !deprecated-label:bug Deprecated label - Use #bug instead label Sep 14, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.91. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@zhaoyongjie
Copy link
Member

Hi, @grace-shi. there are a workaround to fetch translation from any directory that specify a custome babel.cfg file. The babel.cfg contains superset-ui-plugs directory.

@junlincc
Copy link
Member

closing ... issued has been resolved by #10902.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead
Projects
None yet
Development

No branches or pull requests

3 participants