From 936be79a4615a1def90a83a26d1a2c3335770a56 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Wed, 4 Feb 2004 03:23:25 +0000 Subject: [PATCH] * Added the 'documentation' on strings in our source code and also added the file with information on how to make translations. --- doc/strings.txt | 34 ++++++++++++++++++++++ doc/translations.txt | 68 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 doc/strings.txt create mode 100644 doc/translations.txt diff --git a/doc/strings.txt b/doc/strings.txt new file mode 100644 index 0000000000..b871a1248d --- /dev/null +++ b/doc/strings.txt @@ -0,0 +1,34 @@ +Some basic rules and guidelines for handling strings in VLC source code: + +- Determine wether your string is user visible (GUI string) or not. + +- _("") makes a string translatable and also actually does translation (calls gettext) +- _NS("") is the macosx variant of _(""). it is a short of [NSApp localizedString: ""] There is also a [NSApp delocalizeString:@""] OSX is entirely UTF8 native. + +- N_() only makes a string translatable. it is safe to use it in #defines and in arrays. Also use this when translating strings during the creation of config variables. + +- User visible strings should start with a capital. (Module descriptions for instance) + +- Sentences should end with a '.' + +- Menu-items with multiple words Should Uppercase the Big Words (look at your windows/IE menus) (only menu-items) + +- msg_* should not be translated and don't have strict punctuation (no . or capitals). + +- Write correct american english. + +- Beware of duplicity with strings that already occur in other files. Use those when possible. + +- When writing descriptions (especially for config options) make the string descriptive. Think to yourself: If the user reads this, will it help him understand this? + +- Config options short descriptions should contain range and unit of the option when appropriate. ( 0-360 degrees) ( Hz ) + +- mms:// http:// UDP RTP are things that don't need translation, neither do variables, config options, module names and module shortcuts. + +- Consistent use of terminology throughout the sourcecode + +- Try to keep strings UTF8 where possible, to make sure a string can be displayed in chinese just as easily as in english in your window. + +- wxU is used for c UTF8 strings to unicode conversion. wxL2U transforms from current locale to unicode. + + diff --git a/doc/translations.txt b/doc/translations.txt new file mode 100644 index 0000000000..cf0fe47dc3 --- /dev/null +++ b/doc/translations.txt @@ -0,0 +1,68 @@ +Create translations for VLC media player +============== +Edit the appropriate file (for instance fr.po for French translation). +Write the translation of "msgid" strings into the "msgstr" field. +You can always ask vlc-devel@videolan.org for assistance. + + +Writing a new localization +========================== +If there is no localization file for your language, send a mail to +vlc-devel@videolan.org. In return we will send you a localization file, +along with a special VLC binary for your tests. + + +Testing your localization on UNIX +================================= +You must install the gettext package. See your UNIX distribution, or + http://www.gnu.org/software/gettext +Use the convert-po.sh script attached : + ./convert-po.sh .po +Copy the resulting vlc.mo file to + /usr/local/share/locale//LC_MESSAGES + + +Testing your localization on Mac OS X +===================================== +If you do not have GNU gettext installed (you'd probably know if you had +it :), you must download its binaries from our website : + http://download.videolan.org/pub/videolan/devtools/gettext-macosx.tar.gz +and extract them into the current directory : + tar xvzf gettext-macosx.tar.gz + +Use the convert-po.sh script attached : + setenv PATH gettext-macosx:$PATH + setenv DYLD_LIBRARY_PATH=gettext-macosx + ./convert-po.sh .po +[*] + +Copy the resulting vlc.mo file to + VLC.app/Contents/MacOS/locale//LC_MESSAGES + + +"fuzzy" translations +==================== +A fuzzy translation is an untranslated string for which gettext did an +automatic suggestion, but needs your confirmation. They are marked with +the "#, fuzzy" comment. If you think the suggestion is OK, or if you +fixed the suggestion, do not forget to remove the "#, fuzzy" comment. + + +[*] Step by step process to localize under Mac OS X (excerpt from a mail) : +cd ~/Desktop +curl -O http://www.videolan.org/pub/videolan/devtools/vlc-po-files.tar.gz +tar xzf vlc-po-files.tar.gz +cd vlc-po-files +curl -O http://www.videolan.org/pub/videolan/devtools/gettext-macosx.tar.gz +tar xzf gettext-macosx.tar.gz +setenv PATH ./gettext-macosx:$PATH +setenv DYLD_LIBRARY_PATH ./gettext-macosx +[here you copy your it.po file to the vlc-po-files folder on your Desktop] +./convert-po.sh it.po +[here you copy the vlc.mo file to your +VLC.app/Contents/MacOS/locale/it/LC_MESSAGES] + +-- +Christophe Massiot +Derk-Jan Hartman +$Id: translations.txt,v 1.1 2004/02/04 03:23:25 hartman Exp $ -- 2.39.2