I tried to create a script for those users who wants help us with the translations of language files - so, they need only a github account, environment and set their personal informations for it.
It is just for translators who doesn't need preserve their branches, since we wont use rebase (we are always overwriting the master branch).
Preparing the environment (just for the first time - steps 1 to 4)
In order to write the commit messages required by that git command we may need to install an editor like Vim or Emacs and add their paths to the PATH variable (for the git console/shell).
After run the git commit command the editor it will opened and you can describe the informations you think is necessary about what you did. (a list of Vin's commands can be found here and for Emacs here).
After all your files has been updated/added and committed is time to push it to your remote repository:
$ git push origin master
that command will replace your remote (origin) master branch with the local one.
The next step is to make a Pull Request at GitHub to the main developer's repository.
It is just for translators who doesn't need preserve their branches, since we wont use rebase (we are always overwriting the master branch).
Preparing the environment (just for the first time - steps 1 to 4)
- Download and install Git for Windows from this link.
- Let say the path name and location is "c:\git". Use the windows explorer and look for the file "git-bash.exe" into that folder and run it.
- In the prompt ($), lets clone the remote wings repository to the local one and enter in the wings directory:
$ git clone http://github.com/<your github repository>/wings.git wings
$ cd wings
this action is going to create a folder wings under the current directory (c:\git\wings) with all source files.
- Git records your name and email address with every commit you make, so the first step is to tell Git what these are:
$ git config user.name 'Your Name'
$ git config user.email you@domain.com
obs: you can check these informations by running the command: $ git config -l
From this point the procedures will be the same for every time you need to update the sources in order to get any new/updated language file from the master programmer.
- Being sure to have selected the master branch to work
$ git checkout master
- Updating the local references to your wings repository on github
$ git fetch origin
- Making sure the local files are the last one made available by the master programmer (dgud):
$ git reset --hard dgud/master
- Updating your remote master branch with that one we just "download" to the local repository:
$ git push origin master
- Creating a new branch for each new version of Wings
$ git checkout -b v1.5.2
For example, this will create a new branch named v1.5.2 based on the master branch.
Now you can work in the languages files which you would find in the .\wings\src, .\wings\plugins_src and its subdirs.
You must use the original files (English)as reference and naming the new .lang files like shown in this post.
You can check the files currently changed by using the command:
$ git status
here a sample of the output information. It shows a modified file and a new one:
Quote:$ git status
In order to enable files in the branch be updated by a commit command you will need to add the files for commit as informed in the output screen (just the first time it is reported as "not staged for commit" or "untracked").
On branch master
Your branch is ahead of 'origin/master' by 8 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: src/wings_pt.lang
Untracked files:
(use "git add <file>..." to include in what will be committed)
src/wings_es.lang
no changes added to commit (use "git add" and/or "git commit -a")
In order to write the commit messages required by that git command we may need to install an editor like Vim or Emacs and add their paths to the PATH variable (for the git console/shell).
After run the git commit command the editor it will opened and you can describe the informations you think is necessary about what you did. (a list of Vin's commands can be found here and for Emacs here).
After all your files has been updated/added and committed is time to push it to your remote repository:
$ git push origin master
that command will replace your remote (origin) master branch with the local one.
The next step is to make a Pull Request at GitHub to the main developer's repository.