DjangoGirls / tutorial-extensions

Additional tasks for tutorial
https://tutorial-extensions.djangogirls.org
Other
162 stars 202 forks source link

Farsi translation #142

Closed Rahimz closed 2 years ago

Rahimz commented 3 years ago

Farsi translation added to Django Girls Extensions tutorial.

Rahimz commented 2 years ago

Could someone help me why one of the check is failed?

Rahimz commented 2 years ago

@das-g I've added {% raw %} tag around any Django template tags that are placed in the text. It is ready to review.

Rahimz commented 2 years ago

@das-g I've completed my Farsi translation. Does it needed to make a new PR?

das-g commented 2 years ago

@das-g I've completed my Farsi translation. Does it needed to make a new PR?

For the Farsi translation we can use this PR (#142). We don't need a separate one.

For the correction of the English original, please file a separate one. Please tell if you need help extracting that change to a separate branch.

Rahimz commented 2 years ago

I need help for extracting that change in English file, What is the best way to extract that? @das-g

das-g commented 2 years ago

I need help for extracting that change in English file, What is the best way to extract that?

I don't know what's the best way, but here's a way that should do it: :smiley:

how to put the fix of the English original on a branch of its own

It seems c61b70d748a0e463fca1623ff5ac6518c28da74c is the only one of your commits that changes something in en/. Thus this should work:

In a newly created directory, outside of any existing repositories:

# Get a copy of the main repository for Django Girls tutorial extensions:
git clone git@github.com:DjangoGirls/tutorial-extensions.git
# or, if you haven't set up SSH:
git clone https://github.com/DjangoGirls/tutorial-extensions.git

# Change into the directory of that newly cloned repo:
cd tutorial-extensions

# Make your own "fork" on GitHub known to the local repo:
git remote add own git@github.com:Rahimz/tutorial-extensions.git
# or, if you haven't set up SSH:
git remote add own git@github.com:Rahimz/tutorial-extensions.git

# Make history and branches of own "fork" available locally:
git fetch own

# Create a new branch, based on "master" branch of main repo:
git switch origin/master -c fix-grammar --no-track
# (I've chosen "fix-grammar" as the branch name,
# as that seems to be what the change in question does.)

# Create a commit imitating c61b70d, but on that new branch.
git cherry-pick c61b70d748a0e463fca1623ff5ac6518c28da74c

# Optional: Change the commit message
# to better reflect the change made by that commit:
git commit --amend -m "remove gratuitous word"

# Push the result to your own "fork" on GitHub:
git push -u own fix-grammar

Part of the output is probably a URL to visit for creating a Pull Request from that branch.

how to remove the change to the English original from this PR's branch

Only proceed if the above was successful. Once that's the case, we can continue in the same local repository.

The following assumes the same working directory as above after the command cd tutorial-extensions.

# Create a new (tracking) branch based on your "fork"'s master branch (= the branch of PR #142)
git switch own/master -c pr-142

# Create a new version of that branch's history, but without commit c61b70d:
git rebase --onto c61b70d748a0e463fca1623ff5ac6518c28da74c^ c61b70d748a0e463fca1623ff5ac6518c28da74c pr-142
## (the usual way would be with
# git rebase --interactive c61b70d748a0e463fca1623ff5ac6518c28da74c^
## but the variant above doesn't depend on what editor Git uses,
## so I thought it'd be more suitable for these instructions here.)

# Push the result to the master branch of your own "fork" on GitHub,
# thereby updating this Pull Request:
git push --force-with-lease
Rahimz commented 2 years ago

@das-g Thanks, but I encounter some issues so I reverted the change I've made in English file. I think you could merge this PR and then I will make a new PR for that typo.

das-g commented 2 years ago

Revert-Commits can be problematic for changes we do want, just not in that part of the history. I've thus made the adaptions I've proposed and pushed them to your branch. (This was possible, because you've checked "Allow edits by maintainers" for this Pull Request.)

I will make a new PR for that typo.

Please do. :+1:

If you want you can use commit 5fb2060ce397967487fe0739f0936ae782cf3d29 from branch fix-grammar of my "fork" for that. If however it's easier for you to make the change anew on a new branch, that would also be fine.