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

Integrate translation module @superset-ui/translation #6222

Merged
merged 18 commits into from
Oct 30, 2018

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Oct 29, 2018

Import @superset-ui/translation module

  • Replace calls (in about hundred places) from
import { t } from '../locales';

to

import { t } from '@superset-ui/translation'

Update webpack build config

  • Create preamble.js which defines the steps that has to happen before everything else (e.g. configure the translation module)
  • Prepend all webpack entry points with preamble.
  • Deprecate common entry point and create a new entry point preamble.
  • Update FAB template (base.html and basic.html)
    • Remove common entry point from the page that has an entry point (because preamble is now included with all entry points). Prior to this PR, Superset imports both common and another entry point (explore, dashboard, etc.) in a single page. With this PR, it will no longer import common.
    • Replace common with preamble for the page that doesn't have another entry point. (base.html)
  • Extract getClientErrorObject and error message strings into separate files.

@williaster @xtinec @conglei @graceguo-supercat @michellethomas

@codecov-io
Copy link

codecov-io commented Oct 30, 2018

Codecov Report

Merging #6222 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6222      +/-   ##
==========================================
- Coverage   76.87%   76.85%   -0.02%     
==========================================
  Files          47       47              
  Lines        9401     9393       -8     
==========================================
- Hits         7227     7219       -8     
  Misses       2174     2174
Impacted Files Coverage Δ
superset/utils/dashboard_import_export.py 30.43% <0%> (-10.31%) ⬇️
superset/models/core.py 83.82% <0%> (-0.06%) ⬇️
superset/models/sql_lab.py 98.46% <0%> (-0.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d6a429...41f2a77. Read the comment docs.

Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

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

I had one question about bootstrap data but LGTM overall! 💯 🚀

superset/assets/src/preamble.js Outdated Show resolved Hide resolved
@john-bodley john-bodley merged commit 1473e2c into apache:master Oct 30, 2018
@kristw kristw deleted the kristw-translation branch October 30, 2018 21:53
bipinsoniguavus pushed a commit to ThalesGroup/incubator-superset that referenced this pull request Dec 26, 2018
* add translation modules

* Update package.json

* Update instructions in CONTRIBUTING

* Remove old files

* Add new entry point "translation"

* Change imports

* move setupTranslation code

* remove translation from entry

* Update python template

* Refactor utils into smaller, independent files

* Define preamble

* working state

* combine toggleCheckbox with setupApp

* move code block out of document.ready

* move setupClient to preamble

* fix unit tests

* update package version

* delete deletion code
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants