-
Notifications
You must be signed in to change notification settings - Fork 188
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
Document / fix type ahead index generation #123
Comments
The script is not being used. Translation files are created solely with jekyll and using jquery-UI autocomplete based on chapters. The api written with jekyll is basically looking at all the posts [under the same language]((https://github.com/hotosm/learnosm/blob/gh-pages/en.json#L5) (thus the Further read on search api based on jekyll: |
Thanks @jueyang, makes sense. To localize those json files, is the only way to create a file for each language? Or could multiple files be built based off metadata somewhere? Alternately, could the autocomplete index for all languages live in one file, and the javascript modified to search on language? Or would that eventually become too inefficient? I'm just looking to simplify the process of creating new translations. Or at least, understanding them well! |
What do you mean by "localize"? Since the search is leveraging jekyll, they can only be created when the site is built. You could keep a copy of those files for reference in the repo, I guess, but they would not be used anywhere on the site.
All the files are using the same structure, which creates an array for jquery autocomplete. It is built with the metadata
Yes. I made all the translation files into
See 7de1628 |
@jueyang -
The type-ahead box on the front page is powered by json files generated by a script in
_bin/
- it appears this script is broken and undocumented. Can you fix this?https://github.com/hotosm/learnosm/blob/gh-pages/_bin/import.js#L44
The text was updated successfully, but these errors were encountered: