Skip to content

Commit

Permalink
Remove that custom pt-BR -> pt mapping.
Browse files Browse the repository at this point in the history
pt-BR works fine without it. In fact, having this mapping now prevents
the content db from being annotated properly.
  • Loading branch information
aronasorman committed Mar 1, 2016
1 parent 82fe6fc commit 41bfb04
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions kalite/main/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 0 additions & 5 deletions kalite/topic_tools/content_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 41bfb04

Please sign in to comment.