1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 18:43:12 +02:00

Added a short docs/LANGUAGES file explaining how to add translations for the core and modules, updated TODO, and fixed a few small bugs

This commit is contained in:
Adam
2010-09-26 15:09:39 -04:00
parent 7d5893a1c8
commit f3840ed110
6 changed files with 1677 additions and 1651 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ if(WIN32)
# Add README.txt to list of files for CPack to ignore
add_to_cpack_ignored_files("README.txt$" TRUE)
endif(IN_SOURCE)
set(DOCS DEFCON FAQ INSTALL MODULES NEWS ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
set(DOCS DEFCON FAQ INSTALL LANGUAGES MODULES NEWS ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
install(FILES ${DOCS}
DESTINATION docs
)
+25
View File
@@ -0,0 +1,25 @@
Anope Mutli Language Support
----------------------------
1) Adding a new language
2) Using languages with modules
1) Adding a new language
Anope uses gettext (http://www.gnu.org/software/gettext/) to translate messages for users. To add a new language
install gettext and run `msginit -l language -o anope.language.po -i anope.pot`. For example if I was translating to
Spanish I could run `msginit -l es_ES -o anope.es_ES.po -i anope.pot`. Open the newly generating .po file in a good
editor, there many pot file editors available, and start translating. Once you are done simply rerun ./Config;
make && make install and add the language to your services.conf.
If you did a language file translation and you want others to use it, please send it to team@anope.org (don't forget
to mention clearly your (nick)name, your e-mail and the language name). You'll of course get full credit for it.
2) Using langages with modules
Module authors can easially add the ability to have their modules translated by adding _() around the strings they
need translated (messages to the user, etc). See a few of the modules in /modules/extras (cs_appendtopic, hs_request)
for examples of this. If you want to translate a module someone has made, first generate a .pot file if there is none.
Run `xgettext -s -d modulename -o modulename.pot --from-code=utf-8 modulename.cpp`. Then, run msginit on the .pot file
with `msginit -l language -o modulename.language.po -i modulename.pot`. Translate the new .po file, then place it in
the lang folder and rerun ./Config; make && make install.
+3 -3
View File
@@ -16,9 +16,9 @@ Legend:
[ ] CIDR Akills, session exceptions, etc
[x] Hashing system for storing just about everything needs to die
[x] Add support for +k, +q, etc type umodes
[ ] Language system is disgusting, it must die.
[ ] Modules should also have a way to add strings programatically
[ ] Should be able to add many strings by dropping a file in a set location.
[x] Language system is disgusting, it must die.
[x] Modules should also have a way to add strings programatically
[x] Should be able to add many strings by dropping a file in a set location.
[+] Method to store listmodes (more generically than AKICK, too) for e.g. +beI and extbans, etc.
[x] Config bailing on /os reload needs to be non fatal
[x] AutoID needs to be able to live through /os restart, current system is just annoying.
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
pushd ../src > /dev/null
xgettext -s -d Anope -o ../lang/anope.pot --from-code=utf-8 language.cpp
xgettext -C -s -d Anope -o ../lang/anope.pot --from-code=utf-8 --keyword=_ language.cpp
popd > /dev/null
for f in *.po
+1 -1
View File
@@ -39,7 +39,7 @@ class CommandNSSetLanguage : public Command
}
}
nc->language = param;
nc->language = param != "en" ? param : "";
u->SendMessage(NickServ, NICK_SET_LANGUAGE_CHANGED);
return MOD_CONT;
+1646 -1645
View File
File diff suppressed because it is too large Load Diff