Working with the screen Reader Translation project

Advantages

Subscribe to the mailing list

You can subscribe to NVDA translations mailing list here Thanks to Freelists.org

It is an English low trafic list devoted for the discussion of translation. Important messages that relate to translators will also be sent here, i.e. before nvda official releases, to remind translators to make sure their localization is up to date. As a translator, you no longer need to follow NVDA dev mailing list.

Creating an account

Subscribe to the NVDA translations mailing list (above) and request an invitation. Once you receive your assembla invitation, you can proceed by creating a username/password so that you can use the svn server. Once you are logged in, you need to accept the invitation to the screenReaderTranslations team. After that, we don't need the website any longer.

Download and install

If you use your own svn client then you can skip this section.

  1. You can download a zip file containing both svn and git here
  2. Extract the file to a new folder, and then run the setup.bat file.
  3. The setup.bat will run two installers. It will install svn, and then also install git, We install git because it gives you a better command line.
  4. In the subversion install just press next next next without any problems.
  5. In the git installer, run git from windows command line with unix tools. The rest is just fine as default.
  6. You may need to restart your computer to finish the setup of both svn and git.
  7. You can now delete the extracted folder
  8. Now create a folder on your c or d drive, call it translation make sure it is selected, and from the file menu, choose git bash here it will open the command line. The first time it may take a little while, but you know it finished its first time setup when it shows a dollar sign at the last line.
  9. (optional) To make your bash prompt a little nicer you can now type and press enter: `echo "PS1='\w: '" >>~/.bashrc`
    1. It will return to the prompt, simply type `exit` and press enter.
    2. Reopen by doing git bash here from the file menu, and your prompt should be easier to listen to. +

First time checkout (To download the repository)

svn checkout http://subversion.assembla.com/svn/screenReaderTranslations .

When you have just installed svn+git, and dont have a copy of the repository, create a translation folder in the root of your partition. When the translation folder is selected, choose git bash here from the file menu. It will take a few seconds and then you will see a command terminal. Use the above command to get your copy of the current files, don't forget the dot at the end of the line.

You can see that it is successful when the last line that it printed says something like checked out revision 1234

Repository structure

The layout of the repository is as follows:

Each language directory contains:

Work flow

To minimize merge problems, and letting the automated system work effectively it is strongly recommended that you:

The work flow is something like this:

Useful svn commands

before the following actions, you need to be in the right place i.e. go to the directory translation and while the language is selected, from the file menu choose git bash here.

When it opens, and if you listen to the path, you should hear your language code (ar for arabic, sv for swedish) at the end.

To check the status (to see which files have been modified)

svn status

If you get nothing, then svn didnt detect any changes.

If you got any output, then it is probably one of the following:

  ? file1.txt # means that svn does not know about file.txt, and it has not been asked to look after this file, and therefore will not be transmitted.
  a file2.txt # svn didnt know about this file, but it has now been added, and will be transmitted when committing.
  d file3.txt # we have told svn to stop looking after file3.txt.
  ! file4.txt # the file has been removed, and svn does not know why, file will be restored if we do svn update
  m file5.txt # the file has been modified and the changes will be transmitted when we commit.

Download new changes from the server

`svn update`

it should say updated to revision 1266 as an example.

it will show a list of files that have been effected.

  a file1.txt # meens that file.txt has been added to svn, and you are getting your copy.
  u file2.txt # means that file2.txt has been updated
  d file3.txt # means that someone removed the file and svn is also removing your copy of the file.
  g file4.txt # means that you have changed the file , and it was also changed by someone else, but svn was happy merging the changes.
  c file5.txt # means that you have modified the file and it has been  modified by someone else, but svn could not automatically merge, this causes a problem, so ask for help if you get it.

Seeing the modifications that you made of each file

svn diff >work.txt

will create a difference file, and save it to work.txt review work.txt using your editor, if all is well then go ahead and commit. otherwise, go to the file(s) that you have modified, and revise your modifications. after new modifications, delete work.txt and execute the command again to get a new difference file.

If you have modified several files, and you want to just look at the diff for one file:

svn diff changes.t2t >work.txt

Committing (sending the modifications to the server)

svn commit -m "informative message"

Will commit all your modifications to the svn server. Please make sure the message is informative, because it makes it easier to see what has changed from revision to revision. see also svn status and svn diff

unintended modification to file

svn revert filename

for example, when working on an arabic file, and reading english file along side, and a modification was made to the english unintentionally, and it now shows as modified when doing svn status, but the change should not be committed, then we use the revert command as above.

Less frequently used svn commands

Seeing what changed between revisions

svn diff -r 189:190 >work.txt

will show the diffrence between revision 189 and 190, printing the diffrence to work.txt

Viewing commit messages

svn log >log.txt

will create a log.txt file, and put all the commit messages in the file

If we are intrested in just the log messages for a particular file then:

svn log changes-ar.txt >log.txt

will only include the log messages that involve changes-ar.txt, again storing the messages in log.txt

cleaning the screenReaderTranslations directory

svn cleanup

if you did something wrong or there is a conflet in a file the team is working on, just clean the translation directory to obtain a new copy.

restoring the files you were working on

svn restore

after cleaning the directory , you should restore the deleted files to resume work.

Help

As always, if something is unclear or anything needs explaining, dont hesitate to ask, I am happy to explain by voice if this document is confusing.

Mesar