Open jonorthwash opened 6 years ago
I'd like to try and work on this one!
@Jeewal sure! Feel free to send a PR or ask for help.
Oh, I remember why this problem occurs! Autoglottonyms are hardcoded in localization.js
for technical reasons. The output of APy is irrelevant.
o_O
It's because APy doesn't support a "return autoglottonyms for all languages" call, only "return all glottonyms in X language". To replicate the first with the second would require N calls of the second where N is the number of languages. So, we put them into localizations.js
instead (one of the top couple lines).
I see. Is our algorithm for localising the names still "1. check in interface language, 2. check in own language, 3. fall back on code"? And 1 queries APy and 2 checks the local localisations file?
Could we just do all those queries up front at make and build a separate file with that data? I guess we already do a lot of requests at make?
Yes, exactly correct on all counts.
We could do all the queries but that would be 100+ e.g. on beta.apertium.org. Would take forever for the build indeed.
On Jan 14, 2018 11:13 PM, "Jonathan Washington" notifications@github.com wrote:
I see. Is our algorithm for localising the names still "1. check in interface language, 2. check in own language, 3. fall back on code"? And 1 queries APy and 2 checks the local localisations file?
Could we just do all those queries up front at make and build a separate file with that data? I guess we already do a lot of requests at make?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/goavki/apertium-html-tools/issues/210#issuecomment-357584670, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBEfqQnSOF32g-vn3dY1Fe-bAEqfFUMks5tKt5sgaJpZM4Qa_AS .
Would take forever for the build indeed.
So can you think of another way to keep everything in one place and perhaps synchronise it elsewhere?
We could have a function in APy that creates the list then we update it manually in localisation.js. Or, we could add the somewhat specialized endpoint to APy that retrieves autoglottonyms for the specified codes.
On Jan 15, 2018 12:56 PM, "Jonathan Washington" notifications@github.com wrote:
Would take forever for the build indeed.
So can you think of another way to keep everything in one place and perhaps synchronise it elsewhere?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/goavki/apertium-html-tools/issues/210#issuecomment-357763372, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBEfgpTXmwg-n6ppId0HkmzrS66vLb7ks5tK59BgaJpZM4Qa_AS .
I'm okay with either, though I kind of like the idea of just having an endpoint for it.
Expected behaviour:
Current behaviour:
Here's an example:
http://turkic.apertium.org:8080/listLanguageNames?locale=arg
returnsThe dropdown shows the following, with
crh
,gag
, andug
not localised inarg
:While
ug
is shown with its native name,crh
andgag
are not, despite being natively localised, as shown by the output ofhttp://turkic.apertium.org:8080/listLanguageNames?locale=crh
andhttp://turkic.apertium.org:8080/listLanguageNames?locale=gag
, respectively: