⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lang-howto

📁 Linux下的MSN聊天程序源码
💻
📖 第 1 页 / 共 2 页
字号:
diff files or incumplete translation files with a few keys.-As stated above, keys sent in the body of the email will beIGNORED and DISCARDED.-If you changed the file encoding, please TELL US THE NEW encoding you used,in order to change it in the langlist file.-Langfiles sent to other email addresses thanamsn-translations@lists.sourceforge.net will also be IGNORED andDISCARDED. When in doubt, ask!If not possible, or you're just translation a few keys, you can justsend (although it is not the ideal) a text file attached to themail, in the form:keyname1 translation1keyname2 translation2that is, the keyname, followed by ONE BLANK SPACE (no tabs orsimilar), and followed by the translated string, no need to includethe original english string, or similar. One key per line, no extrablank lines in the middle. Including the keys directly in the emailtext is a bad idea, as mail clients usually split long lines andchange the character encodings, which leads to mistakes.OTHER KINDS OF CONTRIBUTION WILL BE REJECTED, IN ORDER TO MAKE THEJOB EASIER TO THE MANAGER.I hope you understand, there's usually one person in charge ofupdating the translations, and there are more than 50 languages, sothere are many translations and submission. Don't make it moredifficult :)When in doubt, ask! (amsn-lang@lists.sourceforge.net)HOW TO ADD A NEW LANGUAGE-------------------------1. Choose a short identifier for your language (for example english- en). It is better that you use the correct ISO code for yourlanguage. ISO codes for languages can be found at    http://www.w3.org/WAI/ER/IG/ert/iso639.htmAlways use the 2-letter code for your language if it exists (forinstance, fr for french, pt for portuguese). If your language hasonly a 3-letter code (for instance, ale for aleut, pap forpapiamento) you must use it, though. When in doubt, ask! (amsn-lang@lists.sourceforge.net)For languages spoken on colonial lands, you shoud use the languageISO code followed by an underline and the country ISO code in CAPS(fr_CA for canadian french, pt_BR for brazilian portuguese). Language ISO codes:    http://www.w3.org/WAI/ER/IG/ert/iso639.htmCountry ISO codes:    http://www.bcpl.net/~jspath/isocodes.htmlSome codes have been mistakenly taken (for example, langbr once was taken for the brazilian portuguese, but the correct code would bept_BR, br alone refers to the breton language). If you find thatthe ISO code for your language has been taken by mistake foranother language, scream your lungs out at the amsn-lang list andwe will fix things up ;-)When in doubt, ask! (amsn-lang@lists.sourceforge.net)2. Download the english language (langen) file from    http://amsn.sourceforge.net/modules.php?name=Translation3. Rename the file to langXX, where XX the ISO language code you'vechosen. Remember that, for some languages, the ISO code has three(3) letters.4. Translate the whole file, except for the first word of each line(that is the key). Do not use <TAB> characters in the translatedfiles, only spaces are allowed. Tabs break aMSN. Make sure you choosea good encoding for your language, and you use a good editor thatsupports that encoding. A good choice is to use UTF-8, an unicodeencoding that supports all languages.5. Add the language to the 'langlist' file in the amsn folder(it's an XML file). Make sure you set the correct encoding in'langlist', the same that you used when writing the file. Putyour langXX translation file in lang/ folder in AMSN.6. TEST THE FILE. Use the new file in your local aMSN beforesending. Go through every menu and every dialog box. Assure thatall messages have the proper size. If you don't know how to do it,ask for help on the amsn-lang list. Also use the scripts provided in the lang/ folder to check for errors in the translation. There is a description of these scripts in section 3 of this document.When in doubt, ask! (amsn-lang@lists.sourceforge.net)7. Only after testing for one or two days, send the new file,compressed with gzip or zip, to:    amsn-translations@lists.sourceforge.netSend to this email only! Submissions to other emails will be ignoredand discarded. Don't forget to tell us the language name (official "english"name, and "local" name), and the encoding you have used. It can behard for the translation managerthe translation managerss to guessthe encoding!8. When in doubt, ask! (amsn-lang@lists.sourceforge.net)===========================2. For Translation Managers===========================When a new translation arrives to you, you should only accept it ifis a diff file or a complete compressed langXX file.Do not accept other kindsof submissions, 'cause our users have the sad habit of sending sparsetranslated keys by mail, and it's a big job :)*TEST THE FILE WITH THE missing.py SCRIPT!**YOU, AS A TRANSLATION MANAGER, ***MUST*** DO THIS TO ENSURE THE FILE IS OK!*Do this before commiting the file and only commit it if it's ok!If the file has any problems, the best thing to do is to return it to the translator and ask him to correct it. If you really need to edit a file (for whatever reason) be sure you use a multilanguage editor and also use the correct encoding for each language --- or you can corrupt it.Encodings are in langlist file (msn/langlist). This file is XML-formatted so it must be easy to understand.If you reject a translation by any reason, do it politely. Explain the reasons of why you're rejecting it and always: 'Thanks anyway' ;)What should I do if...-...I receive two lang files of the same language? Reject one, theoldest, or the less complete.When you get big contributions (not just 1 or 2 keys), or when younotice a person is very active (sending frequent translationupdates for a language), you should add him to the CREDITS file. You should tell him/her about this, and ask him/her if he or shewants to be removed (nobody wanted to be removed until now, butit's polite to ask :))When adding a new language, make sure to create an entry in the langlist file found in the top amsn directory. See the existing entries for the format.==========================3. For both - Useful tools==========================In the lang/ folder you have some useful scripts. Remember to replace XX in langXX for the two-lettercode of your language. Example: Valenciano = langva.The tools are:- missing.py: will list the missing keys in the langXX file, thatis, the keys that exist in langen (the master language), but not inlangXX. It will also warn about errors and count the number of untranslated keys. It's a very useful script, please use it!Usage in Linux:./missing.py langXXUsage in Windows (must have the Python interpreter installed):python missing.py langXX- sortlang: will sort the language file. BE CAREFUL. Don't applysortlang if there are spplited translations, as sorting it willsort these spplited lines, and it will be quite difficult to jointhem again. So please fix any spplited lines before sorting.Sorting is not mandatory, but it's recommended to sort beforecommiting to the CVS.Usage in Linux:./sortlang langXXTo use it in Windows you must have Cygwin installed.The syntax is identical. http://www.cygwin.com- convert.tcl: converts the given source, in the source encoding, to the given destination file using the given encoding.Usage in Linux:./convert.tcl source_file source_encoding dest_file dest_encodingUsage in Windows:wish convert.tcl source_file source_encoding dest_file dest_encodingIf you are in Linux using bash, remember that the auto completion is your friend...========= CREDITS =========File created by Alberto DiazVersion		Created		Author					Obs  1.0		06.Jan.2004	Alberto Diaz				Initial file  2.0		03.May.2004	Henrique Cesar Ulbrich (Hatredman)	Total rewrite  2.1		Unknown		Alvaro Iradier				Inclusion of new tools (section 3)  2.2		29.Aug.2004	Henrique Cesar Ulbrich (Hatredman)	Instructions for FAQ, README and HELP filesPlease be don't mess with the versioning system. It's quite simple to determinewhat version your mods should take. If you just add a few items or correct some,ad one to the MINOR version number (example, 1.1 to 1.2). If you totally rewrite the file (or rewritelarge portions of it) add one to the MAJOR number and make the minor zero (example: 2.6 to 3.0).These credits are not a reward or reconition for you, but a wayto hunt for a guilty person if something goes wrong he he he...We have the CVS versioning anyway.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -