Welcome to MPlayerX-Localization Project.
This is a sub-project of MPlayerX, which is a open-source media player project on Mac OS X. You could take a look at http://github.com/niltsh/MPlayerX
This is the document will help you to understand how to make a localization package of MPlayerX.
There is also a svn repo at http://code.google.com/p/mplayerx-localization/ and this git repo was started at r50 of the svn repo.
┬─ root
├┬─ 1.0.0
│├─ English.lproj
│└─ zh_CN.lproj
├┬─ 1.0.1
│├─ English.lproj
│└─ zh_CN.lproj
├── …
- With every release, the [version number] folder will be created in the root.
- The MASTER lproj is English.lproj, [the project owner] will upload this lproj when the UI is finalized for every release.
- Basically, English.lproj will be uploaded only ONCE for every release. But there might be some incidence that [the project owner] have to update English.lproj.
- Every time the English.lproj was uploaded or updated, [the project owner] should email to all the contributors.
- The notification email should include.
- what were uploaded or updated.
- the branch in the MPlayerX repo for this update.
- the version number in the MPlayerX repo for this update.
- After received the email, the contributors could start the work any time(if not too late).
- Except [the project owner], It is PROHIBITED for contributors to modify any files in English.lproj.
- Contributors could create any files or folders for their own localization.
- Since the lproj folder has naming rules, if not known, please look into http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/LanguageDesignations.html
- There are three sorts of files contributors could upload or update, .xib, .strings and .rtf.
- xib should be the raw, editable xib files. please DO NOT upload the compiled nib files.
- strings should be encoded by UTF-16.
- please DO NOT use microsoft word or wordpad to modify the rtf, since it will mess up the file totally. I recommend TextEdit.app
- When contributors is going to finish the localization, there are two ways to let [the project owner] know.
- email to [the project owner]
- write some commit messages in the final commit.(PLEASE use English, rather than you own language, in the final commit)
- Contributors should be responsible for the test, [the project owner] may know nothing about the specific language.
- Finally, localization is really a lengthy job and need much much carefulness and patience.
I really appreciate your help and THANK YOU VERY VERY MUCH.
- Necessary Tools
- Interface Builder
- any Text Editor
- if there are any diff/merge tools in hand, that will save much time.
I recommend TextWrangler, DiffMerge.
- For xib files
- Use Interface Builder to open the file.
- In the MenuBar, hit
Tools->Strings
, there will pop up a window, which will list all the strings could be translated in the xib file. - Double click the text area in that window, translate it, enter key.
And I don’t recommand to edit the text in the UI directly, since It may change the Font, AFAIK. - Adjust the layout,
- Save the file and quit Interface Builder,
- For strings files
- Use the diff/merge tools to compare the new untranslated file and old translated file.
- And you could see which items are added, deleted, modified, unchanged.
- According to the changes, to transfer the translated item to the untranslated file as many as possible.
- Then translate the items which are added and modified.
- For others
There are no easy ways.
There is a template.Makfile, you could make the necessary lproj files with just a make command
- copy the temple.Makefile to [version number] folder
- rename it to Makefile
- in Terminal, goto the [version number] folder
make
- the compiled lprojs will be placed in the results/
2010/06/08 – now [the project owner] = Zongyao QU, [email protected]
- How to make a increment localization
- For strings file
There is no better way.
Just use a difftool(such as FileMerge.app) to compare the latest untranslated file with the last version,
then merge the items you have translated. - For xib files
Before start to translate, you could run this command to transfer your previous work to the new one.
ibtool --previous-file {old master}/MyNib.nib --incremental-file {old translated}/MyNib.nib --localize-incremental --write {new translated}/MyNib.nib {new master}/MyNib.nib
Then use InterfaceBuilder to open the xib files, in MenubarTools->Strings
, you could find all the items you should translate.
- For strings file
- For more info about how to localize to another language, please read
- The basic concepts
http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/BPInternational.html - The toolchain
http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/IB_UserGuide/LocalizingNibFiles/LocalizingNibFiles.html
man ibtool
man genstrings
- The basic concepts