X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2FTRANSLATION;h=c78cb8a8a98c0014e95087e6e08b6e6828596342;hb=7601132bae1015f0937eb313b09055eb81122f4c;hp=cc3487d8b19f2fa9b3905603d4c382d7b8a111ac;hpb=f83a9dd82ba51e4a1be1c5417226653c760671d2;p=lilypond.git diff --git a/Documentation/TRANSLATION b/Documentation/TRANSLATION index cc3487d8b1..c78cb8a8a9 100644 --- a/Documentation/TRANSLATION +++ b/Documentation/TRANSLATION @@ -3,14 +3,21 @@ LILYPOND DOCUMENTATION TRANSLATION SOURCES -The sources live in a GIT repository. Git 1.4.4.1 or newer is -required, and Git 1.5.x is highly recommended. To get a fresh version -of LilyPond sources run +The sources live in a GIT repository. Git 1.5.x is required, and +latest version available on your platform is always recommended. To +get a fresh version of LilyPond sources run - mkdir lily ; cd lily - git init-db - git fetch git://git.sv.gnu.org/lilypond.git/ refs/heads/lilypond/translation:lilypond/translation - git checkout -b mytranslations lilypond/translation + mkdir lily ; cd lily ; git init-db ; mkdir .git/remotes + +then write the two following lines to a text file named .git/remotes/trans + +URL: git://git.sv.gnu.org/lilypond.git/ +Pull: lilypond/translation:refs/remotes/origin/lilypond/translation + +then run + + git fetch trans + git checkout -b lilypond/translation origin/lilypond/translation GIT @@ -330,6 +337,99 @@ enabled languages (from Documentation): This command is mainly intended to be used by the Translation meister. +MISCELLANEOUS: DEALING WITH SEVERAL GIT BRANCHES + +* It is possible to work with several branches on the same local Git +repository; this is especially useful for translators who may have to +deal with both lilypond/translation and a stable branch +(e.g. stable/2.12 or lilypond/translation-2.12). To fetch and check +out a new branch named BRANCH on git.sv.gnu.org, write the two +following lines to a text file named .git/remotes/SHORTHAND -- +SHORTHAND is the name of the remote file, i.e. whatever easy-to-type +name you would like to use when pulling or pushing BRANCH, and usually +SHORTHAND is an abbreviation of BRANCH without slashes + +URL: git://git.sv.gnu.org/lilypond.git/ +Pull: BRANCH:refs/remotes/origin/BRANCH + +Then, run + + git fetch SHORTHAND + git checkout -b BRANCH origin/BRANCH + +After this, you are able to pull BRANCH from git.sv.gnu.org with + + git pull SHORTHAND + +You can check out another branch OTHER_BRANCH, i.e. check out +OTHER_BRANCH to the working tree, with + + git checkout OTHER_BRANCH + +E.g. lilypond/translation, which you still have in your local Git +repository but is no longer checked out since you have created the new +branch BRANCH. + +Note that it is possible to check out another branch while having +uncommitted changes, but it is not recommended unless you know what +you are doing; it is recommended to run 'git status' to check this +kind of issue before checking ouy another branch. + +When pulling using SHORTHAND, do not forget to check first that the +right branch is checked out, i.e. the branch named A in the first part +of the "A:B" refspec in .git/remotes/SHORTHAND: as a matter of fact, +when you pull using A:B refspec, Git fetch A on the server as B remote +branch on your local repository, then tries to merge B into the +currently checked out branch. + +To remember which branch is currently checked out, run 'git branch', +which will list all branches and mark the currently checked out branch +with a star, or 'git status'. + + +* To merge branch FOO into branch BAR, i.e. to "add" all changes made +in branch FOO to branch BAR, run + + git checkout BAR + git merge FOO + +If any conflict happens, please carefully follow the instructions +given by 'git merge' -- you usually must resolve conflicts with a text +editor by merging pieces of files marked with "<<<" "===" and ">>>", +removing these 3 kinds of conflict marks, then commit the result +exactly like a usual commit. + +For example, as a translator, you will often want to merge master into +lilypond/translation; on the other hand, the Translations meister +wants to merge lilypond/translation into master whenever he has +checked that lilypond/translation builds successfully. + + +* If you play with several Git branches (e.g. master, +lilypond/translation, stable/2.12), you may want to have one source +and build tree for each branch; this is possible with subdirectories +of your local Git repository, used as local cloned subrepositories. +To create a local clone for the branch named BRANCH, run + + git checkout BRANCH + git clone -l -s -n . SUBDIR + cd SUBDIR + git reset --hard + +Note that SUBDIR must be a directory name which does not already +exist. In SUBDIR, you can use all Git commands to browse revisions +history, commit and uncommit changes; to update the cloned +subrepository with changes made on the main repository, cd into SUBDIR +and run 'git pull'; to send changes made on the subrepository back to +the main repository, run 'git push' from SUBDIR. Note that only one +branch (the currently checked out branch) is created in the +subrepository by deafult; it is possible to have several branches in a +subrepository and do usual operations (checkout, merge, create, +delete...) on these branches, but this is more difficult to manage +them and sync them with the main repository, so this possibility is +not detailed here. + + TECHNICAL BACKGROUND A number of Python scripts handle a part of the documentation