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

Migrate translation repos to make them forks with full history #14

Closed
cameel opened this issue Mar 1, 2022 · 1 comment
Closed

Migrate translation repos to make them forks with full history #14

cameel opened this issue Mar 1, 2022 · 1 comment
Assignees

Comments

@cameel
Copy link
Collaborator

cameel commented Mar 1, 2022

The procedure here is close to what I outlined in solidity-docs/id-indonesian#4, but I realized that we can actually do this without even creating fresh repos. By doing it this way, we will keep the original translation branches as a backup and also we'll have less work with configuring the repos:

  1. Find the commit in the solidity repo at which the translation started.
    • This needs to be done carefully because if we include commits with text that was not translated, bot will assume it was already translated. On the other hand, if we miss some commits that were translated, the bot will overwrite them with English text in the PR. The latter is easier to spot and correct for the translator so I'd err on the side of going a bit farther into the past if unsure.
  2. Clone solidity repository locally and check out the develop branch.
  3. Delete everything outside of the docs/ directory and commit.
  4. Copy over the translation. There are two ways to do this:
    1. Copy all files (docs/ directory, README, .gitignore and anything else) from the translation repository to the local repo. This is easier and is recommended if there are just a few commits. It will discard translation history though.
      • If there was only one committer in the translation repo, try to preserve his authorship on the new commit (git commit --reedit-message).
    2. Cherry-pick commits from the original translation repo. This will preserve history but is harder because you'll need to resolve conflicts.
  5. Rename your local develop to the name of the main branch in the translation repo. Then rename the main branch in the translation repo on github to something else.
  6. Add the translation repo a as remote in your local repo (git remote add) and push the main branch to it.

We should try this procedure in the test org first by cloning translation repos. If it goes well, we can later just add the original repos as another remote and push to them.

@cameel cameel self-assigned this Jul 5, 2022
@cameel
Copy link
Collaborator Author

cameel commented Jul 22, 2022

I just finished doing the fa-persian repo so the migration is now done. I ended up using a bit more complicated procedure to preserves the history, based on @o-lenczyk's README.md with my later adjustments.

Overall there were no major issues. fa-persian was the only repo that required more effort to deal with conflict resolutions. In case anyone later wants to find out what specifically has been done in each case, I posted details in these comments/PRs:

@cameel cameel closed this as completed Jul 22, 2022
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

No branches or pull requests

1 participant