## Development git patches » History » Version 3

*tan, 12/30/2009 01:23 AM *

added initial version of part 2, with minor changes to the first part

1 | 1 | tan | h1. Creating Translation git patches |
---|---|---|---|

2 | 1 | tan | |

3 | 1 | tan | {{toc}} |

4 | 1 | tan | |

5 | 1 | tan | h2. About these instructions |

6 | 1 | tan | |

7 | 1 | tan | There are two sets of instructions here; one for first-time setup, one for already existing setups. |

8 | 1 | tan | |

9 | 1 | tan | h2. First-time setup |

10 | 1 | tan | |

11 | 1 | tan | 1. Create a directory to hold the git repository |

12 | 1 | tan | <pre>$ mkdir quassel-dev |

13 | 1 | tan | $ cd quassel-dev</pre> |

14 | 1 | tan | |

15 | 1 | tan | 2. Create a git copy of the master from git.quassel-irc.org |

16 | 1 | tan | <pre>$ git clone git://git.quassel-irc.org/quassel.git</pre> |

17 | 1 | tan | |

18 | 1 | tan | 3. Change into your new copy of the git repository |

19 | 1 | tan | <pre>$ cd quassel</pre> |

20 | 1 | tan | |

21 | 3 | tan | 4. Set your personal preferences |

22 | 3 | tan | <pre>$ git config --global user.name "Your full name here" |

23 | 3 | tan | $ git config --global user.email "your.email@address.here"</pre> |

24 | 1 | tan | |

25 | 1 | tan | 5. At this point you have your very own working copy of the central git repository which you can make changes to. Now is a good time to fire up your favorite .po-editor, and start editing your language file (you should edit the file in your local git repository). |

26 | 1 | tan | As an example based on the path I've used here, the Norwegian Bokmaal translation file: <pre>~/quassel-dev/quassel/po/quassel_nb_NO.po</pre> |

27 | 1 | tan | |

28 | 2 | tan | When you have edited the file(s), you should follow the steps in the "Existing setups" below to create the git patch file(s). |

29 | 1 | tan | |

30 | 1 | tan | h2. Existing setups |

31 | 1 | tan | |

32 | 1 | tan | Here, I assume you have either followed the instructions above, or already have a git repository clone from the master. |

33 | 3 | tan | Also, I expect that you are inside the local 'quassel' repository as per 3. in the "First-time setup" above, |

34 | 1 | tan | |

35 | 3 | tan | 1. After you have done your changes to the .po file for your language, you can chech that the changes are recorded by git |

36 | 3 | tan | (all your changes will be shown, press <space> to move one page further, and <q> to stop showing the differences/changes) |

37 | 3 | tan | <pre>$ git diff</pre> |

38 | 3 | tan | |

39 | 3 | tan | 2. Then it's time to add your changes to the local index |

40 | 3 | tan | <pre>$ git add .</pre> |

41 | 3 | tan | |

42 | 3 | tan | 3. You then commit the changes you have done (which will give some feedback like the one I've provided below) |

43 | 3 | tan | (You should change the "Fixed some small inconsistencies" tekst with some short description of your changes) |

44 | 3 | tan | <pre>$ git commit -m "Fixed some small inconsistencies." |

45 | 3 | tan | [master edc8b8a] Fixed some small inconsistencies. |

46 | 3 | tan | 1 files changed, 8 insertions(+), 9 deletions(-)</pre> |

47 | 3 | tan | |

48 | 3 | tan | 4. You can now check the status of you git repository (which will give some feedback like the one I've provided below) |

49 | 3 | tan | <pre>$ git status |

50 | 3 | tan | # On branch master |

51 | 3 | tan | # Your branch is ahead of 'origin/master' by 1 commit. |

52 | 3 | tan | # |

53 | 3 | tan | nothing to commit (working directory clean)</pre> |

54 | 3 | tan | |

55 | 3 | tan | 5. You then create the actual patch-file |

56 | 3 | tan | <pre>$ git format-patch origin/master |

57 | 3 | tan | 0001-Fixed-some-small-inconsistencies.patch</pre> |