Development Team/i18n/guide
m (→Obtaining the string database) |
Secretagent (Talk | contribs) m (→Language packs under development) |
||
(One intermediate revision not shown) | |||
Line 5: | Line 5: | ||
Below is a list of language packs currently supported by services-darenet. | Below is a list of language packs currently supported by services-darenet. | ||
- | * English (maintained by Development Team) | + | * English - GB (maintained by Development Team) |
+ | * English - US (maintained by Development Team) - DEFAULT | ||
=== Language packs under development === | === Language packs under development === | ||
- | |||
- | |||
== Help Files == | == Help Files == |
Current revision as of 22:17, 13 April 2010
Thank you for your interest in helping translate services-darenet to other languages. This guide will hopefully provide all the necessary information you need to get started translating. Should you have any questions, don't hesitate to bring them up on the i18n committee mailing list (i18n@darenet.org).
In This Guide: |
Current Language Packs
Below is a list of language packs currently supported by services-darenet.
- English - GB (maintained by Development Team)
- English - US (maintained by Development Team) - DEFAULT
Language packs under development
Help Files
Each service and module within services-darenet has its own help file. Each help file contains multiple entries, which describe a particular help 'menu' or command. An example of two entries in nickserv.help
is shown below:
"INFORMATION" ( "$bInformational Commands:$b", "$b$b", "For more information on a specific command, type: /$S HELP <command>", "$b$b", "ACCOUNTINFO - Displays information about an account.", "USERINFO - Display what account an online user is authenticated to.", "STATUS - $b$S$b's status.", "VERSION - $b$S$b's version information." ); "SET NOOP" ( "Usage: $b/$S SET NOOP <on|off>", "$b$b", "When enabled, $C will not allow your account to be added", "to any channel access lists. Whoever tries to add you will get", "a notice from $C stating that you have NOOP on.", "$b$b", "$uSee Also:$u set" );
As you can see above, the first string of an entry defines the menu or command name. When a user uses /msg NickServ HELP <entry name>
, they will be shown whatever text follows for that entry (e.g., /msg NickServ HELP SET NOOP
). Entry names should never be translated.
Each string (text enclosed in '"' double quotes) represents one line of text as sent to the user by services. We normally try to wrap strings at 80 characters. If a string you're translating is over 80 characters, consider breaking it down into multiple strings. All text within a string may be translated with the following exceptions:
- Variables. All variables start with the '$' character, and are sometimes enclosed in curly brackets (e.g.,
${level/command}
) Services will replace these with text or specific encoding information when sending the output to the user's IRC client. A list of common variables is provided below. - Command names. All command names should appear as-is; however, you may translate most parameters for the command. If in doubt, ask!
NOTE: To create an empty line, use "$b$b"
.
Obtaining help file copies
Once you become an i18n Committee member, you will be provided with instructions on how to obtain a copy of services-darenet's help files.
Strings Database
The strings database contains most, if not all, message strings services-darenet sends to users (usually in reply to a command the user issued). Below is an example of a few message strings from the strings database:
"CSMSG_CHANNELS_EXPIRED" "%i channels expired."; "CSMSG_REG_SUCCESS" "You now have ownership of $b%s$b."; "CSMSG_PROXY_SUCCESS" "$b%s$b now has ownership of $b%s$b."; "CSMSG_ALREADY_REGGED" "$b%s$b is registered to someone else."; "CSMSG_NOT_REGGED" "$b%s$b is not registered with $S, or quotes have been disabled for this channel.";
As you can see above, each message string consists of two parts: the string name, and the string itself. String names should not be translated or altered in any way. All text within the string itself may be translated with the following exceptions:
- Command names. All command names should appear as-is.
- Variables. All variables start with the '$' character, and are sometimes enclosed in curly brackets (e.g.,
${level/command}
) Services will replace these with text or specific encoding information when sending the output to the user's IRC client. A list of common variables is provided below. - Conversion/format specifiers (which start with a '%' character). For example,
%i
.
Obtaining the strings database
Once you become an i18n Committee member, you will be provided with instructions on how to obtain a copy of services-darenet's strings database.
Common Variables
Below is a list of variables commonly used in services-darenet's help files and strings database, with an explanation of what they do.
Variable | Description |
---|---|
$b | Bolds text (e.g., "$bBold$b, not bold." would become "Bold, not bold."). |
$k | mIRC Colours. |
$o | Plain text (.e.g., \017). |
$r | Reverse text. |
$u | Underlines text (used in the same manner as $b). |
$C | Replaces with nickname configured for ChanServ. |
$G | Replaces with nickname configured for Global. |
$H | Replaces with account name of the user (if available), "Account" if not available. |
$i | Replaces with user's HelpServ ticket id, if available. |
$N | Replaces with nickname configured for NickServ. |
$O | Replaces with nickname configured for OperServ. |
$S | Replaces with the source's nickname. |
$s | Replaces with the bot's (self) nickname. |
$X | Replaces with the nickname configured for SpamServ. |
Common Conversion/Format Specifiers
Below is a list of common specifiers commonly used in services-darenet's help files and strings database, with an explanation of what they do.
NOTE: Services replaces conversion/format specifiers with data supplied by the calling function.
Specifier | Description (e.g., type of data it's replaced with) |
---|---|
%c | Character format specifier. |
%d | Integer format specifier. |
%i | Integer format specifier (same as %d). |
%f | Floating-point format specifier. |
%e | Scientific notation format specifier. |
%E | Scientific notation format specifier (letters displayed in uppercase). |
%g | Uses %f or %e, whichever result is shorter. |
%G | Uses %f or %E, whichever result is shorter. |
%o | Unsigned octal format specifier. |
%s | String format specifier. |
%u | Unsigned integer format specifier. |
%x | Unsigned hexadecimal format specifier. |
%X | Unsigned hexadecimal format specifier (letters displayed in uppercase). |
%p | Displays the corresponding argument that is a pointer. |
%n | Records the number of characters written so far. |
%% | Outputs a percent sign. |
NOTE: Some of the above conversion/format specifiers may be combined with a length modifier. All you need to know is that they always start with a '%' percent sign.