ar-poncho 2.1.83 → 2.1.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/js/poncho.js CHANGED
@@ -5376,6 +5376,8 @@ if (typeof exports !== "undefined") {
5376
5376
  */
5377
5377
  const PM_TRANSLATE = {
5378
5378
  es: {
5379
+ panel_aria_label: "Panel de información",
5380
+ reset_theme: "Restablecer",
5379
5381
  cluster_click: "Clic para expandir grupo",
5380
5382
  cluster_large: "Grupo grande de {{count}} ubicaciones",
5381
5383
  cluster_medium: "Grupo mediano de {{count}} ubicaciones",
@@ -5402,17 +5404,22 @@ const PM_TRANSLATE = {
5402
5404
  filters_close_panel_text: "Cerrar panel",
5403
5405
  filters_has: "Se están usando filtros.",
5404
5406
  filters_reset: "Restablecer mapa",
5407
+ map_goto_menu: "Ir al menú del mapa",
5408
+ map_aria_label: "Menú para el mapa",
5405
5409
  map_exit: "Salir del mapa",
5406
5410
  map_fit_bounds: "Ajustar marcadores al mapa",
5407
5411
  map_full_view: "Ver mapa completo",
5408
5412
  map_goto_markers: "Ir a los marcadores del mapa",
5409
- map_help_us: "Ayudá a mejorar el mapa",
5413
+ map_help_us: "Sugerencias para el mapa",
5414
+ map_type_default: "Mapa",
5415
+ map_type_satelital: "Mapa satelital",
5410
5416
  openmap_aria_label: "Abrir el punto geográfico en un mapa alternativo",
5411
5417
  openmap_label: "Abrir ubicación en:",
5412
5418
  search_data: "Hacer una búsqueda",
5413
- search_placeholder: "Su búsqueda",
5419
+ search_placeholder: "Tu búsqueda",
5420
+ search_aria_label: "Buscador",
5414
5421
  theme_aria_label_panel: "Herramienta para cambiar de tema visual",
5415
- theme_change: "Cambiar tema del mapa",
5422
+ theme_change: "Sugerir cambios en el mapa",
5416
5423
  theme_description_contrast: "Fondo oscuro con bordes blancos.",
5417
5424
  theme_description_dark: "Fondo oscuro con bordes blancos de contraste medio.",
5418
5425
  theme_description_default: "Colores predeterminados del proveedor del mapa.",
@@ -5428,8 +5435,78 @@ const PM_TRANSLATE = {
5428
5435
  zoom_aria_label_panel: "Herramientas de zoom",
5429
5436
  zoom_goto_panel: "Ir a la herramienta de zoom",
5430
5437
  zoom_in: "Acercar",
5431
- zoom_out: "Alejar"
5432
- }
5438
+ zoom_out: "Alejar",
5439
+ close_panel: "Cerrar panel",
5440
+ close_aria_panel: "Cerrar panel de información",
5441
+ open_in_new_window: "(Abre en una nueva ventana)",
5442
+ contributors: "Colaboradores"
5443
+ },
5444
+ en: {
5445
+ panel_aria_label: "Information panel",
5446
+ reset_theme: "Reset",
5447
+ cluster_click: "Click to expand group",
5448
+ cluster_large: "Large group of {{count}} locations",
5449
+ cluster_medium: "Medium group of {{count}} locations",
5450
+ cluster_small: "Small group of {{count}} locations",
5451
+ filter_initial: "There are {{total_results}} points on the map."
5452
+ + ` <a href="#" class="{{reset_search}}"`
5453
+ + `aria-label="Reset map values">`
5454
+ + "Reset map</a>",
5455
+ filter_no_results: "No entries found.",
5456
+ filter_select_label: "Select {{header}}",
5457
+ filter_select_legend: "Filter by {{header}}",
5458
+ filter_select_all_option_text: "All",
5459
+ filter_no_results_by_term: "No results found for your search.",
5460
+ filter_one_result: "{{total_results}} result matches your search.",
5461
+ filter_reset_values_link: ` <a href="#" class="{{reset_search}}"`
5462
+ + `aria-label="Reset map values">`
5463
+ + "Reset map</a>",
5464
+ filter_results: "{{total_results}} results match your search.",
5465
+ filters_aria_label_close_panel: "Close filters panel",
5466
+ filters_aria_label_open_close_panel: "Open or close the filters panel",
5467
+ filters_aria_label_panel: "Filters panel",
5468
+ filters_aria_label_reset: "Reset map values",
5469
+ filters_check_all: "Check all",
5470
+ filters_close_panel_text: "Close panel",
5471
+ filters_has: "Filters are in use.",
5472
+ filters_reset: "Reset map",
5473
+ map_goto_menu: "Jump to map menu",
5474
+ map_aria_label: "Map menu",
5475
+ map_exit: "Exit map",
5476
+ map_fit_bounds: "Fit markers to map",
5477
+ map_full_view: "Full map view",
5478
+ map_goto_markers: "Go to map markers",
5479
+ map_help_us: "Map suggestions",
5480
+ map_type_default: "Map",
5481
+ map_type_satelital: "Satellite map",
5482
+ openmap_aria_label: "Open geographic point in an alternative map",
5483
+ openmap_label: "Open location in:",
5484
+ search_data: "Perform a search",
5485
+ search_placeholder: "Your search",
5486
+ search_aria_label: "Search",
5487
+ theme_aria_label_panel: "Tool to change visual theme",
5488
+ theme_change: "Suggest map changes",
5489
+ theme_description_contrast: "Dark background with white borders.",
5490
+ theme_description_dark: "Dark background with medium contrast white borders.",
5491
+ theme_description_default: "Default map provider colors.",
5492
+ theme_description_grayscale: "Map and interface in grayscale.",
5493
+ theme_description_relax: "Soft color palette.",
5494
+ theme_name_contrast: "High contrast",
5495
+ theme_name_dark: "Dark",
5496
+ theme_name_default: "Original",
5497
+ theme_name_grayscale: "Grayscale",
5498
+ theme_name_relax: "Relax",
5499
+ theme_open_panel: "Open the themes panel",
5500
+ theme_reset: "Resets the map theme to its original configuration",
5501
+ zoom_aria_label_panel: "Zoom tools",
5502
+ zoom_goto_panel: "Go to zoom tool",
5503
+ zoom_in: "Zoom in",
5504
+ zoom_out: "Zoom out",
5505
+ close_panel: "Close panel",
5506
+ close_aria_panel: "Close information panel",
5507
+ open_in_new_window: "(Opens in a new window)",
5508
+ contributors: "Contributors"
5509
+ },
5433
5510
  };
5434
5511
 
5435
5512
  class PonchoMap {
@@ -5812,9 +5889,9 @@ class PonchoMap {
5812
5889
  // Attribution links
5813
5890
  const {leaflet, ersi, ign, osm} = attributions;
5814
5891
  this.prefix = this.addAnchorElement(leaflet, "html");
5815
- this.ersiAttribution = `Contribuidores: `
5892
+ this.ersiAttribution = `${this._t("contributors")}: `
5816
5893
  + `${this.addAnchorElement(ersi, "html")}`;
5817
- this.osmAttribution = `Contribuidores: `
5894
+ this.osmAttribution = `${this._t("contributors")}: `
5818
5895
  + `${this.addAnchorElement(ign, "html")}, `
5819
5896
  + `${this.addAnchorElement(osm, "html")}`;
5820
5897
 
@@ -5822,13 +5899,13 @@ class PonchoMap {
5822
5899
  this.layerViewSettings = {
5823
5900
  satelital:{
5824
5901
  attribution: this.ersiAttribution,
5825
- label: "Mapa satelital",
5902
+ label: this._t("map_type_satelital"),
5826
5903
  tilesUrl: this.ersiURL,
5827
5904
  setVisuals: this._setSatelitalView,
5828
5905
  },
5829
5906
  osm:{
5830
5907
  attribution: this.osmAttribution,
5831
- label: "Mapa",
5908
+ label: this._t("map_type_default"),
5832
5909
  setVisuals: this._setOsmView,
5833
5910
  tilesUrl: this.osmURL,
5834
5911
  }
@@ -5906,7 +5983,7 @@ class PonchoMap {
5906
5983
  * Versión poncho
5907
5984
  */
5908
5985
  get version(){
5909
- return "2.2.3";
5986
+ return "2.2.4";
5910
5987
  }
5911
5988
 
5912
5989
 
@@ -6489,7 +6566,7 @@ class PonchoMap {
6489
6566
  const LANG_REGEX = /^[a-z]{2}(-[A-Z]{2})?$/i;
6490
6567
  const VALID_TARGETS = ['_self', '_blank', '_parent', '_top'];
6491
6568
  const SECURITY_REL_VALUES = ['noopener', 'noreferrer'];
6492
- const NEW_TAB_TEXT = '(Abre en una nueva pestaña)';
6569
+ const NEW_TAB_TEXT = this._t("open_in_new_window");
6493
6570
 
6494
6571
  // Validation helpers
6495
6572
  const isValidLang = (value) =>
@@ -6771,7 +6848,7 @@ class PonchoMap {
6771
6848
 
6772
6849
  // Botón para restablecer el mapa
6773
6850
  const restartLinkOptions = {
6774
- label: "Restablecer",
6851
+ label: this._t("reset_theme"),
6775
6852
  attributes: {role: "menuitem", tabIndex: 0},
6776
6853
  aria_label: this._t("theme_reset"),
6777
6854
  css: ["pm-item-link", "js-reset-theme"]
@@ -7944,7 +8021,7 @@ class PonchoMap {
7944
8021
  container.style.display = "none";
7945
8022
  container.role = "region";
7946
8023
  container.ariaLive = "polite";
7947
- container.ariaLabel = "Panel de información";
8024
+ container.ariaLabel = this._t("panel_aria_label");
7948
8025
 
7949
8026
  // Icono para el botón
7950
8027
  const icon = document.createElement("i");
@@ -7961,9 +8038,9 @@ class PonchoMap {
7961
8038
  `js-close-slider${this.scope_sufix}`
7962
8039
  );
7963
8040
  closeButton.setAttribute("autofocus", "autofocus");
7964
- closeButton.title = "Cerrar panel";
8041
+ closeButton.title = this._t("close_panel");
7965
8042
  closeButton.tabIndex = 0;
7966
- closeButton.ariaLabel = "Cerrar panel de información";
8043
+ closeButton.ariaLabel = this._t("close_aria_panel");
7967
8044
 
7968
8045
  // Enlace anchor.
7969
8046
  const anchorOptions = {
@@ -9329,7 +9406,7 @@ class PonchoMap {
9329
9406
  const nav = document.createElement("div");
9330
9407
  nav.classList.add("pm-accesible-nav", "top", "pm-list");
9331
9408
  nav.id = `pm-accesible-nav${this.scope_sufix}`;
9332
- nav.ariaLabel = "Menú para el mapa";
9409
+ nav.ariaLabel = this._t("map_aria_label");
9333
9410
  nav.role = "navigation";
9334
9411
  nav.tabIndex=0;
9335
9412
 
@@ -9363,7 +9440,7 @@ class PonchoMap {
9363
9440
 
9364
9441
  // enlace de retorno
9365
9442
  const anchorOptions = {
9366
- label: "Ir al menú del mapa",
9443
+ label: this._t("map_goto_menu"),
9367
9444
  link: `#pm-accesible-nav${this.scope_sufix}`,
9368
9445
  id: `accesible-return-nav${this.scope_sufix}`,
9369
9446
  css: ["pm-item-link", "pm-accesible"],
@@ -10528,7 +10605,7 @@ class PonchoMapFilter extends PonchoMap {
10528
10605
  "pm-btn-close",
10529
10606
  `js-close-filter${this.scope_sufix}`
10530
10607
  );
10531
- closeButton.title = "Cerrar panel";
10608
+ closeButton.title = this._t("close_aria_panel");
10532
10609
  closeButton.role = "button";
10533
10610
  closeButton.ariaLabel = this._t("filters_aria_label_close_panel");
10534
10611
 
@@ -11829,7 +11906,7 @@ class PonchoMapSearch {
11829
11906
  _searchRegion = () => {
11830
11907
  const element = document.querySelector(this.search_scope_selector);
11831
11908
  element.setAttribute("role", "region");
11832
- element.setAttribute("aria-label", "Buscador");
11909
+ element.setAttribute("aria-label", this.instance._t("search_aria_label"));
11833
11910
  };
11834
11911
 
11835
11912