Git Product home page Git Product logo

sozlik-web's People

Contributors

atabekm avatar bazarbayevmanas avatar ikhasanmusaev avatar ozbek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sozlik-web's Issues

Update DB file

So far the app had only Qaraqalpaq-English dictionary, however the android counterpart has been updated to include Russian-Qaraqalpaq dictionary.

This task is:

  • Download the attached file and unzip it
  • Replace the old database file with new one which has Russian-Qaraqalpaq dictionary
  • One thing to notice, the table name has been changed from qqen to dictionary, do the appropriate changes in SQL queries in sozlik.py

Attachment: sozlik.db.zip

Fix detail title to use raw_word

Database's table structure has been changed, previously it was:
table-old
Now it has been changed to:
table-new

As you might have noticed, two new columns have been added:

  • type
  • raw_word

type is a dictionary type, 1 means qq-en, 2 means ru-qq

This task is to change the word to raw_word in translation.html page. This is because in Russian-Qaraqalpaq dictionary some of the words have dividers for example like ГЛОТ//ОК. So what I've done is, original word has been put to raw_word column, while "normalized" word has been put to word column (to normalize, we remove // and change to lower case, so it will be глоток now).

At the end, you should have something similar:
translation

Add dictionary types (flags)

As we have two dictionaries now, we need to be able to distinguish search results, i.e. to which dictionary the word belongs to. So, this task is to add flags to both main screens search suggestions and translation pages.

As you might remember from #2 we have type column which represents dictionary type, 1 means qq-en, 2 means ru-qq. So, try to put flags to search suggestions something similar to this:
search-suggestion

And for translation page also you should show to which dictionary it belongs to:
translation

Pass dictionary id to translate

Look at the following screenshot:
sozlik-screenshot

If you have noticed, we have the same words found in search results: "сезон". If you look at their url, you will notice that they are the same, like: http://sozlik.com/translate/сезон. And there is no way to find out to which dictionary it belongs to: qaraqalpaq - english or russian - qaraqalpaq. So we need to pass dictionary id to translate url, it can be something like this:

So, the changes required to complete the task:

  1. In index.html add dictionary type to translate url
  2. Change sozlik.pys get_translate method. Need to add dictionary type to @app.route, then fix SQL query to include dictionary type

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.