Skip to content

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

@cameel

Description

@cameel

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions