goodmap 1.3.0__tar.gz → 1.3.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: goodmap
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Map engine to serve all the people :)
5
5
  Author: Krzysztof Kolodzinski
6
6
  Author-email: krzysztof.kolodzinski@problematy.pl
@@ -371,11 +371,37 @@ def core_pages(
371
371
  """
372
372
  categories_data = database.get_category_data()
373
373
  result = []
374
+
375
+ categories_options_help = categories_data.get("categories_options_help", {})
376
+
374
377
  for key, options in categories_data["categories"].items():
375
- result.append(
376
- {"key": key, "name": gettext(key), "options": make_tuple_translation(options)}
377
- )
378
- return jsonify({"categories": result})
378
+ category_entry = {
379
+ "key": key,
380
+ "name": gettext(key),
381
+ "options": make_tuple_translation(options),
382
+ }
383
+
384
+ if feature_flags.get("CATEGORIES_HELP", False):
385
+ option_help_list = categories_options_help.get(key, [])
386
+ proper_options_help = []
387
+ for option in option_help_list:
388
+ proper_options_help.append(
389
+ {option: gettext(f"categories_options_help_{option}")}
390
+ )
391
+ category_entry["options_help"] = proper_options_help
392
+
393
+ result.append(category_entry)
394
+
395
+ response = {"categories": result}
396
+
397
+ if feature_flags.get("CATEGORIES_HELP", False):
398
+ categories_help = categories_data.get("categories_help", [])
399
+ proper_categories_help = []
400
+ for option in categories_help:
401
+ proper_categories_help.append({option: gettext(f"categories_help_{option}")})
402
+ response["categories_help"] = proper_categories_help
403
+
404
+ return jsonify(response)
379
405
 
380
406
  @core_api_blueprint.route("/languages", methods=["GET"])
381
407
  @spec.validate()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "goodmap"
3
- version = "1.3.0"
3
+ version = "1.3.1"
4
4
  description = "Map engine to serve all the people :)"
5
5
  authors = ["Krzysztof Kolodzinski <krzysztof.kolodzinski@problematy.pl>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes