From 41bfb040e33286e9d0a707b685812f5f8d1284aa Mon Sep 17 00:00:00 2001 From: Aron Fyodor Asor Date: Mon, 29 Feb 2016 17:06:47 -0800 Subject: [PATCH] Remove that custom pt-BR -> pt mapping. pt-BR works fine without it. In fact, having this mapping now prevents the content db from being annotated properly. --- kalite/main/api_views.py | 5 ----- kalite/topic_tools/content_models.py | 5 ----- 2 files changed, 10 deletions(-) diff --git a/kalite/main/api_views.py b/kalite/main/api_views.py index 3454e9ce3c..4c81143b67 100755 --- a/kalite/main/api_views.py +++ b/kalite/main/api_views.py @@ -44,11 +44,6 @@ def search_api(request, channel): def content_item(request, channel, content_id): language = request.language - # Hardcode the Brazilian Portuguese mapping that only the central server knows about - # TODO(jamalex): BURN IT ALL DOWN! - if language == "pt-BR": - language = "pt" - content = get_content_item(channel=channel, content_id=content_id, language=language) if not content: diff --git a/kalite/topic_tools/content_models.py b/kalite/topic_tools/content_models.py index d760f918a2..40c52ece93 100644 --- a/kalite/topic_tools/content_models.py +++ b/kalite/topic_tools/content_models.py @@ -104,13 +104,8 @@ def set_database(function): """ def wrapper(*args, **kwargs): - # Hardcode the Brazilian Portuguese mapping that only the central server knows about - # TODO(jamalex): BURN IT ALL DOWN! language = kwargs.get("language", "en") - if language == "pt-BR": - language = "pt" - path = kwargs.pop("database_path", None) if not path: path = CONTENT_DATABASE_PATH.format(