1 If you are commit to the i18n-zh project repository, please read this first.
3 ============================================
4 Guide to i18n-zh project repository
5 ============================================
8 * Software version requirements
10 * Repository on repo.or.cz
11 * Repository maintenance
12 * Common git operation
13 * Getting the latest upstream code
16 * File permission & encoding
17 * Verifying your po file
18 * Formating your po file
33 Software version requirements
34 =============================
37 *) translate-toolkit(pomerge & pofilter) 1.0.1
42 The flowwing is the sample configuration, please modify some fields.
66 # email = dongsheng.song@gmail.com
67 # name = Dongsheng Song
71 # HostName 152.69.94.80
76 Repository on repo.or.cz
77 ========================
80 http://repo.or.cz/w/i18n-zh.git
84 # cat .git/branches/origin
86 git://repo.or.cz/i18n-zh.git
88 http://repo.or.cz/r/i18n-zh.git
90 git+ssh://repo.or.cz/srv/git/i18n-zh.git
94 git+ssh://repo.or.cz/srv/git/i18n-zh.git
97 Repository maintenance
101 git-repack -a -d -f --window=128 --depth=64
105 git-fsck --unreachable --strict HEAD $(cat .git/refs/heads/*)
112 git-clone git://repo.or.cz/i18n-zh.git
114 git-clone http://repo.or.cz/r/i18n-zh.git
116 git-clone git+ssh://repo.or.cz/srv/git/i18n-zh.git
120 git fetch && git rebase origin
122 DO NOT use "git-pull" simply", see section
123 "Getting the latest upstream code" for more details.
126 git-checkout -f filename
130 git-commit -a -m "your log messages"
132 if you commit patch by someone, use option "--author":
134 git-commit -a --author someone -m "your log messages"
138 git reset --soft HEAD^
142 git-push git+ssh://repo.or.cz/srv/git/i18n-zh.git master:master
145 Getting the latest upstream code
146 ================================
147 There are two ways to update your local repository. Which one to use depends on
148 whether you have committed changes in the meantime.
152 The command to update your local repository is:
156 It will pull down the latest repository information from the origin remote
157 file (which points at where you initially cloned the repository from), then
158 merge. If the new changes don't conflict with anything locally, the merge
159 will "fast-forward" your branch reference to the new head. If new changes
160 do conflict, it will try to do an automatic merge using a couple of
161 different schemes, and then automatically commits the merge if it's
162 satisfied. If you notice that your pull resulted in a merge (in the output
163 of pull), you might want to use gitk to see if the merge did what you
164 expected it to. If it isn't satisfied, then you have to resolve the
167 *) You've made changes: fetch and rebase
169 If you have committed local changes, then git-pull will create a spurious
170 "Merge" commit, which will pollute the change list when you later push
171 upstream. To avoid this, do these two commands:
176 Instead of merging, this attempts to insert the changes you pull from the
177 origin repository before your local changes, avoiding the merge message.
182 *) Clone a repo (like git clone)
184 git-svn clone -T trunk -b branches -t tags \
185 https://i18n-zh.googlecode.com/svn/trunk
187 *) Reset your master to trunk (or any other branch)
189 git reset --hard remotes/trunk
191 *) Do some work and commit locally to git
195 *) Something is committed to SVN, rebase your local changes against the latest
200 *) Now commit your changes (that were committed previously using git) to SVN,
201 as well as automatically updating your working HEAD:
209 diff -wBNr -x .git . i18n-zh.origin
212 patch -p0 < zh_CN.patch
215 File permission & encoding
216 ==========================
219 set umask to 002, i.e.
221 set directory to 0775
222 set common file to 0664
223 set execute file to 0775
226 using utf-8 without signature(no BOM)
229 Verifying your po file
230 ======================
231 Please verify your po file is valid:
233 msgfmt --check-accelerators --statistics -c -o zh_CN.mo zh_CN.po
236 Formating your po file
237 ======================
238 Please format your translation before send po to the mailing list,
239 or commit to the repository.
241 msgmerge --no-wrap -F -o zh_CN-new.po zh_CN.po example.pot
242 mv -f zh_CN-new.po zh_CN.po
244 This can minimize the diff output, review your translation is easy.