[openstreetmap/openstreetmap-website] Move more map layer logic to MapLayers lib to simplify JS (PR #5832)
Marwin Hochfelsner
notifications at github.com
Wed Mar 26 20:20:55 UTC 2025
@hlfan commented on this pull request.
> @@ -3,6 +3,10 @@ def self.full_definitions(layers_filename)
YAML.load_file(Rails.root.join(layers_filename))
.reject { |layer| layer["apiKeyId"] && !Settings[layer["apiKeyId"]] }
.map do |layer|
+ layer["name"] = I18n.t("site.index.map.base.#{layer['nameId']}")
Well the long term idea was to use the new lib to remove the untranslated credits in the embed, currently that part of the definitions isn't used at all, showing the LOSM credits instead.
But if there's no easy clean way to integrate ruby or to split off the translatable part of the definition object perhaps it should be left in js completely.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5832#discussion_r2014943766
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5832/review/2718531912 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250326/6cbff01e/attachment.htm>
More information about the rails-dev
mailing list