Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -81,29 +81,32 @@ if lang is not None:
|
|
81 |
st.write(f"Broader tags for this language, if any:")
|
82 |
st.write(broader_tags)
|
83 |
st.write(f"Try also: https://r12a.github.io/app-subtags/?lookup={lang}, which will likely have links to Ethnologue, Wikipedia, and Character usage. You can also try searching for '{langtext}' there!")
|
84 |
-
st.write(f"https://glottolog.org/glottolog?search={t_variant} may be also of interest, with links to various resources including WALS, Wikidata, Odin, and OLAC.
|
|
|
|
|
85 |
st.write(f"https://glottolog.org/glottolog?search={urllib.parse.quote(langtext)} may pull up something as well.")
|
86 |
|
87 |
-
# ethnologue prefers T for german (deu), and T for French
|
88 |
st.write("## Older Codes")
|
89 |
|
90 |
st.write(f"ISO 639-3 'alpha3' code, 'terminology' variant (deprecated): {t_variant}")
|
91 |
st.write(f"ISO 639-3 'alpha3' code, 'bibliographic' variant (deprecated): {b_variant}")
|
92 |
-
st.write(f"If it exists, the ISO 639 Code Tables entry for the T variant would be at https://iso639-3.sil.org/code/{t_variant}")
|
93 |
-
st.write(f"If it exists, the ISO 639 Code Tables entry for the B variant would be at https://iso639-3.sil.org/code/{b_variant}")
|
94 |
-
obsolete_codes = pull_obsolete_codes(t_variant)
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
#TODO: Cleanup this bit
|
97 |
-
|
|
|
|
|
98 |
st.write(f"Obsolete codes from previous ISO-639 iterations, pulled from https://iso639-3.sil.org/code/{t_variant}:")
|
99 |
-
st.write(
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
st.write(obsolete_codes)
|
106 |
-
|
107 |
|
108 |
|
109 |
|
|
|
81 |
st.write(f"Broader tags for this language, if any:")
|
82 |
st.write(broader_tags)
|
83 |
st.write(f"Try also: https://r12a.github.io/app-subtags/?lookup={lang}, which will likely have links to Ethnologue, Wikipedia, and Character usage. You can also try searching for '{langtext}' there!")
|
84 |
+
st.write(f"https://glottolog.org/glottolog?search={t_variant} may be also of interest, with links to various resources including WALS, Wikidata, Odin, and OLAC. ")
|
85 |
+
if t_variant != b_variant:
|
86 |
+
st.write(f"If that doesn't work, try https://glottolog.org/glottolog?search={b_variant}, or put in a [custom search query](https://glottolog.org/glottolog)")
|
87 |
st.write(f"https://glottolog.org/glottolog?search={urllib.parse.quote(langtext)} may pull up something as well.")
|
88 |
|
|
|
89 |
st.write("## Older Codes")
|
90 |
|
91 |
st.write(f"ISO 639-3 'alpha3' code, 'terminology' variant (deprecated): {t_variant}")
|
92 |
st.write(f"ISO 639-3 'alpha3' code, 'bibliographic' variant (deprecated): {b_variant}")
|
|
|
|
|
|
|
93 |
|
94 |
+
# ethnologue prefers T for german (deu), and T for French
|
95 |
+
st.write(f"If it exists, the ISO 639 Code Tables entry for the T variant would be at https://iso639-3.sil.org/code/{t_variant}. That is also the code variant that typically has a working link to Ethnologue.")
|
96 |
+
if t_variant != b_variant:
|
97 |
+
st.write(f"If it exists, the ISO 639 Code Tables entry for the B variant would be at https://iso639-3.sil.org/code/{b_variant}")
|
98 |
+
|
99 |
+
st.write("### Codes scraped from iso639-3.sil.org")
|
100 |
#TODO: Cleanup this bit
|
101 |
+
t_obsolete_codes = pull_obsolete_codes(t_variant)
|
102 |
+
b_obsolete_codes = pull_obsolete_codes(b_variant)
|
103 |
+
if t_obsolete_codes:
|
104 |
st.write(f"Obsolete codes from previous ISO-639 iterations, pulled from https://iso639-3.sil.org/code/{t_variant}:")
|
105 |
+
st.write(t_obsolete_codes)
|
106 |
+
if b_obsolete_codes:
|
107 |
+
st.write(f"Obsolete codes from previous ISO-639 iterations, pulled from https://iso639-3.sil.org/code/{b_variant}:")
|
108 |
+
st.write(b_obsolete_codes )
|
109 |
+
|
|
|
|
|
|
|
110 |
|
111 |
|
112 |
|