Skip to content

Commit

Permalink
update error printing
Browse files Browse the repository at this point in the history
  • Loading branch information
steph-feng committed Nov 11, 2024
1 parent 7874a7d commit 30c83e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Binary file modified core/db.sqlite3
Binary file not shown.
2 changes: 1 addition & 1 deletion core/i18nilize/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def get(self, request):
translations = tp.get_translations_by_language(language, token)
if not translations:
return Response(
{"error": f"No translations found for {language}."},
{'error': f'No translations found for {language}.'},
status=status.HTTP_404_NOT_FOUND
)

Expand Down
2 changes: 1 addition & 1 deletion i18nilize/src/internationalize/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def generate_file(language, token):
response = requests.get(url, params=params, headers=headers)

if response.status_code != 200:
print(f'Error: {response.status_code}')
print(f'Error: {response.status_code}.', response.json()['error'])
return

file_content = response.json()
Expand Down
4 changes: 4 additions & 0 deletions i18nilize/src/internationalize/languages/french.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"thanks": "merci",
"hello": "bonjour"
}

0 comments on commit 30c83e9

Please sign in to comment.