Preparing
Make some decisions
- Find a translator. You will need the following information about this person:
- Real name
- Make up a username
- Make up a password
- The short name for your language. This is something like "english" (as opposed to "U.S. English"). In this document, this name is referred to as "YOUR_LANG".
- The formal name for your language. This is what people will see on the screen. It will be something like "U.S. English" or "Norwegian (Nynorsk)". This is simply referred to as the formal language name.
- The language code for your language. Use these guidelines. This is referred to as LANG-ID.
- A flag icon or other image to represent your language. It should be 32x32 pixels.
With the AMIS source tree
- In the AMIS subversion tree, go to the trunk/langpacks directory
- Create a directory for your language. Use the short name for your language (see above).
- From trunk/amis/src/DefaultLangpack, copy the entire AmisLangpack? directory and put it in trunk/langpacks/YOUR_LANG/
- Remove the .svn directories from the copy of AmisLangpack?
- create an empty directory called "audio" in trunk/langpacks/YOUR_LANG/
- From trunk/amis/src/DefaultLangpack, copy the file called "moduleDesc.xml" and put it in trunk/langpacks/YOUR_LANG/
With the DAISY Lion
- Log into the DAISY Lion server (requires authentication)
- Go to the daisylion/scripts directory
- Generate the correct configuration file for AMIS
python ../config/generate_config.py > ../config/amislion.cfg
- Run the add_lang script
- Supply a username and password for the translator.
- Also supply a compliant language ID for your language.
python add_lang.py --config="../config/amislion.cfg" --langname="My Language" --realname="Trans Lator" --email="translator@email.com" LANG-ID translator_username translator_password
- Until this is part of the language creation process, do this too:
python run_sql.py --config="../config/amislion.cfg" "UPDATE languages SET audiodir=\"langpacks/YOUR_LANG\" WHERE langid=\"LANG-ID\""
The directory "langpacks/YOUR_LANG" is the same as what you created in the AMIS source tree (using the short name for your language). The LANG-ID value is the one you calculated according to the guidelines (see above).
Be careful to specify the WHERE .. part of the statement -- otherwise you will overwrite all audiodir values for all languages. Also be sure to properly escape quotes (as shown).
Translating
- The translator goes to the DAISY Lion website and logs in using their username and password
- They follow all the instructions and translate all the text
- They download a list of all the prompts and use Obi to make audio recordings
- They upload these recordings in a batch at the DAISY Lion website.
- They download the help file and translate it.
- They record the help file as a DAISY book.
- They submit the help file to the AMIS team.
Collect output
With the DAISY Lion
- Log into the DAISY Lion server (requires authentication)
- Run the following scripts from daisylion/scripts/:
- python export_amis_rc langid > outfile.rc
- python export_amis_xml langid > outfile.xml
- python export_amis_keys langid > outdir
Organizing
Prepare the RC file
- Copy outfile.rc into trunk/langpacks/YOUR_LANG/AmisLangpack
- Rename outfile.rc to AmisLangpack?.rc (replace the existing file of the same name)
- Open AmisLangpack?.rc in UltraEdit?
- Run the following steps and save after each:
- Choose "File->Conversions->Unicode/UTF-8 to UTF-8 (Unicode editing)"
- Choose "File->Conversions->UTF-8 to Unicode"
Prepare the XML file
- Copy outfile.xml into trunk/langpacks/YOUR_LANG/
- Rename outfile.xml to amisAccessibleUi.xml (replace the existing file of the same name)
Copy the keyboard shortcuts book
- Copy outdir into trunk/langpacks/YOUR_LANG
- Rename the folder "outdir" to "shortcuts".
Edit the module description file
- Open trunk/langpacks/YOUR_LANG/moduleDesc.xml
- Replace the following text:
- Change the language ID:
<moduleDesc xmlns="http://amisproject.org" id="eng-US" filename="./AmisLangpack.dll" type="langpack" enabled="yes"> becomes <moduleDesc xmlns="http://amisproject.org" id="LANG-ID" filename="./AmisLangpack.dll" type="langpack" enabled="yes">
- Change the language ID:
- Change the name of the language:
<text>U.S. English</text> becomes <text>Formal language name</text>
- Save and close moduleDesc.xml
- Copy your flag icon into two places: trunk/langpacks/YOUR_LANG/flag.ico and trunk/langpacks/YOUR_LANG/AmisLangpack/flag.ico . Be sure it is named "flag.ico"
- Make an MP3 audio recording of the formal name of your language. Save the audio file as trunk/langpacks/YOUR_LANG/thislang.mp3
Compiling
- Open trunk/langpacks/YOUR_LANG/AmisLangpack/AmisLangpack.sln in Visual Studio 2008
- Right-click the project properties
- For the "Debug" configuration: under "Post-build", enter the following value for "Command line":
..\..\..\amis\bin\copyLangpack.bat LANG-ID ..\..\..\langpacks\YOUR_LANG debug
You must replace LANG-ID and YOUR_LANG with real values.
- For the "Release" configuration: under "Post-build", enter the following value for "Command line":
..\..\..\amis\bin\copyLangpack.bat LANG-ID ..\..\..\langpacks\YOUR_LANG release
You must replace LANG-ID and YOUR_LANG with real values.
- If you haven't already, run trunk/amis/bin/run_first_to_copy_settings.bat . This will copy the AMIS settings to your Windows application data directory.
- Build the AmisLangpack? project from Visual Studio 2008
- All the files have now been copied to c:\documents and settings\all users\application data\AMIS\settings\lang\LANG-ID\
Making an installer
You can build a version of AMIS which uses your language pack as the default. First, of course, you have to have already built AMIS.
- in trunk/amis/installer, run "make_amis_installer.bat LANG-ID "Formal Language Name""
- You should get an executable named something like "Setup-amis-3-LanguageName?.exe"
You can also build an installer which adds your language pack to an existing AMIS installation.
TBD
