-
Notifications
You must be signed in to change notification settings - Fork 323
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
New system/form for adding new Quotes and Translations #351
Comments
To solve the problem of big file size, implement a database would probaly be the best option, it will help to maintain the quotes/words more organized. To solve the problem of the conflicts, could be created another site where the people could post their new translations/quotes directly on the database. Removing the need to change the main project that is causing the conflicts |
Thinking of that, to add new translations/quotes it wouldnt be necessary to create another site, just add a page inside de geeksay where people could add new translations. This way, even people who dont code can contribute. |
@marilia-borgo Agreed but If we implement a database then the process of fetching and translating the strings at runtime would be very complex or difficult. Do you have anything in mind to achieve that? |
i don't think it will very complex, it would be simple using a back-end with django for example. |
So can you do that or explain rough logic regarding how to do it. |
ok, i will start making a rought database to show my idea. |
Or we can also implement it with MongoDB and Node. |
All new folks start from here.. |
Basically it's like writing a backend for this site. We can create a NodeJs file which will have different routes, among them will be the one in which we can enter a new quote/translation which should be inserted in the database. We just need to do some changes in the main/home page in such a way that the required data is retrieved from the database. |
This will probably not be the best overall solution since it will increase the initial load time, or if possible use a webworker to execute that side of the code. Anyways this is what I am proposing to mimic a constant time operation instead of making requests to the database server each time a user needs to translate a quote, why not during the initial load, fetch all the quotes and store them in a session storage or local storage so that all requests will be made to that storage instead of the server and will only make requests at specific interval to the server to refresh the local storage or session storage |
@glorious-elijah your idea is exactly the thing I was thinking about but the issue is it will take high initial load times while fetching the translation array. |
@dk3775, high initial load times during the fetch process will be a little tricky to deal with, but what if we made that request through a web worker? I did a little research and it seems that it is possible to fetch data with a web worker, this is the link. After the web worker is done fetching the data in the background we then make it available to the main thread, this will only reduce the initial load time but I think the request should be fast enough in the background for the user not to realise there is such a thing going on behind the scenes. |
what if we keep complete dictionary on some json file or csv may be, that way it would be more user friendly too, anyone will be able to contribute later and can make changes according to user's need. and it won't require any extra cost to keep on running this project. when someones installs the package can directly use what he has or can make changes too |
@dk3775 Are you still looking for a solution to this issue? In my view, @ravipathak3001 suggestion seems like the most straightforward way to fix this. You only need to implement a database if you're trying to build a system where you will be adding, updating and deleting constantly and from what I gathered (and correct me if I'm wrong), this application doesn't have that many quotes to require a database. I'd suggest creating a JSON file key value pairs for different translations. I could work on it. PS: I'm not from hacktoberfest, just looking to contribute to open source projects. |
hi @dk3775, I think that thi problem is not that complex , we can use inbuilt data structure to make the process faster , I would like to contribute to this issue , please assign me this task, I am new to open source contribution and I genuinely think this can be. very good starting point for me. |
Sure you can proceed! There is no need of assignment, just clone the repo and create your branch to implement the feature! |
1 similar comment
Sure you can proceed! There is no need of assignment, just clone the repo and create your branch to implement the feature! |
@dk3775 Can i implement it using database node and mongoDB. What do you want me to implement json or database?? |
Nope as of now we are thinking to use local filestore, for using a db we'll have to implement a translation management feature as well. |
We need to design a new system that can be used to add new translations and quotes more effectively, the current system which we are using can create issues like big file size (geeksay.js), conflicting branches while managing multiple PRs, editing the main file manually every time when we need to add a quote or translations and much more.
Propose your ideas to fix this problems.
The text was updated successfully, but these errors were encountered: