Skip to content
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

Open
dk3775 opened this issue Sep 16, 2022 · 19 comments
Open

New system/form for adding new Quotes and Translations #351

dk3775 opened this issue Sep 16, 2022 · 19 comments
Labels
enhancement New feature or request hacktoberfest Participate in Hacktoberfest'22 help wanted Extra attention is needed

Comments

@dk3775
Copy link
Collaborator

dk3775 commented Sep 16, 2022

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.

@dk3775 dk3775 added enhancement New feature or request help wanted Extra attention is needed labels Sep 16, 2022
@marilia-borgo
Copy link

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

@marilia-borgo
Copy link

marilia-borgo commented Sep 30, 2022

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.

@dk3775 dk3775 added the hacktoberfest Participate in Hacktoberfest'22 label Sep 30, 2022
@dk3775
Copy link
Collaborator Author

dk3775 commented Sep 30, 2022

@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?

@marilia-borgo
Copy link

marilia-borgo commented Sep 30, 2022

i don't think it will very complex, it would be simple using a back-end with django for example.

@dk3775
Copy link
Collaborator Author

dk3775 commented Sep 30, 2022

So can you do that or explain rough logic regarding how to do it.

@marilia-borgo
Copy link

ok, i will start making a rought database to show my idea.

@charu210703
Copy link
Contributor

Or we can also implement it with MongoDB and Node.

@dk3775
Copy link
Collaborator Author

dk3775 commented Oct 2, 2022

So can you do that or explain rough logic regarding how to do it.

All new folks start from here..

@charu210703
Copy link
Contributor

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.

@glorious-elijah
Copy link

glorious-elijah commented Oct 2, 2022

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

@dk3775
Copy link
Collaborator Author

dk3775 commented Oct 3, 2022

@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.

@glorious-elijah
Copy link

@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.

@ravipathak3001
Copy link

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

@hugoburguete
Copy link

@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.

@IamPossible007
Copy link

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.

@dk3775
Copy link
Collaborator Author

dk3775 commented Oct 2, 2024

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
@dk3775
Copy link
Collaborator Author

dk3775 commented Oct 2, 2024

Sure you can proceed! There is no need of assignment, just clone the repo and create your branch to implement the feature!

@raj-adi00
Copy link

raj-adi00 commented Oct 14, 2024

@dk3775 Can i implement it using database node and mongoDB. What do you want me to implement json or database??

@dk3775
Copy link
Collaborator Author

dk3775 commented Oct 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest Participate in Hacktoberfest'22 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants