diff --git a/scripts/utils.py b/scripts/utils.py index 20b49256e..f4f8c9216 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -27,7 +27,7 @@ def get_text_for_translations(root_path): assets_file = ( - root_path + "/env/plugins/aspects/apps/superset/pythonpath/assets.yaml" + root_path + "/env/plugins/aspects/apps/superset/localization/assets.yaml" ) strings = [] @@ -96,7 +96,7 @@ def compile_translations(root_path): tx.fetch_translations() translation_file = ( - "tutoraspects/templates/aspects/apps/superset/pythonpath/locale.yaml" + "tutoraspects/templates/aspects/apps/superset/localization/locale.yaml" ) file = open(translation_file, "w") diff --git a/tutoraspects/patches/k8s-deployments b/tutoraspects/patches/k8s-deployments index b9ddfacf0..ea750e303 100644 --- a/tutoraspects/patches/k8s-deployments +++ b/tutoraspects/patches/k8s-deployments @@ -211,6 +211,8 @@ spec: name: docker - mountPath: /app/pythonpath name: pythonpath + - mountPath: /app/localization + name: localization - mountPath: /app/security name: security volumes: @@ -220,6 +222,9 @@ spec: - name: pythonpath configMap: name: superset-pythonpath + - name: localization + configMap: + name: superset-localization - name: security configMap: name: superset-security @@ -300,6 +305,8 @@ spec: name: docker - mountPath: /app/pythonpath name: pythonpath + - mountPath: /app/localization + name: localization - mountPath: /app/security name: security volumes: @@ -309,6 +316,9 @@ spec: - name: pythonpath configMap: name: superset-pythonpath + - name: localization + configMap: + name: superset-localization - name: security configMap: name: superset-security @@ -389,6 +399,8 @@ spec: name: docker - mountPath: /app/pythonpath name: pythonpath + - mountPath: /app/localization + name: localization - mountPath: /app/security name: security volumes: @@ -398,6 +410,9 @@ spec: - name: pythonpath configMap: name: superset-pythonpath + - name: localization + configMap: + name: superset-localization - name: security configMap: name: superset-security diff --git a/tutoraspects/patches/k8s-jobs b/tutoraspects/patches/k8s-jobs index c67f45313..69013e29f 100644 --- a/tutoraspects/patches/k8s-jobs +++ b/tutoraspects/patches/k8s-jobs @@ -216,6 +216,8 @@ spec: name: docker - mountPath: /app/pythonpath name: pythonpath + - mountPath: /app/localization + name: localization - mountPath: /app/security name: security - mountPath: /app/assets @@ -227,6 +229,9 @@ spec: - name: pythonpath configMap: name: superset-pythonpath + - name: localization + configMap: + name: superset-localization - name: security configMap: name: superset-security @@ -296,6 +301,8 @@ spec: name: docker - mountPath: /app/pythonpath name: pythonpath + - mountPath: /app/localization + name: localization - mountPath: /app/security name: security - mountPath: /app/assets @@ -307,6 +314,9 @@ spec: - name: pythonpath configMap: name: superset-pythonpath + - name: localization + configMap: + name: superset-localization - name: security configMap: name: superset-security diff --git a/tutoraspects/patches/kustomization-configmapgenerator b/tutoraspects/patches/kustomization-configmapgenerator index a7fd11e38..5272ae682 100644 --- a/tutoraspects/patches/kustomization-configmapgenerator +++ b/tutoraspects/patches/kustomization-configmapgenerator @@ -68,6 +68,13 @@ labels: app.kubernetes.io/name: superset +- name: superset-localization + files:{% for file in "aspects/apps/superset/localization"|walk_templates %} + - plugins/{{ file }}{% endfor %} + options: + labels: + app.kubernetes.io/name: superset + - name: superset-security files: - plugins/aspects/apps/superset/security/roles.json diff --git a/tutoraspects/templates/aspects/apps/superset/pythonpath/locale.yaml b/tutoraspects/templates/aspects/apps/superset/localization/locale.yaml similarity index 100% rename from tutoraspects/templates/aspects/apps/superset/pythonpath/locale.yaml rename to tutoraspects/templates/aspects/apps/superset/localization/locale.yaml diff --git a/tutoraspects/templates/aspects/apps/superset/pythonpath/create_assets.py b/tutoraspects/templates/aspects/apps/superset/pythonpath/create_assets.py index 79a9f0543..25849361f 100644 --- a/tutoraspects/templates/aspects/apps/superset/pythonpath/create_assets.py +++ b/tutoraspects/templates/aspects/apps/superset/pythonpath/create_assets.py @@ -33,7 +33,7 @@ FILE_NAME_ATTRIBUTE = "_file_name" -TRANSLATIONS_FILE_PATH = "/app/pythonpath/locale.yaml" +TRANSLATIONS_FILE_PATH = "/app/localization/locale.yaml" ASSETS_FILE_PATH = "/app/pythonpath/assets.yaml" merged_data = {} diff --git a/tutoraspects/templates/base-docker-compose-services b/tutoraspects/templates/base-docker-compose-services index 9247c726c..fbd1d759c 100644 --- a/tutoraspects/templates/base-docker-compose-services +++ b/tutoraspects/templates/base-docker-compose-services @@ -3,6 +3,7 @@ image: {{ DOCKER_IMAGE_SUPERSET }} volumes: - ../../env/plugins/aspects/apps/superset/docker:/app/docker - ../../env/plugins/aspects/apps/superset/pythonpath:/app/pythonpath + - ../../env/plugins/aspects/apps/superset/localization:/app/localization - ../../env/plugins/aspects/apps/superset/security:/app/security - ../../env/plugins/aspects/apps/superset/superset_home:/app/superset_home - ../../env/plugins/aspects/apps/superset/assets:/app/assets