Skip to content

Feature auto translation before i die#67

Merged
XanderRubio merged 9 commits intoBeforeIDieCode:feature-auto-translation-before-i-diefrom
negar-75:feature-auto-translation-before-i-die
Sep 8, 2023
Merged

Feature auto translation before i die#67
XanderRubio merged 9 commits intoBeforeIDieCode:feature-auto-translation-before-i-diefrom
negar-75:feature-auto-translation-before-i-die

Conversation

@negar-75
Copy link
Copy Markdown
Contributor

@negar-75 negar-75 commented Sep 8, 2023

I created pull request for auto translation

@vercel
Copy link
Copy Markdown

vercel Bot commented Sep 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
before-i-die-achievements ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 8, 2023 0:35am

@XanderRubio
Copy link
Copy Markdown
Member

I created pull request for auto translation

@negar-75 fantastic! I'm reviewing now and should be merging very shortly.

@XanderRubio
Copy link
Copy Markdown
Member

Translates to Spanish for me, as I'm currently in Spain🙏🏻

Screenshot 2023-09-08 at 19 03 46

Additionally, French when switching my VPN ✅

Untitled.mov

@negar-75 Were you able to get other languages to translate? I tried a Russian IP and Netherlands, and it didn't translate, but it could be the VPN extension I'm using.

Comment thread package.json
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I see you installed the Axios and i18next packages. I'm familiar with Axios and will have to do a search on i18next to understand briefly. I know it is related to translating 😅 and I see there is a react version of it also.

Copy link
Copy Markdown
Contributor Author

@negar-75 negar-75 Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah in one of my previous projects I used i18next for translation, I think this is a good library for this, I do not know any better one 😂😂

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see there are other libraries like react-intl and react-polyglot. Your addition and utilizing the i18next library for React works great, and we can continually add to the languages we upload and adjust in the future, but for now, this library makes absolute sense how you integrated it.

@negar-75
Copy link
Copy Markdown
Contributor Author

negar-75 commented Sep 8, 2023

Yeah I'm able to do that,
We have to determine which languages we want because I have to translate the “before I die ” phrase into each language we want
At this time I chose Portuguese, Spanish, German and French

@XanderRubio
Copy link
Copy Markdown
Member

Yeah I'm able to do that, We have to determine which languages we want because I have to translate the “before I die ” phrase into each language we want At this time I chose Portuguese, Spanish, German and French

Makes sense! And my apologies I didn't look closer at the code when I wrote my original message to see that you added six languages for translation. This is a great start and we can create issues for future language.json to add to the project as it gets built out. And I love that added feature of translating the before-I-die text as this is what I noticed from the beforeidieproject.com page with the Before I Die wall in different parts of the world the language of the text of course changed.

Comment thread src/i18nextConfig.js
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I see you added English as a fallback language if a translation is missing🙏🏻

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this so similar to spanish😅

Comment thread src/hooks/useIPInfo.js
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@negar-75 Great React hook you have created! This useIPInfo function successfully fetches IP address information.
I see you created three variables:

ipInfo - This will hold the IP address data
loading - This will be true while fetching the data
error - This will hold any errors

Then when the component using this hook first renders, the useEffect hook runs. Inside useEffect it makes a request to the ipapi.co API using axios to get IP data. Wow I didn't know you can type this address to find your IP address😅. Now if the request succeeds, it puts the data in ipInfo and sets loading to false. The hook returns the ipInfo, loading, and error state variables. Nice work in creating this hook component and this is easy-to-understand data fetching logic in a reuseable way. Perhaps later on we can add showing a spinner if loading when slow.

Copy link
Copy Markdown
Member

@XanderRubio XanderRubio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great and will be merging and hopefully can merge the feature into the main without any conflict. Curious, and we will see about needing to reorganize the file structure as the project gets larger. @negar-75 Great work!

@XanderRubio
Copy link
Copy Markdown
Member

XanderRubio commented Sep 8, 2023

This pull request is for the issue #54 and merging✅

@XanderRubio XanderRubio merged commit b146125 into BeforeIDieCode:feature-auto-translation-before-i-die Sep 8, 2023
@negar-75
Copy link
Copy Markdown
Contributor Author

negar-75 commented Sep 8, 2023

Thanks for great comment about my works!!
What do you think about my skills so far?
I mean how good am I in programming?

@XanderRubio
Copy link
Copy Markdown
Member

Your work has now been successfully merged into the main branch✅ 🎉🎉🎉 and can be seen on the live link!!! Congrationaltions!

You are consistently adding value and demonstrating your ability to implement ideas and learning on the fly. From my perspective, you are dedicated to resolving problems and achieving results. I am confident that you have gained valuable insights from past issues that have been closed from your contribution. Your contributions are greatly appreciated, and I encourage you to continue learning and creating each day. From your Before I Die statement of your goal of having your own successful business, providing opportunities for others, and making a positive impact is commendable. Keep striving to create as much as possible and I look forward to your continual contributions to Before I Die Code and your continual growth as a developer and creator. Thank you @negar-75! Everyday working and improving and you will make your statement happen💪🏻

@negar-75
Copy link
Copy Markdown
Contributor Author

negar-75 commented Sep 9, 2023

One thing that keeps me motivated is working with others not just by myself, and the thing I like the most about a contribution is that it is like you are working in a team and can get others’ comment!
Recently I lost my confidence and now I think I am gaining it again

@XanderRubio
Copy link
Copy Markdown
Member

One thing that keeps me motivated is working with others not just by myself, and the thing I like the most about a contribution is that it is like you are working in a team and can get others’ comment!

Recently I lost my confidence and now I think I am gaining it again

Absolutely! I agree when contributing and seeing your contributions merging on is working as a team and that makes open source development great! Team work and the best projects might not have the best UI/UX at first but with teamwork and contributions they come alive! You are a confident developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants