diff --git a/.discourse-compatibility b/.discourse-compatibility new file mode 100644 index 00000000..13cb7d92 --- /dev/null +++ b/.discourse-compatibility @@ -0,0 +1 @@ +3.1.999: ee6a34482cc35006a11dc4acb338ee7c998c5774 diff --git a/.rubocop.yml b/.rubocop.yml index 7f4f0603..e5a3e45d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,5 +9,5 @@ RSpec/DescribeClass: AllCops: Exclude: - - '**/gems/**/*' - - '**/vendor/**/*' \ No newline at end of file + - "**/gems/**/*" + - "**/vendor/**/*" diff --git a/assets/javascripts/discourse/components/location-selector.js.es6 b/assets/javascripts/discourse/components/location-selector.js.es6 index fabb425a..fbe057d8 100644 --- a/assets/javascripts/discourse/components/location-selector.js.es6 +++ b/assets/javascripts/discourse/components/location-selector.js.es6 @@ -5,6 +5,7 @@ import { } from "../lib/location-utilities"; import { observes } from "discourse-common/utils/decorators"; import TextField from "discourse/components/text-field"; +import { findRawTemplate } from "discourse-common/lib/raw-templates"; export default TextField.extend({ autocorrect: false, @@ -22,17 +23,10 @@ export default TextField.extend({ val = location; } - window.__DISCOURSE_RAW_TEMPLATES = requirejs( - "discourse-common/lib/raw-templates" - ).__DISCOURSE_RAW_TEMPLATES; - - let template = - window.__DISCOURSE_RAW_TEMPLATES["javascripts/location-autocomplete"]; - $(self.element) .val(val) .autocomplete({ - template, + template: findRawTemplate("javascripts/location-autocomplete"), single: true, updateData: false, diff --git a/assets/javascripts/discourse/components/locations-map.hbs b/assets/javascripts/discourse/components/locations-map.hbs new file mode 100644 index 00000000..1a294703 --- /dev/null +++ b/assets/javascripts/discourse/components/locations-map.hbs @@ -0,0 +1,102 @@ +
+ {{#if this.showExpand}} + + {{/if}} + + {{#if this.showEditButton}} + + {{/if}} + +
\ No newline at end of file diff --git a/assets/javascripts/discourse/components/locations-map.js b/assets/javascripts/discourse/components/locations-map.js new file mode 100644 index 00000000..3430af9a --- /dev/null +++ b/assets/javascripts/discourse/components/locations-map.js @@ -0,0 +1,584 @@ +import { action, computed } from "@ember/object"; +import Component from "@glimmer/component"; +import { inject as service } from "@ember/service"; +import { + addCircleMarkersToMap, + addMarkersToMap, + generateMap, + setupMap, +} from "../lib/map-utilities"; +import { tracked } from "@glimmer/tracking"; +import { ajax } from "discourse/lib/ajax"; +import { findOrResetCachedTopicList } from "discourse/lib/cached-topic-list"; + +export default class LocationMapComponent extends Component { + @service siteSettings; + @service currentUser; + @service store; + + @tracked mapToggle = "expand"; + @tracked expanded = false; + @tracked showExpand = !this.args.disableExpand; + @tracked showAttribution = false; + @tracked runSetup = true; + @tracked showSearch = false; + @tracked locations = this.args.locations || []; + @tracked filteredLocations = []; + @tracked mapType = "category"; + @tracked topic = {}; + @tracked topicList = {}; + @tracked user = {}; + @tracked userList = {}; + @tracked mapObjs = {}; + @tracked markers = null; + @tracked searchFilter = ""; + @tracked searchFilterType = "name"; + + @action + setup() { + this.getLocationData().then(() => { + if (!Object.keys(this.mapObjs).length) { + this.mapObjs = this.initializeMap(); + } else { + if (this.markers) { + this.markers.clearLayers(); + this.markers = null; + } + } + this.onMapLoad(); + this.locations = []; + this.gatherLocations(); + + this.setupLocationMap(); + + // TODO handle sidebar + // triggered in sidebar-container component in layouts plugin + // this.appEvents.on("sidebars:after-render", () => { + // state.runSetup = true; + // state.showSearch = false; + // this.scheduleRerender(); + // }); + }); + } + + get isTopicListType() { + return this.args.mapType === "topicList"; + } + + get isUserListType() { + return this.args.mapType === "userList"; + } + + get isMultipleLocations() { + return ( + this.args.mapType === "topicList" || this.args.mapType === "userList" + ); + } + + @action + changeFilterType(event) { + this.searchFilterType = event.target.value; + } + + @action + filterLocations(event) { + this.searchFilter = event.target.value; + + if (this.markers) { + this.markers.clearLayers(); + this.markers = null; + } + + this.gatherLocations(); + + this.setupLocationMap(); + + // TODO handle sidebar + // triggered in sidebar-container component in layouts plugin + // this.appEvents.on("sidebars:after-render", () => { + // state.runSetup = true; + // state.showSearch = false; + // this.scheduleRerender(); + // }); + } + + async getLocationData() { + let filter = ""; + let category = this.args.category; + + if (this.args.mapType === "topicList") { + if (category) { + filter = `c/${category.slug}/${category.id}/l/map`; + + this.topicList = + (await findOrResetCachedTopicList(this.session, filter)) || + this.store.findFiltered("topicList", { filter }); + } else { + let result = await ajax("map.json"); + this.topicList = result.topic_list; + } + } + + if (this.args.mapType === "userList") { + let params = { period: "location" }; + this.userList = await this.store.find("directoryItem", params); + } + } + + gatherLocations() { + this.filteredLocations = []; + // gather map data and prepare raw marker data + this.mapType = this.args.mapType; + this.topic = this.args.topic; + this.user = this.args.user; + + if ( + this.args.locations && + this.locations.length !== this.args.locations.length + ) { + this.args.locations.forEach((l) => { + if (l && this.validGeoLocation(l)) { + this.locations.push(l); + } + }); + } + + if (this.addTopicMarker(this.topic, this.locations)) { + this.filteredLocations.push(this.topicMarker(this.topic)); + } + + if ( + this.mapType === "topicList" && + this.topicList && + this.topicList.topics + ) { + this.topicList.topics.forEach((t) => { + if (this.addTopicMarker(t, this.locations)) { + this.filteredLocations.push(this.topicMarker(t)); + } + }); + } + + if ( + this.mapType === "user" && + this.addUserMarker(this.user, this.locations) + ) { + this.filteredLocations.push(this.userMarker(this.user)); + } + + if (this.mapType === "userList" && this.userList) { + this.userList.forEach((u) => { + if (this.addUserMarker(u.user, this.locations)) { + this.filteredLocations.push(this.userMarker(u.user)); + } + }); + } + } + + addTopicMarker(topic) { + // confirm if topic marker to the data should be added + if ( + !topic || + !topic.location || + !topic.location.geo_location || + !this.validGeoLocation(topic.location.geo_location) || + topic.location.hide_marker || + this.locations.find((l) => l["topic_id"] === topic.id) + ) { + return false; + } + if (this.isTopicListType) { + if (this.searchFilter !== "") { + if (this.searchFilterType === "name") { + if (topic.location.name) { + if ( + !( + topic.location.name.toLowerCase().indexOf(this.searchFilter) > + -1 + ) + ) { + return false; + } + } else { + return false; + } + } + if (this.searchFilterType === "address") { + if (topic.location.address) { + if ( + !( + topic.location.address + .toLowerCase() + .indexOf(this.searchFilter) > -1 + ) + ) { + return false; + } + } else { + return false; + } + } + if (this.searchFilterType === "city") { + if (topic.location.city) { + if ( + !( + topic.location.city.toLowerCase().indexOf(this.searchFilter) > + -1 + ) + ) { + return false; + } + } else { + return false; + } + } + if (this.searchFilterType === "street") { + if (topic.location.street) { + if ( + !( + topic.location.street.toLowerCase().indexOf(this.searchFilter) > + -1 + ) + ) { + return false; + } + } else { + return false; + } + } + } + } + // confirmed + return true; + } + + addUserMarker(user) { + if ( + !user || + !this.validGeoLocation(user.geo_location) || + this.locations.find((l) => l["user_id"] === user.id) + ) { + return false; + } + if (this.searchFilter !== "") { + if ( + this.searchFilterType === "username" && + !(user.username.toLowerCase().indexOf(this.searchFilter) > -1) + ) { + return false; + } + if ( + this.searchFilterType === "name" && + !(user.name.toLowerCase().indexOf(this.searchFilter) > -1) + ) { + return false; + } + } + + //confirmed + return true; + } + + validGeoLocation(geoLocation) { + return geoLocation && geoLocation.lat && geoLocation.lon; + } + + topicMarker(topic) { + let location = topic.location; + + if (!location["marker"] && !location["circle_marker"]) { + location["marker"] = { + title: topic.fancy_title, + routeTo: `/t/${topic.slug}/${topic.id}`, + }; + } + + if ( + this.siteSettings.location_map_marker_category_color && + topic.category && + topic.category.color + ) { + location["marker"]["color"] = topic.category.color; + location["marker"]["class"] = topic.category.slug; + } + + location["topic_id"] = topic.id; + + return location; + } + + userMarker(user) { + let location = {}; + + location["marker"] = { + title: user.username, + avatar: user.avatar_template, + routeTo: "/u/" + user.username, + }; + + location["user_id"] = user.id; + + location["geo_location"] = user.geo_location; + + return location; + } + + locationPresent(locations, location) { + return ( + locations.filter((l) => { + if (location.geo_location) { + return false; + } + if (location.geo_location.lat && location.geo_location.lon) { + return ( + l.geo_location.lat === location.geo_location.lat && + l.geo_location.lon === location.geo_location.lon + ); + } else if (location.geo_location.boundingbox) { + return ( + l.geo_location.boundingbox === location.geo_location.boundingbox + ); + } + }).length > 0 + ); + } + + addMarkers() { + const map = this.mapObjs.map; + const filteredLocations = this.filteredLocations; + const settings = this.siteSettings; + + let rawMarkers = []; + let rawCircleMarkers = []; + + if (filteredLocations && filteredLocations.length > 0) { + filteredLocations.forEach((l) => { + if (l && l.geo_location) { + let marker = { + lat: l.geo_location.lat, + lon: l.geo_location.lon, + options: {}, + }; + + if (l.marker) { + marker["options"] = l.marker; + rawMarkers.push(marker); + } + + if (l.circle_marker) { + marker["options"] = l.circle_marker; + rawCircleMarkers.push(marker); + } + } + }); + } + + let markers = null; + + if (rawCircleMarkers && rawCircleMarkers.length > 0) { + addCircleMarkersToMap(rawCircleMarkers, map, this); + } + + if (rawMarkers && rawMarkers.length > 0) { + markers = addMarkersToMap( + rawMarkers, + map, + settings.location_map_maker_cluster_enabled, + settings.location_map_marker_cluster_multiplier, + settings.location_user_avatar, + settings.location_hide_labels + ); + } + + return markers; + } + + setupLocationMap() { + // setup map + + const mapObjs = this.mapObjs; + const map = mapObjs.map; + this.markers = this.addMarkers(); + const topic = this.topic; + const category = this.args.category; + const zoom = this.zoom; + const center = this.args.center; + let boundingbox = null; + + if ( + category && + category.custom_fields.location && + category.custom_fields.location.geo_location && + category.custom_fields.location.geo_location.boundingbox + ) { + boundingbox = category.custom_fields.location.geo_location.boundingbox; + } + + if ( + topic && + topic.location && + topic.location.geo_location && + topic.location.geo_location.boundingbox + ) { + boundingbox = topic.location.geo_location.boundingbox; + } + + map.invalidateSize(false); + setupMap(map, this.markers, boundingbox, zoom, center, this.siteSettings); + //map.invalidateSize(); + } + + @action + toggleAttribution() { + const map = this.mapObjs.map; + const attribution = this.mapObjs.attribution; + + if (!this.showAttribution) { + map.addControl(attribution); + } else { + if ($(".locations-map .leaflet-control-attribution").is(":visible")) { + map.removeControl(attribution); + } + } + + this.showAttribution = !this.showAttribution; + } + + @computed("args.category") + get showEditButton() { + return false; + // TODO + //return this.args.category && this.args.category.can_edit; + } + + @action + toggleSearch() { + // TODO + // scheduleOnce("afterRender", this, () => { + // // resetinng the val puts the cursor at the end of the text on focus + // const $input = $("#map-search-input"); + // const val = $input.val(); + // $input.focus(); + // $input.val(""); + // $input.val(val); + // }); + this.showSearch = !this.showSearch; + } + + @action + toggleExpand() { + const map = this.mapObjs.map; + this.expanded = !this.expanded; + + if (this.expanded) { + this.mapToggle = "compress"; + map.setZoom(this.siteSettings.location_map_expanded_zoom); + } else { + this.mapToggle = "expand"; + this.setupLocationMap(); + } + map.invalidateSize(); + } + + // TODO + // @action + // editCategory() { + // const appRoute = this.register.lookup("route:application"); + // appRoute.send("editCategory", this.category); + // }; + + onMapLoad() { + // find our container + const locationsMapDiv = document.getElementById("locations-map"); + + // check if there's a map in it + const mapContainerDivs = + locationsMapDiv.querySelector(".leaflet-container"); + + // if not add it + if (mapContainerDivs === null) { + locationsMapDiv.appendChild(this.mapObjs.element); + } + } + + initializeMap() { + // initialise map + let mapObjs; + + const center = this.args.center; + const clickable = this.args.clickable; + const zoom = this.args.zoom; + let opts = {}; + if (zoom) { + opts["zoom"] = zoom; + } + if (center) { + opts["center"] = center; + } + if (clickable) { + opts["clickable"] = clickable; + } + + mapObjs = generateMap(this.siteSettings, opts); + + return mapObjs; + } + + //TODO + // if (attrs.showAvatar && user) { + // let size = state.expanded ? "large" : "medium"; + // contents.push( + // h( + // "a.avatar-wrapper", + // { + // attributes: { "data-user-card": user.get("username") }, + // }, + // avatarImg(size, { + // template: user.get("avatar_template"), + // username: user.get("username"), + // }) + // ) + // ); + // } + + //TOOD + // if (attrs.search) { + // if (state.showSearch) { + // let locations = state.locations; + // let current = null; + // if (attrs.category && attrs.category.location) { + // current = attrs.category.location; + // } + // if (attrs.topic && attrs.topic.location) { + // current = attrs.topic.location; + // } + // contents.push( + // this.attach("map-search", { + // locations, + // current, + // }), + // this.attach("button", { + // className: "btn btn-map hide-search", + // action: "toggleSearch", + // icon: "times", + // }) + // ); + // } else { + // contents.push( + // this.attach("link", { + // className: "btn btn-map search", + // action: "toggleSearch", + // icon: "search", + // }) + // ); + // } + // } + + //TODO + // if (attrs.extraWidgets) { + // const extraWidgets = attrs.extraWidgets.map((w) => { + // return this.attach(w.widget, w.attrs); + // }); + // contents.push(...extraWidgets); + // } +} diff --git a/assets/javascripts/discourse/components/map-component.js.es6 b/assets/javascripts/discourse/components/map-component.js.es6 deleted file mode 100644 index 9157ad75..00000000 --- a/assets/javascripts/discourse/components/map-component.js.es6 +++ /dev/null @@ -1,57 +0,0 @@ -import MountWidget from "discourse/components/mount-widget"; -import { observes, on } from "discourse-common/utils/decorators"; -import { later, scheduleOnce } from "@ember/runloop"; - -export default MountWidget.extend({ - classNameBindings: [":map-component", ":map-container", "size"], - widget: "map", - clickable: false, - - buildArgs() { - let args = this.getProperties( - "category", - "topic", - "user", - "locations", - "clickable", - "topicList", - "userList", - "search", - "showAvatar", - "size", - "center", - "zoom" - ); - - if (this.get("geoLocation")) { - if (!args["locations"]) { - args["locations"] = []; - } - args["locations"].push({ geo_location: this.get("geoLocation") }); - } - - return args; - }, - - @on("didInsertElement") - setupOnRender() { - this.scheduleSetup(); - }, - - @observes( - "topicList.[]", - "category", - "geoLocation", - "geoLocations.[]", - "userList.[]" - ) - refreshMap() { - this.queueRerender(); - this.scheduleSetup(); - }, - - scheduleSetup() { - scheduleOnce("afterRender", () => this.appEvents.trigger("dom:clean")); - later(() => this.appEvents.trigger("sidebars:after-render")); - }, -}); diff --git a/assets/javascripts/discourse/components/user-location.hbs b/assets/javascripts/discourse/components/user-location.hbs new file mode 100644 index 00000000..a6ccbe90 --- /dev/null +++ b/assets/javascripts/discourse/components/user-location.hbs @@ -0,0 +1,23 @@ +
+ {{d-icon "map-marker-alt"}} +
+ {{this.userLocation}} +
+
+ + {{#if this.showMap}} +
+ +
+ {{/if}} +
+
\ No newline at end of file diff --git a/assets/javascripts/discourse/components/user-location.js b/assets/javascripts/discourse/components/user-location.js new file mode 100644 index 00000000..4b693c9a --- /dev/null +++ b/assets/javascripts/discourse/components/user-location.js @@ -0,0 +1,45 @@ +import { action } from "@ember/object"; +import Component from "@glimmer/component"; +import { inject as service } from "@ember/service"; +import { tracked } from "@glimmer/tracking"; +import I18n from "I18n"; +import { geoLocationFormat } from "../lib/location-utilities"; + +export default class LocationMapComponent extends Component { + @service siteSettings; + @service site; + @tracked showMap = false; + + get mapButtonLabel() { + return I18n.t(`location.geo.${this.showMap ? "hide" : "show"}_map`); + } + + get showMapButtonLabel() { + return this.args.formFactor !== "card" && !this.site.mobileView; + } + + get userLocation() { + let locationText = ""; + if (this.args.user && this.args.user.geo_location) { + let format = this.siteSettings.location_user_profile_format.split("|"); + let opts = {}; + + if (format.length && format[0]) { + opts["geoAttrs"] = format; + locationText = geoLocationFormat( + this.args.user.geo_location, + this.site.country_codes, + opts + ); + } else { + locationText = this.args.user.geo_location.address; + } + } + return locationText; + } + + @action + toggleMap() { + this.showMap = !this.showMap; + } +} diff --git a/assets/javascripts/discourse/connectors/user-card-location-and-website/replace-location.hbs b/assets/javascripts/discourse/connectors/user-card-location-and-website/replace-location.hbs index 74b10592..4a4e9e47 100644 --- a/assets/javascripts/discourse/connectors/user-card-location-and-website/replace-location.hbs +++ b/assets/javascripts/discourse/connectors/user-card-location-and-website/replace-location.hbs @@ -2,10 +2,7 @@ {{#if showUserLocation}} - {{mount-widget - widget="user-location" - args=(hash user=user formFactor="card") - }} + {{/if}} {{#if user.website_name}} diff --git a/assets/javascripts/discourse/connectors/user-location-and-website/replace-location.hbs b/assets/javascripts/discourse/connectors/user-location-and-website/replace-location.hbs index b61af866..c0d6c19d 100644 --- a/assets/javascripts/discourse/connectors/user-location-and-website/replace-location.hbs +++ b/assets/javascripts/discourse/connectors/user-location-and-website/replace-location.hbs @@ -2,10 +2,7 @@ {{#if showUserLocation}}
- {{mount-widget - widget="user-location" - args=(hash user=model formFactor="profile") - }} +
{{/if}} {{#if model.website_name}} diff --git a/assets/javascripts/discourse/initializers/location-edits.js.es6 b/assets/javascripts/discourse/initializers/location-edits.js.es6 index 99158387..83c48473 100644 --- a/assets/javascripts/discourse/initializers/location-edits.js.es6 +++ b/assets/javascripts/discourse/initializers/location-edits.js.es6 @@ -170,7 +170,7 @@ export default { category.get("custom_fields.location_enabled") && this.siteSettings.location_category_map_filter ) { - views.push({ name: I18n.t("filters.map.title"), value: "map" }); + views.push({ name: I18n.t("filters.map.label"), value: "map" }); } return views; @@ -183,23 +183,10 @@ export default { api.modifyClass(`route:discovery.${route}`, { pluginId: "locations-plugin", - afterModel(model) { - if (!this.siteSettings.location_category_map_filter) { - this.replaceWith(`/c/${this.Category.slugFor(model.category)}`); - } - return this._super(...arguments); - }, + afterModel() { + this.templateName = "discovery/map"; - renderTemplate() { - let navTemplate = - this.routeName.indexOf("Category") > -1 - ? "navigation/category" - : "navigation/default"; - this.render(navTemplate, { outlet: "navigation-bar" }); - this.render("discovery/map", { - outlet: "list-container", - controller: "discovery/topics", - }); + return this._super(...arguments); }, }); }); @@ -263,14 +250,14 @@ export default { buildList(category, args) { let items = this._super(category, args); - if (category) { - items = items.reject((item) => item.name === "map"); // Don't show Site Level "/map" - if ( - category.custom_fields.location_enabled && - category.siteSettings.location_category_map_filter - ) { - items.push(NavItem.fromText("map", args)); // Show category level "/map" instead - } + // Don't show Site Level "/map" + if ( + typeof category !== "undefined" && + category && + category.custom_fields.location_enabled && + category.siteSettings.location_category_map_filter + ) { + items.push(NavItem.fromText("map", args)); // Show category level "/map" instead } return items; diff --git a/assets/javascripts/discourse/initializers/location-map-edits.js.es6 b/assets/javascripts/discourse/initializers/location-map-edits.js.es6 index eedc33c0..d393b24d 100644 --- a/assets/javascripts/discourse/initializers/location-map-edits.js.es6 +++ b/assets/javascripts/discourse/initializers/location-map-edits.js.es6 @@ -1,5 +1,6 @@ import { withPluginApi } from "discourse/lib/plugin-api"; import { default as discourseComputed } from "discourse-common/utils/decorators"; +import I18n from "I18n"; const PLUGIN_ID = "locations-plugin"; @@ -9,9 +10,21 @@ export default { withPluginApi("0.8.12", (api) => { const siteSettings = container.lookup("site-settings:main"); - if (siteSettings.location_hamburger_menu_map_link) { - api.decorateWidget("hamburger-menu:generalLinks", () => { - return { route: "discovery.map", label: "filters.map.title" }; + if (siteSettings.location_sidebar_menu_map_link) { + api.addCommunitySectionLink({ + name: "map", + route: "discovery.map", + title: I18n.t("filters.map.title"), + text: I18n.t("filters.map.label"), + }); + } + + if (siteSettings.location_users_map) { + api.addCommunitySectionLink({ + name: "users map", + route: "users.user-map", + title: I18n.t("directory.map.title"), + text: I18n.t("directory.map.title"), }); } diff --git a/assets/javascripts/discourse/lib/map-utilities.js.es6 b/assets/javascripts/discourse/lib/map-utilities.js.es6 index deb63ef5..6e5124d0 100644 --- a/assets/javascripts/discourse/lib/map-utilities.js.es6 +++ b/assets/javascripts/discourse/lib/map-utilities.js.es6 @@ -138,7 +138,6 @@ const buildMarker = function ( html: ``, }); } - const marker = L.marker( { lat: rawMarker.lat, @@ -222,7 +221,6 @@ const addMarkersToMap = function ( } else { markers = L.featureGroup(); } - rawMarkers.forEach((raw) => { markers.addLayer( buildMarker(raw, map, location_user_avatar, location_hide_labels) diff --git a/assets/javascripts/discourse/templates/components/location-label-container.hbs b/assets/javascripts/discourse/templates/components/location-label-container.hbs index 9e8cae8c..49fce3bd 100644 --- a/assets/javascripts/discourse/templates/components/location-label-container.hbs +++ b/assets/javascripts/discourse/templates/components/location-label-container.hbs @@ -19,6 +19,8 @@ {{#if this.showMap}} - +
+ +
{{/if}} {{/if}} \ No newline at end of file diff --git a/assets/javascripts/discourse/templates/discovery/map.hbs b/assets/javascripts/discourse/templates/discovery/map.hbs index c90f0c4e..0e8997c5 100644 --- a/assets/javascripts/discourse/templates/discovery/map.hbs +++ b/assets/javascripts/discourse/templates/discovery/map.hbs @@ -1 +1,17 @@ -{{map-component topicList=model}} \ No newline at end of file + +
+ +
\ No newline at end of file diff --git a/assets/javascripts/discourse/templates/location-autocomplete.raw.hbs b/assets/javascripts/discourse/templates/location-autocomplete.hbr similarity index 88% rename from assets/javascripts/discourse/templates/location-autocomplete.raw.hbs rename to assets/javascripts/discourse/templates/location-autocomplete.hbr index a3d66481..97cf40cd 100644 --- a/assets/javascripts/discourse/templates/location-autocomplete.raw.hbs +++ b/assets/javascripts/discourse/templates/location-autocomplete.hbr @@ -8,7 +8,7 @@ {{else}}
  • - + {{#if o.showType}} {{#if o.type}}
    diff --git a/assets/javascripts/discourse/templates/users/user-map.hbs b/assets/javascripts/discourse/templates/users/user-map.hbs index 356d2868..2b569b20 100644 --- a/assets/javascripts/discourse/templates/users/user-map.hbs +++ b/assets/javascripts/discourse/templates/users/user-map.hbs @@ -19,5 +19,7 @@
    - {{map-component userList=userList}} +
    + +
    \ No newline at end of file diff --git a/assets/javascripts/discourse/widgets/map-search.js.es6 b/assets/javascripts/discourse/widgets/map-search.js.es6 deleted file mode 100644 index a8af3d82..00000000 --- a/assets/javascripts/discourse/widgets/map-search.js.es6 +++ /dev/null @@ -1,174 +0,0 @@ -import { createWidget } from "discourse/widgets/widget"; -import DiscourseURL from "discourse/lib/url"; -import { h } from "virtual-dom"; -import I18n from "I18n"; - -createWidget("map-search-item", { - tagName: "li", - - html(attrs) { - return attrs.locationName; - }, - - click() { - this.sendWidgetAction("goToLocation", this.attrs.location); - }, -}); - -createWidget("map-search-input", { - tagName: "input", - buildId: () => "map-search-input", - buildKey: () => "map-search-input", - - defaultState() { - return { - current: this.attrs.current, - }; - }, - - buildClasses(attrs) { - if (attrs.listVisible) { - return "list-visible"; - } - }, - - buildAttributes(attrs) { - return { - type: "text", - value: attrs.current ? attrs.current.geo_location.name : "", - placeholder: I18n.t("map.search_placeholder"), - }; - }, - - click() { - this.sendWidgetAction("toggleList", true); - }, - - keyDown(e) { - this.sendWidgetAction("toggleList", true); - if (e.which === 9) { - e.preventDefault(); - return this.sendWidgetAction("autoComplete"); - } - }, - - clickOutside() { - this.sendWidgetAction("toggleList", false); - }, - - keyUp(e) { - if (e.which === 13) { - let location = this.state.current; - - if (this.attrs.topResult) { - location = this.attrs.topResult; - } - - this.sendWidgetAction("toggleList", false); - return this.sendWidgetAction("goToLocation", location); - } - - this.sendWidgetAction("inputChanged", e.target.value); - }, -}); - -export default createWidget("map-search", { - tagName: "div.map-search", - buildKey: () => "map-search", - - defaultState(attrs) { - const input = attrs.current ? attrs.current.geo_location.name : ""; - return { - current: attrs.current, - locations: this.filteredLocations(input), - listVisible: false, - }; - }, - - filteredLocations(input) { - const locations = this.attrs.locations; - if (!locations || locations.length < 1) { - return []; - } - - input = input ? input.toLowerCase() : ""; - - return locations.filter((l) => { - const name = this.locationName(l); - if (name) { - return name.toLowerCase().indexOf(input) > -1; - } else { - return null; - } - }); - }, - - html(attrs, state) { - let contents = [ - this.attach("map-search-input", { - current: attrs.current, - listVisible: state.listVisible, - topResult: state.locations[0] || false, - }), - ]; - - if (state.listVisible) { - contents.push( - h( - "ul.map-search-list", - state.locations.map((location) => { - const locationName = this.locationName(location); - return this.attach("map-search-item", { - location, - locationName, - }); - }) - ) - ); - } - - return contents; - }, - - inputChanged(value) { - this.state.locations = this.filteredLocations(value); - }, - - autoComplete() { - $("#map-search-input").val(this.state.locations[0].geo_location.name); - }, - - toggleList(visible) { - this.state.listVisible = visible; - }, - - locationName(location) { - return ( - location.name || - location.geo_location.name || - location.geo_location.address - ); - }, - - goToLocation(location) { - this.state.current = location; - - const node = document.getElementById("#map-search-input"); - if (node) { - node.value = this.locationName(location); - } - - let url = "/"; - if (location.route_to) { - url = location.route_to; - } - if (location.marker) { - url = location.marker.routeTo; - } - if (location.circle_marker) { - url = location.circle_marker.routeTo; - } - - DiscourseURL.routeTo(url); - }, -}); diff --git a/assets/javascripts/discourse/widgets/map.js.es6 b/assets/javascripts/discourse/widgets/map.js.es6 deleted file mode 100644 index 0b1fd606..00000000 --- a/assets/javascripts/discourse/widgets/map.js.es6 +++ /dev/null @@ -1,426 +0,0 @@ -import { createWidget } from "discourse/widgets/widget"; -import { h } from "virtual-dom"; -import RawHtml from "discourse/widgets/raw-html"; -import { avatarImg } from "discourse/widgets/post"; -import { - addCircleMarkersToMap, - addMarkersToMap, - generateMap, - setupMap, -} from "../lib/map-utilities"; -import { scheduleOnce } from "@ember/runloop"; - -export default createWidget("map", { - tagName: "div.locations-map", - buildKey: () => "map", - - defaultState(attrs) { - return { - mapToggle: "expand", - expanded: false, - showAttribution: false, - runSetup: true, - showSearch: false, - locations: attrs.locations || [], - showExpand: !attrs.disableExpand, - }; - }, - - gatherLocations() { - const topic = this.attrs.topic; - const topicList = this.attrs.topicList; - const user = this.attrs.user; - const userList = this.attrs.userList; - let locations = this.state.locations; - - if ( - this.attrs.locations && - locations.length !== this.attrs.locations.length - ) { - this.attrs.locations.forEach((l) => { - if (l && this.validGeoLocation(l)) { - locations.push(l); - } - }); - } - - if (this.addTopicMarker(topic, locations)) { - locations.push(this.topicMarker(topic)); - } - - if (topicList && topicList.topics) { - topicList.topics.forEach((t) => { - if (this.addTopicMarker(t, locations)) { - locations.push(this.topicMarker(t)); - } - }); - } - - if (this.addUserMarker(user, locations)) { - locations.push(this.userMarker(user)); - } - - if (userList) { - userList.forEach((u) => { - if (this.addUserMarker(u.user, locations)) { - locations.push(this.userMarker(u.user)); - } - }); - } - - this.state.locations = locations; - }, - - addTopicMarker(topic, locations) { - if ( - !topic || - !topic.location || - !topic.location.geo_location || - !this.validGeoLocation(topic.location.geo_location) || - topic.location.hide_marker || - locations.find((l) => l["topic_id"] === topic.id) - ) { - return false; - } - return true; - }, - - addUserMarker(user, locations) { - if ( - !user || - !this.validGeoLocation(user.geo_location) || - locations.find((l) => l["user_id"] === user.id) - ) { - return false; - } - return true; - }, - - validGeoLocation(geoLocation) { - return geoLocation && geoLocation.lat && geoLocation.lon; - }, - - topicMarker(topic) { - let location = topic.location; - - if (!location["marker"] && !location["circle_marker"]) { - location["marker"] = { - title: topic.fancy_title, - routeTo: topic.url, - }; - } - - if ( - this.siteSettings.location_map_marker_category_color && - topic.category && - topic.category.color - ) { - location["marker"]["color"] = topic.category.color; - location["marker"]["class"] = topic.category.slug; - } - - location["topic_id"] = topic.id; - - return location; - }, - - userMarker(user) { - let location = {}; - - location["marker"] = { - title: user.username, - avatar: user.avatar_template, - routeTo: "/u/" + user.username, - }; - - location["user_id"] = user.id; - - location["geo_location"] = user.geo_location; - - return location; - }, - - locationPresent(locations, location) { - return ( - locations.filter((l) => { - if (location.geo_location) { - return false; - } - if (location.geo_location.lat && location.geo_location.lon) { - return ( - l.geo_location.lat === location.geo_location.lat && - l.geo_location.lon === location.geo_location.lon - ); - } else if (location.geo_location.boundingbox) { - return ( - l.geo_location.boundingbox === location.geo_location.boundingbox - ); - } - }).length > 0 - ); - }, - - addMarkers() { - const map = this.state.mapObjs.map; - const locations = this.state.locations; - const settings = this.siteSettings; - - let rawMarkers = []; - let rawCircleMarkers = []; - - if (locations && locations.length > 0) { - locations.forEach((l) => { - if (l && l.geo_location) { - let marker = { - lat: l.geo_location.lat, - lon: l.geo_location.lon, - options: {}, - }; - - if (l.marker) { - marker["options"] = l.marker; - rawMarkers.push(marker); - } - - if (l.circle_marker) { - marker["options"] = l.circle_marker; - rawCircleMarkers.push(marker); - } - } - }); - } - - let markers = null; - - if (rawCircleMarkers && rawCircleMarkers.length > 0) { - addCircleMarkersToMap(rawCircleMarkers, map, this); - } - - if (rawMarkers && rawMarkers.length > 0) { - markers = addMarkersToMap( - rawMarkers, - map, - settings.location_map_maker_cluster_enabled, - settings.location_map_marker_cluster_multiplier, - settings.location_user_avatar, - settings.location_hide_labels - ); - } - - return markers; - }, - - setupMap() { - this.gatherLocations(); - - const mapObjs = this.state.mapObjs; - const map = mapObjs.map; - const markers = this.addMarkers(); - const topic = this.attrs.topic; - const category = this.attrs.category; - const zoom = this.attrs.zoom; - const center = this.attrs.center; - let boundingbox = null; - - if ( - category && - category.custom_fields.location && - category.custom_fields.location.geo_location && - category.custom_fields.location.geo_location.boundingbox - ) { - boundingbox = category.custom_fields.location.geo_location.boundingbox; - } - - if ( - topic && - topic.location && - topic.location.geo_location && - topic.location.geo_location.boundingbox - ) { - boundingbox = topic.location.geo_location.boundingbox; - } - - map.invalidateSize(false); - - setupMap(map, markers, boundingbox, zoom, center, this.siteSettings); - }, - - toggleAttribution() { - const map = this.state.mapObjs.map; - const attribution = this.state.mapObjs.attribution; - - if (!this.state.showAttribution) { - map.addControl(attribution); - } else { - if ($(".locations-map .leaflet-control-attribution").is(":visible")) { - map.removeControl(attribution); - } - } - - this.state.showAttribution = !this.state.showAttribution; - }, - - toggleSearch() { - scheduleOnce("afterRender", this, () => { - // resetinng the val puts the cursor at the end of the text on focus - const $input = $("#map-search-input"); - const val = $input.val(); - $input.focus(); - $input.val(""); - $input.val(val); - }); - this.state.showSearch = !this.state.showSearch; - }, - - toggleExpand() { - const map = this.state.mapObjs.map; - const $map = $(".locations-map"); - - $map.toggleClass("expanded"); - map.invalidateSize(); - - if ($map.hasClass("expanded")) { - this.state.mapToggle = "compress"; - this.state.expanded = true; - map.setZoom(this.siteSettings.location_map_expanded_zoom); - } else { - this.state.mapToggle = "expand"; - this.state.expanded = false; - this.setupMap(); - } - }, - - editCategory() { - const appRoute = this.register.lookup("route:application"); - appRoute.send("editCategory", this.attrs.category); - }, - - initializeMap() { - const center = this.attrs.center; - const clickable = this.attrs.clickable; - const zoom = this.attrs.zoom; - let opts = {}; - if (zoom) { - opts["zoom"] = zoom; - } - if (center) { - opts["center"] = center; - } - if (clickable) { - opts["clickable"] = clickable; - } - return generateMap(this.siteSettings, opts); - }, - - html(attrs, state) { - const category = attrs.category; - const user = this.currentUser; - - if (!state.mapObjs) { - state.mapObjs = this.initializeMap(); - } - - if (state.runSetup || attrs.runSetup) { - state.runSetup = false; - - scheduleOnce("afterRender", this, () => { - this.setupMap(); - }); - - // triggered in sidebar-container component in layouts plugin - this.appEvents.on("sidebars:after-render", () => { - state.runSetup = true; - state.showSearch = false; - this.scheduleRerender(); - }); - } - - let contents = [new RawHtml({ html: state.mapObjs.element })]; - - if (attrs.showAvatar && user) { - let size = state.expanded ? "large" : "medium"; - contents.push( - h( - "a.avatar-wrapper", - { - attributes: { "data-user-card": user.get("username") }, - }, - avatarImg(size, { - template: user.get("avatar_template"), - username: user.get("username"), - }) - ) - ); - } - - if (attrs.search) { - if (state.showSearch) { - let locations = state.locations; - let current = null; - if (attrs.category && attrs.category.location) { - current = attrs.category.location; - } - if (attrs.topic && attrs.topic.location) { - current = attrs.topic.location; - } - contents.push( - this.attach("map-search", { - locations, - current, - }), - this.attach("button", { - className: "btn btn-map hide-search", - action: "toggleSearch", - icon: "times", - }) - ); - } else { - contents.push( - this.attach("link", { - className: "btn btn-map search", - action: "toggleSearch", - icon: "search", - }) - ); - } - } - - if (state.showExpand) { - contents.push( - this.attach("button", { - className: `btn btn-map map-expand`, - action: "toggleExpand", - actionParam: category, - icon: state.mapToggle, - }) - ); - } - - contents.push( - this.attach("button", { - className: "btn btn-map map-attribution", - action: "toggleAttribution", - icon: "info", - }) - ); - - if (category && category.can_edit) { - contents.push( - this.attach("button", { - className: "btn btn-map category-edit", - action: "editCategory", - icon: "wrench", - }) - ); - } - - if (attrs.extraWidgets) { - const extraWidgets = attrs.extraWidgets.map((w) => { - return this.attach(w.widget, w.attrs); - }); - contents.push(...extraWidgets); - } - - return contents; - }, -}); diff --git a/assets/javascripts/discourse/widgets/user-location.js.es6 b/assets/javascripts/discourse/widgets/user-location.js.es6 deleted file mode 100644 index 5f3f31cd..00000000 --- a/assets/javascripts/discourse/widgets/user-location.js.es6 +++ /dev/null @@ -1,80 +0,0 @@ -import { createWidget } from "discourse/widgets/widget"; -import { geoLocationFormat } from "../lib/location-utilities"; -import { iconNode } from "discourse-common/lib/icon-library"; -import { h } from "virtual-dom"; -import I18n from "I18n"; - -export default createWidget("user-location", { - tagName: "div.user-location-widget", - buildKey: () => "user-location", - - defaultState() { - return { - showMap: false, - }; - }, - - html(attrs, state) { - const { user } = attrs; - let contents = []; - - if (user && user.geo_location) { - contents.push(iconNode("map-marker-alt")); - - let format = this.siteSettings.location_user_profile_format.split("|"); - let opts = {}; - let userLocation; - - if (format.length && format[0]) { - opts["geoAttrs"] = format; - userLocation = geoLocationFormat( - user.geo_location, - this.site.country_codes, - opts - ); - } else { - userLocation = user.geo_location.address; - } - - contents.push(h("div.location-label", userLocation)); - - if (this.siteSettings.location_user_profile_map) { - let mapContents = []; - - let btnParams = { - icon: "far-map", - className: "btn-default btn-show-map btn-small", - action: "toggleMap", - }; - - if (!this.site.mobileView && attrs.formFactor !== "card") { - btnParams.contents = I18n.t( - `location.geo.${state.showMap ? "hide" : "show"}_map` - ); - } - - mapContents.push(this.attach("button", btnParams)); - - if (state.showMap) { - mapContents.push( - h( - "div.map-container.small", - this.attach("map", { - user, - disableExpand: attrs.formFactor === "card", - }) - ) - ); - } - - contents.push(h("div.map-wrapper", mapContents)); - } - } - - return contents; - }, - - toggleMap() { - this.state.showMap = !this.state.showMap; - }, -}); diff --git a/assets/stylesheets/common/locations.scss b/assets/stylesheets/common/locations.scss index 756fb492..de3967bd 100644 --- a/assets/stylesheets/common/locations.scss +++ b/assets/stylesheets/common/locations.scss @@ -93,7 +93,7 @@ height: 250px; } -#list-area .map-component { +#main-outlet .map-component { width: 100%; height: calc(100vh - 270px); margin-top: 5px; @@ -145,7 +145,7 @@ .leaflet-control, .map-title, .search { - z-index: 99; + z-index: 100; border: 1px solid var(--primary-low) !important; } @@ -334,12 +334,37 @@ .map-search { position: absolute; width: 130px; - right: 35px; + left: 3px; top: 3px; z-index: 201; border-radius: 4px; - background-color: var(--secondary); - border: 1px solid var(--primary-low); + // background-color: rgba (0, 0, 0, 0.5); + // opacity: 0.5; + //border: 1px solid var(--primary-low); + + input { + background-color: rgba (0, 0, 0, 0.5); + opacity: 0.6; + color: black; + border: 1px solid var(--primary-low); + } + + .search-filter-type { + position: relative; + display: flex; + left: 220px; + top: -34px; + span { + display: inline-block; + position: relative; + margin-left: 5px; + top: 0px; + width: 100px; + label { + font-weight: normal; + } + } + } &.guest { margin-left: 0; diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index ac8ea071..a3779180 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -61,10 +61,16 @@ en: filters: map: title: "Map" + label: "Map" help: "Mark topics with locations in this category on a map." map: search_placeholder: "Search" - + search: + name: "Name" + username: "Username" + city: "City" + address: "Address" + street: "Street" topic_statuses: location: help: "This topic has a location." diff --git a/config/locales/server.af.yml b/config/locales/server.af.yml index 7a8f3884..08bec589 100644 --- a/config/locales/server.af.yml +++ b/config/locales/server.af.yml @@ -1,7 +1,7 @@ af: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ar.yml b/config/locales/server.ar.yml index 6e78b031..49ea9001 100644 --- a/config/locales/server.ar.yml +++ b/config/locales/server.ar.yml @@ -1,7 +1,7 @@ ar: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.az.yml b/config/locales/server.az.yml index 418e2619..112c51fd 100644 --- a/config/locales/server.az.yml +++ b/config/locales/server.az.yml @@ -1,7 +1,7 @@ az: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.be.yml b/config/locales/server.be.yml index a588757e..633ce4ac 100644 --- a/config/locales/server.be.yml +++ b/config/locales/server.be.yml @@ -1,7 +1,7 @@ be: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.bg.yml b/config/locales/server.bg.yml index 4d57ec24..9065d313 100644 --- a/config/locales/server.bg.yml +++ b/config/locales/server.bg.yml @@ -1,7 +1,7 @@ bg: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.bn.yml b/config/locales/server.bn.yml index 378c746d..c8589150 100644 --- a/config/locales/server.bn.yml +++ b/config/locales/server.bn.yml @@ -1,7 +1,7 @@ bn: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.bo.yml b/config/locales/server.bo.yml index 3f93c3bb..ffb41e4c 100644 --- a/config/locales/server.bo.yml +++ b/config/locales/server.bo.yml @@ -1,7 +1,7 @@ bo: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.bs.yml b/config/locales/server.bs.yml index f896750f..60293ba9 100644 --- a/config/locales/server.bs.yml +++ b/config/locales/server.bs.yml @@ -1,7 +1,7 @@ bs: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ca.yml b/config/locales/server.ca.yml index f3bf938f..5e743cbe 100644 --- a/config/locales/server.ca.yml +++ b/config/locales/server.ca.yml @@ -1,7 +1,7 @@ ca: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.cs.yml b/config/locales/server.cs.yml index bd839519..c7e7f411 100644 --- a/config/locales/server.cs.yml +++ b/config/locales/server.cs.yml @@ -1,7 +1,7 @@ cs: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.cy.yml b/config/locales/server.cy.yml index b8fd92d4..acc67a91 100644 --- a/config/locales/server.cy.yml +++ b/config/locales/server.cy.yml @@ -1,7 +1,7 @@ cy: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.da.yml b/config/locales/server.da.yml index 45c12efb..49a11e0e 100644 --- a/config/locales/server.da.yml +++ b/config/locales/server.da.yml @@ -1,7 +1,7 @@ da: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.de.yml b/config/locales/server.de.yml index ee199590..399e17c6 100644 --- a/config/locales/server.de.yml +++ b/config/locales/server.de.yml @@ -1,7 +1,7 @@ de: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.el.yml b/config/locales/server.el.yml index 687ee7f3..650dcb75 100644 --- a/config/locales/server.el.yml +++ b/config/locales/server.el.yml @@ -1,7 +1,7 @@ el: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 3e6e432c..a8d0334f 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1,7 +1,7 @@ en: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_auto_infer_street_from_address_data: "EXPERIMENTAL: Attempt to extract street info from address response" location_input_fields_enabled: "Enable location input fields (topic locations only)" diff --git a/config/locales/server.eo.yml b/config/locales/server.eo.yml index a49b106c..8110fab4 100644 --- a/config/locales/server.eo.yml +++ b/config/locales/server.eo.yml @@ -1,7 +1,7 @@ eo: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index 0d7a9e1a..198df50b 100644 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -1,7 +1,7 @@ es: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Activar menú de mapa en el hamburger menu" + location_sidebar_menu_map_link: "Activar menú de mapa en el hamburger menu" location_input_fields: "Campos de entrada de ubicación" location_input_fields_enabled: "Activar campos de entrada de ubicación" location_geocoding: "¿Geocodificar (mapear) las ubicaciones? Si no se activa, se guardarán como texto plano." diff --git a/config/locales/server.et.yml b/config/locales/server.et.yml index 67344216..e0755c91 100644 --- a/config/locales/server.et.yml +++ b/config/locales/server.et.yml @@ -1,7 +1,7 @@ et: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.eu.yml b/config/locales/server.eu.yml index 084464e3..3b467157 100644 --- a/config/locales/server.eu.yml +++ b/config/locales/server.eu.yml @@ -1,7 +1,7 @@ eu: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.fa.yml b/config/locales/server.fa.yml index 5ed14896..f1859b07 100644 --- a/config/locales/server.fa.yml +++ b/config/locales/server.fa.yml @@ -1,7 +1,7 @@ fa: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.fi.yml b/config/locales/server.fi.yml index 2d79d257..5f898cf7 100644 --- a/config/locales/server.fi.yml +++ b/config/locales/server.fi.yml @@ -1,7 +1,7 @@ fi: site_settings: location_enabled: "Ota käyttöön locations-lisäosa." - location_hamburger_menu_map_link: "Lisää hampurilaisvalikkoon linkki karttaan." + location_sidebar_menu_map_link: "Lisää hampurilaisvalikkoon linkki karttaan." location_input_fields: "Käytössä olevat sijaintitiedon syötekentät" location_input_fields_enabled: "Ota käyttöön sijaintitiedon syötekentät." location_geocoding: "Geokoodataanko sijainnit karttamerkeiksi? Jos poissa käytöstä, sijaintitiedot tallennetaan merkkijonoina." diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index d3c63616..775b0d1d 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -1,7 +1,7 @@ fr: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Ajouter la carte au menu hamburger" + location_sidebar_menu_map_link: "Ajouter la carte au menu hamburger" location_input_fields: "ajout de la barre d'adresse" location_input_fields_enabled: "Ajouter la barre d'adresse" location_geocoding: "L'adresse doit-elle être facultative, obligatoire ou nul. Si nul, elle sera enregistrée comme une chaine de caractères." diff --git a/config/locales/server.gl.yml b/config/locales/server.gl.yml index 114104be..e9d57b1d 100644 --- a/config/locales/server.gl.yml +++ b/config/locales/server.gl.yml @@ -1,7 +1,7 @@ gl: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.he.yml b/config/locales/server.he.yml index 2691792e..99e2fcc7 100644 --- a/config/locales/server.he.yml +++ b/config/locales/server.he.yml @@ -1,7 +1,7 @@ he: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.hi.yml b/config/locales/server.hi.yml index 1e8fe26a..83bc1fc7 100644 --- a/config/locales/server.hi.yml +++ b/config/locales/server.hi.yml @@ -1,7 +1,7 @@ hi: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.hr.yml b/config/locales/server.hr.yml index cfb5fe83..5278647b 100644 --- a/config/locales/server.hr.yml +++ b/config/locales/server.hr.yml @@ -1,7 +1,7 @@ hr: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.hu.yml b/config/locales/server.hu.yml index ef113c59..7a3d5eb5 100644 --- a/config/locales/server.hu.yml +++ b/config/locales/server.hu.yml @@ -1,7 +1,7 @@ hu: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.hy.yml b/config/locales/server.hy.yml index b97aaf03..b0428b87 100644 --- a/config/locales/server.hy.yml +++ b/config/locales/server.hy.yml @@ -1,7 +1,7 @@ hy: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.id.yml b/config/locales/server.id.yml index 2bb77071..0f91e96e 100644 --- a/config/locales/server.id.yml +++ b/config/locales/server.id.yml @@ -1,7 +1,7 @@ id: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.is.yml b/config/locales/server.is.yml index 804addb5..99cb9c7f 100644 --- a/config/locales/server.is.yml +++ b/config/locales/server.is.yml @@ -1,7 +1,7 @@ is: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.it.yml b/config/locales/server.it.yml index 88e8ef12..a6cebdcd 100644 --- a/config/locales/server.it.yml +++ b/config/locales/server.it.yml @@ -1,7 +1,7 @@ it: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ja.yml b/config/locales/server.ja.yml index dceb5c8a..5115eea9 100644 --- a/config/locales/server.ja.yml +++ b/config/locales/server.ja.yml @@ -1,7 +1,7 @@ ja: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ka.yml b/config/locales/server.ka.yml index 1e3fdd38..07137b3a 100644 --- a/config/locales/server.ka.yml +++ b/config/locales/server.ka.yml @@ -1,7 +1,7 @@ ka: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.kk.yml b/config/locales/server.kk.yml index b8edf38f..a425524b 100644 --- a/config/locales/server.kk.yml +++ b/config/locales/server.kk.yml @@ -1,7 +1,7 @@ kk: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.km.yml b/config/locales/server.km.yml index e8c73db5..2745ac3b 100644 --- a/config/locales/server.km.yml +++ b/config/locales/server.km.yml @@ -1,7 +1,7 @@ km: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.kn.yml b/config/locales/server.kn.yml index e086a11f..23795839 100644 --- a/config/locales/server.kn.yml +++ b/config/locales/server.kn.yml @@ -1,7 +1,7 @@ kn: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ko.yml b/config/locales/server.ko.yml index ad7dad09..b793ec6a 100644 --- a/config/locales/server.ko.yml +++ b/config/locales/server.ko.yml @@ -1,7 +1,7 @@ ko: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ku.yml b/config/locales/server.ku.yml index 5e7f1865..0249ffe0 100644 --- a/config/locales/server.ku.yml +++ b/config/locales/server.ku.yml @@ -1,7 +1,7 @@ ku: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.lo.yml b/config/locales/server.lo.yml index 864675db..de0f43ed 100644 --- a/config/locales/server.lo.yml +++ b/config/locales/server.lo.yml @@ -1,7 +1,7 @@ lo: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.lt.yml b/config/locales/server.lt.yml index 8928d7ff..1dda3a76 100644 --- a/config/locales/server.lt.yml +++ b/config/locales/server.lt.yml @@ -1,7 +1,7 @@ lt: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.lv.yml b/config/locales/server.lv.yml index dff9996c..715f5451 100644 --- a/config/locales/server.lv.yml +++ b/config/locales/server.lv.yml @@ -1,7 +1,7 @@ lv: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.mk.yml b/config/locales/server.mk.yml index 4dec9062..b662e687 100644 --- a/config/locales/server.mk.yml +++ b/config/locales/server.mk.yml @@ -1,7 +1,7 @@ mk: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ml.yml b/config/locales/server.ml.yml index c2a68852..8c465ab1 100644 --- a/config/locales/server.ml.yml +++ b/config/locales/server.ml.yml @@ -1,7 +1,7 @@ ml: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.mn.yml b/config/locales/server.mn.yml index e12b879a..baacb972 100644 --- a/config/locales/server.mn.yml +++ b/config/locales/server.mn.yml @@ -1,7 +1,7 @@ mn: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ms.yml b/config/locales/server.ms.yml index e6cfa0e6..7fc6fed9 100644 --- a/config/locales/server.ms.yml +++ b/config/locales/server.ms.yml @@ -1,7 +1,7 @@ ms: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ne.yml b/config/locales/server.ne.yml index c1ca6d9e..27efb338 100644 --- a/config/locales/server.ne.yml +++ b/config/locales/server.ne.yml @@ -1,7 +1,7 @@ ne: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.nl.yml b/config/locales/server.nl.yml index 67537cae..3acd8749 100644 --- a/config/locales/server.nl.yml +++ b/config/locales/server.nl.yml @@ -1,7 +1,7 @@ nl: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.no.yml b/config/locales/server.no.yml index ecee37c6..cc423068 100644 --- a/config/locales/server.no.yml +++ b/config/locales/server.no.yml @@ -1,7 +1,7 @@ "no": site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.om.yml b/config/locales/server.om.yml index 9f5cb201..866b27b9 100644 --- a/config/locales/server.om.yml +++ b/config/locales/server.om.yml @@ -1,7 +1,7 @@ om: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.pa.yml b/config/locales/server.pa.yml index c6b459e6..8d252640 100644 --- a/config/locales/server.pa.yml +++ b/config/locales/server.pa.yml @@ -1,7 +1,7 @@ pa: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.pl.yml b/config/locales/server.pl.yml index 542a46d7..1d44eadb 100644 --- a/config/locales/server.pl.yml +++ b/config/locales/server.pl.yml @@ -1,7 +1,7 @@ pl: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.pt.yml b/config/locales/server.pt.yml index 69559b68..b6534364 100644 --- a/config/locales/server.pt.yml +++ b/config/locales/server.pt.yml @@ -1,7 +1,7 @@ pt: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.pt_BR.yml b/config/locales/server.pt_BR.yml index 40fb086c..ee9f48a6 100644 --- a/config/locales/server.pt_BR.yml +++ b/config/locales/server.pt_BR.yml @@ -1,6 +1,6 @@ pt_BR: site_settings: - location_hamburger_menu_map_link: "" + location_sidebar_menu_map_link: "" location_input_fields: "" location_input_fields_enabled: "Ativar campos de entrada de localização." location_geocoding: "Se off, localizações são armazenadas como strings. Se on, devem ser geocodificados. " diff --git a/config/locales/server.ro.yml b/config/locales/server.ro.yml index c0824e75..1b7135d5 100644 --- a/config/locales/server.ro.yml +++ b/config/locales/server.ro.yml @@ -1,7 +1,7 @@ ro: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ru.yml b/config/locales/server.ru.yml index dc935cdc..418c8d95 100644 --- a/config/locales/server.ru.yml +++ b/config/locales/server.ru.yml @@ -1,7 +1,7 @@ ru: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: " Поля адреса" location_input_fields_enabled: "Активировать поля адреса" location_geocoding: "Должен ли адрес быть геокодирован. Если выключено, адрес сохраняются как цельная строка." diff --git a/config/locales/server.sd.yml b/config/locales/server.sd.yml index 7978d3e1..22e26438 100644 --- a/config/locales/server.sd.yml +++ b/config/locales/server.sd.yml @@ -1,7 +1,7 @@ sd: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.sk.yml b/config/locales/server.sk.yml index 8b8a8fb3..3d94434a 100644 --- a/config/locales/server.sk.yml +++ b/config/locales/server.sk.yml @@ -1,7 +1,7 @@ sk: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.sl.yml b/config/locales/server.sl.yml index 18286e16..199ef855 100644 --- a/config/locales/server.sl.yml +++ b/config/locales/server.sl.yml @@ -1,7 +1,7 @@ sl: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.sq.yml b/config/locales/server.sq.yml index 7baeae88..b4376217 100644 --- a/config/locales/server.sq.yml +++ b/config/locales/server.sq.yml @@ -1,7 +1,7 @@ sq: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.sr.yml b/config/locales/server.sr.yml index 7bc0cecf..90c3584c 100644 --- a/config/locales/server.sr.yml +++ b/config/locales/server.sr.yml @@ -1,7 +1,7 @@ sr: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.sv.yml b/config/locales/server.sv.yml index bd1c4ff5..b71a8176 100644 --- a/config/locales/server.sv.yml +++ b/config/locales/server.sv.yml @@ -1,7 +1,7 @@ sv: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.sw.yml b/config/locales/server.sw.yml index e464bcaa..66576736 100644 --- a/config/locales/server.sw.yml +++ b/config/locales/server.sw.yml @@ -1,7 +1,7 @@ sw: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ta.yml b/config/locales/server.ta.yml index 29709985..10240863 100644 --- a/config/locales/server.ta.yml +++ b/config/locales/server.ta.yml @@ -1,7 +1,7 @@ ta: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.te.yml b/config/locales/server.te.yml index a515d671..e7a013ff 100644 --- a/config/locales/server.te.yml +++ b/config/locales/server.te.yml @@ -1,7 +1,7 @@ te: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.th.yml b/config/locales/server.th.yml index 43085a46..5791e089 100644 --- a/config/locales/server.th.yml +++ b/config/locales/server.th.yml @@ -1,7 +1,7 @@ th: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.tl.yml b/config/locales/server.tl.yml index f6751066..883bba70 100644 --- a/config/locales/server.tl.yml +++ b/config/locales/server.tl.yml @@ -1,7 +1,7 @@ tl: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.tr.yml b/config/locales/server.tr.yml index a3e8464e..884ffb87 100644 --- a/config/locales/server.tr.yml +++ b/config/locales/server.tr.yml @@ -1,7 +1,7 @@ tr: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.tt.yml b/config/locales/server.tt.yml index 7e8c2ee2..d7d06ab5 100644 --- a/config/locales/server.tt.yml +++ b/config/locales/server.tt.yml @@ -1,7 +1,7 @@ tt: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.uk.yml b/config/locales/server.uk.yml index ca312cfd..288cef3b 100644 --- a/config/locales/server.uk.yml +++ b/config/locales/server.uk.yml @@ -1,7 +1,7 @@ uk: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.ur.yml b/config/locales/server.ur.yml index dbabc118..04ad0750 100644 --- a/config/locales/server.ur.yml +++ b/config/locales/server.ur.yml @@ -1,7 +1,7 @@ ur: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.vi.yml b/config/locales/server.vi.yml index 8883bf96..069a71e8 100644 --- a/config/locales/server.vi.yml +++ b/config/locales/server.vi.yml @@ -1,7 +1,7 @@ vi: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.yi.yml b/config/locales/server.yi.yml index 42f4a801..88c1dba4 100644 --- a/config/locales/server.yi.yml +++ b/config/locales/server.yi.yml @@ -1,7 +1,7 @@ yi: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.zh.yml b/config/locales/server.zh.yml index a458c3cf..e5c31236 100644 --- a/config/locales/server.zh.yml +++ b/config/locales/server.zh.yml @@ -1,7 +1,7 @@ zh-CN: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/locales/server.zh_CN.yml b/config/locales/server.zh_CN.yml index 59948586..48b15729 100644 --- a/config/locales/server.zh_CN.yml +++ b/config/locales/server.zh_CN.yml @@ -1,6 +1,6 @@ zh_CN: site_settings: - location_hamburger_menu_map_link: "" + location_sidebar_menu_map_link: "" location_input_fields: "" location_input_fields_enabled: "" location_geocoding: "" diff --git a/config/locales/server.zu.yml b/config/locales/server.zu.yml index 71468a6f..f5539318 100644 --- a/config/locales/server.zu.yml +++ b/config/locales/server.zu.yml @@ -1,7 +1,7 @@ zu: site_settings: location_enabled: "Enable the locations plugin." - location_hamburger_menu_map_link: "Enable map menu item in hamburger menu" + location_sidebar_menu_map_link: "Enable map menu item in hamburger menu" location_input_fields: "Location input fields" location_input_fields_enabled: "Enable location input fields" location_geocoding: "Whether locations should be geocoded (mapped). If off, locations are stored as strings." diff --git a/config/settings.yml b/config/settings.yml index dcbf2f89..b8d0bbc8 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -2,7 +2,7 @@ plugins: location_enabled: client: true default: true - location_hamburger_menu_map_link: + location_sidebar_menu_map_link: client: true default: false location_input_fields_enabled: diff --git a/crowdin.yml b/crowdin.yml index 65ab1874..c94e312a 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,4 +1,4 @@ -pull_request_title: 'i18n: Update translations' +pull_request_title: "i18n: Update translations" files: - source: /config/locales/client.en.yml translation: /config/locales/client.%two_letters_code%.yml diff --git a/plugin.rb b/plugin.rb index c8810e8a..d2262da1 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-locations # about: Tools for handling locations in Discourse -# version: 6.3.15 +# version: 6.4.0 # authors: Angus McLeod, Robert Barrow # contact_emails: development@pavilion.tech # url: https://github.com/angusmcleod/discourse-locations