From 1816a522d2a2f6d0a18e189445fa2841087f79f0 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 | 3 --- 2 files changed, 8 deletions(-) diff --git a/kalite/main/api_views.py b/kalite/main/api_views.py index 1d1aae30b1..d595cf6722 100755 --- a/kalite/main/api_views.py +++ b/kalite/main/api_views.py @@ -41,11 +41,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..402aac4741 100644 --- a/kalite/topic_tools/content_models.py +++ b/kalite/topic_tools/content_models.py @@ -108,9 +108,6 @@ def wrapper(*args, **kwargs): # 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(