BeforeIDieCode / BeforeIDieAchievements

🌟An open source project that helps developers make their first pull request and contribute to open source projects. πŸš€πŸŽ― Developers can contribute by sharing what they want to do before they die. πŸ’‘πŸ”—
https://before-i-die-achievements.vercel.app
MIT License
117 stars 184 forks source link

Expand Language Support for "Before I Die" Based on User's IP Address #76

Closed XanderRubio closed 1 year ago

XanderRubio commented 1 year ago

Description: This issue aims to enhance the "Before I Die Code" project by adding more translations for the text "Before I Die" based on the user's IP address. We currently have six languages in the locales folder, and we're using react-i18next for translations. Every time a pull request is closed, this list will be updated with the languages that have been added by contributors:

The following list represents the languages that are still missing and need a translation.json file added to our open-source code:

  1. Translate the text "Before I Die" into additional languages. This text is displayed when clicking on a contributor bid image ⬇️

    Screenshot 2023-09-13 at 00 44 22
  2. Create a JSON file for each new translation, following the format:

    {
    "BEFORE-I-DIE": "Translation in the target language"
    }
  3. Add the new language JSON files to the locales folder. Be sure to title this file translation.json

  4. Update the i18n configuration to include the new languages. In the i18n configuration code, add the new language resources by importing the JSON files and including them in the resources object. For example:

    
    import i18n from "i18next";
    import { initReactI18next } from "react-i18next";

i18n .use(initReactI18next) // passes i18n down to react-i18next .init({ resources: { en: { translation: require("./locales/en/translation.json"), }, // Add new languages here newLanguageCode: { translation: require("./locales/newLanguageCode/translation.json"), }, }, lng: "en", // Set the default language fallbackLng: "en", // Fallback language if a translation is missing interpolation: { escapeValue: false, // React already escapes by default }, returnNull: false, });

Harshal662 commented 1 year ago

i can do that

XanderRubio commented 1 year ago

Hi @Harshal662! Before going ahead with assigning you to this issue I would recommend you have a look over the README and then head over to the CONTRIBUTION-GUIDELINES and then open up your first pull request to share what you want to do before you die. This way, you better understand this project before contributing deeper. Look at the live link for examples. Afterward, would you then like to add all the missing langue translations of the text Before I Die or would you be committed to doing a specific number? This way, I can also ensure others can contribute too if you happen to not commit to all of them. Thanks, Harshal, and have a great rest of your day and looking forward to seeing your contributions!

Xander

Harshal662 commented 1 year ago

I will try to add all the langue translations of the text Before I Die, which I can find online.

XanderRubio commented 1 year ago

I will try to add all the langue translations of the text Before I Die, which I can find online.

Great job on your commitment to adding the language translations for our open-source project! I appreciate your enthusiasm and the saluting face emoji you've included. I am assigning you to this issue now. Please feel free to let us know if you encounter any problems during the process.

To streamline the workflow, you can create and open pull requests for however many translations you complete during your work sessions, instead of waiting to submit all the translations at once. This way, we can merge the translations as they are ready, making the process more efficient. And we will update this issue to make sure we are staying accurate with what has been completed by youπŸ‘πŸ»

Thank you for your contributions, and have a fantastic day, @Harshal662!

Harshal662 commented 1 year ago

So sorry I am busy with some work cant complete it. Again Sorry for not able to do it. Please reassign it to someone else.

XanderRubio commented 1 year ago

So sorry I am busy with some work cant complete it. Again Sorry for not able to do it. Please reassign it to someone else.

All good @Harshal662 and thank you for taking the time to let us knowπŸ‘πŸ». Wishing you smooth work sessions and have a nice day! You are always welcome to contribute when you find you have time.

Mominarez commented 1 year ago

Hello, I can translate in Azerbaijani and Turkish. I need clarification if you don't mind, we just translate the words "Before I Die", not anything else? If so, I can most likely translate in other middle eastern languages.

XanderRubio commented 1 year ago

Hello, I can translate in Azerbaijani and Turkish. I need clarification if you don't mind, we just translate the words "Before I Die", not anything else? If so, I can most likely translate in other middle eastern languages.

HI @Mominarez. Thank you for your enthusiasm in wanting to assist! Here are the steps needed for completing a translation file:

  1. Inside the locales director add a folder for your given language you are translating. Be sure to title is after the aconym you see that is on the list provided that hasn't been completed yet. For exmplae az
  2. Then add inside the newly created folder a file named translation.json
  3. Then add your translated text for Before I Die in the given language to the translation.json Example:
    {
    "BEFORE-I-DIE": "Translation in the target language"
    }
  4. Lastly, update the i18nextConfig.js file by adding the trnalated language to the resource key so that it can be imported from the separate json language files. Example: Screenshot 2023-09-18 at 20 43 47

Please let me know if you need further information or have questions. Additionally I would encourage you to contribute by reading the README to better understand the project and then continue following the CONTRIBUTION-GUIDELINES.md. This will help with understanding the git workflow.

MeetThakur commented 1 year ago

I would like to help translating. I can translate most of Asian and European languages. I have also read the readme and got a little idea about the project. I needed I can translate all the languages.

XanderRubio commented 1 year ago

I would like to help translating. I can translate most of Asian and European languages. I have also read the readme and got a little idea about the project. I needed I can translate all the languages.

HI @VoidyCodes,

Thank you for your energetic message, and yes, by all means, go for it! I would recommend, since you have read the README going ahead with also sharing what you want to do before you die additionally from the CONTRIBUTION-GUIDELINES.md. I'll assign you to this task, and for now, please focus on translating all languages except the Middle Eastern ones, as those will be handled by @Mominarez.

I've updated the list of languages to reflect her responsibilities, and you can assist with the remaining ones. If you have any questions or need clarification, feel free to reach out. Have a fantastic day!

Yor-dan commented 1 year ago

Hi, I would love to contribute. Let me know if there is anything I can help with πŸ˜„

XanderRubio commented 1 year ago

Hi, I would love to contribute. Let me know if there is anything I can help with πŸ˜„

Absolutely! @Yor-dan We, as of now, this issue has been assigned to two other contributors. I would recommend you go ahead with working on issue #29 and additionally going ahead with #5 as this is the best way to learn about the project and its purpose now with sharing what you want to do before you die. Have a nice day, and thank you for your enthusiasm. I am looking forward to seeing your contribution and statement.

MeetThakur commented 1 year ago

Hey @XanderRubio It's been a week, and it looks like @Mominarez might be busy and would not be able to do the task. If it's okay with you, I can add translations to the remaining languages. I was going to add my before I die statement today anyways so I would happily add all remaining languages too.

XanderRubio commented 1 year ago

Hey @XanderRubio It's been a week, and it looks like @Mominarez might be busy and would not be able to do the task. If it's okay with you, I can add translations to the remaining languages. I was going to add my before I die statement today anyways so I would happily add all remaining languages too.

HI @VoidyCodes,

Love the enthusiasm, and I've chatted with @Mominarez and moved that time to this Wednesday as she over the weekend made pull requests for her work, and we are in the process of just making an adjustment to the pull request for good open source practice and learning experience. Thank you for your patience, and if you are really eager to continually contribute, we have the ROADMAP to get more ideas on what can be opened for open issues, and additionally, we will need to add another UI enhancement that I will create an open issue for soon. I am looking forward to seeing your before I die statement. Additionally, we will be building out the community section of this organization on GitHub to help with more organized collaboration with contributors on this project, so be on the lookout for being a member of Before I Die Code in the near future. Have a great start to your week!

XanderRubio commented 1 year ago

HI @VoidyCodes,

You're all good to go ahead with adding the last seven language translations. Have a nice day!