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

Add Persian translation #196

Merged
merged 7 commits into from
Sep 22, 2023
Merged

Add Persian translation #196

merged 7 commits into from
Sep 22, 2023

Conversation

jamalkaksouri
Copy link
Contributor

In accordance with the guidelines outlined in the contributing file, the Persian translation of this repository has been completed.

@jamalkaksouri jamalkaksouri changed the title Add IR translation Add Persian translation Sep 21, 2023
@abhinav
Copy link
Collaborator

abhinav commented Sep 21, 2023

@jamalkaksouri the PR is still broken:
image

All the PR needs is a new entry added to the README linking to your translation.
Everything else should remain unchanged.

@mway
Copy link
Contributor

mway commented Sep 21, 2023

Hey @jamalkaksouri, thanks for the translation!

You don't need to include style_ir.md here; only include the change to README.md with the link to jamalkaksouri/uber-go-guide-ir. You can replace style.md with the translated version in your own repository (but if you'd prefer to keep the English style.md and add the translated version in style_ir.md, that's OK too).

See the most recent translation update, #157, as well as the repository that it links to, as an example.

@jamalkaksouri
Copy link
Contributor Author

Hello @mway,

I want to express my gratitude for your guidance. As per your recommendation, I replaced the Persian translation in the style.md file. However, it appears that it automatically reverted back to its English equivalent. In the repository #157 many files and folders were not included, despite my previous attempts with this method, and the tests did not pass. Did I make a mistake?

@abhinav
Copy link
Collaborator

abhinav commented Sep 22, 2023

Hey, @jamalkaksouri, thanks for the translation. Our build process might be getting in the way a little.

First, just to clarify: @mway suggested not to modify the style.md in this repository, but you're free to modify or replace style.md in your translation repository (jamalkaksouri/uber-go-guide-ir).

Now, the reason that style.md reverted back to English is because of our build setup. We have the actual style guide contents inside the src directory. Afterwards, a CI Job merges the contents of the src directory into the style.md (relevant part).

Typically, translation repositories aren't forks. They just translate the contents and have their own history. I think you're running into this problem because your repository is a fork -- so it's making it difficult to keep the style.md unchanged while still making a PR for the README. There are a couple ways you could go about fixing this.

First option is: keep the repository a fork, but make the README PR from "before" the translation. Something like this:

# assuming there's an 'upstream' git remote pointing to uber-go/guide
git checkout -b add-translation upstream/master
vim README.md  #  add your translation to the README
git add README.md
git commit
# make a pull request with this branch

Then for your translation on master (not on this branch), disable the CI job (delete the ci.yml file) and the src directory. Your translation will be maintained in the style.md and you can update it as needed. (You can revert the "Auto-update style.md" commit when you do that.)

Second option is: use the fork only to add an entry to the README. Create a separate repository for the translation.
To do this:

  • Rename jamalkaksouri/uber-go-guide-ir back to jamalkaksouri/uber-go-guide
  • Create a new repository jamalkaksouri/uber-go-guide-ir, and copy the CODE_OF_CONDUCT, LICENSE, and README to it, along with your translation.
  • Go back to your fork (jamalkaksouri/uber-go-guide), and make a Pull Request adding a link to jamalkaksouri/uber-go-guide-ir to the README.

Hope this helps!

@abhinav
Copy link
Collaborator

abhinav commented Sep 22, 2023

Relatedly, @mway, we may want a section in the CONTRIBUTING.md about contributing translations.

@mway
Copy link
Contributor

mway commented Sep 22, 2023

Agreed, I think that would be good.

@jamalkaksouri
Copy link
Contributor Author

Thank you @abhinav,

I would like to express my gratitude for your swift response and comprehensive guidance. I have implemented the second suggested approach, and the repository is now up-to-date and ready for merging.

Copy link
Collaborator

@abhinav abhinav left a comment

Choose a reason for hiding this comment

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

Excellent! Thanks, @jamalkaksouri.

@abhinav abhinav merged commit b5e3642 into uber-go:master Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants