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

feat: add localization for opensearch base map #312

Merged
merged 5 commits into from
Mar 17, 2023

Conversation

raintygao
Copy link
Contributor

Description

add localization for opensearch base map

Issues Resolved

#273

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: raintygao <tygao@amazon.com>
@raintygao raintygao requested a review from a team March 2, 2023 07:50
@raintygao raintygao self-assigned this Mar 2, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2023

Codecov Report

Merging #312 (e1fa873) into main (816ce79) will decrease coverage by 1.84%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
- Coverage   91.66%   89.83%   -1.84%     
==========================================
  Files          10       12       +2     
  Lines         264      305      +41     
  Branches       34       42       +8     
==========================================
+ Hits          242      274      +32     
- Misses         16       21       +5     
- Partials        6       10       +4     
Impacted Files Coverage Δ
...-Dashboards/plugins/dashboards-maps/common/util.ts 71.42% <0.00%> (-28.58%) ⬇️
...Dashboards/plugins/dashboards-maps/common/index.ts 100.00% <0.00%> (ø)
...shboards-maps/public/model/map/layer_operations.ts 100.00% <0.00%> (ø)
...ps/public/components/map_container/maps_footer.tsx 61.53% <0.00%> (ø)
...mponents/layer_control_panel/hide_layer_button.tsx 83.33% <0.00%> (ø)
...hboards/plugins/dashboards-maps/public/services.ts 27.27% <0.00%> (+7.27%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: raintygao <tygao@amazon.com>
common/util.ts Outdated
Comment on lines 12 to 13
const OSD_LANGUAGES = ['en', 'es', 'fr', 'de', 'ja', 'ko', 'zh'], // all these codes are also supported in vector tiles map
FALLBACK_LANGUAGE = 'en';
Copy link
Member

Choose a reason for hiding this comment

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

Signed-off-by: raintygao <tygao@amazon.com>
@@ -41,6 +42,17 @@ const updateLayerConfig = (layerConfig: OSMLayerSpecification, maplibreRef: Mapl
handleStyleLayers(layerConfig, maplibreRef);
};

const localizationMapLayer = (maplibreRef: MaplibreRef, styleLayer: LayerSpecification) => {
Copy link
Member

Choose a reason for hiding this comment

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

nit: setLanguage

@raintygao raintygao merged commit 8744efb into opensearch-project:main Mar 17, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 17, 2023
* feat: add localization for base map

Signed-off-by: raintygao <tygao@amazon.com>

* chore: update getlanguage order

Signed-off-by: raintygao <tygao@amazon.com>

* chore: move constants to index

Signed-off-by: raintygao <tygao@amazon.com>

* chore: update function name

Signed-off-by: raintygao <tygao@amazon.com>

---------

Signed-off-by: raintygao <tygao@amazon.com>
(cherry picked from commit 8744efb)
junqiu-lei pushed a commit that referenced this pull request Mar 20, 2023
* feat: add localization for base map

Signed-off-by: raintygao <tygao@amazon.com>

* chore: update getlanguage order

Signed-off-by: raintygao <tygao@amazon.com>

* chore: move constants to index

Signed-off-by: raintygao <tygao@amazon.com>

* chore: update function name

Signed-off-by: raintygao <tygao@amazon.com>

---------

Signed-off-by: raintygao <tygao@amazon.com>
(cherry picked from commit 8744efb)

Co-authored-by: raintygao <tygao@amazon.com>
VijayanB pushed a commit to VijayanB/dashboards-maps that referenced this pull request Mar 20, 2023
… (opensearch-project#351)

* feat: add localization for base map

Signed-off-by: raintygao <tygao@amazon.com>

* chore: update getlanguage order

Signed-off-by: raintygao <tygao@amazon.com>

* chore: move constants to index

Signed-off-by: raintygao <tygao@amazon.com>

* chore: update function name

Signed-off-by: raintygao <tygao@amazon.com>

---------

Signed-off-by: raintygao <tygao@amazon.com>
(cherry picked from commit 8744efb)

Co-authored-by: raintygao <tygao@amazon.com>
@raintygao
Copy link
Contributor Author

cc @kavilla FYI. This is phase 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants