Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding translation of datetime and location names #357

Open
wants to merge 12 commits into
base: master
from

Conversation

@tcarlsen
Copy link

tcarlsen commented Feb 5, 2020

I'm not english, therefore prefer_english_names dont help me, but I wanted to get location and datetime (month name) in danish.

I said this in my other PR aswell: Im no python developer so please let me know if this is the wrong way to do things

@tcarlsen tcarlsen requested a review from jmathai Feb 5, 2020
Copy link
Owner

jmathai left a comment

Thanks for the PR. Left a comment and it looks like one test is failing (elodie.tests.geolocation_test.test_lookup_with_prefer_english_names_false).

We should also add a test similar to the one that is failing for a non-english use case.

@@ -10,6 +10,7 @@
import re
import shutil
import time
import locale

This comment has been minimized.

Copy link
@jmathai

jmathai Feb 7, 2020

Owner

Can these changes go into geolocation.py instead of filesystem.py?

This comment has been minimized.

Copy link
@tcarlsen

tcarlsen Feb 7, 2020

Author

but its in filesystem.py strftime is used?

This comment has been minimized.

Copy link
@tcarlsen

tcarlsen Feb 7, 2020

Author

locale is imported to translate strftime (mostly month names) and that is happening in filesystem.py

@tcarlsen

This comment has been minimized.

Copy link
Author

tcarlsen commented Feb 7, 2020

Im sorry. I dont get this testing in python apparently.. 😢

tcarlsen added 4 commits Feb 7, 2020
doh
@coveralls

This comment has been minimized.

Copy link

coveralls commented Feb 7, 2020

Coverage Status

Coverage increased (+0.07%) to 90.711% when pulling a72e542 on tcarlsen:translation into b07d26c on jmathai:master.

@tcarlsen

This comment has been minimized.

Copy link
Author

tcarlsen commented Feb 7, 2020

okay why is this faling??

test_lookup_with_prefer_language_danish
1983    assert res['address']['city'] == 'K\xf8benhavn', res
1984AssertionError: {u'display_name': u'18G, Vestergade, K\xf8dbyen, Vesterbro, K\xf8benhavn, K\xf8benhavns Kommune, Region Hovedstaden, 1456, Danmark', u'place_id': u'1675725', u'lon': u'12.568567', u'boundingbox': [u'55.677547', u'55.677747', u'12.568467', u'12.568667'], u'osm_type': u'node', u'licence': u'Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright', u'osm_id': u'340565033', u'lat': u'55.677647', u'address': {u'city': u'K\xf8benhavn', u'house_number': u'18G', u'country': u'Danmark', u'county': u'K\xf8benhavns Kommune', u'suburb': u'Vesterbro', u'state': u'Region Hovedstaden', u'road': u'Vestergade', u'country_code': u'dk', u'neighbourhood': u'K\xf8dbyen', u'postcode': u'1456'}}

I test for address city to be "K\xf8benhavn" and the result is "K\xf8benhavn".... why is that a failed test?

@tcarlsen

This comment has been minimized.

Copy link
Author

tcarlsen commented Feb 7, 2020

only python 2.7 is failing now.. not sure how to fix... sorry all the spam commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.