Yeah, I think it would work by just adding "szl": "ślōnski" to languages but I haven't checked. That variable is intended for autoglottonyms.
That being said, I noted that apertium-pol-szl is not on beta.apertium.org. I checked the server and it looks like while apertium-pol-szl exists on the server, it isn't built. Huh. Running apertium-get says WARNING: Couldn't find git url of apertium-szl. Huh? Clearly it's at https://github.com/apertium/apertium-szl. What gives? Checking the apertium-get code ( https://github.com/apertium/apertium-get/blob/master/apertium-get#L36) reveals that it uses the .gitmodules listing from e.g. https://github.com/apertium/apertium-languages. Why isn't apertium-szl there? Simple. The apertium-languages topic is missing from the repo. I added the topic and the monorepo updated immediately (!): https://github.com/apertium/apertium-languages/commit/c096c9f4ea16805c609d68846902f7a72377c9ca. Re-running apertium-get, restarting APy and then html-tools fixes it :) We really should add autoglottonyms for all the language codes that beta.apertium.org has... (related: https://github.com/apertium/apertium-html-tools/issues/210). @Greg, feel free to send a PR adding "szl": "ślōnskŏ gŏdka" to languages. *TL;DR: *don't forget to apply the appropriate repo topics (apertium-incubator, apertium-trunk, etc.)! As far as the POST request goes, I think it can be achieved by just changing the jQuery AJAX calls. However, I'm not convinced that there is an appreciable security difference. Since you're running over HTTPS anyway, the GET URL params/POST body are both encrypted. I suppose server logs usually retain URL params but I'm sure the server can be configured to omit them. POSTs will probably be a bit slower but given the translation times, it's almost certainly negligible. [image: Sushain Cherivirala] *Sushain K. Cherivirala * Stanford University, M.S. in Computer Science '19 Carnegie Mellon University, B.S. in Computer Science '18 (713) 992-4043 | www.skc.name On Sun, Jul 21, 2019 at 7:38 AM Jonathan Washington < jonathan.n.washing...@gmail.com> wrote: > Shouldn't it work without needing a two-letter code? > > -- > Jonathan > > On Sun, Jul 21, 2019, 09:58 Grzegorz Kulik <g.ku...@o2.pl> wrote: > >> Hi Sushain, >> >> thank you for your answer, it pointed me in the right direction. Turns >> out Silesian wasn't defined at all in localization.js or in min.js. In 'var >> languages' I created a fake two-letter code for Silesian and then in 'var >> iso639Codes' I linked it to the three-letter real one. Now everything works >> as expected apart from the POST method. I'm trying to figure it out because >> some people might consider the GET requests a nuisance from the privacy >> point of view. >> >> Best, >> Greg >> >> We sobota, 20 lip 2019 ô godzinie 16:07, Sushain Cherivirala ( >> sush...@skc.name) pisze: >> >> Hi Greg, >> >> There are a couple errors in the JS console that reveal the issue. >> Html-tools doesn't attempt to localize language names until it has obtained >> the localized interface strings. Since you haven't hosted those, that >> request is failing, resulting in the success callback never firing and >> language names never being localized. Here's the relevant code: >> >> >> https://github.com/apertium/apertium-html-tools/blob/master/assets/js/localization.js#L328-L336 >> >> I'm happy to see you've got something working (albeit with a little elbow >> grease). Html-tools isn't really designed as a set of components >> (unfortunately) so it's a bit difficult to integrate into an existing site. >> There's also not much documentation inside the code in terms of comments >> (this one is past-me's fault). >> >> [image: Sushain Cherivirala] >> *Sushain K. Cherivirala * >> Stanford University, M.S. in Computer Science '19 >> Carnegie Mellon University, B.S. in Computer Science '18 >> (713) 992-4043 | www.skc.name >> >> >> On Sat, Jul 20, 2019 at 2:34 PM Francis Tyers <fty...@prompsit.com> >> wrote: >> >> El 2019-07-20 22:31, Francis Tyers escribió: >> > El 2019-07-20 22:18, Grzegorz Kulik escribió: >> >> I figured it out! The "index.eng.html" part, I mean. The translator is >> >> not in testing anymore, so I moved it to >> >> https://silling.org/translator I still don't know how to approach the >> >> other two problems. If anyone could help, I would really appreciate >> >> it. :) >> >> >> >> Greg >> > >> > I believe that to change the name of the language from the code you >> > need to make the change in html-tools. >> > >> > Could you make an issue here: >> > >> > https://github.com/apertium/apertium-html-tools/issues >> > >> > Thanks! >> >> It would also be cool if you could link to Apertium here: >> >> https://silling.org/informacyje-o-maszinowym-translatorze/ >> >> :) >> >> F. >> >> >> _______________________________________________ >> Apertium-stuff mailing list >> Apertium-stuff@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/apertium-stuff >> >> _______________________________________________ >> >> Apertium-stuff mailing list >> >> Apertium-stuff@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/apertium-stuff >> >> >> _______________________________________________ >> Apertium-stuff mailing list >> Apertium-stuff@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/apertium-stuff >> > _______________________________________________ > Apertium-stuff mailing list > Apertium-stuff@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/apertium-stuff >
_______________________________________________ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff