-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat: add localization for opensearch base map #312
Conversation
Signed-off-by: raintygao <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #312 +/- ##
==========================================
- Coverage 85.00% 84.76% -0.24%
==========================================
Files 14 14
Lines 400 407 +7
Branches 57 59 +2
==========================================
+ Hits 340 345 +5
- Misses 43 45 +2
Partials 17 17 ☔ View full report in Codecov by Sentry. |
Signed-off-by: raintygao <[email protected]>
common/util.ts
Outdated
const OSD_LANGUAGES = ['en', 'es', 'fr', 'de', 'ja', 'ko', 'zh'], // all these codes are also supported in vector tiles map | ||
FALLBACK_LANGUAGE = 'en'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move the constant to https://github.com/opensearch-project/dashboards-maps/blob/main/common/index.ts?
Signed-off-by: raintygao <[email protected]>
public/model/OSMLayerFunctions.ts
Outdated
@@ -41,6 +42,17 @@ const updateLayerConfig = (layerConfig: OSMLayerSpecification, maplibreRef: Mapl | |||
handleStyleLayers(layerConfig, maplibreRef); | |||
}; | |||
|
|||
const localizationMapLayer = (maplibreRef: MaplibreRef, styleLayer: LayerSpecification) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: setLanguage
Signed-off-by: raintygao <[email protected]>
* feat: add localization for base map Signed-off-by: raintygao <[email protected]> * chore: update getlanguage order Signed-off-by: raintygao <[email protected]> * chore: move constants to index Signed-off-by: raintygao <[email protected]> * chore: update function name Signed-off-by: raintygao <[email protected]> --------- Signed-off-by: raintygao <[email protected]> (cherry picked from commit 8744efb)
* feat: add localization for base map Signed-off-by: raintygao <[email protected]> * chore: update getlanguage order Signed-off-by: raintygao <[email protected]> * chore: move constants to index Signed-off-by: raintygao <[email protected]> * chore: update function name Signed-off-by: raintygao <[email protected]> --------- Signed-off-by: raintygao <[email protected]> (cherry picked from commit 8744efb) Co-authored-by: raintygao <[email protected]>
… (opensearch-project#351) * feat: add localization for base map Signed-off-by: raintygao <[email protected]> * chore: update getlanguage order Signed-off-by: raintygao <[email protected]> * chore: move constants to index Signed-off-by: raintygao <[email protected]> * chore: update function name Signed-off-by: raintygao <[email protected]> --------- Signed-off-by: raintygao <[email protected]> (cherry picked from commit 8744efb) Co-authored-by: raintygao <[email protected]>
cc @kavilla FYI. This is phase 1. |
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.