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

Feature/3374 three letter language code #2188

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0b97566
ignore playground
philipkcl Dec 23, 2022
0fed79a
extract to_isolang
philipkcl Jan 3, 2023
0e347e2
extract to_isolang
philipkcl Jan 3, 2023
b5d53cf
add KTODO and docs
philipkcl Jan 4, 2023
f7ba1a6
add typing
philipkcl Jan 4, 2023
7e4228b
add typing
philipkcl Jan 5, 2023
e41c7c5
update languages for 3 letter
philipkcl Jan 5, 2023
009bc48
change to 3-letter code
philipkcl Jan 5, 2023
2da6ddf
use 3 letter language code
philipkcl Jan 5, 2023
ed54bbc
use alt3
philipkcl Jan 6, 2023
1290f75
clean up ktodo
philipkcl Jan 6, 2023
a52d209
clean up ktodo
philipkcl Jan 6, 2023
f9346cf
add doaj_3char_lang
philipkcl Jan 6, 2023
df57f35
add migration convert_two_to_tree_letter_lang_code.py
philipkcl Jan 31, 2023
134312c
replace with isolang
philipkcl Feb 16, 2023
d7e2f5e
new script for init_es_index
philipkcl Feb 16, 2023
3e1ec18
update convert_two_to_tree_letter_lang_code.py
philipkcl Feb 16, 2023
cbd709e
add warning message
philipkcl Feb 16, 2023
239988c
implement migrate.json
philipkcl Feb 16, 2023
33b6d04
merge develop
philipkcl Feb 16, 2023
9001787
convert to 3-letter country code
philipkcl Feb 17, 2023
76f51d5
update test cases for article.bibjson.journal.language
philipkcl Feb 17, 2023
a16d64c
fix country_code for 3-letter
philipkcl Feb 17, 2023
2276184
update for 3-letter language code
philipkcl Feb 27, 2023
269dfb4
fix testcases fail
philipkcl Feb 27, 2023
f41c5bd
remove article migrate which handle by article_cleanup_sync.py
philipkcl Mar 13, 2023
05e7efb
Merge branch 'develop' into feature/3374_three_letter_language_code
philipkcl Mar 13, 2023
60a642c
Merge branch 'develop' into feature/3374_three_letter_language_code
Steven-Eardley Mar 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
extract to_isolang
philipkcl committed Jan 3, 2023
commit 0e347e26518062c16b1d3d059c3875ea97df2603
6 changes: 3 additions & 3 deletions portality/lib/coerce.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ~~Coerce:Library~~
from portality.lib import dates
from portality.lib import dates, val_convert
from datetime import date, datetime
from portality.lib import seamless
from portality.datasets import get_country_code, get_currency_code
@@ -88,8 +88,8 @@ def to_issn(issn):
"utcdatetime" : date_str(),
"utcdatetimemicros" : date_str(out_format="%Y-%m-%dT%H:%M:%S.%fZ"),
"bigenddate" : date_str(out_format="%Y-%m-%d"),
"isolang": to_isolang(),
"isolang_2letter": to_isolang(output_format="alpha2"),
"isolang": val_convert.create_fn_to_isolang(is_upper=True),
"isolang_2letter": val_convert.create_fn_to_isolang(output_format="alpha2", is_upper=True),
"country_code": to_country_code,
"currency_code": to_currency_code,
"issn" : to_issn