-
Notifications
You must be signed in to change notification settings - Fork 46
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 <tygao@amazon.com>
Codecov Report
📣 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
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
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 <tygao@amazon.com>
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 <tygao@amazon.com>
* 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)
* 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>
… (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>
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.