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

Localised codelists #392

Merged
merged 19 commits into from
Jan 31, 2023
Merged

Localised codelists #392

merged 19 commits into from
Jan 31, 2023

Conversation

radix0000
Copy link
Collaborator

Output codelist descriptions (Sectors and Regions) using the relevant language see: #341

@radix0000 radix0000 requested a review from markbrough December 22, 2022 12:00
Copy link
Member

@markbrough markbrough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks! I think it would be good to remove all the comments? But up to you.

return u";".join(
u"%s" % sec.sector.description if sec.sector and sec.sector.description else u""
codelists.localised_description(sec.sector, locale)
#u"%s" % sec.sector.description if sec.sector and sec.sector.description else u""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comment

return u";".join(
rrp.region.description if rrp.region and rrp.region.description else ""
codelists.localised_description(rrp.region, locale)
#rrp.region.description if rrp.region and rrp.region.description else ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comment

@@ -807,11 +851,13 @@ def wrapper(args):
(u'transaction_ref', lambda t: t.ref),
(u'transaction_value_currency', value_currency),
(u'transaction_value_value-date', lambda t: t.value_date),
(u'transaction_provider-org', lambda t: t.provider_org_text),
#(u'transaction_provider-org', lambda t: t.provider_org_text),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comments

Comment on lines 64 to 79
#class TestVocabularyCodelist(TestCase):
# def test_vocabulary_codelist(self):
# self.assertEquals(
# cl.by_major_version['2'].Vocabulary.humanitarian_global_clusters_interagency_standing_committee.value,
# "10"
# )
# self.assertEquals(
# cl.by_major_version['2'].Vocabulary.humanitarian_global_clusters_interagency_standing_committee.description,
# "Humanitarian Global Clusters (Inter-Agency Standing Committee)"
# )
#
# def test_vocabulary_codelist_es(self):
# self.assertEquals(
# cl.by_major_version['2'].Vocabulary.humanitarian_global_clusters_interagency_standing_committee.translations['es'],
# "Humanitarian Global Clusters (Inter-Agency Standing Committee)"
# )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comment? Or what is happening here?

@markbrough
Copy link
Member

Also is #358 now going to be closed?

@radix0000 radix0000 merged commit b68d5fd into main Jan 31, 2023
@radix0000 radix0000 deleted the localised_codelists branch January 31, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants