anope

- supernets anope source code & configuration
git clone git://git.acid.vegas/anope.git
Log | Files | Refs | Archive | README

language.h (7009B)

      1 /*
      2  *
      3  * (C) 2008-2022 Anope Team
      4  * Contact us at team@anope.org
      5  *
      6  * Please read COPYING and README for further details.
      7  */
      8 
      9 #include "anope.h"
     10 
     11 namespace Language
     12 {
     13 
     14 	/* Languages we support as configured in services.conf. They are
     15 	 * added to this list if we detect a language exists in the correct
     16 	 * location for each language.
     17 	 */
     18 	extern CoreExport std::vector<Anope::string> Languages;
     19 
     20 	/* Domains to search when looking for translations other than the
     21 	 * default "anope domain. This is used by modules who add their own
     22 	 * language files (and thus domains) to Anope. If a module is loaded
     23 	 * and we detect a language file exists for at least one of the supported
     24 	 * languages for the module, then we add the module's domain (its name)
     25 	 * here.
     26 	 *
     27 	 * When strings are translated they are checked against all domains.
     28 	 */
     29 	extern std::vector<Anope::string> Domains;
     30 
     31 	/** Initialize the language system. Finds valid language files and
     32 	 * populates the Languages list.
     33 	 */
     34 	extern void InitLanguages();
     35 
     36 	/** Translates a string to the default language.
     37 	 * @param string A string to translate
     38 	 * @return The translated string if found, else the original string.
     39 	 */
     40 	extern CoreExport const char *Translate(const char *string);
     41 
     42 	/** Translates a string to the language of the given user.
     43 	 * @param u The user to translate the string for
     44 	 * @param string A string to translate
     45 	 * @return The translated string if found, else the original string.
     46 	 */
     47 	extern CoreExport const char *Translate(User *u, const char *string);
     48 
     49 	/** Translates a string to the language of the given account.
     50 	 * @param nc The account to translate the string for
     51 	 * @param string A string to translate
     52 	 * @return The translated string if count, else the original string
     53 	 */
     54 	extern CoreExport const char *Translate(const NickCore *nc, const char *string);
     55 
     56 	/** Translatesa string to the given language.
     57 	 * @param lang The language to translate to
     58 	 * @param string The string to translate
     59 	 * @return The translated string if found, else the original string.
     60 	 */
     61 	extern CoreExport const char *Translate(const char *lang, const char *string);
     62 
     63 } // namespace Language
     64 
     65 /* Commonly used language strings */
     66 #define MORE_INFO			_("\002%s%s HELP %s\002 for more information.")
     67 #define BAD_USERHOST_MASK		_("Mask must be in the form \037user\037@\037host\037.")
     68 #define BAD_EXPIRY_TIME			_("Invalid expiry time.")
     69 #define USERHOST_MASK_TOO_WIDE		_("%s coverage is too wide; Please use a more specific mask.")
     70 #define READ_ONLY_MODE			_("Services are in read-only mode!")
     71 #define PASSWORD_INCORRECT		_("Password incorrect.")
     72 #define ACCESS_DENIED			_("Access denied.")
     73 #define MORE_OBSCURE_PASSWORD		_("Please try again with a more obscure password. Passwords should be at least\n" \
     74 						"five characters long, should not be something easily guessed\n" \
     75 						"(e.g. your real name or your nick), and cannot contain the space or tab characters.")
     76 #define PASSWORD_TOO_LONG		_("Your password is too long. It must not exceed %u characters.")
     77 #define NICK_NOT_REGISTERED		_("Your nick isn't registered.")
     78 #define NICK_X_NOT_REGISTERED		_("Nick \002%s\002 isn't registered.")
     79 #define NICK_X_NOT_IN_USE		_("Nick \002%s\002 isn't currently in use.")
     80 #define NICK_X_NOT_ON_CHAN		_("\002%s\002 is not currently on channel %s.")
     81 #define NICK_X_SUSPENDED		_("Nick %s is currently suspended.")
     82 #define CHAN_X_SUSPENDED		_("Channel %s is currently suspended.")
     83 #define CHAN_X_NOT_REGISTERED		_("Channel \002%s\002 isn't registered.")
     84 #define CHAN_X_NOT_IN_USE		_("Channel \002%s\002 doesn't exist.")
     85 #define NICK_IDENTIFY_REQUIRED		_("You must be logged into an account to use that command.")
     86 #define MAIL_X_INVALID			_("\002%s\002 is not a valid e-mail address.")
     87 #define UNKNOWN				_("<unknown>")
     88 #define NO_EXPIRE			_("does not expire")
     89 #define LIST_INCORRECT_RANGE		_("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
     90 #define NICK_IS_REGISTERED		_("This nick is owned by someone else.  Please choose another.\n" \
     91 						"(If this is your nick, type \002%s%s IDENTIFY \037password\037\002.)")
     92 #define NICK_IS_SECURE			_("This nickname is registered and protected.  If it is your\n" \
     93 						"nick, type \002%s%s IDENTIFY \037password\037\002.  Otherwise,\n" \
     94 						"please choose a different nick.")
     95 #define FORCENICKCHANGE_NOW		_("This nickname has been registered; you may not use it.")
     96 #define NICK_CANNOT_BE_REGISTERED	_("Nickname \002%s\002 may not be registered.")
     97 #define NICK_ALREADY_REGISTERED		_("Nickname \002%s\002 is already registered!")
     98 #define NICK_SET_DISPLAY_CHANGED	_("The new display is now \002%s\002.")
     99 #define NICK_CONFIRM_INVALID		_("Invalid passcode has been entered, please check the e-mail again, and retry.")
    100 #define CHAN_NOT_ALLOWED_TO_JOIN	_("You are not permitted to be on this channel.")
    101 #define CHAN_X_INVALID			_("Channel %s is not a valid channel.")
    102 #define CHAN_REACHED_CHANNEL_LIMIT	_("Sorry, you have already reached your limit of \002%d\002 channels.")
    103 #define CHAN_EXCEEDED_CHANNEL_LIMIT	_("Sorry, you have already exceeded your limit of \002%d\002 channels.")
    104 #define CHAN_SYMBOL_REQUIRED		_("Please use the symbol of \002#\002 when attempting to register.")
    105 #define CHAN_SETTING_CHANGED		_("%s for %s set to %s.")
    106 #define CHAN_SETTING_UNSET		_("%s for %s unset.")
    107 #define CHAN_ACCESS_LEVEL_RANGE		_("Access level must be between %d and %d inclusive.")
    108 #define CHAN_INFO_HEADER		_("Information for channel \002%s\002:")
    109 #define CHAN_EXCEPTED			_("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
    110 #define MEMO_NEW_X_MEMO_ARRIVED		_("There is a new memo on channel %s.\n" \
    111 						"Type \002%s%s READ %s %d\002 to read it.")
    112 #define MEMO_NEW_MEMO_ARRIVED		_("You have a new memo from %s.\n" \
    113 						"Type \002%s%s READ %d\002 to read it.")
    114 #define MEMO_HAVE_NO_MEMOS		_("You have no memos.")
    115 #define MEMO_X_HAS_NO_MEMOS		_("%s has no memos.")
    116 #define MEMO_SEND_DISABLED		_("Sorry, memo sending is temporarily disabled.")
    117 #define MEMO_HAVE_NO_NEW_MEMOS		_("You have no new memos.")
    118 #define MEMO_X_HAS_NO_NEW_MEMOS		_("%s has no new memos.")
    119 #define BOT_DOES_NOT_EXIST		_("Bot \002%s\002 does not exist.")
    120 #define BOT_NOT_ASSIGNED		_("You must assign a bot to the channel before using this command.")
    121 #define BOT_NOT_ON_CHANNEL		_("Bot is not on channel \002%s\002.")
    122 #define HOST_SET_ERROR			_("A vHost must be in the format of a valid hostname.")
    123 #define HOST_SET_IDENT_ERROR		_("A vHost ident must be in the format of a valid ident.")
    124 #define HOST_SET_TOOLONG		_("Error! The vHost is too long, please use a hostname shorter than %d characters.")
    125 #define HOST_SET_IDENTTOOLONG		_("Error! The vHost ident is too long, please use an ident shorter than %d characters.")
    126 #define HOST_NOT_ASSIGNED		_("Please contact an Operator to get a vHost assigned to this nick.")
    127 #define HOST_NO_VIDENT			_("Your IRCd does not support vIdent's, if this is incorrect, please report this as a possible bug")